api.go 719 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package s3
  3. import (
  4. "bytes"
  5. "fmt"
  6. "io"
  7. "sync"
  8. "sync/atomic"
  9. "time"
  10. "github.com/aws/aws-sdk-go/aws"
  11. "github.com/aws/aws-sdk-go/aws/awsutil"
  12. "github.com/aws/aws-sdk-go/aws/client"
  13. "github.com/aws/aws-sdk-go/aws/request"
  14. "github.com/aws/aws-sdk-go/private/protocol"
  15. "github.com/aws/aws-sdk-go/private/protocol/eventstream"
  16. "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi"
  17. "github.com/aws/aws-sdk-go/private/protocol/rest"
  18. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  19. )
  20. const opAbortMultipartUpload = "AbortMultipartUpload"
  21. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  22. // client's request for the AbortMultipartUpload operation. The "output" return
  23. // value will be populated with the request's response once the request completes
  24. // successfuly.
  25. //
  26. // Use "Send" method on the returned Request to send the API call to the service.
  27. // the "output" return value is not valid until after Send returns without error.
  28. //
  29. // See AbortMultipartUpload for more information on using the AbortMultipartUpload
  30. // API call, and error handling.
  31. //
  32. // This method is useful when you want to inject custom logic or configuration
  33. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  34. //
  35. //
  36. // // Example sending a request using the AbortMultipartUploadRequest method.
  37. // req, resp := client.AbortMultipartUploadRequest(params)
  38. //
  39. // err := req.Send()
  40. // if err == nil { // resp is now filled
  41. // fmt.Println(resp)
  42. // }
  43. //
  44. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  45. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  46. op := &request.Operation{
  47. Name: opAbortMultipartUpload,
  48. HTTPMethod: "DELETE",
  49. HTTPPath: "/{Bucket}/{Key+}",
  50. }
  51. if input == nil {
  52. input = &AbortMultipartUploadInput{}
  53. }
  54. output = &AbortMultipartUploadOutput{}
  55. req = c.newRequest(op, input, output)
  56. return
  57. }
  58. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  59. //
  60. // Aborts a multipart upload.
  61. //
  62. // To verify that all parts have been removed, so you don't get charged for
  63. // the part storage, you should call the List Parts operation and ensure the
  64. // parts list is empty.
  65. //
  66. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  67. // with awserr.Error's Code and Message methods to get detailed information about
  68. // the error.
  69. //
  70. // See the AWS API reference guide for Amazon Simple Storage Service's
  71. // API operation AbortMultipartUpload for usage and error information.
  72. //
  73. // Returned Error Codes:
  74. // * ErrCodeNoSuchUpload "NoSuchUpload"
  75. // The specified multipart upload does not exist.
  76. //
  77. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  78. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  79. req, out := c.AbortMultipartUploadRequest(input)
  80. return out, req.Send()
  81. }
  82. // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
  83. // the ability to pass a context and additional request options.
  84. //
  85. // See AbortMultipartUpload for details on how to use this API operation.
  86. //
  87. // The context must be non-nil and will be used for request cancellation. If
  88. // the context is nil a panic will occur. In the future the SDK may create
  89. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  90. // for more information on using Contexts.
  91. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
  92. req, out := c.AbortMultipartUploadRequest(input)
  93. req.SetContext(ctx)
  94. req.ApplyOptions(opts...)
  95. return out, req.Send()
  96. }
  97. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  98. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  99. // client's request for the CompleteMultipartUpload operation. The "output" return
  100. // value will be populated with the request's response once the request completes
  101. // successfuly.
  102. //
  103. // Use "Send" method on the returned Request to send the API call to the service.
  104. // the "output" return value is not valid until after Send returns without error.
  105. //
  106. // See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
  107. // API call, and error handling.
  108. //
  109. // This method is useful when you want to inject custom logic or configuration
  110. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  111. //
  112. //
  113. // // Example sending a request using the CompleteMultipartUploadRequest method.
  114. // req, resp := client.CompleteMultipartUploadRequest(params)
  115. //
  116. // err := req.Send()
  117. // if err == nil { // resp is now filled
  118. // fmt.Println(resp)
  119. // }
  120. //
  121. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  122. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  123. op := &request.Operation{
  124. Name: opCompleteMultipartUpload,
  125. HTTPMethod: "POST",
  126. HTTPPath: "/{Bucket}/{Key+}",
  127. }
  128. if input == nil {
  129. input = &CompleteMultipartUploadInput{}
  130. }
  131. output = &CompleteMultipartUploadOutput{}
  132. req = c.newRequest(op, input, output)
  133. return
  134. }
  135. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  136. //
  137. // Completes a multipart upload by assembling previously uploaded parts.
  138. //
  139. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  140. // with awserr.Error's Code and Message methods to get detailed information about
  141. // the error.
  142. //
  143. // See the AWS API reference guide for Amazon Simple Storage Service's
  144. // API operation CompleteMultipartUpload for usage and error information.
  145. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  146. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  147. req, out := c.CompleteMultipartUploadRequest(input)
  148. return out, req.Send()
  149. }
  150. // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
  151. // the ability to pass a context and additional request options.
  152. //
  153. // See CompleteMultipartUpload for details on how to use this API operation.
  154. //
  155. // The context must be non-nil and will be used for request cancellation. If
  156. // the context is nil a panic will occur. In the future the SDK may create
  157. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  158. // for more information on using Contexts.
  159. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
  160. req, out := c.CompleteMultipartUploadRequest(input)
  161. req.SetContext(ctx)
  162. req.ApplyOptions(opts...)
  163. return out, req.Send()
  164. }
  165. const opCopyObject = "CopyObject"
  166. // CopyObjectRequest generates a "aws/request.Request" representing the
  167. // client's request for the CopyObject operation. The "output" return
  168. // value will be populated with the request's response once the request completes
  169. // successfuly.
  170. //
  171. // Use "Send" method on the returned Request to send the API call to the service.
  172. // the "output" return value is not valid until after Send returns without error.
  173. //
  174. // See CopyObject for more information on using the CopyObject
  175. // API call, and error handling.
  176. //
  177. // This method is useful when you want to inject custom logic or configuration
  178. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  179. //
  180. //
  181. // // Example sending a request using the CopyObjectRequest method.
  182. // req, resp := client.CopyObjectRequest(params)
  183. //
  184. // err := req.Send()
  185. // if err == nil { // resp is now filled
  186. // fmt.Println(resp)
  187. // }
  188. //
  189. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  190. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  191. op := &request.Operation{
  192. Name: opCopyObject,
  193. HTTPMethod: "PUT",
  194. HTTPPath: "/{Bucket}/{Key+}",
  195. }
  196. if input == nil {
  197. input = &CopyObjectInput{}
  198. }
  199. output = &CopyObjectOutput{}
  200. req = c.newRequest(op, input, output)
  201. return
  202. }
  203. // CopyObject API operation for Amazon Simple Storage Service.
  204. //
  205. // Creates a copy of an object that is already stored in Amazon S3.
  206. //
  207. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  208. // with awserr.Error's Code and Message methods to get detailed information about
  209. // the error.
  210. //
  211. // See the AWS API reference guide for Amazon Simple Storage Service's
  212. // API operation CopyObject for usage and error information.
  213. //
  214. // Returned Error Codes:
  215. // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
  216. // The source object of the COPY operation is not in the active tier and is
  217. // only stored in Amazon Glacier.
  218. //
  219. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  220. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  221. req, out := c.CopyObjectRequest(input)
  222. return out, req.Send()
  223. }
  224. // CopyObjectWithContext is the same as CopyObject with the addition of
  225. // the ability to pass a context and additional request options.
  226. //
  227. // See CopyObject for details on how to use this API operation.
  228. //
  229. // The context must be non-nil and will be used for request cancellation. If
  230. // the context is nil a panic will occur. In the future the SDK may create
  231. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  232. // for more information on using Contexts.
  233. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
  234. req, out := c.CopyObjectRequest(input)
  235. req.SetContext(ctx)
  236. req.ApplyOptions(opts...)
  237. return out, req.Send()
  238. }
  239. const opCreateBucket = "CreateBucket"
  240. // CreateBucketRequest generates a "aws/request.Request" representing the
  241. // client's request for the CreateBucket operation. The "output" return
  242. // value will be populated with the request's response once the request completes
  243. // successfuly.
  244. //
  245. // Use "Send" method on the returned Request to send the API call to the service.
  246. // the "output" return value is not valid until after Send returns without error.
  247. //
  248. // See CreateBucket for more information on using the CreateBucket
  249. // API call, and error handling.
  250. //
  251. // This method is useful when you want to inject custom logic or configuration
  252. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  253. //
  254. //
  255. // // Example sending a request using the CreateBucketRequest method.
  256. // req, resp := client.CreateBucketRequest(params)
  257. //
  258. // err := req.Send()
  259. // if err == nil { // resp is now filled
  260. // fmt.Println(resp)
  261. // }
  262. //
  263. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  264. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  265. op := &request.Operation{
  266. Name: opCreateBucket,
  267. HTTPMethod: "PUT",
  268. HTTPPath: "/{Bucket}",
  269. }
  270. if input == nil {
  271. input = &CreateBucketInput{}
  272. }
  273. output = &CreateBucketOutput{}
  274. req = c.newRequest(op, input, output)
  275. return
  276. }
  277. // CreateBucket API operation for Amazon Simple Storage Service.
  278. //
  279. // Creates a new bucket.
  280. //
  281. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  282. // with awserr.Error's Code and Message methods to get detailed information about
  283. // the error.
  284. //
  285. // See the AWS API reference guide for Amazon Simple Storage Service's
  286. // API operation CreateBucket for usage and error information.
  287. //
  288. // Returned Error Codes:
  289. // * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
  290. // The requested bucket name is not available. The bucket namespace is shared
  291. // by all users of the system. Please select a different name and try again.
  292. //
  293. // * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
  294. //
  295. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  296. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  297. req, out := c.CreateBucketRequest(input)
  298. return out, req.Send()
  299. }
  300. // CreateBucketWithContext is the same as CreateBucket with the addition of
  301. // the ability to pass a context and additional request options.
  302. //
  303. // See CreateBucket for details on how to use this API operation.
  304. //
  305. // The context must be non-nil and will be used for request cancellation. If
  306. // the context is nil a panic will occur. In the future the SDK may create
  307. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  308. // for more information on using Contexts.
  309. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
  310. req, out := c.CreateBucketRequest(input)
  311. req.SetContext(ctx)
  312. req.ApplyOptions(opts...)
  313. return out, req.Send()
  314. }
  315. const opCreateMultipartUpload = "CreateMultipartUpload"
  316. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  317. // client's request for the CreateMultipartUpload operation. The "output" return
  318. // value will be populated with the request's response once the request completes
  319. // successfuly.
  320. //
  321. // Use "Send" method on the returned Request to send the API call to the service.
  322. // the "output" return value is not valid until after Send returns without error.
  323. //
  324. // See CreateMultipartUpload for more information on using the CreateMultipartUpload
  325. // API call, and error handling.
  326. //
  327. // This method is useful when you want to inject custom logic or configuration
  328. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  329. //
  330. //
  331. // // Example sending a request using the CreateMultipartUploadRequest method.
  332. // req, resp := client.CreateMultipartUploadRequest(params)
  333. //
  334. // err := req.Send()
  335. // if err == nil { // resp is now filled
  336. // fmt.Println(resp)
  337. // }
  338. //
  339. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  340. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  341. op := &request.Operation{
  342. Name: opCreateMultipartUpload,
  343. HTTPMethod: "POST",
  344. HTTPPath: "/{Bucket}/{Key+}?uploads",
  345. }
  346. if input == nil {
  347. input = &CreateMultipartUploadInput{}
  348. }
  349. output = &CreateMultipartUploadOutput{}
  350. req = c.newRequest(op, input, output)
  351. return
  352. }
  353. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  354. //
  355. // Initiates a multipart upload and returns an upload ID.
  356. //
  357. // Note: After you initiate multipart upload and upload one or more parts, you
  358. // must either complete or abort multipart upload in order to stop getting charged
  359. // for storage of the uploaded parts. Only after you either complete or abort
  360. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  361. // you for the parts storage.
  362. //
  363. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  364. // with awserr.Error's Code and Message methods to get detailed information about
  365. // the error.
  366. //
  367. // See the AWS API reference guide for Amazon Simple Storage Service's
  368. // API operation CreateMultipartUpload for usage and error information.
  369. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  370. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  371. req, out := c.CreateMultipartUploadRequest(input)
  372. return out, req.Send()
  373. }
  374. // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
  375. // the ability to pass a context and additional request options.
  376. //
  377. // See CreateMultipartUpload for details on how to use this API operation.
  378. //
  379. // The context must be non-nil and will be used for request cancellation. If
  380. // the context is nil a panic will occur. In the future the SDK may create
  381. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  382. // for more information on using Contexts.
  383. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
  384. req, out := c.CreateMultipartUploadRequest(input)
  385. req.SetContext(ctx)
  386. req.ApplyOptions(opts...)
  387. return out, req.Send()
  388. }
  389. const opDeleteBucket = "DeleteBucket"
  390. // DeleteBucketRequest generates a "aws/request.Request" representing the
  391. // client's request for the DeleteBucket operation. The "output" return
  392. // value will be populated with the request's response once the request completes
  393. // successfuly.
  394. //
  395. // Use "Send" method on the returned Request to send the API call to the service.
  396. // the "output" return value is not valid until after Send returns without error.
  397. //
  398. // See DeleteBucket for more information on using the DeleteBucket
  399. // API call, and error handling.
  400. //
  401. // This method is useful when you want to inject custom logic or configuration
  402. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  403. //
  404. //
  405. // // Example sending a request using the DeleteBucketRequest method.
  406. // req, resp := client.DeleteBucketRequest(params)
  407. //
  408. // err := req.Send()
  409. // if err == nil { // resp is now filled
  410. // fmt.Println(resp)
  411. // }
  412. //
  413. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  414. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  415. op := &request.Operation{
  416. Name: opDeleteBucket,
  417. HTTPMethod: "DELETE",
  418. HTTPPath: "/{Bucket}",
  419. }
  420. if input == nil {
  421. input = &DeleteBucketInput{}
  422. }
  423. output = &DeleteBucketOutput{}
  424. req = c.newRequest(op, input, output)
  425. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  426. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  427. return
  428. }
  429. // DeleteBucket API operation for Amazon Simple Storage Service.
  430. //
  431. // Deletes the bucket. All objects (including all object versions and Delete
  432. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  433. //
  434. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  435. // with awserr.Error's Code and Message methods to get detailed information about
  436. // the error.
  437. //
  438. // See the AWS API reference guide for Amazon Simple Storage Service's
  439. // API operation DeleteBucket for usage and error information.
  440. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  441. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  442. req, out := c.DeleteBucketRequest(input)
  443. return out, req.Send()
  444. }
  445. // DeleteBucketWithContext is the same as DeleteBucket with the addition of
  446. // the ability to pass a context and additional request options.
  447. //
  448. // See DeleteBucket for details on how to use this API operation.
  449. //
  450. // The context must be non-nil and will be used for request cancellation. If
  451. // the context is nil a panic will occur. In the future the SDK may create
  452. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  453. // for more information on using Contexts.
  454. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
  455. req, out := c.DeleteBucketRequest(input)
  456. req.SetContext(ctx)
  457. req.ApplyOptions(opts...)
  458. return out, req.Send()
  459. }
  460. const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
  461. // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  462. // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
  463. // value will be populated with the request's response once the request completes
  464. // successfuly.
  465. //
  466. // Use "Send" method on the returned Request to send the API call to the service.
  467. // the "output" return value is not valid until after Send returns without error.
  468. //
  469. // See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
  470. // API call, and error handling.
  471. //
  472. // This method is useful when you want to inject custom logic or configuration
  473. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  474. //
  475. //
  476. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  477. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  478. //
  479. // err := req.Send()
  480. // if err == nil { // resp is now filled
  481. // fmt.Println(resp)
  482. // }
  483. //
  484. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  485. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  486. op := &request.Operation{
  487. Name: opDeleteBucketAnalyticsConfiguration,
  488. HTTPMethod: "DELETE",
  489. HTTPPath: "/{Bucket}?analytics",
  490. }
  491. if input == nil {
  492. input = &DeleteBucketAnalyticsConfigurationInput{}
  493. }
  494. output = &DeleteBucketAnalyticsConfigurationOutput{}
  495. req = c.newRequest(op, input, output)
  496. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  497. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  498. return
  499. }
  500. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  501. //
  502. // Deletes an analytics configuration for the bucket (specified by the analytics
  503. // configuration ID).
  504. //
  505. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  506. // with awserr.Error's Code and Message methods to get detailed information about
  507. // the error.
  508. //
  509. // See the AWS API reference guide for Amazon Simple Storage Service's
  510. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  511. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  512. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  513. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  514. return out, req.Send()
  515. }
  516. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  517. // the ability to pass a context and additional request options.
  518. //
  519. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  520. //
  521. // The context must be non-nil and will be used for request cancellation. If
  522. // the context is nil a panic will occur. In the future the SDK may create
  523. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  524. // for more information on using Contexts.
  525. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  526. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  527. req.SetContext(ctx)
  528. req.ApplyOptions(opts...)
  529. return out, req.Send()
  530. }
  531. const opDeleteBucketCors = "DeleteBucketCors"
  532. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  533. // client's request for the DeleteBucketCors operation. The "output" return
  534. // value will be populated with the request's response once the request completes
  535. // successfuly.
  536. //
  537. // Use "Send" method on the returned Request to send the API call to the service.
  538. // the "output" return value is not valid until after Send returns without error.
  539. //
  540. // See DeleteBucketCors for more information on using the DeleteBucketCors
  541. // API call, and error handling.
  542. //
  543. // This method is useful when you want to inject custom logic or configuration
  544. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  545. //
  546. //
  547. // // Example sending a request using the DeleteBucketCorsRequest method.
  548. // req, resp := client.DeleteBucketCorsRequest(params)
  549. //
  550. // err := req.Send()
  551. // if err == nil { // resp is now filled
  552. // fmt.Println(resp)
  553. // }
  554. //
  555. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  556. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  557. op := &request.Operation{
  558. Name: opDeleteBucketCors,
  559. HTTPMethod: "DELETE",
  560. HTTPPath: "/{Bucket}?cors",
  561. }
  562. if input == nil {
  563. input = &DeleteBucketCorsInput{}
  564. }
  565. output = &DeleteBucketCorsOutput{}
  566. req = c.newRequest(op, input, output)
  567. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  568. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  569. return
  570. }
  571. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  572. //
  573. // Deletes the cors configuration information set for the bucket.
  574. //
  575. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  576. // with awserr.Error's Code and Message methods to get detailed information about
  577. // the error.
  578. //
  579. // See the AWS API reference guide for Amazon Simple Storage Service's
  580. // API operation DeleteBucketCors for usage and error information.
  581. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  582. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  583. req, out := c.DeleteBucketCorsRequest(input)
  584. return out, req.Send()
  585. }
  586. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  587. // the ability to pass a context and additional request options.
  588. //
  589. // See DeleteBucketCors for details on how to use this API operation.
  590. //
  591. // The context must be non-nil and will be used for request cancellation. If
  592. // the context is nil a panic will occur. In the future the SDK may create
  593. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  594. // for more information on using Contexts.
  595. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  596. req, out := c.DeleteBucketCorsRequest(input)
  597. req.SetContext(ctx)
  598. req.ApplyOptions(opts...)
  599. return out, req.Send()
  600. }
  601. const opDeleteBucketEncryption = "DeleteBucketEncryption"
  602. // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
  603. // client's request for the DeleteBucketEncryption operation. The "output" return
  604. // value will be populated with the request's response once the request completes
  605. // successfuly.
  606. //
  607. // Use "Send" method on the returned Request to send the API call to the service.
  608. // the "output" return value is not valid until after Send returns without error.
  609. //
  610. // See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
  611. // API call, and error handling.
  612. //
  613. // This method is useful when you want to inject custom logic or configuration
  614. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  615. //
  616. //
  617. // // Example sending a request using the DeleteBucketEncryptionRequest method.
  618. // req, resp := client.DeleteBucketEncryptionRequest(params)
  619. //
  620. // err := req.Send()
  621. // if err == nil { // resp is now filled
  622. // fmt.Println(resp)
  623. // }
  624. //
  625. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  626. func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
  627. op := &request.Operation{
  628. Name: opDeleteBucketEncryption,
  629. HTTPMethod: "DELETE",
  630. HTTPPath: "/{Bucket}?encryption",
  631. }
  632. if input == nil {
  633. input = &DeleteBucketEncryptionInput{}
  634. }
  635. output = &DeleteBucketEncryptionOutput{}
  636. req = c.newRequest(op, input, output)
  637. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  638. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  639. return
  640. }
  641. // DeleteBucketEncryption API operation for Amazon Simple Storage Service.
  642. //
  643. // Deletes the server-side encryption configuration from the bucket.
  644. //
  645. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  646. // with awserr.Error's Code and Message methods to get detailed information about
  647. // the error.
  648. //
  649. // See the AWS API reference guide for Amazon Simple Storage Service's
  650. // API operation DeleteBucketEncryption for usage and error information.
  651. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  652. func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
  653. req, out := c.DeleteBucketEncryptionRequest(input)
  654. return out, req.Send()
  655. }
  656. // DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
  657. // the ability to pass a context and additional request options.
  658. //
  659. // See DeleteBucketEncryption for details on how to use this API operation.
  660. //
  661. // The context must be non-nil and will be used for request cancellation. If
  662. // the context is nil a panic will occur. In the future the SDK may create
  663. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  664. // for more information on using Contexts.
  665. func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
  666. req, out := c.DeleteBucketEncryptionRequest(input)
  667. req.SetContext(ctx)
  668. req.ApplyOptions(opts...)
  669. return out, req.Send()
  670. }
  671. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  672. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  673. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  674. // value will be populated with the request's response once the request completes
  675. // successfuly.
  676. //
  677. // Use "Send" method on the returned Request to send the API call to the service.
  678. // the "output" return value is not valid until after Send returns without error.
  679. //
  680. // See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
  681. // API call, and error handling.
  682. //
  683. // This method is useful when you want to inject custom logic or configuration
  684. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  685. //
  686. //
  687. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  688. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  689. //
  690. // err := req.Send()
  691. // if err == nil { // resp is now filled
  692. // fmt.Println(resp)
  693. // }
  694. //
  695. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  696. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  697. op := &request.Operation{
  698. Name: opDeleteBucketInventoryConfiguration,
  699. HTTPMethod: "DELETE",
  700. HTTPPath: "/{Bucket}?inventory",
  701. }
  702. if input == nil {
  703. input = &DeleteBucketInventoryConfigurationInput{}
  704. }
  705. output = &DeleteBucketInventoryConfigurationOutput{}
  706. req = c.newRequest(op, input, output)
  707. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  708. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  709. return
  710. }
  711. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  712. //
  713. // Deletes an inventory configuration (identified by the inventory ID) from
  714. // the bucket.
  715. //
  716. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  717. // with awserr.Error's Code and Message methods to get detailed information about
  718. // the error.
  719. //
  720. // See the AWS API reference guide for Amazon Simple Storage Service's
  721. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  722. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  723. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  724. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  725. return out, req.Send()
  726. }
  727. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  728. // the ability to pass a context and additional request options.
  729. //
  730. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  731. //
  732. // The context must be non-nil and will be used for request cancellation. If
  733. // the context is nil a panic will occur. In the future the SDK may create
  734. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  735. // for more information on using Contexts.
  736. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  737. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  738. req.SetContext(ctx)
  739. req.ApplyOptions(opts...)
  740. return out, req.Send()
  741. }
  742. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  743. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  744. // client's request for the DeleteBucketLifecycle operation. The "output" return
  745. // value will be populated with the request's response once the request completes
  746. // successfuly.
  747. //
  748. // Use "Send" method on the returned Request to send the API call to the service.
  749. // the "output" return value is not valid until after Send returns without error.
  750. //
  751. // See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
  752. // API call, and error handling.
  753. //
  754. // This method is useful when you want to inject custom logic or configuration
  755. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  756. //
  757. //
  758. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  759. // req, resp := client.DeleteBucketLifecycleRequest(params)
  760. //
  761. // err := req.Send()
  762. // if err == nil { // resp is now filled
  763. // fmt.Println(resp)
  764. // }
  765. //
  766. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  767. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  768. op := &request.Operation{
  769. Name: opDeleteBucketLifecycle,
  770. HTTPMethod: "DELETE",
  771. HTTPPath: "/{Bucket}?lifecycle",
  772. }
  773. if input == nil {
  774. input = &DeleteBucketLifecycleInput{}
  775. }
  776. output = &DeleteBucketLifecycleOutput{}
  777. req = c.newRequest(op, input, output)
  778. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  779. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  780. return
  781. }
  782. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  783. //
  784. // Deletes the lifecycle configuration from the bucket.
  785. //
  786. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  787. // with awserr.Error's Code and Message methods to get detailed information about
  788. // the error.
  789. //
  790. // See the AWS API reference guide for Amazon Simple Storage Service's
  791. // API operation DeleteBucketLifecycle for usage and error information.
  792. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  793. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  794. req, out := c.DeleteBucketLifecycleRequest(input)
  795. return out, req.Send()
  796. }
  797. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  798. // the ability to pass a context and additional request options.
  799. //
  800. // See DeleteBucketLifecycle for details on how to use this API operation.
  801. //
  802. // The context must be non-nil and will be used for request cancellation. If
  803. // the context is nil a panic will occur. In the future the SDK may create
  804. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  805. // for more information on using Contexts.
  806. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  807. req, out := c.DeleteBucketLifecycleRequest(input)
  808. req.SetContext(ctx)
  809. req.ApplyOptions(opts...)
  810. return out, req.Send()
  811. }
  812. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  813. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  814. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  815. // value will be populated with the request's response once the request completes
  816. // successfuly.
  817. //
  818. // Use "Send" method on the returned Request to send the API call to the service.
  819. // the "output" return value is not valid until after Send returns without error.
  820. //
  821. // See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
  822. // API call, and error handling.
  823. //
  824. // This method is useful when you want to inject custom logic or configuration
  825. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  826. //
  827. //
  828. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  829. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  830. //
  831. // err := req.Send()
  832. // if err == nil { // resp is now filled
  833. // fmt.Println(resp)
  834. // }
  835. //
  836. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  837. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  838. op := &request.Operation{
  839. Name: opDeleteBucketMetricsConfiguration,
  840. HTTPMethod: "DELETE",
  841. HTTPPath: "/{Bucket}?metrics",
  842. }
  843. if input == nil {
  844. input = &DeleteBucketMetricsConfigurationInput{}
  845. }
  846. output = &DeleteBucketMetricsConfigurationOutput{}
  847. req = c.newRequest(op, input, output)
  848. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  849. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  850. return
  851. }
  852. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  853. //
  854. // Deletes a metrics configuration (specified by the metrics configuration ID)
  855. // from the bucket.
  856. //
  857. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  858. // with awserr.Error's Code and Message methods to get detailed information about
  859. // the error.
  860. //
  861. // See the AWS API reference guide for Amazon Simple Storage Service's
  862. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  863. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  864. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  865. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  866. return out, req.Send()
  867. }
  868. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  869. // the ability to pass a context and additional request options.
  870. //
  871. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  872. //
  873. // The context must be non-nil and will be used for request cancellation. If
  874. // the context is nil a panic will occur. In the future the SDK may create
  875. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  876. // for more information on using Contexts.
  877. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  878. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  879. req.SetContext(ctx)
  880. req.ApplyOptions(opts...)
  881. return out, req.Send()
  882. }
  883. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  884. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  885. // client's request for the DeleteBucketPolicy operation. The "output" return
  886. // value will be populated with the request's response once the request completes
  887. // successfuly.
  888. //
  889. // Use "Send" method on the returned Request to send the API call to the service.
  890. // the "output" return value is not valid until after Send returns without error.
  891. //
  892. // See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
  893. // API call, and error handling.
  894. //
  895. // This method is useful when you want to inject custom logic or configuration
  896. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  897. //
  898. //
  899. // // Example sending a request using the DeleteBucketPolicyRequest method.
  900. // req, resp := client.DeleteBucketPolicyRequest(params)
  901. //
  902. // err := req.Send()
  903. // if err == nil { // resp is now filled
  904. // fmt.Println(resp)
  905. // }
  906. //
  907. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  908. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  909. op := &request.Operation{
  910. Name: opDeleteBucketPolicy,
  911. HTTPMethod: "DELETE",
  912. HTTPPath: "/{Bucket}?policy",
  913. }
  914. if input == nil {
  915. input = &DeleteBucketPolicyInput{}
  916. }
  917. output = &DeleteBucketPolicyOutput{}
  918. req = c.newRequest(op, input, output)
  919. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  920. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  921. return
  922. }
  923. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  924. //
  925. // Deletes the policy from the bucket.
  926. //
  927. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  928. // with awserr.Error's Code and Message methods to get detailed information about
  929. // the error.
  930. //
  931. // See the AWS API reference guide for Amazon Simple Storage Service's
  932. // API operation DeleteBucketPolicy for usage and error information.
  933. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  934. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  935. req, out := c.DeleteBucketPolicyRequest(input)
  936. return out, req.Send()
  937. }
  938. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  939. // the ability to pass a context and additional request options.
  940. //
  941. // See DeleteBucketPolicy for details on how to use this API operation.
  942. //
  943. // The context must be non-nil and will be used for request cancellation. If
  944. // the context is nil a panic will occur. In the future the SDK may create
  945. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  946. // for more information on using Contexts.
  947. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  948. req, out := c.DeleteBucketPolicyRequest(input)
  949. req.SetContext(ctx)
  950. req.ApplyOptions(opts...)
  951. return out, req.Send()
  952. }
  953. const opDeleteBucketReplication = "DeleteBucketReplication"
  954. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  955. // client's request for the DeleteBucketReplication operation. The "output" return
  956. // value will be populated with the request's response once the request completes
  957. // successfuly.
  958. //
  959. // Use "Send" method on the returned Request to send the API call to the service.
  960. // the "output" return value is not valid until after Send returns without error.
  961. //
  962. // See DeleteBucketReplication for more information on using the DeleteBucketReplication
  963. // API call, and error handling.
  964. //
  965. // This method is useful when you want to inject custom logic or configuration
  966. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  967. //
  968. //
  969. // // Example sending a request using the DeleteBucketReplicationRequest method.
  970. // req, resp := client.DeleteBucketReplicationRequest(params)
  971. //
  972. // err := req.Send()
  973. // if err == nil { // resp is now filled
  974. // fmt.Println(resp)
  975. // }
  976. //
  977. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  978. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  979. op := &request.Operation{
  980. Name: opDeleteBucketReplication,
  981. HTTPMethod: "DELETE",
  982. HTTPPath: "/{Bucket}?replication",
  983. }
  984. if input == nil {
  985. input = &DeleteBucketReplicationInput{}
  986. }
  987. output = &DeleteBucketReplicationOutput{}
  988. req = c.newRequest(op, input, output)
  989. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  990. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  991. return
  992. }
  993. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  994. //
  995. // Deletes the replication configuration from the bucket.
  996. //
  997. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  998. // with awserr.Error's Code and Message methods to get detailed information about
  999. // the error.
  1000. //
  1001. // See the AWS API reference guide for Amazon Simple Storage Service's
  1002. // API operation DeleteBucketReplication for usage and error information.
  1003. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  1004. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  1005. req, out := c.DeleteBucketReplicationRequest(input)
  1006. return out, req.Send()
  1007. }
  1008. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  1009. // the ability to pass a context and additional request options.
  1010. //
  1011. // See DeleteBucketReplication for details on how to use this API operation.
  1012. //
  1013. // The context must be non-nil and will be used for request cancellation. If
  1014. // the context is nil a panic will occur. In the future the SDK may create
  1015. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1016. // for more information on using Contexts.
  1017. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  1018. req, out := c.DeleteBucketReplicationRequest(input)
  1019. req.SetContext(ctx)
  1020. req.ApplyOptions(opts...)
  1021. return out, req.Send()
  1022. }
  1023. const opDeleteBucketTagging = "DeleteBucketTagging"
  1024. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  1025. // client's request for the DeleteBucketTagging operation. The "output" return
  1026. // value will be populated with the request's response once the request completes
  1027. // successfuly.
  1028. //
  1029. // Use "Send" method on the returned Request to send the API call to the service.
  1030. // the "output" return value is not valid until after Send returns without error.
  1031. //
  1032. // See DeleteBucketTagging for more information on using the DeleteBucketTagging
  1033. // API call, and error handling.
  1034. //
  1035. // This method is useful when you want to inject custom logic or configuration
  1036. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1037. //
  1038. //
  1039. // // Example sending a request using the DeleteBucketTaggingRequest method.
  1040. // req, resp := client.DeleteBucketTaggingRequest(params)
  1041. //
  1042. // err := req.Send()
  1043. // if err == nil { // resp is now filled
  1044. // fmt.Println(resp)
  1045. // }
  1046. //
  1047. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1048. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  1049. op := &request.Operation{
  1050. Name: opDeleteBucketTagging,
  1051. HTTPMethod: "DELETE",
  1052. HTTPPath: "/{Bucket}?tagging",
  1053. }
  1054. if input == nil {
  1055. input = &DeleteBucketTaggingInput{}
  1056. }
  1057. output = &DeleteBucketTaggingOutput{}
  1058. req = c.newRequest(op, input, output)
  1059. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1060. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1061. return
  1062. }
  1063. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1064. //
  1065. // Deletes the tags from the bucket.
  1066. //
  1067. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1068. // with awserr.Error's Code and Message methods to get detailed information about
  1069. // the error.
  1070. //
  1071. // See the AWS API reference guide for Amazon Simple Storage Service's
  1072. // API operation DeleteBucketTagging for usage and error information.
  1073. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1074. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1075. req, out := c.DeleteBucketTaggingRequest(input)
  1076. return out, req.Send()
  1077. }
  1078. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1079. // the ability to pass a context and additional request options.
  1080. //
  1081. // See DeleteBucketTagging for details on how to use this API operation.
  1082. //
  1083. // The context must be non-nil and will be used for request cancellation. If
  1084. // the context is nil a panic will occur. In the future the SDK may create
  1085. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1086. // for more information on using Contexts.
  1087. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1088. req, out := c.DeleteBucketTaggingRequest(input)
  1089. req.SetContext(ctx)
  1090. req.ApplyOptions(opts...)
  1091. return out, req.Send()
  1092. }
  1093. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1094. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1095. // client's request for the DeleteBucketWebsite operation. The "output" return
  1096. // value will be populated with the request's response once the request completes
  1097. // successfuly.
  1098. //
  1099. // Use "Send" method on the returned Request to send the API call to the service.
  1100. // the "output" return value is not valid until after Send returns without error.
  1101. //
  1102. // See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
  1103. // API call, and error handling.
  1104. //
  1105. // This method is useful when you want to inject custom logic or configuration
  1106. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1107. //
  1108. //
  1109. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1110. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1111. //
  1112. // err := req.Send()
  1113. // if err == nil { // resp is now filled
  1114. // fmt.Println(resp)
  1115. // }
  1116. //
  1117. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1118. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1119. op := &request.Operation{
  1120. Name: opDeleteBucketWebsite,
  1121. HTTPMethod: "DELETE",
  1122. HTTPPath: "/{Bucket}?website",
  1123. }
  1124. if input == nil {
  1125. input = &DeleteBucketWebsiteInput{}
  1126. }
  1127. output = &DeleteBucketWebsiteOutput{}
  1128. req = c.newRequest(op, input, output)
  1129. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1130. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1131. return
  1132. }
  1133. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1134. //
  1135. // This operation removes the website configuration from the bucket.
  1136. //
  1137. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1138. // with awserr.Error's Code and Message methods to get detailed information about
  1139. // the error.
  1140. //
  1141. // See the AWS API reference guide for Amazon Simple Storage Service's
  1142. // API operation DeleteBucketWebsite for usage and error information.
  1143. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1144. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1145. req, out := c.DeleteBucketWebsiteRequest(input)
  1146. return out, req.Send()
  1147. }
  1148. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1149. // the ability to pass a context and additional request options.
  1150. //
  1151. // See DeleteBucketWebsite for details on how to use this API operation.
  1152. //
  1153. // The context must be non-nil and will be used for request cancellation. If
  1154. // the context is nil a panic will occur. In the future the SDK may create
  1155. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1156. // for more information on using Contexts.
  1157. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1158. req, out := c.DeleteBucketWebsiteRequest(input)
  1159. req.SetContext(ctx)
  1160. req.ApplyOptions(opts...)
  1161. return out, req.Send()
  1162. }
  1163. const opDeleteObject = "DeleteObject"
  1164. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1165. // client's request for the DeleteObject operation. The "output" return
  1166. // value will be populated with the request's response once the request completes
  1167. // successfuly.
  1168. //
  1169. // Use "Send" method on the returned Request to send the API call to the service.
  1170. // the "output" return value is not valid until after Send returns without error.
  1171. //
  1172. // See DeleteObject for more information on using the DeleteObject
  1173. // API call, and error handling.
  1174. //
  1175. // This method is useful when you want to inject custom logic or configuration
  1176. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1177. //
  1178. //
  1179. // // Example sending a request using the DeleteObjectRequest method.
  1180. // req, resp := client.DeleteObjectRequest(params)
  1181. //
  1182. // err := req.Send()
  1183. // if err == nil { // resp is now filled
  1184. // fmt.Println(resp)
  1185. // }
  1186. //
  1187. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1188. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  1189. op := &request.Operation{
  1190. Name: opDeleteObject,
  1191. HTTPMethod: "DELETE",
  1192. HTTPPath: "/{Bucket}/{Key+}",
  1193. }
  1194. if input == nil {
  1195. input = &DeleteObjectInput{}
  1196. }
  1197. output = &DeleteObjectOutput{}
  1198. req = c.newRequest(op, input, output)
  1199. return
  1200. }
  1201. // DeleteObject API operation for Amazon Simple Storage Service.
  1202. //
  1203. // Removes the null version (if there is one) of an object and inserts a delete
  1204. // marker, which becomes the latest version of the object. If there isn't a
  1205. // null version, Amazon S3 does not remove any objects.
  1206. //
  1207. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1208. // with awserr.Error's Code and Message methods to get detailed information about
  1209. // the error.
  1210. //
  1211. // See the AWS API reference guide for Amazon Simple Storage Service's
  1212. // API operation DeleteObject for usage and error information.
  1213. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1214. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  1215. req, out := c.DeleteObjectRequest(input)
  1216. return out, req.Send()
  1217. }
  1218. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  1219. // the ability to pass a context and additional request options.
  1220. //
  1221. // See DeleteObject for details on how to use this API operation.
  1222. //
  1223. // The context must be non-nil and will be used for request cancellation. If
  1224. // the context is nil a panic will occur. In the future the SDK may create
  1225. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1226. // for more information on using Contexts.
  1227. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  1228. req, out := c.DeleteObjectRequest(input)
  1229. req.SetContext(ctx)
  1230. req.ApplyOptions(opts...)
  1231. return out, req.Send()
  1232. }
  1233. const opDeleteObjectTagging = "DeleteObjectTagging"
  1234. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  1235. // client's request for the DeleteObjectTagging operation. The "output" return
  1236. // value will be populated with the request's response once the request completes
  1237. // successfuly.
  1238. //
  1239. // Use "Send" method on the returned Request to send the API call to the service.
  1240. // the "output" return value is not valid until after Send returns without error.
  1241. //
  1242. // See DeleteObjectTagging for more information on using the DeleteObjectTagging
  1243. // API call, and error handling.
  1244. //
  1245. // This method is useful when you want to inject custom logic or configuration
  1246. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1247. //
  1248. //
  1249. // // Example sending a request using the DeleteObjectTaggingRequest method.
  1250. // req, resp := client.DeleteObjectTaggingRequest(params)
  1251. //
  1252. // err := req.Send()
  1253. // if err == nil { // resp is now filled
  1254. // fmt.Println(resp)
  1255. // }
  1256. //
  1257. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1258. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  1259. op := &request.Operation{
  1260. Name: opDeleteObjectTagging,
  1261. HTTPMethod: "DELETE",
  1262. HTTPPath: "/{Bucket}/{Key+}?tagging",
  1263. }
  1264. if input == nil {
  1265. input = &DeleteObjectTaggingInput{}
  1266. }
  1267. output = &DeleteObjectTaggingOutput{}
  1268. req = c.newRequest(op, input, output)
  1269. return
  1270. }
  1271. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  1272. //
  1273. // Removes the tag-set from an existing object.
  1274. //
  1275. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1276. // with awserr.Error's Code and Message methods to get detailed information about
  1277. // the error.
  1278. //
  1279. // See the AWS API reference guide for Amazon Simple Storage Service's
  1280. // API operation DeleteObjectTagging for usage and error information.
  1281. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1282. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  1283. req, out := c.DeleteObjectTaggingRequest(input)
  1284. return out, req.Send()
  1285. }
  1286. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  1287. // the ability to pass a context and additional request options.
  1288. //
  1289. // See DeleteObjectTagging for details on how to use this API operation.
  1290. //
  1291. // The context must be non-nil and will be used for request cancellation. If
  1292. // the context is nil a panic will occur. In the future the SDK may create
  1293. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1294. // for more information on using Contexts.
  1295. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  1296. req, out := c.DeleteObjectTaggingRequest(input)
  1297. req.SetContext(ctx)
  1298. req.ApplyOptions(opts...)
  1299. return out, req.Send()
  1300. }
  1301. const opDeleteObjects = "DeleteObjects"
  1302. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  1303. // client's request for the DeleteObjects operation. The "output" return
  1304. // value will be populated with the request's response once the request completes
  1305. // successfuly.
  1306. //
  1307. // Use "Send" method on the returned Request to send the API call to the service.
  1308. // the "output" return value is not valid until after Send returns without error.
  1309. //
  1310. // See DeleteObjects for more information on using the DeleteObjects
  1311. // API call, and error handling.
  1312. //
  1313. // This method is useful when you want to inject custom logic or configuration
  1314. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1315. //
  1316. //
  1317. // // Example sending a request using the DeleteObjectsRequest method.
  1318. // req, resp := client.DeleteObjectsRequest(params)
  1319. //
  1320. // err := req.Send()
  1321. // if err == nil { // resp is now filled
  1322. // fmt.Println(resp)
  1323. // }
  1324. //
  1325. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1326. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  1327. op := &request.Operation{
  1328. Name: opDeleteObjects,
  1329. HTTPMethod: "POST",
  1330. HTTPPath: "/{Bucket}?delete",
  1331. }
  1332. if input == nil {
  1333. input = &DeleteObjectsInput{}
  1334. }
  1335. output = &DeleteObjectsOutput{}
  1336. req = c.newRequest(op, input, output)
  1337. return
  1338. }
  1339. // DeleteObjects API operation for Amazon Simple Storage Service.
  1340. //
  1341. // This operation enables you to delete multiple objects from a bucket using
  1342. // a single HTTP request. You may specify up to 1000 keys.
  1343. //
  1344. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1345. // with awserr.Error's Code and Message methods to get detailed information about
  1346. // the error.
  1347. //
  1348. // See the AWS API reference guide for Amazon Simple Storage Service's
  1349. // API operation DeleteObjects for usage and error information.
  1350. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1351. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  1352. req, out := c.DeleteObjectsRequest(input)
  1353. return out, req.Send()
  1354. }
  1355. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  1356. // the ability to pass a context and additional request options.
  1357. //
  1358. // See DeleteObjects for details on how to use this API operation.
  1359. //
  1360. // The context must be non-nil and will be used for request cancellation. If
  1361. // the context is nil a panic will occur. In the future the SDK may create
  1362. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1363. // for more information on using Contexts.
  1364. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  1365. req, out := c.DeleteObjectsRequest(input)
  1366. req.SetContext(ctx)
  1367. req.ApplyOptions(opts...)
  1368. return out, req.Send()
  1369. }
  1370. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  1371. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  1372. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  1373. // value will be populated with the request's response once the request completes
  1374. // successfuly.
  1375. //
  1376. // Use "Send" method on the returned Request to send the API call to the service.
  1377. // the "output" return value is not valid until after Send returns without error.
  1378. //
  1379. // See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
  1380. // API call, and error handling.
  1381. //
  1382. // This method is useful when you want to inject custom logic or configuration
  1383. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1384. //
  1385. //
  1386. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  1387. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  1388. //
  1389. // err := req.Send()
  1390. // if err == nil { // resp is now filled
  1391. // fmt.Println(resp)
  1392. // }
  1393. //
  1394. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1395. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  1396. op := &request.Operation{
  1397. Name: opGetBucketAccelerateConfiguration,
  1398. HTTPMethod: "GET",
  1399. HTTPPath: "/{Bucket}?accelerate",
  1400. }
  1401. if input == nil {
  1402. input = &GetBucketAccelerateConfigurationInput{}
  1403. }
  1404. output = &GetBucketAccelerateConfigurationOutput{}
  1405. req = c.newRequest(op, input, output)
  1406. return
  1407. }
  1408. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  1409. //
  1410. // Returns the accelerate configuration of a bucket.
  1411. //
  1412. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1413. // with awserr.Error's Code and Message methods to get detailed information about
  1414. // the error.
  1415. //
  1416. // See the AWS API reference guide for Amazon Simple Storage Service's
  1417. // API operation GetBucketAccelerateConfiguration for usage and error information.
  1418. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1419. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  1420. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1421. return out, req.Send()
  1422. }
  1423. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  1424. // the ability to pass a context and additional request options.
  1425. //
  1426. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  1427. //
  1428. // The context must be non-nil and will be used for request cancellation. If
  1429. // the context is nil a panic will occur. In the future the SDK may create
  1430. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1431. // for more information on using Contexts.
  1432. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  1433. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1434. req.SetContext(ctx)
  1435. req.ApplyOptions(opts...)
  1436. return out, req.Send()
  1437. }
  1438. const opGetBucketAcl = "GetBucketAcl"
  1439. // GetBucketAclRequest generates a "aws/request.Request" representing the
  1440. // client's request for the GetBucketAcl operation. The "output" return
  1441. // value will be populated with the request's response once the request completes
  1442. // successfuly.
  1443. //
  1444. // Use "Send" method on the returned Request to send the API call to the service.
  1445. // the "output" return value is not valid until after Send returns without error.
  1446. //
  1447. // See GetBucketAcl for more information on using the GetBucketAcl
  1448. // API call, and error handling.
  1449. //
  1450. // This method is useful when you want to inject custom logic or configuration
  1451. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1452. //
  1453. //
  1454. // // Example sending a request using the GetBucketAclRequest method.
  1455. // req, resp := client.GetBucketAclRequest(params)
  1456. //
  1457. // err := req.Send()
  1458. // if err == nil { // resp is now filled
  1459. // fmt.Println(resp)
  1460. // }
  1461. //
  1462. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1463. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  1464. op := &request.Operation{
  1465. Name: opGetBucketAcl,
  1466. HTTPMethod: "GET",
  1467. HTTPPath: "/{Bucket}?acl",
  1468. }
  1469. if input == nil {
  1470. input = &GetBucketAclInput{}
  1471. }
  1472. output = &GetBucketAclOutput{}
  1473. req = c.newRequest(op, input, output)
  1474. return
  1475. }
  1476. // GetBucketAcl API operation for Amazon Simple Storage Service.
  1477. //
  1478. // Gets the access control policy for the bucket.
  1479. //
  1480. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1481. // with awserr.Error's Code and Message methods to get detailed information about
  1482. // the error.
  1483. //
  1484. // See the AWS API reference guide for Amazon Simple Storage Service's
  1485. // API operation GetBucketAcl for usage and error information.
  1486. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1487. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  1488. req, out := c.GetBucketAclRequest(input)
  1489. return out, req.Send()
  1490. }
  1491. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  1492. // the ability to pass a context and additional request options.
  1493. //
  1494. // See GetBucketAcl for details on how to use this API operation.
  1495. //
  1496. // The context must be non-nil and will be used for request cancellation. If
  1497. // the context is nil a panic will occur. In the future the SDK may create
  1498. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1499. // for more information on using Contexts.
  1500. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  1501. req, out := c.GetBucketAclRequest(input)
  1502. req.SetContext(ctx)
  1503. req.ApplyOptions(opts...)
  1504. return out, req.Send()
  1505. }
  1506. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  1507. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  1508. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  1509. // value will be populated with the request's response once the request completes
  1510. // successfuly.
  1511. //
  1512. // Use "Send" method on the returned Request to send the API call to the service.
  1513. // the "output" return value is not valid until after Send returns without error.
  1514. //
  1515. // See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
  1516. // API call, and error handling.
  1517. //
  1518. // This method is useful when you want to inject custom logic or configuration
  1519. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1520. //
  1521. //
  1522. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  1523. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  1524. //
  1525. // err := req.Send()
  1526. // if err == nil { // resp is now filled
  1527. // fmt.Println(resp)
  1528. // }
  1529. //
  1530. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1531. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  1532. op := &request.Operation{
  1533. Name: opGetBucketAnalyticsConfiguration,
  1534. HTTPMethod: "GET",
  1535. HTTPPath: "/{Bucket}?analytics",
  1536. }
  1537. if input == nil {
  1538. input = &GetBucketAnalyticsConfigurationInput{}
  1539. }
  1540. output = &GetBucketAnalyticsConfigurationOutput{}
  1541. req = c.newRequest(op, input, output)
  1542. return
  1543. }
  1544. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  1545. //
  1546. // Gets an analytics configuration for the bucket (specified by the analytics
  1547. // configuration ID).
  1548. //
  1549. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1550. // with awserr.Error's Code and Message methods to get detailed information about
  1551. // the error.
  1552. //
  1553. // See the AWS API reference guide for Amazon Simple Storage Service's
  1554. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  1555. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1556. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  1557. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1558. return out, req.Send()
  1559. }
  1560. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  1561. // the ability to pass a context and additional request options.
  1562. //
  1563. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  1564. //
  1565. // The context must be non-nil and will be used for request cancellation. If
  1566. // the context is nil a panic will occur. In the future the SDK may create
  1567. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1568. // for more information on using Contexts.
  1569. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  1570. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1571. req.SetContext(ctx)
  1572. req.ApplyOptions(opts...)
  1573. return out, req.Send()
  1574. }
  1575. const opGetBucketCors = "GetBucketCors"
  1576. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  1577. // client's request for the GetBucketCors operation. The "output" return
  1578. // value will be populated with the request's response once the request completes
  1579. // successfuly.
  1580. //
  1581. // Use "Send" method on the returned Request to send the API call to the service.
  1582. // the "output" return value is not valid until after Send returns without error.
  1583. //
  1584. // See GetBucketCors for more information on using the GetBucketCors
  1585. // API call, and error handling.
  1586. //
  1587. // This method is useful when you want to inject custom logic or configuration
  1588. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1589. //
  1590. //
  1591. // // Example sending a request using the GetBucketCorsRequest method.
  1592. // req, resp := client.GetBucketCorsRequest(params)
  1593. //
  1594. // err := req.Send()
  1595. // if err == nil { // resp is now filled
  1596. // fmt.Println(resp)
  1597. // }
  1598. //
  1599. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1600. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  1601. op := &request.Operation{
  1602. Name: opGetBucketCors,
  1603. HTTPMethod: "GET",
  1604. HTTPPath: "/{Bucket}?cors",
  1605. }
  1606. if input == nil {
  1607. input = &GetBucketCorsInput{}
  1608. }
  1609. output = &GetBucketCorsOutput{}
  1610. req = c.newRequest(op, input, output)
  1611. return
  1612. }
  1613. // GetBucketCors API operation for Amazon Simple Storage Service.
  1614. //
  1615. // Returns the cors configuration for the bucket.
  1616. //
  1617. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1618. // with awserr.Error's Code and Message methods to get detailed information about
  1619. // the error.
  1620. //
  1621. // See the AWS API reference guide for Amazon Simple Storage Service's
  1622. // API operation GetBucketCors for usage and error information.
  1623. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1624. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  1625. req, out := c.GetBucketCorsRequest(input)
  1626. return out, req.Send()
  1627. }
  1628. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  1629. // the ability to pass a context and additional request options.
  1630. //
  1631. // See GetBucketCors for details on how to use this API operation.
  1632. //
  1633. // The context must be non-nil and will be used for request cancellation. If
  1634. // the context is nil a panic will occur. In the future the SDK may create
  1635. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1636. // for more information on using Contexts.
  1637. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  1638. req, out := c.GetBucketCorsRequest(input)
  1639. req.SetContext(ctx)
  1640. req.ApplyOptions(opts...)
  1641. return out, req.Send()
  1642. }
  1643. const opGetBucketEncryption = "GetBucketEncryption"
  1644. // GetBucketEncryptionRequest generates a "aws/request.Request" representing the
  1645. // client's request for the GetBucketEncryption operation. The "output" return
  1646. // value will be populated with the request's response once the request completes
  1647. // successfuly.
  1648. //
  1649. // Use "Send" method on the returned Request to send the API call to the service.
  1650. // the "output" return value is not valid until after Send returns without error.
  1651. //
  1652. // See GetBucketEncryption for more information on using the GetBucketEncryption
  1653. // API call, and error handling.
  1654. //
  1655. // This method is useful when you want to inject custom logic or configuration
  1656. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1657. //
  1658. //
  1659. // // Example sending a request using the GetBucketEncryptionRequest method.
  1660. // req, resp := client.GetBucketEncryptionRequest(params)
  1661. //
  1662. // err := req.Send()
  1663. // if err == nil { // resp is now filled
  1664. // fmt.Println(resp)
  1665. // }
  1666. //
  1667. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1668. func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
  1669. op := &request.Operation{
  1670. Name: opGetBucketEncryption,
  1671. HTTPMethod: "GET",
  1672. HTTPPath: "/{Bucket}?encryption",
  1673. }
  1674. if input == nil {
  1675. input = &GetBucketEncryptionInput{}
  1676. }
  1677. output = &GetBucketEncryptionOutput{}
  1678. req = c.newRequest(op, input, output)
  1679. return
  1680. }
  1681. // GetBucketEncryption API operation for Amazon Simple Storage Service.
  1682. //
  1683. // Returns the server-side encryption configuration of a bucket.
  1684. //
  1685. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1686. // with awserr.Error's Code and Message methods to get detailed information about
  1687. // the error.
  1688. //
  1689. // See the AWS API reference guide for Amazon Simple Storage Service's
  1690. // API operation GetBucketEncryption for usage and error information.
  1691. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1692. func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
  1693. req, out := c.GetBucketEncryptionRequest(input)
  1694. return out, req.Send()
  1695. }
  1696. // GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
  1697. // the ability to pass a context and additional request options.
  1698. //
  1699. // See GetBucketEncryption for details on how to use this API operation.
  1700. //
  1701. // The context must be non-nil and will be used for request cancellation. If
  1702. // the context is nil a panic will occur. In the future the SDK may create
  1703. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1704. // for more information on using Contexts.
  1705. func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
  1706. req, out := c.GetBucketEncryptionRequest(input)
  1707. req.SetContext(ctx)
  1708. req.ApplyOptions(opts...)
  1709. return out, req.Send()
  1710. }
  1711. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  1712. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1713. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  1714. // value will be populated with the request's response once the request completes
  1715. // successfuly.
  1716. //
  1717. // Use "Send" method on the returned Request to send the API call to the service.
  1718. // the "output" return value is not valid until after Send returns without error.
  1719. //
  1720. // See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
  1721. // API call, and error handling.
  1722. //
  1723. // This method is useful when you want to inject custom logic or configuration
  1724. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1725. //
  1726. //
  1727. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  1728. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  1729. //
  1730. // err := req.Send()
  1731. // if err == nil { // resp is now filled
  1732. // fmt.Println(resp)
  1733. // }
  1734. //
  1735. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1736. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  1737. op := &request.Operation{
  1738. Name: opGetBucketInventoryConfiguration,
  1739. HTTPMethod: "GET",
  1740. HTTPPath: "/{Bucket}?inventory",
  1741. }
  1742. if input == nil {
  1743. input = &GetBucketInventoryConfigurationInput{}
  1744. }
  1745. output = &GetBucketInventoryConfigurationOutput{}
  1746. req = c.newRequest(op, input, output)
  1747. return
  1748. }
  1749. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1750. //
  1751. // Returns an inventory configuration (identified by the inventory ID) from
  1752. // the bucket.
  1753. //
  1754. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1755. // with awserr.Error's Code and Message methods to get detailed information about
  1756. // the error.
  1757. //
  1758. // See the AWS API reference guide for Amazon Simple Storage Service's
  1759. // API operation GetBucketInventoryConfiguration for usage and error information.
  1760. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1761. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  1762. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1763. return out, req.Send()
  1764. }
  1765. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  1766. // the ability to pass a context and additional request options.
  1767. //
  1768. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  1769. //
  1770. // The context must be non-nil and will be used for request cancellation. If
  1771. // the context is nil a panic will occur. In the future the SDK may create
  1772. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1773. // for more information on using Contexts.
  1774. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  1775. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1776. req.SetContext(ctx)
  1777. req.ApplyOptions(opts...)
  1778. return out, req.Send()
  1779. }
  1780. const opGetBucketLifecycle = "GetBucketLifecycle"
  1781. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  1782. // client's request for the GetBucketLifecycle operation. The "output" return
  1783. // value will be populated with the request's response once the request completes
  1784. // successfuly.
  1785. //
  1786. // Use "Send" method on the returned Request to send the API call to the service.
  1787. // the "output" return value is not valid until after Send returns without error.
  1788. //
  1789. // See GetBucketLifecycle for more information on using the GetBucketLifecycle
  1790. // API call, and error handling.
  1791. //
  1792. // This method is useful when you want to inject custom logic or configuration
  1793. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1794. //
  1795. //
  1796. // // Example sending a request using the GetBucketLifecycleRequest method.
  1797. // req, resp := client.GetBucketLifecycleRequest(params)
  1798. //
  1799. // err := req.Send()
  1800. // if err == nil { // resp is now filled
  1801. // fmt.Println(resp)
  1802. // }
  1803. //
  1804. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1805. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1806. if c.Client.Config.Logger != nil {
  1807. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1808. }
  1809. op := &request.Operation{
  1810. Name: opGetBucketLifecycle,
  1811. HTTPMethod: "GET",
  1812. HTTPPath: "/{Bucket}?lifecycle",
  1813. }
  1814. if input == nil {
  1815. input = &GetBucketLifecycleInput{}
  1816. }
  1817. output = &GetBucketLifecycleOutput{}
  1818. req = c.newRequest(op, input, output)
  1819. return
  1820. }
  1821. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1822. //
  1823. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1824. //
  1825. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1826. // with awserr.Error's Code and Message methods to get detailed information about
  1827. // the error.
  1828. //
  1829. // See the AWS API reference guide for Amazon Simple Storage Service's
  1830. // API operation GetBucketLifecycle for usage and error information.
  1831. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1832. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1833. req, out := c.GetBucketLifecycleRequest(input)
  1834. return out, req.Send()
  1835. }
  1836. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  1837. // the ability to pass a context and additional request options.
  1838. //
  1839. // See GetBucketLifecycle for details on how to use this API operation.
  1840. //
  1841. // The context must be non-nil and will be used for request cancellation. If
  1842. // the context is nil a panic will occur. In the future the SDK may create
  1843. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1844. // for more information on using Contexts.
  1845. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  1846. req, out := c.GetBucketLifecycleRequest(input)
  1847. req.SetContext(ctx)
  1848. req.ApplyOptions(opts...)
  1849. return out, req.Send()
  1850. }
  1851. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1852. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1853. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1854. // value will be populated with the request's response once the request completes
  1855. // successfuly.
  1856. //
  1857. // Use "Send" method on the returned Request to send the API call to the service.
  1858. // the "output" return value is not valid until after Send returns without error.
  1859. //
  1860. // See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
  1861. // API call, and error handling.
  1862. //
  1863. // This method is useful when you want to inject custom logic or configuration
  1864. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1865. //
  1866. //
  1867. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1868. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1869. //
  1870. // err := req.Send()
  1871. // if err == nil { // resp is now filled
  1872. // fmt.Println(resp)
  1873. // }
  1874. //
  1875. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1876. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1877. op := &request.Operation{
  1878. Name: opGetBucketLifecycleConfiguration,
  1879. HTTPMethod: "GET",
  1880. HTTPPath: "/{Bucket}?lifecycle",
  1881. }
  1882. if input == nil {
  1883. input = &GetBucketLifecycleConfigurationInput{}
  1884. }
  1885. output = &GetBucketLifecycleConfigurationOutput{}
  1886. req = c.newRequest(op, input, output)
  1887. return
  1888. }
  1889. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1890. //
  1891. // Returns the lifecycle configuration information set on the bucket.
  1892. //
  1893. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1894. // with awserr.Error's Code and Message methods to get detailed information about
  1895. // the error.
  1896. //
  1897. // See the AWS API reference guide for Amazon Simple Storage Service's
  1898. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1899. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1900. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1901. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1902. return out, req.Send()
  1903. }
  1904. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  1905. // the ability to pass a context and additional request options.
  1906. //
  1907. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  1908. //
  1909. // The context must be non-nil and will be used for request cancellation. If
  1910. // the context is nil a panic will occur. In the future the SDK may create
  1911. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1912. // for more information on using Contexts.
  1913. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  1914. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1915. req.SetContext(ctx)
  1916. req.ApplyOptions(opts...)
  1917. return out, req.Send()
  1918. }
  1919. const opGetBucketLocation = "GetBucketLocation"
  1920. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1921. // client's request for the GetBucketLocation operation. The "output" return
  1922. // value will be populated with the request's response once the request completes
  1923. // successfuly.
  1924. //
  1925. // Use "Send" method on the returned Request to send the API call to the service.
  1926. // the "output" return value is not valid until after Send returns without error.
  1927. //
  1928. // See GetBucketLocation for more information on using the GetBucketLocation
  1929. // API call, and error handling.
  1930. //
  1931. // This method is useful when you want to inject custom logic or configuration
  1932. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1933. //
  1934. //
  1935. // // Example sending a request using the GetBucketLocationRequest method.
  1936. // req, resp := client.GetBucketLocationRequest(params)
  1937. //
  1938. // err := req.Send()
  1939. // if err == nil { // resp is now filled
  1940. // fmt.Println(resp)
  1941. // }
  1942. //
  1943. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1944. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  1945. op := &request.Operation{
  1946. Name: opGetBucketLocation,
  1947. HTTPMethod: "GET",
  1948. HTTPPath: "/{Bucket}?location",
  1949. }
  1950. if input == nil {
  1951. input = &GetBucketLocationInput{}
  1952. }
  1953. output = &GetBucketLocationOutput{}
  1954. req = c.newRequest(op, input, output)
  1955. return
  1956. }
  1957. // GetBucketLocation API operation for Amazon Simple Storage Service.
  1958. //
  1959. // Returns the region the bucket resides in.
  1960. //
  1961. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1962. // with awserr.Error's Code and Message methods to get detailed information about
  1963. // the error.
  1964. //
  1965. // See the AWS API reference guide for Amazon Simple Storage Service's
  1966. // API operation GetBucketLocation for usage and error information.
  1967. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1968. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  1969. req, out := c.GetBucketLocationRequest(input)
  1970. return out, req.Send()
  1971. }
  1972. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  1973. // the ability to pass a context and additional request options.
  1974. //
  1975. // See GetBucketLocation for details on how to use this API operation.
  1976. //
  1977. // The context must be non-nil and will be used for request cancellation. If
  1978. // the context is nil a panic will occur. In the future the SDK may create
  1979. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1980. // for more information on using Contexts.
  1981. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  1982. req, out := c.GetBucketLocationRequest(input)
  1983. req.SetContext(ctx)
  1984. req.ApplyOptions(opts...)
  1985. return out, req.Send()
  1986. }
  1987. const opGetBucketLogging = "GetBucketLogging"
  1988. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  1989. // client's request for the GetBucketLogging operation. The "output" return
  1990. // value will be populated with the request's response once the request completes
  1991. // successfuly.
  1992. //
  1993. // Use "Send" method on the returned Request to send the API call to the service.
  1994. // the "output" return value is not valid until after Send returns without error.
  1995. //
  1996. // See GetBucketLogging for more information on using the GetBucketLogging
  1997. // API call, and error handling.
  1998. //
  1999. // This method is useful when you want to inject custom logic or configuration
  2000. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2001. //
  2002. //
  2003. // // Example sending a request using the GetBucketLoggingRequest method.
  2004. // req, resp := client.GetBucketLoggingRequest(params)
  2005. //
  2006. // err := req.Send()
  2007. // if err == nil { // resp is now filled
  2008. // fmt.Println(resp)
  2009. // }
  2010. //
  2011. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2012. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  2013. op := &request.Operation{
  2014. Name: opGetBucketLogging,
  2015. HTTPMethod: "GET",
  2016. HTTPPath: "/{Bucket}?logging",
  2017. }
  2018. if input == nil {
  2019. input = &GetBucketLoggingInput{}
  2020. }
  2021. output = &GetBucketLoggingOutput{}
  2022. req = c.newRequest(op, input, output)
  2023. return
  2024. }
  2025. // GetBucketLogging API operation for Amazon Simple Storage Service.
  2026. //
  2027. // Returns the logging status of a bucket and the permissions users have to
  2028. // view and modify that status. To use GET, you must be the bucket owner.
  2029. //
  2030. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2031. // with awserr.Error's Code and Message methods to get detailed information about
  2032. // the error.
  2033. //
  2034. // See the AWS API reference guide for Amazon Simple Storage Service's
  2035. // API operation GetBucketLogging for usage and error information.
  2036. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2037. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  2038. req, out := c.GetBucketLoggingRequest(input)
  2039. return out, req.Send()
  2040. }
  2041. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  2042. // the ability to pass a context and additional request options.
  2043. //
  2044. // See GetBucketLogging for details on how to use this API operation.
  2045. //
  2046. // The context must be non-nil and will be used for request cancellation. If
  2047. // the context is nil a panic will occur. In the future the SDK may create
  2048. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2049. // for more information on using Contexts.
  2050. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  2051. req, out := c.GetBucketLoggingRequest(input)
  2052. req.SetContext(ctx)
  2053. req.ApplyOptions(opts...)
  2054. return out, req.Send()
  2055. }
  2056. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  2057. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  2058. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  2059. // value will be populated with the request's response once the request completes
  2060. // successfuly.
  2061. //
  2062. // Use "Send" method on the returned Request to send the API call to the service.
  2063. // the "output" return value is not valid until after Send returns without error.
  2064. //
  2065. // See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
  2066. // API call, and error handling.
  2067. //
  2068. // This method is useful when you want to inject custom logic or configuration
  2069. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2070. //
  2071. //
  2072. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  2073. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  2074. //
  2075. // err := req.Send()
  2076. // if err == nil { // resp is now filled
  2077. // fmt.Println(resp)
  2078. // }
  2079. //
  2080. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2081. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  2082. op := &request.Operation{
  2083. Name: opGetBucketMetricsConfiguration,
  2084. HTTPMethod: "GET",
  2085. HTTPPath: "/{Bucket}?metrics",
  2086. }
  2087. if input == nil {
  2088. input = &GetBucketMetricsConfigurationInput{}
  2089. }
  2090. output = &GetBucketMetricsConfigurationOutput{}
  2091. req = c.newRequest(op, input, output)
  2092. return
  2093. }
  2094. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  2095. //
  2096. // Gets a metrics configuration (specified by the metrics configuration ID)
  2097. // from the bucket.
  2098. //
  2099. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2100. // with awserr.Error's Code and Message methods to get detailed information about
  2101. // the error.
  2102. //
  2103. // See the AWS API reference guide for Amazon Simple Storage Service's
  2104. // API operation GetBucketMetricsConfiguration for usage and error information.
  2105. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2106. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  2107. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2108. return out, req.Send()
  2109. }
  2110. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  2111. // the ability to pass a context and additional request options.
  2112. //
  2113. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  2114. //
  2115. // The context must be non-nil and will be used for request cancellation. If
  2116. // the context is nil a panic will occur. In the future the SDK may create
  2117. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2118. // for more information on using Contexts.
  2119. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  2120. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2121. req.SetContext(ctx)
  2122. req.ApplyOptions(opts...)
  2123. return out, req.Send()
  2124. }
  2125. const opGetBucketNotification = "GetBucketNotification"
  2126. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  2127. // client's request for the GetBucketNotification operation. The "output" return
  2128. // value will be populated with the request's response once the request completes
  2129. // successfuly.
  2130. //
  2131. // Use "Send" method on the returned Request to send the API call to the service.
  2132. // the "output" return value is not valid until after Send returns without error.
  2133. //
  2134. // See GetBucketNotification for more information on using the GetBucketNotification
  2135. // API call, and error handling.
  2136. //
  2137. // This method is useful when you want to inject custom logic or configuration
  2138. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2139. //
  2140. //
  2141. // // Example sending a request using the GetBucketNotificationRequest method.
  2142. // req, resp := client.GetBucketNotificationRequest(params)
  2143. //
  2144. // err := req.Send()
  2145. // if err == nil { // resp is now filled
  2146. // fmt.Println(resp)
  2147. // }
  2148. //
  2149. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2150. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  2151. if c.Client.Config.Logger != nil {
  2152. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  2153. }
  2154. op := &request.Operation{
  2155. Name: opGetBucketNotification,
  2156. HTTPMethod: "GET",
  2157. HTTPPath: "/{Bucket}?notification",
  2158. }
  2159. if input == nil {
  2160. input = &GetBucketNotificationConfigurationRequest{}
  2161. }
  2162. output = &NotificationConfigurationDeprecated{}
  2163. req = c.newRequest(op, input, output)
  2164. return
  2165. }
  2166. // GetBucketNotification API operation for Amazon Simple Storage Service.
  2167. //
  2168. // Deprecated, see the GetBucketNotificationConfiguration operation.
  2169. //
  2170. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2171. // with awserr.Error's Code and Message methods to get detailed information about
  2172. // the error.
  2173. //
  2174. // See the AWS API reference guide for Amazon Simple Storage Service's
  2175. // API operation GetBucketNotification for usage and error information.
  2176. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2177. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  2178. req, out := c.GetBucketNotificationRequest(input)
  2179. return out, req.Send()
  2180. }
  2181. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  2182. // the ability to pass a context and additional request options.
  2183. //
  2184. // See GetBucketNotification for details on how to use this API operation.
  2185. //
  2186. // The context must be non-nil and will be used for request cancellation. If
  2187. // the context is nil a panic will occur. In the future the SDK may create
  2188. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2189. // for more information on using Contexts.
  2190. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  2191. req, out := c.GetBucketNotificationRequest(input)
  2192. req.SetContext(ctx)
  2193. req.ApplyOptions(opts...)
  2194. return out, req.Send()
  2195. }
  2196. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  2197. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2198. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  2199. // value will be populated with the request's response once the request completes
  2200. // successfuly.
  2201. //
  2202. // Use "Send" method on the returned Request to send the API call to the service.
  2203. // the "output" return value is not valid until after Send returns without error.
  2204. //
  2205. // See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
  2206. // API call, and error handling.
  2207. //
  2208. // This method is useful when you want to inject custom logic or configuration
  2209. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2210. //
  2211. //
  2212. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  2213. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  2214. //
  2215. // err := req.Send()
  2216. // if err == nil { // resp is now filled
  2217. // fmt.Println(resp)
  2218. // }
  2219. //
  2220. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2221. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  2222. op := &request.Operation{
  2223. Name: opGetBucketNotificationConfiguration,
  2224. HTTPMethod: "GET",
  2225. HTTPPath: "/{Bucket}?notification",
  2226. }
  2227. if input == nil {
  2228. input = &GetBucketNotificationConfigurationRequest{}
  2229. }
  2230. output = &NotificationConfiguration{}
  2231. req = c.newRequest(op, input, output)
  2232. return
  2233. }
  2234. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2235. //
  2236. // Returns the notification configuration of a bucket.
  2237. //
  2238. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2239. // with awserr.Error's Code and Message methods to get detailed information about
  2240. // the error.
  2241. //
  2242. // See the AWS API reference guide for Amazon Simple Storage Service's
  2243. // API operation GetBucketNotificationConfiguration for usage and error information.
  2244. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2245. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  2246. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2247. return out, req.Send()
  2248. }
  2249. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  2250. // the ability to pass a context and additional request options.
  2251. //
  2252. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  2253. //
  2254. // The context must be non-nil and will be used for request cancellation. If
  2255. // the context is nil a panic will occur. In the future the SDK may create
  2256. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2257. // for more information on using Contexts.
  2258. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  2259. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2260. req.SetContext(ctx)
  2261. req.ApplyOptions(opts...)
  2262. return out, req.Send()
  2263. }
  2264. const opGetBucketPolicy = "GetBucketPolicy"
  2265. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  2266. // client's request for the GetBucketPolicy operation. The "output" return
  2267. // value will be populated with the request's response once the request completes
  2268. // successfuly.
  2269. //
  2270. // Use "Send" method on the returned Request to send the API call to the service.
  2271. // the "output" return value is not valid until after Send returns without error.
  2272. //
  2273. // See GetBucketPolicy for more information on using the GetBucketPolicy
  2274. // API call, and error handling.
  2275. //
  2276. // This method is useful when you want to inject custom logic or configuration
  2277. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2278. //
  2279. //
  2280. // // Example sending a request using the GetBucketPolicyRequest method.
  2281. // req, resp := client.GetBucketPolicyRequest(params)
  2282. //
  2283. // err := req.Send()
  2284. // if err == nil { // resp is now filled
  2285. // fmt.Println(resp)
  2286. // }
  2287. //
  2288. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2289. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  2290. op := &request.Operation{
  2291. Name: opGetBucketPolicy,
  2292. HTTPMethod: "GET",
  2293. HTTPPath: "/{Bucket}?policy",
  2294. }
  2295. if input == nil {
  2296. input = &GetBucketPolicyInput{}
  2297. }
  2298. output = &GetBucketPolicyOutput{}
  2299. req = c.newRequest(op, input, output)
  2300. return
  2301. }
  2302. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  2303. //
  2304. // Returns the policy of a specified bucket.
  2305. //
  2306. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2307. // with awserr.Error's Code and Message methods to get detailed information about
  2308. // the error.
  2309. //
  2310. // See the AWS API reference guide for Amazon Simple Storage Service's
  2311. // API operation GetBucketPolicy for usage and error information.
  2312. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2313. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  2314. req, out := c.GetBucketPolicyRequest(input)
  2315. return out, req.Send()
  2316. }
  2317. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  2318. // the ability to pass a context and additional request options.
  2319. //
  2320. // See GetBucketPolicy for details on how to use this API operation.
  2321. //
  2322. // The context must be non-nil and will be used for request cancellation. If
  2323. // the context is nil a panic will occur. In the future the SDK may create
  2324. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2325. // for more information on using Contexts.
  2326. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  2327. req, out := c.GetBucketPolicyRequest(input)
  2328. req.SetContext(ctx)
  2329. req.ApplyOptions(opts...)
  2330. return out, req.Send()
  2331. }
  2332. const opGetBucketReplication = "GetBucketReplication"
  2333. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  2334. // client's request for the GetBucketReplication operation. The "output" return
  2335. // value will be populated with the request's response once the request completes
  2336. // successfuly.
  2337. //
  2338. // Use "Send" method on the returned Request to send the API call to the service.
  2339. // the "output" return value is not valid until after Send returns without error.
  2340. //
  2341. // See GetBucketReplication for more information on using the GetBucketReplication
  2342. // API call, and error handling.
  2343. //
  2344. // This method is useful when you want to inject custom logic or configuration
  2345. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2346. //
  2347. //
  2348. // // Example sending a request using the GetBucketReplicationRequest method.
  2349. // req, resp := client.GetBucketReplicationRequest(params)
  2350. //
  2351. // err := req.Send()
  2352. // if err == nil { // resp is now filled
  2353. // fmt.Println(resp)
  2354. // }
  2355. //
  2356. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2357. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  2358. op := &request.Operation{
  2359. Name: opGetBucketReplication,
  2360. HTTPMethod: "GET",
  2361. HTTPPath: "/{Bucket}?replication",
  2362. }
  2363. if input == nil {
  2364. input = &GetBucketReplicationInput{}
  2365. }
  2366. output = &GetBucketReplicationOutput{}
  2367. req = c.newRequest(op, input, output)
  2368. return
  2369. }
  2370. // GetBucketReplication API operation for Amazon Simple Storage Service.
  2371. //
  2372. // Returns the replication configuration of a bucket.
  2373. //
  2374. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2375. // with awserr.Error's Code and Message methods to get detailed information about
  2376. // the error.
  2377. //
  2378. // See the AWS API reference guide for Amazon Simple Storage Service's
  2379. // API operation GetBucketReplication for usage and error information.
  2380. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2381. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  2382. req, out := c.GetBucketReplicationRequest(input)
  2383. return out, req.Send()
  2384. }
  2385. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  2386. // the ability to pass a context and additional request options.
  2387. //
  2388. // See GetBucketReplication for details on how to use this API operation.
  2389. //
  2390. // The context must be non-nil and will be used for request cancellation. If
  2391. // the context is nil a panic will occur. In the future the SDK may create
  2392. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2393. // for more information on using Contexts.
  2394. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  2395. req, out := c.GetBucketReplicationRequest(input)
  2396. req.SetContext(ctx)
  2397. req.ApplyOptions(opts...)
  2398. return out, req.Send()
  2399. }
  2400. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  2401. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2402. // client's request for the GetBucketRequestPayment operation. The "output" return
  2403. // value will be populated with the request's response once the request completes
  2404. // successfuly.
  2405. //
  2406. // Use "Send" method on the returned Request to send the API call to the service.
  2407. // the "output" return value is not valid until after Send returns without error.
  2408. //
  2409. // See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
  2410. // API call, and error handling.
  2411. //
  2412. // This method is useful when you want to inject custom logic or configuration
  2413. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2414. //
  2415. //
  2416. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  2417. // req, resp := client.GetBucketRequestPaymentRequest(params)
  2418. //
  2419. // err := req.Send()
  2420. // if err == nil { // resp is now filled
  2421. // fmt.Println(resp)
  2422. // }
  2423. //
  2424. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2425. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  2426. op := &request.Operation{
  2427. Name: opGetBucketRequestPayment,
  2428. HTTPMethod: "GET",
  2429. HTTPPath: "/{Bucket}?requestPayment",
  2430. }
  2431. if input == nil {
  2432. input = &GetBucketRequestPaymentInput{}
  2433. }
  2434. output = &GetBucketRequestPaymentOutput{}
  2435. req = c.newRequest(op, input, output)
  2436. return
  2437. }
  2438. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  2439. //
  2440. // Returns the request payment configuration of a bucket.
  2441. //
  2442. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2443. // with awserr.Error's Code and Message methods to get detailed information about
  2444. // the error.
  2445. //
  2446. // See the AWS API reference guide for Amazon Simple Storage Service's
  2447. // API operation GetBucketRequestPayment for usage and error information.
  2448. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2449. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  2450. req, out := c.GetBucketRequestPaymentRequest(input)
  2451. return out, req.Send()
  2452. }
  2453. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  2454. // the ability to pass a context and additional request options.
  2455. //
  2456. // See GetBucketRequestPayment for details on how to use this API operation.
  2457. //
  2458. // The context must be non-nil and will be used for request cancellation. If
  2459. // the context is nil a panic will occur. In the future the SDK may create
  2460. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2461. // for more information on using Contexts.
  2462. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  2463. req, out := c.GetBucketRequestPaymentRequest(input)
  2464. req.SetContext(ctx)
  2465. req.ApplyOptions(opts...)
  2466. return out, req.Send()
  2467. }
  2468. const opGetBucketTagging = "GetBucketTagging"
  2469. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  2470. // client's request for the GetBucketTagging operation. The "output" return
  2471. // value will be populated with the request's response once the request completes
  2472. // successfuly.
  2473. //
  2474. // Use "Send" method on the returned Request to send the API call to the service.
  2475. // the "output" return value is not valid until after Send returns without error.
  2476. //
  2477. // See GetBucketTagging for more information on using the GetBucketTagging
  2478. // API call, and error handling.
  2479. //
  2480. // This method is useful when you want to inject custom logic or configuration
  2481. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2482. //
  2483. //
  2484. // // Example sending a request using the GetBucketTaggingRequest method.
  2485. // req, resp := client.GetBucketTaggingRequest(params)
  2486. //
  2487. // err := req.Send()
  2488. // if err == nil { // resp is now filled
  2489. // fmt.Println(resp)
  2490. // }
  2491. //
  2492. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2493. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  2494. op := &request.Operation{
  2495. Name: opGetBucketTagging,
  2496. HTTPMethod: "GET",
  2497. HTTPPath: "/{Bucket}?tagging",
  2498. }
  2499. if input == nil {
  2500. input = &GetBucketTaggingInput{}
  2501. }
  2502. output = &GetBucketTaggingOutput{}
  2503. req = c.newRequest(op, input, output)
  2504. return
  2505. }
  2506. // GetBucketTagging API operation for Amazon Simple Storage Service.
  2507. //
  2508. // Returns the tag set associated with the bucket.
  2509. //
  2510. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2511. // with awserr.Error's Code and Message methods to get detailed information about
  2512. // the error.
  2513. //
  2514. // See the AWS API reference guide for Amazon Simple Storage Service's
  2515. // API operation GetBucketTagging for usage and error information.
  2516. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2517. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  2518. req, out := c.GetBucketTaggingRequest(input)
  2519. return out, req.Send()
  2520. }
  2521. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  2522. // the ability to pass a context and additional request options.
  2523. //
  2524. // See GetBucketTagging for details on how to use this API operation.
  2525. //
  2526. // The context must be non-nil and will be used for request cancellation. If
  2527. // the context is nil a panic will occur. In the future the SDK may create
  2528. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2529. // for more information on using Contexts.
  2530. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  2531. req, out := c.GetBucketTaggingRequest(input)
  2532. req.SetContext(ctx)
  2533. req.ApplyOptions(opts...)
  2534. return out, req.Send()
  2535. }
  2536. const opGetBucketVersioning = "GetBucketVersioning"
  2537. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  2538. // client's request for the GetBucketVersioning operation. The "output" return
  2539. // value will be populated with the request's response once the request completes
  2540. // successfuly.
  2541. //
  2542. // Use "Send" method on the returned Request to send the API call to the service.
  2543. // the "output" return value is not valid until after Send returns without error.
  2544. //
  2545. // See GetBucketVersioning for more information on using the GetBucketVersioning
  2546. // API call, and error handling.
  2547. //
  2548. // This method is useful when you want to inject custom logic or configuration
  2549. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2550. //
  2551. //
  2552. // // Example sending a request using the GetBucketVersioningRequest method.
  2553. // req, resp := client.GetBucketVersioningRequest(params)
  2554. //
  2555. // err := req.Send()
  2556. // if err == nil { // resp is now filled
  2557. // fmt.Println(resp)
  2558. // }
  2559. //
  2560. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2561. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  2562. op := &request.Operation{
  2563. Name: opGetBucketVersioning,
  2564. HTTPMethod: "GET",
  2565. HTTPPath: "/{Bucket}?versioning",
  2566. }
  2567. if input == nil {
  2568. input = &GetBucketVersioningInput{}
  2569. }
  2570. output = &GetBucketVersioningOutput{}
  2571. req = c.newRequest(op, input, output)
  2572. return
  2573. }
  2574. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  2575. //
  2576. // Returns the versioning state of a bucket.
  2577. //
  2578. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2579. // with awserr.Error's Code and Message methods to get detailed information about
  2580. // the error.
  2581. //
  2582. // See the AWS API reference guide for Amazon Simple Storage Service's
  2583. // API operation GetBucketVersioning for usage and error information.
  2584. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2585. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  2586. req, out := c.GetBucketVersioningRequest(input)
  2587. return out, req.Send()
  2588. }
  2589. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  2590. // the ability to pass a context and additional request options.
  2591. //
  2592. // See GetBucketVersioning for details on how to use this API operation.
  2593. //
  2594. // The context must be non-nil and will be used for request cancellation. If
  2595. // the context is nil a panic will occur. In the future the SDK may create
  2596. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2597. // for more information on using Contexts.
  2598. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  2599. req, out := c.GetBucketVersioningRequest(input)
  2600. req.SetContext(ctx)
  2601. req.ApplyOptions(opts...)
  2602. return out, req.Send()
  2603. }
  2604. const opGetBucketWebsite = "GetBucketWebsite"
  2605. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  2606. // client's request for the GetBucketWebsite operation. The "output" return
  2607. // value will be populated with the request's response once the request completes
  2608. // successfuly.
  2609. //
  2610. // Use "Send" method on the returned Request to send the API call to the service.
  2611. // the "output" return value is not valid until after Send returns without error.
  2612. //
  2613. // See GetBucketWebsite for more information on using the GetBucketWebsite
  2614. // API call, and error handling.
  2615. //
  2616. // This method is useful when you want to inject custom logic or configuration
  2617. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2618. //
  2619. //
  2620. // // Example sending a request using the GetBucketWebsiteRequest method.
  2621. // req, resp := client.GetBucketWebsiteRequest(params)
  2622. //
  2623. // err := req.Send()
  2624. // if err == nil { // resp is now filled
  2625. // fmt.Println(resp)
  2626. // }
  2627. //
  2628. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2629. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  2630. op := &request.Operation{
  2631. Name: opGetBucketWebsite,
  2632. HTTPMethod: "GET",
  2633. HTTPPath: "/{Bucket}?website",
  2634. }
  2635. if input == nil {
  2636. input = &GetBucketWebsiteInput{}
  2637. }
  2638. output = &GetBucketWebsiteOutput{}
  2639. req = c.newRequest(op, input, output)
  2640. return
  2641. }
  2642. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  2643. //
  2644. // Returns the website configuration for a bucket.
  2645. //
  2646. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2647. // with awserr.Error's Code and Message methods to get detailed information about
  2648. // the error.
  2649. //
  2650. // See the AWS API reference guide for Amazon Simple Storage Service's
  2651. // API operation GetBucketWebsite for usage and error information.
  2652. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2653. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  2654. req, out := c.GetBucketWebsiteRequest(input)
  2655. return out, req.Send()
  2656. }
  2657. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  2658. // the ability to pass a context and additional request options.
  2659. //
  2660. // See GetBucketWebsite for details on how to use this API operation.
  2661. //
  2662. // The context must be non-nil and will be used for request cancellation. If
  2663. // the context is nil a panic will occur. In the future the SDK may create
  2664. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2665. // for more information on using Contexts.
  2666. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  2667. req, out := c.GetBucketWebsiteRequest(input)
  2668. req.SetContext(ctx)
  2669. req.ApplyOptions(opts...)
  2670. return out, req.Send()
  2671. }
  2672. const opGetObject = "GetObject"
  2673. // GetObjectRequest generates a "aws/request.Request" representing the
  2674. // client's request for the GetObject operation. The "output" return
  2675. // value will be populated with the request's response once the request completes
  2676. // successfuly.
  2677. //
  2678. // Use "Send" method on the returned Request to send the API call to the service.
  2679. // the "output" return value is not valid until after Send returns without error.
  2680. //
  2681. // See GetObject for more information on using the GetObject
  2682. // API call, and error handling.
  2683. //
  2684. // This method is useful when you want to inject custom logic or configuration
  2685. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2686. //
  2687. //
  2688. // // Example sending a request using the GetObjectRequest method.
  2689. // req, resp := client.GetObjectRequest(params)
  2690. //
  2691. // err := req.Send()
  2692. // if err == nil { // resp is now filled
  2693. // fmt.Println(resp)
  2694. // }
  2695. //
  2696. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2697. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  2698. op := &request.Operation{
  2699. Name: opGetObject,
  2700. HTTPMethod: "GET",
  2701. HTTPPath: "/{Bucket}/{Key+}",
  2702. }
  2703. if input == nil {
  2704. input = &GetObjectInput{}
  2705. }
  2706. output = &GetObjectOutput{}
  2707. req = c.newRequest(op, input, output)
  2708. return
  2709. }
  2710. // GetObject API operation for Amazon Simple Storage Service.
  2711. //
  2712. // Retrieves objects from Amazon S3.
  2713. //
  2714. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2715. // with awserr.Error's Code and Message methods to get detailed information about
  2716. // the error.
  2717. //
  2718. // See the AWS API reference guide for Amazon Simple Storage Service's
  2719. // API operation GetObject for usage and error information.
  2720. //
  2721. // Returned Error Codes:
  2722. // * ErrCodeNoSuchKey "NoSuchKey"
  2723. // The specified key does not exist.
  2724. //
  2725. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2726. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  2727. req, out := c.GetObjectRequest(input)
  2728. return out, req.Send()
  2729. }
  2730. // GetObjectWithContext is the same as GetObject with the addition of
  2731. // the ability to pass a context and additional request options.
  2732. //
  2733. // See GetObject for details on how to use this API operation.
  2734. //
  2735. // The context must be non-nil and will be used for request cancellation. If
  2736. // the context is nil a panic will occur. In the future the SDK may create
  2737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2738. // for more information on using Contexts.
  2739. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  2740. req, out := c.GetObjectRequest(input)
  2741. req.SetContext(ctx)
  2742. req.ApplyOptions(opts...)
  2743. return out, req.Send()
  2744. }
  2745. const opGetObjectAcl = "GetObjectAcl"
  2746. // GetObjectAclRequest generates a "aws/request.Request" representing the
  2747. // client's request for the GetObjectAcl operation. The "output" return
  2748. // value will be populated with the request's response once the request completes
  2749. // successfuly.
  2750. //
  2751. // Use "Send" method on the returned Request to send the API call to the service.
  2752. // the "output" return value is not valid until after Send returns without error.
  2753. //
  2754. // See GetObjectAcl for more information on using the GetObjectAcl
  2755. // API call, and error handling.
  2756. //
  2757. // This method is useful when you want to inject custom logic or configuration
  2758. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2759. //
  2760. //
  2761. // // Example sending a request using the GetObjectAclRequest method.
  2762. // req, resp := client.GetObjectAclRequest(params)
  2763. //
  2764. // err := req.Send()
  2765. // if err == nil { // resp is now filled
  2766. // fmt.Println(resp)
  2767. // }
  2768. //
  2769. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2770. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  2771. op := &request.Operation{
  2772. Name: opGetObjectAcl,
  2773. HTTPMethod: "GET",
  2774. HTTPPath: "/{Bucket}/{Key+}?acl",
  2775. }
  2776. if input == nil {
  2777. input = &GetObjectAclInput{}
  2778. }
  2779. output = &GetObjectAclOutput{}
  2780. req = c.newRequest(op, input, output)
  2781. return
  2782. }
  2783. // GetObjectAcl API operation for Amazon Simple Storage Service.
  2784. //
  2785. // Returns the access control list (ACL) of an object.
  2786. //
  2787. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2788. // with awserr.Error's Code and Message methods to get detailed information about
  2789. // the error.
  2790. //
  2791. // See the AWS API reference guide for Amazon Simple Storage Service's
  2792. // API operation GetObjectAcl for usage and error information.
  2793. //
  2794. // Returned Error Codes:
  2795. // * ErrCodeNoSuchKey "NoSuchKey"
  2796. // The specified key does not exist.
  2797. //
  2798. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2799. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  2800. req, out := c.GetObjectAclRequest(input)
  2801. return out, req.Send()
  2802. }
  2803. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  2804. // the ability to pass a context and additional request options.
  2805. //
  2806. // See GetObjectAcl for details on how to use this API operation.
  2807. //
  2808. // The context must be non-nil and will be used for request cancellation. If
  2809. // the context is nil a panic will occur. In the future the SDK may create
  2810. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2811. // for more information on using Contexts.
  2812. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  2813. req, out := c.GetObjectAclRequest(input)
  2814. req.SetContext(ctx)
  2815. req.ApplyOptions(opts...)
  2816. return out, req.Send()
  2817. }
  2818. const opGetObjectTagging = "GetObjectTagging"
  2819. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  2820. // client's request for the GetObjectTagging operation. The "output" return
  2821. // value will be populated with the request's response once the request completes
  2822. // successfuly.
  2823. //
  2824. // Use "Send" method on the returned Request to send the API call to the service.
  2825. // the "output" return value is not valid until after Send returns without error.
  2826. //
  2827. // See GetObjectTagging for more information on using the GetObjectTagging
  2828. // API call, and error handling.
  2829. //
  2830. // This method is useful when you want to inject custom logic or configuration
  2831. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2832. //
  2833. //
  2834. // // Example sending a request using the GetObjectTaggingRequest method.
  2835. // req, resp := client.GetObjectTaggingRequest(params)
  2836. //
  2837. // err := req.Send()
  2838. // if err == nil { // resp is now filled
  2839. // fmt.Println(resp)
  2840. // }
  2841. //
  2842. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2843. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  2844. op := &request.Operation{
  2845. Name: opGetObjectTagging,
  2846. HTTPMethod: "GET",
  2847. HTTPPath: "/{Bucket}/{Key+}?tagging",
  2848. }
  2849. if input == nil {
  2850. input = &GetObjectTaggingInput{}
  2851. }
  2852. output = &GetObjectTaggingOutput{}
  2853. req = c.newRequest(op, input, output)
  2854. return
  2855. }
  2856. // GetObjectTagging API operation for Amazon Simple Storage Service.
  2857. //
  2858. // Returns the tag-set of an object.
  2859. //
  2860. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2861. // with awserr.Error's Code and Message methods to get detailed information about
  2862. // the error.
  2863. //
  2864. // See the AWS API reference guide for Amazon Simple Storage Service's
  2865. // API operation GetObjectTagging for usage and error information.
  2866. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2867. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  2868. req, out := c.GetObjectTaggingRequest(input)
  2869. return out, req.Send()
  2870. }
  2871. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  2872. // the ability to pass a context and additional request options.
  2873. //
  2874. // See GetObjectTagging for details on how to use this API operation.
  2875. //
  2876. // The context must be non-nil and will be used for request cancellation. If
  2877. // the context is nil a panic will occur. In the future the SDK may create
  2878. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2879. // for more information on using Contexts.
  2880. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  2881. req, out := c.GetObjectTaggingRequest(input)
  2882. req.SetContext(ctx)
  2883. req.ApplyOptions(opts...)
  2884. return out, req.Send()
  2885. }
  2886. const opGetObjectTorrent = "GetObjectTorrent"
  2887. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  2888. // client's request for the GetObjectTorrent operation. The "output" return
  2889. // value will be populated with the request's response once the request completes
  2890. // successfuly.
  2891. //
  2892. // Use "Send" method on the returned Request to send the API call to the service.
  2893. // the "output" return value is not valid until after Send returns without error.
  2894. //
  2895. // See GetObjectTorrent for more information on using the GetObjectTorrent
  2896. // API call, and error handling.
  2897. //
  2898. // This method is useful when you want to inject custom logic or configuration
  2899. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2900. //
  2901. //
  2902. // // Example sending a request using the GetObjectTorrentRequest method.
  2903. // req, resp := client.GetObjectTorrentRequest(params)
  2904. //
  2905. // err := req.Send()
  2906. // if err == nil { // resp is now filled
  2907. // fmt.Println(resp)
  2908. // }
  2909. //
  2910. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2911. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  2912. op := &request.Operation{
  2913. Name: opGetObjectTorrent,
  2914. HTTPMethod: "GET",
  2915. HTTPPath: "/{Bucket}/{Key+}?torrent",
  2916. }
  2917. if input == nil {
  2918. input = &GetObjectTorrentInput{}
  2919. }
  2920. output = &GetObjectTorrentOutput{}
  2921. req = c.newRequest(op, input, output)
  2922. return
  2923. }
  2924. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  2925. //
  2926. // Return torrent files from a bucket.
  2927. //
  2928. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2929. // with awserr.Error's Code and Message methods to get detailed information about
  2930. // the error.
  2931. //
  2932. // See the AWS API reference guide for Amazon Simple Storage Service's
  2933. // API operation GetObjectTorrent for usage and error information.
  2934. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2935. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  2936. req, out := c.GetObjectTorrentRequest(input)
  2937. return out, req.Send()
  2938. }
  2939. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  2940. // the ability to pass a context and additional request options.
  2941. //
  2942. // See GetObjectTorrent for details on how to use this API operation.
  2943. //
  2944. // The context must be non-nil and will be used for request cancellation. If
  2945. // the context is nil a panic will occur. In the future the SDK may create
  2946. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2947. // for more information on using Contexts.
  2948. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  2949. req, out := c.GetObjectTorrentRequest(input)
  2950. req.SetContext(ctx)
  2951. req.ApplyOptions(opts...)
  2952. return out, req.Send()
  2953. }
  2954. const opHeadBucket = "HeadBucket"
  2955. // HeadBucketRequest generates a "aws/request.Request" representing the
  2956. // client's request for the HeadBucket operation. The "output" return
  2957. // value will be populated with the request's response once the request completes
  2958. // successfuly.
  2959. //
  2960. // Use "Send" method on the returned Request to send the API call to the service.
  2961. // the "output" return value is not valid until after Send returns without error.
  2962. //
  2963. // See HeadBucket for more information on using the HeadBucket
  2964. // API call, and error handling.
  2965. //
  2966. // This method is useful when you want to inject custom logic or configuration
  2967. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2968. //
  2969. //
  2970. // // Example sending a request using the HeadBucketRequest method.
  2971. // req, resp := client.HeadBucketRequest(params)
  2972. //
  2973. // err := req.Send()
  2974. // if err == nil { // resp is now filled
  2975. // fmt.Println(resp)
  2976. // }
  2977. //
  2978. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  2979. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  2980. op := &request.Operation{
  2981. Name: opHeadBucket,
  2982. HTTPMethod: "HEAD",
  2983. HTTPPath: "/{Bucket}",
  2984. }
  2985. if input == nil {
  2986. input = &HeadBucketInput{}
  2987. }
  2988. output = &HeadBucketOutput{}
  2989. req = c.newRequest(op, input, output)
  2990. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2991. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2992. return
  2993. }
  2994. // HeadBucket API operation for Amazon Simple Storage Service.
  2995. //
  2996. // This operation is useful to determine if a bucket exists and you have permission
  2997. // to access it.
  2998. //
  2999. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3000. // with awserr.Error's Code and Message methods to get detailed information about
  3001. // the error.
  3002. //
  3003. // See the AWS API reference guide for Amazon Simple Storage Service's
  3004. // API operation HeadBucket for usage and error information.
  3005. //
  3006. // Returned Error Codes:
  3007. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3008. // The specified bucket does not exist.
  3009. //
  3010. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3011. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  3012. req, out := c.HeadBucketRequest(input)
  3013. return out, req.Send()
  3014. }
  3015. // HeadBucketWithContext is the same as HeadBucket with the addition of
  3016. // the ability to pass a context and additional request options.
  3017. //
  3018. // See HeadBucket for details on how to use this API operation.
  3019. //
  3020. // The context must be non-nil and will be used for request cancellation. If
  3021. // the context is nil a panic will occur. In the future the SDK may create
  3022. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3023. // for more information on using Contexts.
  3024. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  3025. req, out := c.HeadBucketRequest(input)
  3026. req.SetContext(ctx)
  3027. req.ApplyOptions(opts...)
  3028. return out, req.Send()
  3029. }
  3030. const opHeadObject = "HeadObject"
  3031. // HeadObjectRequest generates a "aws/request.Request" representing the
  3032. // client's request for the HeadObject operation. The "output" return
  3033. // value will be populated with the request's response once the request completes
  3034. // successfuly.
  3035. //
  3036. // Use "Send" method on the returned Request to send the API call to the service.
  3037. // the "output" return value is not valid until after Send returns without error.
  3038. //
  3039. // See HeadObject for more information on using the HeadObject
  3040. // API call, and error handling.
  3041. //
  3042. // This method is useful when you want to inject custom logic or configuration
  3043. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3044. //
  3045. //
  3046. // // Example sending a request using the HeadObjectRequest method.
  3047. // req, resp := client.HeadObjectRequest(params)
  3048. //
  3049. // err := req.Send()
  3050. // if err == nil { // resp is now filled
  3051. // fmt.Println(resp)
  3052. // }
  3053. //
  3054. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3055. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  3056. op := &request.Operation{
  3057. Name: opHeadObject,
  3058. HTTPMethod: "HEAD",
  3059. HTTPPath: "/{Bucket}/{Key+}",
  3060. }
  3061. if input == nil {
  3062. input = &HeadObjectInput{}
  3063. }
  3064. output = &HeadObjectOutput{}
  3065. req = c.newRequest(op, input, output)
  3066. return
  3067. }
  3068. // HeadObject API operation for Amazon Simple Storage Service.
  3069. //
  3070. // The HEAD operation retrieves metadata from an object without returning the
  3071. // object itself. This operation is useful if you're only interested in an object's
  3072. // metadata. To use HEAD, you must have READ access to the object.
  3073. //
  3074. // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
  3075. // for more information on returned errors.
  3076. //
  3077. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3078. // with awserr.Error's Code and Message methods to get detailed information about
  3079. // the error.
  3080. //
  3081. // See the AWS API reference guide for Amazon Simple Storage Service's
  3082. // API operation HeadObject for usage and error information.
  3083. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3084. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  3085. req, out := c.HeadObjectRequest(input)
  3086. return out, req.Send()
  3087. }
  3088. // HeadObjectWithContext is the same as HeadObject with the addition of
  3089. // the ability to pass a context and additional request options.
  3090. //
  3091. // See HeadObject for details on how to use this API operation.
  3092. //
  3093. // The context must be non-nil and will be used for request cancellation. If
  3094. // the context is nil a panic will occur. In the future the SDK may create
  3095. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3096. // for more information on using Contexts.
  3097. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  3098. req, out := c.HeadObjectRequest(input)
  3099. req.SetContext(ctx)
  3100. req.ApplyOptions(opts...)
  3101. return out, req.Send()
  3102. }
  3103. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  3104. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  3105. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  3106. // value will be populated with the request's response once the request completes
  3107. // successfuly.
  3108. //
  3109. // Use "Send" method on the returned Request to send the API call to the service.
  3110. // the "output" return value is not valid until after Send returns without error.
  3111. //
  3112. // See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
  3113. // API call, and error handling.
  3114. //
  3115. // This method is useful when you want to inject custom logic or configuration
  3116. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3117. //
  3118. //
  3119. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  3120. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  3121. //
  3122. // err := req.Send()
  3123. // if err == nil { // resp is now filled
  3124. // fmt.Println(resp)
  3125. // }
  3126. //
  3127. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3128. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  3129. op := &request.Operation{
  3130. Name: opListBucketAnalyticsConfigurations,
  3131. HTTPMethod: "GET",
  3132. HTTPPath: "/{Bucket}?analytics",
  3133. }
  3134. if input == nil {
  3135. input = &ListBucketAnalyticsConfigurationsInput{}
  3136. }
  3137. output = &ListBucketAnalyticsConfigurationsOutput{}
  3138. req = c.newRequest(op, input, output)
  3139. return
  3140. }
  3141. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  3142. //
  3143. // Lists the analytics configurations for the bucket.
  3144. //
  3145. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3146. // with awserr.Error's Code and Message methods to get detailed information about
  3147. // the error.
  3148. //
  3149. // See the AWS API reference guide for Amazon Simple Storage Service's
  3150. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  3151. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3152. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3153. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3154. return out, req.Send()
  3155. }
  3156. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  3157. // the ability to pass a context and additional request options.
  3158. //
  3159. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  3160. //
  3161. // The context must be non-nil and will be used for request cancellation. If
  3162. // the context is nil a panic will occur. In the future the SDK may create
  3163. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3164. // for more information on using Contexts.
  3165. func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3166. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3167. req.SetContext(ctx)
  3168. req.ApplyOptions(opts...)
  3169. return out, req.Send()
  3170. }
  3171. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  3172. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  3173. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  3174. // value will be populated with the request's response once the request completes
  3175. // successfuly.
  3176. //
  3177. // Use "Send" method on the returned Request to send the API call to the service.
  3178. // the "output" return value is not valid until after Send returns without error.
  3179. //
  3180. // See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
  3181. // API call, and error handling.
  3182. //
  3183. // This method is useful when you want to inject custom logic or configuration
  3184. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3185. //
  3186. //
  3187. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  3188. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  3189. //
  3190. // err := req.Send()
  3191. // if err == nil { // resp is now filled
  3192. // fmt.Println(resp)
  3193. // }
  3194. //
  3195. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3196. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  3197. op := &request.Operation{
  3198. Name: opListBucketInventoryConfigurations,
  3199. HTTPMethod: "GET",
  3200. HTTPPath: "/{Bucket}?inventory",
  3201. }
  3202. if input == nil {
  3203. input = &ListBucketInventoryConfigurationsInput{}
  3204. }
  3205. output = &ListBucketInventoryConfigurationsOutput{}
  3206. req = c.newRequest(op, input, output)
  3207. return
  3208. }
  3209. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  3210. //
  3211. // Returns a list of inventory configurations for the bucket.
  3212. //
  3213. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3214. // with awserr.Error's Code and Message methods to get detailed information about
  3215. // the error.
  3216. //
  3217. // See the AWS API reference guide for Amazon Simple Storage Service's
  3218. // API operation ListBucketInventoryConfigurations for usage and error information.
  3219. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3220. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  3221. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3222. return out, req.Send()
  3223. }
  3224. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  3225. // the ability to pass a context and additional request options.
  3226. //
  3227. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  3228. //
  3229. // The context must be non-nil and will be used for request cancellation. If
  3230. // the context is nil a panic will occur. In the future the SDK may create
  3231. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3232. // for more information on using Contexts.
  3233. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  3234. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3235. req.SetContext(ctx)
  3236. req.ApplyOptions(opts...)
  3237. return out, req.Send()
  3238. }
  3239. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  3240. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  3241. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  3242. // value will be populated with the request's response once the request completes
  3243. // successfuly.
  3244. //
  3245. // Use "Send" method on the returned Request to send the API call to the service.
  3246. // the "output" return value is not valid until after Send returns without error.
  3247. //
  3248. // See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
  3249. // API call, and error handling.
  3250. //
  3251. // This method is useful when you want to inject custom logic or configuration
  3252. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3253. //
  3254. //
  3255. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  3256. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  3257. //
  3258. // err := req.Send()
  3259. // if err == nil { // resp is now filled
  3260. // fmt.Println(resp)
  3261. // }
  3262. //
  3263. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3264. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  3265. op := &request.Operation{
  3266. Name: opListBucketMetricsConfigurations,
  3267. HTTPMethod: "GET",
  3268. HTTPPath: "/{Bucket}?metrics",
  3269. }
  3270. if input == nil {
  3271. input = &ListBucketMetricsConfigurationsInput{}
  3272. }
  3273. output = &ListBucketMetricsConfigurationsOutput{}
  3274. req = c.newRequest(op, input, output)
  3275. return
  3276. }
  3277. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  3278. //
  3279. // Lists the metrics configurations for the bucket.
  3280. //
  3281. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3282. // with awserr.Error's Code and Message methods to get detailed information about
  3283. // the error.
  3284. //
  3285. // See the AWS API reference guide for Amazon Simple Storage Service's
  3286. // API operation ListBucketMetricsConfigurations for usage and error information.
  3287. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3288. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  3289. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3290. return out, req.Send()
  3291. }
  3292. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  3293. // the ability to pass a context and additional request options.
  3294. //
  3295. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  3296. //
  3297. // The context must be non-nil and will be used for request cancellation. If
  3298. // the context is nil a panic will occur. In the future the SDK may create
  3299. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3300. // for more information on using Contexts.
  3301. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  3302. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3303. req.SetContext(ctx)
  3304. req.ApplyOptions(opts...)
  3305. return out, req.Send()
  3306. }
  3307. const opListBuckets = "ListBuckets"
  3308. // ListBucketsRequest generates a "aws/request.Request" representing the
  3309. // client's request for the ListBuckets operation. The "output" return
  3310. // value will be populated with the request's response once the request completes
  3311. // successfuly.
  3312. //
  3313. // Use "Send" method on the returned Request to send the API call to the service.
  3314. // the "output" return value is not valid until after Send returns without error.
  3315. //
  3316. // See ListBuckets for more information on using the ListBuckets
  3317. // API call, and error handling.
  3318. //
  3319. // This method is useful when you want to inject custom logic or configuration
  3320. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3321. //
  3322. //
  3323. // // Example sending a request using the ListBucketsRequest method.
  3324. // req, resp := client.ListBucketsRequest(params)
  3325. //
  3326. // err := req.Send()
  3327. // if err == nil { // resp is now filled
  3328. // fmt.Println(resp)
  3329. // }
  3330. //
  3331. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3332. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  3333. op := &request.Operation{
  3334. Name: opListBuckets,
  3335. HTTPMethod: "GET",
  3336. HTTPPath: "/",
  3337. }
  3338. if input == nil {
  3339. input = &ListBucketsInput{}
  3340. }
  3341. output = &ListBucketsOutput{}
  3342. req = c.newRequest(op, input, output)
  3343. return
  3344. }
  3345. // ListBuckets API operation for Amazon Simple Storage Service.
  3346. //
  3347. // Returns a list of all buckets owned by the authenticated sender of the request.
  3348. //
  3349. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3350. // with awserr.Error's Code and Message methods to get detailed information about
  3351. // the error.
  3352. //
  3353. // See the AWS API reference guide for Amazon Simple Storage Service's
  3354. // API operation ListBuckets for usage and error information.
  3355. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3356. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  3357. req, out := c.ListBucketsRequest(input)
  3358. return out, req.Send()
  3359. }
  3360. // ListBucketsWithContext is the same as ListBuckets with the addition of
  3361. // the ability to pass a context and additional request options.
  3362. //
  3363. // See ListBuckets for details on how to use this API operation.
  3364. //
  3365. // The context must be non-nil and will be used for request cancellation. If
  3366. // the context is nil a panic will occur. In the future the SDK may create
  3367. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3368. // for more information on using Contexts.
  3369. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  3370. req, out := c.ListBucketsRequest(input)
  3371. req.SetContext(ctx)
  3372. req.ApplyOptions(opts...)
  3373. return out, req.Send()
  3374. }
  3375. const opListMultipartUploads = "ListMultipartUploads"
  3376. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  3377. // client's request for the ListMultipartUploads operation. The "output" return
  3378. // value will be populated with the request's response once the request completes
  3379. // successfuly.
  3380. //
  3381. // Use "Send" method on the returned Request to send the API call to the service.
  3382. // the "output" return value is not valid until after Send returns without error.
  3383. //
  3384. // See ListMultipartUploads for more information on using the ListMultipartUploads
  3385. // API call, and error handling.
  3386. //
  3387. // This method is useful when you want to inject custom logic or configuration
  3388. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3389. //
  3390. //
  3391. // // Example sending a request using the ListMultipartUploadsRequest method.
  3392. // req, resp := client.ListMultipartUploadsRequest(params)
  3393. //
  3394. // err := req.Send()
  3395. // if err == nil { // resp is now filled
  3396. // fmt.Println(resp)
  3397. // }
  3398. //
  3399. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3400. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  3401. op := &request.Operation{
  3402. Name: opListMultipartUploads,
  3403. HTTPMethod: "GET",
  3404. HTTPPath: "/{Bucket}?uploads",
  3405. Paginator: &request.Paginator{
  3406. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  3407. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  3408. LimitToken: "MaxUploads",
  3409. TruncationToken: "IsTruncated",
  3410. },
  3411. }
  3412. if input == nil {
  3413. input = &ListMultipartUploadsInput{}
  3414. }
  3415. output = &ListMultipartUploadsOutput{}
  3416. req = c.newRequest(op, input, output)
  3417. return
  3418. }
  3419. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  3420. //
  3421. // This operation lists in-progress multipart uploads.
  3422. //
  3423. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3424. // with awserr.Error's Code and Message methods to get detailed information about
  3425. // the error.
  3426. //
  3427. // See the AWS API reference guide for Amazon Simple Storage Service's
  3428. // API operation ListMultipartUploads for usage and error information.
  3429. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3430. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  3431. req, out := c.ListMultipartUploadsRequest(input)
  3432. return out, req.Send()
  3433. }
  3434. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  3435. // the ability to pass a context and additional request options.
  3436. //
  3437. // See ListMultipartUploads for details on how to use this API operation.
  3438. //
  3439. // The context must be non-nil and will be used for request cancellation. If
  3440. // the context is nil a panic will occur. In the future the SDK may create
  3441. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3442. // for more information on using Contexts.
  3443. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  3444. req, out := c.ListMultipartUploadsRequest(input)
  3445. req.SetContext(ctx)
  3446. req.ApplyOptions(opts...)
  3447. return out, req.Send()
  3448. }
  3449. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  3450. // calling the "fn" function with the response data for each page. To stop
  3451. // iterating, return false from the fn function.
  3452. //
  3453. // See ListMultipartUploads method for more information on how to use this operation.
  3454. //
  3455. // Note: This operation can generate multiple requests to a service.
  3456. //
  3457. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  3458. // pageNum := 0
  3459. // err := client.ListMultipartUploadsPages(params,
  3460. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  3461. // pageNum++
  3462. // fmt.Println(page)
  3463. // return pageNum <= 3
  3464. // })
  3465. //
  3466. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  3467. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  3468. }
  3469. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  3470. // it takes a Context and allows setting request options on the pages.
  3471. //
  3472. // The context must be non-nil and will be used for request cancellation. If
  3473. // the context is nil a panic will occur. In the future the SDK may create
  3474. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3475. // for more information on using Contexts.
  3476. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  3477. p := request.Pagination{
  3478. NewRequest: func() (*request.Request, error) {
  3479. var inCpy *ListMultipartUploadsInput
  3480. if input != nil {
  3481. tmp := *input
  3482. inCpy = &tmp
  3483. }
  3484. req, _ := c.ListMultipartUploadsRequest(inCpy)
  3485. req.SetContext(ctx)
  3486. req.ApplyOptions(opts...)
  3487. return req, nil
  3488. },
  3489. }
  3490. cont := true
  3491. for p.Next() && cont {
  3492. cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
  3493. }
  3494. return p.Err()
  3495. }
  3496. const opListObjectVersions = "ListObjectVersions"
  3497. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  3498. // client's request for the ListObjectVersions operation. The "output" return
  3499. // value will be populated with the request's response once the request completes
  3500. // successfuly.
  3501. //
  3502. // Use "Send" method on the returned Request to send the API call to the service.
  3503. // the "output" return value is not valid until after Send returns without error.
  3504. //
  3505. // See ListObjectVersions for more information on using the ListObjectVersions
  3506. // API call, and error handling.
  3507. //
  3508. // This method is useful when you want to inject custom logic or configuration
  3509. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3510. //
  3511. //
  3512. // // Example sending a request using the ListObjectVersionsRequest method.
  3513. // req, resp := client.ListObjectVersionsRequest(params)
  3514. //
  3515. // err := req.Send()
  3516. // if err == nil { // resp is now filled
  3517. // fmt.Println(resp)
  3518. // }
  3519. //
  3520. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3521. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  3522. op := &request.Operation{
  3523. Name: opListObjectVersions,
  3524. HTTPMethod: "GET",
  3525. HTTPPath: "/{Bucket}?versions",
  3526. Paginator: &request.Paginator{
  3527. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  3528. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  3529. LimitToken: "MaxKeys",
  3530. TruncationToken: "IsTruncated",
  3531. },
  3532. }
  3533. if input == nil {
  3534. input = &ListObjectVersionsInput{}
  3535. }
  3536. output = &ListObjectVersionsOutput{}
  3537. req = c.newRequest(op, input, output)
  3538. return
  3539. }
  3540. // ListObjectVersions API operation for Amazon Simple Storage Service.
  3541. //
  3542. // Returns metadata about all of the versions of objects in a bucket.
  3543. //
  3544. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3545. // with awserr.Error's Code and Message methods to get detailed information about
  3546. // the error.
  3547. //
  3548. // See the AWS API reference guide for Amazon Simple Storage Service's
  3549. // API operation ListObjectVersions for usage and error information.
  3550. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3551. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  3552. req, out := c.ListObjectVersionsRequest(input)
  3553. return out, req.Send()
  3554. }
  3555. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  3556. // the ability to pass a context and additional request options.
  3557. //
  3558. // See ListObjectVersions for details on how to use this API operation.
  3559. //
  3560. // The context must be non-nil and will be used for request cancellation. If
  3561. // the context is nil a panic will occur. In the future the SDK may create
  3562. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3563. // for more information on using Contexts.
  3564. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  3565. req, out := c.ListObjectVersionsRequest(input)
  3566. req.SetContext(ctx)
  3567. req.ApplyOptions(opts...)
  3568. return out, req.Send()
  3569. }
  3570. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  3571. // calling the "fn" function with the response data for each page. To stop
  3572. // iterating, return false from the fn function.
  3573. //
  3574. // See ListObjectVersions method for more information on how to use this operation.
  3575. //
  3576. // Note: This operation can generate multiple requests to a service.
  3577. //
  3578. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  3579. // pageNum := 0
  3580. // err := client.ListObjectVersionsPages(params,
  3581. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  3582. // pageNum++
  3583. // fmt.Println(page)
  3584. // return pageNum <= 3
  3585. // })
  3586. //
  3587. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  3588. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  3589. }
  3590. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  3591. // it takes a Context and allows setting request options on the pages.
  3592. //
  3593. // The context must be non-nil and will be used for request cancellation. If
  3594. // the context is nil a panic will occur. In the future the SDK may create
  3595. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3596. // for more information on using Contexts.
  3597. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  3598. p := request.Pagination{
  3599. NewRequest: func() (*request.Request, error) {
  3600. var inCpy *ListObjectVersionsInput
  3601. if input != nil {
  3602. tmp := *input
  3603. inCpy = &tmp
  3604. }
  3605. req, _ := c.ListObjectVersionsRequest(inCpy)
  3606. req.SetContext(ctx)
  3607. req.ApplyOptions(opts...)
  3608. return req, nil
  3609. },
  3610. }
  3611. cont := true
  3612. for p.Next() && cont {
  3613. cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
  3614. }
  3615. return p.Err()
  3616. }
  3617. const opListObjects = "ListObjects"
  3618. // ListObjectsRequest generates a "aws/request.Request" representing the
  3619. // client's request for the ListObjects operation. The "output" return
  3620. // value will be populated with the request's response once the request completes
  3621. // successfuly.
  3622. //
  3623. // Use "Send" method on the returned Request to send the API call to the service.
  3624. // the "output" return value is not valid until after Send returns without error.
  3625. //
  3626. // See ListObjects for more information on using the ListObjects
  3627. // API call, and error handling.
  3628. //
  3629. // This method is useful when you want to inject custom logic or configuration
  3630. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3631. //
  3632. //
  3633. // // Example sending a request using the ListObjectsRequest method.
  3634. // req, resp := client.ListObjectsRequest(params)
  3635. //
  3636. // err := req.Send()
  3637. // if err == nil { // resp is now filled
  3638. // fmt.Println(resp)
  3639. // }
  3640. //
  3641. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3642. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  3643. op := &request.Operation{
  3644. Name: opListObjects,
  3645. HTTPMethod: "GET",
  3646. HTTPPath: "/{Bucket}",
  3647. Paginator: &request.Paginator{
  3648. InputTokens: []string{"Marker"},
  3649. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  3650. LimitToken: "MaxKeys",
  3651. TruncationToken: "IsTruncated",
  3652. },
  3653. }
  3654. if input == nil {
  3655. input = &ListObjectsInput{}
  3656. }
  3657. output = &ListObjectsOutput{}
  3658. req = c.newRequest(op, input, output)
  3659. return
  3660. }
  3661. // ListObjects API operation for Amazon Simple Storage Service.
  3662. //
  3663. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3664. // the request parameters as selection criteria to return a subset of the objects
  3665. // in a bucket.
  3666. //
  3667. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3668. // with awserr.Error's Code and Message methods to get detailed information about
  3669. // the error.
  3670. //
  3671. // See the AWS API reference guide for Amazon Simple Storage Service's
  3672. // API operation ListObjects for usage and error information.
  3673. //
  3674. // Returned Error Codes:
  3675. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3676. // The specified bucket does not exist.
  3677. //
  3678. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3679. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  3680. req, out := c.ListObjectsRequest(input)
  3681. return out, req.Send()
  3682. }
  3683. // ListObjectsWithContext is the same as ListObjects with the addition of
  3684. // the ability to pass a context and additional request options.
  3685. //
  3686. // See ListObjects for details on how to use this API operation.
  3687. //
  3688. // The context must be non-nil and will be used for request cancellation. If
  3689. // the context is nil a panic will occur. In the future the SDK may create
  3690. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3691. // for more information on using Contexts.
  3692. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  3693. req, out := c.ListObjectsRequest(input)
  3694. req.SetContext(ctx)
  3695. req.ApplyOptions(opts...)
  3696. return out, req.Send()
  3697. }
  3698. // ListObjectsPages iterates over the pages of a ListObjects operation,
  3699. // calling the "fn" function with the response data for each page. To stop
  3700. // iterating, return false from the fn function.
  3701. //
  3702. // See ListObjects method for more information on how to use this operation.
  3703. //
  3704. // Note: This operation can generate multiple requests to a service.
  3705. //
  3706. // // Example iterating over at most 3 pages of a ListObjects operation.
  3707. // pageNum := 0
  3708. // err := client.ListObjectsPages(params,
  3709. // func(page *ListObjectsOutput, lastPage bool) bool {
  3710. // pageNum++
  3711. // fmt.Println(page)
  3712. // return pageNum <= 3
  3713. // })
  3714. //
  3715. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  3716. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  3717. }
  3718. // ListObjectsPagesWithContext same as ListObjectsPages except
  3719. // it takes a Context and allows setting request options on the pages.
  3720. //
  3721. // The context must be non-nil and will be used for request cancellation. If
  3722. // the context is nil a panic will occur. In the future the SDK may create
  3723. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3724. // for more information on using Contexts.
  3725. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  3726. p := request.Pagination{
  3727. NewRequest: func() (*request.Request, error) {
  3728. var inCpy *ListObjectsInput
  3729. if input != nil {
  3730. tmp := *input
  3731. inCpy = &tmp
  3732. }
  3733. req, _ := c.ListObjectsRequest(inCpy)
  3734. req.SetContext(ctx)
  3735. req.ApplyOptions(opts...)
  3736. return req, nil
  3737. },
  3738. }
  3739. cont := true
  3740. for p.Next() && cont {
  3741. cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
  3742. }
  3743. return p.Err()
  3744. }
  3745. const opListObjectsV2 = "ListObjectsV2"
  3746. // ListObjectsV2Request generates a "aws/request.Request" representing the
  3747. // client's request for the ListObjectsV2 operation. The "output" return
  3748. // value will be populated with the request's response once the request completes
  3749. // successfuly.
  3750. //
  3751. // Use "Send" method on the returned Request to send the API call to the service.
  3752. // the "output" return value is not valid until after Send returns without error.
  3753. //
  3754. // See ListObjectsV2 for more information on using the ListObjectsV2
  3755. // API call, and error handling.
  3756. //
  3757. // This method is useful when you want to inject custom logic or configuration
  3758. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3759. //
  3760. //
  3761. // // Example sending a request using the ListObjectsV2Request method.
  3762. // req, resp := client.ListObjectsV2Request(params)
  3763. //
  3764. // err := req.Send()
  3765. // if err == nil { // resp is now filled
  3766. // fmt.Println(resp)
  3767. // }
  3768. //
  3769. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3770. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  3771. op := &request.Operation{
  3772. Name: opListObjectsV2,
  3773. HTTPMethod: "GET",
  3774. HTTPPath: "/{Bucket}?list-type=2",
  3775. Paginator: &request.Paginator{
  3776. InputTokens: []string{"ContinuationToken"},
  3777. OutputTokens: []string{"NextContinuationToken"},
  3778. LimitToken: "MaxKeys",
  3779. TruncationToken: "",
  3780. },
  3781. }
  3782. if input == nil {
  3783. input = &ListObjectsV2Input{}
  3784. }
  3785. output = &ListObjectsV2Output{}
  3786. req = c.newRequest(op, input, output)
  3787. return
  3788. }
  3789. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  3790. //
  3791. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3792. // the request parameters as selection criteria to return a subset of the objects
  3793. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  3794. // you use this revised API for new application development.
  3795. //
  3796. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3797. // with awserr.Error's Code and Message methods to get detailed information about
  3798. // the error.
  3799. //
  3800. // See the AWS API reference guide for Amazon Simple Storage Service's
  3801. // API operation ListObjectsV2 for usage and error information.
  3802. //
  3803. // Returned Error Codes:
  3804. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3805. // The specified bucket does not exist.
  3806. //
  3807. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3808. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  3809. req, out := c.ListObjectsV2Request(input)
  3810. return out, req.Send()
  3811. }
  3812. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  3813. // the ability to pass a context and additional request options.
  3814. //
  3815. // See ListObjectsV2 for details on how to use this API operation.
  3816. //
  3817. // The context must be non-nil and will be used for request cancellation. If
  3818. // the context is nil a panic will occur. In the future the SDK may create
  3819. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3820. // for more information on using Contexts.
  3821. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  3822. req, out := c.ListObjectsV2Request(input)
  3823. req.SetContext(ctx)
  3824. req.ApplyOptions(opts...)
  3825. return out, req.Send()
  3826. }
  3827. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  3828. // calling the "fn" function with the response data for each page. To stop
  3829. // iterating, return false from the fn function.
  3830. //
  3831. // See ListObjectsV2 method for more information on how to use this operation.
  3832. //
  3833. // Note: This operation can generate multiple requests to a service.
  3834. //
  3835. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  3836. // pageNum := 0
  3837. // err := client.ListObjectsV2Pages(params,
  3838. // func(page *ListObjectsV2Output, lastPage bool) bool {
  3839. // pageNum++
  3840. // fmt.Println(page)
  3841. // return pageNum <= 3
  3842. // })
  3843. //
  3844. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  3845. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  3846. }
  3847. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  3848. // it takes a Context and allows setting request options on the pages.
  3849. //
  3850. // The context must be non-nil and will be used for request cancellation. If
  3851. // the context is nil a panic will occur. In the future the SDK may create
  3852. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3853. // for more information on using Contexts.
  3854. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  3855. p := request.Pagination{
  3856. NewRequest: func() (*request.Request, error) {
  3857. var inCpy *ListObjectsV2Input
  3858. if input != nil {
  3859. tmp := *input
  3860. inCpy = &tmp
  3861. }
  3862. req, _ := c.ListObjectsV2Request(inCpy)
  3863. req.SetContext(ctx)
  3864. req.ApplyOptions(opts...)
  3865. return req, nil
  3866. },
  3867. }
  3868. cont := true
  3869. for p.Next() && cont {
  3870. cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
  3871. }
  3872. return p.Err()
  3873. }
  3874. const opListParts = "ListParts"
  3875. // ListPartsRequest generates a "aws/request.Request" representing the
  3876. // client's request for the ListParts operation. The "output" return
  3877. // value will be populated with the request's response once the request completes
  3878. // successfuly.
  3879. //
  3880. // Use "Send" method on the returned Request to send the API call to the service.
  3881. // the "output" return value is not valid until after Send returns without error.
  3882. //
  3883. // See ListParts for more information on using the ListParts
  3884. // API call, and error handling.
  3885. //
  3886. // This method is useful when you want to inject custom logic or configuration
  3887. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3888. //
  3889. //
  3890. // // Example sending a request using the ListPartsRequest method.
  3891. // req, resp := client.ListPartsRequest(params)
  3892. //
  3893. // err := req.Send()
  3894. // if err == nil { // resp is now filled
  3895. // fmt.Println(resp)
  3896. // }
  3897. //
  3898. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3899. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  3900. op := &request.Operation{
  3901. Name: opListParts,
  3902. HTTPMethod: "GET",
  3903. HTTPPath: "/{Bucket}/{Key+}",
  3904. Paginator: &request.Paginator{
  3905. InputTokens: []string{"PartNumberMarker"},
  3906. OutputTokens: []string{"NextPartNumberMarker"},
  3907. LimitToken: "MaxParts",
  3908. TruncationToken: "IsTruncated",
  3909. },
  3910. }
  3911. if input == nil {
  3912. input = &ListPartsInput{}
  3913. }
  3914. output = &ListPartsOutput{}
  3915. req = c.newRequest(op, input, output)
  3916. return
  3917. }
  3918. // ListParts API operation for Amazon Simple Storage Service.
  3919. //
  3920. // Lists the parts that have been uploaded for a specific multipart upload.
  3921. //
  3922. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3923. // with awserr.Error's Code and Message methods to get detailed information about
  3924. // the error.
  3925. //
  3926. // See the AWS API reference guide for Amazon Simple Storage Service's
  3927. // API operation ListParts for usage and error information.
  3928. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3929. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  3930. req, out := c.ListPartsRequest(input)
  3931. return out, req.Send()
  3932. }
  3933. // ListPartsWithContext is the same as ListParts with the addition of
  3934. // the ability to pass a context and additional request options.
  3935. //
  3936. // See ListParts for details on how to use this API operation.
  3937. //
  3938. // The context must be non-nil and will be used for request cancellation. If
  3939. // the context is nil a panic will occur. In the future the SDK may create
  3940. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3941. // for more information on using Contexts.
  3942. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  3943. req, out := c.ListPartsRequest(input)
  3944. req.SetContext(ctx)
  3945. req.ApplyOptions(opts...)
  3946. return out, req.Send()
  3947. }
  3948. // ListPartsPages iterates over the pages of a ListParts operation,
  3949. // calling the "fn" function with the response data for each page. To stop
  3950. // iterating, return false from the fn function.
  3951. //
  3952. // See ListParts method for more information on how to use this operation.
  3953. //
  3954. // Note: This operation can generate multiple requests to a service.
  3955. //
  3956. // // Example iterating over at most 3 pages of a ListParts operation.
  3957. // pageNum := 0
  3958. // err := client.ListPartsPages(params,
  3959. // func(page *ListPartsOutput, lastPage bool) bool {
  3960. // pageNum++
  3961. // fmt.Println(page)
  3962. // return pageNum <= 3
  3963. // })
  3964. //
  3965. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  3966. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  3967. }
  3968. // ListPartsPagesWithContext same as ListPartsPages except
  3969. // it takes a Context and allows setting request options on the pages.
  3970. //
  3971. // The context must be non-nil and will be used for request cancellation. If
  3972. // the context is nil a panic will occur. In the future the SDK may create
  3973. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3974. // for more information on using Contexts.
  3975. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  3976. p := request.Pagination{
  3977. NewRequest: func() (*request.Request, error) {
  3978. var inCpy *ListPartsInput
  3979. if input != nil {
  3980. tmp := *input
  3981. inCpy = &tmp
  3982. }
  3983. req, _ := c.ListPartsRequest(inCpy)
  3984. req.SetContext(ctx)
  3985. req.ApplyOptions(opts...)
  3986. return req, nil
  3987. },
  3988. }
  3989. cont := true
  3990. for p.Next() && cont {
  3991. cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
  3992. }
  3993. return p.Err()
  3994. }
  3995. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  3996. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  3997. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  3998. // value will be populated with the request's response once the request completes
  3999. // successfuly.
  4000. //
  4001. // Use "Send" method on the returned Request to send the API call to the service.
  4002. // the "output" return value is not valid until after Send returns without error.
  4003. //
  4004. // See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
  4005. // API call, and error handling.
  4006. //
  4007. // This method is useful when you want to inject custom logic or configuration
  4008. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4009. //
  4010. //
  4011. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  4012. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  4013. //
  4014. // err := req.Send()
  4015. // if err == nil { // resp is now filled
  4016. // fmt.Println(resp)
  4017. // }
  4018. //
  4019. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4020. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  4021. op := &request.Operation{
  4022. Name: opPutBucketAccelerateConfiguration,
  4023. HTTPMethod: "PUT",
  4024. HTTPPath: "/{Bucket}?accelerate",
  4025. }
  4026. if input == nil {
  4027. input = &PutBucketAccelerateConfigurationInput{}
  4028. }
  4029. output = &PutBucketAccelerateConfigurationOutput{}
  4030. req = c.newRequest(op, input, output)
  4031. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4032. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4033. return
  4034. }
  4035. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  4036. //
  4037. // Sets the accelerate configuration of an existing bucket.
  4038. //
  4039. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4040. // with awserr.Error's Code and Message methods to get detailed information about
  4041. // the error.
  4042. //
  4043. // See the AWS API reference guide for Amazon Simple Storage Service's
  4044. // API operation PutBucketAccelerateConfiguration for usage and error information.
  4045. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4046. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  4047. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4048. return out, req.Send()
  4049. }
  4050. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  4051. // the ability to pass a context and additional request options.
  4052. //
  4053. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  4054. //
  4055. // The context must be non-nil and will be used for request cancellation. If
  4056. // the context is nil a panic will occur. In the future the SDK may create
  4057. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4058. // for more information on using Contexts.
  4059. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  4060. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4061. req.SetContext(ctx)
  4062. req.ApplyOptions(opts...)
  4063. return out, req.Send()
  4064. }
  4065. const opPutBucketAcl = "PutBucketAcl"
  4066. // PutBucketAclRequest generates a "aws/request.Request" representing the
  4067. // client's request for the PutBucketAcl operation. The "output" return
  4068. // value will be populated with the request's response once the request completes
  4069. // successfuly.
  4070. //
  4071. // Use "Send" method on the returned Request to send the API call to the service.
  4072. // the "output" return value is not valid until after Send returns without error.
  4073. //
  4074. // See PutBucketAcl for more information on using the PutBucketAcl
  4075. // API call, and error handling.
  4076. //
  4077. // This method is useful when you want to inject custom logic or configuration
  4078. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4079. //
  4080. //
  4081. // // Example sending a request using the PutBucketAclRequest method.
  4082. // req, resp := client.PutBucketAclRequest(params)
  4083. //
  4084. // err := req.Send()
  4085. // if err == nil { // resp is now filled
  4086. // fmt.Println(resp)
  4087. // }
  4088. //
  4089. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4090. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  4091. op := &request.Operation{
  4092. Name: opPutBucketAcl,
  4093. HTTPMethod: "PUT",
  4094. HTTPPath: "/{Bucket}?acl",
  4095. }
  4096. if input == nil {
  4097. input = &PutBucketAclInput{}
  4098. }
  4099. output = &PutBucketAclOutput{}
  4100. req = c.newRequest(op, input, output)
  4101. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4102. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4103. return
  4104. }
  4105. // PutBucketAcl API operation for Amazon Simple Storage Service.
  4106. //
  4107. // Sets the permissions on a bucket using access control lists (ACL).
  4108. //
  4109. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4110. // with awserr.Error's Code and Message methods to get detailed information about
  4111. // the error.
  4112. //
  4113. // See the AWS API reference guide for Amazon Simple Storage Service's
  4114. // API operation PutBucketAcl for usage and error information.
  4115. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4116. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  4117. req, out := c.PutBucketAclRequest(input)
  4118. return out, req.Send()
  4119. }
  4120. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  4121. // the ability to pass a context and additional request options.
  4122. //
  4123. // See PutBucketAcl for details on how to use this API operation.
  4124. //
  4125. // The context must be non-nil and will be used for request cancellation. If
  4126. // the context is nil a panic will occur. In the future the SDK may create
  4127. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4128. // for more information on using Contexts.
  4129. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  4130. req, out := c.PutBucketAclRequest(input)
  4131. req.SetContext(ctx)
  4132. req.ApplyOptions(opts...)
  4133. return out, req.Send()
  4134. }
  4135. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  4136. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  4137. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  4138. // value will be populated with the request's response once the request completes
  4139. // successfuly.
  4140. //
  4141. // Use "Send" method on the returned Request to send the API call to the service.
  4142. // the "output" return value is not valid until after Send returns without error.
  4143. //
  4144. // See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
  4145. // API call, and error handling.
  4146. //
  4147. // This method is useful when you want to inject custom logic or configuration
  4148. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4149. //
  4150. //
  4151. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  4152. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  4153. //
  4154. // err := req.Send()
  4155. // if err == nil { // resp is now filled
  4156. // fmt.Println(resp)
  4157. // }
  4158. //
  4159. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4160. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  4161. op := &request.Operation{
  4162. Name: opPutBucketAnalyticsConfiguration,
  4163. HTTPMethod: "PUT",
  4164. HTTPPath: "/{Bucket}?analytics",
  4165. }
  4166. if input == nil {
  4167. input = &PutBucketAnalyticsConfigurationInput{}
  4168. }
  4169. output = &PutBucketAnalyticsConfigurationOutput{}
  4170. req = c.newRequest(op, input, output)
  4171. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4172. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4173. return
  4174. }
  4175. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  4176. //
  4177. // Sets an analytics configuration for the bucket (specified by the analytics
  4178. // configuration ID).
  4179. //
  4180. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4181. // with awserr.Error's Code and Message methods to get detailed information about
  4182. // the error.
  4183. //
  4184. // See the AWS API reference guide for Amazon Simple Storage Service's
  4185. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  4186. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4187. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  4188. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4189. return out, req.Send()
  4190. }
  4191. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  4192. // the ability to pass a context and additional request options.
  4193. //
  4194. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  4195. //
  4196. // The context must be non-nil and will be used for request cancellation. If
  4197. // the context is nil a panic will occur. In the future the SDK may create
  4198. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4199. // for more information on using Contexts.
  4200. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  4201. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4202. req.SetContext(ctx)
  4203. req.ApplyOptions(opts...)
  4204. return out, req.Send()
  4205. }
  4206. const opPutBucketCors = "PutBucketCors"
  4207. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  4208. // client's request for the PutBucketCors operation. The "output" return
  4209. // value will be populated with the request's response once the request completes
  4210. // successfuly.
  4211. //
  4212. // Use "Send" method on the returned Request to send the API call to the service.
  4213. // the "output" return value is not valid until after Send returns without error.
  4214. //
  4215. // See PutBucketCors for more information on using the PutBucketCors
  4216. // API call, and error handling.
  4217. //
  4218. // This method is useful when you want to inject custom logic or configuration
  4219. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4220. //
  4221. //
  4222. // // Example sending a request using the PutBucketCorsRequest method.
  4223. // req, resp := client.PutBucketCorsRequest(params)
  4224. //
  4225. // err := req.Send()
  4226. // if err == nil { // resp is now filled
  4227. // fmt.Println(resp)
  4228. // }
  4229. //
  4230. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4231. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  4232. op := &request.Operation{
  4233. Name: opPutBucketCors,
  4234. HTTPMethod: "PUT",
  4235. HTTPPath: "/{Bucket}?cors",
  4236. }
  4237. if input == nil {
  4238. input = &PutBucketCorsInput{}
  4239. }
  4240. output = &PutBucketCorsOutput{}
  4241. req = c.newRequest(op, input, output)
  4242. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4243. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4244. return
  4245. }
  4246. // PutBucketCors API operation for Amazon Simple Storage Service.
  4247. //
  4248. // Sets the cors configuration for a bucket.
  4249. //
  4250. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4251. // with awserr.Error's Code and Message methods to get detailed information about
  4252. // the error.
  4253. //
  4254. // See the AWS API reference guide for Amazon Simple Storage Service's
  4255. // API operation PutBucketCors for usage and error information.
  4256. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4257. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  4258. req, out := c.PutBucketCorsRequest(input)
  4259. return out, req.Send()
  4260. }
  4261. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  4262. // the ability to pass a context and additional request options.
  4263. //
  4264. // See PutBucketCors for details on how to use this API operation.
  4265. //
  4266. // The context must be non-nil and will be used for request cancellation. If
  4267. // the context is nil a panic will occur. In the future the SDK may create
  4268. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4269. // for more information on using Contexts.
  4270. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  4271. req, out := c.PutBucketCorsRequest(input)
  4272. req.SetContext(ctx)
  4273. req.ApplyOptions(opts...)
  4274. return out, req.Send()
  4275. }
  4276. const opPutBucketEncryption = "PutBucketEncryption"
  4277. // PutBucketEncryptionRequest generates a "aws/request.Request" representing the
  4278. // client's request for the PutBucketEncryption operation. The "output" return
  4279. // value will be populated with the request's response once the request completes
  4280. // successfuly.
  4281. //
  4282. // Use "Send" method on the returned Request to send the API call to the service.
  4283. // the "output" return value is not valid until after Send returns without error.
  4284. //
  4285. // See PutBucketEncryption for more information on using the PutBucketEncryption
  4286. // API call, and error handling.
  4287. //
  4288. // This method is useful when you want to inject custom logic or configuration
  4289. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4290. //
  4291. //
  4292. // // Example sending a request using the PutBucketEncryptionRequest method.
  4293. // req, resp := client.PutBucketEncryptionRequest(params)
  4294. //
  4295. // err := req.Send()
  4296. // if err == nil { // resp is now filled
  4297. // fmt.Println(resp)
  4298. // }
  4299. //
  4300. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4301. func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
  4302. op := &request.Operation{
  4303. Name: opPutBucketEncryption,
  4304. HTTPMethod: "PUT",
  4305. HTTPPath: "/{Bucket}?encryption",
  4306. }
  4307. if input == nil {
  4308. input = &PutBucketEncryptionInput{}
  4309. }
  4310. output = &PutBucketEncryptionOutput{}
  4311. req = c.newRequest(op, input, output)
  4312. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4313. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4314. return
  4315. }
  4316. // PutBucketEncryption API operation for Amazon Simple Storage Service.
  4317. //
  4318. // Creates a new server-side encryption configuration (or replaces an existing
  4319. // one, if present).
  4320. //
  4321. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4322. // with awserr.Error's Code and Message methods to get detailed information about
  4323. // the error.
  4324. //
  4325. // See the AWS API reference guide for Amazon Simple Storage Service's
  4326. // API operation PutBucketEncryption for usage and error information.
  4327. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4328. func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
  4329. req, out := c.PutBucketEncryptionRequest(input)
  4330. return out, req.Send()
  4331. }
  4332. // PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
  4333. // the ability to pass a context and additional request options.
  4334. //
  4335. // See PutBucketEncryption for details on how to use this API operation.
  4336. //
  4337. // The context must be non-nil and will be used for request cancellation. If
  4338. // the context is nil a panic will occur. In the future the SDK may create
  4339. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4340. // for more information on using Contexts.
  4341. func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
  4342. req, out := c.PutBucketEncryptionRequest(input)
  4343. req.SetContext(ctx)
  4344. req.ApplyOptions(opts...)
  4345. return out, req.Send()
  4346. }
  4347. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  4348. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  4349. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  4350. // value will be populated with the request's response once the request completes
  4351. // successfuly.
  4352. //
  4353. // Use "Send" method on the returned Request to send the API call to the service.
  4354. // the "output" return value is not valid until after Send returns without error.
  4355. //
  4356. // See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
  4357. // API call, and error handling.
  4358. //
  4359. // This method is useful when you want to inject custom logic or configuration
  4360. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4361. //
  4362. //
  4363. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  4364. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  4365. //
  4366. // err := req.Send()
  4367. // if err == nil { // resp is now filled
  4368. // fmt.Println(resp)
  4369. // }
  4370. //
  4371. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4372. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  4373. op := &request.Operation{
  4374. Name: opPutBucketInventoryConfiguration,
  4375. HTTPMethod: "PUT",
  4376. HTTPPath: "/{Bucket}?inventory",
  4377. }
  4378. if input == nil {
  4379. input = &PutBucketInventoryConfigurationInput{}
  4380. }
  4381. output = &PutBucketInventoryConfigurationOutput{}
  4382. req = c.newRequest(op, input, output)
  4383. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4384. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4385. return
  4386. }
  4387. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  4388. //
  4389. // Adds an inventory configuration (identified by the inventory ID) from the
  4390. // bucket.
  4391. //
  4392. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4393. // with awserr.Error's Code and Message methods to get detailed information about
  4394. // the error.
  4395. //
  4396. // See the AWS API reference guide for Amazon Simple Storage Service's
  4397. // API operation PutBucketInventoryConfiguration for usage and error information.
  4398. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4399. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  4400. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4401. return out, req.Send()
  4402. }
  4403. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  4404. // the ability to pass a context and additional request options.
  4405. //
  4406. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  4407. //
  4408. // The context must be non-nil and will be used for request cancellation. If
  4409. // the context is nil a panic will occur. In the future the SDK may create
  4410. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4411. // for more information on using Contexts.
  4412. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  4413. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4414. req.SetContext(ctx)
  4415. req.ApplyOptions(opts...)
  4416. return out, req.Send()
  4417. }
  4418. const opPutBucketLifecycle = "PutBucketLifecycle"
  4419. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  4420. // client's request for the PutBucketLifecycle operation. The "output" return
  4421. // value will be populated with the request's response once the request completes
  4422. // successfuly.
  4423. //
  4424. // Use "Send" method on the returned Request to send the API call to the service.
  4425. // the "output" return value is not valid until after Send returns without error.
  4426. //
  4427. // See PutBucketLifecycle for more information on using the PutBucketLifecycle
  4428. // API call, and error handling.
  4429. //
  4430. // This method is useful when you want to inject custom logic or configuration
  4431. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4432. //
  4433. //
  4434. // // Example sending a request using the PutBucketLifecycleRequest method.
  4435. // req, resp := client.PutBucketLifecycleRequest(params)
  4436. //
  4437. // err := req.Send()
  4438. // if err == nil { // resp is now filled
  4439. // fmt.Println(resp)
  4440. // }
  4441. //
  4442. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4443. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  4444. if c.Client.Config.Logger != nil {
  4445. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  4446. }
  4447. op := &request.Operation{
  4448. Name: opPutBucketLifecycle,
  4449. HTTPMethod: "PUT",
  4450. HTTPPath: "/{Bucket}?lifecycle",
  4451. }
  4452. if input == nil {
  4453. input = &PutBucketLifecycleInput{}
  4454. }
  4455. output = &PutBucketLifecycleOutput{}
  4456. req = c.newRequest(op, input, output)
  4457. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4458. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4459. return
  4460. }
  4461. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  4462. //
  4463. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  4464. //
  4465. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4466. // with awserr.Error's Code and Message methods to get detailed information about
  4467. // the error.
  4468. //
  4469. // See the AWS API reference guide for Amazon Simple Storage Service's
  4470. // API operation PutBucketLifecycle for usage and error information.
  4471. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4472. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  4473. req, out := c.PutBucketLifecycleRequest(input)
  4474. return out, req.Send()
  4475. }
  4476. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  4477. // the ability to pass a context and additional request options.
  4478. //
  4479. // See PutBucketLifecycle for details on how to use this API operation.
  4480. //
  4481. // The context must be non-nil and will be used for request cancellation. If
  4482. // the context is nil a panic will occur. In the future the SDK may create
  4483. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4484. // for more information on using Contexts.
  4485. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  4486. req, out := c.PutBucketLifecycleRequest(input)
  4487. req.SetContext(ctx)
  4488. req.ApplyOptions(opts...)
  4489. return out, req.Send()
  4490. }
  4491. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  4492. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  4493. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  4494. // value will be populated with the request's response once the request completes
  4495. // successfuly.
  4496. //
  4497. // Use "Send" method on the returned Request to send the API call to the service.
  4498. // the "output" return value is not valid until after Send returns without error.
  4499. //
  4500. // See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
  4501. // API call, and error handling.
  4502. //
  4503. // This method is useful when you want to inject custom logic or configuration
  4504. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4505. //
  4506. //
  4507. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  4508. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  4509. //
  4510. // err := req.Send()
  4511. // if err == nil { // resp is now filled
  4512. // fmt.Println(resp)
  4513. // }
  4514. //
  4515. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4516. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  4517. op := &request.Operation{
  4518. Name: opPutBucketLifecycleConfiguration,
  4519. HTTPMethod: "PUT",
  4520. HTTPPath: "/{Bucket}?lifecycle",
  4521. }
  4522. if input == nil {
  4523. input = &PutBucketLifecycleConfigurationInput{}
  4524. }
  4525. output = &PutBucketLifecycleConfigurationOutput{}
  4526. req = c.newRequest(op, input, output)
  4527. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4528. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4529. return
  4530. }
  4531. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  4532. //
  4533. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  4534. // exists, it replaces it.
  4535. //
  4536. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4537. // with awserr.Error's Code and Message methods to get detailed information about
  4538. // the error.
  4539. //
  4540. // See the AWS API reference guide for Amazon Simple Storage Service's
  4541. // API operation PutBucketLifecycleConfiguration for usage and error information.
  4542. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4543. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  4544. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4545. return out, req.Send()
  4546. }
  4547. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  4548. // the ability to pass a context and additional request options.
  4549. //
  4550. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  4551. //
  4552. // The context must be non-nil and will be used for request cancellation. If
  4553. // the context is nil a panic will occur. In the future the SDK may create
  4554. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4555. // for more information on using Contexts.
  4556. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  4557. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4558. req.SetContext(ctx)
  4559. req.ApplyOptions(opts...)
  4560. return out, req.Send()
  4561. }
  4562. const opPutBucketLogging = "PutBucketLogging"
  4563. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  4564. // client's request for the PutBucketLogging operation. The "output" return
  4565. // value will be populated with the request's response once the request completes
  4566. // successfuly.
  4567. //
  4568. // Use "Send" method on the returned Request to send the API call to the service.
  4569. // the "output" return value is not valid until after Send returns without error.
  4570. //
  4571. // See PutBucketLogging for more information on using the PutBucketLogging
  4572. // API call, and error handling.
  4573. //
  4574. // This method is useful when you want to inject custom logic or configuration
  4575. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4576. //
  4577. //
  4578. // // Example sending a request using the PutBucketLoggingRequest method.
  4579. // req, resp := client.PutBucketLoggingRequest(params)
  4580. //
  4581. // err := req.Send()
  4582. // if err == nil { // resp is now filled
  4583. // fmt.Println(resp)
  4584. // }
  4585. //
  4586. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4587. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  4588. op := &request.Operation{
  4589. Name: opPutBucketLogging,
  4590. HTTPMethod: "PUT",
  4591. HTTPPath: "/{Bucket}?logging",
  4592. }
  4593. if input == nil {
  4594. input = &PutBucketLoggingInput{}
  4595. }
  4596. output = &PutBucketLoggingOutput{}
  4597. req = c.newRequest(op, input, output)
  4598. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4599. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4600. return
  4601. }
  4602. // PutBucketLogging API operation for Amazon Simple Storage Service.
  4603. //
  4604. // Set the logging parameters for a bucket and to specify permissions for who
  4605. // can view and modify the logging parameters. To set the logging status of
  4606. // a bucket, you must be the bucket owner.
  4607. //
  4608. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4609. // with awserr.Error's Code and Message methods to get detailed information about
  4610. // the error.
  4611. //
  4612. // See the AWS API reference guide for Amazon Simple Storage Service's
  4613. // API operation PutBucketLogging for usage and error information.
  4614. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4615. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  4616. req, out := c.PutBucketLoggingRequest(input)
  4617. return out, req.Send()
  4618. }
  4619. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  4620. // the ability to pass a context and additional request options.
  4621. //
  4622. // See PutBucketLogging for details on how to use this API operation.
  4623. //
  4624. // The context must be non-nil and will be used for request cancellation. If
  4625. // the context is nil a panic will occur. In the future the SDK may create
  4626. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4627. // for more information on using Contexts.
  4628. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  4629. req, out := c.PutBucketLoggingRequest(input)
  4630. req.SetContext(ctx)
  4631. req.ApplyOptions(opts...)
  4632. return out, req.Send()
  4633. }
  4634. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  4635. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  4636. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  4637. // value will be populated with the request's response once the request completes
  4638. // successfuly.
  4639. //
  4640. // Use "Send" method on the returned Request to send the API call to the service.
  4641. // the "output" return value is not valid until after Send returns without error.
  4642. //
  4643. // See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
  4644. // API call, and error handling.
  4645. //
  4646. // This method is useful when you want to inject custom logic or configuration
  4647. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4648. //
  4649. //
  4650. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  4651. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  4652. //
  4653. // err := req.Send()
  4654. // if err == nil { // resp is now filled
  4655. // fmt.Println(resp)
  4656. // }
  4657. //
  4658. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4659. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  4660. op := &request.Operation{
  4661. Name: opPutBucketMetricsConfiguration,
  4662. HTTPMethod: "PUT",
  4663. HTTPPath: "/{Bucket}?metrics",
  4664. }
  4665. if input == nil {
  4666. input = &PutBucketMetricsConfigurationInput{}
  4667. }
  4668. output = &PutBucketMetricsConfigurationOutput{}
  4669. req = c.newRequest(op, input, output)
  4670. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4671. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4672. return
  4673. }
  4674. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  4675. //
  4676. // Sets a metrics configuration (specified by the metrics configuration ID)
  4677. // for the bucket.
  4678. //
  4679. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4680. // with awserr.Error's Code and Message methods to get detailed information about
  4681. // the error.
  4682. //
  4683. // See the AWS API reference guide for Amazon Simple Storage Service's
  4684. // API operation PutBucketMetricsConfiguration for usage and error information.
  4685. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4686. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  4687. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4688. return out, req.Send()
  4689. }
  4690. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  4691. // the ability to pass a context and additional request options.
  4692. //
  4693. // See PutBucketMetricsConfiguration for details on how to use this API operation.
  4694. //
  4695. // The context must be non-nil and will be used for request cancellation. If
  4696. // the context is nil a panic will occur. In the future the SDK may create
  4697. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4698. // for more information on using Contexts.
  4699. func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  4700. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4701. req.SetContext(ctx)
  4702. req.ApplyOptions(opts...)
  4703. return out, req.Send()
  4704. }
  4705. const opPutBucketNotification = "PutBucketNotification"
  4706. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  4707. // client's request for the PutBucketNotification operation. The "output" return
  4708. // value will be populated with the request's response once the request completes
  4709. // successfuly.
  4710. //
  4711. // Use "Send" method on the returned Request to send the API call to the service.
  4712. // the "output" return value is not valid until after Send returns without error.
  4713. //
  4714. // See PutBucketNotification for more information on using the PutBucketNotification
  4715. // API call, and error handling.
  4716. //
  4717. // This method is useful when you want to inject custom logic or configuration
  4718. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4719. //
  4720. //
  4721. // // Example sending a request using the PutBucketNotificationRequest method.
  4722. // req, resp := client.PutBucketNotificationRequest(params)
  4723. //
  4724. // err := req.Send()
  4725. // if err == nil { // resp is now filled
  4726. // fmt.Println(resp)
  4727. // }
  4728. //
  4729. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4730. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  4731. if c.Client.Config.Logger != nil {
  4732. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  4733. }
  4734. op := &request.Operation{
  4735. Name: opPutBucketNotification,
  4736. HTTPMethod: "PUT",
  4737. HTTPPath: "/{Bucket}?notification",
  4738. }
  4739. if input == nil {
  4740. input = &PutBucketNotificationInput{}
  4741. }
  4742. output = &PutBucketNotificationOutput{}
  4743. req = c.newRequest(op, input, output)
  4744. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4745. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4746. return
  4747. }
  4748. // PutBucketNotification API operation for Amazon Simple Storage Service.
  4749. //
  4750. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  4751. //
  4752. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4753. // with awserr.Error's Code and Message methods to get detailed information about
  4754. // the error.
  4755. //
  4756. // See the AWS API reference guide for Amazon Simple Storage Service's
  4757. // API operation PutBucketNotification for usage and error information.
  4758. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4759. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  4760. req, out := c.PutBucketNotificationRequest(input)
  4761. return out, req.Send()
  4762. }
  4763. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  4764. // the ability to pass a context and additional request options.
  4765. //
  4766. // See PutBucketNotification for details on how to use this API operation.
  4767. //
  4768. // The context must be non-nil and will be used for request cancellation. If
  4769. // the context is nil a panic will occur. In the future the SDK may create
  4770. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4771. // for more information on using Contexts.
  4772. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  4773. req, out := c.PutBucketNotificationRequest(input)
  4774. req.SetContext(ctx)
  4775. req.ApplyOptions(opts...)
  4776. return out, req.Send()
  4777. }
  4778. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  4779. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  4780. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  4781. // value will be populated with the request's response once the request completes
  4782. // successfuly.
  4783. //
  4784. // Use "Send" method on the returned Request to send the API call to the service.
  4785. // the "output" return value is not valid until after Send returns without error.
  4786. //
  4787. // See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
  4788. // API call, and error handling.
  4789. //
  4790. // This method is useful when you want to inject custom logic or configuration
  4791. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4792. //
  4793. //
  4794. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  4795. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  4796. //
  4797. // err := req.Send()
  4798. // if err == nil { // resp is now filled
  4799. // fmt.Println(resp)
  4800. // }
  4801. //
  4802. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4803. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  4804. op := &request.Operation{
  4805. Name: opPutBucketNotificationConfiguration,
  4806. HTTPMethod: "PUT",
  4807. HTTPPath: "/{Bucket}?notification",
  4808. }
  4809. if input == nil {
  4810. input = &PutBucketNotificationConfigurationInput{}
  4811. }
  4812. output = &PutBucketNotificationConfigurationOutput{}
  4813. req = c.newRequest(op, input, output)
  4814. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4815. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4816. return
  4817. }
  4818. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  4819. //
  4820. // Enables notifications of specified events for a bucket.
  4821. //
  4822. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4823. // with awserr.Error's Code and Message methods to get detailed information about
  4824. // the error.
  4825. //
  4826. // See the AWS API reference guide for Amazon Simple Storage Service's
  4827. // API operation PutBucketNotificationConfiguration for usage and error information.
  4828. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4829. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  4830. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4831. return out, req.Send()
  4832. }
  4833. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  4834. // the ability to pass a context and additional request options.
  4835. //
  4836. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  4837. //
  4838. // The context must be non-nil and will be used for request cancellation. If
  4839. // the context is nil a panic will occur. In the future the SDK may create
  4840. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4841. // for more information on using Contexts.
  4842. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  4843. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4844. req.SetContext(ctx)
  4845. req.ApplyOptions(opts...)
  4846. return out, req.Send()
  4847. }
  4848. const opPutBucketPolicy = "PutBucketPolicy"
  4849. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  4850. // client's request for the PutBucketPolicy operation. The "output" return
  4851. // value will be populated with the request's response once the request completes
  4852. // successfuly.
  4853. //
  4854. // Use "Send" method on the returned Request to send the API call to the service.
  4855. // the "output" return value is not valid until after Send returns without error.
  4856. //
  4857. // See PutBucketPolicy for more information on using the PutBucketPolicy
  4858. // API call, and error handling.
  4859. //
  4860. // This method is useful when you want to inject custom logic or configuration
  4861. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4862. //
  4863. //
  4864. // // Example sending a request using the PutBucketPolicyRequest method.
  4865. // req, resp := client.PutBucketPolicyRequest(params)
  4866. //
  4867. // err := req.Send()
  4868. // if err == nil { // resp is now filled
  4869. // fmt.Println(resp)
  4870. // }
  4871. //
  4872. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4873. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  4874. op := &request.Operation{
  4875. Name: opPutBucketPolicy,
  4876. HTTPMethod: "PUT",
  4877. HTTPPath: "/{Bucket}?policy",
  4878. }
  4879. if input == nil {
  4880. input = &PutBucketPolicyInput{}
  4881. }
  4882. output = &PutBucketPolicyOutput{}
  4883. req = c.newRequest(op, input, output)
  4884. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4885. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4886. return
  4887. }
  4888. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  4889. //
  4890. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  4891. // in this request completely replaces it.
  4892. //
  4893. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4894. // with awserr.Error's Code and Message methods to get detailed information about
  4895. // the error.
  4896. //
  4897. // See the AWS API reference guide for Amazon Simple Storage Service's
  4898. // API operation PutBucketPolicy for usage and error information.
  4899. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4900. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  4901. req, out := c.PutBucketPolicyRequest(input)
  4902. return out, req.Send()
  4903. }
  4904. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  4905. // the ability to pass a context and additional request options.
  4906. //
  4907. // See PutBucketPolicy for details on how to use this API operation.
  4908. //
  4909. // The context must be non-nil and will be used for request cancellation. If
  4910. // the context is nil a panic will occur. In the future the SDK may create
  4911. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4912. // for more information on using Contexts.
  4913. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  4914. req, out := c.PutBucketPolicyRequest(input)
  4915. req.SetContext(ctx)
  4916. req.ApplyOptions(opts...)
  4917. return out, req.Send()
  4918. }
  4919. const opPutBucketReplication = "PutBucketReplication"
  4920. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  4921. // client's request for the PutBucketReplication operation. The "output" return
  4922. // value will be populated with the request's response once the request completes
  4923. // successfuly.
  4924. //
  4925. // Use "Send" method on the returned Request to send the API call to the service.
  4926. // the "output" return value is not valid until after Send returns without error.
  4927. //
  4928. // See PutBucketReplication for more information on using the PutBucketReplication
  4929. // API call, and error handling.
  4930. //
  4931. // This method is useful when you want to inject custom logic or configuration
  4932. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4933. //
  4934. //
  4935. // // Example sending a request using the PutBucketReplicationRequest method.
  4936. // req, resp := client.PutBucketReplicationRequest(params)
  4937. //
  4938. // err := req.Send()
  4939. // if err == nil { // resp is now filled
  4940. // fmt.Println(resp)
  4941. // }
  4942. //
  4943. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4944. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  4945. op := &request.Operation{
  4946. Name: opPutBucketReplication,
  4947. HTTPMethod: "PUT",
  4948. HTTPPath: "/{Bucket}?replication",
  4949. }
  4950. if input == nil {
  4951. input = &PutBucketReplicationInput{}
  4952. }
  4953. output = &PutBucketReplicationOutput{}
  4954. req = c.newRequest(op, input, output)
  4955. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4956. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4957. return
  4958. }
  4959. // PutBucketReplication API operation for Amazon Simple Storage Service.
  4960. //
  4961. // Creates a new replication configuration (or replaces an existing one, if
  4962. // present).
  4963. //
  4964. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4965. // with awserr.Error's Code and Message methods to get detailed information about
  4966. // the error.
  4967. //
  4968. // See the AWS API reference guide for Amazon Simple Storage Service's
  4969. // API operation PutBucketReplication for usage and error information.
  4970. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4971. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  4972. req, out := c.PutBucketReplicationRequest(input)
  4973. return out, req.Send()
  4974. }
  4975. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  4976. // the ability to pass a context and additional request options.
  4977. //
  4978. // See PutBucketReplication for details on how to use this API operation.
  4979. //
  4980. // The context must be non-nil and will be used for request cancellation. If
  4981. // the context is nil a panic will occur. In the future the SDK may create
  4982. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4983. // for more information on using Contexts.
  4984. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  4985. req, out := c.PutBucketReplicationRequest(input)
  4986. req.SetContext(ctx)
  4987. req.ApplyOptions(opts...)
  4988. return out, req.Send()
  4989. }
  4990. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  4991. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  4992. // client's request for the PutBucketRequestPayment operation. The "output" return
  4993. // value will be populated with the request's response once the request completes
  4994. // successfuly.
  4995. //
  4996. // Use "Send" method on the returned Request to send the API call to the service.
  4997. // the "output" return value is not valid until after Send returns without error.
  4998. //
  4999. // See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
  5000. // API call, and error handling.
  5001. //
  5002. // This method is useful when you want to inject custom logic or configuration
  5003. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5004. //
  5005. //
  5006. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  5007. // req, resp := client.PutBucketRequestPaymentRequest(params)
  5008. //
  5009. // err := req.Send()
  5010. // if err == nil { // resp is now filled
  5011. // fmt.Println(resp)
  5012. // }
  5013. //
  5014. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5015. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  5016. op := &request.Operation{
  5017. Name: opPutBucketRequestPayment,
  5018. HTTPMethod: "PUT",
  5019. HTTPPath: "/{Bucket}?requestPayment",
  5020. }
  5021. if input == nil {
  5022. input = &PutBucketRequestPaymentInput{}
  5023. }
  5024. output = &PutBucketRequestPaymentOutput{}
  5025. req = c.newRequest(op, input, output)
  5026. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5027. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5028. return
  5029. }
  5030. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  5031. //
  5032. // Sets the request payment configuration for a bucket. By default, the bucket
  5033. // owner pays for downloads from the bucket. This configuration parameter enables
  5034. // the bucket owner (only) to specify that the person requesting the download
  5035. // will be charged for the download. Documentation on requester pays buckets
  5036. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  5037. //
  5038. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5039. // with awserr.Error's Code and Message methods to get detailed information about
  5040. // the error.
  5041. //
  5042. // See the AWS API reference guide for Amazon Simple Storage Service's
  5043. // API operation PutBucketRequestPayment for usage and error information.
  5044. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5045. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  5046. req, out := c.PutBucketRequestPaymentRequest(input)
  5047. return out, req.Send()
  5048. }
  5049. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  5050. // the ability to pass a context and additional request options.
  5051. //
  5052. // See PutBucketRequestPayment for details on how to use this API operation.
  5053. //
  5054. // The context must be non-nil and will be used for request cancellation. If
  5055. // the context is nil a panic will occur. In the future the SDK may create
  5056. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5057. // for more information on using Contexts.
  5058. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  5059. req, out := c.PutBucketRequestPaymentRequest(input)
  5060. req.SetContext(ctx)
  5061. req.ApplyOptions(opts...)
  5062. return out, req.Send()
  5063. }
  5064. const opPutBucketTagging = "PutBucketTagging"
  5065. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  5066. // client's request for the PutBucketTagging operation. The "output" return
  5067. // value will be populated with the request's response once the request completes
  5068. // successfuly.
  5069. //
  5070. // Use "Send" method on the returned Request to send the API call to the service.
  5071. // the "output" return value is not valid until after Send returns without error.
  5072. //
  5073. // See PutBucketTagging for more information on using the PutBucketTagging
  5074. // API call, and error handling.
  5075. //
  5076. // This method is useful when you want to inject custom logic or configuration
  5077. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5078. //
  5079. //
  5080. // // Example sending a request using the PutBucketTaggingRequest method.
  5081. // req, resp := client.PutBucketTaggingRequest(params)
  5082. //
  5083. // err := req.Send()
  5084. // if err == nil { // resp is now filled
  5085. // fmt.Println(resp)
  5086. // }
  5087. //
  5088. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5089. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  5090. op := &request.Operation{
  5091. Name: opPutBucketTagging,
  5092. HTTPMethod: "PUT",
  5093. HTTPPath: "/{Bucket}?tagging",
  5094. }
  5095. if input == nil {
  5096. input = &PutBucketTaggingInput{}
  5097. }
  5098. output = &PutBucketTaggingOutput{}
  5099. req = c.newRequest(op, input, output)
  5100. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5101. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5102. return
  5103. }
  5104. // PutBucketTagging API operation for Amazon Simple Storage Service.
  5105. //
  5106. // Sets the tags for a bucket.
  5107. //
  5108. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5109. // with awserr.Error's Code and Message methods to get detailed information about
  5110. // the error.
  5111. //
  5112. // See the AWS API reference guide for Amazon Simple Storage Service's
  5113. // API operation PutBucketTagging for usage and error information.
  5114. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5115. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  5116. req, out := c.PutBucketTaggingRequest(input)
  5117. return out, req.Send()
  5118. }
  5119. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  5120. // the ability to pass a context and additional request options.
  5121. //
  5122. // See PutBucketTagging for details on how to use this API operation.
  5123. //
  5124. // The context must be non-nil and will be used for request cancellation. If
  5125. // the context is nil a panic will occur. In the future the SDK may create
  5126. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5127. // for more information on using Contexts.
  5128. func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  5129. req, out := c.PutBucketTaggingRequest(input)
  5130. req.SetContext(ctx)
  5131. req.ApplyOptions(opts...)
  5132. return out, req.Send()
  5133. }
  5134. const opPutBucketVersioning = "PutBucketVersioning"
  5135. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  5136. // client's request for the PutBucketVersioning operation. The "output" return
  5137. // value will be populated with the request's response once the request completes
  5138. // successfuly.
  5139. //
  5140. // Use "Send" method on the returned Request to send the API call to the service.
  5141. // the "output" return value is not valid until after Send returns without error.
  5142. //
  5143. // See PutBucketVersioning for more information on using the PutBucketVersioning
  5144. // API call, and error handling.
  5145. //
  5146. // This method is useful when you want to inject custom logic or configuration
  5147. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5148. //
  5149. //
  5150. // // Example sending a request using the PutBucketVersioningRequest method.
  5151. // req, resp := client.PutBucketVersioningRequest(params)
  5152. //
  5153. // err := req.Send()
  5154. // if err == nil { // resp is now filled
  5155. // fmt.Println(resp)
  5156. // }
  5157. //
  5158. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5159. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  5160. op := &request.Operation{
  5161. Name: opPutBucketVersioning,
  5162. HTTPMethod: "PUT",
  5163. HTTPPath: "/{Bucket}?versioning",
  5164. }
  5165. if input == nil {
  5166. input = &PutBucketVersioningInput{}
  5167. }
  5168. output = &PutBucketVersioningOutput{}
  5169. req = c.newRequest(op, input, output)
  5170. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5171. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5172. return
  5173. }
  5174. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  5175. //
  5176. // Sets the versioning state of an existing bucket. To set the versioning state,
  5177. // you must be the bucket owner.
  5178. //
  5179. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5180. // with awserr.Error's Code and Message methods to get detailed information about
  5181. // the error.
  5182. //
  5183. // See the AWS API reference guide for Amazon Simple Storage Service's
  5184. // API operation PutBucketVersioning for usage and error information.
  5185. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5186. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  5187. req, out := c.PutBucketVersioningRequest(input)
  5188. return out, req.Send()
  5189. }
  5190. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  5191. // the ability to pass a context and additional request options.
  5192. //
  5193. // See PutBucketVersioning for details on how to use this API operation.
  5194. //
  5195. // The context must be non-nil and will be used for request cancellation. If
  5196. // the context is nil a panic will occur. In the future the SDK may create
  5197. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5198. // for more information on using Contexts.
  5199. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  5200. req, out := c.PutBucketVersioningRequest(input)
  5201. req.SetContext(ctx)
  5202. req.ApplyOptions(opts...)
  5203. return out, req.Send()
  5204. }
  5205. const opPutBucketWebsite = "PutBucketWebsite"
  5206. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  5207. // client's request for the PutBucketWebsite operation. The "output" return
  5208. // value will be populated with the request's response once the request completes
  5209. // successfuly.
  5210. //
  5211. // Use "Send" method on the returned Request to send the API call to the service.
  5212. // the "output" return value is not valid until after Send returns without error.
  5213. //
  5214. // See PutBucketWebsite for more information on using the PutBucketWebsite
  5215. // API call, and error handling.
  5216. //
  5217. // This method is useful when you want to inject custom logic or configuration
  5218. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5219. //
  5220. //
  5221. // // Example sending a request using the PutBucketWebsiteRequest method.
  5222. // req, resp := client.PutBucketWebsiteRequest(params)
  5223. //
  5224. // err := req.Send()
  5225. // if err == nil { // resp is now filled
  5226. // fmt.Println(resp)
  5227. // }
  5228. //
  5229. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5230. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  5231. op := &request.Operation{
  5232. Name: opPutBucketWebsite,
  5233. HTTPMethod: "PUT",
  5234. HTTPPath: "/{Bucket}?website",
  5235. }
  5236. if input == nil {
  5237. input = &PutBucketWebsiteInput{}
  5238. }
  5239. output = &PutBucketWebsiteOutput{}
  5240. req = c.newRequest(op, input, output)
  5241. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5242. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5243. return
  5244. }
  5245. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  5246. //
  5247. // Set the website configuration for a bucket.
  5248. //
  5249. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5250. // with awserr.Error's Code and Message methods to get detailed information about
  5251. // the error.
  5252. //
  5253. // See the AWS API reference guide for Amazon Simple Storage Service's
  5254. // API operation PutBucketWebsite for usage and error information.
  5255. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5256. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  5257. req, out := c.PutBucketWebsiteRequest(input)
  5258. return out, req.Send()
  5259. }
  5260. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  5261. // the ability to pass a context and additional request options.
  5262. //
  5263. // See PutBucketWebsite for details on how to use this API operation.
  5264. //
  5265. // The context must be non-nil and will be used for request cancellation. If
  5266. // the context is nil a panic will occur. In the future the SDK may create
  5267. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5268. // for more information on using Contexts.
  5269. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  5270. req, out := c.PutBucketWebsiteRequest(input)
  5271. req.SetContext(ctx)
  5272. req.ApplyOptions(opts...)
  5273. return out, req.Send()
  5274. }
  5275. const opPutObject = "PutObject"
  5276. // PutObjectRequest generates a "aws/request.Request" representing the
  5277. // client's request for the PutObject operation. The "output" return
  5278. // value will be populated with the request's response once the request completes
  5279. // successfuly.
  5280. //
  5281. // Use "Send" method on the returned Request to send the API call to the service.
  5282. // the "output" return value is not valid until after Send returns without error.
  5283. //
  5284. // See PutObject for more information on using the PutObject
  5285. // API call, and error handling.
  5286. //
  5287. // This method is useful when you want to inject custom logic or configuration
  5288. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5289. //
  5290. //
  5291. // // Example sending a request using the PutObjectRequest method.
  5292. // req, resp := client.PutObjectRequest(params)
  5293. //
  5294. // err := req.Send()
  5295. // if err == nil { // resp is now filled
  5296. // fmt.Println(resp)
  5297. // }
  5298. //
  5299. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5300. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  5301. op := &request.Operation{
  5302. Name: opPutObject,
  5303. HTTPMethod: "PUT",
  5304. HTTPPath: "/{Bucket}/{Key+}",
  5305. }
  5306. if input == nil {
  5307. input = &PutObjectInput{}
  5308. }
  5309. output = &PutObjectOutput{}
  5310. req = c.newRequest(op, input, output)
  5311. return
  5312. }
  5313. // PutObject API operation for Amazon Simple Storage Service.
  5314. //
  5315. // Adds an object to a bucket.
  5316. //
  5317. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5318. // with awserr.Error's Code and Message methods to get detailed information about
  5319. // the error.
  5320. //
  5321. // See the AWS API reference guide for Amazon Simple Storage Service's
  5322. // API operation PutObject for usage and error information.
  5323. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5324. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  5325. req, out := c.PutObjectRequest(input)
  5326. return out, req.Send()
  5327. }
  5328. // PutObjectWithContext is the same as PutObject with the addition of
  5329. // the ability to pass a context and additional request options.
  5330. //
  5331. // See PutObject for details on how to use this API operation.
  5332. //
  5333. // The context must be non-nil and will be used for request cancellation. If
  5334. // the context is nil a panic will occur. In the future the SDK may create
  5335. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5336. // for more information on using Contexts.
  5337. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  5338. req, out := c.PutObjectRequest(input)
  5339. req.SetContext(ctx)
  5340. req.ApplyOptions(opts...)
  5341. return out, req.Send()
  5342. }
  5343. const opPutObjectAcl = "PutObjectAcl"
  5344. // PutObjectAclRequest generates a "aws/request.Request" representing the
  5345. // client's request for the PutObjectAcl operation. The "output" return
  5346. // value will be populated with the request's response once the request completes
  5347. // successfuly.
  5348. //
  5349. // Use "Send" method on the returned Request to send the API call to the service.
  5350. // the "output" return value is not valid until after Send returns without error.
  5351. //
  5352. // See PutObjectAcl for more information on using the PutObjectAcl
  5353. // API call, and error handling.
  5354. //
  5355. // This method is useful when you want to inject custom logic or configuration
  5356. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5357. //
  5358. //
  5359. // // Example sending a request using the PutObjectAclRequest method.
  5360. // req, resp := client.PutObjectAclRequest(params)
  5361. //
  5362. // err := req.Send()
  5363. // if err == nil { // resp is now filled
  5364. // fmt.Println(resp)
  5365. // }
  5366. //
  5367. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5368. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  5369. op := &request.Operation{
  5370. Name: opPutObjectAcl,
  5371. HTTPMethod: "PUT",
  5372. HTTPPath: "/{Bucket}/{Key+}?acl",
  5373. }
  5374. if input == nil {
  5375. input = &PutObjectAclInput{}
  5376. }
  5377. output = &PutObjectAclOutput{}
  5378. req = c.newRequest(op, input, output)
  5379. return
  5380. }
  5381. // PutObjectAcl API operation for Amazon Simple Storage Service.
  5382. //
  5383. // uses the acl subresource to set the access control list (ACL) permissions
  5384. // for an object that already exists in a bucket
  5385. //
  5386. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5387. // with awserr.Error's Code and Message methods to get detailed information about
  5388. // the error.
  5389. //
  5390. // See the AWS API reference guide for Amazon Simple Storage Service's
  5391. // API operation PutObjectAcl for usage and error information.
  5392. //
  5393. // Returned Error Codes:
  5394. // * ErrCodeNoSuchKey "NoSuchKey"
  5395. // The specified key does not exist.
  5396. //
  5397. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5398. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  5399. req, out := c.PutObjectAclRequest(input)
  5400. return out, req.Send()
  5401. }
  5402. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  5403. // the ability to pass a context and additional request options.
  5404. //
  5405. // See PutObjectAcl for details on how to use this API operation.
  5406. //
  5407. // The context must be non-nil and will be used for request cancellation. If
  5408. // the context is nil a panic will occur. In the future the SDK may create
  5409. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5410. // for more information on using Contexts.
  5411. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  5412. req, out := c.PutObjectAclRequest(input)
  5413. req.SetContext(ctx)
  5414. req.ApplyOptions(opts...)
  5415. return out, req.Send()
  5416. }
  5417. const opPutObjectTagging = "PutObjectTagging"
  5418. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  5419. // client's request for the PutObjectTagging operation. The "output" return
  5420. // value will be populated with the request's response once the request completes
  5421. // successfuly.
  5422. //
  5423. // Use "Send" method on the returned Request to send the API call to the service.
  5424. // the "output" return value is not valid until after Send returns without error.
  5425. //
  5426. // See PutObjectTagging for more information on using the PutObjectTagging
  5427. // API call, and error handling.
  5428. //
  5429. // This method is useful when you want to inject custom logic or configuration
  5430. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5431. //
  5432. //
  5433. // // Example sending a request using the PutObjectTaggingRequest method.
  5434. // req, resp := client.PutObjectTaggingRequest(params)
  5435. //
  5436. // err := req.Send()
  5437. // if err == nil { // resp is now filled
  5438. // fmt.Println(resp)
  5439. // }
  5440. //
  5441. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5442. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  5443. op := &request.Operation{
  5444. Name: opPutObjectTagging,
  5445. HTTPMethod: "PUT",
  5446. HTTPPath: "/{Bucket}/{Key+}?tagging",
  5447. }
  5448. if input == nil {
  5449. input = &PutObjectTaggingInput{}
  5450. }
  5451. output = &PutObjectTaggingOutput{}
  5452. req = c.newRequest(op, input, output)
  5453. return
  5454. }
  5455. // PutObjectTagging API operation for Amazon Simple Storage Service.
  5456. //
  5457. // Sets the supplied tag-set to an object that already exists in a bucket
  5458. //
  5459. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5460. // with awserr.Error's Code and Message methods to get detailed information about
  5461. // the error.
  5462. //
  5463. // See the AWS API reference guide for Amazon Simple Storage Service's
  5464. // API operation PutObjectTagging for usage and error information.
  5465. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5466. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  5467. req, out := c.PutObjectTaggingRequest(input)
  5468. return out, req.Send()
  5469. }
  5470. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  5471. // the ability to pass a context and additional request options.
  5472. //
  5473. // See PutObjectTagging for details on how to use this API operation.
  5474. //
  5475. // The context must be non-nil and will be used for request cancellation. If
  5476. // the context is nil a panic will occur. In the future the SDK may create
  5477. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5478. // for more information on using Contexts.
  5479. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  5480. req, out := c.PutObjectTaggingRequest(input)
  5481. req.SetContext(ctx)
  5482. req.ApplyOptions(opts...)
  5483. return out, req.Send()
  5484. }
  5485. const opRestoreObject = "RestoreObject"
  5486. // RestoreObjectRequest generates a "aws/request.Request" representing the
  5487. // client's request for the RestoreObject operation. The "output" return
  5488. // value will be populated with the request's response once the request completes
  5489. // successfuly.
  5490. //
  5491. // Use "Send" method on the returned Request to send the API call to the service.
  5492. // the "output" return value is not valid until after Send returns without error.
  5493. //
  5494. // See RestoreObject for more information on using the RestoreObject
  5495. // API call, and error handling.
  5496. //
  5497. // This method is useful when you want to inject custom logic or configuration
  5498. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5499. //
  5500. //
  5501. // // Example sending a request using the RestoreObjectRequest method.
  5502. // req, resp := client.RestoreObjectRequest(params)
  5503. //
  5504. // err := req.Send()
  5505. // if err == nil { // resp is now filled
  5506. // fmt.Println(resp)
  5507. // }
  5508. //
  5509. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5510. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  5511. op := &request.Operation{
  5512. Name: opRestoreObject,
  5513. HTTPMethod: "POST",
  5514. HTTPPath: "/{Bucket}/{Key+}?restore",
  5515. }
  5516. if input == nil {
  5517. input = &RestoreObjectInput{}
  5518. }
  5519. output = &RestoreObjectOutput{}
  5520. req = c.newRequest(op, input, output)
  5521. return
  5522. }
  5523. // RestoreObject API operation for Amazon Simple Storage Service.
  5524. //
  5525. // Restores an archived copy of an object back into Amazon S3
  5526. //
  5527. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5528. // with awserr.Error's Code and Message methods to get detailed information about
  5529. // the error.
  5530. //
  5531. // See the AWS API reference guide for Amazon Simple Storage Service's
  5532. // API operation RestoreObject for usage and error information.
  5533. //
  5534. // Returned Error Codes:
  5535. // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  5536. // This operation is not allowed against this storage tier
  5537. //
  5538. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5539. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  5540. req, out := c.RestoreObjectRequest(input)
  5541. return out, req.Send()
  5542. }
  5543. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  5544. // the ability to pass a context and additional request options.
  5545. //
  5546. // See RestoreObject for details on how to use this API operation.
  5547. //
  5548. // The context must be non-nil and will be used for request cancellation. If
  5549. // the context is nil a panic will occur. In the future the SDK may create
  5550. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5551. // for more information on using Contexts.
  5552. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  5553. req, out := c.RestoreObjectRequest(input)
  5554. req.SetContext(ctx)
  5555. req.ApplyOptions(opts...)
  5556. return out, req.Send()
  5557. }
  5558. const opSelectObjectContent = "SelectObjectContent"
  5559. // SelectObjectContentRequest generates a "aws/request.Request" representing the
  5560. // client's request for the SelectObjectContent operation. The "output" return
  5561. // value will be populated with the request's response once the request completes
  5562. // successfuly.
  5563. //
  5564. // Use "Send" method on the returned Request to send the API call to the service.
  5565. // the "output" return value is not valid until after Send returns without error.
  5566. //
  5567. // See SelectObjectContent for more information on using the SelectObjectContent
  5568. // API call, and error handling.
  5569. //
  5570. // This method is useful when you want to inject custom logic or configuration
  5571. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5572. //
  5573. //
  5574. // // Example sending a request using the SelectObjectContentRequest method.
  5575. // req, resp := client.SelectObjectContentRequest(params)
  5576. //
  5577. // err := req.Send()
  5578. // if err == nil { // resp is now filled
  5579. // fmt.Println(resp)
  5580. // }
  5581. //
  5582. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  5583. func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) {
  5584. op := &request.Operation{
  5585. Name: opSelectObjectContent,
  5586. HTTPMethod: "POST",
  5587. HTTPPath: "/{Bucket}/{Key+}?select&select-type=2",
  5588. }
  5589. if input == nil {
  5590. input = &SelectObjectContentInput{}
  5591. }
  5592. output = &SelectObjectContentOutput{}
  5593. req = c.newRequest(op, input, output)
  5594. req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
  5595. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler)
  5596. req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop)
  5597. return
  5598. }
  5599. // SelectObjectContent API operation for Amazon Simple Storage Service.
  5600. //
  5601. // This operation filters the contents of an Amazon S3 object based on a simple
  5602. // Structured Query Language (SQL) statement. In the request, along with the
  5603. // SQL expression, you must also specify a data serialization format (JSON or
  5604. // CSV) of the object. Amazon S3 uses this to parse object data into records,
  5605. // and returns only records that match the specified SQL expression. You must
  5606. // also specify the data serialization format for the response.
  5607. //
  5608. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5609. // with awserr.Error's Code and Message methods to get detailed information about
  5610. // the error.
  5611. //
  5612. // See the AWS API reference guide for Amazon Simple Storage Service's
  5613. // API operation SelectObjectContent for usage and error information.
  5614. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  5615. func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) {
  5616. req, out := c.SelectObjectContentRequest(input)
  5617. return out, req.Send()
  5618. }
  5619. // SelectObjectContentWithContext is the same as SelectObjectContent with the addition of
  5620. // the ability to pass a context and additional request options.
  5621. //
  5622. // See SelectObjectContent for details on how to use this API operation.
  5623. //
  5624. // The context must be non-nil and will be used for request cancellation. If
  5625. // the context is nil a panic will occur. In the future the SDK may create
  5626. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5627. // for more information on using Contexts.
  5628. func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) {
  5629. req, out := c.SelectObjectContentRequest(input)
  5630. req.SetContext(ctx)
  5631. req.ApplyOptions(opts...)
  5632. return out, req.Send()
  5633. }
  5634. const opUploadPart = "UploadPart"
  5635. // UploadPartRequest generates a "aws/request.Request" representing the
  5636. // client's request for the UploadPart operation. The "output" return
  5637. // value will be populated with the request's response once the request completes
  5638. // successfuly.
  5639. //
  5640. // Use "Send" method on the returned Request to send the API call to the service.
  5641. // the "output" return value is not valid until after Send returns without error.
  5642. //
  5643. // See UploadPart for more information on using the UploadPart
  5644. // API call, and error handling.
  5645. //
  5646. // This method is useful when you want to inject custom logic or configuration
  5647. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5648. //
  5649. //
  5650. // // Example sending a request using the UploadPartRequest method.
  5651. // req, resp := client.UploadPartRequest(params)
  5652. //
  5653. // err := req.Send()
  5654. // if err == nil { // resp is now filled
  5655. // fmt.Println(resp)
  5656. // }
  5657. //
  5658. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5659. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  5660. op := &request.Operation{
  5661. Name: opUploadPart,
  5662. HTTPMethod: "PUT",
  5663. HTTPPath: "/{Bucket}/{Key+}",
  5664. }
  5665. if input == nil {
  5666. input = &UploadPartInput{}
  5667. }
  5668. output = &UploadPartOutput{}
  5669. req = c.newRequest(op, input, output)
  5670. return
  5671. }
  5672. // UploadPart API operation for Amazon Simple Storage Service.
  5673. //
  5674. // Uploads a part in a multipart upload.
  5675. //
  5676. // Note: After you initiate multipart upload and upload one or more parts, you
  5677. // must either complete or abort multipart upload in order to stop getting charged
  5678. // for storage of the uploaded parts. Only after you either complete or abort
  5679. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  5680. // you for the parts storage.
  5681. //
  5682. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5683. // with awserr.Error's Code and Message methods to get detailed information about
  5684. // the error.
  5685. //
  5686. // See the AWS API reference guide for Amazon Simple Storage Service's
  5687. // API operation UploadPart for usage and error information.
  5688. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5689. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  5690. req, out := c.UploadPartRequest(input)
  5691. return out, req.Send()
  5692. }
  5693. // UploadPartWithContext is the same as UploadPart with the addition of
  5694. // the ability to pass a context and additional request options.
  5695. //
  5696. // See UploadPart for details on how to use this API operation.
  5697. //
  5698. // The context must be non-nil and will be used for request cancellation. If
  5699. // the context is nil a panic will occur. In the future the SDK may create
  5700. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5701. // for more information on using Contexts.
  5702. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  5703. req, out := c.UploadPartRequest(input)
  5704. req.SetContext(ctx)
  5705. req.ApplyOptions(opts...)
  5706. return out, req.Send()
  5707. }
  5708. const opUploadPartCopy = "UploadPartCopy"
  5709. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  5710. // client's request for the UploadPartCopy operation. The "output" return
  5711. // value will be populated with the request's response once the request completes
  5712. // successfuly.
  5713. //
  5714. // Use "Send" method on the returned Request to send the API call to the service.
  5715. // the "output" return value is not valid until after Send returns without error.
  5716. //
  5717. // See UploadPartCopy for more information on using the UploadPartCopy
  5718. // API call, and error handling.
  5719. //
  5720. // This method is useful when you want to inject custom logic or configuration
  5721. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5722. //
  5723. //
  5724. // // Example sending a request using the UploadPartCopyRequest method.
  5725. // req, resp := client.UploadPartCopyRequest(params)
  5726. //
  5727. // err := req.Send()
  5728. // if err == nil { // resp is now filled
  5729. // fmt.Println(resp)
  5730. // }
  5731. //
  5732. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5733. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  5734. op := &request.Operation{
  5735. Name: opUploadPartCopy,
  5736. HTTPMethod: "PUT",
  5737. HTTPPath: "/{Bucket}/{Key+}",
  5738. }
  5739. if input == nil {
  5740. input = &UploadPartCopyInput{}
  5741. }
  5742. output = &UploadPartCopyOutput{}
  5743. req = c.newRequest(op, input, output)
  5744. return
  5745. }
  5746. // UploadPartCopy API operation for Amazon Simple Storage Service.
  5747. //
  5748. // Uploads a part by copying data from an existing object as data source.
  5749. //
  5750. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5751. // with awserr.Error's Code and Message methods to get detailed information about
  5752. // the error.
  5753. //
  5754. // See the AWS API reference guide for Amazon Simple Storage Service's
  5755. // API operation UploadPartCopy for usage and error information.
  5756. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5757. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  5758. req, out := c.UploadPartCopyRequest(input)
  5759. return out, req.Send()
  5760. }
  5761. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  5762. // the ability to pass a context and additional request options.
  5763. //
  5764. // See UploadPartCopy for details on how to use this API operation.
  5765. //
  5766. // The context must be non-nil and will be used for request cancellation. If
  5767. // the context is nil a panic will occur. In the future the SDK may create
  5768. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5769. // for more information on using Contexts.
  5770. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  5771. req, out := c.UploadPartCopyRequest(input)
  5772. req.SetContext(ctx)
  5773. req.ApplyOptions(opts...)
  5774. return out, req.Send()
  5775. }
  5776. // Specifies the days since the initiation of an Incomplete Multipart Upload
  5777. // that Lifecycle will wait before permanently removing all parts of the upload.
  5778. type AbortIncompleteMultipartUpload struct {
  5779. _ struct{} `type:"structure"`
  5780. // Indicates the number of days that must pass since initiation for Lifecycle
  5781. // to abort an Incomplete Multipart Upload.
  5782. DaysAfterInitiation *int64 `type:"integer"`
  5783. }
  5784. // String returns the string representation
  5785. func (s AbortIncompleteMultipartUpload) String() string {
  5786. return awsutil.Prettify(s)
  5787. }
  5788. // GoString returns the string representation
  5789. func (s AbortIncompleteMultipartUpload) GoString() string {
  5790. return s.String()
  5791. }
  5792. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  5793. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  5794. s.DaysAfterInitiation = &v
  5795. return s
  5796. }
  5797. type AbortMultipartUploadInput struct {
  5798. _ struct{} `type:"structure"`
  5799. // Bucket is a required field
  5800. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5801. // Key is a required field
  5802. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5803. // Confirms that the requester knows that she or he will be charged for the
  5804. // request. Bucket owners need not specify this parameter in their requests.
  5805. // Documentation on downloading objects from requester pays buckets can be found
  5806. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5807. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5808. // UploadId is a required field
  5809. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  5810. }
  5811. // String returns the string representation
  5812. func (s AbortMultipartUploadInput) String() string {
  5813. return awsutil.Prettify(s)
  5814. }
  5815. // GoString returns the string representation
  5816. func (s AbortMultipartUploadInput) GoString() string {
  5817. return s.String()
  5818. }
  5819. // Validate inspects the fields of the type to determine if they are valid.
  5820. func (s *AbortMultipartUploadInput) Validate() error {
  5821. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  5822. if s.Bucket == nil {
  5823. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5824. }
  5825. if s.Key == nil {
  5826. invalidParams.Add(request.NewErrParamRequired("Key"))
  5827. }
  5828. if s.Key != nil && len(*s.Key) < 1 {
  5829. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5830. }
  5831. if s.UploadId == nil {
  5832. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  5833. }
  5834. if invalidParams.Len() > 0 {
  5835. return invalidParams
  5836. }
  5837. return nil
  5838. }
  5839. // SetBucket sets the Bucket field's value.
  5840. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  5841. s.Bucket = &v
  5842. return s
  5843. }
  5844. func (s *AbortMultipartUploadInput) getBucket() (v string) {
  5845. if s.Bucket == nil {
  5846. return v
  5847. }
  5848. return *s.Bucket
  5849. }
  5850. // SetKey sets the Key field's value.
  5851. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  5852. s.Key = &v
  5853. return s
  5854. }
  5855. // SetRequestPayer sets the RequestPayer field's value.
  5856. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  5857. s.RequestPayer = &v
  5858. return s
  5859. }
  5860. // SetUploadId sets the UploadId field's value.
  5861. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  5862. s.UploadId = &v
  5863. return s
  5864. }
  5865. type AbortMultipartUploadOutput struct {
  5866. _ struct{} `type:"structure"`
  5867. // If present, indicates that the requester was successfully charged for the
  5868. // request.
  5869. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5870. }
  5871. // String returns the string representation
  5872. func (s AbortMultipartUploadOutput) String() string {
  5873. return awsutil.Prettify(s)
  5874. }
  5875. // GoString returns the string representation
  5876. func (s AbortMultipartUploadOutput) GoString() string {
  5877. return s.String()
  5878. }
  5879. // SetRequestCharged sets the RequestCharged field's value.
  5880. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  5881. s.RequestCharged = &v
  5882. return s
  5883. }
  5884. type AccelerateConfiguration struct {
  5885. _ struct{} `type:"structure"`
  5886. // The accelerate configuration of the bucket.
  5887. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  5888. }
  5889. // String returns the string representation
  5890. func (s AccelerateConfiguration) String() string {
  5891. return awsutil.Prettify(s)
  5892. }
  5893. // GoString returns the string representation
  5894. func (s AccelerateConfiguration) GoString() string {
  5895. return s.String()
  5896. }
  5897. // SetStatus sets the Status field's value.
  5898. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  5899. s.Status = &v
  5900. return s
  5901. }
  5902. type AccessControlPolicy struct {
  5903. _ struct{} `type:"structure"`
  5904. // A list of grants.
  5905. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  5906. Owner *Owner `type:"structure"`
  5907. }
  5908. // String returns the string representation
  5909. func (s AccessControlPolicy) String() string {
  5910. return awsutil.Prettify(s)
  5911. }
  5912. // GoString returns the string representation
  5913. func (s AccessControlPolicy) GoString() string {
  5914. return s.String()
  5915. }
  5916. // Validate inspects the fields of the type to determine if they are valid.
  5917. func (s *AccessControlPolicy) Validate() error {
  5918. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  5919. if s.Grants != nil {
  5920. for i, v := range s.Grants {
  5921. if v == nil {
  5922. continue
  5923. }
  5924. if err := v.Validate(); err != nil {
  5925. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  5926. }
  5927. }
  5928. }
  5929. if invalidParams.Len() > 0 {
  5930. return invalidParams
  5931. }
  5932. return nil
  5933. }
  5934. // SetGrants sets the Grants field's value.
  5935. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  5936. s.Grants = v
  5937. return s
  5938. }
  5939. // SetOwner sets the Owner field's value.
  5940. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  5941. s.Owner = v
  5942. return s
  5943. }
  5944. // Container for information regarding the access control for replicas.
  5945. type AccessControlTranslation struct {
  5946. _ struct{} `type:"structure"`
  5947. // The override value for the owner of the replica object.
  5948. //
  5949. // Owner is a required field
  5950. Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
  5951. }
  5952. // String returns the string representation
  5953. func (s AccessControlTranslation) String() string {
  5954. return awsutil.Prettify(s)
  5955. }
  5956. // GoString returns the string representation
  5957. func (s AccessControlTranslation) GoString() string {
  5958. return s.String()
  5959. }
  5960. // Validate inspects the fields of the type to determine if they are valid.
  5961. func (s *AccessControlTranslation) Validate() error {
  5962. invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
  5963. if s.Owner == nil {
  5964. invalidParams.Add(request.NewErrParamRequired("Owner"))
  5965. }
  5966. if invalidParams.Len() > 0 {
  5967. return invalidParams
  5968. }
  5969. return nil
  5970. }
  5971. // SetOwner sets the Owner field's value.
  5972. func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
  5973. s.Owner = &v
  5974. return s
  5975. }
  5976. type AnalyticsAndOperator struct {
  5977. _ struct{} `type:"structure"`
  5978. // The prefix to use when evaluating an AND predicate.
  5979. Prefix *string `type:"string"`
  5980. // The list of tags to use when evaluating an AND predicate.
  5981. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  5982. }
  5983. // String returns the string representation
  5984. func (s AnalyticsAndOperator) String() string {
  5985. return awsutil.Prettify(s)
  5986. }
  5987. // GoString returns the string representation
  5988. func (s AnalyticsAndOperator) GoString() string {
  5989. return s.String()
  5990. }
  5991. // Validate inspects the fields of the type to determine if they are valid.
  5992. func (s *AnalyticsAndOperator) Validate() error {
  5993. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  5994. if s.Tags != nil {
  5995. for i, v := range s.Tags {
  5996. if v == nil {
  5997. continue
  5998. }
  5999. if err := v.Validate(); err != nil {
  6000. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6001. }
  6002. }
  6003. }
  6004. if invalidParams.Len() > 0 {
  6005. return invalidParams
  6006. }
  6007. return nil
  6008. }
  6009. // SetPrefix sets the Prefix field's value.
  6010. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  6011. s.Prefix = &v
  6012. return s
  6013. }
  6014. // SetTags sets the Tags field's value.
  6015. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  6016. s.Tags = v
  6017. return s
  6018. }
  6019. type AnalyticsConfiguration struct {
  6020. _ struct{} `type:"structure"`
  6021. // The filter used to describe a set of objects for analyses. A filter must
  6022. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  6023. // If no filter is provided, all objects will be considered in any analysis.
  6024. Filter *AnalyticsFilter `type:"structure"`
  6025. // The identifier used to represent an analytics configuration.
  6026. //
  6027. // Id is a required field
  6028. Id *string `type:"string" required:"true"`
  6029. // If present, it indicates that data related to access patterns will be collected
  6030. // and made available to analyze the tradeoffs between different storage classes.
  6031. //
  6032. // StorageClassAnalysis is a required field
  6033. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  6034. }
  6035. // String returns the string representation
  6036. func (s AnalyticsConfiguration) String() string {
  6037. return awsutil.Prettify(s)
  6038. }
  6039. // GoString returns the string representation
  6040. func (s AnalyticsConfiguration) GoString() string {
  6041. return s.String()
  6042. }
  6043. // Validate inspects the fields of the type to determine if they are valid.
  6044. func (s *AnalyticsConfiguration) Validate() error {
  6045. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  6046. if s.Id == nil {
  6047. invalidParams.Add(request.NewErrParamRequired("Id"))
  6048. }
  6049. if s.StorageClassAnalysis == nil {
  6050. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  6051. }
  6052. if s.Filter != nil {
  6053. if err := s.Filter.Validate(); err != nil {
  6054. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  6055. }
  6056. }
  6057. if s.StorageClassAnalysis != nil {
  6058. if err := s.StorageClassAnalysis.Validate(); err != nil {
  6059. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  6060. }
  6061. }
  6062. if invalidParams.Len() > 0 {
  6063. return invalidParams
  6064. }
  6065. return nil
  6066. }
  6067. // SetFilter sets the Filter field's value.
  6068. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  6069. s.Filter = v
  6070. return s
  6071. }
  6072. // SetId sets the Id field's value.
  6073. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  6074. s.Id = &v
  6075. return s
  6076. }
  6077. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  6078. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  6079. s.StorageClassAnalysis = v
  6080. return s
  6081. }
  6082. type AnalyticsExportDestination struct {
  6083. _ struct{} `type:"structure"`
  6084. // A destination signifying output to an S3 bucket.
  6085. //
  6086. // S3BucketDestination is a required field
  6087. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  6088. }
  6089. // String returns the string representation
  6090. func (s AnalyticsExportDestination) String() string {
  6091. return awsutil.Prettify(s)
  6092. }
  6093. // GoString returns the string representation
  6094. func (s AnalyticsExportDestination) GoString() string {
  6095. return s.String()
  6096. }
  6097. // Validate inspects the fields of the type to determine if they are valid.
  6098. func (s *AnalyticsExportDestination) Validate() error {
  6099. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  6100. if s.S3BucketDestination == nil {
  6101. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  6102. }
  6103. if s.S3BucketDestination != nil {
  6104. if err := s.S3BucketDestination.Validate(); err != nil {
  6105. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  6106. }
  6107. }
  6108. if invalidParams.Len() > 0 {
  6109. return invalidParams
  6110. }
  6111. return nil
  6112. }
  6113. // SetS3BucketDestination sets the S3BucketDestination field's value.
  6114. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  6115. s.S3BucketDestination = v
  6116. return s
  6117. }
  6118. type AnalyticsFilter struct {
  6119. _ struct{} `type:"structure"`
  6120. // A conjunction (logical AND) of predicates, which is used in evaluating an
  6121. // analytics filter. The operator must have at least two predicates.
  6122. And *AnalyticsAndOperator `type:"structure"`
  6123. // The prefix to use when evaluating an analytics filter.
  6124. Prefix *string `type:"string"`
  6125. // The tag to use when evaluating an analytics filter.
  6126. Tag *Tag `type:"structure"`
  6127. }
  6128. // String returns the string representation
  6129. func (s AnalyticsFilter) String() string {
  6130. return awsutil.Prettify(s)
  6131. }
  6132. // GoString returns the string representation
  6133. func (s AnalyticsFilter) GoString() string {
  6134. return s.String()
  6135. }
  6136. // Validate inspects the fields of the type to determine if they are valid.
  6137. func (s *AnalyticsFilter) Validate() error {
  6138. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  6139. if s.And != nil {
  6140. if err := s.And.Validate(); err != nil {
  6141. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  6142. }
  6143. }
  6144. if s.Tag != nil {
  6145. if err := s.Tag.Validate(); err != nil {
  6146. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  6147. }
  6148. }
  6149. if invalidParams.Len() > 0 {
  6150. return invalidParams
  6151. }
  6152. return nil
  6153. }
  6154. // SetAnd sets the And field's value.
  6155. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  6156. s.And = v
  6157. return s
  6158. }
  6159. // SetPrefix sets the Prefix field's value.
  6160. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  6161. s.Prefix = &v
  6162. return s
  6163. }
  6164. // SetTag sets the Tag field's value.
  6165. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  6166. s.Tag = v
  6167. return s
  6168. }
  6169. type AnalyticsS3BucketDestination struct {
  6170. _ struct{} `type:"structure"`
  6171. // The Amazon resource name (ARN) of the bucket to which data is exported.
  6172. //
  6173. // Bucket is a required field
  6174. Bucket *string `type:"string" required:"true"`
  6175. // The account ID that owns the destination bucket. If no account ID is provided,
  6176. // the owner will not be validated prior to exporting data.
  6177. BucketAccountId *string `type:"string"`
  6178. // The file format used when exporting data to Amazon S3.
  6179. //
  6180. // Format is a required field
  6181. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  6182. // The prefix to use when exporting data. The exported data begins with this
  6183. // prefix.
  6184. Prefix *string `type:"string"`
  6185. }
  6186. // String returns the string representation
  6187. func (s AnalyticsS3BucketDestination) String() string {
  6188. return awsutil.Prettify(s)
  6189. }
  6190. // GoString returns the string representation
  6191. func (s AnalyticsS3BucketDestination) GoString() string {
  6192. return s.String()
  6193. }
  6194. // Validate inspects the fields of the type to determine if they are valid.
  6195. func (s *AnalyticsS3BucketDestination) Validate() error {
  6196. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  6197. if s.Bucket == nil {
  6198. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6199. }
  6200. if s.Format == nil {
  6201. invalidParams.Add(request.NewErrParamRequired("Format"))
  6202. }
  6203. if invalidParams.Len() > 0 {
  6204. return invalidParams
  6205. }
  6206. return nil
  6207. }
  6208. // SetBucket sets the Bucket field's value.
  6209. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  6210. s.Bucket = &v
  6211. return s
  6212. }
  6213. func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
  6214. if s.Bucket == nil {
  6215. return v
  6216. }
  6217. return *s.Bucket
  6218. }
  6219. // SetBucketAccountId sets the BucketAccountId field's value.
  6220. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  6221. s.BucketAccountId = &v
  6222. return s
  6223. }
  6224. // SetFormat sets the Format field's value.
  6225. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  6226. s.Format = &v
  6227. return s
  6228. }
  6229. // SetPrefix sets the Prefix field's value.
  6230. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  6231. s.Prefix = &v
  6232. return s
  6233. }
  6234. type Bucket struct {
  6235. _ struct{} `type:"structure"`
  6236. // Date the bucket was created.
  6237. CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6238. // The name of the bucket.
  6239. Name *string `type:"string"`
  6240. }
  6241. // String returns the string representation
  6242. func (s Bucket) String() string {
  6243. return awsutil.Prettify(s)
  6244. }
  6245. // GoString returns the string representation
  6246. func (s Bucket) GoString() string {
  6247. return s.String()
  6248. }
  6249. // SetCreationDate sets the CreationDate field's value.
  6250. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  6251. s.CreationDate = &v
  6252. return s
  6253. }
  6254. // SetName sets the Name field's value.
  6255. func (s *Bucket) SetName(v string) *Bucket {
  6256. s.Name = &v
  6257. return s
  6258. }
  6259. type BucketLifecycleConfiguration struct {
  6260. _ struct{} `type:"structure"`
  6261. // Rules is a required field
  6262. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  6263. }
  6264. // String returns the string representation
  6265. func (s BucketLifecycleConfiguration) String() string {
  6266. return awsutil.Prettify(s)
  6267. }
  6268. // GoString returns the string representation
  6269. func (s BucketLifecycleConfiguration) GoString() string {
  6270. return s.String()
  6271. }
  6272. // Validate inspects the fields of the type to determine if they are valid.
  6273. func (s *BucketLifecycleConfiguration) Validate() error {
  6274. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  6275. if s.Rules == nil {
  6276. invalidParams.Add(request.NewErrParamRequired("Rules"))
  6277. }
  6278. if s.Rules != nil {
  6279. for i, v := range s.Rules {
  6280. if v == nil {
  6281. continue
  6282. }
  6283. if err := v.Validate(); err != nil {
  6284. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  6285. }
  6286. }
  6287. }
  6288. if invalidParams.Len() > 0 {
  6289. return invalidParams
  6290. }
  6291. return nil
  6292. }
  6293. // SetRules sets the Rules field's value.
  6294. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  6295. s.Rules = v
  6296. return s
  6297. }
  6298. type BucketLoggingStatus struct {
  6299. _ struct{} `type:"structure"`
  6300. // Container for logging information. Presence of this element indicates that
  6301. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  6302. // in this case.
  6303. LoggingEnabled *LoggingEnabled `type:"structure"`
  6304. }
  6305. // String returns the string representation
  6306. func (s BucketLoggingStatus) String() string {
  6307. return awsutil.Prettify(s)
  6308. }
  6309. // GoString returns the string representation
  6310. func (s BucketLoggingStatus) GoString() string {
  6311. return s.String()
  6312. }
  6313. // Validate inspects the fields of the type to determine if they are valid.
  6314. func (s *BucketLoggingStatus) Validate() error {
  6315. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  6316. if s.LoggingEnabled != nil {
  6317. if err := s.LoggingEnabled.Validate(); err != nil {
  6318. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  6319. }
  6320. }
  6321. if invalidParams.Len() > 0 {
  6322. return invalidParams
  6323. }
  6324. return nil
  6325. }
  6326. // SetLoggingEnabled sets the LoggingEnabled field's value.
  6327. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  6328. s.LoggingEnabled = v
  6329. return s
  6330. }
  6331. type CORSConfiguration struct {
  6332. _ struct{} `type:"structure"`
  6333. // CORSRules is a required field
  6334. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  6335. }
  6336. // String returns the string representation
  6337. func (s CORSConfiguration) String() string {
  6338. return awsutil.Prettify(s)
  6339. }
  6340. // GoString returns the string representation
  6341. func (s CORSConfiguration) GoString() string {
  6342. return s.String()
  6343. }
  6344. // Validate inspects the fields of the type to determine if they are valid.
  6345. func (s *CORSConfiguration) Validate() error {
  6346. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  6347. if s.CORSRules == nil {
  6348. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  6349. }
  6350. if s.CORSRules != nil {
  6351. for i, v := range s.CORSRules {
  6352. if v == nil {
  6353. continue
  6354. }
  6355. if err := v.Validate(); err != nil {
  6356. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  6357. }
  6358. }
  6359. }
  6360. if invalidParams.Len() > 0 {
  6361. return invalidParams
  6362. }
  6363. return nil
  6364. }
  6365. // SetCORSRules sets the CORSRules field's value.
  6366. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  6367. s.CORSRules = v
  6368. return s
  6369. }
  6370. type CORSRule struct {
  6371. _ struct{} `type:"structure"`
  6372. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  6373. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  6374. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  6375. // to execute.
  6376. //
  6377. // AllowedMethods is a required field
  6378. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  6379. // One or more origins you want customers to be able to access the bucket from.
  6380. //
  6381. // AllowedOrigins is a required field
  6382. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  6383. // One or more headers in the response that you want customers to be able to
  6384. // access from their applications (for example, from a JavaScript XMLHttpRequest
  6385. // object).
  6386. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  6387. // The time in seconds that your browser is to cache the preflight response
  6388. // for the specified resource.
  6389. MaxAgeSeconds *int64 `type:"integer"`
  6390. }
  6391. // String returns the string representation
  6392. func (s CORSRule) String() string {
  6393. return awsutil.Prettify(s)
  6394. }
  6395. // GoString returns the string representation
  6396. func (s CORSRule) GoString() string {
  6397. return s.String()
  6398. }
  6399. // Validate inspects the fields of the type to determine if they are valid.
  6400. func (s *CORSRule) Validate() error {
  6401. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  6402. if s.AllowedMethods == nil {
  6403. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  6404. }
  6405. if s.AllowedOrigins == nil {
  6406. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  6407. }
  6408. if invalidParams.Len() > 0 {
  6409. return invalidParams
  6410. }
  6411. return nil
  6412. }
  6413. // SetAllowedHeaders sets the AllowedHeaders field's value.
  6414. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  6415. s.AllowedHeaders = v
  6416. return s
  6417. }
  6418. // SetAllowedMethods sets the AllowedMethods field's value.
  6419. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  6420. s.AllowedMethods = v
  6421. return s
  6422. }
  6423. // SetAllowedOrigins sets the AllowedOrigins field's value.
  6424. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  6425. s.AllowedOrigins = v
  6426. return s
  6427. }
  6428. // SetExposeHeaders sets the ExposeHeaders field's value.
  6429. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  6430. s.ExposeHeaders = v
  6431. return s
  6432. }
  6433. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  6434. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  6435. s.MaxAgeSeconds = &v
  6436. return s
  6437. }
  6438. // Describes how a CSV-formatted input object is formatted.
  6439. type CSVInput struct {
  6440. _ struct{} `type:"structure"`
  6441. // Single character used to indicate a row should be ignored when present at
  6442. // the start of a row.
  6443. Comments *string `type:"string"`
  6444. // Value used to separate individual fields in a record.
  6445. FieldDelimiter *string `type:"string"`
  6446. // Describes the first line of input. Valid values: None, Ignore, Use.
  6447. FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
  6448. // Value used for escaping where the field delimiter is part of the value.
  6449. QuoteCharacter *string `type:"string"`
  6450. // Single character used for escaping the quote character inside an already
  6451. // escaped value.
  6452. QuoteEscapeCharacter *string `type:"string"`
  6453. // Value used to separate individual records.
  6454. RecordDelimiter *string `type:"string"`
  6455. }
  6456. // String returns the string representation
  6457. func (s CSVInput) String() string {
  6458. return awsutil.Prettify(s)
  6459. }
  6460. // GoString returns the string representation
  6461. func (s CSVInput) GoString() string {
  6462. return s.String()
  6463. }
  6464. // SetComments sets the Comments field's value.
  6465. func (s *CSVInput) SetComments(v string) *CSVInput {
  6466. s.Comments = &v
  6467. return s
  6468. }
  6469. // SetFieldDelimiter sets the FieldDelimiter field's value.
  6470. func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
  6471. s.FieldDelimiter = &v
  6472. return s
  6473. }
  6474. // SetFileHeaderInfo sets the FileHeaderInfo field's value.
  6475. func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
  6476. s.FileHeaderInfo = &v
  6477. return s
  6478. }
  6479. // SetQuoteCharacter sets the QuoteCharacter field's value.
  6480. func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
  6481. s.QuoteCharacter = &v
  6482. return s
  6483. }
  6484. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  6485. func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
  6486. s.QuoteEscapeCharacter = &v
  6487. return s
  6488. }
  6489. // SetRecordDelimiter sets the RecordDelimiter field's value.
  6490. func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
  6491. s.RecordDelimiter = &v
  6492. return s
  6493. }
  6494. // Describes how CSV-formatted results are formatted.
  6495. type CSVOutput struct {
  6496. _ struct{} `type:"structure"`
  6497. // Value used to separate individual fields in a record.
  6498. FieldDelimiter *string `type:"string"`
  6499. // Value used for escaping where the field delimiter is part of the value.
  6500. QuoteCharacter *string `type:"string"`
  6501. // Single character used for escaping the quote character inside an already
  6502. // escaped value.
  6503. QuoteEscapeCharacter *string `type:"string"`
  6504. // Indicates whether or not all output fields should be quoted.
  6505. QuoteFields *string `type:"string" enum:"QuoteFields"`
  6506. // Value used to separate individual records.
  6507. RecordDelimiter *string `type:"string"`
  6508. }
  6509. // String returns the string representation
  6510. func (s CSVOutput) String() string {
  6511. return awsutil.Prettify(s)
  6512. }
  6513. // GoString returns the string representation
  6514. func (s CSVOutput) GoString() string {
  6515. return s.String()
  6516. }
  6517. // SetFieldDelimiter sets the FieldDelimiter field's value.
  6518. func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
  6519. s.FieldDelimiter = &v
  6520. return s
  6521. }
  6522. // SetQuoteCharacter sets the QuoteCharacter field's value.
  6523. func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
  6524. s.QuoteCharacter = &v
  6525. return s
  6526. }
  6527. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  6528. func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
  6529. s.QuoteEscapeCharacter = &v
  6530. return s
  6531. }
  6532. // SetQuoteFields sets the QuoteFields field's value.
  6533. func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
  6534. s.QuoteFields = &v
  6535. return s
  6536. }
  6537. // SetRecordDelimiter sets the RecordDelimiter field's value.
  6538. func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
  6539. s.RecordDelimiter = &v
  6540. return s
  6541. }
  6542. type CloudFunctionConfiguration struct {
  6543. _ struct{} `type:"structure"`
  6544. CloudFunction *string `type:"string"`
  6545. // Bucket event for which to send notifications.
  6546. Event *string `deprecated:"true" type:"string" enum:"Event"`
  6547. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  6548. // Optional unique identifier for configurations in a notification configuration.
  6549. // If you don't provide one, Amazon S3 will assign an ID.
  6550. Id *string `type:"string"`
  6551. InvocationRole *string `type:"string"`
  6552. }
  6553. // String returns the string representation
  6554. func (s CloudFunctionConfiguration) String() string {
  6555. return awsutil.Prettify(s)
  6556. }
  6557. // GoString returns the string representation
  6558. func (s CloudFunctionConfiguration) GoString() string {
  6559. return s.String()
  6560. }
  6561. // SetCloudFunction sets the CloudFunction field's value.
  6562. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  6563. s.CloudFunction = &v
  6564. return s
  6565. }
  6566. // SetEvent sets the Event field's value.
  6567. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  6568. s.Event = &v
  6569. return s
  6570. }
  6571. // SetEvents sets the Events field's value.
  6572. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  6573. s.Events = v
  6574. return s
  6575. }
  6576. // SetId sets the Id field's value.
  6577. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  6578. s.Id = &v
  6579. return s
  6580. }
  6581. // SetInvocationRole sets the InvocationRole field's value.
  6582. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  6583. s.InvocationRole = &v
  6584. return s
  6585. }
  6586. type CommonPrefix struct {
  6587. _ struct{} `type:"structure"`
  6588. Prefix *string `type:"string"`
  6589. }
  6590. // String returns the string representation
  6591. func (s CommonPrefix) String() string {
  6592. return awsutil.Prettify(s)
  6593. }
  6594. // GoString returns the string representation
  6595. func (s CommonPrefix) GoString() string {
  6596. return s.String()
  6597. }
  6598. // SetPrefix sets the Prefix field's value.
  6599. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  6600. s.Prefix = &v
  6601. return s
  6602. }
  6603. type CompleteMultipartUploadInput struct {
  6604. _ struct{} `type:"structure" payload:"MultipartUpload"`
  6605. // Bucket is a required field
  6606. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6607. // Key is a required field
  6608. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6609. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  6610. // Confirms that the requester knows that she or he will be charged for the
  6611. // request. Bucket owners need not specify this parameter in their requests.
  6612. // Documentation on downloading objects from requester pays buckets can be found
  6613. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6614. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6615. // UploadId is a required field
  6616. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6617. }
  6618. // String returns the string representation
  6619. func (s CompleteMultipartUploadInput) String() string {
  6620. return awsutil.Prettify(s)
  6621. }
  6622. // GoString returns the string representation
  6623. func (s CompleteMultipartUploadInput) GoString() string {
  6624. return s.String()
  6625. }
  6626. // Validate inspects the fields of the type to determine if they are valid.
  6627. func (s *CompleteMultipartUploadInput) Validate() error {
  6628. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  6629. if s.Bucket == nil {
  6630. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6631. }
  6632. if s.Key == nil {
  6633. invalidParams.Add(request.NewErrParamRequired("Key"))
  6634. }
  6635. if s.Key != nil && len(*s.Key) < 1 {
  6636. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6637. }
  6638. if s.UploadId == nil {
  6639. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6640. }
  6641. if invalidParams.Len() > 0 {
  6642. return invalidParams
  6643. }
  6644. return nil
  6645. }
  6646. // SetBucket sets the Bucket field's value.
  6647. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  6648. s.Bucket = &v
  6649. return s
  6650. }
  6651. func (s *CompleteMultipartUploadInput) getBucket() (v string) {
  6652. if s.Bucket == nil {
  6653. return v
  6654. }
  6655. return *s.Bucket
  6656. }
  6657. // SetKey sets the Key field's value.
  6658. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  6659. s.Key = &v
  6660. return s
  6661. }
  6662. // SetMultipartUpload sets the MultipartUpload field's value.
  6663. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  6664. s.MultipartUpload = v
  6665. return s
  6666. }
  6667. // SetRequestPayer sets the RequestPayer field's value.
  6668. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  6669. s.RequestPayer = &v
  6670. return s
  6671. }
  6672. // SetUploadId sets the UploadId field's value.
  6673. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  6674. s.UploadId = &v
  6675. return s
  6676. }
  6677. type CompleteMultipartUploadOutput struct {
  6678. _ struct{} `type:"structure"`
  6679. Bucket *string `type:"string"`
  6680. // Entity tag of the object.
  6681. ETag *string `type:"string"`
  6682. // If the object expiration is configured, this will contain the expiration
  6683. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  6684. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  6685. Key *string `min:"1" type:"string"`
  6686. Location *string `type:"string"`
  6687. // If present, indicates that the requester was successfully charged for the
  6688. // request.
  6689. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6690. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  6691. // encryption key that was used for the object.
  6692. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6693. // The Server-side encryption algorithm used when storing this object in S3
  6694. // (e.g., AES256, aws:kms).
  6695. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6696. // Version of the object.
  6697. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  6698. }
  6699. // String returns the string representation
  6700. func (s CompleteMultipartUploadOutput) String() string {
  6701. return awsutil.Prettify(s)
  6702. }
  6703. // GoString returns the string representation
  6704. func (s CompleteMultipartUploadOutput) GoString() string {
  6705. return s.String()
  6706. }
  6707. // SetBucket sets the Bucket field's value.
  6708. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  6709. s.Bucket = &v
  6710. return s
  6711. }
  6712. func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
  6713. if s.Bucket == nil {
  6714. return v
  6715. }
  6716. return *s.Bucket
  6717. }
  6718. // SetETag sets the ETag field's value.
  6719. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  6720. s.ETag = &v
  6721. return s
  6722. }
  6723. // SetExpiration sets the Expiration field's value.
  6724. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  6725. s.Expiration = &v
  6726. return s
  6727. }
  6728. // SetKey sets the Key field's value.
  6729. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  6730. s.Key = &v
  6731. return s
  6732. }
  6733. // SetLocation sets the Location field's value.
  6734. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  6735. s.Location = &v
  6736. return s
  6737. }
  6738. // SetRequestCharged sets the RequestCharged field's value.
  6739. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  6740. s.RequestCharged = &v
  6741. return s
  6742. }
  6743. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6744. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  6745. s.SSEKMSKeyId = &v
  6746. return s
  6747. }
  6748. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6749. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  6750. s.ServerSideEncryption = &v
  6751. return s
  6752. }
  6753. // SetVersionId sets the VersionId field's value.
  6754. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  6755. s.VersionId = &v
  6756. return s
  6757. }
  6758. type CompletedMultipartUpload struct {
  6759. _ struct{} `type:"structure"`
  6760. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  6761. }
  6762. // String returns the string representation
  6763. func (s CompletedMultipartUpload) String() string {
  6764. return awsutil.Prettify(s)
  6765. }
  6766. // GoString returns the string representation
  6767. func (s CompletedMultipartUpload) GoString() string {
  6768. return s.String()
  6769. }
  6770. // SetParts sets the Parts field's value.
  6771. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  6772. s.Parts = v
  6773. return s
  6774. }
  6775. type CompletedPart struct {
  6776. _ struct{} `type:"structure"`
  6777. // Entity tag returned when the part was uploaded.
  6778. ETag *string `type:"string"`
  6779. // Part number that identifies the part. This is a positive integer between
  6780. // 1 and 10,000.
  6781. PartNumber *int64 `type:"integer"`
  6782. }
  6783. // String returns the string representation
  6784. func (s CompletedPart) String() string {
  6785. return awsutil.Prettify(s)
  6786. }
  6787. // GoString returns the string representation
  6788. func (s CompletedPart) GoString() string {
  6789. return s.String()
  6790. }
  6791. // SetETag sets the ETag field's value.
  6792. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  6793. s.ETag = &v
  6794. return s
  6795. }
  6796. // SetPartNumber sets the PartNumber field's value.
  6797. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  6798. s.PartNumber = &v
  6799. return s
  6800. }
  6801. type Condition struct {
  6802. _ struct{} `type:"structure"`
  6803. // The HTTP error code when the redirect is applied. In the event of an error,
  6804. // if the error code equals this value, then the specified redirect is applied.
  6805. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  6806. // is not specified. If both are specified, then both must be true for the redirect
  6807. // to be applied.
  6808. HttpErrorCodeReturnedEquals *string `type:"string"`
  6809. // The object key name prefix when the redirect is applied. For example, to
  6810. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  6811. // To redirect request for all pages with the prefix docs/, the key prefix will
  6812. // be /docs, which identifies all objects in the docs/ folder. Required when
  6813. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  6814. // is not specified. If both conditions are specified, both must be true for
  6815. // the redirect to be applied.
  6816. KeyPrefixEquals *string `type:"string"`
  6817. }
  6818. // String returns the string representation
  6819. func (s Condition) String() string {
  6820. return awsutil.Prettify(s)
  6821. }
  6822. // GoString returns the string representation
  6823. func (s Condition) GoString() string {
  6824. return s.String()
  6825. }
  6826. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  6827. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  6828. s.HttpErrorCodeReturnedEquals = &v
  6829. return s
  6830. }
  6831. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  6832. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  6833. s.KeyPrefixEquals = &v
  6834. return s
  6835. }
  6836. type ContinuationEvent struct {
  6837. _ struct{} `type:"structure"`
  6838. }
  6839. // String returns the string representation
  6840. func (s ContinuationEvent) String() string {
  6841. return awsutil.Prettify(s)
  6842. }
  6843. // GoString returns the string representation
  6844. func (s ContinuationEvent) GoString() string {
  6845. return s.String()
  6846. }
  6847. // The ContinuationEvent is and event in the SelectObjectContentEventStream group of events.
  6848. func (s *ContinuationEvent) eventSelectObjectContentEventStream() {}
  6849. // UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value.
  6850. // This method is only used internally within the SDK's EventStream handling.
  6851. func (s *ContinuationEvent) UnmarshalEvent(
  6852. payloadUnmarshaler protocol.PayloadUnmarshaler,
  6853. msg eventstream.Message,
  6854. ) error {
  6855. return nil
  6856. }
  6857. type CopyObjectInput struct {
  6858. _ struct{} `type:"structure"`
  6859. // The canned ACL to apply to the object.
  6860. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  6861. // Bucket is a required field
  6862. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6863. // Specifies caching behavior along the request/reply chain.
  6864. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  6865. // Specifies presentational information for the object.
  6866. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  6867. // Specifies what content encodings have been applied to the object and thus
  6868. // what decoding mechanisms must be applied to obtain the media-type referenced
  6869. // by the Content-Type header field.
  6870. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  6871. // The language the content is in.
  6872. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  6873. // A standard MIME type describing the format of the object data.
  6874. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  6875. // The name of the source bucket and key name of the source object, separated
  6876. // by a slash (/). Must be URL-encoded.
  6877. //
  6878. // CopySource is a required field
  6879. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  6880. // Copies the object if its entity tag (ETag) matches the specified tag.
  6881. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  6882. // Copies the object if it has been modified since the specified time.
  6883. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  6884. // Copies the object if its entity tag (ETag) is different than the specified
  6885. // ETag.
  6886. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  6887. // Copies the object if it hasn't been modified since the specified time.
  6888. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  6889. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  6890. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  6891. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  6892. // the source object. The encryption key provided in this header must be one
  6893. // that was used when the source object was created.
  6894. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  6895. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6896. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6897. // key was transmitted without error.
  6898. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  6899. // The date and time at which the object is no longer cacheable.
  6900. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  6901. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  6902. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  6903. // Allows grantee to read the object data and its metadata.
  6904. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  6905. // Allows grantee to read the object ACL.
  6906. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  6907. // Allows grantee to write the ACL for the applicable object.
  6908. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  6909. // Key is a required field
  6910. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6911. // A map of metadata to store with the object in S3.
  6912. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  6913. // Specifies whether the metadata is copied from the source object or replaced
  6914. // with metadata provided in the request.
  6915. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  6916. // Confirms that the requester knows that she or he will be charged for the
  6917. // request. Bucket owners need not specify this parameter in their requests.
  6918. // Documentation on downloading objects from requester pays buckets can be found
  6919. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6920. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6921. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  6922. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6923. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  6924. // data. This value is used to store the object and then it is discarded; Amazon
  6925. // does not store the encryption key. The key must be appropriate for use with
  6926. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  6927. // header.
  6928. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  6929. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6930. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6931. // key was transmitted without error.
  6932. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6933. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  6934. // requests for an object protected by AWS KMS will fail if not made via SSL
  6935. // or using SigV4. Documentation on configuring any of the officially supported
  6936. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  6937. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6938. // The Server-side encryption algorithm used when storing this object in S3
  6939. // (e.g., AES256, aws:kms).
  6940. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6941. // The type of storage to use for the object. Defaults to 'STANDARD'.
  6942. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  6943. // The tag-set for the object destination object this value must be used in
  6944. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  6945. // Query parameters
  6946. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  6947. // Specifies whether the object tag-set are copied from the source object or
  6948. // replaced with tag-set provided in the request.
  6949. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  6950. // If the bucket is configured as a website, redirects requests for this object
  6951. // to another object in the same bucket or to an external URL. Amazon S3 stores
  6952. // the value of this header in the object metadata.
  6953. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  6954. }
  6955. // String returns the string representation
  6956. func (s CopyObjectInput) String() string {
  6957. return awsutil.Prettify(s)
  6958. }
  6959. // GoString returns the string representation
  6960. func (s CopyObjectInput) GoString() string {
  6961. return s.String()
  6962. }
  6963. // Validate inspects the fields of the type to determine if they are valid.
  6964. func (s *CopyObjectInput) Validate() error {
  6965. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  6966. if s.Bucket == nil {
  6967. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6968. }
  6969. if s.CopySource == nil {
  6970. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  6971. }
  6972. if s.Key == nil {
  6973. invalidParams.Add(request.NewErrParamRequired("Key"))
  6974. }
  6975. if s.Key != nil && len(*s.Key) < 1 {
  6976. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6977. }
  6978. if invalidParams.Len() > 0 {
  6979. return invalidParams
  6980. }
  6981. return nil
  6982. }
  6983. // SetACL sets the ACL field's value.
  6984. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  6985. s.ACL = &v
  6986. return s
  6987. }
  6988. // SetBucket sets the Bucket field's value.
  6989. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  6990. s.Bucket = &v
  6991. return s
  6992. }
  6993. func (s *CopyObjectInput) getBucket() (v string) {
  6994. if s.Bucket == nil {
  6995. return v
  6996. }
  6997. return *s.Bucket
  6998. }
  6999. // SetCacheControl sets the CacheControl field's value.
  7000. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  7001. s.CacheControl = &v
  7002. return s
  7003. }
  7004. // SetContentDisposition sets the ContentDisposition field's value.
  7005. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  7006. s.ContentDisposition = &v
  7007. return s
  7008. }
  7009. // SetContentEncoding sets the ContentEncoding field's value.
  7010. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  7011. s.ContentEncoding = &v
  7012. return s
  7013. }
  7014. // SetContentLanguage sets the ContentLanguage field's value.
  7015. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  7016. s.ContentLanguage = &v
  7017. return s
  7018. }
  7019. // SetContentType sets the ContentType field's value.
  7020. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  7021. s.ContentType = &v
  7022. return s
  7023. }
  7024. // SetCopySource sets the CopySource field's value.
  7025. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  7026. s.CopySource = &v
  7027. return s
  7028. }
  7029. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  7030. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  7031. s.CopySourceIfMatch = &v
  7032. return s
  7033. }
  7034. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  7035. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  7036. s.CopySourceIfModifiedSince = &v
  7037. return s
  7038. }
  7039. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  7040. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  7041. s.CopySourceIfNoneMatch = &v
  7042. return s
  7043. }
  7044. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  7045. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  7046. s.CopySourceIfUnmodifiedSince = &v
  7047. return s
  7048. }
  7049. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  7050. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  7051. s.CopySourceSSECustomerAlgorithm = &v
  7052. return s
  7053. }
  7054. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  7055. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  7056. s.CopySourceSSECustomerKey = &v
  7057. return s
  7058. }
  7059. func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
  7060. if s.CopySourceSSECustomerKey == nil {
  7061. return v
  7062. }
  7063. return *s.CopySourceSSECustomerKey
  7064. }
  7065. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  7066. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  7067. s.CopySourceSSECustomerKeyMD5 = &v
  7068. return s
  7069. }
  7070. // SetExpires sets the Expires field's value.
  7071. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  7072. s.Expires = &v
  7073. return s
  7074. }
  7075. // SetGrantFullControl sets the GrantFullControl field's value.
  7076. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  7077. s.GrantFullControl = &v
  7078. return s
  7079. }
  7080. // SetGrantRead sets the GrantRead field's value.
  7081. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  7082. s.GrantRead = &v
  7083. return s
  7084. }
  7085. // SetGrantReadACP sets the GrantReadACP field's value.
  7086. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  7087. s.GrantReadACP = &v
  7088. return s
  7089. }
  7090. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7091. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  7092. s.GrantWriteACP = &v
  7093. return s
  7094. }
  7095. // SetKey sets the Key field's value.
  7096. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  7097. s.Key = &v
  7098. return s
  7099. }
  7100. // SetMetadata sets the Metadata field's value.
  7101. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  7102. s.Metadata = v
  7103. return s
  7104. }
  7105. // SetMetadataDirective sets the MetadataDirective field's value.
  7106. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  7107. s.MetadataDirective = &v
  7108. return s
  7109. }
  7110. // SetRequestPayer sets the RequestPayer field's value.
  7111. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  7112. s.RequestPayer = &v
  7113. return s
  7114. }
  7115. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7116. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  7117. s.SSECustomerAlgorithm = &v
  7118. return s
  7119. }
  7120. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7121. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  7122. s.SSECustomerKey = &v
  7123. return s
  7124. }
  7125. func (s *CopyObjectInput) getSSECustomerKey() (v string) {
  7126. if s.SSECustomerKey == nil {
  7127. return v
  7128. }
  7129. return *s.SSECustomerKey
  7130. }
  7131. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7132. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  7133. s.SSECustomerKeyMD5 = &v
  7134. return s
  7135. }
  7136. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7137. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  7138. s.SSEKMSKeyId = &v
  7139. return s
  7140. }
  7141. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7142. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  7143. s.ServerSideEncryption = &v
  7144. return s
  7145. }
  7146. // SetStorageClass sets the StorageClass field's value.
  7147. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  7148. s.StorageClass = &v
  7149. return s
  7150. }
  7151. // SetTagging sets the Tagging field's value.
  7152. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  7153. s.Tagging = &v
  7154. return s
  7155. }
  7156. // SetTaggingDirective sets the TaggingDirective field's value.
  7157. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  7158. s.TaggingDirective = &v
  7159. return s
  7160. }
  7161. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7162. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  7163. s.WebsiteRedirectLocation = &v
  7164. return s
  7165. }
  7166. type CopyObjectOutput struct {
  7167. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  7168. CopyObjectResult *CopyObjectResult `type:"structure"`
  7169. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  7170. // If the object expiration is configured, the response includes this header.
  7171. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7172. // If present, indicates that the requester was successfully charged for the
  7173. // request.
  7174. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7175. // If server-side encryption with a customer-provided encryption key was requested,
  7176. // the response will include this header confirming the encryption algorithm
  7177. // used.
  7178. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7179. // If server-side encryption with a customer-provided encryption key was requested,
  7180. // the response will include this header to provide round trip message integrity
  7181. // verification of the customer-provided encryption key.
  7182. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7183. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7184. // encryption key that was used for the object.
  7185. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7186. // The Server-side encryption algorithm used when storing this object in S3
  7187. // (e.g., AES256, aws:kms).
  7188. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7189. // Version ID of the newly created copy.
  7190. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7191. }
  7192. // String returns the string representation
  7193. func (s CopyObjectOutput) String() string {
  7194. return awsutil.Prettify(s)
  7195. }
  7196. // GoString returns the string representation
  7197. func (s CopyObjectOutput) GoString() string {
  7198. return s.String()
  7199. }
  7200. // SetCopyObjectResult sets the CopyObjectResult field's value.
  7201. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  7202. s.CopyObjectResult = v
  7203. return s
  7204. }
  7205. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  7206. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  7207. s.CopySourceVersionId = &v
  7208. return s
  7209. }
  7210. // SetExpiration sets the Expiration field's value.
  7211. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  7212. s.Expiration = &v
  7213. return s
  7214. }
  7215. // SetRequestCharged sets the RequestCharged field's value.
  7216. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  7217. s.RequestCharged = &v
  7218. return s
  7219. }
  7220. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7221. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  7222. s.SSECustomerAlgorithm = &v
  7223. return s
  7224. }
  7225. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7226. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  7227. s.SSECustomerKeyMD5 = &v
  7228. return s
  7229. }
  7230. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7231. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  7232. s.SSEKMSKeyId = &v
  7233. return s
  7234. }
  7235. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7236. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  7237. s.ServerSideEncryption = &v
  7238. return s
  7239. }
  7240. // SetVersionId sets the VersionId field's value.
  7241. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  7242. s.VersionId = &v
  7243. return s
  7244. }
  7245. type CopyObjectResult struct {
  7246. _ struct{} `type:"structure"`
  7247. ETag *string `type:"string"`
  7248. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7249. }
  7250. // String returns the string representation
  7251. func (s CopyObjectResult) String() string {
  7252. return awsutil.Prettify(s)
  7253. }
  7254. // GoString returns the string representation
  7255. func (s CopyObjectResult) GoString() string {
  7256. return s.String()
  7257. }
  7258. // SetETag sets the ETag field's value.
  7259. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  7260. s.ETag = &v
  7261. return s
  7262. }
  7263. // SetLastModified sets the LastModified field's value.
  7264. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  7265. s.LastModified = &v
  7266. return s
  7267. }
  7268. type CopyPartResult struct {
  7269. _ struct{} `type:"structure"`
  7270. // Entity tag of the object.
  7271. ETag *string `type:"string"`
  7272. // Date and time at which the object was uploaded.
  7273. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7274. }
  7275. // String returns the string representation
  7276. func (s CopyPartResult) String() string {
  7277. return awsutil.Prettify(s)
  7278. }
  7279. // GoString returns the string representation
  7280. func (s CopyPartResult) GoString() string {
  7281. return s.String()
  7282. }
  7283. // SetETag sets the ETag field's value.
  7284. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  7285. s.ETag = &v
  7286. return s
  7287. }
  7288. // SetLastModified sets the LastModified field's value.
  7289. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  7290. s.LastModified = &v
  7291. return s
  7292. }
  7293. type CreateBucketConfiguration struct {
  7294. _ struct{} `type:"structure"`
  7295. // Specifies the region where the bucket will be created. If you don't specify
  7296. // a region, the bucket will be created in US Standard.
  7297. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  7298. }
  7299. // String returns the string representation
  7300. func (s CreateBucketConfiguration) String() string {
  7301. return awsutil.Prettify(s)
  7302. }
  7303. // GoString returns the string representation
  7304. func (s CreateBucketConfiguration) GoString() string {
  7305. return s.String()
  7306. }
  7307. // SetLocationConstraint sets the LocationConstraint field's value.
  7308. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  7309. s.LocationConstraint = &v
  7310. return s
  7311. }
  7312. type CreateBucketInput struct {
  7313. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  7314. // The canned ACL to apply to the bucket.
  7315. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  7316. // Bucket is a required field
  7317. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7318. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  7319. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  7320. // bucket.
  7321. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7322. // Allows grantee to list the objects in the bucket.
  7323. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7324. // Allows grantee to read the bucket ACL.
  7325. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7326. // Allows grantee to create, overwrite, and delete any object in the bucket.
  7327. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  7328. // Allows grantee to write the ACL for the applicable bucket.
  7329. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7330. }
  7331. // String returns the string representation
  7332. func (s CreateBucketInput) String() string {
  7333. return awsutil.Prettify(s)
  7334. }
  7335. // GoString returns the string representation
  7336. func (s CreateBucketInput) GoString() string {
  7337. return s.String()
  7338. }
  7339. // Validate inspects the fields of the type to determine if they are valid.
  7340. func (s *CreateBucketInput) Validate() error {
  7341. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  7342. if s.Bucket == nil {
  7343. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7344. }
  7345. if invalidParams.Len() > 0 {
  7346. return invalidParams
  7347. }
  7348. return nil
  7349. }
  7350. // SetACL sets the ACL field's value.
  7351. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  7352. s.ACL = &v
  7353. return s
  7354. }
  7355. // SetBucket sets the Bucket field's value.
  7356. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  7357. s.Bucket = &v
  7358. return s
  7359. }
  7360. func (s *CreateBucketInput) getBucket() (v string) {
  7361. if s.Bucket == nil {
  7362. return v
  7363. }
  7364. return *s.Bucket
  7365. }
  7366. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  7367. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  7368. s.CreateBucketConfiguration = v
  7369. return s
  7370. }
  7371. // SetGrantFullControl sets the GrantFullControl field's value.
  7372. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  7373. s.GrantFullControl = &v
  7374. return s
  7375. }
  7376. // SetGrantRead sets the GrantRead field's value.
  7377. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  7378. s.GrantRead = &v
  7379. return s
  7380. }
  7381. // SetGrantReadACP sets the GrantReadACP field's value.
  7382. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  7383. s.GrantReadACP = &v
  7384. return s
  7385. }
  7386. // SetGrantWrite sets the GrantWrite field's value.
  7387. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  7388. s.GrantWrite = &v
  7389. return s
  7390. }
  7391. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7392. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  7393. s.GrantWriteACP = &v
  7394. return s
  7395. }
  7396. type CreateBucketOutput struct {
  7397. _ struct{} `type:"structure"`
  7398. Location *string `location:"header" locationName:"Location" type:"string"`
  7399. }
  7400. // String returns the string representation
  7401. func (s CreateBucketOutput) String() string {
  7402. return awsutil.Prettify(s)
  7403. }
  7404. // GoString returns the string representation
  7405. func (s CreateBucketOutput) GoString() string {
  7406. return s.String()
  7407. }
  7408. // SetLocation sets the Location field's value.
  7409. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  7410. s.Location = &v
  7411. return s
  7412. }
  7413. type CreateMultipartUploadInput struct {
  7414. _ struct{} `type:"structure"`
  7415. // The canned ACL to apply to the object.
  7416. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7417. // Bucket is a required field
  7418. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7419. // Specifies caching behavior along the request/reply chain.
  7420. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7421. // Specifies presentational information for the object.
  7422. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7423. // Specifies what content encodings have been applied to the object and thus
  7424. // what decoding mechanisms must be applied to obtain the media-type referenced
  7425. // by the Content-Type header field.
  7426. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7427. // The language the content is in.
  7428. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7429. // A standard MIME type describing the format of the object data.
  7430. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7431. // The date and time at which the object is no longer cacheable.
  7432. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  7433. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7434. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7435. // Allows grantee to read the object data and its metadata.
  7436. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7437. // Allows grantee to read the object ACL.
  7438. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7439. // Allows grantee to write the ACL for the applicable object.
  7440. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7441. // Key is a required field
  7442. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7443. // A map of metadata to store with the object in S3.
  7444. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7445. // Confirms that the requester knows that she or he will be charged for the
  7446. // request. Bucket owners need not specify this parameter in their requests.
  7447. // Documentation on downloading objects from requester pays buckets can be found
  7448. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7449. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7450. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7451. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7452. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7453. // data. This value is used to store the object and then it is discarded; Amazon
  7454. // does not store the encryption key. The key must be appropriate for use with
  7455. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7456. // header.
  7457. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  7458. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7459. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7460. // key was transmitted without error.
  7461. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7462. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7463. // requests for an object protected by AWS KMS will fail if not made via SSL
  7464. // or using SigV4. Documentation on configuring any of the officially supported
  7465. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7466. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7467. // The Server-side encryption algorithm used when storing this object in S3
  7468. // (e.g., AES256, aws:kms).
  7469. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7470. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7471. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7472. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  7473. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  7474. // If the bucket is configured as a website, redirects requests for this object
  7475. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7476. // the value of this header in the object metadata.
  7477. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7478. }
  7479. // String returns the string representation
  7480. func (s CreateMultipartUploadInput) String() string {
  7481. return awsutil.Prettify(s)
  7482. }
  7483. // GoString returns the string representation
  7484. func (s CreateMultipartUploadInput) GoString() string {
  7485. return s.String()
  7486. }
  7487. // Validate inspects the fields of the type to determine if they are valid.
  7488. func (s *CreateMultipartUploadInput) Validate() error {
  7489. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  7490. if s.Bucket == nil {
  7491. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7492. }
  7493. if s.Key == nil {
  7494. invalidParams.Add(request.NewErrParamRequired("Key"))
  7495. }
  7496. if s.Key != nil && len(*s.Key) < 1 {
  7497. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7498. }
  7499. if invalidParams.Len() > 0 {
  7500. return invalidParams
  7501. }
  7502. return nil
  7503. }
  7504. // SetACL sets the ACL field's value.
  7505. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  7506. s.ACL = &v
  7507. return s
  7508. }
  7509. // SetBucket sets the Bucket field's value.
  7510. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  7511. s.Bucket = &v
  7512. return s
  7513. }
  7514. func (s *CreateMultipartUploadInput) getBucket() (v string) {
  7515. if s.Bucket == nil {
  7516. return v
  7517. }
  7518. return *s.Bucket
  7519. }
  7520. // SetCacheControl sets the CacheControl field's value.
  7521. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  7522. s.CacheControl = &v
  7523. return s
  7524. }
  7525. // SetContentDisposition sets the ContentDisposition field's value.
  7526. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  7527. s.ContentDisposition = &v
  7528. return s
  7529. }
  7530. // SetContentEncoding sets the ContentEncoding field's value.
  7531. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  7532. s.ContentEncoding = &v
  7533. return s
  7534. }
  7535. // SetContentLanguage sets the ContentLanguage field's value.
  7536. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  7537. s.ContentLanguage = &v
  7538. return s
  7539. }
  7540. // SetContentType sets the ContentType field's value.
  7541. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  7542. s.ContentType = &v
  7543. return s
  7544. }
  7545. // SetExpires sets the Expires field's value.
  7546. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  7547. s.Expires = &v
  7548. return s
  7549. }
  7550. // SetGrantFullControl sets the GrantFullControl field's value.
  7551. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  7552. s.GrantFullControl = &v
  7553. return s
  7554. }
  7555. // SetGrantRead sets the GrantRead field's value.
  7556. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  7557. s.GrantRead = &v
  7558. return s
  7559. }
  7560. // SetGrantReadACP sets the GrantReadACP field's value.
  7561. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  7562. s.GrantReadACP = &v
  7563. return s
  7564. }
  7565. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7566. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  7567. s.GrantWriteACP = &v
  7568. return s
  7569. }
  7570. // SetKey sets the Key field's value.
  7571. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  7572. s.Key = &v
  7573. return s
  7574. }
  7575. // SetMetadata sets the Metadata field's value.
  7576. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  7577. s.Metadata = v
  7578. return s
  7579. }
  7580. // SetRequestPayer sets the RequestPayer field's value.
  7581. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  7582. s.RequestPayer = &v
  7583. return s
  7584. }
  7585. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7586. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  7587. s.SSECustomerAlgorithm = &v
  7588. return s
  7589. }
  7590. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7591. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  7592. s.SSECustomerKey = &v
  7593. return s
  7594. }
  7595. func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
  7596. if s.SSECustomerKey == nil {
  7597. return v
  7598. }
  7599. return *s.SSECustomerKey
  7600. }
  7601. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7602. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  7603. s.SSECustomerKeyMD5 = &v
  7604. return s
  7605. }
  7606. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7607. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  7608. s.SSEKMSKeyId = &v
  7609. return s
  7610. }
  7611. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7612. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  7613. s.ServerSideEncryption = &v
  7614. return s
  7615. }
  7616. // SetStorageClass sets the StorageClass field's value.
  7617. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  7618. s.StorageClass = &v
  7619. return s
  7620. }
  7621. // SetTagging sets the Tagging field's value.
  7622. func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
  7623. s.Tagging = &v
  7624. return s
  7625. }
  7626. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7627. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  7628. s.WebsiteRedirectLocation = &v
  7629. return s
  7630. }
  7631. type CreateMultipartUploadOutput struct {
  7632. _ struct{} `type:"structure"`
  7633. // Date when multipart upload will become eligible for abort operation by lifecycle.
  7634. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  7635. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  7636. // operation.
  7637. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  7638. // Name of the bucket to which the multipart upload was initiated.
  7639. Bucket *string `locationName:"Bucket" type:"string"`
  7640. // Object key for which the multipart upload was initiated.
  7641. Key *string `min:"1" type:"string"`
  7642. // If present, indicates that the requester was successfully charged for the
  7643. // request.
  7644. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7645. // If server-side encryption with a customer-provided encryption key was requested,
  7646. // the response will include this header confirming the encryption algorithm
  7647. // used.
  7648. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7649. // If server-side encryption with a customer-provided encryption key was requested,
  7650. // the response will include this header to provide round trip message integrity
  7651. // verification of the customer-provided encryption key.
  7652. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7653. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7654. // encryption key that was used for the object.
  7655. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7656. // The Server-side encryption algorithm used when storing this object in S3
  7657. // (e.g., AES256, aws:kms).
  7658. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7659. // ID for the initiated multipart upload.
  7660. UploadId *string `type:"string"`
  7661. }
  7662. // String returns the string representation
  7663. func (s CreateMultipartUploadOutput) String() string {
  7664. return awsutil.Prettify(s)
  7665. }
  7666. // GoString returns the string representation
  7667. func (s CreateMultipartUploadOutput) GoString() string {
  7668. return s.String()
  7669. }
  7670. // SetAbortDate sets the AbortDate field's value.
  7671. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  7672. s.AbortDate = &v
  7673. return s
  7674. }
  7675. // SetAbortRuleId sets the AbortRuleId field's value.
  7676. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  7677. s.AbortRuleId = &v
  7678. return s
  7679. }
  7680. // SetBucket sets the Bucket field's value.
  7681. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  7682. s.Bucket = &v
  7683. return s
  7684. }
  7685. func (s *CreateMultipartUploadOutput) getBucket() (v string) {
  7686. if s.Bucket == nil {
  7687. return v
  7688. }
  7689. return *s.Bucket
  7690. }
  7691. // SetKey sets the Key field's value.
  7692. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  7693. s.Key = &v
  7694. return s
  7695. }
  7696. // SetRequestCharged sets the RequestCharged field's value.
  7697. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  7698. s.RequestCharged = &v
  7699. return s
  7700. }
  7701. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7702. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  7703. s.SSECustomerAlgorithm = &v
  7704. return s
  7705. }
  7706. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7707. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  7708. s.SSECustomerKeyMD5 = &v
  7709. return s
  7710. }
  7711. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7712. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  7713. s.SSEKMSKeyId = &v
  7714. return s
  7715. }
  7716. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7717. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  7718. s.ServerSideEncryption = &v
  7719. return s
  7720. }
  7721. // SetUploadId sets the UploadId field's value.
  7722. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  7723. s.UploadId = &v
  7724. return s
  7725. }
  7726. type Delete struct {
  7727. _ struct{} `type:"structure"`
  7728. // Objects is a required field
  7729. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  7730. // Element to enable quiet mode for the request. When you add this element,
  7731. // you must set its value to true.
  7732. Quiet *bool `type:"boolean"`
  7733. }
  7734. // String returns the string representation
  7735. func (s Delete) String() string {
  7736. return awsutil.Prettify(s)
  7737. }
  7738. // GoString returns the string representation
  7739. func (s Delete) GoString() string {
  7740. return s.String()
  7741. }
  7742. // Validate inspects the fields of the type to determine if they are valid.
  7743. func (s *Delete) Validate() error {
  7744. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  7745. if s.Objects == nil {
  7746. invalidParams.Add(request.NewErrParamRequired("Objects"))
  7747. }
  7748. if s.Objects != nil {
  7749. for i, v := range s.Objects {
  7750. if v == nil {
  7751. continue
  7752. }
  7753. if err := v.Validate(); err != nil {
  7754. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  7755. }
  7756. }
  7757. }
  7758. if invalidParams.Len() > 0 {
  7759. return invalidParams
  7760. }
  7761. return nil
  7762. }
  7763. // SetObjects sets the Objects field's value.
  7764. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  7765. s.Objects = v
  7766. return s
  7767. }
  7768. // SetQuiet sets the Quiet field's value.
  7769. func (s *Delete) SetQuiet(v bool) *Delete {
  7770. s.Quiet = &v
  7771. return s
  7772. }
  7773. type DeleteBucketAnalyticsConfigurationInput struct {
  7774. _ struct{} `type:"structure"`
  7775. // The name of the bucket from which an analytics configuration is deleted.
  7776. //
  7777. // Bucket is a required field
  7778. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7779. // The identifier used to represent an analytics configuration.
  7780. //
  7781. // Id is a required field
  7782. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7783. }
  7784. // String returns the string representation
  7785. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  7786. return awsutil.Prettify(s)
  7787. }
  7788. // GoString returns the string representation
  7789. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  7790. return s.String()
  7791. }
  7792. // Validate inspects the fields of the type to determine if they are valid.
  7793. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  7794. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  7795. if s.Bucket == nil {
  7796. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7797. }
  7798. if s.Id == nil {
  7799. invalidParams.Add(request.NewErrParamRequired("Id"))
  7800. }
  7801. if invalidParams.Len() > 0 {
  7802. return invalidParams
  7803. }
  7804. return nil
  7805. }
  7806. // SetBucket sets the Bucket field's value.
  7807. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  7808. s.Bucket = &v
  7809. return s
  7810. }
  7811. func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
  7812. if s.Bucket == nil {
  7813. return v
  7814. }
  7815. return *s.Bucket
  7816. }
  7817. // SetId sets the Id field's value.
  7818. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  7819. s.Id = &v
  7820. return s
  7821. }
  7822. type DeleteBucketAnalyticsConfigurationOutput struct {
  7823. _ struct{} `type:"structure"`
  7824. }
  7825. // String returns the string representation
  7826. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  7827. return awsutil.Prettify(s)
  7828. }
  7829. // GoString returns the string representation
  7830. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  7831. return s.String()
  7832. }
  7833. type DeleteBucketCorsInput struct {
  7834. _ struct{} `type:"structure"`
  7835. // Bucket is a required field
  7836. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7837. }
  7838. // String returns the string representation
  7839. func (s DeleteBucketCorsInput) String() string {
  7840. return awsutil.Prettify(s)
  7841. }
  7842. // GoString returns the string representation
  7843. func (s DeleteBucketCorsInput) GoString() string {
  7844. return s.String()
  7845. }
  7846. // Validate inspects the fields of the type to determine if they are valid.
  7847. func (s *DeleteBucketCorsInput) Validate() error {
  7848. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  7849. if s.Bucket == nil {
  7850. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7851. }
  7852. if invalidParams.Len() > 0 {
  7853. return invalidParams
  7854. }
  7855. return nil
  7856. }
  7857. // SetBucket sets the Bucket field's value.
  7858. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  7859. s.Bucket = &v
  7860. return s
  7861. }
  7862. func (s *DeleteBucketCorsInput) getBucket() (v string) {
  7863. if s.Bucket == nil {
  7864. return v
  7865. }
  7866. return *s.Bucket
  7867. }
  7868. type DeleteBucketCorsOutput struct {
  7869. _ struct{} `type:"structure"`
  7870. }
  7871. // String returns the string representation
  7872. func (s DeleteBucketCorsOutput) String() string {
  7873. return awsutil.Prettify(s)
  7874. }
  7875. // GoString returns the string representation
  7876. func (s DeleteBucketCorsOutput) GoString() string {
  7877. return s.String()
  7878. }
  7879. type DeleteBucketEncryptionInput struct {
  7880. _ struct{} `type:"structure"`
  7881. // The name of the bucket containing the server-side encryption configuration
  7882. // to delete.
  7883. //
  7884. // Bucket is a required field
  7885. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7886. }
  7887. // String returns the string representation
  7888. func (s DeleteBucketEncryptionInput) String() string {
  7889. return awsutil.Prettify(s)
  7890. }
  7891. // GoString returns the string representation
  7892. func (s DeleteBucketEncryptionInput) GoString() string {
  7893. return s.String()
  7894. }
  7895. // Validate inspects the fields of the type to determine if they are valid.
  7896. func (s *DeleteBucketEncryptionInput) Validate() error {
  7897. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
  7898. if s.Bucket == nil {
  7899. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7900. }
  7901. if invalidParams.Len() > 0 {
  7902. return invalidParams
  7903. }
  7904. return nil
  7905. }
  7906. // SetBucket sets the Bucket field's value.
  7907. func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
  7908. s.Bucket = &v
  7909. return s
  7910. }
  7911. func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
  7912. if s.Bucket == nil {
  7913. return v
  7914. }
  7915. return *s.Bucket
  7916. }
  7917. type DeleteBucketEncryptionOutput struct {
  7918. _ struct{} `type:"structure"`
  7919. }
  7920. // String returns the string representation
  7921. func (s DeleteBucketEncryptionOutput) String() string {
  7922. return awsutil.Prettify(s)
  7923. }
  7924. // GoString returns the string representation
  7925. func (s DeleteBucketEncryptionOutput) GoString() string {
  7926. return s.String()
  7927. }
  7928. type DeleteBucketInput struct {
  7929. _ struct{} `type:"structure"`
  7930. // Bucket is a required field
  7931. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7932. }
  7933. // String returns the string representation
  7934. func (s DeleteBucketInput) String() string {
  7935. return awsutil.Prettify(s)
  7936. }
  7937. // GoString returns the string representation
  7938. func (s DeleteBucketInput) GoString() string {
  7939. return s.String()
  7940. }
  7941. // Validate inspects the fields of the type to determine if they are valid.
  7942. func (s *DeleteBucketInput) Validate() error {
  7943. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  7944. if s.Bucket == nil {
  7945. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7946. }
  7947. if invalidParams.Len() > 0 {
  7948. return invalidParams
  7949. }
  7950. return nil
  7951. }
  7952. // SetBucket sets the Bucket field's value.
  7953. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  7954. s.Bucket = &v
  7955. return s
  7956. }
  7957. func (s *DeleteBucketInput) getBucket() (v string) {
  7958. if s.Bucket == nil {
  7959. return v
  7960. }
  7961. return *s.Bucket
  7962. }
  7963. type DeleteBucketInventoryConfigurationInput struct {
  7964. _ struct{} `type:"structure"`
  7965. // The name of the bucket containing the inventory configuration to delete.
  7966. //
  7967. // Bucket is a required field
  7968. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7969. // The ID used to identify the inventory configuration.
  7970. //
  7971. // Id is a required field
  7972. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7973. }
  7974. // String returns the string representation
  7975. func (s DeleteBucketInventoryConfigurationInput) String() string {
  7976. return awsutil.Prettify(s)
  7977. }
  7978. // GoString returns the string representation
  7979. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  7980. return s.String()
  7981. }
  7982. // Validate inspects the fields of the type to determine if they are valid.
  7983. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  7984. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  7985. if s.Bucket == nil {
  7986. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7987. }
  7988. if s.Id == nil {
  7989. invalidParams.Add(request.NewErrParamRequired("Id"))
  7990. }
  7991. if invalidParams.Len() > 0 {
  7992. return invalidParams
  7993. }
  7994. return nil
  7995. }
  7996. // SetBucket sets the Bucket field's value.
  7997. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  7998. s.Bucket = &v
  7999. return s
  8000. }
  8001. func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
  8002. if s.Bucket == nil {
  8003. return v
  8004. }
  8005. return *s.Bucket
  8006. }
  8007. // SetId sets the Id field's value.
  8008. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  8009. s.Id = &v
  8010. return s
  8011. }
  8012. type DeleteBucketInventoryConfigurationOutput struct {
  8013. _ struct{} `type:"structure"`
  8014. }
  8015. // String returns the string representation
  8016. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  8017. return awsutil.Prettify(s)
  8018. }
  8019. // GoString returns the string representation
  8020. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  8021. return s.String()
  8022. }
  8023. type DeleteBucketLifecycleInput struct {
  8024. _ struct{} `type:"structure"`
  8025. // Bucket is a required field
  8026. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8027. }
  8028. // String returns the string representation
  8029. func (s DeleteBucketLifecycleInput) String() string {
  8030. return awsutil.Prettify(s)
  8031. }
  8032. // GoString returns the string representation
  8033. func (s DeleteBucketLifecycleInput) GoString() string {
  8034. return s.String()
  8035. }
  8036. // Validate inspects the fields of the type to determine if they are valid.
  8037. func (s *DeleteBucketLifecycleInput) Validate() error {
  8038. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  8039. if s.Bucket == nil {
  8040. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8041. }
  8042. if invalidParams.Len() > 0 {
  8043. return invalidParams
  8044. }
  8045. return nil
  8046. }
  8047. // SetBucket sets the Bucket field's value.
  8048. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  8049. s.Bucket = &v
  8050. return s
  8051. }
  8052. func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
  8053. if s.Bucket == nil {
  8054. return v
  8055. }
  8056. return *s.Bucket
  8057. }
  8058. type DeleteBucketLifecycleOutput struct {
  8059. _ struct{} `type:"structure"`
  8060. }
  8061. // String returns the string representation
  8062. func (s DeleteBucketLifecycleOutput) String() string {
  8063. return awsutil.Prettify(s)
  8064. }
  8065. // GoString returns the string representation
  8066. func (s DeleteBucketLifecycleOutput) GoString() string {
  8067. return s.String()
  8068. }
  8069. type DeleteBucketMetricsConfigurationInput struct {
  8070. _ struct{} `type:"structure"`
  8071. // The name of the bucket containing the metrics configuration to delete.
  8072. //
  8073. // Bucket is a required field
  8074. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8075. // The ID used to identify the metrics configuration.
  8076. //
  8077. // Id is a required field
  8078. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8079. }
  8080. // String returns the string representation
  8081. func (s DeleteBucketMetricsConfigurationInput) String() string {
  8082. return awsutil.Prettify(s)
  8083. }
  8084. // GoString returns the string representation
  8085. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  8086. return s.String()
  8087. }
  8088. // Validate inspects the fields of the type to determine if they are valid.
  8089. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  8090. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  8091. if s.Bucket == nil {
  8092. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8093. }
  8094. if s.Id == nil {
  8095. invalidParams.Add(request.NewErrParamRequired("Id"))
  8096. }
  8097. if invalidParams.Len() > 0 {
  8098. return invalidParams
  8099. }
  8100. return nil
  8101. }
  8102. // SetBucket sets the Bucket field's value.
  8103. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  8104. s.Bucket = &v
  8105. return s
  8106. }
  8107. func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
  8108. if s.Bucket == nil {
  8109. return v
  8110. }
  8111. return *s.Bucket
  8112. }
  8113. // SetId sets the Id field's value.
  8114. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  8115. s.Id = &v
  8116. return s
  8117. }
  8118. type DeleteBucketMetricsConfigurationOutput struct {
  8119. _ struct{} `type:"structure"`
  8120. }
  8121. // String returns the string representation
  8122. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  8123. return awsutil.Prettify(s)
  8124. }
  8125. // GoString returns the string representation
  8126. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  8127. return s.String()
  8128. }
  8129. type DeleteBucketOutput struct {
  8130. _ struct{} `type:"structure"`
  8131. }
  8132. // String returns the string representation
  8133. func (s DeleteBucketOutput) String() string {
  8134. return awsutil.Prettify(s)
  8135. }
  8136. // GoString returns the string representation
  8137. func (s DeleteBucketOutput) GoString() string {
  8138. return s.String()
  8139. }
  8140. type DeleteBucketPolicyInput struct {
  8141. _ struct{} `type:"structure"`
  8142. // Bucket is a required field
  8143. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8144. }
  8145. // String returns the string representation
  8146. func (s DeleteBucketPolicyInput) String() string {
  8147. return awsutil.Prettify(s)
  8148. }
  8149. // GoString returns the string representation
  8150. func (s DeleteBucketPolicyInput) GoString() string {
  8151. return s.String()
  8152. }
  8153. // Validate inspects the fields of the type to determine if they are valid.
  8154. func (s *DeleteBucketPolicyInput) Validate() error {
  8155. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  8156. if s.Bucket == nil {
  8157. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8158. }
  8159. if invalidParams.Len() > 0 {
  8160. return invalidParams
  8161. }
  8162. return nil
  8163. }
  8164. // SetBucket sets the Bucket field's value.
  8165. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  8166. s.Bucket = &v
  8167. return s
  8168. }
  8169. func (s *DeleteBucketPolicyInput) getBucket() (v string) {
  8170. if s.Bucket == nil {
  8171. return v
  8172. }
  8173. return *s.Bucket
  8174. }
  8175. type DeleteBucketPolicyOutput struct {
  8176. _ struct{} `type:"structure"`
  8177. }
  8178. // String returns the string representation
  8179. func (s DeleteBucketPolicyOutput) String() string {
  8180. return awsutil.Prettify(s)
  8181. }
  8182. // GoString returns the string representation
  8183. func (s DeleteBucketPolicyOutput) GoString() string {
  8184. return s.String()
  8185. }
  8186. type DeleteBucketReplicationInput struct {
  8187. _ struct{} `type:"structure"`
  8188. // Bucket is a required field
  8189. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8190. }
  8191. // String returns the string representation
  8192. func (s DeleteBucketReplicationInput) String() string {
  8193. return awsutil.Prettify(s)
  8194. }
  8195. // GoString returns the string representation
  8196. func (s DeleteBucketReplicationInput) GoString() string {
  8197. return s.String()
  8198. }
  8199. // Validate inspects the fields of the type to determine if they are valid.
  8200. func (s *DeleteBucketReplicationInput) Validate() error {
  8201. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  8202. if s.Bucket == nil {
  8203. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8204. }
  8205. if invalidParams.Len() > 0 {
  8206. return invalidParams
  8207. }
  8208. return nil
  8209. }
  8210. // SetBucket sets the Bucket field's value.
  8211. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  8212. s.Bucket = &v
  8213. return s
  8214. }
  8215. func (s *DeleteBucketReplicationInput) getBucket() (v string) {
  8216. if s.Bucket == nil {
  8217. return v
  8218. }
  8219. return *s.Bucket
  8220. }
  8221. type DeleteBucketReplicationOutput struct {
  8222. _ struct{} `type:"structure"`
  8223. }
  8224. // String returns the string representation
  8225. func (s DeleteBucketReplicationOutput) String() string {
  8226. return awsutil.Prettify(s)
  8227. }
  8228. // GoString returns the string representation
  8229. func (s DeleteBucketReplicationOutput) GoString() string {
  8230. return s.String()
  8231. }
  8232. type DeleteBucketTaggingInput struct {
  8233. _ struct{} `type:"structure"`
  8234. // Bucket is a required field
  8235. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8236. }
  8237. // String returns the string representation
  8238. func (s DeleteBucketTaggingInput) String() string {
  8239. return awsutil.Prettify(s)
  8240. }
  8241. // GoString returns the string representation
  8242. func (s DeleteBucketTaggingInput) GoString() string {
  8243. return s.String()
  8244. }
  8245. // Validate inspects the fields of the type to determine if they are valid.
  8246. func (s *DeleteBucketTaggingInput) Validate() error {
  8247. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  8248. if s.Bucket == nil {
  8249. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8250. }
  8251. if invalidParams.Len() > 0 {
  8252. return invalidParams
  8253. }
  8254. return nil
  8255. }
  8256. // SetBucket sets the Bucket field's value.
  8257. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  8258. s.Bucket = &v
  8259. return s
  8260. }
  8261. func (s *DeleteBucketTaggingInput) getBucket() (v string) {
  8262. if s.Bucket == nil {
  8263. return v
  8264. }
  8265. return *s.Bucket
  8266. }
  8267. type DeleteBucketTaggingOutput struct {
  8268. _ struct{} `type:"structure"`
  8269. }
  8270. // String returns the string representation
  8271. func (s DeleteBucketTaggingOutput) String() string {
  8272. return awsutil.Prettify(s)
  8273. }
  8274. // GoString returns the string representation
  8275. func (s DeleteBucketTaggingOutput) GoString() string {
  8276. return s.String()
  8277. }
  8278. type DeleteBucketWebsiteInput struct {
  8279. _ struct{} `type:"structure"`
  8280. // Bucket is a required field
  8281. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8282. }
  8283. // String returns the string representation
  8284. func (s DeleteBucketWebsiteInput) String() string {
  8285. return awsutil.Prettify(s)
  8286. }
  8287. // GoString returns the string representation
  8288. func (s DeleteBucketWebsiteInput) GoString() string {
  8289. return s.String()
  8290. }
  8291. // Validate inspects the fields of the type to determine if they are valid.
  8292. func (s *DeleteBucketWebsiteInput) Validate() error {
  8293. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  8294. if s.Bucket == nil {
  8295. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8296. }
  8297. if invalidParams.Len() > 0 {
  8298. return invalidParams
  8299. }
  8300. return nil
  8301. }
  8302. // SetBucket sets the Bucket field's value.
  8303. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  8304. s.Bucket = &v
  8305. return s
  8306. }
  8307. func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
  8308. if s.Bucket == nil {
  8309. return v
  8310. }
  8311. return *s.Bucket
  8312. }
  8313. type DeleteBucketWebsiteOutput struct {
  8314. _ struct{} `type:"structure"`
  8315. }
  8316. // String returns the string representation
  8317. func (s DeleteBucketWebsiteOutput) String() string {
  8318. return awsutil.Prettify(s)
  8319. }
  8320. // GoString returns the string representation
  8321. func (s DeleteBucketWebsiteOutput) GoString() string {
  8322. return s.String()
  8323. }
  8324. type DeleteMarkerEntry struct {
  8325. _ struct{} `type:"structure"`
  8326. // Specifies whether the object is (true) or is not (false) the latest version
  8327. // of an object.
  8328. IsLatest *bool `type:"boolean"`
  8329. // The object key.
  8330. Key *string `min:"1" type:"string"`
  8331. // Date and time the object was last modified.
  8332. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  8333. Owner *Owner `type:"structure"`
  8334. // Version ID of an object.
  8335. VersionId *string `type:"string"`
  8336. }
  8337. // String returns the string representation
  8338. func (s DeleteMarkerEntry) String() string {
  8339. return awsutil.Prettify(s)
  8340. }
  8341. // GoString returns the string representation
  8342. func (s DeleteMarkerEntry) GoString() string {
  8343. return s.String()
  8344. }
  8345. // SetIsLatest sets the IsLatest field's value.
  8346. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  8347. s.IsLatest = &v
  8348. return s
  8349. }
  8350. // SetKey sets the Key field's value.
  8351. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  8352. s.Key = &v
  8353. return s
  8354. }
  8355. // SetLastModified sets the LastModified field's value.
  8356. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  8357. s.LastModified = &v
  8358. return s
  8359. }
  8360. // SetOwner sets the Owner field's value.
  8361. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  8362. s.Owner = v
  8363. return s
  8364. }
  8365. // SetVersionId sets the VersionId field's value.
  8366. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  8367. s.VersionId = &v
  8368. return s
  8369. }
  8370. type DeleteObjectInput struct {
  8371. _ struct{} `type:"structure"`
  8372. // Bucket is a required field
  8373. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8374. // Key is a required field
  8375. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8376. // The concatenation of the authentication device's serial number, a space,
  8377. // and the value that is displayed on your authentication device.
  8378. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8379. // Confirms that the requester knows that she or he will be charged for the
  8380. // request. Bucket owners need not specify this parameter in their requests.
  8381. // Documentation on downloading objects from requester pays buckets can be found
  8382. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8383. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8384. // VersionId used to reference a specific version of the object.
  8385. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  8386. }
  8387. // String returns the string representation
  8388. func (s DeleteObjectInput) String() string {
  8389. return awsutil.Prettify(s)
  8390. }
  8391. // GoString returns the string representation
  8392. func (s DeleteObjectInput) GoString() string {
  8393. return s.String()
  8394. }
  8395. // Validate inspects the fields of the type to determine if they are valid.
  8396. func (s *DeleteObjectInput) Validate() error {
  8397. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  8398. if s.Bucket == nil {
  8399. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8400. }
  8401. if s.Key == nil {
  8402. invalidParams.Add(request.NewErrParamRequired("Key"))
  8403. }
  8404. if s.Key != nil && len(*s.Key) < 1 {
  8405. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8406. }
  8407. if invalidParams.Len() > 0 {
  8408. return invalidParams
  8409. }
  8410. return nil
  8411. }
  8412. // SetBucket sets the Bucket field's value.
  8413. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  8414. s.Bucket = &v
  8415. return s
  8416. }
  8417. func (s *DeleteObjectInput) getBucket() (v string) {
  8418. if s.Bucket == nil {
  8419. return v
  8420. }
  8421. return *s.Bucket
  8422. }
  8423. // SetKey sets the Key field's value.
  8424. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  8425. s.Key = &v
  8426. return s
  8427. }
  8428. // SetMFA sets the MFA field's value.
  8429. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  8430. s.MFA = &v
  8431. return s
  8432. }
  8433. // SetRequestPayer sets the RequestPayer field's value.
  8434. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  8435. s.RequestPayer = &v
  8436. return s
  8437. }
  8438. // SetVersionId sets the VersionId field's value.
  8439. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  8440. s.VersionId = &v
  8441. return s
  8442. }
  8443. type DeleteObjectOutput struct {
  8444. _ struct{} `type:"structure"`
  8445. // Specifies whether the versioned object that was permanently deleted was (true)
  8446. // or was not (false) a delete marker.
  8447. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  8448. // If present, indicates that the requester was successfully charged for the
  8449. // request.
  8450. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8451. // Returns the version ID of the delete marker created as a result of the DELETE
  8452. // operation.
  8453. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8454. }
  8455. // String returns the string representation
  8456. func (s DeleteObjectOutput) String() string {
  8457. return awsutil.Prettify(s)
  8458. }
  8459. // GoString returns the string representation
  8460. func (s DeleteObjectOutput) GoString() string {
  8461. return s.String()
  8462. }
  8463. // SetDeleteMarker sets the DeleteMarker field's value.
  8464. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  8465. s.DeleteMarker = &v
  8466. return s
  8467. }
  8468. // SetRequestCharged sets the RequestCharged field's value.
  8469. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  8470. s.RequestCharged = &v
  8471. return s
  8472. }
  8473. // SetVersionId sets the VersionId field's value.
  8474. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  8475. s.VersionId = &v
  8476. return s
  8477. }
  8478. type DeleteObjectTaggingInput struct {
  8479. _ struct{} `type:"structure"`
  8480. // Bucket is a required field
  8481. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8482. // Key is a required field
  8483. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8484. // The versionId of the object that the tag-set will be removed from.
  8485. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  8486. }
  8487. // String returns the string representation
  8488. func (s DeleteObjectTaggingInput) String() string {
  8489. return awsutil.Prettify(s)
  8490. }
  8491. // GoString returns the string representation
  8492. func (s DeleteObjectTaggingInput) GoString() string {
  8493. return s.String()
  8494. }
  8495. // Validate inspects the fields of the type to determine if they are valid.
  8496. func (s *DeleteObjectTaggingInput) Validate() error {
  8497. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  8498. if s.Bucket == nil {
  8499. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8500. }
  8501. if s.Key == nil {
  8502. invalidParams.Add(request.NewErrParamRequired("Key"))
  8503. }
  8504. if s.Key != nil && len(*s.Key) < 1 {
  8505. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8506. }
  8507. if invalidParams.Len() > 0 {
  8508. return invalidParams
  8509. }
  8510. return nil
  8511. }
  8512. // SetBucket sets the Bucket field's value.
  8513. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  8514. s.Bucket = &v
  8515. return s
  8516. }
  8517. func (s *DeleteObjectTaggingInput) getBucket() (v string) {
  8518. if s.Bucket == nil {
  8519. return v
  8520. }
  8521. return *s.Bucket
  8522. }
  8523. // SetKey sets the Key field's value.
  8524. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  8525. s.Key = &v
  8526. return s
  8527. }
  8528. // SetVersionId sets the VersionId field's value.
  8529. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  8530. s.VersionId = &v
  8531. return s
  8532. }
  8533. type DeleteObjectTaggingOutput struct {
  8534. _ struct{} `type:"structure"`
  8535. // The versionId of the object the tag-set was removed from.
  8536. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8537. }
  8538. // String returns the string representation
  8539. func (s DeleteObjectTaggingOutput) String() string {
  8540. return awsutil.Prettify(s)
  8541. }
  8542. // GoString returns the string representation
  8543. func (s DeleteObjectTaggingOutput) GoString() string {
  8544. return s.String()
  8545. }
  8546. // SetVersionId sets the VersionId field's value.
  8547. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  8548. s.VersionId = &v
  8549. return s
  8550. }
  8551. type DeleteObjectsInput struct {
  8552. _ struct{} `type:"structure" payload:"Delete"`
  8553. // Bucket is a required field
  8554. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8555. // Delete is a required field
  8556. Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  8557. // The concatenation of the authentication device's serial number, a space,
  8558. // and the value that is displayed on your authentication device.
  8559. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8560. // Confirms that the requester knows that she or he will be charged for the
  8561. // request. Bucket owners need not specify this parameter in their requests.
  8562. // Documentation on downloading objects from requester pays buckets can be found
  8563. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8564. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8565. }
  8566. // String returns the string representation
  8567. func (s DeleteObjectsInput) String() string {
  8568. return awsutil.Prettify(s)
  8569. }
  8570. // GoString returns the string representation
  8571. func (s DeleteObjectsInput) GoString() string {
  8572. return s.String()
  8573. }
  8574. // Validate inspects the fields of the type to determine if they are valid.
  8575. func (s *DeleteObjectsInput) Validate() error {
  8576. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  8577. if s.Bucket == nil {
  8578. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8579. }
  8580. if s.Delete == nil {
  8581. invalidParams.Add(request.NewErrParamRequired("Delete"))
  8582. }
  8583. if s.Delete != nil {
  8584. if err := s.Delete.Validate(); err != nil {
  8585. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  8586. }
  8587. }
  8588. if invalidParams.Len() > 0 {
  8589. return invalidParams
  8590. }
  8591. return nil
  8592. }
  8593. // SetBucket sets the Bucket field's value.
  8594. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  8595. s.Bucket = &v
  8596. return s
  8597. }
  8598. func (s *DeleteObjectsInput) getBucket() (v string) {
  8599. if s.Bucket == nil {
  8600. return v
  8601. }
  8602. return *s.Bucket
  8603. }
  8604. // SetDelete sets the Delete field's value.
  8605. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  8606. s.Delete = v
  8607. return s
  8608. }
  8609. // SetMFA sets the MFA field's value.
  8610. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  8611. s.MFA = &v
  8612. return s
  8613. }
  8614. // SetRequestPayer sets the RequestPayer field's value.
  8615. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  8616. s.RequestPayer = &v
  8617. return s
  8618. }
  8619. type DeleteObjectsOutput struct {
  8620. _ struct{} `type:"structure"`
  8621. Deleted []*DeletedObject `type:"list" flattened:"true"`
  8622. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  8623. // If present, indicates that the requester was successfully charged for the
  8624. // request.
  8625. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8626. }
  8627. // String returns the string representation
  8628. func (s DeleteObjectsOutput) String() string {
  8629. return awsutil.Prettify(s)
  8630. }
  8631. // GoString returns the string representation
  8632. func (s DeleteObjectsOutput) GoString() string {
  8633. return s.String()
  8634. }
  8635. // SetDeleted sets the Deleted field's value.
  8636. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  8637. s.Deleted = v
  8638. return s
  8639. }
  8640. // SetErrors sets the Errors field's value.
  8641. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  8642. s.Errors = v
  8643. return s
  8644. }
  8645. // SetRequestCharged sets the RequestCharged field's value.
  8646. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  8647. s.RequestCharged = &v
  8648. return s
  8649. }
  8650. type DeletedObject struct {
  8651. _ struct{} `type:"structure"`
  8652. DeleteMarker *bool `type:"boolean"`
  8653. DeleteMarkerVersionId *string `type:"string"`
  8654. Key *string `min:"1" type:"string"`
  8655. VersionId *string `type:"string"`
  8656. }
  8657. // String returns the string representation
  8658. func (s DeletedObject) String() string {
  8659. return awsutil.Prettify(s)
  8660. }
  8661. // GoString returns the string representation
  8662. func (s DeletedObject) GoString() string {
  8663. return s.String()
  8664. }
  8665. // SetDeleteMarker sets the DeleteMarker field's value.
  8666. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  8667. s.DeleteMarker = &v
  8668. return s
  8669. }
  8670. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  8671. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  8672. s.DeleteMarkerVersionId = &v
  8673. return s
  8674. }
  8675. // SetKey sets the Key field's value.
  8676. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  8677. s.Key = &v
  8678. return s
  8679. }
  8680. // SetVersionId sets the VersionId field's value.
  8681. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  8682. s.VersionId = &v
  8683. return s
  8684. }
  8685. // Container for replication destination information.
  8686. type Destination struct {
  8687. _ struct{} `type:"structure"`
  8688. // Container for information regarding the access control for replicas.
  8689. AccessControlTranslation *AccessControlTranslation `type:"structure"`
  8690. // Account ID of the destination bucket. Currently this is only being verified
  8691. // if Access Control Translation is enabled
  8692. Account *string `type:"string"`
  8693. // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
  8694. // replicas of the object identified by the rule.
  8695. //
  8696. // Bucket is a required field
  8697. Bucket *string `type:"string" required:"true"`
  8698. // Container for information regarding encryption based configuration for replicas.
  8699. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  8700. // The class of storage used to store the object.
  8701. StorageClass *string `type:"string" enum:"StorageClass"`
  8702. }
  8703. // String returns the string representation
  8704. func (s Destination) String() string {
  8705. return awsutil.Prettify(s)
  8706. }
  8707. // GoString returns the string representation
  8708. func (s Destination) GoString() string {
  8709. return s.String()
  8710. }
  8711. // Validate inspects the fields of the type to determine if they are valid.
  8712. func (s *Destination) Validate() error {
  8713. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  8714. if s.Bucket == nil {
  8715. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8716. }
  8717. if s.AccessControlTranslation != nil {
  8718. if err := s.AccessControlTranslation.Validate(); err != nil {
  8719. invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
  8720. }
  8721. }
  8722. if invalidParams.Len() > 0 {
  8723. return invalidParams
  8724. }
  8725. return nil
  8726. }
  8727. // SetAccessControlTranslation sets the AccessControlTranslation field's value.
  8728. func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
  8729. s.AccessControlTranslation = v
  8730. return s
  8731. }
  8732. // SetAccount sets the Account field's value.
  8733. func (s *Destination) SetAccount(v string) *Destination {
  8734. s.Account = &v
  8735. return s
  8736. }
  8737. // SetBucket sets the Bucket field's value.
  8738. func (s *Destination) SetBucket(v string) *Destination {
  8739. s.Bucket = &v
  8740. return s
  8741. }
  8742. func (s *Destination) getBucket() (v string) {
  8743. if s.Bucket == nil {
  8744. return v
  8745. }
  8746. return *s.Bucket
  8747. }
  8748. // SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
  8749. func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
  8750. s.EncryptionConfiguration = v
  8751. return s
  8752. }
  8753. // SetStorageClass sets the StorageClass field's value.
  8754. func (s *Destination) SetStorageClass(v string) *Destination {
  8755. s.StorageClass = &v
  8756. return s
  8757. }
  8758. // Describes the server-side encryption that will be applied to the restore
  8759. // results.
  8760. type Encryption struct {
  8761. _ struct{} `type:"structure"`
  8762. // The server-side encryption algorithm used when storing job results in Amazon
  8763. // S3 (e.g., AES256, aws:kms).
  8764. //
  8765. // EncryptionType is a required field
  8766. EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  8767. // If the encryption type is aws:kms, this optional value can be used to specify
  8768. // the encryption context for the restore results.
  8769. KMSContext *string `type:"string"`
  8770. // If the encryption type is aws:kms, this optional value specifies the AWS
  8771. // KMS key ID to use for encryption of job results.
  8772. KMSKeyId *string `type:"string"`
  8773. }
  8774. // String returns the string representation
  8775. func (s Encryption) String() string {
  8776. return awsutil.Prettify(s)
  8777. }
  8778. // GoString returns the string representation
  8779. func (s Encryption) GoString() string {
  8780. return s.String()
  8781. }
  8782. // Validate inspects the fields of the type to determine if they are valid.
  8783. func (s *Encryption) Validate() error {
  8784. invalidParams := request.ErrInvalidParams{Context: "Encryption"}
  8785. if s.EncryptionType == nil {
  8786. invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  8787. }
  8788. if invalidParams.Len() > 0 {
  8789. return invalidParams
  8790. }
  8791. return nil
  8792. }
  8793. // SetEncryptionType sets the EncryptionType field's value.
  8794. func (s *Encryption) SetEncryptionType(v string) *Encryption {
  8795. s.EncryptionType = &v
  8796. return s
  8797. }
  8798. // SetKMSContext sets the KMSContext field's value.
  8799. func (s *Encryption) SetKMSContext(v string) *Encryption {
  8800. s.KMSContext = &v
  8801. return s
  8802. }
  8803. // SetKMSKeyId sets the KMSKeyId field's value.
  8804. func (s *Encryption) SetKMSKeyId(v string) *Encryption {
  8805. s.KMSKeyId = &v
  8806. return s
  8807. }
  8808. // Container for information regarding encryption based configuration for replicas.
  8809. type EncryptionConfiguration struct {
  8810. _ struct{} `type:"structure"`
  8811. // The id of the KMS key used to encrypt the replica object.
  8812. ReplicaKmsKeyID *string `type:"string"`
  8813. }
  8814. // String returns the string representation
  8815. func (s EncryptionConfiguration) String() string {
  8816. return awsutil.Prettify(s)
  8817. }
  8818. // GoString returns the string representation
  8819. func (s EncryptionConfiguration) GoString() string {
  8820. return s.String()
  8821. }
  8822. // SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
  8823. func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
  8824. s.ReplicaKmsKeyID = &v
  8825. return s
  8826. }
  8827. type EndEvent struct {
  8828. _ struct{} `type:"structure"`
  8829. }
  8830. // String returns the string representation
  8831. func (s EndEvent) String() string {
  8832. return awsutil.Prettify(s)
  8833. }
  8834. // GoString returns the string representation
  8835. func (s EndEvent) GoString() string {
  8836. return s.String()
  8837. }
  8838. // The EndEvent is and event in the SelectObjectContentEventStream group of events.
  8839. func (s *EndEvent) eventSelectObjectContentEventStream() {}
  8840. // UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
  8841. // This method is only used internally within the SDK's EventStream handling.
  8842. func (s *EndEvent) UnmarshalEvent(
  8843. payloadUnmarshaler protocol.PayloadUnmarshaler,
  8844. msg eventstream.Message,
  8845. ) error {
  8846. return nil
  8847. }
  8848. type Error struct {
  8849. _ struct{} `type:"structure"`
  8850. Code *string `type:"string"`
  8851. Key *string `min:"1" type:"string"`
  8852. Message *string `type:"string"`
  8853. VersionId *string `type:"string"`
  8854. }
  8855. // String returns the string representation
  8856. func (s Error) String() string {
  8857. return awsutil.Prettify(s)
  8858. }
  8859. // GoString returns the string representation
  8860. func (s Error) GoString() string {
  8861. return s.String()
  8862. }
  8863. // SetCode sets the Code field's value.
  8864. func (s *Error) SetCode(v string) *Error {
  8865. s.Code = &v
  8866. return s
  8867. }
  8868. // SetKey sets the Key field's value.
  8869. func (s *Error) SetKey(v string) *Error {
  8870. s.Key = &v
  8871. return s
  8872. }
  8873. // SetMessage sets the Message field's value.
  8874. func (s *Error) SetMessage(v string) *Error {
  8875. s.Message = &v
  8876. return s
  8877. }
  8878. // SetVersionId sets the VersionId field's value.
  8879. func (s *Error) SetVersionId(v string) *Error {
  8880. s.VersionId = &v
  8881. return s
  8882. }
  8883. type ErrorDocument struct {
  8884. _ struct{} `type:"structure"`
  8885. // The object key name to use when a 4XX class error occurs.
  8886. //
  8887. // Key is a required field
  8888. Key *string `min:"1" type:"string" required:"true"`
  8889. }
  8890. // String returns the string representation
  8891. func (s ErrorDocument) String() string {
  8892. return awsutil.Prettify(s)
  8893. }
  8894. // GoString returns the string representation
  8895. func (s ErrorDocument) GoString() string {
  8896. return s.String()
  8897. }
  8898. // Validate inspects the fields of the type to determine if they are valid.
  8899. func (s *ErrorDocument) Validate() error {
  8900. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  8901. if s.Key == nil {
  8902. invalidParams.Add(request.NewErrParamRequired("Key"))
  8903. }
  8904. if s.Key != nil && len(*s.Key) < 1 {
  8905. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8906. }
  8907. if invalidParams.Len() > 0 {
  8908. return invalidParams
  8909. }
  8910. return nil
  8911. }
  8912. // SetKey sets the Key field's value.
  8913. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  8914. s.Key = &v
  8915. return s
  8916. }
  8917. // Container for key value pair that defines the criteria for the filter rule.
  8918. type FilterRule struct {
  8919. _ struct{} `type:"structure"`
  8920. // Object key name prefix or suffix identifying one or more objects to which
  8921. // the filtering rule applies. Maximum prefix length can be up to 1,024 characters.
  8922. // Overlapping prefixes and suffixes are not supported. For more information,
  8923. // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  8924. Name *string `type:"string" enum:"FilterRuleName"`
  8925. Value *string `type:"string"`
  8926. }
  8927. // String returns the string representation
  8928. func (s FilterRule) String() string {
  8929. return awsutil.Prettify(s)
  8930. }
  8931. // GoString returns the string representation
  8932. func (s FilterRule) GoString() string {
  8933. return s.String()
  8934. }
  8935. // SetName sets the Name field's value.
  8936. func (s *FilterRule) SetName(v string) *FilterRule {
  8937. s.Name = &v
  8938. return s
  8939. }
  8940. // SetValue sets the Value field's value.
  8941. func (s *FilterRule) SetValue(v string) *FilterRule {
  8942. s.Value = &v
  8943. return s
  8944. }
  8945. type GetBucketAccelerateConfigurationInput struct {
  8946. _ struct{} `type:"structure"`
  8947. // Name of the bucket for which the accelerate configuration is retrieved.
  8948. //
  8949. // Bucket is a required field
  8950. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8951. }
  8952. // String returns the string representation
  8953. func (s GetBucketAccelerateConfigurationInput) String() string {
  8954. return awsutil.Prettify(s)
  8955. }
  8956. // GoString returns the string representation
  8957. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  8958. return s.String()
  8959. }
  8960. // Validate inspects the fields of the type to determine if they are valid.
  8961. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  8962. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  8963. if s.Bucket == nil {
  8964. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8965. }
  8966. if invalidParams.Len() > 0 {
  8967. return invalidParams
  8968. }
  8969. return nil
  8970. }
  8971. // SetBucket sets the Bucket field's value.
  8972. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  8973. s.Bucket = &v
  8974. return s
  8975. }
  8976. func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
  8977. if s.Bucket == nil {
  8978. return v
  8979. }
  8980. return *s.Bucket
  8981. }
  8982. type GetBucketAccelerateConfigurationOutput struct {
  8983. _ struct{} `type:"structure"`
  8984. // The accelerate configuration of the bucket.
  8985. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  8986. }
  8987. // String returns the string representation
  8988. func (s GetBucketAccelerateConfigurationOutput) String() string {
  8989. return awsutil.Prettify(s)
  8990. }
  8991. // GoString returns the string representation
  8992. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  8993. return s.String()
  8994. }
  8995. // SetStatus sets the Status field's value.
  8996. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  8997. s.Status = &v
  8998. return s
  8999. }
  9000. type GetBucketAclInput struct {
  9001. _ struct{} `type:"structure"`
  9002. // Bucket is a required field
  9003. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9004. }
  9005. // String returns the string representation
  9006. func (s GetBucketAclInput) String() string {
  9007. return awsutil.Prettify(s)
  9008. }
  9009. // GoString returns the string representation
  9010. func (s GetBucketAclInput) GoString() string {
  9011. return s.String()
  9012. }
  9013. // Validate inspects the fields of the type to determine if they are valid.
  9014. func (s *GetBucketAclInput) Validate() error {
  9015. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  9016. if s.Bucket == nil {
  9017. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9018. }
  9019. if invalidParams.Len() > 0 {
  9020. return invalidParams
  9021. }
  9022. return nil
  9023. }
  9024. // SetBucket sets the Bucket field's value.
  9025. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  9026. s.Bucket = &v
  9027. return s
  9028. }
  9029. func (s *GetBucketAclInput) getBucket() (v string) {
  9030. if s.Bucket == nil {
  9031. return v
  9032. }
  9033. return *s.Bucket
  9034. }
  9035. type GetBucketAclOutput struct {
  9036. _ struct{} `type:"structure"`
  9037. // A list of grants.
  9038. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  9039. Owner *Owner `type:"structure"`
  9040. }
  9041. // String returns the string representation
  9042. func (s GetBucketAclOutput) String() string {
  9043. return awsutil.Prettify(s)
  9044. }
  9045. // GoString returns the string representation
  9046. func (s GetBucketAclOutput) GoString() string {
  9047. return s.String()
  9048. }
  9049. // SetGrants sets the Grants field's value.
  9050. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  9051. s.Grants = v
  9052. return s
  9053. }
  9054. // SetOwner sets the Owner field's value.
  9055. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  9056. s.Owner = v
  9057. return s
  9058. }
  9059. type GetBucketAnalyticsConfigurationInput struct {
  9060. _ struct{} `type:"structure"`
  9061. // The name of the bucket from which an analytics configuration is retrieved.
  9062. //
  9063. // Bucket is a required field
  9064. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9065. // The identifier used to represent an analytics configuration.
  9066. //
  9067. // Id is a required field
  9068. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9069. }
  9070. // String returns the string representation
  9071. func (s GetBucketAnalyticsConfigurationInput) String() string {
  9072. return awsutil.Prettify(s)
  9073. }
  9074. // GoString returns the string representation
  9075. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  9076. return s.String()
  9077. }
  9078. // Validate inspects the fields of the type to determine if they are valid.
  9079. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  9080. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  9081. if s.Bucket == nil {
  9082. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9083. }
  9084. if s.Id == nil {
  9085. invalidParams.Add(request.NewErrParamRequired("Id"))
  9086. }
  9087. if invalidParams.Len() > 0 {
  9088. return invalidParams
  9089. }
  9090. return nil
  9091. }
  9092. // SetBucket sets the Bucket field's value.
  9093. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  9094. s.Bucket = &v
  9095. return s
  9096. }
  9097. func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
  9098. if s.Bucket == nil {
  9099. return v
  9100. }
  9101. return *s.Bucket
  9102. }
  9103. // SetId sets the Id field's value.
  9104. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  9105. s.Id = &v
  9106. return s
  9107. }
  9108. type GetBucketAnalyticsConfigurationOutput struct {
  9109. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  9110. // The configuration and any analyses for the analytics filter.
  9111. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  9112. }
  9113. // String returns the string representation
  9114. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  9115. return awsutil.Prettify(s)
  9116. }
  9117. // GoString returns the string representation
  9118. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  9119. return s.String()
  9120. }
  9121. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  9122. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  9123. s.AnalyticsConfiguration = v
  9124. return s
  9125. }
  9126. type GetBucketCorsInput struct {
  9127. _ struct{} `type:"structure"`
  9128. // Bucket is a required field
  9129. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9130. }
  9131. // String returns the string representation
  9132. func (s GetBucketCorsInput) String() string {
  9133. return awsutil.Prettify(s)
  9134. }
  9135. // GoString returns the string representation
  9136. func (s GetBucketCorsInput) GoString() string {
  9137. return s.String()
  9138. }
  9139. // Validate inspects the fields of the type to determine if they are valid.
  9140. func (s *GetBucketCorsInput) Validate() error {
  9141. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  9142. if s.Bucket == nil {
  9143. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9144. }
  9145. if invalidParams.Len() > 0 {
  9146. return invalidParams
  9147. }
  9148. return nil
  9149. }
  9150. // SetBucket sets the Bucket field's value.
  9151. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  9152. s.Bucket = &v
  9153. return s
  9154. }
  9155. func (s *GetBucketCorsInput) getBucket() (v string) {
  9156. if s.Bucket == nil {
  9157. return v
  9158. }
  9159. return *s.Bucket
  9160. }
  9161. type GetBucketCorsOutput struct {
  9162. _ struct{} `type:"structure"`
  9163. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  9164. }
  9165. // String returns the string representation
  9166. func (s GetBucketCorsOutput) String() string {
  9167. return awsutil.Prettify(s)
  9168. }
  9169. // GoString returns the string representation
  9170. func (s GetBucketCorsOutput) GoString() string {
  9171. return s.String()
  9172. }
  9173. // SetCORSRules sets the CORSRules field's value.
  9174. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  9175. s.CORSRules = v
  9176. return s
  9177. }
  9178. type GetBucketEncryptionInput struct {
  9179. _ struct{} `type:"structure"`
  9180. // The name of the bucket from which the server-side encryption configuration
  9181. // is retrieved.
  9182. //
  9183. // Bucket is a required field
  9184. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9185. }
  9186. // String returns the string representation
  9187. func (s GetBucketEncryptionInput) String() string {
  9188. return awsutil.Prettify(s)
  9189. }
  9190. // GoString returns the string representation
  9191. func (s GetBucketEncryptionInput) GoString() string {
  9192. return s.String()
  9193. }
  9194. // Validate inspects the fields of the type to determine if they are valid.
  9195. func (s *GetBucketEncryptionInput) Validate() error {
  9196. invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
  9197. if s.Bucket == nil {
  9198. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9199. }
  9200. if invalidParams.Len() > 0 {
  9201. return invalidParams
  9202. }
  9203. return nil
  9204. }
  9205. // SetBucket sets the Bucket field's value.
  9206. func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
  9207. s.Bucket = &v
  9208. return s
  9209. }
  9210. func (s *GetBucketEncryptionInput) getBucket() (v string) {
  9211. if s.Bucket == nil {
  9212. return v
  9213. }
  9214. return *s.Bucket
  9215. }
  9216. type GetBucketEncryptionOutput struct {
  9217. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  9218. // Container for server-side encryption configuration rules. Currently S3 supports
  9219. // one rule only.
  9220. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
  9221. }
  9222. // String returns the string representation
  9223. func (s GetBucketEncryptionOutput) String() string {
  9224. return awsutil.Prettify(s)
  9225. }
  9226. // GoString returns the string representation
  9227. func (s GetBucketEncryptionOutput) GoString() string {
  9228. return s.String()
  9229. }
  9230. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  9231. func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
  9232. s.ServerSideEncryptionConfiguration = v
  9233. return s
  9234. }
  9235. type GetBucketInventoryConfigurationInput struct {
  9236. _ struct{} `type:"structure"`
  9237. // The name of the bucket containing the inventory configuration to retrieve.
  9238. //
  9239. // Bucket is a required field
  9240. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9241. // The ID used to identify the inventory configuration.
  9242. //
  9243. // Id is a required field
  9244. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9245. }
  9246. // String returns the string representation
  9247. func (s GetBucketInventoryConfigurationInput) String() string {
  9248. return awsutil.Prettify(s)
  9249. }
  9250. // GoString returns the string representation
  9251. func (s GetBucketInventoryConfigurationInput) GoString() string {
  9252. return s.String()
  9253. }
  9254. // Validate inspects the fields of the type to determine if they are valid.
  9255. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  9256. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  9257. if s.Bucket == nil {
  9258. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9259. }
  9260. if s.Id == nil {
  9261. invalidParams.Add(request.NewErrParamRequired("Id"))
  9262. }
  9263. if invalidParams.Len() > 0 {
  9264. return invalidParams
  9265. }
  9266. return nil
  9267. }
  9268. // SetBucket sets the Bucket field's value.
  9269. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  9270. s.Bucket = &v
  9271. return s
  9272. }
  9273. func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
  9274. if s.Bucket == nil {
  9275. return v
  9276. }
  9277. return *s.Bucket
  9278. }
  9279. // SetId sets the Id field's value.
  9280. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  9281. s.Id = &v
  9282. return s
  9283. }
  9284. type GetBucketInventoryConfigurationOutput struct {
  9285. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  9286. // Specifies the inventory configuration.
  9287. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  9288. }
  9289. // String returns the string representation
  9290. func (s GetBucketInventoryConfigurationOutput) String() string {
  9291. return awsutil.Prettify(s)
  9292. }
  9293. // GoString returns the string representation
  9294. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  9295. return s.String()
  9296. }
  9297. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  9298. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  9299. s.InventoryConfiguration = v
  9300. return s
  9301. }
  9302. type GetBucketLifecycleConfigurationInput struct {
  9303. _ struct{} `type:"structure"`
  9304. // Bucket is a required field
  9305. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9306. }
  9307. // String returns the string representation
  9308. func (s GetBucketLifecycleConfigurationInput) String() string {
  9309. return awsutil.Prettify(s)
  9310. }
  9311. // GoString returns the string representation
  9312. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  9313. return s.String()
  9314. }
  9315. // Validate inspects the fields of the type to determine if they are valid.
  9316. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  9317. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  9318. if s.Bucket == nil {
  9319. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9320. }
  9321. if invalidParams.Len() > 0 {
  9322. return invalidParams
  9323. }
  9324. return nil
  9325. }
  9326. // SetBucket sets the Bucket field's value.
  9327. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  9328. s.Bucket = &v
  9329. return s
  9330. }
  9331. func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
  9332. if s.Bucket == nil {
  9333. return v
  9334. }
  9335. return *s.Bucket
  9336. }
  9337. type GetBucketLifecycleConfigurationOutput struct {
  9338. _ struct{} `type:"structure"`
  9339. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  9340. }
  9341. // String returns the string representation
  9342. func (s GetBucketLifecycleConfigurationOutput) String() string {
  9343. return awsutil.Prettify(s)
  9344. }
  9345. // GoString returns the string representation
  9346. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  9347. return s.String()
  9348. }
  9349. // SetRules sets the Rules field's value.
  9350. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  9351. s.Rules = v
  9352. return s
  9353. }
  9354. type GetBucketLifecycleInput struct {
  9355. _ struct{} `type:"structure"`
  9356. // Bucket is a required field
  9357. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9358. }
  9359. // String returns the string representation
  9360. func (s GetBucketLifecycleInput) String() string {
  9361. return awsutil.Prettify(s)
  9362. }
  9363. // GoString returns the string representation
  9364. func (s GetBucketLifecycleInput) GoString() string {
  9365. return s.String()
  9366. }
  9367. // Validate inspects the fields of the type to determine if they are valid.
  9368. func (s *GetBucketLifecycleInput) Validate() error {
  9369. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  9370. if s.Bucket == nil {
  9371. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9372. }
  9373. if invalidParams.Len() > 0 {
  9374. return invalidParams
  9375. }
  9376. return nil
  9377. }
  9378. // SetBucket sets the Bucket field's value.
  9379. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  9380. s.Bucket = &v
  9381. return s
  9382. }
  9383. func (s *GetBucketLifecycleInput) getBucket() (v string) {
  9384. if s.Bucket == nil {
  9385. return v
  9386. }
  9387. return *s.Bucket
  9388. }
  9389. type GetBucketLifecycleOutput struct {
  9390. _ struct{} `type:"structure"`
  9391. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  9392. }
  9393. // String returns the string representation
  9394. func (s GetBucketLifecycleOutput) String() string {
  9395. return awsutil.Prettify(s)
  9396. }
  9397. // GoString returns the string representation
  9398. func (s GetBucketLifecycleOutput) GoString() string {
  9399. return s.String()
  9400. }
  9401. // SetRules sets the Rules field's value.
  9402. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  9403. s.Rules = v
  9404. return s
  9405. }
  9406. type GetBucketLocationInput struct {
  9407. _ struct{} `type:"structure"`
  9408. // Bucket is a required field
  9409. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9410. }
  9411. // String returns the string representation
  9412. func (s GetBucketLocationInput) String() string {
  9413. return awsutil.Prettify(s)
  9414. }
  9415. // GoString returns the string representation
  9416. func (s GetBucketLocationInput) GoString() string {
  9417. return s.String()
  9418. }
  9419. // Validate inspects the fields of the type to determine if they are valid.
  9420. func (s *GetBucketLocationInput) Validate() error {
  9421. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  9422. if s.Bucket == nil {
  9423. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9424. }
  9425. if invalidParams.Len() > 0 {
  9426. return invalidParams
  9427. }
  9428. return nil
  9429. }
  9430. // SetBucket sets the Bucket field's value.
  9431. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  9432. s.Bucket = &v
  9433. return s
  9434. }
  9435. func (s *GetBucketLocationInput) getBucket() (v string) {
  9436. if s.Bucket == nil {
  9437. return v
  9438. }
  9439. return *s.Bucket
  9440. }
  9441. type GetBucketLocationOutput struct {
  9442. _ struct{} `type:"structure"`
  9443. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  9444. }
  9445. // String returns the string representation
  9446. func (s GetBucketLocationOutput) String() string {
  9447. return awsutil.Prettify(s)
  9448. }
  9449. // GoString returns the string representation
  9450. func (s GetBucketLocationOutput) GoString() string {
  9451. return s.String()
  9452. }
  9453. // SetLocationConstraint sets the LocationConstraint field's value.
  9454. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  9455. s.LocationConstraint = &v
  9456. return s
  9457. }
  9458. type GetBucketLoggingInput struct {
  9459. _ struct{} `type:"structure"`
  9460. // Bucket is a required field
  9461. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9462. }
  9463. // String returns the string representation
  9464. func (s GetBucketLoggingInput) String() string {
  9465. return awsutil.Prettify(s)
  9466. }
  9467. // GoString returns the string representation
  9468. func (s GetBucketLoggingInput) GoString() string {
  9469. return s.String()
  9470. }
  9471. // Validate inspects the fields of the type to determine if they are valid.
  9472. func (s *GetBucketLoggingInput) Validate() error {
  9473. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  9474. if s.Bucket == nil {
  9475. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9476. }
  9477. if invalidParams.Len() > 0 {
  9478. return invalidParams
  9479. }
  9480. return nil
  9481. }
  9482. // SetBucket sets the Bucket field's value.
  9483. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  9484. s.Bucket = &v
  9485. return s
  9486. }
  9487. func (s *GetBucketLoggingInput) getBucket() (v string) {
  9488. if s.Bucket == nil {
  9489. return v
  9490. }
  9491. return *s.Bucket
  9492. }
  9493. type GetBucketLoggingOutput struct {
  9494. _ struct{} `type:"structure"`
  9495. // Container for logging information. Presence of this element indicates that
  9496. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  9497. // in this case.
  9498. LoggingEnabled *LoggingEnabled `type:"structure"`
  9499. }
  9500. // String returns the string representation
  9501. func (s GetBucketLoggingOutput) String() string {
  9502. return awsutil.Prettify(s)
  9503. }
  9504. // GoString returns the string representation
  9505. func (s GetBucketLoggingOutput) GoString() string {
  9506. return s.String()
  9507. }
  9508. // SetLoggingEnabled sets the LoggingEnabled field's value.
  9509. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  9510. s.LoggingEnabled = v
  9511. return s
  9512. }
  9513. type GetBucketMetricsConfigurationInput struct {
  9514. _ struct{} `type:"structure"`
  9515. // The name of the bucket containing the metrics configuration to retrieve.
  9516. //
  9517. // Bucket is a required field
  9518. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9519. // The ID used to identify the metrics configuration.
  9520. //
  9521. // Id is a required field
  9522. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9523. }
  9524. // String returns the string representation
  9525. func (s GetBucketMetricsConfigurationInput) String() string {
  9526. return awsutil.Prettify(s)
  9527. }
  9528. // GoString returns the string representation
  9529. func (s GetBucketMetricsConfigurationInput) GoString() string {
  9530. return s.String()
  9531. }
  9532. // Validate inspects the fields of the type to determine if they are valid.
  9533. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  9534. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  9535. if s.Bucket == nil {
  9536. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9537. }
  9538. if s.Id == nil {
  9539. invalidParams.Add(request.NewErrParamRequired("Id"))
  9540. }
  9541. if invalidParams.Len() > 0 {
  9542. return invalidParams
  9543. }
  9544. return nil
  9545. }
  9546. // SetBucket sets the Bucket field's value.
  9547. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  9548. s.Bucket = &v
  9549. return s
  9550. }
  9551. func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
  9552. if s.Bucket == nil {
  9553. return v
  9554. }
  9555. return *s.Bucket
  9556. }
  9557. // SetId sets the Id field's value.
  9558. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  9559. s.Id = &v
  9560. return s
  9561. }
  9562. type GetBucketMetricsConfigurationOutput struct {
  9563. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  9564. // Specifies the metrics configuration.
  9565. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  9566. }
  9567. // String returns the string representation
  9568. func (s GetBucketMetricsConfigurationOutput) String() string {
  9569. return awsutil.Prettify(s)
  9570. }
  9571. // GoString returns the string representation
  9572. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  9573. return s.String()
  9574. }
  9575. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  9576. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  9577. s.MetricsConfiguration = v
  9578. return s
  9579. }
  9580. type GetBucketNotificationConfigurationRequest struct {
  9581. _ struct{} `type:"structure"`
  9582. // Name of the bucket to get the notification configuration for.
  9583. //
  9584. // Bucket is a required field
  9585. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9586. }
  9587. // String returns the string representation
  9588. func (s GetBucketNotificationConfigurationRequest) String() string {
  9589. return awsutil.Prettify(s)
  9590. }
  9591. // GoString returns the string representation
  9592. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  9593. return s.String()
  9594. }
  9595. // Validate inspects the fields of the type to determine if they are valid.
  9596. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  9597. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  9598. if s.Bucket == nil {
  9599. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9600. }
  9601. if invalidParams.Len() > 0 {
  9602. return invalidParams
  9603. }
  9604. return nil
  9605. }
  9606. // SetBucket sets the Bucket field's value.
  9607. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  9608. s.Bucket = &v
  9609. return s
  9610. }
  9611. func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
  9612. if s.Bucket == nil {
  9613. return v
  9614. }
  9615. return *s.Bucket
  9616. }
  9617. type GetBucketPolicyInput struct {
  9618. _ struct{} `type:"structure"`
  9619. // Bucket is a required field
  9620. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9621. }
  9622. // String returns the string representation
  9623. func (s GetBucketPolicyInput) String() string {
  9624. return awsutil.Prettify(s)
  9625. }
  9626. // GoString returns the string representation
  9627. func (s GetBucketPolicyInput) GoString() string {
  9628. return s.String()
  9629. }
  9630. // Validate inspects the fields of the type to determine if they are valid.
  9631. func (s *GetBucketPolicyInput) Validate() error {
  9632. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  9633. if s.Bucket == nil {
  9634. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9635. }
  9636. if invalidParams.Len() > 0 {
  9637. return invalidParams
  9638. }
  9639. return nil
  9640. }
  9641. // SetBucket sets the Bucket field's value.
  9642. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  9643. s.Bucket = &v
  9644. return s
  9645. }
  9646. func (s *GetBucketPolicyInput) getBucket() (v string) {
  9647. if s.Bucket == nil {
  9648. return v
  9649. }
  9650. return *s.Bucket
  9651. }
  9652. type GetBucketPolicyOutput struct {
  9653. _ struct{} `type:"structure" payload:"Policy"`
  9654. // The bucket policy as a JSON document.
  9655. Policy *string `type:"string"`
  9656. }
  9657. // String returns the string representation
  9658. func (s GetBucketPolicyOutput) String() string {
  9659. return awsutil.Prettify(s)
  9660. }
  9661. // GoString returns the string representation
  9662. func (s GetBucketPolicyOutput) GoString() string {
  9663. return s.String()
  9664. }
  9665. // SetPolicy sets the Policy field's value.
  9666. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  9667. s.Policy = &v
  9668. return s
  9669. }
  9670. type GetBucketReplicationInput struct {
  9671. _ struct{} `type:"structure"`
  9672. // Bucket is a required field
  9673. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9674. }
  9675. // String returns the string representation
  9676. func (s GetBucketReplicationInput) String() string {
  9677. return awsutil.Prettify(s)
  9678. }
  9679. // GoString returns the string representation
  9680. func (s GetBucketReplicationInput) GoString() string {
  9681. return s.String()
  9682. }
  9683. // Validate inspects the fields of the type to determine if they are valid.
  9684. func (s *GetBucketReplicationInput) Validate() error {
  9685. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  9686. if s.Bucket == nil {
  9687. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9688. }
  9689. if invalidParams.Len() > 0 {
  9690. return invalidParams
  9691. }
  9692. return nil
  9693. }
  9694. // SetBucket sets the Bucket field's value.
  9695. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  9696. s.Bucket = &v
  9697. return s
  9698. }
  9699. func (s *GetBucketReplicationInput) getBucket() (v string) {
  9700. if s.Bucket == nil {
  9701. return v
  9702. }
  9703. return *s.Bucket
  9704. }
  9705. type GetBucketReplicationOutput struct {
  9706. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  9707. // Container for replication rules. You can add as many as 1,000 rules. Total
  9708. // replication configuration size can be up to 2 MB.
  9709. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  9710. }
  9711. // String returns the string representation
  9712. func (s GetBucketReplicationOutput) String() string {
  9713. return awsutil.Prettify(s)
  9714. }
  9715. // GoString returns the string representation
  9716. func (s GetBucketReplicationOutput) GoString() string {
  9717. return s.String()
  9718. }
  9719. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  9720. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  9721. s.ReplicationConfiguration = v
  9722. return s
  9723. }
  9724. type GetBucketRequestPaymentInput struct {
  9725. _ struct{} `type:"structure"`
  9726. // Bucket is a required field
  9727. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9728. }
  9729. // String returns the string representation
  9730. func (s GetBucketRequestPaymentInput) String() string {
  9731. return awsutil.Prettify(s)
  9732. }
  9733. // GoString returns the string representation
  9734. func (s GetBucketRequestPaymentInput) GoString() string {
  9735. return s.String()
  9736. }
  9737. // Validate inspects the fields of the type to determine if they are valid.
  9738. func (s *GetBucketRequestPaymentInput) Validate() error {
  9739. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  9740. if s.Bucket == nil {
  9741. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9742. }
  9743. if invalidParams.Len() > 0 {
  9744. return invalidParams
  9745. }
  9746. return nil
  9747. }
  9748. // SetBucket sets the Bucket field's value.
  9749. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  9750. s.Bucket = &v
  9751. return s
  9752. }
  9753. func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
  9754. if s.Bucket == nil {
  9755. return v
  9756. }
  9757. return *s.Bucket
  9758. }
  9759. type GetBucketRequestPaymentOutput struct {
  9760. _ struct{} `type:"structure"`
  9761. // Specifies who pays for the download and request fees.
  9762. Payer *string `type:"string" enum:"Payer"`
  9763. }
  9764. // String returns the string representation
  9765. func (s GetBucketRequestPaymentOutput) String() string {
  9766. return awsutil.Prettify(s)
  9767. }
  9768. // GoString returns the string representation
  9769. func (s GetBucketRequestPaymentOutput) GoString() string {
  9770. return s.String()
  9771. }
  9772. // SetPayer sets the Payer field's value.
  9773. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  9774. s.Payer = &v
  9775. return s
  9776. }
  9777. type GetBucketTaggingInput struct {
  9778. _ struct{} `type:"structure"`
  9779. // Bucket is a required field
  9780. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9781. }
  9782. // String returns the string representation
  9783. func (s GetBucketTaggingInput) String() string {
  9784. return awsutil.Prettify(s)
  9785. }
  9786. // GoString returns the string representation
  9787. func (s GetBucketTaggingInput) GoString() string {
  9788. return s.String()
  9789. }
  9790. // Validate inspects the fields of the type to determine if they are valid.
  9791. func (s *GetBucketTaggingInput) Validate() error {
  9792. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  9793. if s.Bucket == nil {
  9794. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9795. }
  9796. if invalidParams.Len() > 0 {
  9797. return invalidParams
  9798. }
  9799. return nil
  9800. }
  9801. // SetBucket sets the Bucket field's value.
  9802. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  9803. s.Bucket = &v
  9804. return s
  9805. }
  9806. func (s *GetBucketTaggingInput) getBucket() (v string) {
  9807. if s.Bucket == nil {
  9808. return v
  9809. }
  9810. return *s.Bucket
  9811. }
  9812. type GetBucketTaggingOutput struct {
  9813. _ struct{} `type:"structure"`
  9814. // TagSet is a required field
  9815. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  9816. }
  9817. // String returns the string representation
  9818. func (s GetBucketTaggingOutput) String() string {
  9819. return awsutil.Prettify(s)
  9820. }
  9821. // GoString returns the string representation
  9822. func (s GetBucketTaggingOutput) GoString() string {
  9823. return s.String()
  9824. }
  9825. // SetTagSet sets the TagSet field's value.
  9826. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  9827. s.TagSet = v
  9828. return s
  9829. }
  9830. type GetBucketVersioningInput struct {
  9831. _ struct{} `type:"structure"`
  9832. // Bucket is a required field
  9833. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9834. }
  9835. // String returns the string representation
  9836. func (s GetBucketVersioningInput) String() string {
  9837. return awsutil.Prettify(s)
  9838. }
  9839. // GoString returns the string representation
  9840. func (s GetBucketVersioningInput) GoString() string {
  9841. return s.String()
  9842. }
  9843. // Validate inspects the fields of the type to determine if they are valid.
  9844. func (s *GetBucketVersioningInput) Validate() error {
  9845. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  9846. if s.Bucket == nil {
  9847. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9848. }
  9849. if invalidParams.Len() > 0 {
  9850. return invalidParams
  9851. }
  9852. return nil
  9853. }
  9854. // SetBucket sets the Bucket field's value.
  9855. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  9856. s.Bucket = &v
  9857. return s
  9858. }
  9859. func (s *GetBucketVersioningInput) getBucket() (v string) {
  9860. if s.Bucket == nil {
  9861. return v
  9862. }
  9863. return *s.Bucket
  9864. }
  9865. type GetBucketVersioningOutput struct {
  9866. _ struct{} `type:"structure"`
  9867. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  9868. // This element is only returned if the bucket has been configured with MFA
  9869. // delete. If the bucket has never been so configured, this element is not returned.
  9870. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  9871. // The versioning state of the bucket.
  9872. Status *string `type:"string" enum:"BucketVersioningStatus"`
  9873. }
  9874. // String returns the string representation
  9875. func (s GetBucketVersioningOutput) String() string {
  9876. return awsutil.Prettify(s)
  9877. }
  9878. // GoString returns the string representation
  9879. func (s GetBucketVersioningOutput) GoString() string {
  9880. return s.String()
  9881. }
  9882. // SetMFADelete sets the MFADelete field's value.
  9883. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  9884. s.MFADelete = &v
  9885. return s
  9886. }
  9887. // SetStatus sets the Status field's value.
  9888. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  9889. s.Status = &v
  9890. return s
  9891. }
  9892. type GetBucketWebsiteInput struct {
  9893. _ struct{} `type:"structure"`
  9894. // Bucket is a required field
  9895. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9896. }
  9897. // String returns the string representation
  9898. func (s GetBucketWebsiteInput) String() string {
  9899. return awsutil.Prettify(s)
  9900. }
  9901. // GoString returns the string representation
  9902. func (s GetBucketWebsiteInput) GoString() string {
  9903. return s.String()
  9904. }
  9905. // Validate inspects the fields of the type to determine if they are valid.
  9906. func (s *GetBucketWebsiteInput) Validate() error {
  9907. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  9908. if s.Bucket == nil {
  9909. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9910. }
  9911. if invalidParams.Len() > 0 {
  9912. return invalidParams
  9913. }
  9914. return nil
  9915. }
  9916. // SetBucket sets the Bucket field's value.
  9917. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  9918. s.Bucket = &v
  9919. return s
  9920. }
  9921. func (s *GetBucketWebsiteInput) getBucket() (v string) {
  9922. if s.Bucket == nil {
  9923. return v
  9924. }
  9925. return *s.Bucket
  9926. }
  9927. type GetBucketWebsiteOutput struct {
  9928. _ struct{} `type:"structure"`
  9929. ErrorDocument *ErrorDocument `type:"structure"`
  9930. IndexDocument *IndexDocument `type:"structure"`
  9931. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  9932. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  9933. }
  9934. // String returns the string representation
  9935. func (s GetBucketWebsiteOutput) String() string {
  9936. return awsutil.Prettify(s)
  9937. }
  9938. // GoString returns the string representation
  9939. func (s GetBucketWebsiteOutput) GoString() string {
  9940. return s.String()
  9941. }
  9942. // SetErrorDocument sets the ErrorDocument field's value.
  9943. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  9944. s.ErrorDocument = v
  9945. return s
  9946. }
  9947. // SetIndexDocument sets the IndexDocument field's value.
  9948. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  9949. s.IndexDocument = v
  9950. return s
  9951. }
  9952. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  9953. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  9954. s.RedirectAllRequestsTo = v
  9955. return s
  9956. }
  9957. // SetRoutingRules sets the RoutingRules field's value.
  9958. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  9959. s.RoutingRules = v
  9960. return s
  9961. }
  9962. type GetObjectAclInput struct {
  9963. _ struct{} `type:"structure"`
  9964. // Bucket is a required field
  9965. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9966. // Key is a required field
  9967. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9968. // Confirms that the requester knows that she or he will be charged for the
  9969. // request. Bucket owners need not specify this parameter in their requests.
  9970. // Documentation on downloading objects from requester pays buckets can be found
  9971. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9972. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9973. // VersionId used to reference a specific version of the object.
  9974. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9975. }
  9976. // String returns the string representation
  9977. func (s GetObjectAclInput) String() string {
  9978. return awsutil.Prettify(s)
  9979. }
  9980. // GoString returns the string representation
  9981. func (s GetObjectAclInput) GoString() string {
  9982. return s.String()
  9983. }
  9984. // Validate inspects the fields of the type to determine if they are valid.
  9985. func (s *GetObjectAclInput) Validate() error {
  9986. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  9987. if s.Bucket == nil {
  9988. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9989. }
  9990. if s.Key == nil {
  9991. invalidParams.Add(request.NewErrParamRequired("Key"))
  9992. }
  9993. if s.Key != nil && len(*s.Key) < 1 {
  9994. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9995. }
  9996. if invalidParams.Len() > 0 {
  9997. return invalidParams
  9998. }
  9999. return nil
  10000. }
  10001. // SetBucket sets the Bucket field's value.
  10002. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  10003. s.Bucket = &v
  10004. return s
  10005. }
  10006. func (s *GetObjectAclInput) getBucket() (v string) {
  10007. if s.Bucket == nil {
  10008. return v
  10009. }
  10010. return *s.Bucket
  10011. }
  10012. // SetKey sets the Key field's value.
  10013. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  10014. s.Key = &v
  10015. return s
  10016. }
  10017. // SetRequestPayer sets the RequestPayer field's value.
  10018. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  10019. s.RequestPayer = &v
  10020. return s
  10021. }
  10022. // SetVersionId sets the VersionId field's value.
  10023. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  10024. s.VersionId = &v
  10025. return s
  10026. }
  10027. type GetObjectAclOutput struct {
  10028. _ struct{} `type:"structure"`
  10029. // A list of grants.
  10030. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  10031. Owner *Owner `type:"structure"`
  10032. // If present, indicates that the requester was successfully charged for the
  10033. // request.
  10034. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10035. }
  10036. // String returns the string representation
  10037. func (s GetObjectAclOutput) String() string {
  10038. return awsutil.Prettify(s)
  10039. }
  10040. // GoString returns the string representation
  10041. func (s GetObjectAclOutput) GoString() string {
  10042. return s.String()
  10043. }
  10044. // SetGrants sets the Grants field's value.
  10045. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  10046. s.Grants = v
  10047. return s
  10048. }
  10049. // SetOwner sets the Owner field's value.
  10050. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  10051. s.Owner = v
  10052. return s
  10053. }
  10054. // SetRequestCharged sets the RequestCharged field's value.
  10055. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  10056. s.RequestCharged = &v
  10057. return s
  10058. }
  10059. type GetObjectInput struct {
  10060. _ struct{} `type:"structure"`
  10061. // Bucket is a required field
  10062. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10063. // Return the object only if its entity tag (ETag) is the same as the one specified,
  10064. // otherwise return a 412 (precondition failed).
  10065. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  10066. // Return the object only if it has been modified since the specified time,
  10067. // otherwise return a 304 (not modified).
  10068. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10069. // Return the object only if its entity tag (ETag) is different from the one
  10070. // specified, otherwise return a 304 (not modified).
  10071. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  10072. // Return the object only if it has not been modified since the specified time,
  10073. // otherwise return a 412 (precondition failed).
  10074. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10075. // Key is a required field
  10076. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10077. // Part number of the object being read. This is a positive integer between
  10078. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  10079. // Useful for downloading just a part of an object.
  10080. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  10081. // Downloads the specified range bytes of an object. For more information about
  10082. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  10083. Range *string `location:"header" locationName:"Range" type:"string"`
  10084. // Confirms that the requester knows that she or he will be charged for the
  10085. // request. Bucket owners need not specify this parameter in their requests.
  10086. // Documentation on downloading objects from requester pays buckets can be found
  10087. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10088. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10089. // Sets the Cache-Control header of the response.
  10090. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  10091. // Sets the Content-Disposition header of the response
  10092. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  10093. // Sets the Content-Encoding header of the response.
  10094. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  10095. // Sets the Content-Language header of the response.
  10096. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  10097. // Sets the Content-Type header of the response.
  10098. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  10099. // Sets the Expires header of the response.
  10100. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
  10101. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  10102. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10103. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  10104. // data. This value is used to store the object and then it is discarded; Amazon
  10105. // does not store the encryption key. The key must be appropriate for use with
  10106. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  10107. // header.
  10108. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  10109. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  10110. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  10111. // key was transmitted without error.
  10112. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10113. // VersionId used to reference a specific version of the object.
  10114. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10115. }
  10116. // String returns the string representation
  10117. func (s GetObjectInput) String() string {
  10118. return awsutil.Prettify(s)
  10119. }
  10120. // GoString returns the string representation
  10121. func (s GetObjectInput) GoString() string {
  10122. return s.String()
  10123. }
  10124. // Validate inspects the fields of the type to determine if they are valid.
  10125. func (s *GetObjectInput) Validate() error {
  10126. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  10127. if s.Bucket == nil {
  10128. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10129. }
  10130. if s.Key == nil {
  10131. invalidParams.Add(request.NewErrParamRequired("Key"))
  10132. }
  10133. if s.Key != nil && len(*s.Key) < 1 {
  10134. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10135. }
  10136. if invalidParams.Len() > 0 {
  10137. return invalidParams
  10138. }
  10139. return nil
  10140. }
  10141. // SetBucket sets the Bucket field's value.
  10142. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  10143. s.Bucket = &v
  10144. return s
  10145. }
  10146. func (s *GetObjectInput) getBucket() (v string) {
  10147. if s.Bucket == nil {
  10148. return v
  10149. }
  10150. return *s.Bucket
  10151. }
  10152. // SetIfMatch sets the IfMatch field's value.
  10153. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  10154. s.IfMatch = &v
  10155. return s
  10156. }
  10157. // SetIfModifiedSince sets the IfModifiedSince field's value.
  10158. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  10159. s.IfModifiedSince = &v
  10160. return s
  10161. }
  10162. // SetIfNoneMatch sets the IfNoneMatch field's value.
  10163. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  10164. s.IfNoneMatch = &v
  10165. return s
  10166. }
  10167. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  10168. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  10169. s.IfUnmodifiedSince = &v
  10170. return s
  10171. }
  10172. // SetKey sets the Key field's value.
  10173. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  10174. s.Key = &v
  10175. return s
  10176. }
  10177. // SetPartNumber sets the PartNumber field's value.
  10178. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  10179. s.PartNumber = &v
  10180. return s
  10181. }
  10182. // SetRange sets the Range field's value.
  10183. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  10184. s.Range = &v
  10185. return s
  10186. }
  10187. // SetRequestPayer sets the RequestPayer field's value.
  10188. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  10189. s.RequestPayer = &v
  10190. return s
  10191. }
  10192. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  10193. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  10194. s.ResponseCacheControl = &v
  10195. return s
  10196. }
  10197. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  10198. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  10199. s.ResponseContentDisposition = &v
  10200. return s
  10201. }
  10202. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  10203. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  10204. s.ResponseContentEncoding = &v
  10205. return s
  10206. }
  10207. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  10208. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  10209. s.ResponseContentLanguage = &v
  10210. return s
  10211. }
  10212. // SetResponseContentType sets the ResponseContentType field's value.
  10213. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  10214. s.ResponseContentType = &v
  10215. return s
  10216. }
  10217. // SetResponseExpires sets the ResponseExpires field's value.
  10218. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  10219. s.ResponseExpires = &v
  10220. return s
  10221. }
  10222. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10223. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  10224. s.SSECustomerAlgorithm = &v
  10225. return s
  10226. }
  10227. // SetSSECustomerKey sets the SSECustomerKey field's value.
  10228. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  10229. s.SSECustomerKey = &v
  10230. return s
  10231. }
  10232. func (s *GetObjectInput) getSSECustomerKey() (v string) {
  10233. if s.SSECustomerKey == nil {
  10234. return v
  10235. }
  10236. return *s.SSECustomerKey
  10237. }
  10238. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10239. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  10240. s.SSECustomerKeyMD5 = &v
  10241. return s
  10242. }
  10243. // SetVersionId sets the VersionId field's value.
  10244. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  10245. s.VersionId = &v
  10246. return s
  10247. }
  10248. type GetObjectOutput struct {
  10249. _ struct{} `type:"structure" payload:"Body"`
  10250. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  10251. // Object data.
  10252. Body io.ReadCloser `type:"blob"`
  10253. // Specifies caching behavior along the request/reply chain.
  10254. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  10255. // Specifies presentational information for the object.
  10256. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  10257. // Specifies what content encodings have been applied to the object and thus
  10258. // what decoding mechanisms must be applied to obtain the media-type referenced
  10259. // by the Content-Type header field.
  10260. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  10261. // The language the content is in.
  10262. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  10263. // Size of the body in bytes.
  10264. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  10265. // The portion of the object returned in the response.
  10266. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  10267. // A standard MIME type describing the format of the object data.
  10268. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  10269. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  10270. // Marker. If false, this response header does not appear in the response.
  10271. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  10272. // An ETag is an opaque identifier assigned by a web server to a specific version
  10273. // of a resource found at a URL
  10274. ETag *string `location:"header" locationName:"ETag" type:"string"`
  10275. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  10276. // includes this header. It includes the expiry-date and rule-id key value pairs
  10277. // providing object expiration information. The value of the rule-id is URL
  10278. // encoded.
  10279. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  10280. // The date and time at which the object is no longer cacheable.
  10281. Expires *string `location:"header" locationName:"Expires" type:"string"`
  10282. // Last modified date of the object
  10283. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  10284. // A map of metadata to store with the object in S3.
  10285. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  10286. // This is set to the number of metadata entries not returned in x-amz-meta
  10287. // headers. This can happen if you create metadata using an API like SOAP that
  10288. // supports more flexible metadata than the REST API. For example, using SOAP,
  10289. // you can create metadata whose values are not legal HTTP headers.
  10290. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  10291. // The count of parts this object has.
  10292. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  10293. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  10294. // If present, indicates that the requester was successfully charged for the
  10295. // request.
  10296. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10297. // Provides information about object restoration operation and expiration time
  10298. // of the restored object copy.
  10299. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  10300. // If server-side encryption with a customer-provided encryption key was requested,
  10301. // the response will include this header confirming the encryption algorithm
  10302. // used.
  10303. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10304. // If server-side encryption with a customer-provided encryption key was requested,
  10305. // the response will include this header to provide round trip message integrity
  10306. // verification of the customer-provided encryption key.
  10307. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10308. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  10309. // encryption key that was used for the object.
  10310. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  10311. // The Server-side encryption algorithm used when storing this object in S3
  10312. // (e.g., AES256, aws:kms).
  10313. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  10314. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  10315. // The number of tags, if any, on the object.
  10316. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  10317. // Version of the object.
  10318. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10319. // If the bucket is configured as a website, redirects requests for this object
  10320. // to another object in the same bucket or to an external URL. Amazon S3 stores
  10321. // the value of this header in the object metadata.
  10322. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  10323. }
  10324. // String returns the string representation
  10325. func (s GetObjectOutput) String() string {
  10326. return awsutil.Prettify(s)
  10327. }
  10328. // GoString returns the string representation
  10329. func (s GetObjectOutput) GoString() string {
  10330. return s.String()
  10331. }
  10332. // SetAcceptRanges sets the AcceptRanges field's value.
  10333. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  10334. s.AcceptRanges = &v
  10335. return s
  10336. }
  10337. // SetBody sets the Body field's value.
  10338. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  10339. s.Body = v
  10340. return s
  10341. }
  10342. // SetCacheControl sets the CacheControl field's value.
  10343. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  10344. s.CacheControl = &v
  10345. return s
  10346. }
  10347. // SetContentDisposition sets the ContentDisposition field's value.
  10348. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  10349. s.ContentDisposition = &v
  10350. return s
  10351. }
  10352. // SetContentEncoding sets the ContentEncoding field's value.
  10353. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  10354. s.ContentEncoding = &v
  10355. return s
  10356. }
  10357. // SetContentLanguage sets the ContentLanguage field's value.
  10358. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  10359. s.ContentLanguage = &v
  10360. return s
  10361. }
  10362. // SetContentLength sets the ContentLength field's value.
  10363. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  10364. s.ContentLength = &v
  10365. return s
  10366. }
  10367. // SetContentRange sets the ContentRange field's value.
  10368. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  10369. s.ContentRange = &v
  10370. return s
  10371. }
  10372. // SetContentType sets the ContentType field's value.
  10373. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  10374. s.ContentType = &v
  10375. return s
  10376. }
  10377. // SetDeleteMarker sets the DeleteMarker field's value.
  10378. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  10379. s.DeleteMarker = &v
  10380. return s
  10381. }
  10382. // SetETag sets the ETag field's value.
  10383. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  10384. s.ETag = &v
  10385. return s
  10386. }
  10387. // SetExpiration sets the Expiration field's value.
  10388. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  10389. s.Expiration = &v
  10390. return s
  10391. }
  10392. // SetExpires sets the Expires field's value.
  10393. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  10394. s.Expires = &v
  10395. return s
  10396. }
  10397. // SetLastModified sets the LastModified field's value.
  10398. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  10399. s.LastModified = &v
  10400. return s
  10401. }
  10402. // SetMetadata sets the Metadata field's value.
  10403. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  10404. s.Metadata = v
  10405. return s
  10406. }
  10407. // SetMissingMeta sets the MissingMeta field's value.
  10408. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  10409. s.MissingMeta = &v
  10410. return s
  10411. }
  10412. // SetPartsCount sets the PartsCount field's value.
  10413. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  10414. s.PartsCount = &v
  10415. return s
  10416. }
  10417. // SetReplicationStatus sets the ReplicationStatus field's value.
  10418. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  10419. s.ReplicationStatus = &v
  10420. return s
  10421. }
  10422. // SetRequestCharged sets the RequestCharged field's value.
  10423. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  10424. s.RequestCharged = &v
  10425. return s
  10426. }
  10427. // SetRestore sets the Restore field's value.
  10428. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  10429. s.Restore = &v
  10430. return s
  10431. }
  10432. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10433. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  10434. s.SSECustomerAlgorithm = &v
  10435. return s
  10436. }
  10437. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10438. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  10439. s.SSECustomerKeyMD5 = &v
  10440. return s
  10441. }
  10442. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  10443. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  10444. s.SSEKMSKeyId = &v
  10445. return s
  10446. }
  10447. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  10448. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  10449. s.ServerSideEncryption = &v
  10450. return s
  10451. }
  10452. // SetStorageClass sets the StorageClass field's value.
  10453. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  10454. s.StorageClass = &v
  10455. return s
  10456. }
  10457. // SetTagCount sets the TagCount field's value.
  10458. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  10459. s.TagCount = &v
  10460. return s
  10461. }
  10462. // SetVersionId sets the VersionId field's value.
  10463. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  10464. s.VersionId = &v
  10465. return s
  10466. }
  10467. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  10468. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  10469. s.WebsiteRedirectLocation = &v
  10470. return s
  10471. }
  10472. type GetObjectTaggingInput struct {
  10473. _ struct{} `type:"structure"`
  10474. // Bucket is a required field
  10475. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10476. // Key is a required field
  10477. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10478. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10479. }
  10480. // String returns the string representation
  10481. func (s GetObjectTaggingInput) String() string {
  10482. return awsutil.Prettify(s)
  10483. }
  10484. // GoString returns the string representation
  10485. func (s GetObjectTaggingInput) GoString() string {
  10486. return s.String()
  10487. }
  10488. // Validate inspects the fields of the type to determine if they are valid.
  10489. func (s *GetObjectTaggingInput) Validate() error {
  10490. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  10491. if s.Bucket == nil {
  10492. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10493. }
  10494. if s.Key == nil {
  10495. invalidParams.Add(request.NewErrParamRequired("Key"))
  10496. }
  10497. if s.Key != nil && len(*s.Key) < 1 {
  10498. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10499. }
  10500. if invalidParams.Len() > 0 {
  10501. return invalidParams
  10502. }
  10503. return nil
  10504. }
  10505. // SetBucket sets the Bucket field's value.
  10506. func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  10507. s.Bucket = &v
  10508. return s
  10509. }
  10510. func (s *GetObjectTaggingInput) getBucket() (v string) {
  10511. if s.Bucket == nil {
  10512. return v
  10513. }
  10514. return *s.Bucket
  10515. }
  10516. // SetKey sets the Key field's value.
  10517. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  10518. s.Key = &v
  10519. return s
  10520. }
  10521. // SetVersionId sets the VersionId field's value.
  10522. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  10523. s.VersionId = &v
  10524. return s
  10525. }
  10526. type GetObjectTaggingOutput struct {
  10527. _ struct{} `type:"structure"`
  10528. // TagSet is a required field
  10529. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  10530. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10531. }
  10532. // String returns the string representation
  10533. func (s GetObjectTaggingOutput) String() string {
  10534. return awsutil.Prettify(s)
  10535. }
  10536. // GoString returns the string representation
  10537. func (s GetObjectTaggingOutput) GoString() string {
  10538. return s.String()
  10539. }
  10540. // SetTagSet sets the TagSet field's value.
  10541. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  10542. s.TagSet = v
  10543. return s
  10544. }
  10545. // SetVersionId sets the VersionId field's value.
  10546. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  10547. s.VersionId = &v
  10548. return s
  10549. }
  10550. type GetObjectTorrentInput struct {
  10551. _ struct{} `type:"structure"`
  10552. // Bucket is a required field
  10553. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10554. // Key is a required field
  10555. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10556. // Confirms that the requester knows that she or he will be charged for the
  10557. // request. Bucket owners need not specify this parameter in their requests.
  10558. // Documentation on downloading objects from requester pays buckets can be found
  10559. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10560. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10561. }
  10562. // String returns the string representation
  10563. func (s GetObjectTorrentInput) String() string {
  10564. return awsutil.Prettify(s)
  10565. }
  10566. // GoString returns the string representation
  10567. func (s GetObjectTorrentInput) GoString() string {
  10568. return s.String()
  10569. }
  10570. // Validate inspects the fields of the type to determine if they are valid.
  10571. func (s *GetObjectTorrentInput) Validate() error {
  10572. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  10573. if s.Bucket == nil {
  10574. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10575. }
  10576. if s.Key == nil {
  10577. invalidParams.Add(request.NewErrParamRequired("Key"))
  10578. }
  10579. if s.Key != nil && len(*s.Key) < 1 {
  10580. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10581. }
  10582. if invalidParams.Len() > 0 {
  10583. return invalidParams
  10584. }
  10585. return nil
  10586. }
  10587. // SetBucket sets the Bucket field's value.
  10588. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  10589. s.Bucket = &v
  10590. return s
  10591. }
  10592. func (s *GetObjectTorrentInput) getBucket() (v string) {
  10593. if s.Bucket == nil {
  10594. return v
  10595. }
  10596. return *s.Bucket
  10597. }
  10598. // SetKey sets the Key field's value.
  10599. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  10600. s.Key = &v
  10601. return s
  10602. }
  10603. // SetRequestPayer sets the RequestPayer field's value.
  10604. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  10605. s.RequestPayer = &v
  10606. return s
  10607. }
  10608. type GetObjectTorrentOutput struct {
  10609. _ struct{} `type:"structure" payload:"Body"`
  10610. Body io.ReadCloser `type:"blob"`
  10611. // If present, indicates that the requester was successfully charged for the
  10612. // request.
  10613. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10614. }
  10615. // String returns the string representation
  10616. func (s GetObjectTorrentOutput) String() string {
  10617. return awsutil.Prettify(s)
  10618. }
  10619. // GoString returns the string representation
  10620. func (s GetObjectTorrentOutput) GoString() string {
  10621. return s.String()
  10622. }
  10623. // SetBody sets the Body field's value.
  10624. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  10625. s.Body = v
  10626. return s
  10627. }
  10628. // SetRequestCharged sets the RequestCharged field's value.
  10629. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  10630. s.RequestCharged = &v
  10631. return s
  10632. }
  10633. type GlacierJobParameters struct {
  10634. _ struct{} `type:"structure"`
  10635. // Glacier retrieval tier at which the restore will be processed.
  10636. //
  10637. // Tier is a required field
  10638. Tier *string `type:"string" required:"true" enum:"Tier"`
  10639. }
  10640. // String returns the string representation
  10641. func (s GlacierJobParameters) String() string {
  10642. return awsutil.Prettify(s)
  10643. }
  10644. // GoString returns the string representation
  10645. func (s GlacierJobParameters) GoString() string {
  10646. return s.String()
  10647. }
  10648. // Validate inspects the fields of the type to determine if they are valid.
  10649. func (s *GlacierJobParameters) Validate() error {
  10650. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  10651. if s.Tier == nil {
  10652. invalidParams.Add(request.NewErrParamRequired("Tier"))
  10653. }
  10654. if invalidParams.Len() > 0 {
  10655. return invalidParams
  10656. }
  10657. return nil
  10658. }
  10659. // SetTier sets the Tier field's value.
  10660. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  10661. s.Tier = &v
  10662. return s
  10663. }
  10664. type Grant struct {
  10665. _ struct{} `type:"structure"`
  10666. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  10667. // Specifies the permission given to the grantee.
  10668. Permission *string `type:"string" enum:"Permission"`
  10669. }
  10670. // String returns the string representation
  10671. func (s Grant) String() string {
  10672. return awsutil.Prettify(s)
  10673. }
  10674. // GoString returns the string representation
  10675. func (s Grant) GoString() string {
  10676. return s.String()
  10677. }
  10678. // Validate inspects the fields of the type to determine if they are valid.
  10679. func (s *Grant) Validate() error {
  10680. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  10681. if s.Grantee != nil {
  10682. if err := s.Grantee.Validate(); err != nil {
  10683. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  10684. }
  10685. }
  10686. if invalidParams.Len() > 0 {
  10687. return invalidParams
  10688. }
  10689. return nil
  10690. }
  10691. // SetGrantee sets the Grantee field's value.
  10692. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  10693. s.Grantee = v
  10694. return s
  10695. }
  10696. // SetPermission sets the Permission field's value.
  10697. func (s *Grant) SetPermission(v string) *Grant {
  10698. s.Permission = &v
  10699. return s
  10700. }
  10701. type Grantee struct {
  10702. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  10703. // Screen name of the grantee.
  10704. DisplayName *string `type:"string"`
  10705. // Email address of the grantee.
  10706. EmailAddress *string `type:"string"`
  10707. // The canonical user ID of the grantee.
  10708. ID *string `type:"string"`
  10709. // Type of grantee
  10710. //
  10711. // Type is a required field
  10712. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  10713. // URI of the grantee group.
  10714. URI *string `type:"string"`
  10715. }
  10716. // String returns the string representation
  10717. func (s Grantee) String() string {
  10718. return awsutil.Prettify(s)
  10719. }
  10720. // GoString returns the string representation
  10721. func (s Grantee) GoString() string {
  10722. return s.String()
  10723. }
  10724. // Validate inspects the fields of the type to determine if they are valid.
  10725. func (s *Grantee) Validate() error {
  10726. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  10727. if s.Type == nil {
  10728. invalidParams.Add(request.NewErrParamRequired("Type"))
  10729. }
  10730. if invalidParams.Len() > 0 {
  10731. return invalidParams
  10732. }
  10733. return nil
  10734. }
  10735. // SetDisplayName sets the DisplayName field's value.
  10736. func (s *Grantee) SetDisplayName(v string) *Grantee {
  10737. s.DisplayName = &v
  10738. return s
  10739. }
  10740. // SetEmailAddress sets the EmailAddress field's value.
  10741. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  10742. s.EmailAddress = &v
  10743. return s
  10744. }
  10745. // SetID sets the ID field's value.
  10746. func (s *Grantee) SetID(v string) *Grantee {
  10747. s.ID = &v
  10748. return s
  10749. }
  10750. // SetType sets the Type field's value.
  10751. func (s *Grantee) SetType(v string) *Grantee {
  10752. s.Type = &v
  10753. return s
  10754. }
  10755. // SetURI sets the URI field's value.
  10756. func (s *Grantee) SetURI(v string) *Grantee {
  10757. s.URI = &v
  10758. return s
  10759. }
  10760. type HeadBucketInput struct {
  10761. _ struct{} `type:"structure"`
  10762. // Bucket is a required field
  10763. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10764. }
  10765. // String returns the string representation
  10766. func (s HeadBucketInput) String() string {
  10767. return awsutil.Prettify(s)
  10768. }
  10769. // GoString returns the string representation
  10770. func (s HeadBucketInput) GoString() string {
  10771. return s.String()
  10772. }
  10773. // Validate inspects the fields of the type to determine if they are valid.
  10774. func (s *HeadBucketInput) Validate() error {
  10775. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  10776. if s.Bucket == nil {
  10777. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10778. }
  10779. if invalidParams.Len() > 0 {
  10780. return invalidParams
  10781. }
  10782. return nil
  10783. }
  10784. // SetBucket sets the Bucket field's value.
  10785. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  10786. s.Bucket = &v
  10787. return s
  10788. }
  10789. func (s *HeadBucketInput) getBucket() (v string) {
  10790. if s.Bucket == nil {
  10791. return v
  10792. }
  10793. return *s.Bucket
  10794. }
  10795. type HeadBucketOutput struct {
  10796. _ struct{} `type:"structure"`
  10797. }
  10798. // String returns the string representation
  10799. func (s HeadBucketOutput) String() string {
  10800. return awsutil.Prettify(s)
  10801. }
  10802. // GoString returns the string representation
  10803. func (s HeadBucketOutput) GoString() string {
  10804. return s.String()
  10805. }
  10806. type HeadObjectInput struct {
  10807. _ struct{} `type:"structure"`
  10808. // Bucket is a required field
  10809. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10810. // Return the object only if its entity tag (ETag) is the same as the one specified,
  10811. // otherwise return a 412 (precondition failed).
  10812. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  10813. // Return the object only if it has been modified since the specified time,
  10814. // otherwise return a 304 (not modified).
  10815. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10816. // Return the object only if its entity tag (ETag) is different from the one
  10817. // specified, otherwise return a 304 (not modified).
  10818. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  10819. // Return the object only if it has not been modified since the specified time,
  10820. // otherwise return a 412 (precondition failed).
  10821. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10822. // Key is a required field
  10823. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10824. // Part number of the object being read. This is a positive integer between
  10825. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  10826. // Useful querying about the size of the part and the number of parts in this
  10827. // object.
  10828. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  10829. // Downloads the specified range bytes of an object. For more information about
  10830. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  10831. Range *string `location:"header" locationName:"Range" type:"string"`
  10832. // Confirms that the requester knows that she or he will be charged for the
  10833. // request. Bucket owners need not specify this parameter in their requests.
  10834. // Documentation on downloading objects from requester pays buckets can be found
  10835. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10836. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10837. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  10838. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10839. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  10840. // data. This value is used to store the object and then it is discarded; Amazon
  10841. // does not store the encryption key. The key must be appropriate for use with
  10842. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  10843. // header.
  10844. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  10845. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  10846. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  10847. // key was transmitted without error.
  10848. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10849. // VersionId used to reference a specific version of the object.
  10850. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10851. }
  10852. // String returns the string representation
  10853. func (s HeadObjectInput) String() string {
  10854. return awsutil.Prettify(s)
  10855. }
  10856. // GoString returns the string representation
  10857. func (s HeadObjectInput) GoString() string {
  10858. return s.String()
  10859. }
  10860. // Validate inspects the fields of the type to determine if they are valid.
  10861. func (s *HeadObjectInput) Validate() error {
  10862. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  10863. if s.Bucket == nil {
  10864. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10865. }
  10866. if s.Key == nil {
  10867. invalidParams.Add(request.NewErrParamRequired("Key"))
  10868. }
  10869. if s.Key != nil && len(*s.Key) < 1 {
  10870. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10871. }
  10872. if invalidParams.Len() > 0 {
  10873. return invalidParams
  10874. }
  10875. return nil
  10876. }
  10877. // SetBucket sets the Bucket field's value.
  10878. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  10879. s.Bucket = &v
  10880. return s
  10881. }
  10882. func (s *HeadObjectInput) getBucket() (v string) {
  10883. if s.Bucket == nil {
  10884. return v
  10885. }
  10886. return *s.Bucket
  10887. }
  10888. // SetIfMatch sets the IfMatch field's value.
  10889. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  10890. s.IfMatch = &v
  10891. return s
  10892. }
  10893. // SetIfModifiedSince sets the IfModifiedSince field's value.
  10894. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  10895. s.IfModifiedSince = &v
  10896. return s
  10897. }
  10898. // SetIfNoneMatch sets the IfNoneMatch field's value.
  10899. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  10900. s.IfNoneMatch = &v
  10901. return s
  10902. }
  10903. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  10904. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  10905. s.IfUnmodifiedSince = &v
  10906. return s
  10907. }
  10908. // SetKey sets the Key field's value.
  10909. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  10910. s.Key = &v
  10911. return s
  10912. }
  10913. // SetPartNumber sets the PartNumber field's value.
  10914. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  10915. s.PartNumber = &v
  10916. return s
  10917. }
  10918. // SetRange sets the Range field's value.
  10919. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  10920. s.Range = &v
  10921. return s
  10922. }
  10923. // SetRequestPayer sets the RequestPayer field's value.
  10924. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  10925. s.RequestPayer = &v
  10926. return s
  10927. }
  10928. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10929. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  10930. s.SSECustomerAlgorithm = &v
  10931. return s
  10932. }
  10933. // SetSSECustomerKey sets the SSECustomerKey field's value.
  10934. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  10935. s.SSECustomerKey = &v
  10936. return s
  10937. }
  10938. func (s *HeadObjectInput) getSSECustomerKey() (v string) {
  10939. if s.SSECustomerKey == nil {
  10940. return v
  10941. }
  10942. return *s.SSECustomerKey
  10943. }
  10944. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10945. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  10946. s.SSECustomerKeyMD5 = &v
  10947. return s
  10948. }
  10949. // SetVersionId sets the VersionId field's value.
  10950. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  10951. s.VersionId = &v
  10952. return s
  10953. }
  10954. type HeadObjectOutput struct {
  10955. _ struct{} `type:"structure"`
  10956. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  10957. // Specifies caching behavior along the request/reply chain.
  10958. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  10959. // Specifies presentational information for the object.
  10960. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  10961. // Specifies what content encodings have been applied to the object and thus
  10962. // what decoding mechanisms must be applied to obtain the media-type referenced
  10963. // by the Content-Type header field.
  10964. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  10965. // The language the content is in.
  10966. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  10967. // Size of the body in bytes.
  10968. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  10969. // A standard MIME type describing the format of the object data.
  10970. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  10971. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  10972. // Marker. If false, this response header does not appear in the response.
  10973. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  10974. // An ETag is an opaque identifier assigned by a web server to a specific version
  10975. // of a resource found at a URL
  10976. ETag *string `location:"header" locationName:"ETag" type:"string"`
  10977. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  10978. // includes this header. It includes the expiry-date and rule-id key value pairs
  10979. // providing object expiration information. The value of the rule-id is URL
  10980. // encoded.
  10981. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  10982. // The date and time at which the object is no longer cacheable.
  10983. Expires *string `location:"header" locationName:"Expires" type:"string"`
  10984. // Last modified date of the object
  10985. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  10986. // A map of metadata to store with the object in S3.
  10987. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  10988. // This is set to the number of metadata entries not returned in x-amz-meta
  10989. // headers. This can happen if you create metadata using an API like SOAP that
  10990. // supports more flexible metadata than the REST API. For example, using SOAP,
  10991. // you can create metadata whose values are not legal HTTP headers.
  10992. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  10993. // The count of parts this object has.
  10994. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  10995. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  10996. // If present, indicates that the requester was successfully charged for the
  10997. // request.
  10998. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10999. // Provides information about object restoration operation and expiration time
  11000. // of the restored object copy.
  11001. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  11002. // If server-side encryption with a customer-provided encryption key was requested,
  11003. // the response will include this header confirming the encryption algorithm
  11004. // used.
  11005. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11006. // If server-side encryption with a customer-provided encryption key was requested,
  11007. // the response will include this header to provide round trip message integrity
  11008. // verification of the customer-provided encryption key.
  11009. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11010. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  11011. // encryption key that was used for the object.
  11012. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  11013. // The Server-side encryption algorithm used when storing this object in S3
  11014. // (e.g., AES256, aws:kms).
  11015. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  11016. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  11017. // Version of the object.
  11018. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  11019. // If the bucket is configured as a website, redirects requests for this object
  11020. // to another object in the same bucket or to an external URL. Amazon S3 stores
  11021. // the value of this header in the object metadata.
  11022. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  11023. }
  11024. // String returns the string representation
  11025. func (s HeadObjectOutput) String() string {
  11026. return awsutil.Prettify(s)
  11027. }
  11028. // GoString returns the string representation
  11029. func (s HeadObjectOutput) GoString() string {
  11030. return s.String()
  11031. }
  11032. // SetAcceptRanges sets the AcceptRanges field's value.
  11033. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  11034. s.AcceptRanges = &v
  11035. return s
  11036. }
  11037. // SetCacheControl sets the CacheControl field's value.
  11038. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  11039. s.CacheControl = &v
  11040. return s
  11041. }
  11042. // SetContentDisposition sets the ContentDisposition field's value.
  11043. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  11044. s.ContentDisposition = &v
  11045. return s
  11046. }
  11047. // SetContentEncoding sets the ContentEncoding field's value.
  11048. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  11049. s.ContentEncoding = &v
  11050. return s
  11051. }
  11052. // SetContentLanguage sets the ContentLanguage field's value.
  11053. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  11054. s.ContentLanguage = &v
  11055. return s
  11056. }
  11057. // SetContentLength sets the ContentLength field's value.
  11058. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  11059. s.ContentLength = &v
  11060. return s
  11061. }
  11062. // SetContentType sets the ContentType field's value.
  11063. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  11064. s.ContentType = &v
  11065. return s
  11066. }
  11067. // SetDeleteMarker sets the DeleteMarker field's value.
  11068. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  11069. s.DeleteMarker = &v
  11070. return s
  11071. }
  11072. // SetETag sets the ETag field's value.
  11073. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  11074. s.ETag = &v
  11075. return s
  11076. }
  11077. // SetExpiration sets the Expiration field's value.
  11078. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  11079. s.Expiration = &v
  11080. return s
  11081. }
  11082. // SetExpires sets the Expires field's value.
  11083. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  11084. s.Expires = &v
  11085. return s
  11086. }
  11087. // SetLastModified sets the LastModified field's value.
  11088. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  11089. s.LastModified = &v
  11090. return s
  11091. }
  11092. // SetMetadata sets the Metadata field's value.
  11093. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  11094. s.Metadata = v
  11095. return s
  11096. }
  11097. // SetMissingMeta sets the MissingMeta field's value.
  11098. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  11099. s.MissingMeta = &v
  11100. return s
  11101. }
  11102. // SetPartsCount sets the PartsCount field's value.
  11103. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  11104. s.PartsCount = &v
  11105. return s
  11106. }
  11107. // SetReplicationStatus sets the ReplicationStatus field's value.
  11108. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  11109. s.ReplicationStatus = &v
  11110. return s
  11111. }
  11112. // SetRequestCharged sets the RequestCharged field's value.
  11113. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  11114. s.RequestCharged = &v
  11115. return s
  11116. }
  11117. // SetRestore sets the Restore field's value.
  11118. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  11119. s.Restore = &v
  11120. return s
  11121. }
  11122. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11123. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  11124. s.SSECustomerAlgorithm = &v
  11125. return s
  11126. }
  11127. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11128. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  11129. s.SSECustomerKeyMD5 = &v
  11130. return s
  11131. }
  11132. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  11133. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  11134. s.SSEKMSKeyId = &v
  11135. return s
  11136. }
  11137. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  11138. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  11139. s.ServerSideEncryption = &v
  11140. return s
  11141. }
  11142. // SetStorageClass sets the StorageClass field's value.
  11143. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  11144. s.StorageClass = &v
  11145. return s
  11146. }
  11147. // SetVersionId sets the VersionId field's value.
  11148. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  11149. s.VersionId = &v
  11150. return s
  11151. }
  11152. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  11153. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  11154. s.WebsiteRedirectLocation = &v
  11155. return s
  11156. }
  11157. type IndexDocument struct {
  11158. _ struct{} `type:"structure"`
  11159. // A suffix that is appended to a request that is for a directory on the website
  11160. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  11161. // the data that is returned will be for the object with the key name images/index.html)
  11162. // The suffix must not be empty and must not include a slash character.
  11163. //
  11164. // Suffix is a required field
  11165. Suffix *string `type:"string" required:"true"`
  11166. }
  11167. // String returns the string representation
  11168. func (s IndexDocument) String() string {
  11169. return awsutil.Prettify(s)
  11170. }
  11171. // GoString returns the string representation
  11172. func (s IndexDocument) GoString() string {
  11173. return s.String()
  11174. }
  11175. // Validate inspects the fields of the type to determine if they are valid.
  11176. func (s *IndexDocument) Validate() error {
  11177. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  11178. if s.Suffix == nil {
  11179. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  11180. }
  11181. if invalidParams.Len() > 0 {
  11182. return invalidParams
  11183. }
  11184. return nil
  11185. }
  11186. // SetSuffix sets the Suffix field's value.
  11187. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  11188. s.Suffix = &v
  11189. return s
  11190. }
  11191. type Initiator struct {
  11192. _ struct{} `type:"structure"`
  11193. // Name of the Principal.
  11194. DisplayName *string `type:"string"`
  11195. // If the principal is an AWS account, it provides the Canonical User ID. If
  11196. // the principal is an IAM User, it provides a user ARN value.
  11197. ID *string `type:"string"`
  11198. }
  11199. // String returns the string representation
  11200. func (s Initiator) String() string {
  11201. return awsutil.Prettify(s)
  11202. }
  11203. // GoString returns the string representation
  11204. func (s Initiator) GoString() string {
  11205. return s.String()
  11206. }
  11207. // SetDisplayName sets the DisplayName field's value.
  11208. func (s *Initiator) SetDisplayName(v string) *Initiator {
  11209. s.DisplayName = &v
  11210. return s
  11211. }
  11212. // SetID sets the ID field's value.
  11213. func (s *Initiator) SetID(v string) *Initiator {
  11214. s.ID = &v
  11215. return s
  11216. }
  11217. // Describes the serialization format of the object.
  11218. type InputSerialization struct {
  11219. _ struct{} `type:"structure"`
  11220. // Describes the serialization of a CSV-encoded object.
  11221. CSV *CSVInput `type:"structure"`
  11222. // Specifies object's compression format. Valid values: NONE, GZIP. Default
  11223. // Value: NONE.
  11224. CompressionType *string `type:"string" enum:"CompressionType"`
  11225. // Specifies JSON as object's input serialization format.
  11226. JSON *JSONInput `type:"structure"`
  11227. }
  11228. // String returns the string representation
  11229. func (s InputSerialization) String() string {
  11230. return awsutil.Prettify(s)
  11231. }
  11232. // GoString returns the string representation
  11233. func (s InputSerialization) GoString() string {
  11234. return s.String()
  11235. }
  11236. // SetCSV sets the CSV field's value.
  11237. func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
  11238. s.CSV = v
  11239. return s
  11240. }
  11241. // SetCompressionType sets the CompressionType field's value.
  11242. func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
  11243. s.CompressionType = &v
  11244. return s
  11245. }
  11246. // SetJSON sets the JSON field's value.
  11247. func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
  11248. s.JSON = v
  11249. return s
  11250. }
  11251. type InventoryConfiguration struct {
  11252. _ struct{} `type:"structure"`
  11253. // Contains information about where to publish the inventory results.
  11254. //
  11255. // Destination is a required field
  11256. Destination *InventoryDestination `type:"structure" required:"true"`
  11257. // Specifies an inventory filter. The inventory only includes objects that meet
  11258. // the filter's criteria.
  11259. Filter *InventoryFilter `type:"structure"`
  11260. // The ID used to identify the inventory configuration.
  11261. //
  11262. // Id is a required field
  11263. Id *string `type:"string" required:"true"`
  11264. // Specifies which object version(s) to included in the inventory results.
  11265. //
  11266. // IncludedObjectVersions is a required field
  11267. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  11268. // Specifies whether the inventory is enabled or disabled.
  11269. //
  11270. // IsEnabled is a required field
  11271. IsEnabled *bool `type:"boolean" required:"true"`
  11272. // Contains the optional fields that are included in the inventory results.
  11273. OptionalFields []*string `locationNameList:"Field" type:"list"`
  11274. // Specifies the schedule for generating inventory results.
  11275. //
  11276. // Schedule is a required field
  11277. Schedule *InventorySchedule `type:"structure" required:"true"`
  11278. }
  11279. // String returns the string representation
  11280. func (s InventoryConfiguration) String() string {
  11281. return awsutil.Prettify(s)
  11282. }
  11283. // GoString returns the string representation
  11284. func (s InventoryConfiguration) GoString() string {
  11285. return s.String()
  11286. }
  11287. // Validate inspects the fields of the type to determine if they are valid.
  11288. func (s *InventoryConfiguration) Validate() error {
  11289. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  11290. if s.Destination == nil {
  11291. invalidParams.Add(request.NewErrParamRequired("Destination"))
  11292. }
  11293. if s.Id == nil {
  11294. invalidParams.Add(request.NewErrParamRequired("Id"))
  11295. }
  11296. if s.IncludedObjectVersions == nil {
  11297. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  11298. }
  11299. if s.IsEnabled == nil {
  11300. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  11301. }
  11302. if s.Schedule == nil {
  11303. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  11304. }
  11305. if s.Destination != nil {
  11306. if err := s.Destination.Validate(); err != nil {
  11307. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  11308. }
  11309. }
  11310. if s.Filter != nil {
  11311. if err := s.Filter.Validate(); err != nil {
  11312. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  11313. }
  11314. }
  11315. if s.Schedule != nil {
  11316. if err := s.Schedule.Validate(); err != nil {
  11317. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  11318. }
  11319. }
  11320. if invalidParams.Len() > 0 {
  11321. return invalidParams
  11322. }
  11323. return nil
  11324. }
  11325. // SetDestination sets the Destination field's value.
  11326. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  11327. s.Destination = v
  11328. return s
  11329. }
  11330. // SetFilter sets the Filter field's value.
  11331. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  11332. s.Filter = v
  11333. return s
  11334. }
  11335. // SetId sets the Id field's value.
  11336. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  11337. s.Id = &v
  11338. return s
  11339. }
  11340. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  11341. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  11342. s.IncludedObjectVersions = &v
  11343. return s
  11344. }
  11345. // SetIsEnabled sets the IsEnabled field's value.
  11346. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  11347. s.IsEnabled = &v
  11348. return s
  11349. }
  11350. // SetOptionalFields sets the OptionalFields field's value.
  11351. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  11352. s.OptionalFields = v
  11353. return s
  11354. }
  11355. // SetSchedule sets the Schedule field's value.
  11356. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  11357. s.Schedule = v
  11358. return s
  11359. }
  11360. type InventoryDestination struct {
  11361. _ struct{} `type:"structure"`
  11362. // Contains the bucket name, file format, bucket owner (optional), and prefix
  11363. // (optional) where inventory results are published.
  11364. //
  11365. // S3BucketDestination is a required field
  11366. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  11367. }
  11368. // String returns the string representation
  11369. func (s InventoryDestination) String() string {
  11370. return awsutil.Prettify(s)
  11371. }
  11372. // GoString returns the string representation
  11373. func (s InventoryDestination) GoString() string {
  11374. return s.String()
  11375. }
  11376. // Validate inspects the fields of the type to determine if they are valid.
  11377. func (s *InventoryDestination) Validate() error {
  11378. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  11379. if s.S3BucketDestination == nil {
  11380. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  11381. }
  11382. if s.S3BucketDestination != nil {
  11383. if err := s.S3BucketDestination.Validate(); err != nil {
  11384. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  11385. }
  11386. }
  11387. if invalidParams.Len() > 0 {
  11388. return invalidParams
  11389. }
  11390. return nil
  11391. }
  11392. // SetS3BucketDestination sets the S3BucketDestination field's value.
  11393. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  11394. s.S3BucketDestination = v
  11395. return s
  11396. }
  11397. // Contains the type of server-side encryption used to encrypt the inventory
  11398. // results.
  11399. type InventoryEncryption struct {
  11400. _ struct{} `type:"structure"`
  11401. // Specifies the use of SSE-KMS to encrypt delievered Inventory reports.
  11402. SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
  11403. // Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
  11404. SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
  11405. }
  11406. // String returns the string representation
  11407. func (s InventoryEncryption) String() string {
  11408. return awsutil.Prettify(s)
  11409. }
  11410. // GoString returns the string representation
  11411. func (s InventoryEncryption) GoString() string {
  11412. return s.String()
  11413. }
  11414. // Validate inspects the fields of the type to determine if they are valid.
  11415. func (s *InventoryEncryption) Validate() error {
  11416. invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
  11417. if s.SSEKMS != nil {
  11418. if err := s.SSEKMS.Validate(); err != nil {
  11419. invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
  11420. }
  11421. }
  11422. if invalidParams.Len() > 0 {
  11423. return invalidParams
  11424. }
  11425. return nil
  11426. }
  11427. // SetSSEKMS sets the SSEKMS field's value.
  11428. func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
  11429. s.SSEKMS = v
  11430. return s
  11431. }
  11432. // SetSSES3 sets the SSES3 field's value.
  11433. func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
  11434. s.SSES3 = v
  11435. return s
  11436. }
  11437. type InventoryFilter struct {
  11438. _ struct{} `type:"structure"`
  11439. // The prefix that an object must have to be included in the inventory results.
  11440. //
  11441. // Prefix is a required field
  11442. Prefix *string `type:"string" required:"true"`
  11443. }
  11444. // String returns the string representation
  11445. func (s InventoryFilter) String() string {
  11446. return awsutil.Prettify(s)
  11447. }
  11448. // GoString returns the string representation
  11449. func (s InventoryFilter) GoString() string {
  11450. return s.String()
  11451. }
  11452. // Validate inspects the fields of the type to determine if they are valid.
  11453. func (s *InventoryFilter) Validate() error {
  11454. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  11455. if s.Prefix == nil {
  11456. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  11457. }
  11458. if invalidParams.Len() > 0 {
  11459. return invalidParams
  11460. }
  11461. return nil
  11462. }
  11463. // SetPrefix sets the Prefix field's value.
  11464. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  11465. s.Prefix = &v
  11466. return s
  11467. }
  11468. type InventoryS3BucketDestination struct {
  11469. _ struct{} `type:"structure"`
  11470. // The ID of the account that owns the destination bucket.
  11471. AccountId *string `type:"string"`
  11472. // The Amazon resource name (ARN) of the bucket where inventory results will
  11473. // be published.
  11474. //
  11475. // Bucket is a required field
  11476. Bucket *string `type:"string" required:"true"`
  11477. // Contains the type of server-side encryption used to encrypt the inventory
  11478. // results.
  11479. Encryption *InventoryEncryption `type:"structure"`
  11480. // Specifies the output format of the inventory results.
  11481. //
  11482. // Format is a required field
  11483. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  11484. // The prefix that is prepended to all inventory results.
  11485. Prefix *string `type:"string"`
  11486. }
  11487. // String returns the string representation
  11488. func (s InventoryS3BucketDestination) String() string {
  11489. return awsutil.Prettify(s)
  11490. }
  11491. // GoString returns the string representation
  11492. func (s InventoryS3BucketDestination) GoString() string {
  11493. return s.String()
  11494. }
  11495. // Validate inspects the fields of the type to determine if they are valid.
  11496. func (s *InventoryS3BucketDestination) Validate() error {
  11497. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  11498. if s.Bucket == nil {
  11499. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11500. }
  11501. if s.Format == nil {
  11502. invalidParams.Add(request.NewErrParamRequired("Format"))
  11503. }
  11504. if s.Encryption != nil {
  11505. if err := s.Encryption.Validate(); err != nil {
  11506. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  11507. }
  11508. }
  11509. if invalidParams.Len() > 0 {
  11510. return invalidParams
  11511. }
  11512. return nil
  11513. }
  11514. // SetAccountId sets the AccountId field's value.
  11515. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  11516. s.AccountId = &v
  11517. return s
  11518. }
  11519. // SetBucket sets the Bucket field's value.
  11520. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  11521. s.Bucket = &v
  11522. return s
  11523. }
  11524. func (s *InventoryS3BucketDestination) getBucket() (v string) {
  11525. if s.Bucket == nil {
  11526. return v
  11527. }
  11528. return *s.Bucket
  11529. }
  11530. // SetEncryption sets the Encryption field's value.
  11531. func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
  11532. s.Encryption = v
  11533. return s
  11534. }
  11535. // SetFormat sets the Format field's value.
  11536. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  11537. s.Format = &v
  11538. return s
  11539. }
  11540. // SetPrefix sets the Prefix field's value.
  11541. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  11542. s.Prefix = &v
  11543. return s
  11544. }
  11545. type InventorySchedule struct {
  11546. _ struct{} `type:"structure"`
  11547. // Specifies how frequently inventory results are produced.
  11548. //
  11549. // Frequency is a required field
  11550. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  11551. }
  11552. // String returns the string representation
  11553. func (s InventorySchedule) String() string {
  11554. return awsutil.Prettify(s)
  11555. }
  11556. // GoString returns the string representation
  11557. func (s InventorySchedule) GoString() string {
  11558. return s.String()
  11559. }
  11560. // Validate inspects the fields of the type to determine if they are valid.
  11561. func (s *InventorySchedule) Validate() error {
  11562. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  11563. if s.Frequency == nil {
  11564. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  11565. }
  11566. if invalidParams.Len() > 0 {
  11567. return invalidParams
  11568. }
  11569. return nil
  11570. }
  11571. // SetFrequency sets the Frequency field's value.
  11572. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  11573. s.Frequency = &v
  11574. return s
  11575. }
  11576. type JSONInput struct {
  11577. _ struct{} `type:"structure"`
  11578. // The type of JSON. Valid values: Document, Lines.
  11579. Type *string `type:"string" enum:"JSONType"`
  11580. }
  11581. // String returns the string representation
  11582. func (s JSONInput) String() string {
  11583. return awsutil.Prettify(s)
  11584. }
  11585. // GoString returns the string representation
  11586. func (s JSONInput) GoString() string {
  11587. return s.String()
  11588. }
  11589. // SetType sets the Type field's value.
  11590. func (s *JSONInput) SetType(v string) *JSONInput {
  11591. s.Type = &v
  11592. return s
  11593. }
  11594. type JSONOutput struct {
  11595. _ struct{} `type:"structure"`
  11596. // The value used to separate individual records in the output.
  11597. RecordDelimiter *string `type:"string"`
  11598. }
  11599. // String returns the string representation
  11600. func (s JSONOutput) String() string {
  11601. return awsutil.Prettify(s)
  11602. }
  11603. // GoString returns the string representation
  11604. func (s JSONOutput) GoString() string {
  11605. return s.String()
  11606. }
  11607. // SetRecordDelimiter sets the RecordDelimiter field's value.
  11608. func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
  11609. s.RecordDelimiter = &v
  11610. return s
  11611. }
  11612. // Container for object key name prefix and suffix filtering rules.
  11613. type KeyFilter struct {
  11614. _ struct{} `type:"structure"`
  11615. // A list of containers for key value pair that defines the criteria for the
  11616. // filter rule.
  11617. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  11618. }
  11619. // String returns the string representation
  11620. func (s KeyFilter) String() string {
  11621. return awsutil.Prettify(s)
  11622. }
  11623. // GoString returns the string representation
  11624. func (s KeyFilter) GoString() string {
  11625. return s.String()
  11626. }
  11627. // SetFilterRules sets the FilterRules field's value.
  11628. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  11629. s.FilterRules = v
  11630. return s
  11631. }
  11632. // Container for specifying the AWS Lambda notification configuration.
  11633. type LambdaFunctionConfiguration struct {
  11634. _ struct{} `type:"structure"`
  11635. // Events is a required field
  11636. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  11637. // Container for object key name filtering rules. For information about key
  11638. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  11639. Filter *NotificationConfigurationFilter `type:"structure"`
  11640. // Optional unique identifier for configurations in a notification configuration.
  11641. // If you don't provide one, Amazon S3 will assign an ID.
  11642. Id *string `type:"string"`
  11643. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  11644. // of the specified type.
  11645. //
  11646. // LambdaFunctionArn is a required field
  11647. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  11648. }
  11649. // String returns the string representation
  11650. func (s LambdaFunctionConfiguration) String() string {
  11651. return awsutil.Prettify(s)
  11652. }
  11653. // GoString returns the string representation
  11654. func (s LambdaFunctionConfiguration) GoString() string {
  11655. return s.String()
  11656. }
  11657. // Validate inspects the fields of the type to determine if they are valid.
  11658. func (s *LambdaFunctionConfiguration) Validate() error {
  11659. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  11660. if s.Events == nil {
  11661. invalidParams.Add(request.NewErrParamRequired("Events"))
  11662. }
  11663. if s.LambdaFunctionArn == nil {
  11664. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  11665. }
  11666. if invalidParams.Len() > 0 {
  11667. return invalidParams
  11668. }
  11669. return nil
  11670. }
  11671. // SetEvents sets the Events field's value.
  11672. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  11673. s.Events = v
  11674. return s
  11675. }
  11676. // SetFilter sets the Filter field's value.
  11677. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  11678. s.Filter = v
  11679. return s
  11680. }
  11681. // SetId sets the Id field's value.
  11682. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  11683. s.Id = &v
  11684. return s
  11685. }
  11686. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  11687. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  11688. s.LambdaFunctionArn = &v
  11689. return s
  11690. }
  11691. type LifecycleConfiguration struct {
  11692. _ struct{} `type:"structure"`
  11693. // Rules is a required field
  11694. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  11695. }
  11696. // String returns the string representation
  11697. func (s LifecycleConfiguration) String() string {
  11698. return awsutil.Prettify(s)
  11699. }
  11700. // GoString returns the string representation
  11701. func (s LifecycleConfiguration) GoString() string {
  11702. return s.String()
  11703. }
  11704. // Validate inspects the fields of the type to determine if they are valid.
  11705. func (s *LifecycleConfiguration) Validate() error {
  11706. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  11707. if s.Rules == nil {
  11708. invalidParams.Add(request.NewErrParamRequired("Rules"))
  11709. }
  11710. if s.Rules != nil {
  11711. for i, v := range s.Rules {
  11712. if v == nil {
  11713. continue
  11714. }
  11715. if err := v.Validate(); err != nil {
  11716. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  11717. }
  11718. }
  11719. }
  11720. if invalidParams.Len() > 0 {
  11721. return invalidParams
  11722. }
  11723. return nil
  11724. }
  11725. // SetRules sets the Rules field's value.
  11726. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  11727. s.Rules = v
  11728. return s
  11729. }
  11730. type LifecycleExpiration struct {
  11731. _ struct{} `type:"structure"`
  11732. // Indicates at what date the object is to be moved or deleted. Should be in
  11733. // GMT ISO 8601 Format.
  11734. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  11735. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  11736. // The value must be a non-zero positive integer.
  11737. Days *int64 `type:"integer"`
  11738. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  11739. // versions. If set to true, the delete marker will be expired; if set to false
  11740. // the policy takes no action. This cannot be specified with Days or Date in
  11741. // a Lifecycle Expiration Policy.
  11742. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  11743. }
  11744. // String returns the string representation
  11745. func (s LifecycleExpiration) String() string {
  11746. return awsutil.Prettify(s)
  11747. }
  11748. // GoString returns the string representation
  11749. func (s LifecycleExpiration) GoString() string {
  11750. return s.String()
  11751. }
  11752. // SetDate sets the Date field's value.
  11753. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  11754. s.Date = &v
  11755. return s
  11756. }
  11757. // SetDays sets the Days field's value.
  11758. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  11759. s.Days = &v
  11760. return s
  11761. }
  11762. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  11763. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  11764. s.ExpiredObjectDeleteMarker = &v
  11765. return s
  11766. }
  11767. type LifecycleRule struct {
  11768. _ struct{} `type:"structure"`
  11769. // Specifies the days since the initiation of an Incomplete Multipart Upload
  11770. // that Lifecycle will wait before permanently removing all parts of the upload.
  11771. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  11772. Expiration *LifecycleExpiration `type:"structure"`
  11773. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  11774. // A Filter must have exactly one of Prefix, Tag, or And specified.
  11775. Filter *LifecycleRuleFilter `type:"structure"`
  11776. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  11777. ID *string `type:"string"`
  11778. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  11779. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  11780. // configuration action on a bucket that has versioning enabled (or suspended)
  11781. // to request that Amazon S3 delete noncurrent object versions at a specific
  11782. // period in the object's lifetime.
  11783. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  11784. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  11785. // Prefix identifying one or more objects to which the rule applies. This is
  11786. // deprecated; use Filter instead.
  11787. Prefix *string `deprecated:"true" type:"string"`
  11788. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  11789. // is not currently being applied.
  11790. //
  11791. // Status is a required field
  11792. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  11793. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  11794. }
  11795. // String returns the string representation
  11796. func (s LifecycleRule) String() string {
  11797. return awsutil.Prettify(s)
  11798. }
  11799. // GoString returns the string representation
  11800. func (s LifecycleRule) GoString() string {
  11801. return s.String()
  11802. }
  11803. // Validate inspects the fields of the type to determine if they are valid.
  11804. func (s *LifecycleRule) Validate() error {
  11805. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  11806. if s.Status == nil {
  11807. invalidParams.Add(request.NewErrParamRequired("Status"))
  11808. }
  11809. if s.Filter != nil {
  11810. if err := s.Filter.Validate(); err != nil {
  11811. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  11812. }
  11813. }
  11814. if invalidParams.Len() > 0 {
  11815. return invalidParams
  11816. }
  11817. return nil
  11818. }
  11819. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  11820. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  11821. s.AbortIncompleteMultipartUpload = v
  11822. return s
  11823. }
  11824. // SetExpiration sets the Expiration field's value.
  11825. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  11826. s.Expiration = v
  11827. return s
  11828. }
  11829. // SetFilter sets the Filter field's value.
  11830. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  11831. s.Filter = v
  11832. return s
  11833. }
  11834. // SetID sets the ID field's value.
  11835. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  11836. s.ID = &v
  11837. return s
  11838. }
  11839. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  11840. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  11841. s.NoncurrentVersionExpiration = v
  11842. return s
  11843. }
  11844. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  11845. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  11846. s.NoncurrentVersionTransitions = v
  11847. return s
  11848. }
  11849. // SetPrefix sets the Prefix field's value.
  11850. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  11851. s.Prefix = &v
  11852. return s
  11853. }
  11854. // SetStatus sets the Status field's value.
  11855. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  11856. s.Status = &v
  11857. return s
  11858. }
  11859. // SetTransitions sets the Transitions field's value.
  11860. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  11861. s.Transitions = v
  11862. return s
  11863. }
  11864. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  11865. // more predicates. The Lifecycle Rule will apply to any object matching all
  11866. // of the predicates configured inside the And operator.
  11867. type LifecycleRuleAndOperator struct {
  11868. _ struct{} `type:"structure"`
  11869. Prefix *string `type:"string"`
  11870. // All of these tags must exist in the object's tag set in order for the rule
  11871. // to apply.
  11872. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  11873. }
  11874. // String returns the string representation
  11875. func (s LifecycleRuleAndOperator) String() string {
  11876. return awsutil.Prettify(s)
  11877. }
  11878. // GoString returns the string representation
  11879. func (s LifecycleRuleAndOperator) GoString() string {
  11880. return s.String()
  11881. }
  11882. // Validate inspects the fields of the type to determine if they are valid.
  11883. func (s *LifecycleRuleAndOperator) Validate() error {
  11884. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  11885. if s.Tags != nil {
  11886. for i, v := range s.Tags {
  11887. if v == nil {
  11888. continue
  11889. }
  11890. if err := v.Validate(); err != nil {
  11891. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  11892. }
  11893. }
  11894. }
  11895. if invalidParams.Len() > 0 {
  11896. return invalidParams
  11897. }
  11898. return nil
  11899. }
  11900. // SetPrefix sets the Prefix field's value.
  11901. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  11902. s.Prefix = &v
  11903. return s
  11904. }
  11905. // SetTags sets the Tags field's value.
  11906. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  11907. s.Tags = v
  11908. return s
  11909. }
  11910. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  11911. // A Filter must have exactly one of Prefix, Tag, or And specified.
  11912. type LifecycleRuleFilter struct {
  11913. _ struct{} `type:"structure"`
  11914. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  11915. // more predicates. The Lifecycle Rule will apply to any object matching all
  11916. // of the predicates configured inside the And operator.
  11917. And *LifecycleRuleAndOperator `type:"structure"`
  11918. // Prefix identifying one or more objects to which the rule applies.
  11919. Prefix *string `type:"string"`
  11920. // This tag must exist in the object's tag set in order for the rule to apply.
  11921. Tag *Tag `type:"structure"`
  11922. }
  11923. // String returns the string representation
  11924. func (s LifecycleRuleFilter) String() string {
  11925. return awsutil.Prettify(s)
  11926. }
  11927. // GoString returns the string representation
  11928. func (s LifecycleRuleFilter) GoString() string {
  11929. return s.String()
  11930. }
  11931. // Validate inspects the fields of the type to determine if they are valid.
  11932. func (s *LifecycleRuleFilter) Validate() error {
  11933. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  11934. if s.And != nil {
  11935. if err := s.And.Validate(); err != nil {
  11936. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  11937. }
  11938. }
  11939. if s.Tag != nil {
  11940. if err := s.Tag.Validate(); err != nil {
  11941. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  11942. }
  11943. }
  11944. if invalidParams.Len() > 0 {
  11945. return invalidParams
  11946. }
  11947. return nil
  11948. }
  11949. // SetAnd sets the And field's value.
  11950. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  11951. s.And = v
  11952. return s
  11953. }
  11954. // SetPrefix sets the Prefix field's value.
  11955. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  11956. s.Prefix = &v
  11957. return s
  11958. }
  11959. // SetTag sets the Tag field's value.
  11960. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  11961. s.Tag = v
  11962. return s
  11963. }
  11964. type ListBucketAnalyticsConfigurationsInput struct {
  11965. _ struct{} `type:"structure"`
  11966. // The name of the bucket from which analytics configurations are retrieved.
  11967. //
  11968. // Bucket is a required field
  11969. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11970. // The ContinuationToken that represents a placeholder from where this request
  11971. // should begin.
  11972. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11973. }
  11974. // String returns the string representation
  11975. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  11976. return awsutil.Prettify(s)
  11977. }
  11978. // GoString returns the string representation
  11979. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  11980. return s.String()
  11981. }
  11982. // Validate inspects the fields of the type to determine if they are valid.
  11983. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  11984. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  11985. if s.Bucket == nil {
  11986. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11987. }
  11988. if invalidParams.Len() > 0 {
  11989. return invalidParams
  11990. }
  11991. return nil
  11992. }
  11993. // SetBucket sets the Bucket field's value.
  11994. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  11995. s.Bucket = &v
  11996. return s
  11997. }
  11998. func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
  11999. if s.Bucket == nil {
  12000. return v
  12001. }
  12002. return *s.Bucket
  12003. }
  12004. // SetContinuationToken sets the ContinuationToken field's value.
  12005. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  12006. s.ContinuationToken = &v
  12007. return s
  12008. }
  12009. type ListBucketAnalyticsConfigurationsOutput struct {
  12010. _ struct{} `type:"structure"`
  12011. // The list of analytics configurations for a bucket.
  12012. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  12013. // The ContinuationToken that represents where this request began.
  12014. ContinuationToken *string `type:"string"`
  12015. // Indicates whether the returned list of analytics configurations is complete.
  12016. // A value of true indicates that the list is not complete and the NextContinuationToken
  12017. // will be provided for a subsequent request.
  12018. IsTruncated *bool `type:"boolean"`
  12019. // NextContinuationToken is sent when isTruncated is true, which indicates that
  12020. // there are more analytics configurations to list. The next request must include
  12021. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  12022. NextContinuationToken *string `type:"string"`
  12023. }
  12024. // String returns the string representation
  12025. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  12026. return awsutil.Prettify(s)
  12027. }
  12028. // GoString returns the string representation
  12029. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  12030. return s.String()
  12031. }
  12032. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  12033. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  12034. s.AnalyticsConfigurationList = v
  12035. return s
  12036. }
  12037. // SetContinuationToken sets the ContinuationToken field's value.
  12038. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  12039. s.ContinuationToken = &v
  12040. return s
  12041. }
  12042. // SetIsTruncated sets the IsTruncated field's value.
  12043. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  12044. s.IsTruncated = &v
  12045. return s
  12046. }
  12047. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12048. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  12049. s.NextContinuationToken = &v
  12050. return s
  12051. }
  12052. type ListBucketInventoryConfigurationsInput struct {
  12053. _ struct{} `type:"structure"`
  12054. // The name of the bucket containing the inventory configurations to retrieve.
  12055. //
  12056. // Bucket is a required field
  12057. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12058. // The marker used to continue an inventory configuration listing that has been
  12059. // truncated. Use the NextContinuationToken from a previously truncated list
  12060. // response to continue the listing. The continuation token is an opaque value
  12061. // that Amazon S3 understands.
  12062. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12063. }
  12064. // String returns the string representation
  12065. func (s ListBucketInventoryConfigurationsInput) String() string {
  12066. return awsutil.Prettify(s)
  12067. }
  12068. // GoString returns the string representation
  12069. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  12070. return s.String()
  12071. }
  12072. // Validate inspects the fields of the type to determine if they are valid.
  12073. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  12074. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  12075. if s.Bucket == nil {
  12076. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12077. }
  12078. if invalidParams.Len() > 0 {
  12079. return invalidParams
  12080. }
  12081. return nil
  12082. }
  12083. // SetBucket sets the Bucket field's value.
  12084. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  12085. s.Bucket = &v
  12086. return s
  12087. }
  12088. func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
  12089. if s.Bucket == nil {
  12090. return v
  12091. }
  12092. return *s.Bucket
  12093. }
  12094. // SetContinuationToken sets the ContinuationToken field's value.
  12095. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  12096. s.ContinuationToken = &v
  12097. return s
  12098. }
  12099. type ListBucketInventoryConfigurationsOutput struct {
  12100. _ struct{} `type:"structure"`
  12101. // If sent in the request, the marker that is used as a starting point for this
  12102. // inventory configuration list response.
  12103. ContinuationToken *string `type:"string"`
  12104. // The list of inventory configurations for a bucket.
  12105. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  12106. // Indicates whether the returned list of inventory configurations is truncated
  12107. // in this response. A value of true indicates that the list is truncated.
  12108. IsTruncated *bool `type:"boolean"`
  12109. // The marker used to continue this inventory configuration listing. Use the
  12110. // NextContinuationToken from this response to continue the listing in a subsequent
  12111. // request. The continuation token is an opaque value that Amazon S3 understands.
  12112. NextContinuationToken *string `type:"string"`
  12113. }
  12114. // String returns the string representation
  12115. func (s ListBucketInventoryConfigurationsOutput) String() string {
  12116. return awsutil.Prettify(s)
  12117. }
  12118. // GoString returns the string representation
  12119. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  12120. return s.String()
  12121. }
  12122. // SetContinuationToken sets the ContinuationToken field's value.
  12123. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  12124. s.ContinuationToken = &v
  12125. return s
  12126. }
  12127. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  12128. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  12129. s.InventoryConfigurationList = v
  12130. return s
  12131. }
  12132. // SetIsTruncated sets the IsTruncated field's value.
  12133. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  12134. s.IsTruncated = &v
  12135. return s
  12136. }
  12137. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12138. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  12139. s.NextContinuationToken = &v
  12140. return s
  12141. }
  12142. type ListBucketMetricsConfigurationsInput struct {
  12143. _ struct{} `type:"structure"`
  12144. // The name of the bucket containing the metrics configurations to retrieve.
  12145. //
  12146. // Bucket is a required field
  12147. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12148. // The marker that is used to continue a metrics configuration listing that
  12149. // has been truncated. Use the NextContinuationToken from a previously truncated
  12150. // list response to continue the listing. The continuation token is an opaque
  12151. // value that Amazon S3 understands.
  12152. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12153. }
  12154. // String returns the string representation
  12155. func (s ListBucketMetricsConfigurationsInput) String() string {
  12156. return awsutil.Prettify(s)
  12157. }
  12158. // GoString returns the string representation
  12159. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  12160. return s.String()
  12161. }
  12162. // Validate inspects the fields of the type to determine if they are valid.
  12163. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  12164. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  12165. if s.Bucket == nil {
  12166. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12167. }
  12168. if invalidParams.Len() > 0 {
  12169. return invalidParams
  12170. }
  12171. return nil
  12172. }
  12173. // SetBucket sets the Bucket field's value.
  12174. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  12175. s.Bucket = &v
  12176. return s
  12177. }
  12178. func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
  12179. if s.Bucket == nil {
  12180. return v
  12181. }
  12182. return *s.Bucket
  12183. }
  12184. // SetContinuationToken sets the ContinuationToken field's value.
  12185. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  12186. s.ContinuationToken = &v
  12187. return s
  12188. }
  12189. type ListBucketMetricsConfigurationsOutput struct {
  12190. _ struct{} `type:"structure"`
  12191. // The marker that is used as a starting point for this metrics configuration
  12192. // list response. This value is present if it was sent in the request.
  12193. ContinuationToken *string `type:"string"`
  12194. // Indicates whether the returned list of metrics configurations is complete.
  12195. // A value of true indicates that the list is not complete and the NextContinuationToken
  12196. // will be provided for a subsequent request.
  12197. IsTruncated *bool `type:"boolean"`
  12198. // The list of metrics configurations for a bucket.
  12199. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  12200. // The marker used to continue a metrics configuration listing that has been
  12201. // truncated. Use the NextContinuationToken from a previously truncated list
  12202. // response to continue the listing. The continuation token is an opaque value
  12203. // that Amazon S3 understands.
  12204. NextContinuationToken *string `type:"string"`
  12205. }
  12206. // String returns the string representation
  12207. func (s ListBucketMetricsConfigurationsOutput) String() string {
  12208. return awsutil.Prettify(s)
  12209. }
  12210. // GoString returns the string representation
  12211. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  12212. return s.String()
  12213. }
  12214. // SetContinuationToken sets the ContinuationToken field's value.
  12215. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  12216. s.ContinuationToken = &v
  12217. return s
  12218. }
  12219. // SetIsTruncated sets the IsTruncated field's value.
  12220. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  12221. s.IsTruncated = &v
  12222. return s
  12223. }
  12224. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  12225. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  12226. s.MetricsConfigurationList = v
  12227. return s
  12228. }
  12229. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12230. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  12231. s.NextContinuationToken = &v
  12232. return s
  12233. }
  12234. type ListBucketsInput struct {
  12235. _ struct{} `type:"structure"`
  12236. }
  12237. // String returns the string representation
  12238. func (s ListBucketsInput) String() string {
  12239. return awsutil.Prettify(s)
  12240. }
  12241. // GoString returns the string representation
  12242. func (s ListBucketsInput) GoString() string {
  12243. return s.String()
  12244. }
  12245. type ListBucketsOutput struct {
  12246. _ struct{} `type:"structure"`
  12247. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  12248. Owner *Owner `type:"structure"`
  12249. }
  12250. // String returns the string representation
  12251. func (s ListBucketsOutput) String() string {
  12252. return awsutil.Prettify(s)
  12253. }
  12254. // GoString returns the string representation
  12255. func (s ListBucketsOutput) GoString() string {
  12256. return s.String()
  12257. }
  12258. // SetBuckets sets the Buckets field's value.
  12259. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  12260. s.Buckets = v
  12261. return s
  12262. }
  12263. // SetOwner sets the Owner field's value.
  12264. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  12265. s.Owner = v
  12266. return s
  12267. }
  12268. type ListMultipartUploadsInput struct {
  12269. _ struct{} `type:"structure"`
  12270. // Bucket is a required field
  12271. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12272. // Character you use to group keys.
  12273. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12274. // Requests Amazon S3 to encode the object keys in the response and specifies
  12275. // the encoding method to use. An object key may contain any Unicode character;
  12276. // however, XML 1.0 parser cannot parse some characters, such as characters
  12277. // with an ASCII value from 0 to 10. For characters that are not supported in
  12278. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12279. // keys in the response.
  12280. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12281. // Together with upload-id-marker, this parameter specifies the multipart upload
  12282. // after which listing should begin.
  12283. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  12284. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  12285. // in the response body. 1,000 is the maximum number of uploads that can be
  12286. // returned in a response.
  12287. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  12288. // Lists in-progress uploads only for those keys that begin with the specified
  12289. // prefix.
  12290. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12291. // Together with key-marker, specifies the multipart upload after which listing
  12292. // should begin. If key-marker is not specified, the upload-id-marker parameter
  12293. // is ignored.
  12294. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  12295. }
  12296. // String returns the string representation
  12297. func (s ListMultipartUploadsInput) String() string {
  12298. return awsutil.Prettify(s)
  12299. }
  12300. // GoString returns the string representation
  12301. func (s ListMultipartUploadsInput) GoString() string {
  12302. return s.String()
  12303. }
  12304. // Validate inspects the fields of the type to determine if they are valid.
  12305. func (s *ListMultipartUploadsInput) Validate() error {
  12306. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  12307. if s.Bucket == nil {
  12308. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12309. }
  12310. if invalidParams.Len() > 0 {
  12311. return invalidParams
  12312. }
  12313. return nil
  12314. }
  12315. // SetBucket sets the Bucket field's value.
  12316. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  12317. s.Bucket = &v
  12318. return s
  12319. }
  12320. func (s *ListMultipartUploadsInput) getBucket() (v string) {
  12321. if s.Bucket == nil {
  12322. return v
  12323. }
  12324. return *s.Bucket
  12325. }
  12326. // SetDelimiter sets the Delimiter field's value.
  12327. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  12328. s.Delimiter = &v
  12329. return s
  12330. }
  12331. // SetEncodingType sets the EncodingType field's value.
  12332. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  12333. s.EncodingType = &v
  12334. return s
  12335. }
  12336. // SetKeyMarker sets the KeyMarker field's value.
  12337. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  12338. s.KeyMarker = &v
  12339. return s
  12340. }
  12341. // SetMaxUploads sets the MaxUploads field's value.
  12342. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  12343. s.MaxUploads = &v
  12344. return s
  12345. }
  12346. // SetPrefix sets the Prefix field's value.
  12347. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  12348. s.Prefix = &v
  12349. return s
  12350. }
  12351. // SetUploadIdMarker sets the UploadIdMarker field's value.
  12352. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  12353. s.UploadIdMarker = &v
  12354. return s
  12355. }
  12356. type ListMultipartUploadsOutput struct {
  12357. _ struct{} `type:"structure"`
  12358. // Name of the bucket to which the multipart upload was initiated.
  12359. Bucket *string `type:"string"`
  12360. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12361. Delimiter *string `type:"string"`
  12362. // Encoding type used by Amazon S3 to encode object keys in the response.
  12363. EncodingType *string `type:"string" enum:"EncodingType"`
  12364. // Indicates whether the returned list of multipart uploads is truncated. A
  12365. // value of true indicates that the list was truncated. The list can be truncated
  12366. // if the number of multipart uploads exceeds the limit allowed or specified
  12367. // by max uploads.
  12368. IsTruncated *bool `type:"boolean"`
  12369. // The key at or after which the listing began.
  12370. KeyMarker *string `type:"string"`
  12371. // Maximum number of multipart uploads that could have been included in the
  12372. // response.
  12373. MaxUploads *int64 `type:"integer"`
  12374. // When a list is truncated, this element specifies the value that should be
  12375. // used for the key-marker request parameter in a subsequent request.
  12376. NextKeyMarker *string `type:"string"`
  12377. // When a list is truncated, this element specifies the value that should be
  12378. // used for the upload-id-marker request parameter in a subsequent request.
  12379. NextUploadIdMarker *string `type:"string"`
  12380. // When a prefix is provided in the request, this field contains the specified
  12381. // prefix. The result contains only keys starting with the specified prefix.
  12382. Prefix *string `type:"string"`
  12383. // Upload ID after which listing began.
  12384. UploadIdMarker *string `type:"string"`
  12385. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  12386. }
  12387. // String returns the string representation
  12388. func (s ListMultipartUploadsOutput) String() string {
  12389. return awsutil.Prettify(s)
  12390. }
  12391. // GoString returns the string representation
  12392. func (s ListMultipartUploadsOutput) GoString() string {
  12393. return s.String()
  12394. }
  12395. // SetBucket sets the Bucket field's value.
  12396. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  12397. s.Bucket = &v
  12398. return s
  12399. }
  12400. func (s *ListMultipartUploadsOutput) getBucket() (v string) {
  12401. if s.Bucket == nil {
  12402. return v
  12403. }
  12404. return *s.Bucket
  12405. }
  12406. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12407. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  12408. s.CommonPrefixes = v
  12409. return s
  12410. }
  12411. // SetDelimiter sets the Delimiter field's value.
  12412. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  12413. s.Delimiter = &v
  12414. return s
  12415. }
  12416. // SetEncodingType sets the EncodingType field's value.
  12417. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  12418. s.EncodingType = &v
  12419. return s
  12420. }
  12421. // SetIsTruncated sets the IsTruncated field's value.
  12422. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  12423. s.IsTruncated = &v
  12424. return s
  12425. }
  12426. // SetKeyMarker sets the KeyMarker field's value.
  12427. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  12428. s.KeyMarker = &v
  12429. return s
  12430. }
  12431. // SetMaxUploads sets the MaxUploads field's value.
  12432. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  12433. s.MaxUploads = &v
  12434. return s
  12435. }
  12436. // SetNextKeyMarker sets the NextKeyMarker field's value.
  12437. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  12438. s.NextKeyMarker = &v
  12439. return s
  12440. }
  12441. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  12442. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  12443. s.NextUploadIdMarker = &v
  12444. return s
  12445. }
  12446. // SetPrefix sets the Prefix field's value.
  12447. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  12448. s.Prefix = &v
  12449. return s
  12450. }
  12451. // SetUploadIdMarker sets the UploadIdMarker field's value.
  12452. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  12453. s.UploadIdMarker = &v
  12454. return s
  12455. }
  12456. // SetUploads sets the Uploads field's value.
  12457. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  12458. s.Uploads = v
  12459. return s
  12460. }
  12461. type ListObjectVersionsInput struct {
  12462. _ struct{} `type:"structure"`
  12463. // Bucket is a required field
  12464. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12465. // A delimiter is a character you use to group keys.
  12466. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12467. // Requests Amazon S3 to encode the object keys in the response and specifies
  12468. // the encoding method to use. An object key may contain any Unicode character;
  12469. // however, XML 1.0 parser cannot parse some characters, such as characters
  12470. // with an ASCII value from 0 to 10. For characters that are not supported in
  12471. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12472. // keys in the response.
  12473. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12474. // Specifies the key to start with when listing objects in a bucket.
  12475. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  12476. // Sets the maximum number of keys returned in the response. The response might
  12477. // contain fewer keys but will never contain more.
  12478. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12479. // Limits the response to keys that begin with the specified prefix.
  12480. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12481. // Specifies the object version you want to start listing from.
  12482. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  12483. }
  12484. // String returns the string representation
  12485. func (s ListObjectVersionsInput) String() string {
  12486. return awsutil.Prettify(s)
  12487. }
  12488. // GoString returns the string representation
  12489. func (s ListObjectVersionsInput) GoString() string {
  12490. return s.String()
  12491. }
  12492. // Validate inspects the fields of the type to determine if they are valid.
  12493. func (s *ListObjectVersionsInput) Validate() error {
  12494. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  12495. if s.Bucket == nil {
  12496. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12497. }
  12498. if invalidParams.Len() > 0 {
  12499. return invalidParams
  12500. }
  12501. return nil
  12502. }
  12503. // SetBucket sets the Bucket field's value.
  12504. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  12505. s.Bucket = &v
  12506. return s
  12507. }
  12508. func (s *ListObjectVersionsInput) getBucket() (v string) {
  12509. if s.Bucket == nil {
  12510. return v
  12511. }
  12512. return *s.Bucket
  12513. }
  12514. // SetDelimiter sets the Delimiter field's value.
  12515. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  12516. s.Delimiter = &v
  12517. return s
  12518. }
  12519. // SetEncodingType sets the EncodingType field's value.
  12520. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  12521. s.EncodingType = &v
  12522. return s
  12523. }
  12524. // SetKeyMarker sets the KeyMarker field's value.
  12525. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  12526. s.KeyMarker = &v
  12527. return s
  12528. }
  12529. // SetMaxKeys sets the MaxKeys field's value.
  12530. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  12531. s.MaxKeys = &v
  12532. return s
  12533. }
  12534. // SetPrefix sets the Prefix field's value.
  12535. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  12536. s.Prefix = &v
  12537. return s
  12538. }
  12539. // SetVersionIdMarker sets the VersionIdMarker field's value.
  12540. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  12541. s.VersionIdMarker = &v
  12542. return s
  12543. }
  12544. type ListObjectVersionsOutput struct {
  12545. _ struct{} `type:"structure"`
  12546. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12547. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  12548. Delimiter *string `type:"string"`
  12549. // Encoding type used by Amazon S3 to encode object keys in the response.
  12550. EncodingType *string `type:"string" enum:"EncodingType"`
  12551. // A flag that indicates whether or not Amazon S3 returned all of the results
  12552. // that satisfied the search criteria. If your results were truncated, you can
  12553. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  12554. // response parameters as a starting place in another request to return the
  12555. // rest of the results.
  12556. IsTruncated *bool `type:"boolean"`
  12557. // Marks the last Key returned in a truncated response.
  12558. KeyMarker *string `type:"string"`
  12559. MaxKeys *int64 `type:"integer"`
  12560. Name *string `type:"string"`
  12561. // Use this value for the key marker request parameter in a subsequent request.
  12562. NextKeyMarker *string `type:"string"`
  12563. // Use this value for the next version id marker parameter in a subsequent request.
  12564. NextVersionIdMarker *string `type:"string"`
  12565. Prefix *string `type:"string"`
  12566. VersionIdMarker *string `type:"string"`
  12567. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  12568. }
  12569. // String returns the string representation
  12570. func (s ListObjectVersionsOutput) String() string {
  12571. return awsutil.Prettify(s)
  12572. }
  12573. // GoString returns the string representation
  12574. func (s ListObjectVersionsOutput) GoString() string {
  12575. return s.String()
  12576. }
  12577. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12578. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  12579. s.CommonPrefixes = v
  12580. return s
  12581. }
  12582. // SetDeleteMarkers sets the DeleteMarkers field's value.
  12583. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  12584. s.DeleteMarkers = v
  12585. return s
  12586. }
  12587. // SetDelimiter sets the Delimiter field's value.
  12588. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  12589. s.Delimiter = &v
  12590. return s
  12591. }
  12592. // SetEncodingType sets the EncodingType field's value.
  12593. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  12594. s.EncodingType = &v
  12595. return s
  12596. }
  12597. // SetIsTruncated sets the IsTruncated field's value.
  12598. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  12599. s.IsTruncated = &v
  12600. return s
  12601. }
  12602. // SetKeyMarker sets the KeyMarker field's value.
  12603. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  12604. s.KeyMarker = &v
  12605. return s
  12606. }
  12607. // SetMaxKeys sets the MaxKeys field's value.
  12608. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  12609. s.MaxKeys = &v
  12610. return s
  12611. }
  12612. // SetName sets the Name field's value.
  12613. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  12614. s.Name = &v
  12615. return s
  12616. }
  12617. // SetNextKeyMarker sets the NextKeyMarker field's value.
  12618. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  12619. s.NextKeyMarker = &v
  12620. return s
  12621. }
  12622. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  12623. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  12624. s.NextVersionIdMarker = &v
  12625. return s
  12626. }
  12627. // SetPrefix sets the Prefix field's value.
  12628. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  12629. s.Prefix = &v
  12630. return s
  12631. }
  12632. // SetVersionIdMarker sets the VersionIdMarker field's value.
  12633. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  12634. s.VersionIdMarker = &v
  12635. return s
  12636. }
  12637. // SetVersions sets the Versions field's value.
  12638. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  12639. s.Versions = v
  12640. return s
  12641. }
  12642. type ListObjectsInput struct {
  12643. _ struct{} `type:"structure"`
  12644. // Bucket is a required field
  12645. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12646. // A delimiter is a character you use to group keys.
  12647. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12648. // Requests Amazon S3 to encode the object keys in the response and specifies
  12649. // the encoding method to use. An object key may contain any Unicode character;
  12650. // however, XML 1.0 parser cannot parse some characters, such as characters
  12651. // with an ASCII value from 0 to 10. For characters that are not supported in
  12652. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12653. // keys in the response.
  12654. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12655. // Specifies the key to start with when listing objects in a bucket.
  12656. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  12657. // Sets the maximum number of keys returned in the response. The response might
  12658. // contain fewer keys but will never contain more.
  12659. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12660. // Limits the response to keys that begin with the specified prefix.
  12661. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12662. // Confirms that the requester knows that she or he will be charged for the
  12663. // list objects request. Bucket owners need not specify this parameter in their
  12664. // requests.
  12665. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12666. }
  12667. // String returns the string representation
  12668. func (s ListObjectsInput) String() string {
  12669. return awsutil.Prettify(s)
  12670. }
  12671. // GoString returns the string representation
  12672. func (s ListObjectsInput) GoString() string {
  12673. return s.String()
  12674. }
  12675. // Validate inspects the fields of the type to determine if they are valid.
  12676. func (s *ListObjectsInput) Validate() error {
  12677. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  12678. if s.Bucket == nil {
  12679. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12680. }
  12681. if invalidParams.Len() > 0 {
  12682. return invalidParams
  12683. }
  12684. return nil
  12685. }
  12686. // SetBucket sets the Bucket field's value.
  12687. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  12688. s.Bucket = &v
  12689. return s
  12690. }
  12691. func (s *ListObjectsInput) getBucket() (v string) {
  12692. if s.Bucket == nil {
  12693. return v
  12694. }
  12695. return *s.Bucket
  12696. }
  12697. // SetDelimiter sets the Delimiter field's value.
  12698. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  12699. s.Delimiter = &v
  12700. return s
  12701. }
  12702. // SetEncodingType sets the EncodingType field's value.
  12703. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  12704. s.EncodingType = &v
  12705. return s
  12706. }
  12707. // SetMarker sets the Marker field's value.
  12708. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  12709. s.Marker = &v
  12710. return s
  12711. }
  12712. // SetMaxKeys sets the MaxKeys field's value.
  12713. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  12714. s.MaxKeys = &v
  12715. return s
  12716. }
  12717. // SetPrefix sets the Prefix field's value.
  12718. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  12719. s.Prefix = &v
  12720. return s
  12721. }
  12722. // SetRequestPayer sets the RequestPayer field's value.
  12723. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  12724. s.RequestPayer = &v
  12725. return s
  12726. }
  12727. type ListObjectsOutput struct {
  12728. _ struct{} `type:"structure"`
  12729. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12730. Contents []*Object `type:"list" flattened:"true"`
  12731. Delimiter *string `type:"string"`
  12732. // Encoding type used by Amazon S3 to encode object keys in the response.
  12733. EncodingType *string `type:"string" enum:"EncodingType"`
  12734. // A flag that indicates whether or not Amazon S3 returned all of the results
  12735. // that satisfied the search criteria.
  12736. IsTruncated *bool `type:"boolean"`
  12737. Marker *string `type:"string"`
  12738. MaxKeys *int64 `type:"integer"`
  12739. Name *string `type:"string"`
  12740. // When response is truncated (the IsTruncated element value in the response
  12741. // is true), you can use the key name in this field as marker in the subsequent
  12742. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  12743. // order Note: This element is returned only if you have delimiter request parameter
  12744. // specified. If response does not include the NextMaker and it is truncated,
  12745. // you can use the value of the last Key in the response as the marker in the
  12746. // subsequent request to get the next set of object keys.
  12747. NextMarker *string `type:"string"`
  12748. Prefix *string `type:"string"`
  12749. }
  12750. // String returns the string representation
  12751. func (s ListObjectsOutput) String() string {
  12752. return awsutil.Prettify(s)
  12753. }
  12754. // GoString returns the string representation
  12755. func (s ListObjectsOutput) GoString() string {
  12756. return s.String()
  12757. }
  12758. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12759. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  12760. s.CommonPrefixes = v
  12761. return s
  12762. }
  12763. // SetContents sets the Contents field's value.
  12764. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  12765. s.Contents = v
  12766. return s
  12767. }
  12768. // SetDelimiter sets the Delimiter field's value.
  12769. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  12770. s.Delimiter = &v
  12771. return s
  12772. }
  12773. // SetEncodingType sets the EncodingType field's value.
  12774. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  12775. s.EncodingType = &v
  12776. return s
  12777. }
  12778. // SetIsTruncated sets the IsTruncated field's value.
  12779. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  12780. s.IsTruncated = &v
  12781. return s
  12782. }
  12783. // SetMarker sets the Marker field's value.
  12784. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  12785. s.Marker = &v
  12786. return s
  12787. }
  12788. // SetMaxKeys sets the MaxKeys field's value.
  12789. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  12790. s.MaxKeys = &v
  12791. return s
  12792. }
  12793. // SetName sets the Name field's value.
  12794. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  12795. s.Name = &v
  12796. return s
  12797. }
  12798. // SetNextMarker sets the NextMarker field's value.
  12799. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  12800. s.NextMarker = &v
  12801. return s
  12802. }
  12803. // SetPrefix sets the Prefix field's value.
  12804. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  12805. s.Prefix = &v
  12806. return s
  12807. }
  12808. type ListObjectsV2Input struct {
  12809. _ struct{} `type:"structure"`
  12810. // Name of the bucket to list.
  12811. //
  12812. // Bucket is a required field
  12813. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12814. // ContinuationToken indicates Amazon S3 that the list is being continued on
  12815. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  12816. // key
  12817. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12818. // A delimiter is a character you use to group keys.
  12819. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12820. // Encoding type used by Amazon S3 to encode object keys in the response.
  12821. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12822. // The owner field is not present in listV2 by default, if you want to return
  12823. // owner field with each key in the result then set the fetch owner field to
  12824. // true
  12825. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  12826. // Sets the maximum number of keys returned in the response. The response might
  12827. // contain fewer keys but will never contain more.
  12828. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12829. // Limits the response to keys that begin with the specified prefix.
  12830. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12831. // Confirms that the requester knows that she or he will be charged for the
  12832. // list objects request in V2 style. Bucket owners need not specify this parameter
  12833. // in their requests.
  12834. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12835. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  12836. // listing after this specified key. StartAfter can be any key in the bucket
  12837. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  12838. }
  12839. // String returns the string representation
  12840. func (s ListObjectsV2Input) String() string {
  12841. return awsutil.Prettify(s)
  12842. }
  12843. // GoString returns the string representation
  12844. func (s ListObjectsV2Input) GoString() string {
  12845. return s.String()
  12846. }
  12847. // Validate inspects the fields of the type to determine if they are valid.
  12848. func (s *ListObjectsV2Input) Validate() error {
  12849. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  12850. if s.Bucket == nil {
  12851. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12852. }
  12853. if invalidParams.Len() > 0 {
  12854. return invalidParams
  12855. }
  12856. return nil
  12857. }
  12858. // SetBucket sets the Bucket field's value.
  12859. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  12860. s.Bucket = &v
  12861. return s
  12862. }
  12863. func (s *ListObjectsV2Input) getBucket() (v string) {
  12864. if s.Bucket == nil {
  12865. return v
  12866. }
  12867. return *s.Bucket
  12868. }
  12869. // SetContinuationToken sets the ContinuationToken field's value.
  12870. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  12871. s.ContinuationToken = &v
  12872. return s
  12873. }
  12874. // SetDelimiter sets the Delimiter field's value.
  12875. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  12876. s.Delimiter = &v
  12877. return s
  12878. }
  12879. // SetEncodingType sets the EncodingType field's value.
  12880. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  12881. s.EncodingType = &v
  12882. return s
  12883. }
  12884. // SetFetchOwner sets the FetchOwner field's value.
  12885. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  12886. s.FetchOwner = &v
  12887. return s
  12888. }
  12889. // SetMaxKeys sets the MaxKeys field's value.
  12890. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  12891. s.MaxKeys = &v
  12892. return s
  12893. }
  12894. // SetPrefix sets the Prefix field's value.
  12895. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  12896. s.Prefix = &v
  12897. return s
  12898. }
  12899. // SetRequestPayer sets the RequestPayer field's value.
  12900. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  12901. s.RequestPayer = &v
  12902. return s
  12903. }
  12904. // SetStartAfter sets the StartAfter field's value.
  12905. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  12906. s.StartAfter = &v
  12907. return s
  12908. }
  12909. type ListObjectsV2Output struct {
  12910. _ struct{} `type:"structure"`
  12911. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  12912. // next occurrence of the string specified by delimiter
  12913. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12914. // Metadata about each object returned.
  12915. Contents []*Object `type:"list" flattened:"true"`
  12916. // ContinuationToken indicates Amazon S3 that the list is being continued on
  12917. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  12918. // key
  12919. ContinuationToken *string `type:"string"`
  12920. // A delimiter is a character you use to group keys.
  12921. Delimiter *string `type:"string"`
  12922. // Encoding type used by Amazon S3 to encode object keys in the response.
  12923. EncodingType *string `type:"string" enum:"EncodingType"`
  12924. // A flag that indicates whether or not Amazon S3 returned all of the results
  12925. // that satisfied the search criteria.
  12926. IsTruncated *bool `type:"boolean"`
  12927. // KeyCount is the number of keys returned with this request. KeyCount will
  12928. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  12929. // result will include less than equals 50 keys
  12930. KeyCount *int64 `type:"integer"`
  12931. // Sets the maximum number of keys returned in the response. The response might
  12932. // contain fewer keys but will never contain more.
  12933. MaxKeys *int64 `type:"integer"`
  12934. // Name of the bucket to list.
  12935. Name *string `type:"string"`
  12936. // NextContinuationToken is sent when isTruncated is true which means there
  12937. // are more keys in the bucket that can be listed. The next list requests to
  12938. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  12939. // is obfuscated and is not a real key
  12940. NextContinuationToken *string `type:"string"`
  12941. // Limits the response to keys that begin with the specified prefix.
  12942. Prefix *string `type:"string"`
  12943. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  12944. // listing after this specified key. StartAfter can be any key in the bucket
  12945. StartAfter *string `type:"string"`
  12946. }
  12947. // String returns the string representation
  12948. func (s ListObjectsV2Output) String() string {
  12949. return awsutil.Prettify(s)
  12950. }
  12951. // GoString returns the string representation
  12952. func (s ListObjectsV2Output) GoString() string {
  12953. return s.String()
  12954. }
  12955. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12956. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  12957. s.CommonPrefixes = v
  12958. return s
  12959. }
  12960. // SetContents sets the Contents field's value.
  12961. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  12962. s.Contents = v
  12963. return s
  12964. }
  12965. // SetContinuationToken sets the ContinuationToken field's value.
  12966. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  12967. s.ContinuationToken = &v
  12968. return s
  12969. }
  12970. // SetDelimiter sets the Delimiter field's value.
  12971. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  12972. s.Delimiter = &v
  12973. return s
  12974. }
  12975. // SetEncodingType sets the EncodingType field's value.
  12976. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  12977. s.EncodingType = &v
  12978. return s
  12979. }
  12980. // SetIsTruncated sets the IsTruncated field's value.
  12981. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  12982. s.IsTruncated = &v
  12983. return s
  12984. }
  12985. // SetKeyCount sets the KeyCount field's value.
  12986. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  12987. s.KeyCount = &v
  12988. return s
  12989. }
  12990. // SetMaxKeys sets the MaxKeys field's value.
  12991. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  12992. s.MaxKeys = &v
  12993. return s
  12994. }
  12995. // SetName sets the Name field's value.
  12996. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  12997. s.Name = &v
  12998. return s
  12999. }
  13000. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13001. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  13002. s.NextContinuationToken = &v
  13003. return s
  13004. }
  13005. // SetPrefix sets the Prefix field's value.
  13006. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  13007. s.Prefix = &v
  13008. return s
  13009. }
  13010. // SetStartAfter sets the StartAfter field's value.
  13011. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  13012. s.StartAfter = &v
  13013. return s
  13014. }
  13015. type ListPartsInput struct {
  13016. _ struct{} `type:"structure"`
  13017. // Bucket is a required field
  13018. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13019. // Key is a required field
  13020. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  13021. // Sets the maximum number of parts to return.
  13022. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  13023. // Specifies the part after which listing should begin. Only parts with higher
  13024. // part numbers will be listed.
  13025. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  13026. // Confirms that the requester knows that she or he will be charged for the
  13027. // request. Bucket owners need not specify this parameter in their requests.
  13028. // Documentation on downloading objects from requester pays buckets can be found
  13029. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  13030. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  13031. // Upload ID identifying the multipart upload whose parts are being listed.
  13032. //
  13033. // UploadId is a required field
  13034. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  13035. }
  13036. // String returns the string representation
  13037. func (s ListPartsInput) String() string {
  13038. return awsutil.Prettify(s)
  13039. }
  13040. // GoString returns the string representation
  13041. func (s ListPartsInput) GoString() string {
  13042. return s.String()
  13043. }
  13044. // Validate inspects the fields of the type to determine if they are valid.
  13045. func (s *ListPartsInput) Validate() error {
  13046. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  13047. if s.Bucket == nil {
  13048. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13049. }
  13050. if s.Key == nil {
  13051. invalidParams.Add(request.NewErrParamRequired("Key"))
  13052. }
  13053. if s.Key != nil && len(*s.Key) < 1 {
  13054. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  13055. }
  13056. if s.UploadId == nil {
  13057. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  13058. }
  13059. if invalidParams.Len() > 0 {
  13060. return invalidParams
  13061. }
  13062. return nil
  13063. }
  13064. // SetBucket sets the Bucket field's value.
  13065. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  13066. s.Bucket = &v
  13067. return s
  13068. }
  13069. func (s *ListPartsInput) getBucket() (v string) {
  13070. if s.Bucket == nil {
  13071. return v
  13072. }
  13073. return *s.Bucket
  13074. }
  13075. // SetKey sets the Key field's value.
  13076. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  13077. s.Key = &v
  13078. return s
  13079. }
  13080. // SetMaxParts sets the MaxParts field's value.
  13081. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  13082. s.MaxParts = &v
  13083. return s
  13084. }
  13085. // SetPartNumberMarker sets the PartNumberMarker field's value.
  13086. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  13087. s.PartNumberMarker = &v
  13088. return s
  13089. }
  13090. // SetRequestPayer sets the RequestPayer field's value.
  13091. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  13092. s.RequestPayer = &v
  13093. return s
  13094. }
  13095. // SetUploadId sets the UploadId field's value.
  13096. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  13097. s.UploadId = &v
  13098. return s
  13099. }
  13100. type ListPartsOutput struct {
  13101. _ struct{} `type:"structure"`
  13102. // Date when multipart upload will become eligible for abort operation by lifecycle.
  13103. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  13104. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  13105. // operation.
  13106. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  13107. // Name of the bucket to which the multipart upload was initiated.
  13108. Bucket *string `type:"string"`
  13109. // Identifies who initiated the multipart upload.
  13110. Initiator *Initiator `type:"structure"`
  13111. // Indicates whether the returned list of parts is truncated.
  13112. IsTruncated *bool `type:"boolean"`
  13113. // Object key for which the multipart upload was initiated.
  13114. Key *string `min:"1" type:"string"`
  13115. // Maximum number of parts that were allowed in the response.
  13116. MaxParts *int64 `type:"integer"`
  13117. // When a list is truncated, this element specifies the last part in the list,
  13118. // as well as the value to use for the part-number-marker request parameter
  13119. // in a subsequent request.
  13120. NextPartNumberMarker *int64 `type:"integer"`
  13121. Owner *Owner `type:"structure"`
  13122. // Part number after which listing begins.
  13123. PartNumberMarker *int64 `type:"integer"`
  13124. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  13125. // If present, indicates that the requester was successfully charged for the
  13126. // request.
  13127. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  13128. // The class of storage used to store the object.
  13129. StorageClass *string `type:"string" enum:"StorageClass"`
  13130. // Upload ID identifying the multipart upload whose parts are being listed.
  13131. UploadId *string `type:"string"`
  13132. }
  13133. // String returns the string representation
  13134. func (s ListPartsOutput) String() string {
  13135. return awsutil.Prettify(s)
  13136. }
  13137. // GoString returns the string representation
  13138. func (s ListPartsOutput) GoString() string {
  13139. return s.String()
  13140. }
  13141. // SetAbortDate sets the AbortDate field's value.
  13142. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  13143. s.AbortDate = &v
  13144. return s
  13145. }
  13146. // SetAbortRuleId sets the AbortRuleId field's value.
  13147. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  13148. s.AbortRuleId = &v
  13149. return s
  13150. }
  13151. // SetBucket sets the Bucket field's value.
  13152. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  13153. s.Bucket = &v
  13154. return s
  13155. }
  13156. func (s *ListPartsOutput) getBucket() (v string) {
  13157. if s.Bucket == nil {
  13158. return v
  13159. }
  13160. return *s.Bucket
  13161. }
  13162. // SetInitiator sets the Initiator field's value.
  13163. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  13164. s.Initiator = v
  13165. return s
  13166. }
  13167. // SetIsTruncated sets the IsTruncated field's value.
  13168. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  13169. s.IsTruncated = &v
  13170. return s
  13171. }
  13172. // SetKey sets the Key field's value.
  13173. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  13174. s.Key = &v
  13175. return s
  13176. }
  13177. // SetMaxParts sets the MaxParts field's value.
  13178. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  13179. s.MaxParts = &v
  13180. return s
  13181. }
  13182. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  13183. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  13184. s.NextPartNumberMarker = &v
  13185. return s
  13186. }
  13187. // SetOwner sets the Owner field's value.
  13188. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  13189. s.Owner = v
  13190. return s
  13191. }
  13192. // SetPartNumberMarker sets the PartNumberMarker field's value.
  13193. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  13194. s.PartNumberMarker = &v
  13195. return s
  13196. }
  13197. // SetParts sets the Parts field's value.
  13198. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  13199. s.Parts = v
  13200. return s
  13201. }
  13202. // SetRequestCharged sets the RequestCharged field's value.
  13203. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  13204. s.RequestCharged = &v
  13205. return s
  13206. }
  13207. // SetStorageClass sets the StorageClass field's value.
  13208. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  13209. s.StorageClass = &v
  13210. return s
  13211. }
  13212. // SetUploadId sets the UploadId field's value.
  13213. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  13214. s.UploadId = &v
  13215. return s
  13216. }
  13217. // Describes an S3 location that will receive the results of the restore request.
  13218. type Location struct {
  13219. _ struct{} `type:"structure"`
  13220. // A list of grants that control access to the staged results.
  13221. AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
  13222. // The name of the bucket where the restore results will be placed.
  13223. //
  13224. // BucketName is a required field
  13225. BucketName *string `type:"string" required:"true"`
  13226. // The canned ACL to apply to the restore results.
  13227. CannedACL *string `type:"string" enum:"ObjectCannedACL"`
  13228. // Describes the server-side encryption that will be applied to the restore
  13229. // results.
  13230. Encryption *Encryption `type:"structure"`
  13231. // The prefix that is prepended to the restore results for this request.
  13232. //
  13233. // Prefix is a required field
  13234. Prefix *string `type:"string" required:"true"`
  13235. // The class of storage used to store the restore results.
  13236. StorageClass *string `type:"string" enum:"StorageClass"`
  13237. // The tag-set that is applied to the restore results.
  13238. Tagging *Tagging `type:"structure"`
  13239. // A list of metadata to store with the restore results in S3.
  13240. UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
  13241. }
  13242. // String returns the string representation
  13243. func (s Location) String() string {
  13244. return awsutil.Prettify(s)
  13245. }
  13246. // GoString returns the string representation
  13247. func (s Location) GoString() string {
  13248. return s.String()
  13249. }
  13250. // Validate inspects the fields of the type to determine if they are valid.
  13251. func (s *Location) Validate() error {
  13252. invalidParams := request.ErrInvalidParams{Context: "Location"}
  13253. if s.BucketName == nil {
  13254. invalidParams.Add(request.NewErrParamRequired("BucketName"))
  13255. }
  13256. if s.Prefix == nil {
  13257. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  13258. }
  13259. if s.AccessControlList != nil {
  13260. for i, v := range s.AccessControlList {
  13261. if v == nil {
  13262. continue
  13263. }
  13264. if err := v.Validate(); err != nil {
  13265. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
  13266. }
  13267. }
  13268. }
  13269. if s.Encryption != nil {
  13270. if err := s.Encryption.Validate(); err != nil {
  13271. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  13272. }
  13273. }
  13274. if s.Tagging != nil {
  13275. if err := s.Tagging.Validate(); err != nil {
  13276. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  13277. }
  13278. }
  13279. if invalidParams.Len() > 0 {
  13280. return invalidParams
  13281. }
  13282. return nil
  13283. }
  13284. // SetAccessControlList sets the AccessControlList field's value.
  13285. func (s *Location) SetAccessControlList(v []*Grant) *Location {
  13286. s.AccessControlList = v
  13287. return s
  13288. }
  13289. // SetBucketName sets the BucketName field's value.
  13290. func (s *Location) SetBucketName(v string) *Location {
  13291. s.BucketName = &v
  13292. return s
  13293. }
  13294. // SetCannedACL sets the CannedACL field's value.
  13295. func (s *Location) SetCannedACL(v string) *Location {
  13296. s.CannedACL = &v
  13297. return s
  13298. }
  13299. // SetEncryption sets the Encryption field's value.
  13300. func (s *Location) SetEncryption(v *Encryption) *Location {
  13301. s.Encryption = v
  13302. return s
  13303. }
  13304. // SetPrefix sets the Prefix field's value.
  13305. func (s *Location) SetPrefix(v string) *Location {
  13306. s.Prefix = &v
  13307. return s
  13308. }
  13309. // SetStorageClass sets the StorageClass field's value.
  13310. func (s *Location) SetStorageClass(v string) *Location {
  13311. s.StorageClass = &v
  13312. return s
  13313. }
  13314. // SetTagging sets the Tagging field's value.
  13315. func (s *Location) SetTagging(v *Tagging) *Location {
  13316. s.Tagging = v
  13317. return s
  13318. }
  13319. // SetUserMetadata sets the UserMetadata field's value.
  13320. func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
  13321. s.UserMetadata = v
  13322. return s
  13323. }
  13324. // Container for logging information. Presence of this element indicates that
  13325. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  13326. // in this case.
  13327. type LoggingEnabled struct {
  13328. _ struct{} `type:"structure"`
  13329. // Specifies the bucket where you want Amazon S3 to store server access logs.
  13330. // You can have your logs delivered to any bucket that you own, including the
  13331. // same bucket that is being logged. You can also configure multiple buckets
  13332. // to deliver their logs to the same target bucket. In this case you should
  13333. // choose a different TargetPrefix for each source bucket so that the delivered
  13334. // log files can be distinguished by key.
  13335. //
  13336. // TargetBucket is a required field
  13337. TargetBucket *string `type:"string" required:"true"`
  13338. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  13339. // This element lets you specify a prefix for the keys that the log files will
  13340. // be stored under.
  13341. //
  13342. // TargetPrefix is a required field
  13343. TargetPrefix *string `type:"string" required:"true"`
  13344. }
  13345. // String returns the string representation
  13346. func (s LoggingEnabled) String() string {
  13347. return awsutil.Prettify(s)
  13348. }
  13349. // GoString returns the string representation
  13350. func (s LoggingEnabled) GoString() string {
  13351. return s.String()
  13352. }
  13353. // Validate inspects the fields of the type to determine if they are valid.
  13354. func (s *LoggingEnabled) Validate() error {
  13355. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  13356. if s.TargetBucket == nil {
  13357. invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
  13358. }
  13359. if s.TargetPrefix == nil {
  13360. invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
  13361. }
  13362. if s.TargetGrants != nil {
  13363. for i, v := range s.TargetGrants {
  13364. if v == nil {
  13365. continue
  13366. }
  13367. if err := v.Validate(); err != nil {
  13368. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  13369. }
  13370. }
  13371. }
  13372. if invalidParams.Len() > 0 {
  13373. return invalidParams
  13374. }
  13375. return nil
  13376. }
  13377. // SetTargetBucket sets the TargetBucket field's value.
  13378. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  13379. s.TargetBucket = &v
  13380. return s
  13381. }
  13382. // SetTargetGrants sets the TargetGrants field's value.
  13383. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  13384. s.TargetGrants = v
  13385. return s
  13386. }
  13387. // SetTargetPrefix sets the TargetPrefix field's value.
  13388. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  13389. s.TargetPrefix = &v
  13390. return s
  13391. }
  13392. // A metadata key-value pair to store with an object.
  13393. type MetadataEntry struct {
  13394. _ struct{} `type:"structure"`
  13395. Name *string `type:"string"`
  13396. Value *string `type:"string"`
  13397. }
  13398. // String returns the string representation
  13399. func (s MetadataEntry) String() string {
  13400. return awsutil.Prettify(s)
  13401. }
  13402. // GoString returns the string representation
  13403. func (s MetadataEntry) GoString() string {
  13404. return s.String()
  13405. }
  13406. // SetName sets the Name field's value.
  13407. func (s *MetadataEntry) SetName(v string) *MetadataEntry {
  13408. s.Name = &v
  13409. return s
  13410. }
  13411. // SetValue sets the Value field's value.
  13412. func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
  13413. s.Value = &v
  13414. return s
  13415. }
  13416. type MetricsAndOperator struct {
  13417. _ struct{} `type:"structure"`
  13418. // The prefix used when evaluating an AND predicate.
  13419. Prefix *string `type:"string"`
  13420. // The list of tags used when evaluating an AND predicate.
  13421. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  13422. }
  13423. // String returns the string representation
  13424. func (s MetricsAndOperator) String() string {
  13425. return awsutil.Prettify(s)
  13426. }
  13427. // GoString returns the string representation
  13428. func (s MetricsAndOperator) GoString() string {
  13429. return s.String()
  13430. }
  13431. // Validate inspects the fields of the type to determine if they are valid.
  13432. func (s *MetricsAndOperator) Validate() error {
  13433. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  13434. if s.Tags != nil {
  13435. for i, v := range s.Tags {
  13436. if v == nil {
  13437. continue
  13438. }
  13439. if err := v.Validate(); err != nil {
  13440. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  13441. }
  13442. }
  13443. }
  13444. if invalidParams.Len() > 0 {
  13445. return invalidParams
  13446. }
  13447. return nil
  13448. }
  13449. // SetPrefix sets the Prefix field's value.
  13450. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  13451. s.Prefix = &v
  13452. return s
  13453. }
  13454. // SetTags sets the Tags field's value.
  13455. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  13456. s.Tags = v
  13457. return s
  13458. }
  13459. type MetricsConfiguration struct {
  13460. _ struct{} `type:"structure"`
  13461. // Specifies a metrics configuration filter. The metrics configuration will
  13462. // only include objects that meet the filter's criteria. A filter must be a
  13463. // prefix, a tag, or a conjunction (MetricsAndOperator).
  13464. Filter *MetricsFilter `type:"structure"`
  13465. // The ID used to identify the metrics configuration.
  13466. //
  13467. // Id is a required field
  13468. Id *string `type:"string" required:"true"`
  13469. }
  13470. // String returns the string representation
  13471. func (s MetricsConfiguration) String() string {
  13472. return awsutil.Prettify(s)
  13473. }
  13474. // GoString returns the string representation
  13475. func (s MetricsConfiguration) GoString() string {
  13476. return s.String()
  13477. }
  13478. // Validate inspects the fields of the type to determine if they are valid.
  13479. func (s *MetricsConfiguration) Validate() error {
  13480. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  13481. if s.Id == nil {
  13482. invalidParams.Add(request.NewErrParamRequired("Id"))
  13483. }
  13484. if s.Filter != nil {
  13485. if err := s.Filter.Validate(); err != nil {
  13486. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  13487. }
  13488. }
  13489. if invalidParams.Len() > 0 {
  13490. return invalidParams
  13491. }
  13492. return nil
  13493. }
  13494. // SetFilter sets the Filter field's value.
  13495. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  13496. s.Filter = v
  13497. return s
  13498. }
  13499. // SetId sets the Id field's value.
  13500. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  13501. s.Id = &v
  13502. return s
  13503. }
  13504. type MetricsFilter struct {
  13505. _ struct{} `type:"structure"`
  13506. // A conjunction (logical AND) of predicates, which is used in evaluating a
  13507. // metrics filter. The operator must have at least two predicates, and an object
  13508. // must match all of the predicates in order for the filter to apply.
  13509. And *MetricsAndOperator `type:"structure"`
  13510. // The prefix used when evaluating a metrics filter.
  13511. Prefix *string `type:"string"`
  13512. // The tag used when evaluating a metrics filter.
  13513. Tag *Tag `type:"structure"`
  13514. }
  13515. // String returns the string representation
  13516. func (s MetricsFilter) String() string {
  13517. return awsutil.Prettify(s)
  13518. }
  13519. // GoString returns the string representation
  13520. func (s MetricsFilter) GoString() string {
  13521. return s.String()
  13522. }
  13523. // Validate inspects the fields of the type to determine if they are valid.
  13524. func (s *MetricsFilter) Validate() error {
  13525. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  13526. if s.And != nil {
  13527. if err := s.And.Validate(); err != nil {
  13528. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  13529. }
  13530. }
  13531. if s.Tag != nil {
  13532. if err := s.Tag.Validate(); err != nil {
  13533. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  13534. }
  13535. }
  13536. if invalidParams.Len() > 0 {
  13537. return invalidParams
  13538. }
  13539. return nil
  13540. }
  13541. // SetAnd sets the And field's value.
  13542. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  13543. s.And = v
  13544. return s
  13545. }
  13546. // SetPrefix sets the Prefix field's value.
  13547. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  13548. s.Prefix = &v
  13549. return s
  13550. }
  13551. // SetTag sets the Tag field's value.
  13552. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  13553. s.Tag = v
  13554. return s
  13555. }
  13556. type MultipartUpload struct {
  13557. _ struct{} `type:"structure"`
  13558. // Date and time at which the multipart upload was initiated.
  13559. Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13560. // Identifies who initiated the multipart upload.
  13561. Initiator *Initiator `type:"structure"`
  13562. // Key of the object for which the multipart upload was initiated.
  13563. Key *string `min:"1" type:"string"`
  13564. Owner *Owner `type:"structure"`
  13565. // The class of storage used to store the object.
  13566. StorageClass *string `type:"string" enum:"StorageClass"`
  13567. // Upload ID that identifies the multipart upload.
  13568. UploadId *string `type:"string"`
  13569. }
  13570. // String returns the string representation
  13571. func (s MultipartUpload) String() string {
  13572. return awsutil.Prettify(s)
  13573. }
  13574. // GoString returns the string representation
  13575. func (s MultipartUpload) GoString() string {
  13576. return s.String()
  13577. }
  13578. // SetInitiated sets the Initiated field's value.
  13579. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  13580. s.Initiated = &v
  13581. return s
  13582. }
  13583. // SetInitiator sets the Initiator field's value.
  13584. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  13585. s.Initiator = v
  13586. return s
  13587. }
  13588. // SetKey sets the Key field's value.
  13589. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  13590. s.Key = &v
  13591. return s
  13592. }
  13593. // SetOwner sets the Owner field's value.
  13594. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  13595. s.Owner = v
  13596. return s
  13597. }
  13598. // SetStorageClass sets the StorageClass field's value.
  13599. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  13600. s.StorageClass = &v
  13601. return s
  13602. }
  13603. // SetUploadId sets the UploadId field's value.
  13604. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  13605. s.UploadId = &v
  13606. return s
  13607. }
  13608. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  13609. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  13610. // configuration action on a bucket that has versioning enabled (or suspended)
  13611. // to request that Amazon S3 delete noncurrent object versions at a specific
  13612. // period in the object's lifetime.
  13613. type NoncurrentVersionExpiration struct {
  13614. _ struct{} `type:"structure"`
  13615. // Specifies the number of days an object is noncurrent before Amazon S3 can
  13616. // perform the associated action. For information about the noncurrent days
  13617. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  13618. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  13619. NoncurrentDays *int64 `type:"integer"`
  13620. }
  13621. // String returns the string representation
  13622. func (s NoncurrentVersionExpiration) String() string {
  13623. return awsutil.Prettify(s)
  13624. }
  13625. // GoString returns the string representation
  13626. func (s NoncurrentVersionExpiration) GoString() string {
  13627. return s.String()
  13628. }
  13629. // SetNoncurrentDays sets the NoncurrentDays field's value.
  13630. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  13631. s.NoncurrentDays = &v
  13632. return s
  13633. }
  13634. // Container for the transition rule that describes when noncurrent objects
  13635. // transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your
  13636. // bucket is versioning-enabled (or versioning is suspended), you can set this
  13637. // action to request that Amazon S3 transition noncurrent object versions to
  13638. // the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period
  13639. // in the object's lifetime.
  13640. type NoncurrentVersionTransition struct {
  13641. _ struct{} `type:"structure"`
  13642. // Specifies the number of days an object is noncurrent before Amazon S3 can
  13643. // perform the associated action. For information about the noncurrent days
  13644. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  13645. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  13646. NoncurrentDays *int64 `type:"integer"`
  13647. // The class of storage used to store the object.
  13648. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  13649. }
  13650. // String returns the string representation
  13651. func (s NoncurrentVersionTransition) String() string {
  13652. return awsutil.Prettify(s)
  13653. }
  13654. // GoString returns the string representation
  13655. func (s NoncurrentVersionTransition) GoString() string {
  13656. return s.String()
  13657. }
  13658. // SetNoncurrentDays sets the NoncurrentDays field's value.
  13659. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  13660. s.NoncurrentDays = &v
  13661. return s
  13662. }
  13663. // SetStorageClass sets the StorageClass field's value.
  13664. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  13665. s.StorageClass = &v
  13666. return s
  13667. }
  13668. // Container for specifying the notification configuration of the bucket. If
  13669. // this element is empty, notifications are turned off on the bucket.
  13670. type NotificationConfiguration struct {
  13671. _ struct{} `type:"structure"`
  13672. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  13673. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  13674. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  13675. }
  13676. // String returns the string representation
  13677. func (s NotificationConfiguration) String() string {
  13678. return awsutil.Prettify(s)
  13679. }
  13680. // GoString returns the string representation
  13681. func (s NotificationConfiguration) GoString() string {
  13682. return s.String()
  13683. }
  13684. // Validate inspects the fields of the type to determine if they are valid.
  13685. func (s *NotificationConfiguration) Validate() error {
  13686. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  13687. if s.LambdaFunctionConfigurations != nil {
  13688. for i, v := range s.LambdaFunctionConfigurations {
  13689. if v == nil {
  13690. continue
  13691. }
  13692. if err := v.Validate(); err != nil {
  13693. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  13694. }
  13695. }
  13696. }
  13697. if s.QueueConfigurations != nil {
  13698. for i, v := range s.QueueConfigurations {
  13699. if v == nil {
  13700. continue
  13701. }
  13702. if err := v.Validate(); err != nil {
  13703. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  13704. }
  13705. }
  13706. }
  13707. if s.TopicConfigurations != nil {
  13708. for i, v := range s.TopicConfigurations {
  13709. if v == nil {
  13710. continue
  13711. }
  13712. if err := v.Validate(); err != nil {
  13713. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  13714. }
  13715. }
  13716. }
  13717. if invalidParams.Len() > 0 {
  13718. return invalidParams
  13719. }
  13720. return nil
  13721. }
  13722. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  13723. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  13724. s.LambdaFunctionConfigurations = v
  13725. return s
  13726. }
  13727. // SetQueueConfigurations sets the QueueConfigurations field's value.
  13728. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  13729. s.QueueConfigurations = v
  13730. return s
  13731. }
  13732. // SetTopicConfigurations sets the TopicConfigurations field's value.
  13733. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  13734. s.TopicConfigurations = v
  13735. return s
  13736. }
  13737. type NotificationConfigurationDeprecated struct {
  13738. _ struct{} `type:"structure"`
  13739. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  13740. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  13741. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  13742. }
  13743. // String returns the string representation
  13744. func (s NotificationConfigurationDeprecated) String() string {
  13745. return awsutil.Prettify(s)
  13746. }
  13747. // GoString returns the string representation
  13748. func (s NotificationConfigurationDeprecated) GoString() string {
  13749. return s.String()
  13750. }
  13751. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  13752. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  13753. s.CloudFunctionConfiguration = v
  13754. return s
  13755. }
  13756. // SetQueueConfiguration sets the QueueConfiguration field's value.
  13757. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  13758. s.QueueConfiguration = v
  13759. return s
  13760. }
  13761. // SetTopicConfiguration sets the TopicConfiguration field's value.
  13762. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  13763. s.TopicConfiguration = v
  13764. return s
  13765. }
  13766. // Container for object key name filtering rules. For information about key
  13767. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  13768. type NotificationConfigurationFilter struct {
  13769. _ struct{} `type:"structure"`
  13770. // Container for object key name prefix and suffix filtering rules.
  13771. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  13772. }
  13773. // String returns the string representation
  13774. func (s NotificationConfigurationFilter) String() string {
  13775. return awsutil.Prettify(s)
  13776. }
  13777. // GoString returns the string representation
  13778. func (s NotificationConfigurationFilter) GoString() string {
  13779. return s.String()
  13780. }
  13781. // SetKey sets the Key field's value.
  13782. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  13783. s.Key = v
  13784. return s
  13785. }
  13786. type Object struct {
  13787. _ struct{} `type:"structure"`
  13788. ETag *string `type:"string"`
  13789. Key *string `min:"1" type:"string"`
  13790. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13791. Owner *Owner `type:"structure"`
  13792. Size *int64 `type:"integer"`
  13793. // The class of storage used to store the object.
  13794. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  13795. }
  13796. // String returns the string representation
  13797. func (s Object) String() string {
  13798. return awsutil.Prettify(s)
  13799. }
  13800. // GoString returns the string representation
  13801. func (s Object) GoString() string {
  13802. return s.String()
  13803. }
  13804. // SetETag sets the ETag field's value.
  13805. func (s *Object) SetETag(v string) *Object {
  13806. s.ETag = &v
  13807. return s
  13808. }
  13809. // SetKey sets the Key field's value.
  13810. func (s *Object) SetKey(v string) *Object {
  13811. s.Key = &v
  13812. return s
  13813. }
  13814. // SetLastModified sets the LastModified field's value.
  13815. func (s *Object) SetLastModified(v time.Time) *Object {
  13816. s.LastModified = &v
  13817. return s
  13818. }
  13819. // SetOwner sets the Owner field's value.
  13820. func (s *Object) SetOwner(v *Owner) *Object {
  13821. s.Owner = v
  13822. return s
  13823. }
  13824. // SetSize sets the Size field's value.
  13825. func (s *Object) SetSize(v int64) *Object {
  13826. s.Size = &v
  13827. return s
  13828. }
  13829. // SetStorageClass sets the StorageClass field's value.
  13830. func (s *Object) SetStorageClass(v string) *Object {
  13831. s.StorageClass = &v
  13832. return s
  13833. }
  13834. type ObjectIdentifier struct {
  13835. _ struct{} `type:"structure"`
  13836. // Key name of the object to delete.
  13837. //
  13838. // Key is a required field
  13839. Key *string `min:"1" type:"string" required:"true"`
  13840. // VersionId for the specific version of the object to delete.
  13841. VersionId *string `type:"string"`
  13842. }
  13843. // String returns the string representation
  13844. func (s ObjectIdentifier) String() string {
  13845. return awsutil.Prettify(s)
  13846. }
  13847. // GoString returns the string representation
  13848. func (s ObjectIdentifier) GoString() string {
  13849. return s.String()
  13850. }
  13851. // Validate inspects the fields of the type to determine if they are valid.
  13852. func (s *ObjectIdentifier) Validate() error {
  13853. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  13854. if s.Key == nil {
  13855. invalidParams.Add(request.NewErrParamRequired("Key"))
  13856. }
  13857. if s.Key != nil && len(*s.Key) < 1 {
  13858. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  13859. }
  13860. if invalidParams.Len() > 0 {
  13861. return invalidParams
  13862. }
  13863. return nil
  13864. }
  13865. // SetKey sets the Key field's value.
  13866. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  13867. s.Key = &v
  13868. return s
  13869. }
  13870. // SetVersionId sets the VersionId field's value.
  13871. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  13872. s.VersionId = &v
  13873. return s
  13874. }
  13875. type ObjectVersion struct {
  13876. _ struct{} `type:"structure"`
  13877. ETag *string `type:"string"`
  13878. // Specifies whether the object is (true) or is not (false) the latest version
  13879. // of an object.
  13880. IsLatest *bool `type:"boolean"`
  13881. // The object key.
  13882. Key *string `min:"1" type:"string"`
  13883. // Date and time the object was last modified.
  13884. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13885. Owner *Owner `type:"structure"`
  13886. // Size in bytes of the object.
  13887. Size *int64 `type:"integer"`
  13888. // The class of storage used to store the object.
  13889. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  13890. // Version ID of an object.
  13891. VersionId *string `type:"string"`
  13892. }
  13893. // String returns the string representation
  13894. func (s ObjectVersion) String() string {
  13895. return awsutil.Prettify(s)
  13896. }
  13897. // GoString returns the string representation
  13898. func (s ObjectVersion) GoString() string {
  13899. return s.String()
  13900. }
  13901. // SetETag sets the ETag field's value.
  13902. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  13903. s.ETag = &v
  13904. return s
  13905. }
  13906. // SetIsLatest sets the IsLatest field's value.
  13907. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  13908. s.IsLatest = &v
  13909. return s
  13910. }
  13911. // SetKey sets the Key field's value.
  13912. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  13913. s.Key = &v
  13914. return s
  13915. }
  13916. // SetLastModified sets the LastModified field's value.
  13917. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  13918. s.LastModified = &v
  13919. return s
  13920. }
  13921. // SetOwner sets the Owner field's value.
  13922. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  13923. s.Owner = v
  13924. return s
  13925. }
  13926. // SetSize sets the Size field's value.
  13927. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  13928. s.Size = &v
  13929. return s
  13930. }
  13931. // SetStorageClass sets the StorageClass field's value.
  13932. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  13933. s.StorageClass = &v
  13934. return s
  13935. }
  13936. // SetVersionId sets the VersionId field's value.
  13937. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  13938. s.VersionId = &v
  13939. return s
  13940. }
  13941. // Describes the location where the restore job's output is stored.
  13942. type OutputLocation struct {
  13943. _ struct{} `type:"structure"`
  13944. // Describes an S3 location that will receive the results of the restore request.
  13945. S3 *Location `type:"structure"`
  13946. }
  13947. // String returns the string representation
  13948. func (s OutputLocation) String() string {
  13949. return awsutil.Prettify(s)
  13950. }
  13951. // GoString returns the string representation
  13952. func (s OutputLocation) GoString() string {
  13953. return s.String()
  13954. }
  13955. // Validate inspects the fields of the type to determine if they are valid.
  13956. func (s *OutputLocation) Validate() error {
  13957. invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
  13958. if s.S3 != nil {
  13959. if err := s.S3.Validate(); err != nil {
  13960. invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
  13961. }
  13962. }
  13963. if invalidParams.Len() > 0 {
  13964. return invalidParams
  13965. }
  13966. return nil
  13967. }
  13968. // SetS3 sets the S3 field's value.
  13969. func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
  13970. s.S3 = v
  13971. return s
  13972. }
  13973. // Describes how results of the Select job are serialized.
  13974. type OutputSerialization struct {
  13975. _ struct{} `type:"structure"`
  13976. // Describes the serialization of CSV-encoded Select results.
  13977. CSV *CSVOutput `type:"structure"`
  13978. // Specifies JSON as request's output serialization format.
  13979. JSON *JSONOutput `type:"structure"`
  13980. }
  13981. // String returns the string representation
  13982. func (s OutputSerialization) String() string {
  13983. return awsutil.Prettify(s)
  13984. }
  13985. // GoString returns the string representation
  13986. func (s OutputSerialization) GoString() string {
  13987. return s.String()
  13988. }
  13989. // SetCSV sets the CSV field's value.
  13990. func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
  13991. s.CSV = v
  13992. return s
  13993. }
  13994. // SetJSON sets the JSON field's value.
  13995. func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
  13996. s.JSON = v
  13997. return s
  13998. }
  13999. type Owner struct {
  14000. _ struct{} `type:"structure"`
  14001. DisplayName *string `type:"string"`
  14002. ID *string `type:"string"`
  14003. }
  14004. // String returns the string representation
  14005. func (s Owner) String() string {
  14006. return awsutil.Prettify(s)
  14007. }
  14008. // GoString returns the string representation
  14009. func (s Owner) GoString() string {
  14010. return s.String()
  14011. }
  14012. // SetDisplayName sets the DisplayName field's value.
  14013. func (s *Owner) SetDisplayName(v string) *Owner {
  14014. s.DisplayName = &v
  14015. return s
  14016. }
  14017. // SetID sets the ID field's value.
  14018. func (s *Owner) SetID(v string) *Owner {
  14019. s.ID = &v
  14020. return s
  14021. }
  14022. type Part struct {
  14023. _ struct{} `type:"structure"`
  14024. // Entity tag returned when the part was uploaded.
  14025. ETag *string `type:"string"`
  14026. // Date and time at which the part was uploaded.
  14027. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  14028. // Part number identifying the part. This is a positive integer between 1 and
  14029. // 10,000.
  14030. PartNumber *int64 `type:"integer"`
  14031. // Size of the uploaded part data.
  14032. Size *int64 `type:"integer"`
  14033. }
  14034. // String returns the string representation
  14035. func (s Part) String() string {
  14036. return awsutil.Prettify(s)
  14037. }
  14038. // GoString returns the string representation
  14039. func (s Part) GoString() string {
  14040. return s.String()
  14041. }
  14042. // SetETag sets the ETag field's value.
  14043. func (s *Part) SetETag(v string) *Part {
  14044. s.ETag = &v
  14045. return s
  14046. }
  14047. // SetLastModified sets the LastModified field's value.
  14048. func (s *Part) SetLastModified(v time.Time) *Part {
  14049. s.LastModified = &v
  14050. return s
  14051. }
  14052. // SetPartNumber sets the PartNumber field's value.
  14053. func (s *Part) SetPartNumber(v int64) *Part {
  14054. s.PartNumber = &v
  14055. return s
  14056. }
  14057. // SetSize sets the Size field's value.
  14058. func (s *Part) SetSize(v int64) *Part {
  14059. s.Size = &v
  14060. return s
  14061. }
  14062. type Progress struct {
  14063. _ struct{} `type:"structure"`
  14064. // Current number of uncompressed object bytes processed.
  14065. BytesProcessed *int64 `type:"long"`
  14066. // Current number of bytes of records payload data returned.
  14067. BytesReturned *int64 `type:"long"`
  14068. // Current number of object bytes scanned.
  14069. BytesScanned *int64 `type:"long"`
  14070. }
  14071. // String returns the string representation
  14072. func (s Progress) String() string {
  14073. return awsutil.Prettify(s)
  14074. }
  14075. // GoString returns the string representation
  14076. func (s Progress) GoString() string {
  14077. return s.String()
  14078. }
  14079. // SetBytesProcessed sets the BytesProcessed field's value.
  14080. func (s *Progress) SetBytesProcessed(v int64) *Progress {
  14081. s.BytesProcessed = &v
  14082. return s
  14083. }
  14084. // SetBytesReturned sets the BytesReturned field's value.
  14085. func (s *Progress) SetBytesReturned(v int64) *Progress {
  14086. s.BytesReturned = &v
  14087. return s
  14088. }
  14089. // SetBytesScanned sets the BytesScanned field's value.
  14090. func (s *Progress) SetBytesScanned(v int64) *Progress {
  14091. s.BytesScanned = &v
  14092. return s
  14093. }
  14094. type ProgressEvent struct {
  14095. _ struct{} `type:"structure" payload:"Details"`
  14096. // The Progress event details.
  14097. Details *Progress `locationName:"Details" type:"structure"`
  14098. }
  14099. // String returns the string representation
  14100. func (s ProgressEvent) String() string {
  14101. return awsutil.Prettify(s)
  14102. }
  14103. // GoString returns the string representation
  14104. func (s ProgressEvent) GoString() string {
  14105. return s.String()
  14106. }
  14107. // SetDetails sets the Details field's value.
  14108. func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent {
  14109. s.Details = v
  14110. return s
  14111. }
  14112. // The ProgressEvent is and event in the SelectObjectContentEventStream group of events.
  14113. func (s *ProgressEvent) eventSelectObjectContentEventStream() {}
  14114. // UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value.
  14115. // This method is only used internally within the SDK's EventStream handling.
  14116. func (s *ProgressEvent) UnmarshalEvent(
  14117. payloadUnmarshaler protocol.PayloadUnmarshaler,
  14118. msg eventstream.Message,
  14119. ) error {
  14120. if err := payloadUnmarshaler.UnmarshalPayload(
  14121. bytes.NewReader(msg.Payload), s,
  14122. ); err != nil {
  14123. return fmt.Errorf("failed to unmarshal payload, %v", err)
  14124. }
  14125. return nil
  14126. }
  14127. type PutBucketAccelerateConfigurationInput struct {
  14128. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  14129. // Specifies the Accelerate Configuration you want to set for the bucket.
  14130. //
  14131. // AccelerateConfiguration is a required field
  14132. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14133. // Name of the bucket for which the accelerate configuration is set.
  14134. //
  14135. // Bucket is a required field
  14136. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14137. }
  14138. // String returns the string representation
  14139. func (s PutBucketAccelerateConfigurationInput) String() string {
  14140. return awsutil.Prettify(s)
  14141. }
  14142. // GoString returns the string representation
  14143. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  14144. return s.String()
  14145. }
  14146. // Validate inspects the fields of the type to determine if they are valid.
  14147. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  14148. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  14149. if s.AccelerateConfiguration == nil {
  14150. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  14151. }
  14152. if s.Bucket == nil {
  14153. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14154. }
  14155. if invalidParams.Len() > 0 {
  14156. return invalidParams
  14157. }
  14158. return nil
  14159. }
  14160. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  14161. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  14162. s.AccelerateConfiguration = v
  14163. return s
  14164. }
  14165. // SetBucket sets the Bucket field's value.
  14166. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  14167. s.Bucket = &v
  14168. return s
  14169. }
  14170. func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
  14171. if s.Bucket == nil {
  14172. return v
  14173. }
  14174. return *s.Bucket
  14175. }
  14176. type PutBucketAccelerateConfigurationOutput struct {
  14177. _ struct{} `type:"structure"`
  14178. }
  14179. // String returns the string representation
  14180. func (s PutBucketAccelerateConfigurationOutput) String() string {
  14181. return awsutil.Prettify(s)
  14182. }
  14183. // GoString returns the string representation
  14184. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  14185. return s.String()
  14186. }
  14187. type PutBucketAclInput struct {
  14188. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  14189. // The canned ACL to apply to the bucket.
  14190. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  14191. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14192. // Bucket is a required field
  14193. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14194. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  14195. // bucket.
  14196. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  14197. // Allows grantee to list the objects in the bucket.
  14198. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  14199. // Allows grantee to read the bucket ACL.
  14200. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  14201. // Allows grantee to create, overwrite, and delete any object in the bucket.
  14202. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  14203. // Allows grantee to write the ACL for the applicable bucket.
  14204. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  14205. }
  14206. // String returns the string representation
  14207. func (s PutBucketAclInput) String() string {
  14208. return awsutil.Prettify(s)
  14209. }
  14210. // GoString returns the string representation
  14211. func (s PutBucketAclInput) GoString() string {
  14212. return s.String()
  14213. }
  14214. // Validate inspects the fields of the type to determine if they are valid.
  14215. func (s *PutBucketAclInput) Validate() error {
  14216. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  14217. if s.Bucket == nil {
  14218. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14219. }
  14220. if s.AccessControlPolicy != nil {
  14221. if err := s.AccessControlPolicy.Validate(); err != nil {
  14222. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  14223. }
  14224. }
  14225. if invalidParams.Len() > 0 {
  14226. return invalidParams
  14227. }
  14228. return nil
  14229. }
  14230. // SetACL sets the ACL field's value.
  14231. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  14232. s.ACL = &v
  14233. return s
  14234. }
  14235. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  14236. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  14237. s.AccessControlPolicy = v
  14238. return s
  14239. }
  14240. // SetBucket sets the Bucket field's value.
  14241. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  14242. s.Bucket = &v
  14243. return s
  14244. }
  14245. func (s *PutBucketAclInput) getBucket() (v string) {
  14246. if s.Bucket == nil {
  14247. return v
  14248. }
  14249. return *s.Bucket
  14250. }
  14251. // SetGrantFullControl sets the GrantFullControl field's value.
  14252. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  14253. s.GrantFullControl = &v
  14254. return s
  14255. }
  14256. // SetGrantRead sets the GrantRead field's value.
  14257. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  14258. s.GrantRead = &v
  14259. return s
  14260. }
  14261. // SetGrantReadACP sets the GrantReadACP field's value.
  14262. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  14263. s.GrantReadACP = &v
  14264. return s
  14265. }
  14266. // SetGrantWrite sets the GrantWrite field's value.
  14267. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  14268. s.GrantWrite = &v
  14269. return s
  14270. }
  14271. // SetGrantWriteACP sets the GrantWriteACP field's value.
  14272. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  14273. s.GrantWriteACP = &v
  14274. return s
  14275. }
  14276. type PutBucketAclOutput struct {
  14277. _ struct{} `type:"structure"`
  14278. }
  14279. // String returns the string representation
  14280. func (s PutBucketAclOutput) String() string {
  14281. return awsutil.Prettify(s)
  14282. }
  14283. // GoString returns the string representation
  14284. func (s PutBucketAclOutput) GoString() string {
  14285. return s.String()
  14286. }
  14287. type PutBucketAnalyticsConfigurationInput struct {
  14288. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  14289. // The configuration and any analyses for the analytics filter.
  14290. //
  14291. // AnalyticsConfiguration is a required field
  14292. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14293. // The name of the bucket to which an analytics configuration is stored.
  14294. //
  14295. // Bucket is a required field
  14296. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14297. // The identifier used to represent an analytics configuration.
  14298. //
  14299. // Id is a required field
  14300. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14301. }
  14302. // String returns the string representation
  14303. func (s PutBucketAnalyticsConfigurationInput) String() string {
  14304. return awsutil.Prettify(s)
  14305. }
  14306. // GoString returns the string representation
  14307. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  14308. return s.String()
  14309. }
  14310. // Validate inspects the fields of the type to determine if they are valid.
  14311. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  14312. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  14313. if s.AnalyticsConfiguration == nil {
  14314. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  14315. }
  14316. if s.Bucket == nil {
  14317. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14318. }
  14319. if s.Id == nil {
  14320. invalidParams.Add(request.NewErrParamRequired("Id"))
  14321. }
  14322. if s.AnalyticsConfiguration != nil {
  14323. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  14324. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  14325. }
  14326. }
  14327. if invalidParams.Len() > 0 {
  14328. return invalidParams
  14329. }
  14330. return nil
  14331. }
  14332. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  14333. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  14334. s.AnalyticsConfiguration = v
  14335. return s
  14336. }
  14337. // SetBucket sets the Bucket field's value.
  14338. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  14339. s.Bucket = &v
  14340. return s
  14341. }
  14342. func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
  14343. if s.Bucket == nil {
  14344. return v
  14345. }
  14346. return *s.Bucket
  14347. }
  14348. // SetId sets the Id field's value.
  14349. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  14350. s.Id = &v
  14351. return s
  14352. }
  14353. type PutBucketAnalyticsConfigurationOutput struct {
  14354. _ struct{} `type:"structure"`
  14355. }
  14356. // String returns the string representation
  14357. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  14358. return awsutil.Prettify(s)
  14359. }
  14360. // GoString returns the string representation
  14361. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  14362. return s.String()
  14363. }
  14364. type PutBucketCorsInput struct {
  14365. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  14366. // Bucket is a required field
  14367. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14368. // CORSConfiguration is a required field
  14369. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14370. }
  14371. // String returns the string representation
  14372. func (s PutBucketCorsInput) String() string {
  14373. return awsutil.Prettify(s)
  14374. }
  14375. // GoString returns the string representation
  14376. func (s PutBucketCorsInput) GoString() string {
  14377. return s.String()
  14378. }
  14379. // Validate inspects the fields of the type to determine if they are valid.
  14380. func (s *PutBucketCorsInput) Validate() error {
  14381. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  14382. if s.Bucket == nil {
  14383. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14384. }
  14385. if s.CORSConfiguration == nil {
  14386. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  14387. }
  14388. if s.CORSConfiguration != nil {
  14389. if err := s.CORSConfiguration.Validate(); err != nil {
  14390. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  14391. }
  14392. }
  14393. if invalidParams.Len() > 0 {
  14394. return invalidParams
  14395. }
  14396. return nil
  14397. }
  14398. // SetBucket sets the Bucket field's value.
  14399. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  14400. s.Bucket = &v
  14401. return s
  14402. }
  14403. func (s *PutBucketCorsInput) getBucket() (v string) {
  14404. if s.Bucket == nil {
  14405. return v
  14406. }
  14407. return *s.Bucket
  14408. }
  14409. // SetCORSConfiguration sets the CORSConfiguration field's value.
  14410. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  14411. s.CORSConfiguration = v
  14412. return s
  14413. }
  14414. type PutBucketCorsOutput struct {
  14415. _ struct{} `type:"structure"`
  14416. }
  14417. // String returns the string representation
  14418. func (s PutBucketCorsOutput) String() string {
  14419. return awsutil.Prettify(s)
  14420. }
  14421. // GoString returns the string representation
  14422. func (s PutBucketCorsOutput) GoString() string {
  14423. return s.String()
  14424. }
  14425. type PutBucketEncryptionInput struct {
  14426. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  14427. // The name of the bucket for which the server-side encryption configuration
  14428. // is set.
  14429. //
  14430. // Bucket is a required field
  14431. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14432. // Container for server-side encryption configuration rules. Currently S3 supports
  14433. // one rule only.
  14434. //
  14435. // ServerSideEncryptionConfiguration is a required field
  14436. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14437. }
  14438. // String returns the string representation
  14439. func (s PutBucketEncryptionInput) String() string {
  14440. return awsutil.Prettify(s)
  14441. }
  14442. // GoString returns the string representation
  14443. func (s PutBucketEncryptionInput) GoString() string {
  14444. return s.String()
  14445. }
  14446. // Validate inspects the fields of the type to determine if they are valid.
  14447. func (s *PutBucketEncryptionInput) Validate() error {
  14448. invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
  14449. if s.Bucket == nil {
  14450. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14451. }
  14452. if s.ServerSideEncryptionConfiguration == nil {
  14453. invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
  14454. }
  14455. if s.ServerSideEncryptionConfiguration != nil {
  14456. if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
  14457. invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
  14458. }
  14459. }
  14460. if invalidParams.Len() > 0 {
  14461. return invalidParams
  14462. }
  14463. return nil
  14464. }
  14465. // SetBucket sets the Bucket field's value.
  14466. func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
  14467. s.Bucket = &v
  14468. return s
  14469. }
  14470. func (s *PutBucketEncryptionInput) getBucket() (v string) {
  14471. if s.Bucket == nil {
  14472. return v
  14473. }
  14474. return *s.Bucket
  14475. }
  14476. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  14477. func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
  14478. s.ServerSideEncryptionConfiguration = v
  14479. return s
  14480. }
  14481. type PutBucketEncryptionOutput struct {
  14482. _ struct{} `type:"structure"`
  14483. }
  14484. // String returns the string representation
  14485. func (s PutBucketEncryptionOutput) String() string {
  14486. return awsutil.Prettify(s)
  14487. }
  14488. // GoString returns the string representation
  14489. func (s PutBucketEncryptionOutput) GoString() string {
  14490. return s.String()
  14491. }
  14492. type PutBucketInventoryConfigurationInput struct {
  14493. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  14494. // The name of the bucket where the inventory configuration will be stored.
  14495. //
  14496. // Bucket is a required field
  14497. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14498. // The ID used to identify the inventory configuration.
  14499. //
  14500. // Id is a required field
  14501. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14502. // Specifies the inventory configuration.
  14503. //
  14504. // InventoryConfiguration is a required field
  14505. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14506. }
  14507. // String returns the string representation
  14508. func (s PutBucketInventoryConfigurationInput) String() string {
  14509. return awsutil.Prettify(s)
  14510. }
  14511. // GoString returns the string representation
  14512. func (s PutBucketInventoryConfigurationInput) GoString() string {
  14513. return s.String()
  14514. }
  14515. // Validate inspects the fields of the type to determine if they are valid.
  14516. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  14517. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  14518. if s.Bucket == nil {
  14519. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14520. }
  14521. if s.Id == nil {
  14522. invalidParams.Add(request.NewErrParamRequired("Id"))
  14523. }
  14524. if s.InventoryConfiguration == nil {
  14525. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  14526. }
  14527. if s.InventoryConfiguration != nil {
  14528. if err := s.InventoryConfiguration.Validate(); err != nil {
  14529. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  14530. }
  14531. }
  14532. if invalidParams.Len() > 0 {
  14533. return invalidParams
  14534. }
  14535. return nil
  14536. }
  14537. // SetBucket sets the Bucket field's value.
  14538. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  14539. s.Bucket = &v
  14540. return s
  14541. }
  14542. func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
  14543. if s.Bucket == nil {
  14544. return v
  14545. }
  14546. return *s.Bucket
  14547. }
  14548. // SetId sets the Id field's value.
  14549. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  14550. s.Id = &v
  14551. return s
  14552. }
  14553. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  14554. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  14555. s.InventoryConfiguration = v
  14556. return s
  14557. }
  14558. type PutBucketInventoryConfigurationOutput struct {
  14559. _ struct{} `type:"structure"`
  14560. }
  14561. // String returns the string representation
  14562. func (s PutBucketInventoryConfigurationOutput) String() string {
  14563. return awsutil.Prettify(s)
  14564. }
  14565. // GoString returns the string representation
  14566. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  14567. return s.String()
  14568. }
  14569. type PutBucketLifecycleConfigurationInput struct {
  14570. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  14571. // Bucket is a required field
  14572. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14573. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14574. }
  14575. // String returns the string representation
  14576. func (s PutBucketLifecycleConfigurationInput) String() string {
  14577. return awsutil.Prettify(s)
  14578. }
  14579. // GoString returns the string representation
  14580. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  14581. return s.String()
  14582. }
  14583. // Validate inspects the fields of the type to determine if they are valid.
  14584. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  14585. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  14586. if s.Bucket == nil {
  14587. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14588. }
  14589. if s.LifecycleConfiguration != nil {
  14590. if err := s.LifecycleConfiguration.Validate(); err != nil {
  14591. invalidParams.AddNested("LifecycleConfiguration", 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 *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  14601. s.Bucket = &v
  14602. return s
  14603. }
  14604. func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
  14605. if s.Bucket == nil {
  14606. return v
  14607. }
  14608. return *s.Bucket
  14609. }
  14610. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  14611. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  14612. s.LifecycleConfiguration = v
  14613. return s
  14614. }
  14615. type PutBucketLifecycleConfigurationOutput struct {
  14616. _ struct{} `type:"structure"`
  14617. }
  14618. // String returns the string representation
  14619. func (s PutBucketLifecycleConfigurationOutput) String() string {
  14620. return awsutil.Prettify(s)
  14621. }
  14622. // GoString returns the string representation
  14623. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  14624. return s.String()
  14625. }
  14626. type PutBucketLifecycleInput struct {
  14627. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  14628. // Bucket is a required field
  14629. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14630. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14631. }
  14632. // String returns the string representation
  14633. func (s PutBucketLifecycleInput) String() string {
  14634. return awsutil.Prettify(s)
  14635. }
  14636. // GoString returns the string representation
  14637. func (s PutBucketLifecycleInput) GoString() string {
  14638. return s.String()
  14639. }
  14640. // Validate inspects the fields of the type to determine if they are valid.
  14641. func (s *PutBucketLifecycleInput) Validate() error {
  14642. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  14643. if s.Bucket == nil {
  14644. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14645. }
  14646. if s.LifecycleConfiguration != nil {
  14647. if err := s.LifecycleConfiguration.Validate(); err != nil {
  14648. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  14649. }
  14650. }
  14651. if invalidParams.Len() > 0 {
  14652. return invalidParams
  14653. }
  14654. return nil
  14655. }
  14656. // SetBucket sets the Bucket field's value.
  14657. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  14658. s.Bucket = &v
  14659. return s
  14660. }
  14661. func (s *PutBucketLifecycleInput) getBucket() (v string) {
  14662. if s.Bucket == nil {
  14663. return v
  14664. }
  14665. return *s.Bucket
  14666. }
  14667. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  14668. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  14669. s.LifecycleConfiguration = v
  14670. return s
  14671. }
  14672. type PutBucketLifecycleOutput struct {
  14673. _ struct{} `type:"structure"`
  14674. }
  14675. // String returns the string representation
  14676. func (s PutBucketLifecycleOutput) String() string {
  14677. return awsutil.Prettify(s)
  14678. }
  14679. // GoString returns the string representation
  14680. func (s PutBucketLifecycleOutput) GoString() string {
  14681. return s.String()
  14682. }
  14683. type PutBucketLoggingInput struct {
  14684. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  14685. // Bucket is a required field
  14686. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14687. // BucketLoggingStatus is a required field
  14688. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14689. }
  14690. // String returns the string representation
  14691. func (s PutBucketLoggingInput) String() string {
  14692. return awsutil.Prettify(s)
  14693. }
  14694. // GoString returns the string representation
  14695. func (s PutBucketLoggingInput) GoString() string {
  14696. return s.String()
  14697. }
  14698. // Validate inspects the fields of the type to determine if they are valid.
  14699. func (s *PutBucketLoggingInput) Validate() error {
  14700. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  14701. if s.Bucket == nil {
  14702. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14703. }
  14704. if s.BucketLoggingStatus == nil {
  14705. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  14706. }
  14707. if s.BucketLoggingStatus != nil {
  14708. if err := s.BucketLoggingStatus.Validate(); err != nil {
  14709. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  14710. }
  14711. }
  14712. if invalidParams.Len() > 0 {
  14713. return invalidParams
  14714. }
  14715. return nil
  14716. }
  14717. // SetBucket sets the Bucket field's value.
  14718. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  14719. s.Bucket = &v
  14720. return s
  14721. }
  14722. func (s *PutBucketLoggingInput) getBucket() (v string) {
  14723. if s.Bucket == nil {
  14724. return v
  14725. }
  14726. return *s.Bucket
  14727. }
  14728. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  14729. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  14730. s.BucketLoggingStatus = v
  14731. return s
  14732. }
  14733. type PutBucketLoggingOutput struct {
  14734. _ struct{} `type:"structure"`
  14735. }
  14736. // String returns the string representation
  14737. func (s PutBucketLoggingOutput) String() string {
  14738. return awsutil.Prettify(s)
  14739. }
  14740. // GoString returns the string representation
  14741. func (s PutBucketLoggingOutput) GoString() string {
  14742. return s.String()
  14743. }
  14744. type PutBucketMetricsConfigurationInput struct {
  14745. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  14746. // The name of the bucket for which the metrics configuration is set.
  14747. //
  14748. // Bucket is a required field
  14749. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14750. // The ID used to identify the metrics configuration.
  14751. //
  14752. // Id is a required field
  14753. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14754. // Specifies the metrics configuration.
  14755. //
  14756. // MetricsConfiguration is a required field
  14757. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14758. }
  14759. // String returns the string representation
  14760. func (s PutBucketMetricsConfigurationInput) String() string {
  14761. return awsutil.Prettify(s)
  14762. }
  14763. // GoString returns the string representation
  14764. func (s PutBucketMetricsConfigurationInput) GoString() string {
  14765. return s.String()
  14766. }
  14767. // Validate inspects the fields of the type to determine if they are valid.
  14768. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  14769. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  14770. if s.Bucket == nil {
  14771. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14772. }
  14773. if s.Id == nil {
  14774. invalidParams.Add(request.NewErrParamRequired("Id"))
  14775. }
  14776. if s.MetricsConfiguration == nil {
  14777. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  14778. }
  14779. if s.MetricsConfiguration != nil {
  14780. if err := s.MetricsConfiguration.Validate(); err != nil {
  14781. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  14782. }
  14783. }
  14784. if invalidParams.Len() > 0 {
  14785. return invalidParams
  14786. }
  14787. return nil
  14788. }
  14789. // SetBucket sets the Bucket field's value.
  14790. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  14791. s.Bucket = &v
  14792. return s
  14793. }
  14794. func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
  14795. if s.Bucket == nil {
  14796. return v
  14797. }
  14798. return *s.Bucket
  14799. }
  14800. // SetId sets the Id field's value.
  14801. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  14802. s.Id = &v
  14803. return s
  14804. }
  14805. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  14806. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  14807. s.MetricsConfiguration = v
  14808. return s
  14809. }
  14810. type PutBucketMetricsConfigurationOutput struct {
  14811. _ struct{} `type:"structure"`
  14812. }
  14813. // String returns the string representation
  14814. func (s PutBucketMetricsConfigurationOutput) String() string {
  14815. return awsutil.Prettify(s)
  14816. }
  14817. // GoString returns the string representation
  14818. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  14819. return s.String()
  14820. }
  14821. type PutBucketNotificationConfigurationInput struct {
  14822. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  14823. // Bucket is a required field
  14824. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14825. // Container for specifying the notification configuration of the bucket. If
  14826. // this element is empty, notifications are turned off on the bucket.
  14827. //
  14828. // NotificationConfiguration is a required field
  14829. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14830. }
  14831. // String returns the string representation
  14832. func (s PutBucketNotificationConfigurationInput) String() string {
  14833. return awsutil.Prettify(s)
  14834. }
  14835. // GoString returns the string representation
  14836. func (s PutBucketNotificationConfigurationInput) GoString() string {
  14837. return s.String()
  14838. }
  14839. // Validate inspects the fields of the type to determine if they are valid.
  14840. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  14841. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  14842. if s.Bucket == nil {
  14843. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14844. }
  14845. if s.NotificationConfiguration == nil {
  14846. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  14847. }
  14848. if s.NotificationConfiguration != nil {
  14849. if err := s.NotificationConfiguration.Validate(); err != nil {
  14850. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  14851. }
  14852. }
  14853. if invalidParams.Len() > 0 {
  14854. return invalidParams
  14855. }
  14856. return nil
  14857. }
  14858. // SetBucket sets the Bucket field's value.
  14859. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  14860. s.Bucket = &v
  14861. return s
  14862. }
  14863. func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
  14864. if s.Bucket == nil {
  14865. return v
  14866. }
  14867. return *s.Bucket
  14868. }
  14869. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  14870. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  14871. s.NotificationConfiguration = v
  14872. return s
  14873. }
  14874. type PutBucketNotificationConfigurationOutput struct {
  14875. _ struct{} `type:"structure"`
  14876. }
  14877. // String returns the string representation
  14878. func (s PutBucketNotificationConfigurationOutput) String() string {
  14879. return awsutil.Prettify(s)
  14880. }
  14881. // GoString returns the string representation
  14882. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  14883. return s.String()
  14884. }
  14885. type PutBucketNotificationInput struct {
  14886. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  14887. // Bucket is a required field
  14888. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14889. // NotificationConfiguration is a required field
  14890. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14891. }
  14892. // String returns the string representation
  14893. func (s PutBucketNotificationInput) String() string {
  14894. return awsutil.Prettify(s)
  14895. }
  14896. // GoString returns the string representation
  14897. func (s PutBucketNotificationInput) GoString() string {
  14898. return s.String()
  14899. }
  14900. // Validate inspects the fields of the type to determine if they are valid.
  14901. func (s *PutBucketNotificationInput) Validate() error {
  14902. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  14903. if s.Bucket == nil {
  14904. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14905. }
  14906. if s.NotificationConfiguration == nil {
  14907. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  14908. }
  14909. if invalidParams.Len() > 0 {
  14910. return invalidParams
  14911. }
  14912. return nil
  14913. }
  14914. // SetBucket sets the Bucket field's value.
  14915. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  14916. s.Bucket = &v
  14917. return s
  14918. }
  14919. func (s *PutBucketNotificationInput) getBucket() (v string) {
  14920. if s.Bucket == nil {
  14921. return v
  14922. }
  14923. return *s.Bucket
  14924. }
  14925. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  14926. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  14927. s.NotificationConfiguration = v
  14928. return s
  14929. }
  14930. type PutBucketNotificationOutput struct {
  14931. _ struct{} `type:"structure"`
  14932. }
  14933. // String returns the string representation
  14934. func (s PutBucketNotificationOutput) String() string {
  14935. return awsutil.Prettify(s)
  14936. }
  14937. // GoString returns the string representation
  14938. func (s PutBucketNotificationOutput) GoString() string {
  14939. return s.String()
  14940. }
  14941. type PutBucketPolicyInput struct {
  14942. _ struct{} `type:"structure" payload:"Policy"`
  14943. // Bucket is a required field
  14944. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14945. // Set this parameter to true to confirm that you want to remove your permissions
  14946. // to change this bucket policy in the future.
  14947. ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
  14948. // The bucket policy as a JSON document.
  14949. //
  14950. // Policy is a required field
  14951. Policy *string `type:"string" required:"true"`
  14952. }
  14953. // String returns the string representation
  14954. func (s PutBucketPolicyInput) String() string {
  14955. return awsutil.Prettify(s)
  14956. }
  14957. // GoString returns the string representation
  14958. func (s PutBucketPolicyInput) GoString() string {
  14959. return s.String()
  14960. }
  14961. // Validate inspects the fields of the type to determine if they are valid.
  14962. func (s *PutBucketPolicyInput) Validate() error {
  14963. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  14964. if s.Bucket == nil {
  14965. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14966. }
  14967. if s.Policy == nil {
  14968. invalidParams.Add(request.NewErrParamRequired("Policy"))
  14969. }
  14970. if invalidParams.Len() > 0 {
  14971. return invalidParams
  14972. }
  14973. return nil
  14974. }
  14975. // SetBucket sets the Bucket field's value.
  14976. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  14977. s.Bucket = &v
  14978. return s
  14979. }
  14980. func (s *PutBucketPolicyInput) getBucket() (v string) {
  14981. if s.Bucket == nil {
  14982. return v
  14983. }
  14984. return *s.Bucket
  14985. }
  14986. // SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
  14987. func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
  14988. s.ConfirmRemoveSelfBucketAccess = &v
  14989. return s
  14990. }
  14991. // SetPolicy sets the Policy field's value.
  14992. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  14993. s.Policy = &v
  14994. return s
  14995. }
  14996. type PutBucketPolicyOutput struct {
  14997. _ struct{} `type:"structure"`
  14998. }
  14999. // String returns the string representation
  15000. func (s PutBucketPolicyOutput) String() string {
  15001. return awsutil.Prettify(s)
  15002. }
  15003. // GoString returns the string representation
  15004. func (s PutBucketPolicyOutput) GoString() string {
  15005. return s.String()
  15006. }
  15007. type PutBucketReplicationInput struct {
  15008. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  15009. // Bucket is a required field
  15010. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15011. // Container for replication rules. You can add as many as 1,000 rules. Total
  15012. // replication configuration size can be up to 2 MB.
  15013. //
  15014. // ReplicationConfiguration is a required field
  15015. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15016. }
  15017. // String returns the string representation
  15018. func (s PutBucketReplicationInput) String() string {
  15019. return awsutil.Prettify(s)
  15020. }
  15021. // GoString returns the string representation
  15022. func (s PutBucketReplicationInput) GoString() string {
  15023. return s.String()
  15024. }
  15025. // Validate inspects the fields of the type to determine if they are valid.
  15026. func (s *PutBucketReplicationInput) Validate() error {
  15027. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  15028. if s.Bucket == nil {
  15029. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15030. }
  15031. if s.ReplicationConfiguration == nil {
  15032. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  15033. }
  15034. if s.ReplicationConfiguration != nil {
  15035. if err := s.ReplicationConfiguration.Validate(); err != nil {
  15036. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  15037. }
  15038. }
  15039. if invalidParams.Len() > 0 {
  15040. return invalidParams
  15041. }
  15042. return nil
  15043. }
  15044. // SetBucket sets the Bucket field's value.
  15045. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  15046. s.Bucket = &v
  15047. return s
  15048. }
  15049. func (s *PutBucketReplicationInput) getBucket() (v string) {
  15050. if s.Bucket == nil {
  15051. return v
  15052. }
  15053. return *s.Bucket
  15054. }
  15055. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  15056. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  15057. s.ReplicationConfiguration = v
  15058. return s
  15059. }
  15060. type PutBucketReplicationOutput struct {
  15061. _ struct{} `type:"structure"`
  15062. }
  15063. // String returns the string representation
  15064. func (s PutBucketReplicationOutput) String() string {
  15065. return awsutil.Prettify(s)
  15066. }
  15067. // GoString returns the string representation
  15068. func (s PutBucketReplicationOutput) GoString() string {
  15069. return s.String()
  15070. }
  15071. type PutBucketRequestPaymentInput struct {
  15072. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  15073. // Bucket is a required field
  15074. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15075. // RequestPaymentConfiguration is a required field
  15076. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15077. }
  15078. // String returns the string representation
  15079. func (s PutBucketRequestPaymentInput) String() string {
  15080. return awsutil.Prettify(s)
  15081. }
  15082. // GoString returns the string representation
  15083. func (s PutBucketRequestPaymentInput) GoString() string {
  15084. return s.String()
  15085. }
  15086. // Validate inspects the fields of the type to determine if they are valid.
  15087. func (s *PutBucketRequestPaymentInput) Validate() error {
  15088. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  15089. if s.Bucket == nil {
  15090. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15091. }
  15092. if s.RequestPaymentConfiguration == nil {
  15093. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  15094. }
  15095. if s.RequestPaymentConfiguration != nil {
  15096. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  15097. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  15098. }
  15099. }
  15100. if invalidParams.Len() > 0 {
  15101. return invalidParams
  15102. }
  15103. return nil
  15104. }
  15105. // SetBucket sets the Bucket field's value.
  15106. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  15107. s.Bucket = &v
  15108. return s
  15109. }
  15110. func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
  15111. if s.Bucket == nil {
  15112. return v
  15113. }
  15114. return *s.Bucket
  15115. }
  15116. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  15117. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  15118. s.RequestPaymentConfiguration = v
  15119. return s
  15120. }
  15121. type PutBucketRequestPaymentOutput struct {
  15122. _ struct{} `type:"structure"`
  15123. }
  15124. // String returns the string representation
  15125. func (s PutBucketRequestPaymentOutput) String() string {
  15126. return awsutil.Prettify(s)
  15127. }
  15128. // GoString returns the string representation
  15129. func (s PutBucketRequestPaymentOutput) GoString() string {
  15130. return s.String()
  15131. }
  15132. type PutBucketTaggingInput struct {
  15133. _ struct{} `type:"structure" payload:"Tagging"`
  15134. // Bucket is a required field
  15135. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15136. // Tagging is a required field
  15137. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15138. }
  15139. // String returns the string representation
  15140. func (s PutBucketTaggingInput) String() string {
  15141. return awsutil.Prettify(s)
  15142. }
  15143. // GoString returns the string representation
  15144. func (s PutBucketTaggingInput) GoString() string {
  15145. return s.String()
  15146. }
  15147. // Validate inspects the fields of the type to determine if they are valid.
  15148. func (s *PutBucketTaggingInput) Validate() error {
  15149. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  15150. if s.Bucket == nil {
  15151. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15152. }
  15153. if s.Tagging == nil {
  15154. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  15155. }
  15156. if s.Tagging != nil {
  15157. if err := s.Tagging.Validate(); err != nil {
  15158. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  15159. }
  15160. }
  15161. if invalidParams.Len() > 0 {
  15162. return invalidParams
  15163. }
  15164. return nil
  15165. }
  15166. // SetBucket sets the Bucket field's value.
  15167. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  15168. s.Bucket = &v
  15169. return s
  15170. }
  15171. func (s *PutBucketTaggingInput) getBucket() (v string) {
  15172. if s.Bucket == nil {
  15173. return v
  15174. }
  15175. return *s.Bucket
  15176. }
  15177. // SetTagging sets the Tagging field's value.
  15178. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  15179. s.Tagging = v
  15180. return s
  15181. }
  15182. type PutBucketTaggingOutput struct {
  15183. _ struct{} `type:"structure"`
  15184. }
  15185. // String returns the string representation
  15186. func (s PutBucketTaggingOutput) String() string {
  15187. return awsutil.Prettify(s)
  15188. }
  15189. // GoString returns the string representation
  15190. func (s PutBucketTaggingOutput) GoString() string {
  15191. return s.String()
  15192. }
  15193. type PutBucketVersioningInput struct {
  15194. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  15195. // Bucket is a required field
  15196. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15197. // The concatenation of the authentication device's serial number, a space,
  15198. // and the value that is displayed on your authentication device.
  15199. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  15200. // VersioningConfiguration is a required field
  15201. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15202. }
  15203. // String returns the string representation
  15204. func (s PutBucketVersioningInput) String() string {
  15205. return awsutil.Prettify(s)
  15206. }
  15207. // GoString returns the string representation
  15208. func (s PutBucketVersioningInput) GoString() string {
  15209. return s.String()
  15210. }
  15211. // Validate inspects the fields of the type to determine if they are valid.
  15212. func (s *PutBucketVersioningInput) Validate() error {
  15213. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  15214. if s.Bucket == nil {
  15215. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15216. }
  15217. if s.VersioningConfiguration == nil {
  15218. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  15219. }
  15220. if invalidParams.Len() > 0 {
  15221. return invalidParams
  15222. }
  15223. return nil
  15224. }
  15225. // SetBucket sets the Bucket field's value.
  15226. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  15227. s.Bucket = &v
  15228. return s
  15229. }
  15230. func (s *PutBucketVersioningInput) getBucket() (v string) {
  15231. if s.Bucket == nil {
  15232. return v
  15233. }
  15234. return *s.Bucket
  15235. }
  15236. // SetMFA sets the MFA field's value.
  15237. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  15238. s.MFA = &v
  15239. return s
  15240. }
  15241. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  15242. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  15243. s.VersioningConfiguration = v
  15244. return s
  15245. }
  15246. type PutBucketVersioningOutput struct {
  15247. _ struct{} `type:"structure"`
  15248. }
  15249. // String returns the string representation
  15250. func (s PutBucketVersioningOutput) String() string {
  15251. return awsutil.Prettify(s)
  15252. }
  15253. // GoString returns the string representation
  15254. func (s PutBucketVersioningOutput) GoString() string {
  15255. return s.String()
  15256. }
  15257. type PutBucketWebsiteInput struct {
  15258. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  15259. // Bucket is a required field
  15260. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15261. // WebsiteConfiguration is a required field
  15262. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15263. }
  15264. // String returns the string representation
  15265. func (s PutBucketWebsiteInput) String() string {
  15266. return awsutil.Prettify(s)
  15267. }
  15268. // GoString returns the string representation
  15269. func (s PutBucketWebsiteInput) GoString() string {
  15270. return s.String()
  15271. }
  15272. // Validate inspects the fields of the type to determine if they are valid.
  15273. func (s *PutBucketWebsiteInput) Validate() error {
  15274. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  15275. if s.Bucket == nil {
  15276. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15277. }
  15278. if s.WebsiteConfiguration == nil {
  15279. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  15280. }
  15281. if s.WebsiteConfiguration != nil {
  15282. if err := s.WebsiteConfiguration.Validate(); err != nil {
  15283. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  15284. }
  15285. }
  15286. if invalidParams.Len() > 0 {
  15287. return invalidParams
  15288. }
  15289. return nil
  15290. }
  15291. // SetBucket sets the Bucket field's value.
  15292. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  15293. s.Bucket = &v
  15294. return s
  15295. }
  15296. func (s *PutBucketWebsiteInput) getBucket() (v string) {
  15297. if s.Bucket == nil {
  15298. return v
  15299. }
  15300. return *s.Bucket
  15301. }
  15302. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  15303. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  15304. s.WebsiteConfiguration = v
  15305. return s
  15306. }
  15307. type PutBucketWebsiteOutput struct {
  15308. _ struct{} `type:"structure"`
  15309. }
  15310. // String returns the string representation
  15311. func (s PutBucketWebsiteOutput) String() string {
  15312. return awsutil.Prettify(s)
  15313. }
  15314. // GoString returns the string representation
  15315. func (s PutBucketWebsiteOutput) GoString() string {
  15316. return s.String()
  15317. }
  15318. type PutObjectAclInput struct {
  15319. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  15320. // The canned ACL to apply to the object.
  15321. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  15322. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15323. // Bucket is a required field
  15324. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15325. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  15326. // bucket.
  15327. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15328. // Allows grantee to list the objects in the bucket.
  15329. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15330. // Allows grantee to read the bucket ACL.
  15331. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15332. // Allows grantee to create, overwrite, and delete any object in the bucket.
  15333. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  15334. // Allows grantee to write the ACL for the applicable bucket.
  15335. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15336. // Key is a required field
  15337. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15338. // Confirms that the requester knows that she or he will be charged for the
  15339. // request. Bucket owners need not specify this parameter in their requests.
  15340. // Documentation on downloading objects from requester pays buckets can be found
  15341. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15342. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15343. // VersionId used to reference a specific version of the object.
  15344. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15345. }
  15346. // String returns the string representation
  15347. func (s PutObjectAclInput) String() string {
  15348. return awsutil.Prettify(s)
  15349. }
  15350. // GoString returns the string representation
  15351. func (s PutObjectAclInput) GoString() string {
  15352. return s.String()
  15353. }
  15354. // Validate inspects the fields of the type to determine if they are valid.
  15355. func (s *PutObjectAclInput) Validate() error {
  15356. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  15357. if s.Bucket == nil {
  15358. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15359. }
  15360. if s.Key == nil {
  15361. invalidParams.Add(request.NewErrParamRequired("Key"))
  15362. }
  15363. if s.Key != nil && len(*s.Key) < 1 {
  15364. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15365. }
  15366. if s.AccessControlPolicy != nil {
  15367. if err := s.AccessControlPolicy.Validate(); err != nil {
  15368. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  15369. }
  15370. }
  15371. if invalidParams.Len() > 0 {
  15372. return invalidParams
  15373. }
  15374. return nil
  15375. }
  15376. // SetACL sets the ACL field's value.
  15377. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  15378. s.ACL = &v
  15379. return s
  15380. }
  15381. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  15382. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  15383. s.AccessControlPolicy = v
  15384. return s
  15385. }
  15386. // SetBucket sets the Bucket field's value.
  15387. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  15388. s.Bucket = &v
  15389. return s
  15390. }
  15391. func (s *PutObjectAclInput) getBucket() (v string) {
  15392. if s.Bucket == nil {
  15393. return v
  15394. }
  15395. return *s.Bucket
  15396. }
  15397. // SetGrantFullControl sets the GrantFullControl field's value.
  15398. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  15399. s.GrantFullControl = &v
  15400. return s
  15401. }
  15402. // SetGrantRead sets the GrantRead field's value.
  15403. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  15404. s.GrantRead = &v
  15405. return s
  15406. }
  15407. // SetGrantReadACP sets the GrantReadACP field's value.
  15408. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  15409. s.GrantReadACP = &v
  15410. return s
  15411. }
  15412. // SetGrantWrite sets the GrantWrite field's value.
  15413. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  15414. s.GrantWrite = &v
  15415. return s
  15416. }
  15417. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15418. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  15419. s.GrantWriteACP = &v
  15420. return s
  15421. }
  15422. // SetKey sets the Key field's value.
  15423. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  15424. s.Key = &v
  15425. return s
  15426. }
  15427. // SetRequestPayer sets the RequestPayer field's value.
  15428. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  15429. s.RequestPayer = &v
  15430. return s
  15431. }
  15432. // SetVersionId sets the VersionId field's value.
  15433. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  15434. s.VersionId = &v
  15435. return s
  15436. }
  15437. type PutObjectAclOutput struct {
  15438. _ struct{} `type:"structure"`
  15439. // If present, indicates that the requester was successfully charged for the
  15440. // request.
  15441. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15442. }
  15443. // String returns the string representation
  15444. func (s PutObjectAclOutput) String() string {
  15445. return awsutil.Prettify(s)
  15446. }
  15447. // GoString returns the string representation
  15448. func (s PutObjectAclOutput) GoString() string {
  15449. return s.String()
  15450. }
  15451. // SetRequestCharged sets the RequestCharged field's value.
  15452. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  15453. s.RequestCharged = &v
  15454. return s
  15455. }
  15456. type PutObjectInput struct {
  15457. _ struct{} `type:"structure" payload:"Body"`
  15458. // The canned ACL to apply to the object.
  15459. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  15460. // Object data.
  15461. Body io.ReadSeeker `type:"blob"`
  15462. // Name of the bucket to which the PUT operation was initiated.
  15463. //
  15464. // Bucket is a required field
  15465. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15466. // Specifies caching behavior along the request/reply chain.
  15467. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  15468. // Specifies presentational information for the object.
  15469. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  15470. // Specifies what content encodings have been applied to the object and thus
  15471. // what decoding mechanisms must be applied to obtain the media-type referenced
  15472. // by the Content-Type header field.
  15473. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  15474. // The language the content is in.
  15475. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  15476. // Size of the body in bytes. This parameter is useful when the size of the
  15477. // body cannot be determined automatically.
  15478. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  15479. // The base64-encoded 128-bit MD5 digest of the part data.
  15480. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  15481. // A standard MIME type describing the format of the object data.
  15482. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  15483. // The date and time at which the object is no longer cacheable.
  15484. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  15485. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  15486. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15487. // Allows grantee to read the object data and its metadata.
  15488. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15489. // Allows grantee to read the object ACL.
  15490. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15491. // Allows grantee to write the ACL for the applicable object.
  15492. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15493. // Object key for which the PUT operation was initiated.
  15494. //
  15495. // Key is a required field
  15496. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15497. // A map of metadata to store with the object in S3.
  15498. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  15499. // Confirms that the requester knows that she or he will be charged for the
  15500. // request. Bucket owners need not specify this parameter in their requests.
  15501. // Documentation on downloading objects from requester pays buckets can be found
  15502. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15503. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15504. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  15505. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15506. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  15507. // data. This value is used to store the object and then it is discarded; Amazon
  15508. // does not store the encryption key. The key must be appropriate for use with
  15509. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  15510. // header.
  15511. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  15512. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  15513. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  15514. // key was transmitted without error.
  15515. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15516. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  15517. // requests for an object protected by AWS KMS will fail if not made via SSL
  15518. // or using SigV4. Documentation on configuring any of the officially supported
  15519. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  15520. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  15521. // The Server-side encryption algorithm used when storing this object in S3
  15522. // (e.g., AES256, aws:kms).
  15523. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  15524. // The type of storage to use for the object. Defaults to 'STANDARD'.
  15525. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  15526. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  15527. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  15528. // If the bucket is configured as a website, redirects requests for this object
  15529. // to another object in the same bucket or to an external URL. Amazon S3 stores
  15530. // the value of this header in the object metadata.
  15531. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  15532. }
  15533. // String returns the string representation
  15534. func (s PutObjectInput) String() string {
  15535. return awsutil.Prettify(s)
  15536. }
  15537. // GoString returns the string representation
  15538. func (s PutObjectInput) GoString() string {
  15539. return s.String()
  15540. }
  15541. // Validate inspects the fields of the type to determine if they are valid.
  15542. func (s *PutObjectInput) Validate() error {
  15543. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  15544. if s.Bucket == nil {
  15545. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15546. }
  15547. if s.Key == nil {
  15548. invalidParams.Add(request.NewErrParamRequired("Key"))
  15549. }
  15550. if s.Key != nil && len(*s.Key) < 1 {
  15551. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15552. }
  15553. if invalidParams.Len() > 0 {
  15554. return invalidParams
  15555. }
  15556. return nil
  15557. }
  15558. // SetACL sets the ACL field's value.
  15559. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  15560. s.ACL = &v
  15561. return s
  15562. }
  15563. // SetBody sets the Body field's value.
  15564. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  15565. s.Body = v
  15566. return s
  15567. }
  15568. // SetBucket sets the Bucket field's value.
  15569. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  15570. s.Bucket = &v
  15571. return s
  15572. }
  15573. func (s *PutObjectInput) getBucket() (v string) {
  15574. if s.Bucket == nil {
  15575. return v
  15576. }
  15577. return *s.Bucket
  15578. }
  15579. // SetCacheControl sets the CacheControl field's value.
  15580. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  15581. s.CacheControl = &v
  15582. return s
  15583. }
  15584. // SetContentDisposition sets the ContentDisposition field's value.
  15585. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  15586. s.ContentDisposition = &v
  15587. return s
  15588. }
  15589. // SetContentEncoding sets the ContentEncoding field's value.
  15590. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  15591. s.ContentEncoding = &v
  15592. return s
  15593. }
  15594. // SetContentLanguage sets the ContentLanguage field's value.
  15595. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  15596. s.ContentLanguage = &v
  15597. return s
  15598. }
  15599. // SetContentLength sets the ContentLength field's value.
  15600. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  15601. s.ContentLength = &v
  15602. return s
  15603. }
  15604. // SetContentMD5 sets the ContentMD5 field's value.
  15605. func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
  15606. s.ContentMD5 = &v
  15607. return s
  15608. }
  15609. // SetContentType sets the ContentType field's value.
  15610. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  15611. s.ContentType = &v
  15612. return s
  15613. }
  15614. // SetExpires sets the Expires field's value.
  15615. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  15616. s.Expires = &v
  15617. return s
  15618. }
  15619. // SetGrantFullControl sets the GrantFullControl field's value.
  15620. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  15621. s.GrantFullControl = &v
  15622. return s
  15623. }
  15624. // SetGrantRead sets the GrantRead field's value.
  15625. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  15626. s.GrantRead = &v
  15627. return s
  15628. }
  15629. // SetGrantReadACP sets the GrantReadACP field's value.
  15630. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  15631. s.GrantReadACP = &v
  15632. return s
  15633. }
  15634. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15635. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  15636. s.GrantWriteACP = &v
  15637. return s
  15638. }
  15639. // SetKey sets the Key field's value.
  15640. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  15641. s.Key = &v
  15642. return s
  15643. }
  15644. // SetMetadata sets the Metadata field's value.
  15645. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  15646. s.Metadata = v
  15647. return s
  15648. }
  15649. // SetRequestPayer sets the RequestPayer field's value.
  15650. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  15651. s.RequestPayer = &v
  15652. return s
  15653. }
  15654. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15655. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  15656. s.SSECustomerAlgorithm = &v
  15657. return s
  15658. }
  15659. // SetSSECustomerKey sets the SSECustomerKey field's value.
  15660. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  15661. s.SSECustomerKey = &v
  15662. return s
  15663. }
  15664. func (s *PutObjectInput) getSSECustomerKey() (v string) {
  15665. if s.SSECustomerKey == nil {
  15666. return v
  15667. }
  15668. return *s.SSECustomerKey
  15669. }
  15670. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15671. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  15672. s.SSECustomerKeyMD5 = &v
  15673. return s
  15674. }
  15675. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  15676. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  15677. s.SSEKMSKeyId = &v
  15678. return s
  15679. }
  15680. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  15681. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  15682. s.ServerSideEncryption = &v
  15683. return s
  15684. }
  15685. // SetStorageClass sets the StorageClass field's value.
  15686. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  15687. s.StorageClass = &v
  15688. return s
  15689. }
  15690. // SetTagging sets the Tagging field's value.
  15691. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  15692. s.Tagging = &v
  15693. return s
  15694. }
  15695. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  15696. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  15697. s.WebsiteRedirectLocation = &v
  15698. return s
  15699. }
  15700. type PutObjectOutput struct {
  15701. _ struct{} `type:"structure"`
  15702. // Entity tag for the uploaded object.
  15703. ETag *string `location:"header" locationName:"ETag" type:"string"`
  15704. // If the object expiration is configured, this will contain the expiration
  15705. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  15706. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  15707. // If present, indicates that the requester was successfully charged for the
  15708. // request.
  15709. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15710. // If server-side encryption with a customer-provided encryption key was requested,
  15711. // the response will include this header confirming the encryption algorithm
  15712. // used.
  15713. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15714. // If server-side encryption with a customer-provided encryption key was requested,
  15715. // the response will include this header to provide round trip message integrity
  15716. // verification of the customer-provided encryption key.
  15717. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15718. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  15719. // encryption key that was used for the object.
  15720. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  15721. // The Server-side encryption algorithm used when storing this object in S3
  15722. // (e.g., AES256, aws:kms).
  15723. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  15724. // Version of the object.
  15725. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  15726. }
  15727. // String returns the string representation
  15728. func (s PutObjectOutput) String() string {
  15729. return awsutil.Prettify(s)
  15730. }
  15731. // GoString returns the string representation
  15732. func (s PutObjectOutput) GoString() string {
  15733. return s.String()
  15734. }
  15735. // SetETag sets the ETag field's value.
  15736. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  15737. s.ETag = &v
  15738. return s
  15739. }
  15740. // SetExpiration sets the Expiration field's value.
  15741. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  15742. s.Expiration = &v
  15743. return s
  15744. }
  15745. // SetRequestCharged sets the RequestCharged field's value.
  15746. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  15747. s.RequestCharged = &v
  15748. return s
  15749. }
  15750. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15751. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  15752. s.SSECustomerAlgorithm = &v
  15753. return s
  15754. }
  15755. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15756. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  15757. s.SSECustomerKeyMD5 = &v
  15758. return s
  15759. }
  15760. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  15761. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  15762. s.SSEKMSKeyId = &v
  15763. return s
  15764. }
  15765. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  15766. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  15767. s.ServerSideEncryption = &v
  15768. return s
  15769. }
  15770. // SetVersionId sets the VersionId field's value.
  15771. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  15772. s.VersionId = &v
  15773. return s
  15774. }
  15775. type PutObjectTaggingInput struct {
  15776. _ struct{} `type:"structure" payload:"Tagging"`
  15777. // Bucket is a required field
  15778. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15779. // Key is a required field
  15780. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15781. // Tagging is a required field
  15782. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15783. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15784. }
  15785. // String returns the string representation
  15786. func (s PutObjectTaggingInput) String() string {
  15787. return awsutil.Prettify(s)
  15788. }
  15789. // GoString returns the string representation
  15790. func (s PutObjectTaggingInput) GoString() string {
  15791. return s.String()
  15792. }
  15793. // Validate inspects the fields of the type to determine if they are valid.
  15794. func (s *PutObjectTaggingInput) Validate() error {
  15795. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  15796. if s.Bucket == nil {
  15797. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15798. }
  15799. if s.Key == nil {
  15800. invalidParams.Add(request.NewErrParamRequired("Key"))
  15801. }
  15802. if s.Key != nil && len(*s.Key) < 1 {
  15803. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15804. }
  15805. if s.Tagging == nil {
  15806. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  15807. }
  15808. if s.Tagging != nil {
  15809. if err := s.Tagging.Validate(); err != nil {
  15810. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  15811. }
  15812. }
  15813. if invalidParams.Len() > 0 {
  15814. return invalidParams
  15815. }
  15816. return nil
  15817. }
  15818. // SetBucket sets the Bucket field's value.
  15819. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  15820. s.Bucket = &v
  15821. return s
  15822. }
  15823. func (s *PutObjectTaggingInput) getBucket() (v string) {
  15824. if s.Bucket == nil {
  15825. return v
  15826. }
  15827. return *s.Bucket
  15828. }
  15829. // SetKey sets the Key field's value.
  15830. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  15831. s.Key = &v
  15832. return s
  15833. }
  15834. // SetTagging sets the Tagging field's value.
  15835. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  15836. s.Tagging = v
  15837. return s
  15838. }
  15839. // SetVersionId sets the VersionId field's value.
  15840. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  15841. s.VersionId = &v
  15842. return s
  15843. }
  15844. type PutObjectTaggingOutput struct {
  15845. _ struct{} `type:"structure"`
  15846. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  15847. }
  15848. // String returns the string representation
  15849. func (s PutObjectTaggingOutput) String() string {
  15850. return awsutil.Prettify(s)
  15851. }
  15852. // GoString returns the string representation
  15853. func (s PutObjectTaggingOutput) GoString() string {
  15854. return s.String()
  15855. }
  15856. // SetVersionId sets the VersionId field's value.
  15857. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  15858. s.VersionId = &v
  15859. return s
  15860. }
  15861. // Container for specifying an configuration when you want Amazon S3 to publish
  15862. // events to an Amazon Simple Queue Service (Amazon SQS) queue.
  15863. type QueueConfiguration struct {
  15864. _ struct{} `type:"structure"`
  15865. // Events is a required field
  15866. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  15867. // Container for object key name filtering rules. For information about key
  15868. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  15869. Filter *NotificationConfigurationFilter `type:"structure"`
  15870. // Optional unique identifier for configurations in a notification configuration.
  15871. // If you don't provide one, Amazon S3 will assign an ID.
  15872. Id *string `type:"string"`
  15873. // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects
  15874. // events of specified type.
  15875. //
  15876. // QueueArn is a required field
  15877. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  15878. }
  15879. // String returns the string representation
  15880. func (s QueueConfiguration) String() string {
  15881. return awsutil.Prettify(s)
  15882. }
  15883. // GoString returns the string representation
  15884. func (s QueueConfiguration) GoString() string {
  15885. return s.String()
  15886. }
  15887. // Validate inspects the fields of the type to determine if they are valid.
  15888. func (s *QueueConfiguration) Validate() error {
  15889. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  15890. if s.Events == nil {
  15891. invalidParams.Add(request.NewErrParamRequired("Events"))
  15892. }
  15893. if s.QueueArn == nil {
  15894. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  15895. }
  15896. if invalidParams.Len() > 0 {
  15897. return invalidParams
  15898. }
  15899. return nil
  15900. }
  15901. // SetEvents sets the Events field's value.
  15902. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  15903. s.Events = v
  15904. return s
  15905. }
  15906. // SetFilter sets the Filter field's value.
  15907. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  15908. s.Filter = v
  15909. return s
  15910. }
  15911. // SetId sets the Id field's value.
  15912. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  15913. s.Id = &v
  15914. return s
  15915. }
  15916. // SetQueueArn sets the QueueArn field's value.
  15917. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  15918. s.QueueArn = &v
  15919. return s
  15920. }
  15921. type QueueConfigurationDeprecated struct {
  15922. _ struct{} `type:"structure"`
  15923. // Bucket event for which to send notifications.
  15924. Event *string `deprecated:"true" type:"string" enum:"Event"`
  15925. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  15926. // Optional unique identifier for configurations in a notification configuration.
  15927. // If you don't provide one, Amazon S3 will assign an ID.
  15928. Id *string `type:"string"`
  15929. Queue *string `type:"string"`
  15930. }
  15931. // String returns the string representation
  15932. func (s QueueConfigurationDeprecated) String() string {
  15933. return awsutil.Prettify(s)
  15934. }
  15935. // GoString returns the string representation
  15936. func (s QueueConfigurationDeprecated) GoString() string {
  15937. return s.String()
  15938. }
  15939. // SetEvent sets the Event field's value.
  15940. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  15941. s.Event = &v
  15942. return s
  15943. }
  15944. // SetEvents sets the Events field's value.
  15945. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  15946. s.Events = v
  15947. return s
  15948. }
  15949. // SetId sets the Id field's value.
  15950. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  15951. s.Id = &v
  15952. return s
  15953. }
  15954. // SetQueue sets the Queue field's value.
  15955. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  15956. s.Queue = &v
  15957. return s
  15958. }
  15959. type RecordsEvent struct {
  15960. _ struct{} `type:"structure" payload:"Payload"`
  15961. // The byte array of partial, one or more result records.
  15962. //
  15963. // Payload is automatically base64 encoded/decoded by the SDK.
  15964. Payload []byte `type:"blob"`
  15965. }
  15966. // String returns the string representation
  15967. func (s RecordsEvent) String() string {
  15968. return awsutil.Prettify(s)
  15969. }
  15970. // GoString returns the string representation
  15971. func (s RecordsEvent) GoString() string {
  15972. return s.String()
  15973. }
  15974. // SetPayload sets the Payload field's value.
  15975. func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent {
  15976. s.Payload = v
  15977. return s
  15978. }
  15979. // The RecordsEvent is and event in the SelectObjectContentEventStream group of events.
  15980. func (s *RecordsEvent) eventSelectObjectContentEventStream() {}
  15981. // UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value.
  15982. // This method is only used internally within the SDK's EventStream handling.
  15983. func (s *RecordsEvent) UnmarshalEvent(
  15984. payloadUnmarshaler protocol.PayloadUnmarshaler,
  15985. msg eventstream.Message,
  15986. ) error {
  15987. s.Payload = make([]byte, len(msg.Payload))
  15988. copy(s.Payload, msg.Payload)
  15989. return nil
  15990. }
  15991. type Redirect struct {
  15992. _ struct{} `type:"structure"`
  15993. // The host name to use in the redirect request.
  15994. HostName *string `type:"string"`
  15995. // The HTTP redirect code to use on the response. Not required if one of the
  15996. // siblings is present.
  15997. HttpRedirectCode *string `type:"string"`
  15998. // Protocol to use (http, https) when redirecting requests. The default is the
  15999. // protocol that is used in the original request.
  16000. Protocol *string `type:"string" enum:"Protocol"`
  16001. // The object key prefix to use in the redirect request. For example, to redirect
  16002. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  16003. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  16004. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  16005. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  16006. // is not provided.
  16007. ReplaceKeyPrefixWith *string `type:"string"`
  16008. // The specific object key to use in the redirect request. For example, redirect
  16009. // request to error.html. Not required if one of the sibling is present. Can
  16010. // be present only if ReplaceKeyPrefixWith is not provided.
  16011. ReplaceKeyWith *string `type:"string"`
  16012. }
  16013. // String returns the string representation
  16014. func (s Redirect) String() string {
  16015. return awsutil.Prettify(s)
  16016. }
  16017. // GoString returns the string representation
  16018. func (s Redirect) GoString() string {
  16019. return s.String()
  16020. }
  16021. // SetHostName sets the HostName field's value.
  16022. func (s *Redirect) SetHostName(v string) *Redirect {
  16023. s.HostName = &v
  16024. return s
  16025. }
  16026. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  16027. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  16028. s.HttpRedirectCode = &v
  16029. return s
  16030. }
  16031. // SetProtocol sets the Protocol field's value.
  16032. func (s *Redirect) SetProtocol(v string) *Redirect {
  16033. s.Protocol = &v
  16034. return s
  16035. }
  16036. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  16037. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  16038. s.ReplaceKeyPrefixWith = &v
  16039. return s
  16040. }
  16041. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  16042. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  16043. s.ReplaceKeyWith = &v
  16044. return s
  16045. }
  16046. type RedirectAllRequestsTo struct {
  16047. _ struct{} `type:"structure"`
  16048. // Name of the host where requests will be redirected.
  16049. //
  16050. // HostName is a required field
  16051. HostName *string `type:"string" required:"true"`
  16052. // Protocol to use (http, https) when redirecting requests. The default is the
  16053. // protocol that is used in the original request.
  16054. Protocol *string `type:"string" enum:"Protocol"`
  16055. }
  16056. // String returns the string representation
  16057. func (s RedirectAllRequestsTo) String() string {
  16058. return awsutil.Prettify(s)
  16059. }
  16060. // GoString returns the string representation
  16061. func (s RedirectAllRequestsTo) GoString() string {
  16062. return s.String()
  16063. }
  16064. // Validate inspects the fields of the type to determine if they are valid.
  16065. func (s *RedirectAllRequestsTo) Validate() error {
  16066. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  16067. if s.HostName == nil {
  16068. invalidParams.Add(request.NewErrParamRequired("HostName"))
  16069. }
  16070. if invalidParams.Len() > 0 {
  16071. return invalidParams
  16072. }
  16073. return nil
  16074. }
  16075. // SetHostName sets the HostName field's value.
  16076. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  16077. s.HostName = &v
  16078. return s
  16079. }
  16080. // SetProtocol sets the Protocol field's value.
  16081. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  16082. s.Protocol = &v
  16083. return s
  16084. }
  16085. // Container for replication rules. You can add as many as 1,000 rules. Total
  16086. // replication configuration size can be up to 2 MB.
  16087. type ReplicationConfiguration struct {
  16088. _ struct{} `type:"structure"`
  16089. // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating
  16090. // the objects.
  16091. //
  16092. // Role is a required field
  16093. Role *string `type:"string" required:"true"`
  16094. // Container for information about a particular replication rule. Replication
  16095. // configuration must have at least one rule and can contain up to 1,000 rules.
  16096. //
  16097. // Rules is a required field
  16098. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  16099. }
  16100. // String returns the string representation
  16101. func (s ReplicationConfiguration) String() string {
  16102. return awsutil.Prettify(s)
  16103. }
  16104. // GoString returns the string representation
  16105. func (s ReplicationConfiguration) GoString() string {
  16106. return s.String()
  16107. }
  16108. // Validate inspects the fields of the type to determine if they are valid.
  16109. func (s *ReplicationConfiguration) Validate() error {
  16110. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  16111. if s.Role == nil {
  16112. invalidParams.Add(request.NewErrParamRequired("Role"))
  16113. }
  16114. if s.Rules == nil {
  16115. invalidParams.Add(request.NewErrParamRequired("Rules"))
  16116. }
  16117. if s.Rules != nil {
  16118. for i, v := range s.Rules {
  16119. if v == nil {
  16120. continue
  16121. }
  16122. if err := v.Validate(); err != nil {
  16123. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  16124. }
  16125. }
  16126. }
  16127. if invalidParams.Len() > 0 {
  16128. return invalidParams
  16129. }
  16130. return nil
  16131. }
  16132. // SetRole sets the Role field's value.
  16133. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  16134. s.Role = &v
  16135. return s
  16136. }
  16137. // SetRules sets the Rules field's value.
  16138. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  16139. s.Rules = v
  16140. return s
  16141. }
  16142. // Container for information about a particular replication rule.
  16143. type ReplicationRule struct {
  16144. _ struct{} `type:"structure"`
  16145. // Container for replication destination information.
  16146. //
  16147. // Destination is a required field
  16148. Destination *Destination `type:"structure" required:"true"`
  16149. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  16150. ID *string `type:"string"`
  16151. // Object keyname prefix identifying one or more objects to which the rule applies.
  16152. // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes
  16153. // are not supported.
  16154. //
  16155. // Prefix is a required field
  16156. Prefix *string `type:"string" required:"true"`
  16157. // Container for filters that define which source objects should be replicated.
  16158. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
  16159. // The rule is ignored if status is not Enabled.
  16160. //
  16161. // Status is a required field
  16162. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  16163. }
  16164. // String returns the string representation
  16165. func (s ReplicationRule) String() string {
  16166. return awsutil.Prettify(s)
  16167. }
  16168. // GoString returns the string representation
  16169. func (s ReplicationRule) GoString() string {
  16170. return s.String()
  16171. }
  16172. // Validate inspects the fields of the type to determine if they are valid.
  16173. func (s *ReplicationRule) Validate() error {
  16174. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  16175. if s.Destination == nil {
  16176. invalidParams.Add(request.NewErrParamRequired("Destination"))
  16177. }
  16178. if s.Prefix == nil {
  16179. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  16180. }
  16181. if s.Status == nil {
  16182. invalidParams.Add(request.NewErrParamRequired("Status"))
  16183. }
  16184. if s.Destination != nil {
  16185. if err := s.Destination.Validate(); err != nil {
  16186. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  16187. }
  16188. }
  16189. if s.SourceSelectionCriteria != nil {
  16190. if err := s.SourceSelectionCriteria.Validate(); err != nil {
  16191. invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
  16192. }
  16193. }
  16194. if invalidParams.Len() > 0 {
  16195. return invalidParams
  16196. }
  16197. return nil
  16198. }
  16199. // SetDestination sets the Destination field's value.
  16200. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  16201. s.Destination = v
  16202. return s
  16203. }
  16204. // SetID sets the ID field's value.
  16205. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  16206. s.ID = &v
  16207. return s
  16208. }
  16209. // SetPrefix sets the Prefix field's value.
  16210. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  16211. s.Prefix = &v
  16212. return s
  16213. }
  16214. // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
  16215. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
  16216. s.SourceSelectionCriteria = v
  16217. return s
  16218. }
  16219. // SetStatus sets the Status field's value.
  16220. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  16221. s.Status = &v
  16222. return s
  16223. }
  16224. type RequestPaymentConfiguration struct {
  16225. _ struct{} `type:"structure"`
  16226. // Specifies who pays for the download and request fees.
  16227. //
  16228. // Payer is a required field
  16229. Payer *string `type:"string" required:"true" enum:"Payer"`
  16230. }
  16231. // String returns the string representation
  16232. func (s RequestPaymentConfiguration) String() string {
  16233. return awsutil.Prettify(s)
  16234. }
  16235. // GoString returns the string representation
  16236. func (s RequestPaymentConfiguration) GoString() string {
  16237. return s.String()
  16238. }
  16239. // Validate inspects the fields of the type to determine if they are valid.
  16240. func (s *RequestPaymentConfiguration) Validate() error {
  16241. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  16242. if s.Payer == nil {
  16243. invalidParams.Add(request.NewErrParamRequired("Payer"))
  16244. }
  16245. if invalidParams.Len() > 0 {
  16246. return invalidParams
  16247. }
  16248. return nil
  16249. }
  16250. // SetPayer sets the Payer field's value.
  16251. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  16252. s.Payer = &v
  16253. return s
  16254. }
  16255. type RequestProgress struct {
  16256. _ struct{} `type:"structure"`
  16257. // Specifies whether periodic QueryProgress frames should be sent. Valid values:
  16258. // TRUE, FALSE. Default value: FALSE.
  16259. Enabled *bool `type:"boolean"`
  16260. }
  16261. // String returns the string representation
  16262. func (s RequestProgress) String() string {
  16263. return awsutil.Prettify(s)
  16264. }
  16265. // GoString returns the string representation
  16266. func (s RequestProgress) GoString() string {
  16267. return s.String()
  16268. }
  16269. // SetEnabled sets the Enabled field's value.
  16270. func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
  16271. s.Enabled = &v
  16272. return s
  16273. }
  16274. type RestoreObjectInput struct {
  16275. _ struct{} `type:"structure" payload:"RestoreRequest"`
  16276. // Bucket is a required field
  16277. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16278. // Key is a required field
  16279. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  16280. // Confirms that the requester knows that she or he will be charged for the
  16281. // request. Bucket owners need not specify this parameter in their requests.
  16282. // Documentation on downloading objects from requester pays buckets can be found
  16283. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  16284. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  16285. // Container for restore job parameters.
  16286. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16287. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  16288. }
  16289. // String returns the string representation
  16290. func (s RestoreObjectInput) String() string {
  16291. return awsutil.Prettify(s)
  16292. }
  16293. // GoString returns the string representation
  16294. func (s RestoreObjectInput) GoString() string {
  16295. return s.String()
  16296. }
  16297. // Validate inspects the fields of the type to determine if they are valid.
  16298. func (s *RestoreObjectInput) Validate() error {
  16299. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  16300. if s.Bucket == nil {
  16301. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16302. }
  16303. if s.Key == nil {
  16304. invalidParams.Add(request.NewErrParamRequired("Key"))
  16305. }
  16306. if s.Key != nil && len(*s.Key) < 1 {
  16307. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16308. }
  16309. if s.RestoreRequest != nil {
  16310. if err := s.RestoreRequest.Validate(); err != nil {
  16311. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  16312. }
  16313. }
  16314. if invalidParams.Len() > 0 {
  16315. return invalidParams
  16316. }
  16317. return nil
  16318. }
  16319. // SetBucket sets the Bucket field's value.
  16320. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  16321. s.Bucket = &v
  16322. return s
  16323. }
  16324. func (s *RestoreObjectInput) getBucket() (v string) {
  16325. if s.Bucket == nil {
  16326. return v
  16327. }
  16328. return *s.Bucket
  16329. }
  16330. // SetKey sets the Key field's value.
  16331. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  16332. s.Key = &v
  16333. return s
  16334. }
  16335. // SetRequestPayer sets the RequestPayer field's value.
  16336. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  16337. s.RequestPayer = &v
  16338. return s
  16339. }
  16340. // SetRestoreRequest sets the RestoreRequest field's value.
  16341. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  16342. s.RestoreRequest = v
  16343. return s
  16344. }
  16345. // SetVersionId sets the VersionId field's value.
  16346. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  16347. s.VersionId = &v
  16348. return s
  16349. }
  16350. type RestoreObjectOutput struct {
  16351. _ struct{} `type:"structure"`
  16352. // If present, indicates that the requester was successfully charged for the
  16353. // request.
  16354. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  16355. // Indicates the path in the provided S3 output location where Select results
  16356. // will be restored to.
  16357. RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
  16358. }
  16359. // String returns the string representation
  16360. func (s RestoreObjectOutput) String() string {
  16361. return awsutil.Prettify(s)
  16362. }
  16363. // GoString returns the string representation
  16364. func (s RestoreObjectOutput) GoString() string {
  16365. return s.String()
  16366. }
  16367. // SetRequestCharged sets the RequestCharged field's value.
  16368. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  16369. s.RequestCharged = &v
  16370. return s
  16371. }
  16372. // SetRestoreOutputPath sets the RestoreOutputPath field's value.
  16373. func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
  16374. s.RestoreOutputPath = &v
  16375. return s
  16376. }
  16377. // Container for restore job parameters.
  16378. type RestoreRequest struct {
  16379. _ struct{} `type:"structure"`
  16380. // Lifetime of the active copy in days. Do not use with restores that specify
  16381. // OutputLocation.
  16382. Days *int64 `type:"integer"`
  16383. // The optional description for the job.
  16384. Description *string `type:"string"`
  16385. // Glacier related parameters pertaining to this job. Do not use with restores
  16386. // that specify OutputLocation.
  16387. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  16388. // Describes the location where the restore job's output is stored.
  16389. OutputLocation *OutputLocation `type:"structure"`
  16390. // Describes the parameters for Select job types.
  16391. SelectParameters *SelectParameters `type:"structure"`
  16392. // Glacier retrieval tier at which the restore will be processed.
  16393. Tier *string `type:"string" enum:"Tier"`
  16394. // Type of restore request.
  16395. Type *string `type:"string" enum:"RestoreRequestType"`
  16396. }
  16397. // String returns the string representation
  16398. func (s RestoreRequest) String() string {
  16399. return awsutil.Prettify(s)
  16400. }
  16401. // GoString returns the string representation
  16402. func (s RestoreRequest) GoString() string {
  16403. return s.String()
  16404. }
  16405. // Validate inspects the fields of the type to determine if they are valid.
  16406. func (s *RestoreRequest) Validate() error {
  16407. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  16408. if s.GlacierJobParameters != nil {
  16409. if err := s.GlacierJobParameters.Validate(); err != nil {
  16410. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  16411. }
  16412. }
  16413. if s.OutputLocation != nil {
  16414. if err := s.OutputLocation.Validate(); err != nil {
  16415. invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
  16416. }
  16417. }
  16418. if s.SelectParameters != nil {
  16419. if err := s.SelectParameters.Validate(); err != nil {
  16420. invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
  16421. }
  16422. }
  16423. if invalidParams.Len() > 0 {
  16424. return invalidParams
  16425. }
  16426. return nil
  16427. }
  16428. // SetDays sets the Days field's value.
  16429. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  16430. s.Days = &v
  16431. return s
  16432. }
  16433. // SetDescription sets the Description field's value.
  16434. func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
  16435. s.Description = &v
  16436. return s
  16437. }
  16438. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  16439. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  16440. s.GlacierJobParameters = v
  16441. return s
  16442. }
  16443. // SetOutputLocation sets the OutputLocation field's value.
  16444. func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
  16445. s.OutputLocation = v
  16446. return s
  16447. }
  16448. // SetSelectParameters sets the SelectParameters field's value.
  16449. func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
  16450. s.SelectParameters = v
  16451. return s
  16452. }
  16453. // SetTier sets the Tier field's value.
  16454. func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
  16455. s.Tier = &v
  16456. return s
  16457. }
  16458. // SetType sets the Type field's value.
  16459. func (s *RestoreRequest) SetType(v string) *RestoreRequest {
  16460. s.Type = &v
  16461. return s
  16462. }
  16463. type RoutingRule struct {
  16464. _ struct{} `type:"structure"`
  16465. // A container for describing a condition that must be met for the specified
  16466. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  16467. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  16468. // redirect request to another host where you might process the error.
  16469. Condition *Condition `type:"structure"`
  16470. // Container for redirect information. You can redirect requests to another
  16471. // host, to another page, or with another protocol. In the event of an error,
  16472. // you can can specify a different error code to return.
  16473. //
  16474. // Redirect is a required field
  16475. Redirect *Redirect `type:"structure" required:"true"`
  16476. }
  16477. // String returns the string representation
  16478. func (s RoutingRule) String() string {
  16479. return awsutil.Prettify(s)
  16480. }
  16481. // GoString returns the string representation
  16482. func (s RoutingRule) GoString() string {
  16483. return s.String()
  16484. }
  16485. // Validate inspects the fields of the type to determine if they are valid.
  16486. func (s *RoutingRule) Validate() error {
  16487. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  16488. if s.Redirect == nil {
  16489. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  16490. }
  16491. if invalidParams.Len() > 0 {
  16492. return invalidParams
  16493. }
  16494. return nil
  16495. }
  16496. // SetCondition sets the Condition field's value.
  16497. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  16498. s.Condition = v
  16499. return s
  16500. }
  16501. // SetRedirect sets the Redirect field's value.
  16502. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  16503. s.Redirect = v
  16504. return s
  16505. }
  16506. type Rule struct {
  16507. _ struct{} `type:"structure"`
  16508. // Specifies the days since the initiation of an Incomplete Multipart Upload
  16509. // that Lifecycle will wait before permanently removing all parts of the upload.
  16510. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  16511. Expiration *LifecycleExpiration `type:"structure"`
  16512. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  16513. ID *string `type:"string"`
  16514. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  16515. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  16516. // configuration action on a bucket that has versioning enabled (or suspended)
  16517. // to request that Amazon S3 delete noncurrent object versions at a specific
  16518. // period in the object's lifetime.
  16519. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  16520. // Container for the transition rule that describes when noncurrent objects
  16521. // transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your
  16522. // bucket is versioning-enabled (or versioning is suspended), you can set this
  16523. // action to request that Amazon S3 transition noncurrent object versions to
  16524. // the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period
  16525. // in the object's lifetime.
  16526. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  16527. // Prefix identifying one or more objects to which the rule applies.
  16528. //
  16529. // Prefix is a required field
  16530. Prefix *string `type:"string" required:"true"`
  16531. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  16532. // is not currently being applied.
  16533. //
  16534. // Status is a required field
  16535. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  16536. Transition *Transition `type:"structure"`
  16537. }
  16538. // String returns the string representation
  16539. func (s Rule) String() string {
  16540. return awsutil.Prettify(s)
  16541. }
  16542. // GoString returns the string representation
  16543. func (s Rule) GoString() string {
  16544. return s.String()
  16545. }
  16546. // Validate inspects the fields of the type to determine if they are valid.
  16547. func (s *Rule) Validate() error {
  16548. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  16549. if s.Prefix == nil {
  16550. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  16551. }
  16552. if s.Status == nil {
  16553. invalidParams.Add(request.NewErrParamRequired("Status"))
  16554. }
  16555. if invalidParams.Len() > 0 {
  16556. return invalidParams
  16557. }
  16558. return nil
  16559. }
  16560. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  16561. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  16562. s.AbortIncompleteMultipartUpload = v
  16563. return s
  16564. }
  16565. // SetExpiration sets the Expiration field's value.
  16566. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  16567. s.Expiration = v
  16568. return s
  16569. }
  16570. // SetID sets the ID field's value.
  16571. func (s *Rule) SetID(v string) *Rule {
  16572. s.ID = &v
  16573. return s
  16574. }
  16575. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  16576. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  16577. s.NoncurrentVersionExpiration = v
  16578. return s
  16579. }
  16580. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  16581. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  16582. s.NoncurrentVersionTransition = v
  16583. return s
  16584. }
  16585. // SetPrefix sets the Prefix field's value.
  16586. func (s *Rule) SetPrefix(v string) *Rule {
  16587. s.Prefix = &v
  16588. return s
  16589. }
  16590. // SetStatus sets the Status field's value.
  16591. func (s *Rule) SetStatus(v string) *Rule {
  16592. s.Status = &v
  16593. return s
  16594. }
  16595. // SetTransition sets the Transition field's value.
  16596. func (s *Rule) SetTransition(v *Transition) *Rule {
  16597. s.Transition = v
  16598. return s
  16599. }
  16600. // Specifies the use of SSE-KMS to encrypt delievered Inventory reports.
  16601. type SSEKMS struct {
  16602. _ struct{} `locationName:"SSE-KMS" type:"structure"`
  16603. // Specifies the ID of the AWS Key Management Service (KMS) master encryption
  16604. // key to use for encrypting Inventory reports.
  16605. //
  16606. // KeyId is a required field
  16607. KeyId *string `type:"string" required:"true"`
  16608. }
  16609. // String returns the string representation
  16610. func (s SSEKMS) String() string {
  16611. return awsutil.Prettify(s)
  16612. }
  16613. // GoString returns the string representation
  16614. func (s SSEKMS) GoString() string {
  16615. return s.String()
  16616. }
  16617. // Validate inspects the fields of the type to determine if they are valid.
  16618. func (s *SSEKMS) Validate() error {
  16619. invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
  16620. if s.KeyId == nil {
  16621. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  16622. }
  16623. if invalidParams.Len() > 0 {
  16624. return invalidParams
  16625. }
  16626. return nil
  16627. }
  16628. // SetKeyId sets the KeyId field's value.
  16629. func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
  16630. s.KeyId = &v
  16631. return s
  16632. }
  16633. // Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
  16634. type SSES3 struct {
  16635. _ struct{} `locationName:"SSE-S3" type:"structure"`
  16636. }
  16637. // String returns the string representation
  16638. func (s SSES3) String() string {
  16639. return awsutil.Prettify(s)
  16640. }
  16641. // GoString returns the string representation
  16642. func (s SSES3) GoString() string {
  16643. return s.String()
  16644. }
  16645. // SelectObjectContentEventStream provides handling of EventStreams for
  16646. // the SelectObjectContent API.
  16647. //
  16648. // Use this type to receive SelectObjectContentEventStream events. The events
  16649. // can be read from the Events channel member.
  16650. //
  16651. // The events that can be received are:
  16652. //
  16653. // * ContinuationEvent
  16654. // * EndEvent
  16655. // * ProgressEvent
  16656. // * RecordsEvent
  16657. // * StatsEvent
  16658. type SelectObjectContentEventStream struct {
  16659. // Reader is the EventStream reader for the SelectObjectContentEventStream
  16660. // events. This value is automatically set by the SDK when the API call is made
  16661. // Use this member when unit testing your code with the SDK to mock out the
  16662. // EventStream Reader.
  16663. //
  16664. // Must not be nil.
  16665. Reader SelectObjectContentEventStreamReader
  16666. // StreamCloser is the io.Closer for the EventStream connection. For HTTP
  16667. // EventStream this is the response Body. The stream will be closed when
  16668. // the Close method of the EventStream is called.
  16669. StreamCloser io.Closer
  16670. }
  16671. // Close closes the EventStream. This will also cause the Events channel to be
  16672. // closed. You can use the closing of the Events channel to terminate your
  16673. // application's read from the API's EventStream.
  16674. //
  16675. // Will close the underlying EventStream reader. For EventStream over HTTP
  16676. // connection this will also close the HTTP connection.
  16677. //
  16678. // Close must be called when done using the EventStream API. Not calling Close
  16679. // may result in resource leaks.
  16680. func (es *SelectObjectContentEventStream) Close() (err error) {
  16681. es.Reader.Close()
  16682. return es.Err()
  16683. }
  16684. // Err returns any error that occurred while reading EventStream Events from
  16685. // the service API's response. Returns nil if there were no errors.
  16686. func (es *SelectObjectContentEventStream) Err() error {
  16687. if err := es.Reader.Err(); err != nil {
  16688. return err
  16689. }
  16690. es.StreamCloser.Close()
  16691. return nil
  16692. }
  16693. // Events returns a channel to read EventStream Events from the
  16694. // SelectObjectContent API.
  16695. //
  16696. // These events are:
  16697. //
  16698. // * ContinuationEvent
  16699. // * EndEvent
  16700. // * ProgressEvent
  16701. // * RecordsEvent
  16702. // * StatsEvent
  16703. func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  16704. return es.Reader.Events()
  16705. }
  16706. // SelectObjectContentEventStreamEvent groups together all EventStream
  16707. // events read from the SelectObjectContent API.
  16708. //
  16709. // These events are:
  16710. //
  16711. // * ContinuationEvent
  16712. // * EndEvent
  16713. // * ProgressEvent
  16714. // * RecordsEvent
  16715. // * StatsEvent
  16716. type SelectObjectContentEventStreamEvent interface {
  16717. eventSelectObjectContentEventStream()
  16718. }
  16719. // SelectObjectContentEventStreamReader provides the interface for reading EventStream
  16720. // Events from the SelectObjectContent API. The
  16721. // default implementation for this interface will be SelectObjectContentEventStream.
  16722. //
  16723. // The reader's Close method must allow multiple concurrent calls.
  16724. //
  16725. // These events are:
  16726. //
  16727. // * ContinuationEvent
  16728. // * EndEvent
  16729. // * ProgressEvent
  16730. // * RecordsEvent
  16731. // * StatsEvent
  16732. type SelectObjectContentEventStreamReader interface {
  16733. // Returns a channel of events as they are read from the event stream.
  16734. Events() <-chan SelectObjectContentEventStreamEvent
  16735. // Close will close the underlying event stream reader. For event stream over
  16736. // HTTP this will also close the HTTP connection.
  16737. Close() error
  16738. // Returns any error that has occured while reading from the event stream.
  16739. Err() error
  16740. }
  16741. type readSelectObjectContentEventStream struct {
  16742. eventReader *eventstreamapi.EventReader
  16743. stream chan SelectObjectContentEventStreamEvent
  16744. errVal atomic.Value
  16745. done chan struct{}
  16746. closeOnce sync.Once
  16747. }
  16748. func newReadSelectObjectContentEventStream(
  16749. reader io.ReadCloser,
  16750. unmarshalers request.HandlerList,
  16751. logger aws.Logger,
  16752. logLevel aws.LogLevelType,
  16753. ) *readSelectObjectContentEventStream {
  16754. r := &readSelectObjectContentEventStream{
  16755. stream: make(chan SelectObjectContentEventStreamEvent),
  16756. done: make(chan struct{}),
  16757. }
  16758. r.eventReader = eventstreamapi.NewEventReader(
  16759. reader,
  16760. protocol.HandlerPayloadUnmarshal{
  16761. Unmarshalers: unmarshalers,
  16762. },
  16763. r.unmarshalerForEventType,
  16764. )
  16765. r.eventReader.UseLogger(logger, logLevel)
  16766. return r
  16767. }
  16768. // Close will close the underlying event stream reader. For EventStream over
  16769. // HTTP this will also close the HTTP connection.
  16770. func (r *readSelectObjectContentEventStream) Close() error {
  16771. r.closeOnce.Do(r.safeClose)
  16772. return r.Err()
  16773. }
  16774. func (r *readSelectObjectContentEventStream) safeClose() {
  16775. close(r.done)
  16776. err := r.eventReader.Close()
  16777. if err != nil {
  16778. r.errVal.Store(err)
  16779. }
  16780. }
  16781. func (r *readSelectObjectContentEventStream) Err() error {
  16782. if v := r.errVal.Load(); v != nil {
  16783. return v.(error)
  16784. }
  16785. return nil
  16786. }
  16787. func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  16788. return r.stream
  16789. }
  16790. func (r *readSelectObjectContentEventStream) readEventStream() {
  16791. defer close(r.stream)
  16792. for {
  16793. event, err := r.eventReader.ReadEvent()
  16794. if err != nil {
  16795. if err == io.EOF {
  16796. return
  16797. }
  16798. select {
  16799. case <-r.done:
  16800. // If closed already ignore the error
  16801. return
  16802. default:
  16803. }
  16804. r.errVal.Store(err)
  16805. return
  16806. }
  16807. select {
  16808. case r.stream <- event.(SelectObjectContentEventStreamEvent):
  16809. case <-r.done:
  16810. return
  16811. }
  16812. }
  16813. }
  16814. func (r *readSelectObjectContentEventStream) unmarshalerForEventType(
  16815. eventType string,
  16816. ) (eventstreamapi.Unmarshaler, error) {
  16817. switch eventType {
  16818. case "Cont":
  16819. return &ContinuationEvent{}, nil
  16820. case "End":
  16821. return &EndEvent{}, nil
  16822. case "Progress":
  16823. return &ProgressEvent{}, nil
  16824. case "Records":
  16825. return &RecordsEvent{}, nil
  16826. case "Stats":
  16827. return &StatsEvent{}, nil
  16828. default:
  16829. return nil, fmt.Errorf(
  16830. "unknown event type name, %s, for SelectObjectContentEventStream", eventType)
  16831. }
  16832. }
  16833. // Request to filter the contents of an Amazon S3 object based on a simple Structured
  16834. // Query Language (SQL) statement. In the request, along with the SQL expression,
  16835. // you must also specify a data serialization format (JSON or CSV) of the object.
  16836. // Amazon S3 uses this to parse object data into records, and returns only records
  16837. // that match the specified SQL expression. You must also specify the data serialization
  16838. // format for the response. For more information, go to S3Select API Documentation
  16839. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html)
  16840. type SelectObjectContentInput struct {
  16841. _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16842. // The S3 Bucket.
  16843. //
  16844. // Bucket is a required field
  16845. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16846. // The expression that is used to query the object.
  16847. //
  16848. // Expression is a required field
  16849. Expression *string `type:"string" required:"true"`
  16850. // The type of the provided expression (e.g., SQL).
  16851. //
  16852. // ExpressionType is a required field
  16853. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  16854. // Describes the format of the data in the object that is being queried.
  16855. //
  16856. // InputSerialization is a required field
  16857. InputSerialization *InputSerialization `type:"structure" required:"true"`
  16858. // The Object Key.
  16859. //
  16860. // Key is a required field
  16861. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  16862. // Describes the format of the data that you want Amazon S3 to return in response.
  16863. //
  16864. // OutputSerialization is a required field
  16865. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  16866. // Specifies if periodic request progress information should be enabled.
  16867. RequestProgress *RequestProgress `type:"structure"`
  16868. // The SSE Algorithm used to encrypt the object. For more information, go to
  16869. // Server-Side Encryption (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  16870. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  16871. // The SSE Customer Key. For more information, go to Server-Side Encryption
  16872. // (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  16873. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  16874. // The SSE Customer Key MD5. For more information, go to Server-Side Encryption
  16875. // (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  16876. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  16877. }
  16878. // String returns the string representation
  16879. func (s SelectObjectContentInput) String() string {
  16880. return awsutil.Prettify(s)
  16881. }
  16882. // GoString returns the string representation
  16883. func (s SelectObjectContentInput) GoString() string {
  16884. return s.String()
  16885. }
  16886. // Validate inspects the fields of the type to determine if they are valid.
  16887. func (s *SelectObjectContentInput) Validate() error {
  16888. invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"}
  16889. if s.Bucket == nil {
  16890. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16891. }
  16892. if s.Expression == nil {
  16893. invalidParams.Add(request.NewErrParamRequired("Expression"))
  16894. }
  16895. if s.ExpressionType == nil {
  16896. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  16897. }
  16898. if s.InputSerialization == nil {
  16899. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  16900. }
  16901. if s.Key == nil {
  16902. invalidParams.Add(request.NewErrParamRequired("Key"))
  16903. }
  16904. if s.Key != nil && len(*s.Key) < 1 {
  16905. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16906. }
  16907. if s.OutputSerialization == nil {
  16908. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  16909. }
  16910. if invalidParams.Len() > 0 {
  16911. return invalidParams
  16912. }
  16913. return nil
  16914. }
  16915. // SetBucket sets the Bucket field's value.
  16916. func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput {
  16917. s.Bucket = &v
  16918. return s
  16919. }
  16920. func (s *SelectObjectContentInput) getBucket() (v string) {
  16921. if s.Bucket == nil {
  16922. return v
  16923. }
  16924. return *s.Bucket
  16925. }
  16926. // SetExpression sets the Expression field's value.
  16927. func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput {
  16928. s.Expression = &v
  16929. return s
  16930. }
  16931. // SetExpressionType sets the ExpressionType field's value.
  16932. func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput {
  16933. s.ExpressionType = &v
  16934. return s
  16935. }
  16936. // SetInputSerialization sets the InputSerialization field's value.
  16937. func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput {
  16938. s.InputSerialization = v
  16939. return s
  16940. }
  16941. // SetKey sets the Key field's value.
  16942. func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput {
  16943. s.Key = &v
  16944. return s
  16945. }
  16946. // SetOutputSerialization sets the OutputSerialization field's value.
  16947. func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput {
  16948. s.OutputSerialization = v
  16949. return s
  16950. }
  16951. // SetRequestProgress sets the RequestProgress field's value.
  16952. func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput {
  16953. s.RequestProgress = v
  16954. return s
  16955. }
  16956. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  16957. func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput {
  16958. s.SSECustomerAlgorithm = &v
  16959. return s
  16960. }
  16961. // SetSSECustomerKey sets the SSECustomerKey field's value.
  16962. func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput {
  16963. s.SSECustomerKey = &v
  16964. return s
  16965. }
  16966. func (s *SelectObjectContentInput) getSSECustomerKey() (v string) {
  16967. if s.SSECustomerKey == nil {
  16968. return v
  16969. }
  16970. return *s.SSECustomerKey
  16971. }
  16972. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  16973. func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput {
  16974. s.SSECustomerKeyMD5 = &v
  16975. return s
  16976. }
  16977. type SelectObjectContentOutput struct {
  16978. _ struct{} `type:"structure" payload:"Payload"`
  16979. // Use EventStream to use the API's stream.
  16980. EventStream *SelectObjectContentEventStream `type:"structure"`
  16981. }
  16982. // String returns the string representation
  16983. func (s SelectObjectContentOutput) String() string {
  16984. return awsutil.Prettify(s)
  16985. }
  16986. // GoString returns the string representation
  16987. func (s SelectObjectContentOutput) GoString() string {
  16988. return s.String()
  16989. }
  16990. // SetEventStream sets the EventStream field's value.
  16991. func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
  16992. s.EventStream = v
  16993. return s
  16994. }
  16995. func (s *SelectObjectContentOutput) runEventStreamLoop(r *request.Request) {
  16996. if r.Error != nil {
  16997. return
  16998. }
  16999. reader := newReadSelectObjectContentEventStream(
  17000. r.HTTPResponse.Body,
  17001. r.Handlers.UnmarshalStream,
  17002. r.Config.Logger,
  17003. r.Config.LogLevel.Value(),
  17004. )
  17005. go reader.readEventStream()
  17006. eventStream := &SelectObjectContentEventStream{
  17007. StreamCloser: r.HTTPResponse.Body,
  17008. Reader: reader,
  17009. }
  17010. s.EventStream = eventStream
  17011. }
  17012. // Describes the parameters for Select job types.
  17013. type SelectParameters struct {
  17014. _ struct{} `type:"structure"`
  17015. // The expression that is used to query the object.
  17016. //
  17017. // Expression is a required field
  17018. Expression *string `type:"string" required:"true"`
  17019. // The type of the provided expression (e.g., SQL).
  17020. //
  17021. // ExpressionType is a required field
  17022. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  17023. // Describes the serialization format of the object.
  17024. //
  17025. // InputSerialization is a required field
  17026. InputSerialization *InputSerialization `type:"structure" required:"true"`
  17027. // Describes how the results of the Select job are serialized.
  17028. //
  17029. // OutputSerialization is a required field
  17030. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  17031. }
  17032. // String returns the string representation
  17033. func (s SelectParameters) String() string {
  17034. return awsutil.Prettify(s)
  17035. }
  17036. // GoString returns the string representation
  17037. func (s SelectParameters) GoString() string {
  17038. return s.String()
  17039. }
  17040. // Validate inspects the fields of the type to determine if they are valid.
  17041. func (s *SelectParameters) Validate() error {
  17042. invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
  17043. if s.Expression == nil {
  17044. invalidParams.Add(request.NewErrParamRequired("Expression"))
  17045. }
  17046. if s.ExpressionType == nil {
  17047. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  17048. }
  17049. if s.InputSerialization == nil {
  17050. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  17051. }
  17052. if s.OutputSerialization == nil {
  17053. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  17054. }
  17055. if invalidParams.Len() > 0 {
  17056. return invalidParams
  17057. }
  17058. return nil
  17059. }
  17060. // SetExpression sets the Expression field's value.
  17061. func (s *SelectParameters) SetExpression(v string) *SelectParameters {
  17062. s.Expression = &v
  17063. return s
  17064. }
  17065. // SetExpressionType sets the ExpressionType field's value.
  17066. func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
  17067. s.ExpressionType = &v
  17068. return s
  17069. }
  17070. // SetInputSerialization sets the InputSerialization field's value.
  17071. func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
  17072. s.InputSerialization = v
  17073. return s
  17074. }
  17075. // SetOutputSerialization sets the OutputSerialization field's value.
  17076. func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
  17077. s.OutputSerialization = v
  17078. return s
  17079. }
  17080. // Describes the default server-side encryption to apply to new objects in the
  17081. // bucket. If Put Object request does not specify any server-side encryption,
  17082. // this default encryption will be applied.
  17083. type ServerSideEncryptionByDefault struct {
  17084. _ struct{} `type:"structure"`
  17085. // KMS master key ID to use for the default encryption. This parameter is allowed
  17086. // if SSEAlgorithm is aws:kms.
  17087. KMSMasterKeyID *string `type:"string"`
  17088. // Server-side encryption algorithm to use for the default encryption.
  17089. //
  17090. // SSEAlgorithm is a required field
  17091. SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  17092. }
  17093. // String returns the string representation
  17094. func (s ServerSideEncryptionByDefault) String() string {
  17095. return awsutil.Prettify(s)
  17096. }
  17097. // GoString returns the string representation
  17098. func (s ServerSideEncryptionByDefault) GoString() string {
  17099. return s.String()
  17100. }
  17101. // Validate inspects the fields of the type to determine if they are valid.
  17102. func (s *ServerSideEncryptionByDefault) Validate() error {
  17103. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
  17104. if s.SSEAlgorithm == nil {
  17105. invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
  17106. }
  17107. if invalidParams.Len() > 0 {
  17108. return invalidParams
  17109. }
  17110. return nil
  17111. }
  17112. // SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
  17113. func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
  17114. s.KMSMasterKeyID = &v
  17115. return s
  17116. }
  17117. // SetSSEAlgorithm sets the SSEAlgorithm field's value.
  17118. func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
  17119. s.SSEAlgorithm = &v
  17120. return s
  17121. }
  17122. // Container for server-side encryption configuration rules. Currently S3 supports
  17123. // one rule only.
  17124. type ServerSideEncryptionConfiguration struct {
  17125. _ struct{} `type:"structure"`
  17126. // Container for information about a particular server-side encryption configuration
  17127. // rule.
  17128. //
  17129. // Rules is a required field
  17130. Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  17131. }
  17132. // String returns the string representation
  17133. func (s ServerSideEncryptionConfiguration) String() string {
  17134. return awsutil.Prettify(s)
  17135. }
  17136. // GoString returns the string representation
  17137. func (s ServerSideEncryptionConfiguration) GoString() string {
  17138. return s.String()
  17139. }
  17140. // Validate inspects the fields of the type to determine if they are valid.
  17141. func (s *ServerSideEncryptionConfiguration) Validate() error {
  17142. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
  17143. if s.Rules == nil {
  17144. invalidParams.Add(request.NewErrParamRequired("Rules"))
  17145. }
  17146. if s.Rules != nil {
  17147. for i, v := range s.Rules {
  17148. if v == nil {
  17149. continue
  17150. }
  17151. if err := v.Validate(); err != nil {
  17152. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  17153. }
  17154. }
  17155. }
  17156. if invalidParams.Len() > 0 {
  17157. return invalidParams
  17158. }
  17159. return nil
  17160. }
  17161. // SetRules sets the Rules field's value.
  17162. func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
  17163. s.Rules = v
  17164. return s
  17165. }
  17166. // Container for information about a particular server-side encryption configuration
  17167. // rule.
  17168. type ServerSideEncryptionRule struct {
  17169. _ struct{} `type:"structure"`
  17170. // Describes the default server-side encryption to apply to new objects in the
  17171. // bucket. If Put Object request does not specify any server-side encryption,
  17172. // this default encryption will be applied.
  17173. ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
  17174. }
  17175. // String returns the string representation
  17176. func (s ServerSideEncryptionRule) String() string {
  17177. return awsutil.Prettify(s)
  17178. }
  17179. // GoString returns the string representation
  17180. func (s ServerSideEncryptionRule) GoString() string {
  17181. return s.String()
  17182. }
  17183. // Validate inspects the fields of the type to determine if they are valid.
  17184. func (s *ServerSideEncryptionRule) Validate() error {
  17185. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
  17186. if s.ApplyServerSideEncryptionByDefault != nil {
  17187. if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
  17188. invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
  17189. }
  17190. }
  17191. if invalidParams.Len() > 0 {
  17192. return invalidParams
  17193. }
  17194. return nil
  17195. }
  17196. // SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
  17197. func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
  17198. s.ApplyServerSideEncryptionByDefault = v
  17199. return s
  17200. }
  17201. // Container for filters that define which source objects should be replicated.
  17202. type SourceSelectionCriteria struct {
  17203. _ struct{} `type:"structure"`
  17204. // Container for filter information of selection of KMS Encrypted S3 objects.
  17205. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
  17206. }
  17207. // String returns the string representation
  17208. func (s SourceSelectionCriteria) String() string {
  17209. return awsutil.Prettify(s)
  17210. }
  17211. // GoString returns the string representation
  17212. func (s SourceSelectionCriteria) GoString() string {
  17213. return s.String()
  17214. }
  17215. // Validate inspects the fields of the type to determine if they are valid.
  17216. func (s *SourceSelectionCriteria) Validate() error {
  17217. invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
  17218. if s.SseKmsEncryptedObjects != nil {
  17219. if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
  17220. invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
  17221. }
  17222. }
  17223. if invalidParams.Len() > 0 {
  17224. return invalidParams
  17225. }
  17226. return nil
  17227. }
  17228. // SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
  17229. func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
  17230. s.SseKmsEncryptedObjects = v
  17231. return s
  17232. }
  17233. // Container for filter information of selection of KMS Encrypted S3 objects.
  17234. type SseKmsEncryptedObjects struct {
  17235. _ struct{} `type:"structure"`
  17236. // The replication for KMS encrypted S3 objects is disabled if status is not
  17237. // Enabled.
  17238. //
  17239. // Status is a required field
  17240. Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
  17241. }
  17242. // String returns the string representation
  17243. func (s SseKmsEncryptedObjects) String() string {
  17244. return awsutil.Prettify(s)
  17245. }
  17246. // GoString returns the string representation
  17247. func (s SseKmsEncryptedObjects) GoString() string {
  17248. return s.String()
  17249. }
  17250. // Validate inspects the fields of the type to determine if they are valid.
  17251. func (s *SseKmsEncryptedObjects) Validate() error {
  17252. invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
  17253. if s.Status == nil {
  17254. invalidParams.Add(request.NewErrParamRequired("Status"))
  17255. }
  17256. if invalidParams.Len() > 0 {
  17257. return invalidParams
  17258. }
  17259. return nil
  17260. }
  17261. // SetStatus sets the Status field's value.
  17262. func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
  17263. s.Status = &v
  17264. return s
  17265. }
  17266. type Stats struct {
  17267. _ struct{} `type:"structure"`
  17268. // Total number of uncompressed object bytes processed.
  17269. BytesProcessed *int64 `type:"long"`
  17270. // Total number of bytes of records payload data returned.
  17271. BytesReturned *int64 `type:"long"`
  17272. // Total number of object bytes scanned.
  17273. BytesScanned *int64 `type:"long"`
  17274. }
  17275. // String returns the string representation
  17276. func (s Stats) String() string {
  17277. return awsutil.Prettify(s)
  17278. }
  17279. // GoString returns the string representation
  17280. func (s Stats) GoString() string {
  17281. return s.String()
  17282. }
  17283. // SetBytesProcessed sets the BytesProcessed field's value.
  17284. func (s *Stats) SetBytesProcessed(v int64) *Stats {
  17285. s.BytesProcessed = &v
  17286. return s
  17287. }
  17288. // SetBytesReturned sets the BytesReturned field's value.
  17289. func (s *Stats) SetBytesReturned(v int64) *Stats {
  17290. s.BytesReturned = &v
  17291. return s
  17292. }
  17293. // SetBytesScanned sets the BytesScanned field's value.
  17294. func (s *Stats) SetBytesScanned(v int64) *Stats {
  17295. s.BytesScanned = &v
  17296. return s
  17297. }
  17298. type StatsEvent struct {
  17299. _ struct{} `type:"structure" payload:"Details"`
  17300. // The Stats event details.
  17301. Details *Stats `locationName:"Details" type:"structure"`
  17302. }
  17303. // String returns the string representation
  17304. func (s StatsEvent) String() string {
  17305. return awsutil.Prettify(s)
  17306. }
  17307. // GoString returns the string representation
  17308. func (s StatsEvent) GoString() string {
  17309. return s.String()
  17310. }
  17311. // SetDetails sets the Details field's value.
  17312. func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent {
  17313. s.Details = v
  17314. return s
  17315. }
  17316. // The StatsEvent is and event in the SelectObjectContentEventStream group of events.
  17317. func (s *StatsEvent) eventSelectObjectContentEventStream() {}
  17318. // UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value.
  17319. // This method is only used internally within the SDK's EventStream handling.
  17320. func (s *StatsEvent) UnmarshalEvent(
  17321. payloadUnmarshaler protocol.PayloadUnmarshaler,
  17322. msg eventstream.Message,
  17323. ) error {
  17324. if err := payloadUnmarshaler.UnmarshalPayload(
  17325. bytes.NewReader(msg.Payload), s,
  17326. ); err != nil {
  17327. return fmt.Errorf("failed to unmarshal payload, %v", err)
  17328. }
  17329. return nil
  17330. }
  17331. type StorageClassAnalysis struct {
  17332. _ struct{} `type:"structure"`
  17333. // A container used to describe how data related to the storage class analysis
  17334. // should be exported.
  17335. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  17336. }
  17337. // String returns the string representation
  17338. func (s StorageClassAnalysis) String() string {
  17339. return awsutil.Prettify(s)
  17340. }
  17341. // GoString returns the string representation
  17342. func (s StorageClassAnalysis) GoString() string {
  17343. return s.String()
  17344. }
  17345. // Validate inspects the fields of the type to determine if they are valid.
  17346. func (s *StorageClassAnalysis) Validate() error {
  17347. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  17348. if s.DataExport != nil {
  17349. if err := s.DataExport.Validate(); err != nil {
  17350. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  17351. }
  17352. }
  17353. if invalidParams.Len() > 0 {
  17354. return invalidParams
  17355. }
  17356. return nil
  17357. }
  17358. // SetDataExport sets the DataExport field's value.
  17359. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  17360. s.DataExport = v
  17361. return s
  17362. }
  17363. type StorageClassAnalysisDataExport struct {
  17364. _ struct{} `type:"structure"`
  17365. // The place to store the data for an analysis.
  17366. //
  17367. // Destination is a required field
  17368. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  17369. // The version of the output schema to use when exporting data. Must be V_1.
  17370. //
  17371. // OutputSchemaVersion is a required field
  17372. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  17373. }
  17374. // String returns the string representation
  17375. func (s StorageClassAnalysisDataExport) String() string {
  17376. return awsutil.Prettify(s)
  17377. }
  17378. // GoString returns the string representation
  17379. func (s StorageClassAnalysisDataExport) GoString() string {
  17380. return s.String()
  17381. }
  17382. // Validate inspects the fields of the type to determine if they are valid.
  17383. func (s *StorageClassAnalysisDataExport) Validate() error {
  17384. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  17385. if s.Destination == nil {
  17386. invalidParams.Add(request.NewErrParamRequired("Destination"))
  17387. }
  17388. if s.OutputSchemaVersion == nil {
  17389. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  17390. }
  17391. if s.Destination != nil {
  17392. if err := s.Destination.Validate(); err != nil {
  17393. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  17394. }
  17395. }
  17396. if invalidParams.Len() > 0 {
  17397. return invalidParams
  17398. }
  17399. return nil
  17400. }
  17401. // SetDestination sets the Destination field's value.
  17402. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  17403. s.Destination = v
  17404. return s
  17405. }
  17406. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  17407. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  17408. s.OutputSchemaVersion = &v
  17409. return s
  17410. }
  17411. type Tag struct {
  17412. _ struct{} `type:"structure"`
  17413. // Name of the tag.
  17414. //
  17415. // Key is a required field
  17416. Key *string `min:"1" type:"string" required:"true"`
  17417. // Value of the tag.
  17418. //
  17419. // Value is a required field
  17420. Value *string `type:"string" required:"true"`
  17421. }
  17422. // String returns the string representation
  17423. func (s Tag) String() string {
  17424. return awsutil.Prettify(s)
  17425. }
  17426. // GoString returns the string representation
  17427. func (s Tag) GoString() string {
  17428. return s.String()
  17429. }
  17430. // Validate inspects the fields of the type to determine if they are valid.
  17431. func (s *Tag) Validate() error {
  17432. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  17433. if s.Key == nil {
  17434. invalidParams.Add(request.NewErrParamRequired("Key"))
  17435. }
  17436. if s.Key != nil && len(*s.Key) < 1 {
  17437. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17438. }
  17439. if s.Value == nil {
  17440. invalidParams.Add(request.NewErrParamRequired("Value"))
  17441. }
  17442. if invalidParams.Len() > 0 {
  17443. return invalidParams
  17444. }
  17445. return nil
  17446. }
  17447. // SetKey sets the Key field's value.
  17448. func (s *Tag) SetKey(v string) *Tag {
  17449. s.Key = &v
  17450. return s
  17451. }
  17452. // SetValue sets the Value field's value.
  17453. func (s *Tag) SetValue(v string) *Tag {
  17454. s.Value = &v
  17455. return s
  17456. }
  17457. type Tagging struct {
  17458. _ struct{} `type:"structure"`
  17459. // TagSet is a required field
  17460. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  17461. }
  17462. // String returns the string representation
  17463. func (s Tagging) String() string {
  17464. return awsutil.Prettify(s)
  17465. }
  17466. // GoString returns the string representation
  17467. func (s Tagging) GoString() string {
  17468. return s.String()
  17469. }
  17470. // Validate inspects the fields of the type to determine if they are valid.
  17471. func (s *Tagging) Validate() error {
  17472. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  17473. if s.TagSet == nil {
  17474. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  17475. }
  17476. if s.TagSet != nil {
  17477. for i, v := range s.TagSet {
  17478. if v == nil {
  17479. continue
  17480. }
  17481. if err := v.Validate(); err != nil {
  17482. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  17483. }
  17484. }
  17485. }
  17486. if invalidParams.Len() > 0 {
  17487. return invalidParams
  17488. }
  17489. return nil
  17490. }
  17491. // SetTagSet sets the TagSet field's value.
  17492. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  17493. s.TagSet = v
  17494. return s
  17495. }
  17496. type TargetGrant struct {
  17497. _ struct{} `type:"structure"`
  17498. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  17499. // Logging permissions assigned to the Grantee for the bucket.
  17500. Permission *string `type:"string" enum:"BucketLogsPermission"`
  17501. }
  17502. // String returns the string representation
  17503. func (s TargetGrant) String() string {
  17504. return awsutil.Prettify(s)
  17505. }
  17506. // GoString returns the string representation
  17507. func (s TargetGrant) GoString() string {
  17508. return s.String()
  17509. }
  17510. // Validate inspects the fields of the type to determine if they are valid.
  17511. func (s *TargetGrant) Validate() error {
  17512. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  17513. if s.Grantee != nil {
  17514. if err := s.Grantee.Validate(); err != nil {
  17515. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  17516. }
  17517. }
  17518. if invalidParams.Len() > 0 {
  17519. return invalidParams
  17520. }
  17521. return nil
  17522. }
  17523. // SetGrantee sets the Grantee field's value.
  17524. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  17525. s.Grantee = v
  17526. return s
  17527. }
  17528. // SetPermission sets the Permission field's value.
  17529. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  17530. s.Permission = &v
  17531. return s
  17532. }
  17533. // Container for specifying the configuration when you want Amazon S3 to publish
  17534. // events to an Amazon Simple Notification Service (Amazon SNS) topic.
  17535. type TopicConfiguration struct {
  17536. _ struct{} `type:"structure"`
  17537. // Events is a required field
  17538. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  17539. // Container for object key name filtering rules. For information about key
  17540. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  17541. Filter *NotificationConfigurationFilter `type:"structure"`
  17542. // Optional unique identifier for configurations in a notification configuration.
  17543. // If you don't provide one, Amazon S3 will assign an ID.
  17544. Id *string `type:"string"`
  17545. // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects
  17546. // events of specified type.
  17547. //
  17548. // TopicArn is a required field
  17549. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  17550. }
  17551. // String returns the string representation
  17552. func (s TopicConfiguration) String() string {
  17553. return awsutil.Prettify(s)
  17554. }
  17555. // GoString returns the string representation
  17556. func (s TopicConfiguration) GoString() string {
  17557. return s.String()
  17558. }
  17559. // Validate inspects the fields of the type to determine if they are valid.
  17560. func (s *TopicConfiguration) Validate() error {
  17561. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  17562. if s.Events == nil {
  17563. invalidParams.Add(request.NewErrParamRequired("Events"))
  17564. }
  17565. if s.TopicArn == nil {
  17566. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  17567. }
  17568. if invalidParams.Len() > 0 {
  17569. return invalidParams
  17570. }
  17571. return nil
  17572. }
  17573. // SetEvents sets the Events field's value.
  17574. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  17575. s.Events = v
  17576. return s
  17577. }
  17578. // SetFilter sets the Filter field's value.
  17579. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  17580. s.Filter = v
  17581. return s
  17582. }
  17583. // SetId sets the Id field's value.
  17584. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  17585. s.Id = &v
  17586. return s
  17587. }
  17588. // SetTopicArn sets the TopicArn field's value.
  17589. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  17590. s.TopicArn = &v
  17591. return s
  17592. }
  17593. type TopicConfigurationDeprecated struct {
  17594. _ struct{} `type:"structure"`
  17595. // Bucket event for which to send notifications.
  17596. Event *string `deprecated:"true" type:"string" enum:"Event"`
  17597. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  17598. // Optional unique identifier for configurations in a notification configuration.
  17599. // If you don't provide one, Amazon S3 will assign an ID.
  17600. Id *string `type:"string"`
  17601. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  17602. // specified events for the bucket.
  17603. Topic *string `type:"string"`
  17604. }
  17605. // String returns the string representation
  17606. func (s TopicConfigurationDeprecated) String() string {
  17607. return awsutil.Prettify(s)
  17608. }
  17609. // GoString returns the string representation
  17610. func (s TopicConfigurationDeprecated) GoString() string {
  17611. return s.String()
  17612. }
  17613. // SetEvent sets the Event field's value.
  17614. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  17615. s.Event = &v
  17616. return s
  17617. }
  17618. // SetEvents sets the Events field's value.
  17619. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  17620. s.Events = v
  17621. return s
  17622. }
  17623. // SetId sets the Id field's value.
  17624. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  17625. s.Id = &v
  17626. return s
  17627. }
  17628. // SetTopic sets the Topic field's value.
  17629. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  17630. s.Topic = &v
  17631. return s
  17632. }
  17633. type Transition struct {
  17634. _ struct{} `type:"structure"`
  17635. // Indicates at what date the object is to be moved or deleted. Should be in
  17636. // GMT ISO 8601 Format.
  17637. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  17638. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  17639. // The value must be a non-zero positive integer.
  17640. Days *int64 `type:"integer"`
  17641. // The class of storage used to store the object.
  17642. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  17643. }
  17644. // String returns the string representation
  17645. func (s Transition) String() string {
  17646. return awsutil.Prettify(s)
  17647. }
  17648. // GoString returns the string representation
  17649. func (s Transition) GoString() string {
  17650. return s.String()
  17651. }
  17652. // SetDate sets the Date field's value.
  17653. func (s *Transition) SetDate(v time.Time) *Transition {
  17654. s.Date = &v
  17655. return s
  17656. }
  17657. // SetDays sets the Days field's value.
  17658. func (s *Transition) SetDays(v int64) *Transition {
  17659. s.Days = &v
  17660. return s
  17661. }
  17662. // SetStorageClass sets the StorageClass field's value.
  17663. func (s *Transition) SetStorageClass(v string) *Transition {
  17664. s.StorageClass = &v
  17665. return s
  17666. }
  17667. type UploadPartCopyInput struct {
  17668. _ struct{} `type:"structure"`
  17669. // Bucket is a required field
  17670. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17671. // The name of the source bucket and key name of the source object, separated
  17672. // by a slash (/). Must be URL-encoded.
  17673. //
  17674. // CopySource is a required field
  17675. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  17676. // Copies the object if its entity tag (ETag) matches the specified tag.
  17677. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  17678. // Copies the object if it has been modified since the specified time.
  17679. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  17680. // Copies the object if its entity tag (ETag) is different than the specified
  17681. // ETag.
  17682. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  17683. // Copies the object if it hasn't been modified since the specified time.
  17684. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  17685. // The range of bytes to copy from the source object. The range value must use
  17686. // the form bytes=first-last, where the first and last are the zero-based byte
  17687. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  17688. // first ten bytes of the source. You can copy a range only if the source object
  17689. // is greater than 5 GB.
  17690. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  17691. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  17692. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  17693. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  17694. // the source object. The encryption key provided in this header must be one
  17695. // that was used when the source object was created.
  17696. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  17697. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17698. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17699. // key was transmitted without error.
  17700. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  17701. // Key is a required field
  17702. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17703. // Part number of part being copied. This is a positive integer between 1 and
  17704. // 10,000.
  17705. //
  17706. // PartNumber is a required field
  17707. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  17708. // Confirms that the requester knows that she or he will be charged for the
  17709. // request. Bucket owners need not specify this parameter in their requests.
  17710. // Documentation on downloading objects from requester pays buckets can be found
  17711. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17712. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17713. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  17714. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17715. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  17716. // data. This value is used to store the object and then it is discarded; Amazon
  17717. // does not store the encryption key. The key must be appropriate for use with
  17718. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  17719. // header. This must be the same encryption key specified in the initiate multipart
  17720. // upload request.
  17721. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  17722. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17723. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17724. // key was transmitted without error.
  17725. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17726. // Upload ID identifying the multipart upload whose part is being copied.
  17727. //
  17728. // UploadId is a required field
  17729. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  17730. }
  17731. // String returns the string representation
  17732. func (s UploadPartCopyInput) String() string {
  17733. return awsutil.Prettify(s)
  17734. }
  17735. // GoString returns the string representation
  17736. func (s UploadPartCopyInput) GoString() string {
  17737. return s.String()
  17738. }
  17739. // Validate inspects the fields of the type to determine if they are valid.
  17740. func (s *UploadPartCopyInput) Validate() error {
  17741. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  17742. if s.Bucket == nil {
  17743. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17744. }
  17745. if s.CopySource == nil {
  17746. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  17747. }
  17748. if s.Key == nil {
  17749. invalidParams.Add(request.NewErrParamRequired("Key"))
  17750. }
  17751. if s.Key != nil && len(*s.Key) < 1 {
  17752. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17753. }
  17754. if s.PartNumber == nil {
  17755. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  17756. }
  17757. if s.UploadId == nil {
  17758. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  17759. }
  17760. if invalidParams.Len() > 0 {
  17761. return invalidParams
  17762. }
  17763. return nil
  17764. }
  17765. // SetBucket sets the Bucket field's value.
  17766. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  17767. s.Bucket = &v
  17768. return s
  17769. }
  17770. func (s *UploadPartCopyInput) getBucket() (v string) {
  17771. if s.Bucket == nil {
  17772. return v
  17773. }
  17774. return *s.Bucket
  17775. }
  17776. // SetCopySource sets the CopySource field's value.
  17777. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  17778. s.CopySource = &v
  17779. return s
  17780. }
  17781. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  17782. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  17783. s.CopySourceIfMatch = &v
  17784. return s
  17785. }
  17786. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  17787. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  17788. s.CopySourceIfModifiedSince = &v
  17789. return s
  17790. }
  17791. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  17792. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  17793. s.CopySourceIfNoneMatch = &v
  17794. return s
  17795. }
  17796. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  17797. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  17798. s.CopySourceIfUnmodifiedSince = &v
  17799. return s
  17800. }
  17801. // SetCopySourceRange sets the CopySourceRange field's value.
  17802. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  17803. s.CopySourceRange = &v
  17804. return s
  17805. }
  17806. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  17807. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  17808. s.CopySourceSSECustomerAlgorithm = &v
  17809. return s
  17810. }
  17811. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  17812. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  17813. s.CopySourceSSECustomerKey = &v
  17814. return s
  17815. }
  17816. func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
  17817. if s.CopySourceSSECustomerKey == nil {
  17818. return v
  17819. }
  17820. return *s.CopySourceSSECustomerKey
  17821. }
  17822. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  17823. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  17824. s.CopySourceSSECustomerKeyMD5 = &v
  17825. return s
  17826. }
  17827. // SetKey sets the Key field's value.
  17828. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  17829. s.Key = &v
  17830. return s
  17831. }
  17832. // SetPartNumber sets the PartNumber field's value.
  17833. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  17834. s.PartNumber = &v
  17835. return s
  17836. }
  17837. // SetRequestPayer sets the RequestPayer field's value.
  17838. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  17839. s.RequestPayer = &v
  17840. return s
  17841. }
  17842. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17843. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  17844. s.SSECustomerAlgorithm = &v
  17845. return s
  17846. }
  17847. // SetSSECustomerKey sets the SSECustomerKey field's value.
  17848. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  17849. s.SSECustomerKey = &v
  17850. return s
  17851. }
  17852. func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
  17853. if s.SSECustomerKey == nil {
  17854. return v
  17855. }
  17856. return *s.SSECustomerKey
  17857. }
  17858. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17859. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  17860. s.SSECustomerKeyMD5 = &v
  17861. return s
  17862. }
  17863. // SetUploadId sets the UploadId field's value.
  17864. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  17865. s.UploadId = &v
  17866. return s
  17867. }
  17868. type UploadPartCopyOutput struct {
  17869. _ struct{} `type:"structure" payload:"CopyPartResult"`
  17870. CopyPartResult *CopyPartResult `type:"structure"`
  17871. // The version of the source object that was copied, if you have enabled versioning
  17872. // on the source bucket.
  17873. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  17874. // If present, indicates that the requester was successfully charged for the
  17875. // request.
  17876. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17877. // If server-side encryption with a customer-provided encryption key was requested,
  17878. // the response will include this header confirming the encryption algorithm
  17879. // used.
  17880. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17881. // If server-side encryption with a customer-provided encryption key was requested,
  17882. // the response will include this header to provide round trip message integrity
  17883. // verification of the customer-provided encryption key.
  17884. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17885. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  17886. // encryption key that was used for the object.
  17887. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  17888. // The Server-side encryption algorithm used when storing this object in S3
  17889. // (e.g., AES256, aws:kms).
  17890. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17891. }
  17892. // String returns the string representation
  17893. func (s UploadPartCopyOutput) String() string {
  17894. return awsutil.Prettify(s)
  17895. }
  17896. // GoString returns the string representation
  17897. func (s UploadPartCopyOutput) GoString() string {
  17898. return s.String()
  17899. }
  17900. // SetCopyPartResult sets the CopyPartResult field's value.
  17901. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  17902. s.CopyPartResult = v
  17903. return s
  17904. }
  17905. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  17906. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  17907. s.CopySourceVersionId = &v
  17908. return s
  17909. }
  17910. // SetRequestCharged sets the RequestCharged field's value.
  17911. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  17912. s.RequestCharged = &v
  17913. return s
  17914. }
  17915. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17916. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  17917. s.SSECustomerAlgorithm = &v
  17918. return s
  17919. }
  17920. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17921. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  17922. s.SSECustomerKeyMD5 = &v
  17923. return s
  17924. }
  17925. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17926. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  17927. s.SSEKMSKeyId = &v
  17928. return s
  17929. }
  17930. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17931. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  17932. s.ServerSideEncryption = &v
  17933. return s
  17934. }
  17935. type UploadPartInput struct {
  17936. _ struct{} `type:"structure" payload:"Body"`
  17937. // Object data.
  17938. Body io.ReadSeeker `type:"blob"`
  17939. // Name of the bucket to which the multipart upload was initiated.
  17940. //
  17941. // Bucket is a required field
  17942. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17943. // Size of the body in bytes. This parameter is useful when the size of the
  17944. // body cannot be determined automatically.
  17945. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  17946. // The base64-encoded 128-bit MD5 digest of the part data.
  17947. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  17948. // Object key for which the multipart upload was initiated.
  17949. //
  17950. // Key is a required field
  17951. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17952. // Part number of part being uploaded. This is a positive integer between 1
  17953. // and 10,000.
  17954. //
  17955. // PartNumber is a required field
  17956. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  17957. // Confirms that the requester knows that she or he will be charged for the
  17958. // request. Bucket owners need not specify this parameter in their requests.
  17959. // Documentation on downloading objects from requester pays buckets can be found
  17960. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17961. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17962. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  17963. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17964. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  17965. // data. This value is used to store the object and then it is discarded; Amazon
  17966. // does not store the encryption key. The key must be appropriate for use with
  17967. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  17968. // header. This must be the same encryption key specified in the initiate multipart
  17969. // upload request.
  17970. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  17971. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17972. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17973. // key was transmitted without error.
  17974. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17975. // Upload ID identifying the multipart upload whose part is being uploaded.
  17976. //
  17977. // UploadId is a required field
  17978. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  17979. }
  17980. // String returns the string representation
  17981. func (s UploadPartInput) String() string {
  17982. return awsutil.Prettify(s)
  17983. }
  17984. // GoString returns the string representation
  17985. func (s UploadPartInput) GoString() string {
  17986. return s.String()
  17987. }
  17988. // Validate inspects the fields of the type to determine if they are valid.
  17989. func (s *UploadPartInput) Validate() error {
  17990. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  17991. if s.Bucket == nil {
  17992. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17993. }
  17994. if s.Key == nil {
  17995. invalidParams.Add(request.NewErrParamRequired("Key"))
  17996. }
  17997. if s.Key != nil && len(*s.Key) < 1 {
  17998. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17999. }
  18000. if s.PartNumber == nil {
  18001. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  18002. }
  18003. if s.UploadId == nil {
  18004. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  18005. }
  18006. if invalidParams.Len() > 0 {
  18007. return invalidParams
  18008. }
  18009. return nil
  18010. }
  18011. // SetBody sets the Body field's value.
  18012. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  18013. s.Body = v
  18014. return s
  18015. }
  18016. // SetBucket sets the Bucket field's value.
  18017. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  18018. s.Bucket = &v
  18019. return s
  18020. }
  18021. func (s *UploadPartInput) getBucket() (v string) {
  18022. if s.Bucket == nil {
  18023. return v
  18024. }
  18025. return *s.Bucket
  18026. }
  18027. // SetContentLength sets the ContentLength field's value.
  18028. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  18029. s.ContentLength = &v
  18030. return s
  18031. }
  18032. // SetContentMD5 sets the ContentMD5 field's value.
  18033. func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
  18034. s.ContentMD5 = &v
  18035. return s
  18036. }
  18037. // SetKey sets the Key field's value.
  18038. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  18039. s.Key = &v
  18040. return s
  18041. }
  18042. // SetPartNumber sets the PartNumber field's value.
  18043. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  18044. s.PartNumber = &v
  18045. return s
  18046. }
  18047. // SetRequestPayer sets the RequestPayer field's value.
  18048. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  18049. s.RequestPayer = &v
  18050. return s
  18051. }
  18052. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  18053. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  18054. s.SSECustomerAlgorithm = &v
  18055. return s
  18056. }
  18057. // SetSSECustomerKey sets the SSECustomerKey field's value.
  18058. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  18059. s.SSECustomerKey = &v
  18060. return s
  18061. }
  18062. func (s *UploadPartInput) getSSECustomerKey() (v string) {
  18063. if s.SSECustomerKey == nil {
  18064. return v
  18065. }
  18066. return *s.SSECustomerKey
  18067. }
  18068. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  18069. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  18070. s.SSECustomerKeyMD5 = &v
  18071. return s
  18072. }
  18073. // SetUploadId sets the UploadId field's value.
  18074. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  18075. s.UploadId = &v
  18076. return s
  18077. }
  18078. type UploadPartOutput struct {
  18079. _ struct{} `type:"structure"`
  18080. // Entity tag for the uploaded object.
  18081. ETag *string `location:"header" locationName:"ETag" type:"string"`
  18082. // If present, indicates that the requester was successfully charged for the
  18083. // request.
  18084. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  18085. // If server-side encryption with a customer-provided encryption key was requested,
  18086. // the response will include this header confirming the encryption algorithm
  18087. // used.
  18088. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  18089. // If server-side encryption with a customer-provided encryption key was requested,
  18090. // the response will include this header to provide round trip message integrity
  18091. // verification of the customer-provided encryption key.
  18092. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  18093. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  18094. // encryption key that was used for the object.
  18095. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  18096. // The Server-side encryption algorithm used when storing this object in S3
  18097. // (e.g., AES256, aws:kms).
  18098. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  18099. }
  18100. // String returns the string representation
  18101. func (s UploadPartOutput) String() string {
  18102. return awsutil.Prettify(s)
  18103. }
  18104. // GoString returns the string representation
  18105. func (s UploadPartOutput) GoString() string {
  18106. return s.String()
  18107. }
  18108. // SetETag sets the ETag field's value.
  18109. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  18110. s.ETag = &v
  18111. return s
  18112. }
  18113. // SetRequestCharged sets the RequestCharged field's value.
  18114. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  18115. s.RequestCharged = &v
  18116. return s
  18117. }
  18118. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  18119. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  18120. s.SSECustomerAlgorithm = &v
  18121. return s
  18122. }
  18123. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  18124. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  18125. s.SSECustomerKeyMD5 = &v
  18126. return s
  18127. }
  18128. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  18129. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  18130. s.SSEKMSKeyId = &v
  18131. return s
  18132. }
  18133. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  18134. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  18135. s.ServerSideEncryption = &v
  18136. return s
  18137. }
  18138. type VersioningConfiguration struct {
  18139. _ struct{} `type:"structure"`
  18140. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  18141. // This element is only returned if the bucket has been configured with MFA
  18142. // delete. If the bucket has never been so configured, this element is not returned.
  18143. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  18144. // The versioning state of the bucket.
  18145. Status *string `type:"string" enum:"BucketVersioningStatus"`
  18146. }
  18147. // String returns the string representation
  18148. func (s VersioningConfiguration) String() string {
  18149. return awsutil.Prettify(s)
  18150. }
  18151. // GoString returns the string representation
  18152. func (s VersioningConfiguration) GoString() string {
  18153. return s.String()
  18154. }
  18155. // SetMFADelete sets the MFADelete field's value.
  18156. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  18157. s.MFADelete = &v
  18158. return s
  18159. }
  18160. // SetStatus sets the Status field's value.
  18161. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  18162. s.Status = &v
  18163. return s
  18164. }
  18165. type WebsiteConfiguration struct {
  18166. _ struct{} `type:"structure"`
  18167. ErrorDocument *ErrorDocument `type:"structure"`
  18168. IndexDocument *IndexDocument `type:"structure"`
  18169. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  18170. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  18171. }
  18172. // String returns the string representation
  18173. func (s WebsiteConfiguration) String() string {
  18174. return awsutil.Prettify(s)
  18175. }
  18176. // GoString returns the string representation
  18177. func (s WebsiteConfiguration) GoString() string {
  18178. return s.String()
  18179. }
  18180. // Validate inspects the fields of the type to determine if they are valid.
  18181. func (s *WebsiteConfiguration) Validate() error {
  18182. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  18183. if s.ErrorDocument != nil {
  18184. if err := s.ErrorDocument.Validate(); err != nil {
  18185. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  18186. }
  18187. }
  18188. if s.IndexDocument != nil {
  18189. if err := s.IndexDocument.Validate(); err != nil {
  18190. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  18191. }
  18192. }
  18193. if s.RedirectAllRequestsTo != nil {
  18194. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  18195. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  18196. }
  18197. }
  18198. if s.RoutingRules != nil {
  18199. for i, v := range s.RoutingRules {
  18200. if v == nil {
  18201. continue
  18202. }
  18203. if err := v.Validate(); err != nil {
  18204. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  18205. }
  18206. }
  18207. }
  18208. if invalidParams.Len() > 0 {
  18209. return invalidParams
  18210. }
  18211. return nil
  18212. }
  18213. // SetErrorDocument sets the ErrorDocument field's value.
  18214. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  18215. s.ErrorDocument = v
  18216. return s
  18217. }
  18218. // SetIndexDocument sets the IndexDocument field's value.
  18219. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  18220. s.IndexDocument = v
  18221. return s
  18222. }
  18223. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  18224. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  18225. s.RedirectAllRequestsTo = v
  18226. return s
  18227. }
  18228. // SetRoutingRules sets the RoutingRules field's value.
  18229. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  18230. s.RoutingRules = v
  18231. return s
  18232. }
  18233. const (
  18234. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  18235. AnalyticsS3ExportFileFormatCsv = "CSV"
  18236. )
  18237. const (
  18238. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  18239. BucketAccelerateStatusEnabled = "Enabled"
  18240. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  18241. BucketAccelerateStatusSuspended = "Suspended"
  18242. )
  18243. const (
  18244. // BucketCannedACLPrivate is a BucketCannedACL enum value
  18245. BucketCannedACLPrivate = "private"
  18246. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  18247. BucketCannedACLPublicRead = "public-read"
  18248. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  18249. BucketCannedACLPublicReadWrite = "public-read-write"
  18250. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  18251. BucketCannedACLAuthenticatedRead = "authenticated-read"
  18252. )
  18253. const (
  18254. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  18255. BucketLocationConstraintEu = "EU"
  18256. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  18257. BucketLocationConstraintEuWest1 = "eu-west-1"
  18258. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  18259. BucketLocationConstraintUsWest1 = "us-west-1"
  18260. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  18261. BucketLocationConstraintUsWest2 = "us-west-2"
  18262. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  18263. BucketLocationConstraintApSouth1 = "ap-south-1"
  18264. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  18265. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  18266. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  18267. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  18268. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  18269. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  18270. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  18271. BucketLocationConstraintSaEast1 = "sa-east-1"
  18272. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  18273. BucketLocationConstraintCnNorth1 = "cn-north-1"
  18274. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  18275. BucketLocationConstraintEuCentral1 = "eu-central-1"
  18276. )
  18277. const (
  18278. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  18279. BucketLogsPermissionFullControl = "FULL_CONTROL"
  18280. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  18281. BucketLogsPermissionRead = "READ"
  18282. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  18283. BucketLogsPermissionWrite = "WRITE"
  18284. )
  18285. const (
  18286. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  18287. BucketVersioningStatusEnabled = "Enabled"
  18288. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  18289. BucketVersioningStatusSuspended = "Suspended"
  18290. )
  18291. const (
  18292. // CompressionTypeNone is a CompressionType enum value
  18293. CompressionTypeNone = "NONE"
  18294. // CompressionTypeGzip is a CompressionType enum value
  18295. CompressionTypeGzip = "GZIP"
  18296. )
  18297. // Requests Amazon S3 to encode the object keys in the response and specifies
  18298. // the encoding method to use. An object key may contain any Unicode character;
  18299. // however, XML 1.0 parser cannot parse some characters, such as characters
  18300. // with an ASCII value from 0 to 10. For characters that are not supported in
  18301. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  18302. // keys in the response.
  18303. const (
  18304. // EncodingTypeUrl is a EncodingType enum value
  18305. EncodingTypeUrl = "url"
  18306. )
  18307. // Bucket event for which to send notifications.
  18308. const (
  18309. // EventS3ReducedRedundancyLostObject is a Event enum value
  18310. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  18311. // EventS3ObjectCreated is a Event enum value
  18312. EventS3ObjectCreated = "s3:ObjectCreated:*"
  18313. // EventS3ObjectCreatedPut is a Event enum value
  18314. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  18315. // EventS3ObjectCreatedPost is a Event enum value
  18316. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  18317. // EventS3ObjectCreatedCopy is a Event enum value
  18318. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  18319. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  18320. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  18321. // EventS3ObjectRemoved is a Event enum value
  18322. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  18323. // EventS3ObjectRemovedDelete is a Event enum value
  18324. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  18325. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  18326. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  18327. )
  18328. const (
  18329. // ExpirationStatusEnabled is a ExpirationStatus enum value
  18330. ExpirationStatusEnabled = "Enabled"
  18331. // ExpirationStatusDisabled is a ExpirationStatus enum value
  18332. ExpirationStatusDisabled = "Disabled"
  18333. )
  18334. const (
  18335. // ExpressionTypeSql is a ExpressionType enum value
  18336. ExpressionTypeSql = "SQL"
  18337. )
  18338. const (
  18339. // FileHeaderInfoUse is a FileHeaderInfo enum value
  18340. FileHeaderInfoUse = "USE"
  18341. // FileHeaderInfoIgnore is a FileHeaderInfo enum value
  18342. FileHeaderInfoIgnore = "IGNORE"
  18343. // FileHeaderInfoNone is a FileHeaderInfo enum value
  18344. FileHeaderInfoNone = "NONE"
  18345. )
  18346. const (
  18347. // FilterRuleNamePrefix is a FilterRuleName enum value
  18348. FilterRuleNamePrefix = "prefix"
  18349. // FilterRuleNameSuffix is a FilterRuleName enum value
  18350. FilterRuleNameSuffix = "suffix"
  18351. )
  18352. const (
  18353. // InventoryFormatCsv is a InventoryFormat enum value
  18354. InventoryFormatCsv = "CSV"
  18355. // InventoryFormatOrc is a InventoryFormat enum value
  18356. InventoryFormatOrc = "ORC"
  18357. )
  18358. const (
  18359. // InventoryFrequencyDaily is a InventoryFrequency enum value
  18360. InventoryFrequencyDaily = "Daily"
  18361. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  18362. InventoryFrequencyWeekly = "Weekly"
  18363. )
  18364. const (
  18365. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  18366. InventoryIncludedObjectVersionsAll = "All"
  18367. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  18368. InventoryIncludedObjectVersionsCurrent = "Current"
  18369. )
  18370. const (
  18371. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  18372. InventoryOptionalFieldSize = "Size"
  18373. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  18374. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  18375. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  18376. InventoryOptionalFieldStorageClass = "StorageClass"
  18377. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  18378. InventoryOptionalFieldEtag = "ETag"
  18379. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  18380. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  18381. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  18382. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  18383. // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
  18384. InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
  18385. )
  18386. const (
  18387. // JSONTypeDocument is a JSONType enum value
  18388. JSONTypeDocument = "DOCUMENT"
  18389. // JSONTypeLines is a JSONType enum value
  18390. JSONTypeLines = "LINES"
  18391. )
  18392. const (
  18393. // MFADeleteEnabled is a MFADelete enum value
  18394. MFADeleteEnabled = "Enabled"
  18395. // MFADeleteDisabled is a MFADelete enum value
  18396. MFADeleteDisabled = "Disabled"
  18397. )
  18398. const (
  18399. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  18400. MFADeleteStatusEnabled = "Enabled"
  18401. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  18402. MFADeleteStatusDisabled = "Disabled"
  18403. )
  18404. const (
  18405. // MetadataDirectiveCopy is a MetadataDirective enum value
  18406. MetadataDirectiveCopy = "COPY"
  18407. // MetadataDirectiveReplace is a MetadataDirective enum value
  18408. MetadataDirectiveReplace = "REPLACE"
  18409. )
  18410. const (
  18411. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  18412. ObjectCannedACLPrivate = "private"
  18413. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  18414. ObjectCannedACLPublicRead = "public-read"
  18415. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  18416. ObjectCannedACLPublicReadWrite = "public-read-write"
  18417. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  18418. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  18419. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  18420. ObjectCannedACLAwsExecRead = "aws-exec-read"
  18421. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  18422. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  18423. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  18424. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  18425. )
  18426. const (
  18427. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  18428. ObjectStorageClassStandard = "STANDARD"
  18429. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  18430. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  18431. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  18432. ObjectStorageClassGlacier = "GLACIER"
  18433. // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
  18434. ObjectStorageClassStandardIa = "STANDARD_IA"
  18435. // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
  18436. ObjectStorageClassOnezoneIa = "ONEZONE_IA"
  18437. )
  18438. const (
  18439. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  18440. ObjectVersionStorageClassStandard = "STANDARD"
  18441. )
  18442. const (
  18443. // OwnerOverrideDestination is a OwnerOverride enum value
  18444. OwnerOverrideDestination = "Destination"
  18445. )
  18446. const (
  18447. // PayerRequester is a Payer enum value
  18448. PayerRequester = "Requester"
  18449. // PayerBucketOwner is a Payer enum value
  18450. PayerBucketOwner = "BucketOwner"
  18451. )
  18452. const (
  18453. // PermissionFullControl is a Permission enum value
  18454. PermissionFullControl = "FULL_CONTROL"
  18455. // PermissionWrite is a Permission enum value
  18456. PermissionWrite = "WRITE"
  18457. // PermissionWriteAcp is a Permission enum value
  18458. PermissionWriteAcp = "WRITE_ACP"
  18459. // PermissionRead is a Permission enum value
  18460. PermissionRead = "READ"
  18461. // PermissionReadAcp is a Permission enum value
  18462. PermissionReadAcp = "READ_ACP"
  18463. )
  18464. const (
  18465. // ProtocolHttp is a Protocol enum value
  18466. ProtocolHttp = "http"
  18467. // ProtocolHttps is a Protocol enum value
  18468. ProtocolHttps = "https"
  18469. )
  18470. const (
  18471. // QuoteFieldsAlways is a QuoteFields enum value
  18472. QuoteFieldsAlways = "ALWAYS"
  18473. // QuoteFieldsAsneeded is a QuoteFields enum value
  18474. QuoteFieldsAsneeded = "ASNEEDED"
  18475. )
  18476. const (
  18477. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  18478. ReplicationRuleStatusEnabled = "Enabled"
  18479. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  18480. ReplicationRuleStatusDisabled = "Disabled"
  18481. )
  18482. const (
  18483. // ReplicationStatusComplete is a ReplicationStatus enum value
  18484. ReplicationStatusComplete = "COMPLETE"
  18485. // ReplicationStatusPending is a ReplicationStatus enum value
  18486. ReplicationStatusPending = "PENDING"
  18487. // ReplicationStatusFailed is a ReplicationStatus enum value
  18488. ReplicationStatusFailed = "FAILED"
  18489. // ReplicationStatusReplica is a ReplicationStatus enum value
  18490. ReplicationStatusReplica = "REPLICA"
  18491. )
  18492. // If present, indicates that the requester was successfully charged for the
  18493. // request.
  18494. const (
  18495. // RequestChargedRequester is a RequestCharged enum value
  18496. RequestChargedRequester = "requester"
  18497. )
  18498. // Confirms that the requester knows that she or he will be charged for the
  18499. // request. Bucket owners need not specify this parameter in their requests.
  18500. // Documentation on downloading objects from requester pays buckets can be found
  18501. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  18502. const (
  18503. // RequestPayerRequester is a RequestPayer enum value
  18504. RequestPayerRequester = "requester"
  18505. )
  18506. const (
  18507. // RestoreRequestTypeSelect is a RestoreRequestType enum value
  18508. RestoreRequestTypeSelect = "SELECT"
  18509. )
  18510. const (
  18511. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  18512. ServerSideEncryptionAes256 = "AES256"
  18513. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  18514. ServerSideEncryptionAwsKms = "aws:kms"
  18515. )
  18516. const (
  18517. // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
  18518. SseKmsEncryptedObjectsStatusEnabled = "Enabled"
  18519. // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
  18520. SseKmsEncryptedObjectsStatusDisabled = "Disabled"
  18521. )
  18522. const (
  18523. // StorageClassStandard is a StorageClass enum value
  18524. StorageClassStandard = "STANDARD"
  18525. // StorageClassReducedRedundancy is a StorageClass enum value
  18526. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  18527. // StorageClassStandardIa is a StorageClass enum value
  18528. StorageClassStandardIa = "STANDARD_IA"
  18529. // StorageClassOnezoneIa is a StorageClass enum value
  18530. StorageClassOnezoneIa = "ONEZONE_IA"
  18531. )
  18532. const (
  18533. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  18534. StorageClassAnalysisSchemaVersionV1 = "V_1"
  18535. )
  18536. const (
  18537. // TaggingDirectiveCopy is a TaggingDirective enum value
  18538. TaggingDirectiveCopy = "COPY"
  18539. // TaggingDirectiveReplace is a TaggingDirective enum value
  18540. TaggingDirectiveReplace = "REPLACE"
  18541. )
  18542. const (
  18543. // TierStandard is a Tier enum value
  18544. TierStandard = "Standard"
  18545. // TierBulk is a Tier enum value
  18546. TierBulk = "Bulk"
  18547. // TierExpedited is a Tier enum value
  18548. TierExpedited = "Expedited"
  18549. )
  18550. const (
  18551. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  18552. TransitionStorageClassGlacier = "GLACIER"
  18553. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  18554. TransitionStorageClassStandardIa = "STANDARD_IA"
  18555. // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
  18556. TransitionStorageClassOnezoneIa = "ONEZONE_IA"
  18557. )
  18558. const (
  18559. // TypeCanonicalUser is a Type enum value
  18560. TypeCanonicalUser = "CanonicalUser"
  18561. // TypeAmazonCustomerByEmail is a Type enum value
  18562. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  18563. // TypeGroup is a Type enum value
  18564. TypeGroup = "Group"
  18565. )