api.go 814 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package s3
  3. import (
  4. "bytes"
  5. "fmt"
  6. "io"
  7. "sync"
  8. "sync/atomic"
  9. "time"
  10. "github.com/aws/aws-sdk-go/aws"
  11. "github.com/aws/aws-sdk-go/aws/awserr"
  12. "github.com/aws/aws-sdk-go/aws/awsutil"
  13. "github.com/aws/aws-sdk-go/aws/client"
  14. "github.com/aws/aws-sdk-go/aws/request"
  15. "github.com/aws/aws-sdk-go/private/protocol"
  16. "github.com/aws/aws-sdk-go/private/protocol/eventstream"
  17. "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi"
  18. "github.com/aws/aws-sdk-go/private/protocol/rest"
  19. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  20. )
  21. const opAbortMultipartUpload = "AbortMultipartUpload"
  22. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  23. // client's request for the AbortMultipartUpload operation. The "output" return
  24. // value will be populated with the request's response once the request completes
  25. // successfully.
  26. //
  27. // Use "Send" method on the returned Request to send the API call to the service.
  28. // the "output" return value is not valid until after Send returns without error.
  29. //
  30. // See AbortMultipartUpload for more information on using the AbortMultipartUpload
  31. // API call, and error handling.
  32. //
  33. // This method is useful when you want to inject custom logic or configuration
  34. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  35. //
  36. //
  37. // // Example sending a request using the AbortMultipartUploadRequest method.
  38. // req, resp := client.AbortMultipartUploadRequest(params)
  39. //
  40. // err := req.Send()
  41. // if err == nil { // resp is now filled
  42. // fmt.Println(resp)
  43. // }
  44. //
  45. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  46. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  47. op := &request.Operation{
  48. Name: opAbortMultipartUpload,
  49. HTTPMethod: "DELETE",
  50. HTTPPath: "/{Bucket}/{Key+}",
  51. }
  52. if input == nil {
  53. input = &AbortMultipartUploadInput{}
  54. }
  55. output = &AbortMultipartUploadOutput{}
  56. req = c.newRequest(op, input, output)
  57. return
  58. }
  59. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  60. //
  61. // Aborts a multipart upload.
  62. //
  63. // To verify that all parts have been removed, so you don't get charged for
  64. // the part storage, you should call the List Parts operation and ensure the
  65. // parts list is empty.
  66. //
  67. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  68. // with awserr.Error's Code and Message methods to get detailed information about
  69. // the error.
  70. //
  71. // See the AWS API reference guide for Amazon Simple Storage Service's
  72. // API operation AbortMultipartUpload for usage and error information.
  73. //
  74. // Returned Error Codes:
  75. // * ErrCodeNoSuchUpload "NoSuchUpload"
  76. // The specified multipart upload does not exist.
  77. //
  78. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  79. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  80. req, out := c.AbortMultipartUploadRequest(input)
  81. return out, req.Send()
  82. }
  83. // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
  84. // the ability to pass a context and additional request options.
  85. //
  86. // See AbortMultipartUpload for details on how to use this API operation.
  87. //
  88. // The context must be non-nil and will be used for request cancellation. If
  89. // the context is nil a panic will occur. In the future the SDK may create
  90. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  91. // for more information on using Contexts.
  92. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
  93. req, out := c.AbortMultipartUploadRequest(input)
  94. req.SetContext(ctx)
  95. req.ApplyOptions(opts...)
  96. return out, req.Send()
  97. }
  98. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  99. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  100. // client's request for the CompleteMultipartUpload operation. The "output" return
  101. // value will be populated with the request's response once the request completes
  102. // successfully.
  103. //
  104. // Use "Send" method on the returned Request to send the API call to the service.
  105. // the "output" return value is not valid until after Send returns without error.
  106. //
  107. // See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
  108. // API call, and error handling.
  109. //
  110. // This method is useful when you want to inject custom logic or configuration
  111. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  112. //
  113. //
  114. // // Example sending a request using the CompleteMultipartUploadRequest method.
  115. // req, resp := client.CompleteMultipartUploadRequest(params)
  116. //
  117. // err := req.Send()
  118. // if err == nil { // resp is now filled
  119. // fmt.Println(resp)
  120. // }
  121. //
  122. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  123. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  124. op := &request.Operation{
  125. Name: opCompleteMultipartUpload,
  126. HTTPMethod: "POST",
  127. HTTPPath: "/{Bucket}/{Key+}",
  128. }
  129. if input == nil {
  130. input = &CompleteMultipartUploadInput{}
  131. }
  132. output = &CompleteMultipartUploadOutput{}
  133. req = c.newRequest(op, input, output)
  134. return
  135. }
  136. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  137. //
  138. // Completes a multipart upload by assembling previously uploaded parts.
  139. //
  140. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  141. // with awserr.Error's Code and Message methods to get detailed information about
  142. // the error.
  143. //
  144. // See the AWS API reference guide for Amazon Simple Storage Service's
  145. // API operation CompleteMultipartUpload for usage and error information.
  146. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  147. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  148. req, out := c.CompleteMultipartUploadRequest(input)
  149. return out, req.Send()
  150. }
  151. // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
  152. // the ability to pass a context and additional request options.
  153. //
  154. // See CompleteMultipartUpload for details on how to use this API operation.
  155. //
  156. // The context must be non-nil and will be used for request cancellation. If
  157. // the context is nil a panic will occur. In the future the SDK may create
  158. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  159. // for more information on using Contexts.
  160. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
  161. req, out := c.CompleteMultipartUploadRequest(input)
  162. req.SetContext(ctx)
  163. req.ApplyOptions(opts...)
  164. return out, req.Send()
  165. }
  166. const opCopyObject = "CopyObject"
  167. // CopyObjectRequest generates a "aws/request.Request" representing the
  168. // client's request for the CopyObject operation. The "output" return
  169. // value will be populated with the request's response once the request completes
  170. // successfully.
  171. //
  172. // Use "Send" method on the returned Request to send the API call to the service.
  173. // the "output" return value is not valid until after Send returns without error.
  174. //
  175. // See CopyObject for more information on using the CopyObject
  176. // API call, and error handling.
  177. //
  178. // This method is useful when you want to inject custom logic or configuration
  179. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  180. //
  181. //
  182. // // Example sending a request using the CopyObjectRequest method.
  183. // req, resp := client.CopyObjectRequest(params)
  184. //
  185. // err := req.Send()
  186. // if err == nil { // resp is now filled
  187. // fmt.Println(resp)
  188. // }
  189. //
  190. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  191. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  192. op := &request.Operation{
  193. Name: opCopyObject,
  194. HTTPMethod: "PUT",
  195. HTTPPath: "/{Bucket}/{Key+}",
  196. }
  197. if input == nil {
  198. input = &CopyObjectInput{}
  199. }
  200. output = &CopyObjectOutput{}
  201. req = c.newRequest(op, input, output)
  202. return
  203. }
  204. // CopyObject API operation for Amazon Simple Storage Service.
  205. //
  206. // Creates a copy of an object that is already stored in Amazon S3.
  207. //
  208. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  209. // with awserr.Error's Code and Message methods to get detailed information about
  210. // the error.
  211. //
  212. // See the AWS API reference guide for Amazon Simple Storage Service's
  213. // API operation CopyObject for usage and error information.
  214. //
  215. // Returned Error Codes:
  216. // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
  217. // The source object of the COPY operation is not in the active tier and is
  218. // only stored in Amazon Glacier.
  219. //
  220. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  221. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  222. req, out := c.CopyObjectRequest(input)
  223. return out, req.Send()
  224. }
  225. // CopyObjectWithContext is the same as CopyObject with the addition of
  226. // the ability to pass a context and additional request options.
  227. //
  228. // See CopyObject for details on how to use this API operation.
  229. //
  230. // The context must be non-nil and will be used for request cancellation. If
  231. // the context is nil a panic will occur. In the future the SDK may create
  232. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  233. // for more information on using Contexts.
  234. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
  235. req, out := c.CopyObjectRequest(input)
  236. req.SetContext(ctx)
  237. req.ApplyOptions(opts...)
  238. return out, req.Send()
  239. }
  240. const opCreateBucket = "CreateBucket"
  241. // CreateBucketRequest generates a "aws/request.Request" representing the
  242. // client's request for the CreateBucket operation. The "output" return
  243. // value will be populated with the request's response once the request completes
  244. // successfully.
  245. //
  246. // Use "Send" method on the returned Request to send the API call to the service.
  247. // the "output" return value is not valid until after Send returns without error.
  248. //
  249. // See CreateBucket for more information on using the CreateBucket
  250. // API call, and error handling.
  251. //
  252. // This method is useful when you want to inject custom logic or configuration
  253. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  254. //
  255. //
  256. // // Example sending a request using the CreateBucketRequest method.
  257. // req, resp := client.CreateBucketRequest(params)
  258. //
  259. // err := req.Send()
  260. // if err == nil { // resp is now filled
  261. // fmt.Println(resp)
  262. // }
  263. //
  264. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  265. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  266. op := &request.Operation{
  267. Name: opCreateBucket,
  268. HTTPMethod: "PUT",
  269. HTTPPath: "/{Bucket}",
  270. }
  271. if input == nil {
  272. input = &CreateBucketInput{}
  273. }
  274. output = &CreateBucketOutput{}
  275. req = c.newRequest(op, input, output)
  276. return
  277. }
  278. // CreateBucket API operation for Amazon Simple Storage Service.
  279. //
  280. // Creates a new bucket.
  281. //
  282. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  283. // with awserr.Error's Code and Message methods to get detailed information about
  284. // the error.
  285. //
  286. // See the AWS API reference guide for Amazon Simple Storage Service's
  287. // API operation CreateBucket for usage and error information.
  288. //
  289. // Returned Error Codes:
  290. // * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
  291. // The requested bucket name is not available. The bucket namespace is shared
  292. // by all users of the system. Please select a different name and try again.
  293. //
  294. // * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
  295. //
  296. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  297. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  298. req, out := c.CreateBucketRequest(input)
  299. return out, req.Send()
  300. }
  301. // CreateBucketWithContext is the same as CreateBucket with the addition of
  302. // the ability to pass a context and additional request options.
  303. //
  304. // See CreateBucket for details on how to use this API operation.
  305. //
  306. // The context must be non-nil and will be used for request cancellation. If
  307. // the context is nil a panic will occur. In the future the SDK may create
  308. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  309. // for more information on using Contexts.
  310. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
  311. req, out := c.CreateBucketRequest(input)
  312. req.SetContext(ctx)
  313. req.ApplyOptions(opts...)
  314. return out, req.Send()
  315. }
  316. const opCreateMultipartUpload = "CreateMultipartUpload"
  317. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  318. // client's request for the CreateMultipartUpload operation. The "output" return
  319. // value will be populated with the request's response once the request completes
  320. // successfully.
  321. //
  322. // Use "Send" method on the returned Request to send the API call to the service.
  323. // the "output" return value is not valid until after Send returns without error.
  324. //
  325. // See CreateMultipartUpload for more information on using the CreateMultipartUpload
  326. // API call, and error handling.
  327. //
  328. // This method is useful when you want to inject custom logic or configuration
  329. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  330. //
  331. //
  332. // // Example sending a request using the CreateMultipartUploadRequest method.
  333. // req, resp := client.CreateMultipartUploadRequest(params)
  334. //
  335. // err := req.Send()
  336. // if err == nil { // resp is now filled
  337. // fmt.Println(resp)
  338. // }
  339. //
  340. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  341. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  342. op := &request.Operation{
  343. Name: opCreateMultipartUpload,
  344. HTTPMethod: "POST",
  345. HTTPPath: "/{Bucket}/{Key+}?uploads",
  346. }
  347. if input == nil {
  348. input = &CreateMultipartUploadInput{}
  349. }
  350. output = &CreateMultipartUploadOutput{}
  351. req = c.newRequest(op, input, output)
  352. return
  353. }
  354. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  355. //
  356. // Initiates a multipart upload and returns an upload ID.
  357. //
  358. // Note: After you initiate multipart upload and upload one or more parts, you
  359. // must either complete or abort multipart upload in order to stop getting charged
  360. // for storage of the uploaded parts. Only after you either complete or abort
  361. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  362. // you for the parts storage.
  363. //
  364. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  365. // with awserr.Error's Code and Message methods to get detailed information about
  366. // the error.
  367. //
  368. // See the AWS API reference guide for Amazon Simple Storage Service's
  369. // API operation CreateMultipartUpload for usage and error information.
  370. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  371. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  372. req, out := c.CreateMultipartUploadRequest(input)
  373. return out, req.Send()
  374. }
  375. // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
  376. // the ability to pass a context and additional request options.
  377. //
  378. // See CreateMultipartUpload for details on how to use this API operation.
  379. //
  380. // The context must be non-nil and will be used for request cancellation. If
  381. // the context is nil a panic will occur. In the future the SDK may create
  382. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  383. // for more information on using Contexts.
  384. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
  385. req, out := c.CreateMultipartUploadRequest(input)
  386. req.SetContext(ctx)
  387. req.ApplyOptions(opts...)
  388. return out, req.Send()
  389. }
  390. const opDeleteBucket = "DeleteBucket"
  391. // DeleteBucketRequest generates a "aws/request.Request" representing the
  392. // client's request for the DeleteBucket operation. The "output" return
  393. // value will be populated with the request's response once the request completes
  394. // successfully.
  395. //
  396. // Use "Send" method on the returned Request to send the API call to the service.
  397. // the "output" return value is not valid until after Send returns without error.
  398. //
  399. // See DeleteBucket for more information on using the DeleteBucket
  400. // API call, and error handling.
  401. //
  402. // This method is useful when you want to inject custom logic or configuration
  403. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  404. //
  405. //
  406. // // Example sending a request using the DeleteBucketRequest method.
  407. // req, resp := client.DeleteBucketRequest(params)
  408. //
  409. // err := req.Send()
  410. // if err == nil { // resp is now filled
  411. // fmt.Println(resp)
  412. // }
  413. //
  414. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  415. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  416. op := &request.Operation{
  417. Name: opDeleteBucket,
  418. HTTPMethod: "DELETE",
  419. HTTPPath: "/{Bucket}",
  420. }
  421. if input == nil {
  422. input = &DeleteBucketInput{}
  423. }
  424. output = &DeleteBucketOutput{}
  425. req = c.newRequest(op, input, output)
  426. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  427. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  428. return
  429. }
  430. // DeleteBucket API operation for Amazon Simple Storage Service.
  431. //
  432. // Deletes the bucket. All objects (including all object versions and Delete
  433. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  434. //
  435. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  436. // with awserr.Error's Code and Message methods to get detailed information about
  437. // the error.
  438. //
  439. // See the AWS API reference guide for Amazon Simple Storage Service's
  440. // API operation DeleteBucket for usage and error information.
  441. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  442. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  443. req, out := c.DeleteBucketRequest(input)
  444. return out, req.Send()
  445. }
  446. // DeleteBucketWithContext is the same as DeleteBucket with the addition of
  447. // the ability to pass a context and additional request options.
  448. //
  449. // See DeleteBucket for details on how to use this API operation.
  450. //
  451. // The context must be non-nil and will be used for request cancellation. If
  452. // the context is nil a panic will occur. In the future the SDK may create
  453. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  454. // for more information on using Contexts.
  455. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
  456. req, out := c.DeleteBucketRequest(input)
  457. req.SetContext(ctx)
  458. req.ApplyOptions(opts...)
  459. return out, req.Send()
  460. }
  461. const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
  462. // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  463. // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
  464. // value will be populated with the request's response once the request completes
  465. // successfully.
  466. //
  467. // Use "Send" method on the returned Request to send the API call to the service.
  468. // the "output" return value is not valid until after Send returns without error.
  469. //
  470. // See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
  471. // API call, and error handling.
  472. //
  473. // This method is useful when you want to inject custom logic or configuration
  474. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  475. //
  476. //
  477. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  478. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  479. //
  480. // err := req.Send()
  481. // if err == nil { // resp is now filled
  482. // fmt.Println(resp)
  483. // }
  484. //
  485. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  486. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  487. op := &request.Operation{
  488. Name: opDeleteBucketAnalyticsConfiguration,
  489. HTTPMethod: "DELETE",
  490. HTTPPath: "/{Bucket}?analytics",
  491. }
  492. if input == nil {
  493. input = &DeleteBucketAnalyticsConfigurationInput{}
  494. }
  495. output = &DeleteBucketAnalyticsConfigurationOutput{}
  496. req = c.newRequest(op, input, output)
  497. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  498. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  499. return
  500. }
  501. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  502. //
  503. // Deletes an analytics configuration for the bucket (specified by the analytics
  504. // configuration ID).
  505. //
  506. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  507. // with awserr.Error's Code and Message methods to get detailed information about
  508. // the error.
  509. //
  510. // See the AWS API reference guide for Amazon Simple Storage Service's
  511. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  512. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  513. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  514. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  515. return out, req.Send()
  516. }
  517. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  518. // the ability to pass a context and additional request options.
  519. //
  520. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  521. //
  522. // The context must be non-nil and will be used for request cancellation. If
  523. // the context is nil a panic will occur. In the future the SDK may create
  524. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  525. // for more information on using Contexts.
  526. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  527. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  528. req.SetContext(ctx)
  529. req.ApplyOptions(opts...)
  530. return out, req.Send()
  531. }
  532. const opDeleteBucketCors = "DeleteBucketCors"
  533. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  534. // client's request for the DeleteBucketCors operation. The "output" return
  535. // value will be populated with the request's response once the request completes
  536. // successfully.
  537. //
  538. // Use "Send" method on the returned Request to send the API call to the service.
  539. // the "output" return value is not valid until after Send returns without error.
  540. //
  541. // See DeleteBucketCors for more information on using the DeleteBucketCors
  542. // API call, and error handling.
  543. //
  544. // This method is useful when you want to inject custom logic or configuration
  545. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  546. //
  547. //
  548. // // Example sending a request using the DeleteBucketCorsRequest method.
  549. // req, resp := client.DeleteBucketCorsRequest(params)
  550. //
  551. // err := req.Send()
  552. // if err == nil { // resp is now filled
  553. // fmt.Println(resp)
  554. // }
  555. //
  556. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  557. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  558. op := &request.Operation{
  559. Name: opDeleteBucketCors,
  560. HTTPMethod: "DELETE",
  561. HTTPPath: "/{Bucket}?cors",
  562. }
  563. if input == nil {
  564. input = &DeleteBucketCorsInput{}
  565. }
  566. output = &DeleteBucketCorsOutput{}
  567. req = c.newRequest(op, input, output)
  568. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  569. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  570. return
  571. }
  572. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  573. //
  574. // Deletes the CORS configuration information set for the bucket.
  575. //
  576. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  577. // with awserr.Error's Code and Message methods to get detailed information about
  578. // the error.
  579. //
  580. // See the AWS API reference guide for Amazon Simple Storage Service's
  581. // API operation DeleteBucketCors for usage and error information.
  582. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  583. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  584. req, out := c.DeleteBucketCorsRequest(input)
  585. return out, req.Send()
  586. }
  587. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  588. // the ability to pass a context and additional request options.
  589. //
  590. // See DeleteBucketCors for details on how to use this API operation.
  591. //
  592. // The context must be non-nil and will be used for request cancellation. If
  593. // the context is nil a panic will occur. In the future the SDK may create
  594. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  595. // for more information on using Contexts.
  596. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  597. req, out := c.DeleteBucketCorsRequest(input)
  598. req.SetContext(ctx)
  599. req.ApplyOptions(opts...)
  600. return out, req.Send()
  601. }
  602. const opDeleteBucketEncryption = "DeleteBucketEncryption"
  603. // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
  604. // client's request for the DeleteBucketEncryption operation. The "output" return
  605. // value will be populated with the request's response once the request completes
  606. // successfully.
  607. //
  608. // Use "Send" method on the returned Request to send the API call to the service.
  609. // the "output" return value is not valid until after Send returns without error.
  610. //
  611. // See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
  612. // API call, and error handling.
  613. //
  614. // This method is useful when you want to inject custom logic or configuration
  615. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  616. //
  617. //
  618. // // Example sending a request using the DeleteBucketEncryptionRequest method.
  619. // req, resp := client.DeleteBucketEncryptionRequest(params)
  620. //
  621. // err := req.Send()
  622. // if err == nil { // resp is now filled
  623. // fmt.Println(resp)
  624. // }
  625. //
  626. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  627. func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
  628. op := &request.Operation{
  629. Name: opDeleteBucketEncryption,
  630. HTTPMethod: "DELETE",
  631. HTTPPath: "/{Bucket}?encryption",
  632. }
  633. if input == nil {
  634. input = &DeleteBucketEncryptionInput{}
  635. }
  636. output = &DeleteBucketEncryptionOutput{}
  637. req = c.newRequest(op, input, output)
  638. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  639. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  640. return
  641. }
  642. // DeleteBucketEncryption API operation for Amazon Simple Storage Service.
  643. //
  644. // Deletes the server-side encryption configuration from the bucket.
  645. //
  646. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  647. // with awserr.Error's Code and Message methods to get detailed information about
  648. // the error.
  649. //
  650. // See the AWS API reference guide for Amazon Simple Storage Service's
  651. // API operation DeleteBucketEncryption for usage and error information.
  652. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  653. func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
  654. req, out := c.DeleteBucketEncryptionRequest(input)
  655. return out, req.Send()
  656. }
  657. // DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
  658. // the ability to pass a context and additional request options.
  659. //
  660. // See DeleteBucketEncryption for details on how to use this API operation.
  661. //
  662. // The context must be non-nil and will be used for request cancellation. If
  663. // the context is nil a panic will occur. In the future the SDK may create
  664. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  665. // for more information on using Contexts.
  666. func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
  667. req, out := c.DeleteBucketEncryptionRequest(input)
  668. req.SetContext(ctx)
  669. req.ApplyOptions(opts...)
  670. return out, req.Send()
  671. }
  672. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  673. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  674. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  675. // value will be populated with the request's response once the request completes
  676. // successfully.
  677. //
  678. // Use "Send" method on the returned Request to send the API call to the service.
  679. // the "output" return value is not valid until after Send returns without error.
  680. //
  681. // See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
  682. // API call, and error handling.
  683. //
  684. // This method is useful when you want to inject custom logic or configuration
  685. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  686. //
  687. //
  688. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  689. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  690. //
  691. // err := req.Send()
  692. // if err == nil { // resp is now filled
  693. // fmt.Println(resp)
  694. // }
  695. //
  696. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  697. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  698. op := &request.Operation{
  699. Name: opDeleteBucketInventoryConfiguration,
  700. HTTPMethod: "DELETE",
  701. HTTPPath: "/{Bucket}?inventory",
  702. }
  703. if input == nil {
  704. input = &DeleteBucketInventoryConfigurationInput{}
  705. }
  706. output = &DeleteBucketInventoryConfigurationOutput{}
  707. req = c.newRequest(op, input, output)
  708. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  709. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  710. return
  711. }
  712. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  713. //
  714. // Deletes an inventory configuration (identified by the inventory ID) from
  715. // the bucket.
  716. //
  717. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  718. // with awserr.Error's Code and Message methods to get detailed information about
  719. // the error.
  720. //
  721. // See the AWS API reference guide for Amazon Simple Storage Service's
  722. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  723. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  724. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  725. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  726. return out, req.Send()
  727. }
  728. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  729. // the ability to pass a context and additional request options.
  730. //
  731. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  732. //
  733. // The context must be non-nil and will be used for request cancellation. If
  734. // the context is nil a panic will occur. In the future the SDK may create
  735. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  736. // for more information on using Contexts.
  737. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  738. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  739. req.SetContext(ctx)
  740. req.ApplyOptions(opts...)
  741. return out, req.Send()
  742. }
  743. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  744. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  745. // client's request for the DeleteBucketLifecycle operation. The "output" return
  746. // value will be populated with the request's response once the request completes
  747. // successfully.
  748. //
  749. // Use "Send" method on the returned Request to send the API call to the service.
  750. // the "output" return value is not valid until after Send returns without error.
  751. //
  752. // See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
  753. // API call, and error handling.
  754. //
  755. // This method is useful when you want to inject custom logic or configuration
  756. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  757. //
  758. //
  759. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  760. // req, resp := client.DeleteBucketLifecycleRequest(params)
  761. //
  762. // err := req.Send()
  763. // if err == nil { // resp is now filled
  764. // fmt.Println(resp)
  765. // }
  766. //
  767. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  768. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  769. op := &request.Operation{
  770. Name: opDeleteBucketLifecycle,
  771. HTTPMethod: "DELETE",
  772. HTTPPath: "/{Bucket}?lifecycle",
  773. }
  774. if input == nil {
  775. input = &DeleteBucketLifecycleInput{}
  776. }
  777. output = &DeleteBucketLifecycleOutput{}
  778. req = c.newRequest(op, input, output)
  779. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  780. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  781. return
  782. }
  783. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  784. //
  785. // Deletes the lifecycle configuration from the bucket.
  786. //
  787. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  788. // with awserr.Error's Code and Message methods to get detailed information about
  789. // the error.
  790. //
  791. // See the AWS API reference guide for Amazon Simple Storage Service's
  792. // API operation DeleteBucketLifecycle for usage and error information.
  793. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  794. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  795. req, out := c.DeleteBucketLifecycleRequest(input)
  796. return out, req.Send()
  797. }
  798. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  799. // the ability to pass a context and additional request options.
  800. //
  801. // See DeleteBucketLifecycle for details on how to use this API operation.
  802. //
  803. // The context must be non-nil and will be used for request cancellation. If
  804. // the context is nil a panic will occur. In the future the SDK may create
  805. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  806. // for more information on using Contexts.
  807. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  808. req, out := c.DeleteBucketLifecycleRequest(input)
  809. req.SetContext(ctx)
  810. req.ApplyOptions(opts...)
  811. return out, req.Send()
  812. }
  813. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  814. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  815. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  816. // value will be populated with the request's response once the request completes
  817. // successfully.
  818. //
  819. // Use "Send" method on the returned Request to send the API call to the service.
  820. // the "output" return value is not valid until after Send returns without error.
  821. //
  822. // See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
  823. // API call, and error handling.
  824. //
  825. // This method is useful when you want to inject custom logic or configuration
  826. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  827. //
  828. //
  829. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  830. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  831. //
  832. // err := req.Send()
  833. // if err == nil { // resp is now filled
  834. // fmt.Println(resp)
  835. // }
  836. //
  837. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  838. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  839. op := &request.Operation{
  840. Name: opDeleteBucketMetricsConfiguration,
  841. HTTPMethod: "DELETE",
  842. HTTPPath: "/{Bucket}?metrics",
  843. }
  844. if input == nil {
  845. input = &DeleteBucketMetricsConfigurationInput{}
  846. }
  847. output = &DeleteBucketMetricsConfigurationOutput{}
  848. req = c.newRequest(op, input, output)
  849. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  850. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  851. return
  852. }
  853. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  854. //
  855. // Deletes a metrics configuration (specified by the metrics configuration ID)
  856. // from the bucket.
  857. //
  858. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  859. // with awserr.Error's Code and Message methods to get detailed information about
  860. // the error.
  861. //
  862. // See the AWS API reference guide for Amazon Simple Storage Service's
  863. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  864. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  865. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  866. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  867. return out, req.Send()
  868. }
  869. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  870. // the ability to pass a context and additional request options.
  871. //
  872. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  873. //
  874. // The context must be non-nil and will be used for request cancellation. If
  875. // the context is nil a panic will occur. In the future the SDK may create
  876. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  877. // for more information on using Contexts.
  878. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  879. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  880. req.SetContext(ctx)
  881. req.ApplyOptions(opts...)
  882. return out, req.Send()
  883. }
  884. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  885. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  886. // client's request for the DeleteBucketPolicy operation. The "output" return
  887. // value will be populated with the request's response once the request completes
  888. // successfully.
  889. //
  890. // Use "Send" method on the returned Request to send the API call to the service.
  891. // the "output" return value is not valid until after Send returns without error.
  892. //
  893. // See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
  894. // API call, and error handling.
  895. //
  896. // This method is useful when you want to inject custom logic or configuration
  897. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  898. //
  899. //
  900. // // Example sending a request using the DeleteBucketPolicyRequest method.
  901. // req, resp := client.DeleteBucketPolicyRequest(params)
  902. //
  903. // err := req.Send()
  904. // if err == nil { // resp is now filled
  905. // fmt.Println(resp)
  906. // }
  907. //
  908. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  909. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  910. op := &request.Operation{
  911. Name: opDeleteBucketPolicy,
  912. HTTPMethod: "DELETE",
  913. HTTPPath: "/{Bucket}?policy",
  914. }
  915. if input == nil {
  916. input = &DeleteBucketPolicyInput{}
  917. }
  918. output = &DeleteBucketPolicyOutput{}
  919. req = c.newRequest(op, input, output)
  920. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  921. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  922. return
  923. }
  924. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  925. //
  926. // Deletes the policy from the bucket.
  927. //
  928. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  929. // with awserr.Error's Code and Message methods to get detailed information about
  930. // the error.
  931. //
  932. // See the AWS API reference guide for Amazon Simple Storage Service's
  933. // API operation DeleteBucketPolicy for usage and error information.
  934. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  935. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  936. req, out := c.DeleteBucketPolicyRequest(input)
  937. return out, req.Send()
  938. }
  939. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  940. // the ability to pass a context and additional request options.
  941. //
  942. // See DeleteBucketPolicy for details on how to use this API operation.
  943. //
  944. // The context must be non-nil and will be used for request cancellation. If
  945. // the context is nil a panic will occur. In the future the SDK may create
  946. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  947. // for more information on using Contexts.
  948. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  949. req, out := c.DeleteBucketPolicyRequest(input)
  950. req.SetContext(ctx)
  951. req.ApplyOptions(opts...)
  952. return out, req.Send()
  953. }
  954. const opDeleteBucketReplication = "DeleteBucketReplication"
  955. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  956. // client's request for the DeleteBucketReplication operation. The "output" return
  957. // value will be populated with the request's response once the request completes
  958. // successfully.
  959. //
  960. // Use "Send" method on the returned Request to send the API call to the service.
  961. // the "output" return value is not valid until after Send returns without error.
  962. //
  963. // See DeleteBucketReplication for more information on using the DeleteBucketReplication
  964. // API call, and error handling.
  965. //
  966. // This method is useful when you want to inject custom logic or configuration
  967. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  968. //
  969. //
  970. // // Example sending a request using the DeleteBucketReplicationRequest method.
  971. // req, resp := client.DeleteBucketReplicationRequest(params)
  972. //
  973. // err := req.Send()
  974. // if err == nil { // resp is now filled
  975. // fmt.Println(resp)
  976. // }
  977. //
  978. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  979. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  980. op := &request.Operation{
  981. Name: opDeleteBucketReplication,
  982. HTTPMethod: "DELETE",
  983. HTTPPath: "/{Bucket}?replication",
  984. }
  985. if input == nil {
  986. input = &DeleteBucketReplicationInput{}
  987. }
  988. output = &DeleteBucketReplicationOutput{}
  989. req = c.newRequest(op, input, output)
  990. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  991. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  992. return
  993. }
  994. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  995. //
  996. // Deletes the replication configuration from the bucket. For information about
  997. // replication configuration, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  998. // in the Amazon S3 Developer Guide.
  999. //
  1000. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1001. // with awserr.Error's Code and Message methods to get detailed information about
  1002. // the error.
  1003. //
  1004. // See the AWS API reference guide for Amazon Simple Storage Service's
  1005. // API operation DeleteBucketReplication for usage and error information.
  1006. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  1007. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  1008. req, out := c.DeleteBucketReplicationRequest(input)
  1009. return out, req.Send()
  1010. }
  1011. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  1012. // the ability to pass a context and additional request options.
  1013. //
  1014. // See DeleteBucketReplication for details on how to use this API operation.
  1015. //
  1016. // The context must be non-nil and will be used for request cancellation. If
  1017. // the context is nil a panic will occur. In the future the SDK may create
  1018. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1019. // for more information on using Contexts.
  1020. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  1021. req, out := c.DeleteBucketReplicationRequest(input)
  1022. req.SetContext(ctx)
  1023. req.ApplyOptions(opts...)
  1024. return out, req.Send()
  1025. }
  1026. const opDeleteBucketTagging = "DeleteBucketTagging"
  1027. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  1028. // client's request for the DeleteBucketTagging operation. The "output" return
  1029. // value will be populated with the request's response once the request completes
  1030. // successfully.
  1031. //
  1032. // Use "Send" method on the returned Request to send the API call to the service.
  1033. // the "output" return value is not valid until after Send returns without error.
  1034. //
  1035. // See DeleteBucketTagging for more information on using the DeleteBucketTagging
  1036. // API call, and error handling.
  1037. //
  1038. // This method is useful when you want to inject custom logic or configuration
  1039. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1040. //
  1041. //
  1042. // // Example sending a request using the DeleteBucketTaggingRequest method.
  1043. // req, resp := client.DeleteBucketTaggingRequest(params)
  1044. //
  1045. // err := req.Send()
  1046. // if err == nil { // resp is now filled
  1047. // fmt.Println(resp)
  1048. // }
  1049. //
  1050. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1051. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  1052. op := &request.Operation{
  1053. Name: opDeleteBucketTagging,
  1054. HTTPMethod: "DELETE",
  1055. HTTPPath: "/{Bucket}?tagging",
  1056. }
  1057. if input == nil {
  1058. input = &DeleteBucketTaggingInput{}
  1059. }
  1060. output = &DeleteBucketTaggingOutput{}
  1061. req = c.newRequest(op, input, output)
  1062. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1063. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1064. return
  1065. }
  1066. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1067. //
  1068. // Deletes the tags from the bucket.
  1069. //
  1070. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1071. // with awserr.Error's Code and Message methods to get detailed information about
  1072. // the error.
  1073. //
  1074. // See the AWS API reference guide for Amazon Simple Storage Service's
  1075. // API operation DeleteBucketTagging for usage and error information.
  1076. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1077. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1078. req, out := c.DeleteBucketTaggingRequest(input)
  1079. return out, req.Send()
  1080. }
  1081. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1082. // the ability to pass a context and additional request options.
  1083. //
  1084. // See DeleteBucketTagging for details on how to use this API operation.
  1085. //
  1086. // The context must be non-nil and will be used for request cancellation. If
  1087. // the context is nil a panic will occur. In the future the SDK may create
  1088. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1089. // for more information on using Contexts.
  1090. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1091. req, out := c.DeleteBucketTaggingRequest(input)
  1092. req.SetContext(ctx)
  1093. req.ApplyOptions(opts...)
  1094. return out, req.Send()
  1095. }
  1096. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1097. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1098. // client's request for the DeleteBucketWebsite operation. The "output" return
  1099. // value will be populated with the request's response once the request completes
  1100. // successfully.
  1101. //
  1102. // Use "Send" method on the returned Request to send the API call to the service.
  1103. // the "output" return value is not valid until after Send returns without error.
  1104. //
  1105. // See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
  1106. // API call, and error handling.
  1107. //
  1108. // This method is useful when you want to inject custom logic or configuration
  1109. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1110. //
  1111. //
  1112. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1113. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1114. //
  1115. // err := req.Send()
  1116. // if err == nil { // resp is now filled
  1117. // fmt.Println(resp)
  1118. // }
  1119. //
  1120. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1121. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1122. op := &request.Operation{
  1123. Name: opDeleteBucketWebsite,
  1124. HTTPMethod: "DELETE",
  1125. HTTPPath: "/{Bucket}?website",
  1126. }
  1127. if input == nil {
  1128. input = &DeleteBucketWebsiteInput{}
  1129. }
  1130. output = &DeleteBucketWebsiteOutput{}
  1131. req = c.newRequest(op, input, output)
  1132. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1133. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1134. return
  1135. }
  1136. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1137. //
  1138. // This operation removes the website configuration from the bucket.
  1139. //
  1140. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1141. // with awserr.Error's Code and Message methods to get detailed information about
  1142. // the error.
  1143. //
  1144. // See the AWS API reference guide for Amazon Simple Storage Service's
  1145. // API operation DeleteBucketWebsite for usage and error information.
  1146. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1147. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1148. req, out := c.DeleteBucketWebsiteRequest(input)
  1149. return out, req.Send()
  1150. }
  1151. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1152. // the ability to pass a context and additional request options.
  1153. //
  1154. // See DeleteBucketWebsite for details on how to use this API operation.
  1155. //
  1156. // The context must be non-nil and will be used for request cancellation. If
  1157. // the context is nil a panic will occur. In the future the SDK may create
  1158. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1159. // for more information on using Contexts.
  1160. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1161. req, out := c.DeleteBucketWebsiteRequest(input)
  1162. req.SetContext(ctx)
  1163. req.ApplyOptions(opts...)
  1164. return out, req.Send()
  1165. }
  1166. const opDeleteObject = "DeleteObject"
  1167. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1168. // client's request for the DeleteObject operation. The "output" return
  1169. // value will be populated with the request's response once the request completes
  1170. // successfully.
  1171. //
  1172. // Use "Send" method on the returned Request to send the API call to the service.
  1173. // the "output" return value is not valid until after Send returns without error.
  1174. //
  1175. // See DeleteObject for more information on using the DeleteObject
  1176. // API call, and error handling.
  1177. //
  1178. // This method is useful when you want to inject custom logic or configuration
  1179. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1180. //
  1181. //
  1182. // // Example sending a request using the DeleteObjectRequest method.
  1183. // req, resp := client.DeleteObjectRequest(params)
  1184. //
  1185. // err := req.Send()
  1186. // if err == nil { // resp is now filled
  1187. // fmt.Println(resp)
  1188. // }
  1189. //
  1190. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1191. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  1192. op := &request.Operation{
  1193. Name: opDeleteObject,
  1194. HTTPMethod: "DELETE",
  1195. HTTPPath: "/{Bucket}/{Key+}",
  1196. }
  1197. if input == nil {
  1198. input = &DeleteObjectInput{}
  1199. }
  1200. output = &DeleteObjectOutput{}
  1201. req = c.newRequest(op, input, output)
  1202. return
  1203. }
  1204. // DeleteObject API operation for Amazon Simple Storage Service.
  1205. //
  1206. // Removes the null version (if there is one) of an object and inserts a delete
  1207. // marker, which becomes the latest version of the object. If there isn't a
  1208. // null version, Amazon S3 does not remove any objects.
  1209. //
  1210. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1211. // with awserr.Error's Code and Message methods to get detailed information about
  1212. // the error.
  1213. //
  1214. // See the AWS API reference guide for Amazon Simple Storage Service's
  1215. // API operation DeleteObject for usage and error information.
  1216. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1217. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  1218. req, out := c.DeleteObjectRequest(input)
  1219. return out, req.Send()
  1220. }
  1221. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  1222. // the ability to pass a context and additional request options.
  1223. //
  1224. // See DeleteObject for details on how to use this API operation.
  1225. //
  1226. // The context must be non-nil and will be used for request cancellation. If
  1227. // the context is nil a panic will occur. In the future the SDK may create
  1228. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1229. // for more information on using Contexts.
  1230. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  1231. req, out := c.DeleteObjectRequest(input)
  1232. req.SetContext(ctx)
  1233. req.ApplyOptions(opts...)
  1234. return out, req.Send()
  1235. }
  1236. const opDeleteObjectTagging = "DeleteObjectTagging"
  1237. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  1238. // client's request for the DeleteObjectTagging operation. The "output" return
  1239. // value will be populated with the request's response once the request completes
  1240. // successfully.
  1241. //
  1242. // Use "Send" method on the returned Request to send the API call to the service.
  1243. // the "output" return value is not valid until after Send returns without error.
  1244. //
  1245. // See DeleteObjectTagging for more information on using the DeleteObjectTagging
  1246. // API call, and error handling.
  1247. //
  1248. // This method is useful when you want to inject custom logic or configuration
  1249. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1250. //
  1251. //
  1252. // // Example sending a request using the DeleteObjectTaggingRequest method.
  1253. // req, resp := client.DeleteObjectTaggingRequest(params)
  1254. //
  1255. // err := req.Send()
  1256. // if err == nil { // resp is now filled
  1257. // fmt.Println(resp)
  1258. // }
  1259. //
  1260. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1261. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  1262. op := &request.Operation{
  1263. Name: opDeleteObjectTagging,
  1264. HTTPMethod: "DELETE",
  1265. HTTPPath: "/{Bucket}/{Key+}?tagging",
  1266. }
  1267. if input == nil {
  1268. input = &DeleteObjectTaggingInput{}
  1269. }
  1270. output = &DeleteObjectTaggingOutput{}
  1271. req = c.newRequest(op, input, output)
  1272. return
  1273. }
  1274. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  1275. //
  1276. // Removes the tag-set from an existing object.
  1277. //
  1278. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1279. // with awserr.Error's Code and Message methods to get detailed information about
  1280. // the error.
  1281. //
  1282. // See the AWS API reference guide for Amazon Simple Storage Service's
  1283. // API operation DeleteObjectTagging for usage and error information.
  1284. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1285. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  1286. req, out := c.DeleteObjectTaggingRequest(input)
  1287. return out, req.Send()
  1288. }
  1289. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  1290. // the ability to pass a context and additional request options.
  1291. //
  1292. // See DeleteObjectTagging for details on how to use this API operation.
  1293. //
  1294. // The context must be non-nil and will be used for request cancellation. If
  1295. // the context is nil a panic will occur. In the future the SDK may create
  1296. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1297. // for more information on using Contexts.
  1298. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  1299. req, out := c.DeleteObjectTaggingRequest(input)
  1300. req.SetContext(ctx)
  1301. req.ApplyOptions(opts...)
  1302. return out, req.Send()
  1303. }
  1304. const opDeleteObjects = "DeleteObjects"
  1305. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  1306. // client's request for the DeleteObjects operation. The "output" return
  1307. // value will be populated with the request's response once the request completes
  1308. // successfully.
  1309. //
  1310. // Use "Send" method on the returned Request to send the API call to the service.
  1311. // the "output" return value is not valid until after Send returns without error.
  1312. //
  1313. // See DeleteObjects for more information on using the DeleteObjects
  1314. // API call, and error handling.
  1315. //
  1316. // This method is useful when you want to inject custom logic or configuration
  1317. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1318. //
  1319. //
  1320. // // Example sending a request using the DeleteObjectsRequest method.
  1321. // req, resp := client.DeleteObjectsRequest(params)
  1322. //
  1323. // err := req.Send()
  1324. // if err == nil { // resp is now filled
  1325. // fmt.Println(resp)
  1326. // }
  1327. //
  1328. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1329. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  1330. op := &request.Operation{
  1331. Name: opDeleteObjects,
  1332. HTTPMethod: "POST",
  1333. HTTPPath: "/{Bucket}?delete",
  1334. }
  1335. if input == nil {
  1336. input = &DeleteObjectsInput{}
  1337. }
  1338. output = &DeleteObjectsOutput{}
  1339. req = c.newRequest(op, input, output)
  1340. return
  1341. }
  1342. // DeleteObjects API operation for Amazon Simple Storage Service.
  1343. //
  1344. // This operation enables you to delete multiple objects from a bucket using
  1345. // a single HTTP request. You may specify up to 1000 keys.
  1346. //
  1347. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1348. // with awserr.Error's Code and Message methods to get detailed information about
  1349. // the error.
  1350. //
  1351. // See the AWS API reference guide for Amazon Simple Storage Service's
  1352. // API operation DeleteObjects for usage and error information.
  1353. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1354. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  1355. req, out := c.DeleteObjectsRequest(input)
  1356. return out, req.Send()
  1357. }
  1358. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  1359. // the ability to pass a context and additional request options.
  1360. //
  1361. // See DeleteObjects for details on how to use this API operation.
  1362. //
  1363. // The context must be non-nil and will be used for request cancellation. If
  1364. // the context is nil a panic will occur. In the future the SDK may create
  1365. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1366. // for more information on using Contexts.
  1367. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  1368. req, out := c.DeleteObjectsRequest(input)
  1369. req.SetContext(ctx)
  1370. req.ApplyOptions(opts...)
  1371. return out, req.Send()
  1372. }
  1373. const opDeletePublicAccessBlock = "DeletePublicAccessBlock"
  1374. // DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the
  1375. // client's request for the DeletePublicAccessBlock operation. The "output" return
  1376. // value will be populated with the request's response once the request completes
  1377. // successfully.
  1378. //
  1379. // Use "Send" method on the returned Request to send the API call to the service.
  1380. // the "output" return value is not valid until after Send returns without error.
  1381. //
  1382. // See DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock
  1383. // API call, and error handling.
  1384. //
  1385. // This method is useful when you want to inject custom logic or configuration
  1386. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1387. //
  1388. //
  1389. // // Example sending a request using the DeletePublicAccessBlockRequest method.
  1390. // req, resp := client.DeletePublicAccessBlockRequest(params)
  1391. //
  1392. // err := req.Send()
  1393. // if err == nil { // resp is now filled
  1394. // fmt.Println(resp)
  1395. // }
  1396. //
  1397. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
  1398. func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) {
  1399. op := &request.Operation{
  1400. Name: opDeletePublicAccessBlock,
  1401. HTTPMethod: "DELETE",
  1402. HTTPPath: "/{Bucket}?publicAccessBlock",
  1403. }
  1404. if input == nil {
  1405. input = &DeletePublicAccessBlockInput{}
  1406. }
  1407. output = &DeletePublicAccessBlockOutput{}
  1408. req = c.newRequest(op, input, output)
  1409. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1410. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1411. return
  1412. }
  1413. // DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
  1414. //
  1415. // Removes the PublicAccessBlock configuration from an Amazon S3 bucket.
  1416. //
  1417. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1418. // with awserr.Error's Code and Message methods to get detailed information about
  1419. // the error.
  1420. //
  1421. // See the AWS API reference guide for Amazon Simple Storage Service's
  1422. // API operation DeletePublicAccessBlock for usage and error information.
  1423. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
  1424. func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) {
  1425. req, out := c.DeletePublicAccessBlockRequest(input)
  1426. return out, req.Send()
  1427. }
  1428. // DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of
  1429. // the ability to pass a context and additional request options.
  1430. //
  1431. // See DeletePublicAccessBlock for details on how to use this API operation.
  1432. //
  1433. // The context must be non-nil and will be used for request cancellation. If
  1434. // the context is nil a panic will occur. In the future the SDK may create
  1435. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1436. // for more information on using Contexts.
  1437. func (c *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) {
  1438. req, out := c.DeletePublicAccessBlockRequest(input)
  1439. req.SetContext(ctx)
  1440. req.ApplyOptions(opts...)
  1441. return out, req.Send()
  1442. }
  1443. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  1444. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  1445. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  1446. // value will be populated with the request's response once the request completes
  1447. // successfully.
  1448. //
  1449. // Use "Send" method on the returned Request to send the API call to the service.
  1450. // the "output" return value is not valid until after Send returns without error.
  1451. //
  1452. // See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
  1453. // API call, and error handling.
  1454. //
  1455. // This method is useful when you want to inject custom logic or configuration
  1456. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1457. //
  1458. //
  1459. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  1460. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  1461. //
  1462. // err := req.Send()
  1463. // if err == nil { // resp is now filled
  1464. // fmt.Println(resp)
  1465. // }
  1466. //
  1467. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1468. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  1469. op := &request.Operation{
  1470. Name: opGetBucketAccelerateConfiguration,
  1471. HTTPMethod: "GET",
  1472. HTTPPath: "/{Bucket}?accelerate",
  1473. }
  1474. if input == nil {
  1475. input = &GetBucketAccelerateConfigurationInput{}
  1476. }
  1477. output = &GetBucketAccelerateConfigurationOutput{}
  1478. req = c.newRequest(op, input, output)
  1479. return
  1480. }
  1481. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  1482. //
  1483. // Returns the accelerate configuration of a bucket.
  1484. //
  1485. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1486. // with awserr.Error's Code and Message methods to get detailed information about
  1487. // the error.
  1488. //
  1489. // See the AWS API reference guide for Amazon Simple Storage Service's
  1490. // API operation GetBucketAccelerateConfiguration for usage and error information.
  1491. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1492. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  1493. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1494. return out, req.Send()
  1495. }
  1496. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  1497. // the ability to pass a context and additional request options.
  1498. //
  1499. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  1500. //
  1501. // The context must be non-nil and will be used for request cancellation. If
  1502. // the context is nil a panic will occur. In the future the SDK may create
  1503. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1504. // for more information on using Contexts.
  1505. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  1506. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1507. req.SetContext(ctx)
  1508. req.ApplyOptions(opts...)
  1509. return out, req.Send()
  1510. }
  1511. const opGetBucketAcl = "GetBucketAcl"
  1512. // GetBucketAclRequest generates a "aws/request.Request" representing the
  1513. // client's request for the GetBucketAcl operation. The "output" return
  1514. // value will be populated with the request's response once the request completes
  1515. // successfully.
  1516. //
  1517. // Use "Send" method on the returned Request to send the API call to the service.
  1518. // the "output" return value is not valid until after Send returns without error.
  1519. //
  1520. // See GetBucketAcl for more information on using the GetBucketAcl
  1521. // API call, and error handling.
  1522. //
  1523. // This method is useful when you want to inject custom logic or configuration
  1524. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1525. //
  1526. //
  1527. // // Example sending a request using the GetBucketAclRequest method.
  1528. // req, resp := client.GetBucketAclRequest(params)
  1529. //
  1530. // err := req.Send()
  1531. // if err == nil { // resp is now filled
  1532. // fmt.Println(resp)
  1533. // }
  1534. //
  1535. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1536. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  1537. op := &request.Operation{
  1538. Name: opGetBucketAcl,
  1539. HTTPMethod: "GET",
  1540. HTTPPath: "/{Bucket}?acl",
  1541. }
  1542. if input == nil {
  1543. input = &GetBucketAclInput{}
  1544. }
  1545. output = &GetBucketAclOutput{}
  1546. req = c.newRequest(op, input, output)
  1547. return
  1548. }
  1549. // GetBucketAcl API operation for Amazon Simple Storage Service.
  1550. //
  1551. // Gets the access control policy for the bucket.
  1552. //
  1553. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1554. // with awserr.Error's Code and Message methods to get detailed information about
  1555. // the error.
  1556. //
  1557. // See the AWS API reference guide for Amazon Simple Storage Service's
  1558. // API operation GetBucketAcl for usage and error information.
  1559. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1560. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  1561. req, out := c.GetBucketAclRequest(input)
  1562. return out, req.Send()
  1563. }
  1564. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  1565. // the ability to pass a context and additional request options.
  1566. //
  1567. // See GetBucketAcl for details on how to use this API operation.
  1568. //
  1569. // The context must be non-nil and will be used for request cancellation. If
  1570. // the context is nil a panic will occur. In the future the SDK may create
  1571. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1572. // for more information on using Contexts.
  1573. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  1574. req, out := c.GetBucketAclRequest(input)
  1575. req.SetContext(ctx)
  1576. req.ApplyOptions(opts...)
  1577. return out, req.Send()
  1578. }
  1579. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  1580. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  1581. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  1582. // value will be populated with the request's response once the request completes
  1583. // successfully.
  1584. //
  1585. // Use "Send" method on the returned Request to send the API call to the service.
  1586. // the "output" return value is not valid until after Send returns without error.
  1587. //
  1588. // See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
  1589. // API call, and error handling.
  1590. //
  1591. // This method is useful when you want to inject custom logic or configuration
  1592. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1593. //
  1594. //
  1595. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  1596. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  1597. //
  1598. // err := req.Send()
  1599. // if err == nil { // resp is now filled
  1600. // fmt.Println(resp)
  1601. // }
  1602. //
  1603. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1604. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  1605. op := &request.Operation{
  1606. Name: opGetBucketAnalyticsConfiguration,
  1607. HTTPMethod: "GET",
  1608. HTTPPath: "/{Bucket}?analytics",
  1609. }
  1610. if input == nil {
  1611. input = &GetBucketAnalyticsConfigurationInput{}
  1612. }
  1613. output = &GetBucketAnalyticsConfigurationOutput{}
  1614. req = c.newRequest(op, input, output)
  1615. return
  1616. }
  1617. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  1618. //
  1619. // Gets an analytics configuration for the bucket (specified by the analytics
  1620. // configuration ID).
  1621. //
  1622. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1623. // with awserr.Error's Code and Message methods to get detailed information about
  1624. // the error.
  1625. //
  1626. // See the AWS API reference guide for Amazon Simple Storage Service's
  1627. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  1628. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1629. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  1630. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1631. return out, req.Send()
  1632. }
  1633. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  1634. // the ability to pass a context and additional request options.
  1635. //
  1636. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  1637. //
  1638. // The context must be non-nil and will be used for request cancellation. If
  1639. // the context is nil a panic will occur. In the future the SDK may create
  1640. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1641. // for more information on using Contexts.
  1642. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  1643. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1644. req.SetContext(ctx)
  1645. req.ApplyOptions(opts...)
  1646. return out, req.Send()
  1647. }
  1648. const opGetBucketCors = "GetBucketCors"
  1649. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  1650. // client's request for the GetBucketCors operation. The "output" return
  1651. // value will be populated with the request's response once the request completes
  1652. // successfully.
  1653. //
  1654. // Use "Send" method on the returned Request to send the API call to the service.
  1655. // the "output" return value is not valid until after Send returns without error.
  1656. //
  1657. // See GetBucketCors for more information on using the GetBucketCors
  1658. // API call, and error handling.
  1659. //
  1660. // This method is useful when you want to inject custom logic or configuration
  1661. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1662. //
  1663. //
  1664. // // Example sending a request using the GetBucketCorsRequest method.
  1665. // req, resp := client.GetBucketCorsRequest(params)
  1666. //
  1667. // err := req.Send()
  1668. // if err == nil { // resp is now filled
  1669. // fmt.Println(resp)
  1670. // }
  1671. //
  1672. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1673. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  1674. op := &request.Operation{
  1675. Name: opGetBucketCors,
  1676. HTTPMethod: "GET",
  1677. HTTPPath: "/{Bucket}?cors",
  1678. }
  1679. if input == nil {
  1680. input = &GetBucketCorsInput{}
  1681. }
  1682. output = &GetBucketCorsOutput{}
  1683. req = c.newRequest(op, input, output)
  1684. return
  1685. }
  1686. // GetBucketCors API operation for Amazon Simple Storage Service.
  1687. //
  1688. // Returns the CORS configuration for the bucket.
  1689. //
  1690. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1691. // with awserr.Error's Code and Message methods to get detailed information about
  1692. // the error.
  1693. //
  1694. // See the AWS API reference guide for Amazon Simple Storage Service's
  1695. // API operation GetBucketCors for usage and error information.
  1696. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1697. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  1698. req, out := c.GetBucketCorsRequest(input)
  1699. return out, req.Send()
  1700. }
  1701. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  1702. // the ability to pass a context and additional request options.
  1703. //
  1704. // See GetBucketCors for details on how to use this API operation.
  1705. //
  1706. // The context must be non-nil and will be used for request cancellation. If
  1707. // the context is nil a panic will occur. In the future the SDK may create
  1708. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1709. // for more information on using Contexts.
  1710. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  1711. req, out := c.GetBucketCorsRequest(input)
  1712. req.SetContext(ctx)
  1713. req.ApplyOptions(opts...)
  1714. return out, req.Send()
  1715. }
  1716. const opGetBucketEncryption = "GetBucketEncryption"
  1717. // GetBucketEncryptionRequest generates a "aws/request.Request" representing the
  1718. // client's request for the GetBucketEncryption operation. The "output" return
  1719. // value will be populated with the request's response once the request completes
  1720. // successfully.
  1721. //
  1722. // Use "Send" method on the returned Request to send the API call to the service.
  1723. // the "output" return value is not valid until after Send returns without error.
  1724. //
  1725. // See GetBucketEncryption for more information on using the GetBucketEncryption
  1726. // API call, and error handling.
  1727. //
  1728. // This method is useful when you want to inject custom logic or configuration
  1729. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1730. //
  1731. //
  1732. // // Example sending a request using the GetBucketEncryptionRequest method.
  1733. // req, resp := client.GetBucketEncryptionRequest(params)
  1734. //
  1735. // err := req.Send()
  1736. // if err == nil { // resp is now filled
  1737. // fmt.Println(resp)
  1738. // }
  1739. //
  1740. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1741. func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
  1742. op := &request.Operation{
  1743. Name: opGetBucketEncryption,
  1744. HTTPMethod: "GET",
  1745. HTTPPath: "/{Bucket}?encryption",
  1746. }
  1747. if input == nil {
  1748. input = &GetBucketEncryptionInput{}
  1749. }
  1750. output = &GetBucketEncryptionOutput{}
  1751. req = c.newRequest(op, input, output)
  1752. return
  1753. }
  1754. // GetBucketEncryption API operation for Amazon Simple Storage Service.
  1755. //
  1756. // Returns the server-side encryption configuration of a bucket.
  1757. //
  1758. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1759. // with awserr.Error's Code and Message methods to get detailed information about
  1760. // the error.
  1761. //
  1762. // See the AWS API reference guide for Amazon Simple Storage Service's
  1763. // API operation GetBucketEncryption for usage and error information.
  1764. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1765. func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
  1766. req, out := c.GetBucketEncryptionRequest(input)
  1767. return out, req.Send()
  1768. }
  1769. // GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
  1770. // the ability to pass a context and additional request options.
  1771. //
  1772. // See GetBucketEncryption for details on how to use this API operation.
  1773. //
  1774. // The context must be non-nil and will be used for request cancellation. If
  1775. // the context is nil a panic will occur. In the future the SDK may create
  1776. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1777. // for more information on using Contexts.
  1778. func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
  1779. req, out := c.GetBucketEncryptionRequest(input)
  1780. req.SetContext(ctx)
  1781. req.ApplyOptions(opts...)
  1782. return out, req.Send()
  1783. }
  1784. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  1785. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1786. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  1787. // value will be populated with the request's response once the request completes
  1788. // successfully.
  1789. //
  1790. // Use "Send" method on the returned Request to send the API call to the service.
  1791. // the "output" return value is not valid until after Send returns without error.
  1792. //
  1793. // See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
  1794. // API call, and error handling.
  1795. //
  1796. // This method is useful when you want to inject custom logic or configuration
  1797. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1798. //
  1799. //
  1800. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  1801. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  1802. //
  1803. // err := req.Send()
  1804. // if err == nil { // resp is now filled
  1805. // fmt.Println(resp)
  1806. // }
  1807. //
  1808. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1809. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  1810. op := &request.Operation{
  1811. Name: opGetBucketInventoryConfiguration,
  1812. HTTPMethod: "GET",
  1813. HTTPPath: "/{Bucket}?inventory",
  1814. }
  1815. if input == nil {
  1816. input = &GetBucketInventoryConfigurationInput{}
  1817. }
  1818. output = &GetBucketInventoryConfigurationOutput{}
  1819. req = c.newRequest(op, input, output)
  1820. return
  1821. }
  1822. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1823. //
  1824. // Returns an inventory configuration (identified by the inventory ID) from
  1825. // the bucket.
  1826. //
  1827. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1828. // with awserr.Error's Code and Message methods to get detailed information about
  1829. // the error.
  1830. //
  1831. // See the AWS API reference guide for Amazon Simple Storage Service's
  1832. // API operation GetBucketInventoryConfiguration for usage and error information.
  1833. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1834. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  1835. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1836. return out, req.Send()
  1837. }
  1838. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  1839. // the ability to pass a context and additional request options.
  1840. //
  1841. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  1842. //
  1843. // The context must be non-nil and will be used for request cancellation. If
  1844. // the context is nil a panic will occur. In the future the SDK may create
  1845. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1846. // for more information on using Contexts.
  1847. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  1848. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1849. req.SetContext(ctx)
  1850. req.ApplyOptions(opts...)
  1851. return out, req.Send()
  1852. }
  1853. const opGetBucketLifecycle = "GetBucketLifecycle"
  1854. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  1855. // client's request for the GetBucketLifecycle operation. The "output" return
  1856. // value will be populated with the request's response once the request completes
  1857. // successfully.
  1858. //
  1859. // Use "Send" method on the returned Request to send the API call to the service.
  1860. // the "output" return value is not valid until after Send returns without error.
  1861. //
  1862. // See GetBucketLifecycle for more information on using the GetBucketLifecycle
  1863. // API call, and error handling.
  1864. //
  1865. // This method is useful when you want to inject custom logic or configuration
  1866. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1867. //
  1868. //
  1869. // // Example sending a request using the GetBucketLifecycleRequest method.
  1870. // req, resp := client.GetBucketLifecycleRequest(params)
  1871. //
  1872. // err := req.Send()
  1873. // if err == nil { // resp is now filled
  1874. // fmt.Println(resp)
  1875. // }
  1876. //
  1877. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1878. //
  1879. // Deprecated: GetBucketLifecycle has been deprecated
  1880. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1881. if c.Client.Config.Logger != nil {
  1882. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1883. }
  1884. op := &request.Operation{
  1885. Name: opGetBucketLifecycle,
  1886. HTTPMethod: "GET",
  1887. HTTPPath: "/{Bucket}?lifecycle",
  1888. }
  1889. if input == nil {
  1890. input = &GetBucketLifecycleInput{}
  1891. }
  1892. output = &GetBucketLifecycleOutput{}
  1893. req = c.newRequest(op, input, output)
  1894. return
  1895. }
  1896. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1897. //
  1898. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1899. //
  1900. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1901. // with awserr.Error's Code and Message methods to get detailed information about
  1902. // the error.
  1903. //
  1904. // See the AWS API reference guide for Amazon Simple Storage Service's
  1905. // API operation GetBucketLifecycle for usage and error information.
  1906. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1907. //
  1908. // Deprecated: GetBucketLifecycle has been deprecated
  1909. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1910. req, out := c.GetBucketLifecycleRequest(input)
  1911. return out, req.Send()
  1912. }
  1913. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  1914. // the ability to pass a context and additional request options.
  1915. //
  1916. // See GetBucketLifecycle for details on how to use this API operation.
  1917. //
  1918. // The context must be non-nil and will be used for request cancellation. If
  1919. // the context is nil a panic will occur. In the future the SDK may create
  1920. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1921. // for more information on using Contexts.
  1922. //
  1923. // Deprecated: GetBucketLifecycleWithContext has been deprecated
  1924. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  1925. req, out := c.GetBucketLifecycleRequest(input)
  1926. req.SetContext(ctx)
  1927. req.ApplyOptions(opts...)
  1928. return out, req.Send()
  1929. }
  1930. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1931. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1932. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1933. // value will be populated with the request's response once the request completes
  1934. // successfully.
  1935. //
  1936. // Use "Send" method on the returned Request to send the API call to the service.
  1937. // the "output" return value is not valid until after Send returns without error.
  1938. //
  1939. // See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
  1940. // API call, and error handling.
  1941. //
  1942. // This method is useful when you want to inject custom logic or configuration
  1943. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1944. //
  1945. //
  1946. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1947. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1948. //
  1949. // err := req.Send()
  1950. // if err == nil { // resp is now filled
  1951. // fmt.Println(resp)
  1952. // }
  1953. //
  1954. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1955. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1956. op := &request.Operation{
  1957. Name: opGetBucketLifecycleConfiguration,
  1958. HTTPMethod: "GET",
  1959. HTTPPath: "/{Bucket}?lifecycle",
  1960. }
  1961. if input == nil {
  1962. input = &GetBucketLifecycleConfigurationInput{}
  1963. }
  1964. output = &GetBucketLifecycleConfigurationOutput{}
  1965. req = c.newRequest(op, input, output)
  1966. return
  1967. }
  1968. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1969. //
  1970. // Returns the lifecycle configuration information set on the bucket.
  1971. //
  1972. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1973. // with awserr.Error's Code and Message methods to get detailed information about
  1974. // the error.
  1975. //
  1976. // See the AWS API reference guide for Amazon Simple Storage Service's
  1977. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1978. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1979. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1980. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1981. return out, req.Send()
  1982. }
  1983. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  1984. // the ability to pass a context and additional request options.
  1985. //
  1986. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  1987. //
  1988. // The context must be non-nil and will be used for request cancellation. If
  1989. // the context is nil a panic will occur. In the future the SDK may create
  1990. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1991. // for more information on using Contexts.
  1992. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  1993. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1994. req.SetContext(ctx)
  1995. req.ApplyOptions(opts...)
  1996. return out, req.Send()
  1997. }
  1998. const opGetBucketLocation = "GetBucketLocation"
  1999. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  2000. // client's request for the GetBucketLocation operation. The "output" return
  2001. // value will be populated with the request's response once the request completes
  2002. // successfully.
  2003. //
  2004. // Use "Send" method on the returned Request to send the API call to the service.
  2005. // the "output" return value is not valid until after Send returns without error.
  2006. //
  2007. // See GetBucketLocation for more information on using the GetBucketLocation
  2008. // API call, and error handling.
  2009. //
  2010. // This method is useful when you want to inject custom logic or configuration
  2011. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2012. //
  2013. //
  2014. // // Example sending a request using the GetBucketLocationRequest method.
  2015. // req, resp := client.GetBucketLocationRequest(params)
  2016. //
  2017. // err := req.Send()
  2018. // if err == nil { // resp is now filled
  2019. // fmt.Println(resp)
  2020. // }
  2021. //
  2022. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  2023. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  2024. op := &request.Operation{
  2025. Name: opGetBucketLocation,
  2026. HTTPMethod: "GET",
  2027. HTTPPath: "/{Bucket}?location",
  2028. }
  2029. if input == nil {
  2030. input = &GetBucketLocationInput{}
  2031. }
  2032. output = &GetBucketLocationOutput{}
  2033. req = c.newRequest(op, input, output)
  2034. return
  2035. }
  2036. // GetBucketLocation API operation for Amazon Simple Storage Service.
  2037. //
  2038. // Returns the region the bucket resides in.
  2039. //
  2040. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2041. // with awserr.Error's Code and Message methods to get detailed information about
  2042. // the error.
  2043. //
  2044. // See the AWS API reference guide for Amazon Simple Storage Service's
  2045. // API operation GetBucketLocation for usage and error information.
  2046. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  2047. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  2048. req, out := c.GetBucketLocationRequest(input)
  2049. return out, req.Send()
  2050. }
  2051. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  2052. // the ability to pass a context and additional request options.
  2053. //
  2054. // See GetBucketLocation for details on how to use this API operation.
  2055. //
  2056. // The context must be non-nil and will be used for request cancellation. If
  2057. // the context is nil a panic will occur. In the future the SDK may create
  2058. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2059. // for more information on using Contexts.
  2060. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  2061. req, out := c.GetBucketLocationRequest(input)
  2062. req.SetContext(ctx)
  2063. req.ApplyOptions(opts...)
  2064. return out, req.Send()
  2065. }
  2066. const opGetBucketLogging = "GetBucketLogging"
  2067. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  2068. // client's request for the GetBucketLogging operation. The "output" return
  2069. // value will be populated with the request's response once the request completes
  2070. // successfully.
  2071. //
  2072. // Use "Send" method on the returned Request to send the API call to the service.
  2073. // the "output" return value is not valid until after Send returns without error.
  2074. //
  2075. // See GetBucketLogging for more information on using the GetBucketLogging
  2076. // API call, and error handling.
  2077. //
  2078. // This method is useful when you want to inject custom logic or configuration
  2079. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2080. //
  2081. //
  2082. // // Example sending a request using the GetBucketLoggingRequest method.
  2083. // req, resp := client.GetBucketLoggingRequest(params)
  2084. //
  2085. // err := req.Send()
  2086. // if err == nil { // resp is now filled
  2087. // fmt.Println(resp)
  2088. // }
  2089. //
  2090. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2091. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  2092. op := &request.Operation{
  2093. Name: opGetBucketLogging,
  2094. HTTPMethod: "GET",
  2095. HTTPPath: "/{Bucket}?logging",
  2096. }
  2097. if input == nil {
  2098. input = &GetBucketLoggingInput{}
  2099. }
  2100. output = &GetBucketLoggingOutput{}
  2101. req = c.newRequest(op, input, output)
  2102. return
  2103. }
  2104. // GetBucketLogging API operation for Amazon Simple Storage Service.
  2105. //
  2106. // Returns the logging status of a bucket and the permissions users have to
  2107. // view and modify that status. To use GET, you must be the bucket owner.
  2108. //
  2109. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2110. // with awserr.Error's Code and Message methods to get detailed information about
  2111. // the error.
  2112. //
  2113. // See the AWS API reference guide for Amazon Simple Storage Service's
  2114. // API operation GetBucketLogging for usage and error information.
  2115. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2116. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  2117. req, out := c.GetBucketLoggingRequest(input)
  2118. return out, req.Send()
  2119. }
  2120. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  2121. // the ability to pass a context and additional request options.
  2122. //
  2123. // See GetBucketLogging for details on how to use this API operation.
  2124. //
  2125. // The context must be non-nil and will be used for request cancellation. If
  2126. // the context is nil a panic will occur. In the future the SDK may create
  2127. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2128. // for more information on using Contexts.
  2129. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  2130. req, out := c.GetBucketLoggingRequest(input)
  2131. req.SetContext(ctx)
  2132. req.ApplyOptions(opts...)
  2133. return out, req.Send()
  2134. }
  2135. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  2136. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  2137. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  2138. // value will be populated with the request's response once the request completes
  2139. // successfully.
  2140. //
  2141. // Use "Send" method on the returned Request to send the API call to the service.
  2142. // the "output" return value is not valid until after Send returns without error.
  2143. //
  2144. // See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
  2145. // API call, and error handling.
  2146. //
  2147. // This method is useful when you want to inject custom logic or configuration
  2148. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2149. //
  2150. //
  2151. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  2152. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  2153. //
  2154. // err := req.Send()
  2155. // if err == nil { // resp is now filled
  2156. // fmt.Println(resp)
  2157. // }
  2158. //
  2159. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2160. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  2161. op := &request.Operation{
  2162. Name: opGetBucketMetricsConfiguration,
  2163. HTTPMethod: "GET",
  2164. HTTPPath: "/{Bucket}?metrics",
  2165. }
  2166. if input == nil {
  2167. input = &GetBucketMetricsConfigurationInput{}
  2168. }
  2169. output = &GetBucketMetricsConfigurationOutput{}
  2170. req = c.newRequest(op, input, output)
  2171. return
  2172. }
  2173. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  2174. //
  2175. // Gets a metrics configuration (specified by the metrics configuration ID)
  2176. // from the bucket.
  2177. //
  2178. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2179. // with awserr.Error's Code and Message methods to get detailed information about
  2180. // the error.
  2181. //
  2182. // See the AWS API reference guide for Amazon Simple Storage Service's
  2183. // API operation GetBucketMetricsConfiguration for usage and error information.
  2184. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2185. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  2186. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2187. return out, req.Send()
  2188. }
  2189. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  2190. // the ability to pass a context and additional request options.
  2191. //
  2192. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  2193. //
  2194. // The context must be non-nil and will be used for request cancellation. If
  2195. // the context is nil a panic will occur. In the future the SDK may create
  2196. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2197. // for more information on using Contexts.
  2198. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  2199. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2200. req.SetContext(ctx)
  2201. req.ApplyOptions(opts...)
  2202. return out, req.Send()
  2203. }
  2204. const opGetBucketNotification = "GetBucketNotification"
  2205. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  2206. // client's request for the GetBucketNotification operation. The "output" return
  2207. // value will be populated with the request's response once the request completes
  2208. // successfully.
  2209. //
  2210. // Use "Send" method on the returned Request to send the API call to the service.
  2211. // the "output" return value is not valid until after Send returns without error.
  2212. //
  2213. // See GetBucketNotification for more information on using the GetBucketNotification
  2214. // API call, and error handling.
  2215. //
  2216. // This method is useful when you want to inject custom logic or configuration
  2217. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2218. //
  2219. //
  2220. // // Example sending a request using the GetBucketNotificationRequest method.
  2221. // req, resp := client.GetBucketNotificationRequest(params)
  2222. //
  2223. // err := req.Send()
  2224. // if err == nil { // resp is now filled
  2225. // fmt.Println(resp)
  2226. // }
  2227. //
  2228. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2229. //
  2230. // Deprecated: GetBucketNotification has been deprecated
  2231. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  2232. if c.Client.Config.Logger != nil {
  2233. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  2234. }
  2235. op := &request.Operation{
  2236. Name: opGetBucketNotification,
  2237. HTTPMethod: "GET",
  2238. HTTPPath: "/{Bucket}?notification",
  2239. }
  2240. if input == nil {
  2241. input = &GetBucketNotificationConfigurationRequest{}
  2242. }
  2243. output = &NotificationConfigurationDeprecated{}
  2244. req = c.newRequest(op, input, output)
  2245. return
  2246. }
  2247. // GetBucketNotification API operation for Amazon Simple Storage Service.
  2248. //
  2249. // Deprecated, see the GetBucketNotificationConfiguration operation.
  2250. //
  2251. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2252. // with awserr.Error's Code and Message methods to get detailed information about
  2253. // the error.
  2254. //
  2255. // See the AWS API reference guide for Amazon Simple Storage Service's
  2256. // API operation GetBucketNotification for usage and error information.
  2257. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2258. //
  2259. // Deprecated: GetBucketNotification has been deprecated
  2260. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  2261. req, out := c.GetBucketNotificationRequest(input)
  2262. return out, req.Send()
  2263. }
  2264. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  2265. // the ability to pass a context and additional request options.
  2266. //
  2267. // See GetBucketNotification for details on how to use this API operation.
  2268. //
  2269. // The context must be non-nil and will be used for request cancellation. If
  2270. // the context is nil a panic will occur. In the future the SDK may create
  2271. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2272. // for more information on using Contexts.
  2273. //
  2274. // Deprecated: GetBucketNotificationWithContext has been deprecated
  2275. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  2276. req, out := c.GetBucketNotificationRequest(input)
  2277. req.SetContext(ctx)
  2278. req.ApplyOptions(opts...)
  2279. return out, req.Send()
  2280. }
  2281. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  2282. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2283. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  2284. // value will be populated with the request's response once the request completes
  2285. // successfully.
  2286. //
  2287. // Use "Send" method on the returned Request to send the API call to the service.
  2288. // the "output" return value is not valid until after Send returns without error.
  2289. //
  2290. // See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
  2291. // API call, and error handling.
  2292. //
  2293. // This method is useful when you want to inject custom logic or configuration
  2294. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2295. //
  2296. //
  2297. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  2298. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  2299. //
  2300. // err := req.Send()
  2301. // if err == nil { // resp is now filled
  2302. // fmt.Println(resp)
  2303. // }
  2304. //
  2305. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2306. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  2307. op := &request.Operation{
  2308. Name: opGetBucketNotificationConfiguration,
  2309. HTTPMethod: "GET",
  2310. HTTPPath: "/{Bucket}?notification",
  2311. }
  2312. if input == nil {
  2313. input = &GetBucketNotificationConfigurationRequest{}
  2314. }
  2315. output = &NotificationConfiguration{}
  2316. req = c.newRequest(op, input, output)
  2317. return
  2318. }
  2319. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2320. //
  2321. // Returns the notification configuration of a bucket.
  2322. //
  2323. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2324. // with awserr.Error's Code and Message methods to get detailed information about
  2325. // the error.
  2326. //
  2327. // See the AWS API reference guide for Amazon Simple Storage Service's
  2328. // API operation GetBucketNotificationConfiguration for usage and error information.
  2329. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2330. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  2331. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2332. return out, req.Send()
  2333. }
  2334. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  2335. // the ability to pass a context and additional request options.
  2336. //
  2337. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  2338. //
  2339. // The context must be non-nil and will be used for request cancellation. If
  2340. // the context is nil a panic will occur. In the future the SDK may create
  2341. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2342. // for more information on using Contexts.
  2343. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  2344. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2345. req.SetContext(ctx)
  2346. req.ApplyOptions(opts...)
  2347. return out, req.Send()
  2348. }
  2349. const opGetBucketPolicy = "GetBucketPolicy"
  2350. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  2351. // client's request for the GetBucketPolicy operation. The "output" return
  2352. // value will be populated with the request's response once the request completes
  2353. // successfully.
  2354. //
  2355. // Use "Send" method on the returned Request to send the API call to the service.
  2356. // the "output" return value is not valid until after Send returns without error.
  2357. //
  2358. // See GetBucketPolicy for more information on using the GetBucketPolicy
  2359. // API call, and error handling.
  2360. //
  2361. // This method is useful when you want to inject custom logic or configuration
  2362. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2363. //
  2364. //
  2365. // // Example sending a request using the GetBucketPolicyRequest method.
  2366. // req, resp := client.GetBucketPolicyRequest(params)
  2367. //
  2368. // err := req.Send()
  2369. // if err == nil { // resp is now filled
  2370. // fmt.Println(resp)
  2371. // }
  2372. //
  2373. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2374. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  2375. op := &request.Operation{
  2376. Name: opGetBucketPolicy,
  2377. HTTPMethod: "GET",
  2378. HTTPPath: "/{Bucket}?policy",
  2379. }
  2380. if input == nil {
  2381. input = &GetBucketPolicyInput{}
  2382. }
  2383. output = &GetBucketPolicyOutput{}
  2384. req = c.newRequest(op, input, output)
  2385. return
  2386. }
  2387. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  2388. //
  2389. // Returns the policy of a specified bucket.
  2390. //
  2391. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2392. // with awserr.Error's Code and Message methods to get detailed information about
  2393. // the error.
  2394. //
  2395. // See the AWS API reference guide for Amazon Simple Storage Service's
  2396. // API operation GetBucketPolicy for usage and error information.
  2397. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2398. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  2399. req, out := c.GetBucketPolicyRequest(input)
  2400. return out, req.Send()
  2401. }
  2402. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  2403. // the ability to pass a context and additional request options.
  2404. //
  2405. // See GetBucketPolicy for details on how to use this API operation.
  2406. //
  2407. // The context must be non-nil and will be used for request cancellation. If
  2408. // the context is nil a panic will occur. In the future the SDK may create
  2409. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2410. // for more information on using Contexts.
  2411. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  2412. req, out := c.GetBucketPolicyRequest(input)
  2413. req.SetContext(ctx)
  2414. req.ApplyOptions(opts...)
  2415. return out, req.Send()
  2416. }
  2417. const opGetBucketPolicyStatus = "GetBucketPolicyStatus"
  2418. // GetBucketPolicyStatusRequest generates a "aws/request.Request" representing the
  2419. // client's request for the GetBucketPolicyStatus operation. The "output" return
  2420. // value will be populated with the request's response once the request completes
  2421. // successfully.
  2422. //
  2423. // Use "Send" method on the returned Request to send the API call to the service.
  2424. // the "output" return value is not valid until after Send returns without error.
  2425. //
  2426. // See GetBucketPolicyStatus for more information on using the GetBucketPolicyStatus
  2427. // API call, and error handling.
  2428. //
  2429. // This method is useful when you want to inject custom logic or configuration
  2430. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2431. //
  2432. //
  2433. // // Example sending a request using the GetBucketPolicyStatusRequest method.
  2434. // req, resp := client.GetBucketPolicyStatusRequest(params)
  2435. //
  2436. // err := req.Send()
  2437. // if err == nil { // resp is now filled
  2438. // fmt.Println(resp)
  2439. // }
  2440. //
  2441. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
  2442. func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (req *request.Request, output *GetBucketPolicyStatusOutput) {
  2443. op := &request.Operation{
  2444. Name: opGetBucketPolicyStatus,
  2445. HTTPMethod: "GET",
  2446. HTTPPath: "/{Bucket}?policyStatus",
  2447. }
  2448. if input == nil {
  2449. input = &GetBucketPolicyStatusInput{}
  2450. }
  2451. output = &GetBucketPolicyStatusOutput{}
  2452. req = c.newRequest(op, input, output)
  2453. return
  2454. }
  2455. // GetBucketPolicyStatus API operation for Amazon Simple Storage Service.
  2456. //
  2457. // Retrieves the policy status for an Amazon S3 bucket, indicating whether the
  2458. // bucket is public.
  2459. //
  2460. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2461. // with awserr.Error's Code and Message methods to get detailed information about
  2462. // the error.
  2463. //
  2464. // See the AWS API reference guide for Amazon Simple Storage Service's
  2465. // API operation GetBucketPolicyStatus for usage and error information.
  2466. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
  2467. func (c *S3) GetBucketPolicyStatus(input *GetBucketPolicyStatusInput) (*GetBucketPolicyStatusOutput, error) {
  2468. req, out := c.GetBucketPolicyStatusRequest(input)
  2469. return out, req.Send()
  2470. }
  2471. // GetBucketPolicyStatusWithContext is the same as GetBucketPolicyStatus with the addition of
  2472. // the ability to pass a context and additional request options.
  2473. //
  2474. // See GetBucketPolicyStatus for details on how to use this API operation.
  2475. //
  2476. // The context must be non-nil and will be used for request cancellation. If
  2477. // the context is nil a panic will occur. In the future the SDK may create
  2478. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2479. // for more information on using Contexts.
  2480. func (c *S3) GetBucketPolicyStatusWithContext(ctx aws.Context, input *GetBucketPolicyStatusInput, opts ...request.Option) (*GetBucketPolicyStatusOutput, error) {
  2481. req, out := c.GetBucketPolicyStatusRequest(input)
  2482. req.SetContext(ctx)
  2483. req.ApplyOptions(opts...)
  2484. return out, req.Send()
  2485. }
  2486. const opGetBucketReplication = "GetBucketReplication"
  2487. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  2488. // client's request for the GetBucketReplication operation. The "output" return
  2489. // value will be populated with the request's response once the request completes
  2490. // successfully.
  2491. //
  2492. // Use "Send" method on the returned Request to send the API call to the service.
  2493. // the "output" return value is not valid until after Send returns without error.
  2494. //
  2495. // See GetBucketReplication for more information on using the GetBucketReplication
  2496. // API call, and error handling.
  2497. //
  2498. // This method is useful when you want to inject custom logic or configuration
  2499. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2500. //
  2501. //
  2502. // // Example sending a request using the GetBucketReplicationRequest method.
  2503. // req, resp := client.GetBucketReplicationRequest(params)
  2504. //
  2505. // err := req.Send()
  2506. // if err == nil { // resp is now filled
  2507. // fmt.Println(resp)
  2508. // }
  2509. //
  2510. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2511. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  2512. op := &request.Operation{
  2513. Name: opGetBucketReplication,
  2514. HTTPMethod: "GET",
  2515. HTTPPath: "/{Bucket}?replication",
  2516. }
  2517. if input == nil {
  2518. input = &GetBucketReplicationInput{}
  2519. }
  2520. output = &GetBucketReplicationOutput{}
  2521. req = c.newRequest(op, input, output)
  2522. return
  2523. }
  2524. // GetBucketReplication API operation for Amazon Simple Storage Service.
  2525. //
  2526. // Returns the replication configuration of a bucket.
  2527. //
  2528. // It can take a while to propagate the put or delete a replication configuration
  2529. // to all Amazon S3 systems. Therefore, a get request soon after put or delete
  2530. // can return a wrong result.
  2531. //
  2532. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2533. // with awserr.Error's Code and Message methods to get detailed information about
  2534. // the error.
  2535. //
  2536. // See the AWS API reference guide for Amazon Simple Storage Service's
  2537. // API operation GetBucketReplication for usage and error information.
  2538. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2539. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  2540. req, out := c.GetBucketReplicationRequest(input)
  2541. return out, req.Send()
  2542. }
  2543. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  2544. // the ability to pass a context and additional request options.
  2545. //
  2546. // See GetBucketReplication for details on how to use this API operation.
  2547. //
  2548. // The context must be non-nil and will be used for request cancellation. If
  2549. // the context is nil a panic will occur. In the future the SDK may create
  2550. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2551. // for more information on using Contexts.
  2552. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  2553. req, out := c.GetBucketReplicationRequest(input)
  2554. req.SetContext(ctx)
  2555. req.ApplyOptions(opts...)
  2556. return out, req.Send()
  2557. }
  2558. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  2559. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2560. // client's request for the GetBucketRequestPayment operation. The "output" return
  2561. // value will be populated with the request's response once the request completes
  2562. // successfully.
  2563. //
  2564. // Use "Send" method on the returned Request to send the API call to the service.
  2565. // the "output" return value is not valid until after Send returns without error.
  2566. //
  2567. // See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
  2568. // API call, and error handling.
  2569. //
  2570. // This method is useful when you want to inject custom logic or configuration
  2571. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2572. //
  2573. //
  2574. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  2575. // req, resp := client.GetBucketRequestPaymentRequest(params)
  2576. //
  2577. // err := req.Send()
  2578. // if err == nil { // resp is now filled
  2579. // fmt.Println(resp)
  2580. // }
  2581. //
  2582. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2583. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  2584. op := &request.Operation{
  2585. Name: opGetBucketRequestPayment,
  2586. HTTPMethod: "GET",
  2587. HTTPPath: "/{Bucket}?requestPayment",
  2588. }
  2589. if input == nil {
  2590. input = &GetBucketRequestPaymentInput{}
  2591. }
  2592. output = &GetBucketRequestPaymentOutput{}
  2593. req = c.newRequest(op, input, output)
  2594. return
  2595. }
  2596. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  2597. //
  2598. // Returns the request payment configuration of a bucket.
  2599. //
  2600. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2601. // with awserr.Error's Code and Message methods to get detailed information about
  2602. // the error.
  2603. //
  2604. // See the AWS API reference guide for Amazon Simple Storage Service's
  2605. // API operation GetBucketRequestPayment for usage and error information.
  2606. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2607. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  2608. req, out := c.GetBucketRequestPaymentRequest(input)
  2609. return out, req.Send()
  2610. }
  2611. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  2612. // the ability to pass a context and additional request options.
  2613. //
  2614. // See GetBucketRequestPayment for details on how to use this API operation.
  2615. //
  2616. // The context must be non-nil and will be used for request cancellation. If
  2617. // the context is nil a panic will occur. In the future the SDK may create
  2618. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2619. // for more information on using Contexts.
  2620. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  2621. req, out := c.GetBucketRequestPaymentRequest(input)
  2622. req.SetContext(ctx)
  2623. req.ApplyOptions(opts...)
  2624. return out, req.Send()
  2625. }
  2626. const opGetBucketTagging = "GetBucketTagging"
  2627. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  2628. // client's request for the GetBucketTagging operation. The "output" return
  2629. // value will be populated with the request's response once the request completes
  2630. // successfully.
  2631. //
  2632. // Use "Send" method on the returned Request to send the API call to the service.
  2633. // the "output" return value is not valid until after Send returns without error.
  2634. //
  2635. // See GetBucketTagging for more information on using the GetBucketTagging
  2636. // API call, and error handling.
  2637. //
  2638. // This method is useful when you want to inject custom logic or configuration
  2639. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2640. //
  2641. //
  2642. // // Example sending a request using the GetBucketTaggingRequest method.
  2643. // req, resp := client.GetBucketTaggingRequest(params)
  2644. //
  2645. // err := req.Send()
  2646. // if err == nil { // resp is now filled
  2647. // fmt.Println(resp)
  2648. // }
  2649. //
  2650. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2651. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  2652. op := &request.Operation{
  2653. Name: opGetBucketTagging,
  2654. HTTPMethod: "GET",
  2655. HTTPPath: "/{Bucket}?tagging",
  2656. }
  2657. if input == nil {
  2658. input = &GetBucketTaggingInput{}
  2659. }
  2660. output = &GetBucketTaggingOutput{}
  2661. req = c.newRequest(op, input, output)
  2662. return
  2663. }
  2664. // GetBucketTagging API operation for Amazon Simple Storage Service.
  2665. //
  2666. // Returns the tag set associated with the bucket.
  2667. //
  2668. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2669. // with awserr.Error's Code and Message methods to get detailed information about
  2670. // the error.
  2671. //
  2672. // See the AWS API reference guide for Amazon Simple Storage Service's
  2673. // API operation GetBucketTagging for usage and error information.
  2674. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2675. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  2676. req, out := c.GetBucketTaggingRequest(input)
  2677. return out, req.Send()
  2678. }
  2679. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  2680. // the ability to pass a context and additional request options.
  2681. //
  2682. // See GetBucketTagging for details on how to use this API operation.
  2683. //
  2684. // The context must be non-nil and will be used for request cancellation. If
  2685. // the context is nil a panic will occur. In the future the SDK may create
  2686. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2687. // for more information on using Contexts.
  2688. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  2689. req, out := c.GetBucketTaggingRequest(input)
  2690. req.SetContext(ctx)
  2691. req.ApplyOptions(opts...)
  2692. return out, req.Send()
  2693. }
  2694. const opGetBucketVersioning = "GetBucketVersioning"
  2695. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  2696. // client's request for the GetBucketVersioning operation. The "output" return
  2697. // value will be populated with the request's response once the request completes
  2698. // successfully.
  2699. //
  2700. // Use "Send" method on the returned Request to send the API call to the service.
  2701. // the "output" return value is not valid until after Send returns without error.
  2702. //
  2703. // See GetBucketVersioning for more information on using the GetBucketVersioning
  2704. // API call, and error handling.
  2705. //
  2706. // This method is useful when you want to inject custom logic or configuration
  2707. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2708. //
  2709. //
  2710. // // Example sending a request using the GetBucketVersioningRequest method.
  2711. // req, resp := client.GetBucketVersioningRequest(params)
  2712. //
  2713. // err := req.Send()
  2714. // if err == nil { // resp is now filled
  2715. // fmt.Println(resp)
  2716. // }
  2717. //
  2718. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2719. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  2720. op := &request.Operation{
  2721. Name: opGetBucketVersioning,
  2722. HTTPMethod: "GET",
  2723. HTTPPath: "/{Bucket}?versioning",
  2724. }
  2725. if input == nil {
  2726. input = &GetBucketVersioningInput{}
  2727. }
  2728. output = &GetBucketVersioningOutput{}
  2729. req = c.newRequest(op, input, output)
  2730. return
  2731. }
  2732. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  2733. //
  2734. // Returns the versioning state of a bucket.
  2735. //
  2736. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2737. // with awserr.Error's Code and Message methods to get detailed information about
  2738. // the error.
  2739. //
  2740. // See the AWS API reference guide for Amazon Simple Storage Service's
  2741. // API operation GetBucketVersioning for usage and error information.
  2742. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2743. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  2744. req, out := c.GetBucketVersioningRequest(input)
  2745. return out, req.Send()
  2746. }
  2747. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  2748. // the ability to pass a context and additional request options.
  2749. //
  2750. // See GetBucketVersioning for details on how to use this API operation.
  2751. //
  2752. // The context must be non-nil and will be used for request cancellation. If
  2753. // the context is nil a panic will occur. In the future the SDK may create
  2754. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2755. // for more information on using Contexts.
  2756. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  2757. req, out := c.GetBucketVersioningRequest(input)
  2758. req.SetContext(ctx)
  2759. req.ApplyOptions(opts...)
  2760. return out, req.Send()
  2761. }
  2762. const opGetBucketWebsite = "GetBucketWebsite"
  2763. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  2764. // client's request for the GetBucketWebsite operation. The "output" return
  2765. // value will be populated with the request's response once the request completes
  2766. // successfully.
  2767. //
  2768. // Use "Send" method on the returned Request to send the API call to the service.
  2769. // the "output" return value is not valid until after Send returns without error.
  2770. //
  2771. // See GetBucketWebsite for more information on using the GetBucketWebsite
  2772. // API call, and error handling.
  2773. //
  2774. // This method is useful when you want to inject custom logic or configuration
  2775. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2776. //
  2777. //
  2778. // // Example sending a request using the GetBucketWebsiteRequest method.
  2779. // req, resp := client.GetBucketWebsiteRequest(params)
  2780. //
  2781. // err := req.Send()
  2782. // if err == nil { // resp is now filled
  2783. // fmt.Println(resp)
  2784. // }
  2785. //
  2786. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2787. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  2788. op := &request.Operation{
  2789. Name: opGetBucketWebsite,
  2790. HTTPMethod: "GET",
  2791. HTTPPath: "/{Bucket}?website",
  2792. }
  2793. if input == nil {
  2794. input = &GetBucketWebsiteInput{}
  2795. }
  2796. output = &GetBucketWebsiteOutput{}
  2797. req = c.newRequest(op, input, output)
  2798. return
  2799. }
  2800. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  2801. //
  2802. // Returns the website configuration for a bucket.
  2803. //
  2804. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2805. // with awserr.Error's Code and Message methods to get detailed information about
  2806. // the error.
  2807. //
  2808. // See the AWS API reference guide for Amazon Simple Storage Service's
  2809. // API operation GetBucketWebsite for usage and error information.
  2810. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2811. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  2812. req, out := c.GetBucketWebsiteRequest(input)
  2813. return out, req.Send()
  2814. }
  2815. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  2816. // the ability to pass a context and additional request options.
  2817. //
  2818. // See GetBucketWebsite for details on how to use this API operation.
  2819. //
  2820. // The context must be non-nil and will be used for request cancellation. If
  2821. // the context is nil a panic will occur. In the future the SDK may create
  2822. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2823. // for more information on using Contexts.
  2824. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  2825. req, out := c.GetBucketWebsiteRequest(input)
  2826. req.SetContext(ctx)
  2827. req.ApplyOptions(opts...)
  2828. return out, req.Send()
  2829. }
  2830. const opGetObject = "GetObject"
  2831. // GetObjectRequest generates a "aws/request.Request" representing the
  2832. // client's request for the GetObject operation. The "output" return
  2833. // value will be populated with the request's response once the request completes
  2834. // successfully.
  2835. //
  2836. // Use "Send" method on the returned Request to send the API call to the service.
  2837. // the "output" return value is not valid until after Send returns without error.
  2838. //
  2839. // See GetObject for more information on using the GetObject
  2840. // API call, and error handling.
  2841. //
  2842. // This method is useful when you want to inject custom logic or configuration
  2843. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2844. //
  2845. //
  2846. // // Example sending a request using the GetObjectRequest method.
  2847. // req, resp := client.GetObjectRequest(params)
  2848. //
  2849. // err := req.Send()
  2850. // if err == nil { // resp is now filled
  2851. // fmt.Println(resp)
  2852. // }
  2853. //
  2854. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2855. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  2856. op := &request.Operation{
  2857. Name: opGetObject,
  2858. HTTPMethod: "GET",
  2859. HTTPPath: "/{Bucket}/{Key+}",
  2860. }
  2861. if input == nil {
  2862. input = &GetObjectInput{}
  2863. }
  2864. output = &GetObjectOutput{}
  2865. req = c.newRequest(op, input, output)
  2866. return
  2867. }
  2868. // GetObject API operation for Amazon Simple Storage Service.
  2869. //
  2870. // Retrieves objects from Amazon S3.
  2871. //
  2872. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2873. // with awserr.Error's Code and Message methods to get detailed information about
  2874. // the error.
  2875. //
  2876. // See the AWS API reference guide for Amazon Simple Storage Service's
  2877. // API operation GetObject for usage and error information.
  2878. //
  2879. // Returned Error Codes:
  2880. // * ErrCodeNoSuchKey "NoSuchKey"
  2881. // The specified key does not exist.
  2882. //
  2883. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2884. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  2885. req, out := c.GetObjectRequest(input)
  2886. return out, req.Send()
  2887. }
  2888. // GetObjectWithContext is the same as GetObject with the addition of
  2889. // the ability to pass a context and additional request options.
  2890. //
  2891. // See GetObject for details on how to use this API operation.
  2892. //
  2893. // The context must be non-nil and will be used for request cancellation. If
  2894. // the context is nil a panic will occur. In the future the SDK may create
  2895. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2896. // for more information on using Contexts.
  2897. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  2898. req, out := c.GetObjectRequest(input)
  2899. req.SetContext(ctx)
  2900. req.ApplyOptions(opts...)
  2901. return out, req.Send()
  2902. }
  2903. const opGetObjectAcl = "GetObjectAcl"
  2904. // GetObjectAclRequest generates a "aws/request.Request" representing the
  2905. // client's request for the GetObjectAcl operation. The "output" return
  2906. // value will be populated with the request's response once the request completes
  2907. // successfully.
  2908. //
  2909. // Use "Send" method on the returned Request to send the API call to the service.
  2910. // the "output" return value is not valid until after Send returns without error.
  2911. //
  2912. // See GetObjectAcl for more information on using the GetObjectAcl
  2913. // API call, and error handling.
  2914. //
  2915. // This method is useful when you want to inject custom logic or configuration
  2916. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2917. //
  2918. //
  2919. // // Example sending a request using the GetObjectAclRequest method.
  2920. // req, resp := client.GetObjectAclRequest(params)
  2921. //
  2922. // err := req.Send()
  2923. // if err == nil { // resp is now filled
  2924. // fmt.Println(resp)
  2925. // }
  2926. //
  2927. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2928. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  2929. op := &request.Operation{
  2930. Name: opGetObjectAcl,
  2931. HTTPMethod: "GET",
  2932. HTTPPath: "/{Bucket}/{Key+}?acl",
  2933. }
  2934. if input == nil {
  2935. input = &GetObjectAclInput{}
  2936. }
  2937. output = &GetObjectAclOutput{}
  2938. req = c.newRequest(op, input, output)
  2939. return
  2940. }
  2941. // GetObjectAcl API operation for Amazon Simple Storage Service.
  2942. //
  2943. // Returns the access control list (ACL) of an object.
  2944. //
  2945. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2946. // with awserr.Error's Code and Message methods to get detailed information about
  2947. // the error.
  2948. //
  2949. // See the AWS API reference guide for Amazon Simple Storage Service's
  2950. // API operation GetObjectAcl for usage and error information.
  2951. //
  2952. // Returned Error Codes:
  2953. // * ErrCodeNoSuchKey "NoSuchKey"
  2954. // The specified key does not exist.
  2955. //
  2956. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2957. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  2958. req, out := c.GetObjectAclRequest(input)
  2959. return out, req.Send()
  2960. }
  2961. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  2962. // the ability to pass a context and additional request options.
  2963. //
  2964. // See GetObjectAcl for details on how to use this API operation.
  2965. //
  2966. // The context must be non-nil and will be used for request cancellation. If
  2967. // the context is nil a panic will occur. In the future the SDK may create
  2968. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2969. // for more information on using Contexts.
  2970. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  2971. req, out := c.GetObjectAclRequest(input)
  2972. req.SetContext(ctx)
  2973. req.ApplyOptions(opts...)
  2974. return out, req.Send()
  2975. }
  2976. const opGetObjectLegalHold = "GetObjectLegalHold"
  2977. // GetObjectLegalHoldRequest generates a "aws/request.Request" representing the
  2978. // client's request for the GetObjectLegalHold operation. The "output" return
  2979. // value will be populated with the request's response once the request completes
  2980. // successfully.
  2981. //
  2982. // Use "Send" method on the returned Request to send the API call to the service.
  2983. // the "output" return value is not valid until after Send returns without error.
  2984. //
  2985. // See GetObjectLegalHold for more information on using the GetObjectLegalHold
  2986. // API call, and error handling.
  2987. //
  2988. // This method is useful when you want to inject custom logic or configuration
  2989. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2990. //
  2991. //
  2992. // // Example sending a request using the GetObjectLegalHoldRequest method.
  2993. // req, resp := client.GetObjectLegalHoldRequest(params)
  2994. //
  2995. // err := req.Send()
  2996. // if err == nil { // resp is now filled
  2997. // fmt.Println(resp)
  2998. // }
  2999. //
  3000. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
  3001. func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) {
  3002. op := &request.Operation{
  3003. Name: opGetObjectLegalHold,
  3004. HTTPMethod: "GET",
  3005. HTTPPath: "/{Bucket}/{Key+}?legal-hold",
  3006. }
  3007. if input == nil {
  3008. input = &GetObjectLegalHoldInput{}
  3009. }
  3010. output = &GetObjectLegalHoldOutput{}
  3011. req = c.newRequest(op, input, output)
  3012. return
  3013. }
  3014. // GetObjectLegalHold API operation for Amazon Simple Storage Service.
  3015. //
  3016. // Gets an object's current Legal Hold status.
  3017. //
  3018. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3019. // with awserr.Error's Code and Message methods to get detailed information about
  3020. // the error.
  3021. //
  3022. // See the AWS API reference guide for Amazon Simple Storage Service's
  3023. // API operation GetObjectLegalHold for usage and error information.
  3024. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
  3025. func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error) {
  3026. req, out := c.GetObjectLegalHoldRequest(input)
  3027. return out, req.Send()
  3028. }
  3029. // GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of
  3030. // the ability to pass a context and additional request options.
  3031. //
  3032. // See GetObjectLegalHold for details on how to use this API operation.
  3033. //
  3034. // The context must be non-nil and will be used for request cancellation. If
  3035. // the context is nil a panic will occur. In the future the SDK may create
  3036. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3037. // for more information on using Contexts.
  3038. func (c *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error) {
  3039. req, out := c.GetObjectLegalHoldRequest(input)
  3040. req.SetContext(ctx)
  3041. req.ApplyOptions(opts...)
  3042. return out, req.Send()
  3043. }
  3044. const opGetObjectLockConfiguration = "GetObjectLockConfiguration"
  3045. // GetObjectLockConfigurationRequest generates a "aws/request.Request" representing the
  3046. // client's request for the GetObjectLockConfiguration operation. The "output" return
  3047. // value will be populated with the request's response once the request completes
  3048. // successfully.
  3049. //
  3050. // Use "Send" method on the returned Request to send the API call to the service.
  3051. // the "output" return value is not valid until after Send returns without error.
  3052. //
  3053. // See GetObjectLockConfiguration for more information on using the GetObjectLockConfiguration
  3054. // API call, and error handling.
  3055. //
  3056. // This method is useful when you want to inject custom logic or configuration
  3057. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3058. //
  3059. //
  3060. // // Example sending a request using the GetObjectLockConfigurationRequest method.
  3061. // req, resp := client.GetObjectLockConfigurationRequest(params)
  3062. //
  3063. // err := req.Send()
  3064. // if err == nil { // resp is now filled
  3065. // fmt.Println(resp)
  3066. // }
  3067. //
  3068. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
  3069. func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) {
  3070. op := &request.Operation{
  3071. Name: opGetObjectLockConfiguration,
  3072. HTTPMethod: "GET",
  3073. HTTPPath: "/{Bucket}?object-lock",
  3074. }
  3075. if input == nil {
  3076. input = &GetObjectLockConfigurationInput{}
  3077. }
  3078. output = &GetObjectLockConfigurationOutput{}
  3079. req = c.newRequest(op, input, output)
  3080. return
  3081. }
  3082. // GetObjectLockConfiguration API operation for Amazon Simple Storage Service.
  3083. //
  3084. // Gets the Object Lock configuration for a bucket. The rule specified in the
  3085. // Object Lock configuration will be applied by default to every new object
  3086. // placed in the specified bucket.
  3087. //
  3088. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3089. // with awserr.Error's Code and Message methods to get detailed information about
  3090. // the error.
  3091. //
  3092. // See the AWS API reference guide for Amazon Simple Storage Service's
  3093. // API operation GetObjectLockConfiguration for usage and error information.
  3094. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
  3095. func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error) {
  3096. req, out := c.GetObjectLockConfigurationRequest(input)
  3097. return out, req.Send()
  3098. }
  3099. // GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of
  3100. // the ability to pass a context and additional request options.
  3101. //
  3102. // See GetObjectLockConfiguration for details on how to use this API operation.
  3103. //
  3104. // The context must be non-nil and will be used for request cancellation. If
  3105. // the context is nil a panic will occur. In the future the SDK may create
  3106. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3107. // for more information on using Contexts.
  3108. func (c *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error) {
  3109. req, out := c.GetObjectLockConfigurationRequest(input)
  3110. req.SetContext(ctx)
  3111. req.ApplyOptions(opts...)
  3112. return out, req.Send()
  3113. }
  3114. const opGetObjectRetention = "GetObjectRetention"
  3115. // GetObjectRetentionRequest generates a "aws/request.Request" representing the
  3116. // client's request for the GetObjectRetention operation. The "output" return
  3117. // value will be populated with the request's response once the request completes
  3118. // successfully.
  3119. //
  3120. // Use "Send" method on the returned Request to send the API call to the service.
  3121. // the "output" return value is not valid until after Send returns without error.
  3122. //
  3123. // See GetObjectRetention for more information on using the GetObjectRetention
  3124. // API call, and error handling.
  3125. //
  3126. // This method is useful when you want to inject custom logic or configuration
  3127. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3128. //
  3129. //
  3130. // // Example sending a request using the GetObjectRetentionRequest method.
  3131. // req, resp := client.GetObjectRetentionRequest(params)
  3132. //
  3133. // err := req.Send()
  3134. // if err == nil { // resp is now filled
  3135. // fmt.Println(resp)
  3136. // }
  3137. //
  3138. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
  3139. func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) {
  3140. op := &request.Operation{
  3141. Name: opGetObjectRetention,
  3142. HTTPMethod: "GET",
  3143. HTTPPath: "/{Bucket}/{Key+}?retention",
  3144. }
  3145. if input == nil {
  3146. input = &GetObjectRetentionInput{}
  3147. }
  3148. output = &GetObjectRetentionOutput{}
  3149. req = c.newRequest(op, input, output)
  3150. return
  3151. }
  3152. // GetObjectRetention API operation for Amazon Simple Storage Service.
  3153. //
  3154. // Retrieves an object's retention settings.
  3155. //
  3156. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3157. // with awserr.Error's Code and Message methods to get detailed information about
  3158. // the error.
  3159. //
  3160. // See the AWS API reference guide for Amazon Simple Storage Service's
  3161. // API operation GetObjectRetention for usage and error information.
  3162. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
  3163. func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error) {
  3164. req, out := c.GetObjectRetentionRequest(input)
  3165. return out, req.Send()
  3166. }
  3167. // GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of
  3168. // the ability to pass a context and additional request options.
  3169. //
  3170. // See GetObjectRetention for details on how to use this API operation.
  3171. //
  3172. // The context must be non-nil and will be used for request cancellation. If
  3173. // the context is nil a panic will occur. In the future the SDK may create
  3174. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3175. // for more information on using Contexts.
  3176. func (c *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error) {
  3177. req, out := c.GetObjectRetentionRequest(input)
  3178. req.SetContext(ctx)
  3179. req.ApplyOptions(opts...)
  3180. return out, req.Send()
  3181. }
  3182. const opGetObjectTagging = "GetObjectTagging"
  3183. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  3184. // client's request for the GetObjectTagging operation. The "output" return
  3185. // value will be populated with the request's response once the request completes
  3186. // successfully.
  3187. //
  3188. // Use "Send" method on the returned Request to send the API call to the service.
  3189. // the "output" return value is not valid until after Send returns without error.
  3190. //
  3191. // See GetObjectTagging for more information on using the GetObjectTagging
  3192. // API call, and error handling.
  3193. //
  3194. // This method is useful when you want to inject custom logic or configuration
  3195. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3196. //
  3197. //
  3198. // // Example sending a request using the GetObjectTaggingRequest method.
  3199. // req, resp := client.GetObjectTaggingRequest(params)
  3200. //
  3201. // err := req.Send()
  3202. // if err == nil { // resp is now filled
  3203. // fmt.Println(resp)
  3204. // }
  3205. //
  3206. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  3207. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  3208. op := &request.Operation{
  3209. Name: opGetObjectTagging,
  3210. HTTPMethod: "GET",
  3211. HTTPPath: "/{Bucket}/{Key+}?tagging",
  3212. }
  3213. if input == nil {
  3214. input = &GetObjectTaggingInput{}
  3215. }
  3216. output = &GetObjectTaggingOutput{}
  3217. req = c.newRequest(op, input, output)
  3218. return
  3219. }
  3220. // GetObjectTagging API operation for Amazon Simple Storage Service.
  3221. //
  3222. // Returns the tag-set of an object.
  3223. //
  3224. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3225. // with awserr.Error's Code and Message methods to get detailed information about
  3226. // the error.
  3227. //
  3228. // See the AWS API reference guide for Amazon Simple Storage Service's
  3229. // API operation GetObjectTagging for usage and error information.
  3230. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  3231. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  3232. req, out := c.GetObjectTaggingRequest(input)
  3233. return out, req.Send()
  3234. }
  3235. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  3236. // the ability to pass a context and additional request options.
  3237. //
  3238. // See GetObjectTagging for details on how to use this API operation.
  3239. //
  3240. // The context must be non-nil and will be used for request cancellation. If
  3241. // the context is nil a panic will occur. In the future the SDK may create
  3242. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3243. // for more information on using Contexts.
  3244. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  3245. req, out := c.GetObjectTaggingRequest(input)
  3246. req.SetContext(ctx)
  3247. req.ApplyOptions(opts...)
  3248. return out, req.Send()
  3249. }
  3250. const opGetObjectTorrent = "GetObjectTorrent"
  3251. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  3252. // client's request for the GetObjectTorrent operation. The "output" return
  3253. // value will be populated with the request's response once the request completes
  3254. // successfully.
  3255. //
  3256. // Use "Send" method on the returned Request to send the API call to the service.
  3257. // the "output" return value is not valid until after Send returns without error.
  3258. //
  3259. // See GetObjectTorrent for more information on using the GetObjectTorrent
  3260. // API call, and error handling.
  3261. //
  3262. // This method is useful when you want to inject custom logic or configuration
  3263. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3264. //
  3265. //
  3266. // // Example sending a request using the GetObjectTorrentRequest method.
  3267. // req, resp := client.GetObjectTorrentRequest(params)
  3268. //
  3269. // err := req.Send()
  3270. // if err == nil { // resp is now filled
  3271. // fmt.Println(resp)
  3272. // }
  3273. //
  3274. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  3275. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  3276. op := &request.Operation{
  3277. Name: opGetObjectTorrent,
  3278. HTTPMethod: "GET",
  3279. HTTPPath: "/{Bucket}/{Key+}?torrent",
  3280. }
  3281. if input == nil {
  3282. input = &GetObjectTorrentInput{}
  3283. }
  3284. output = &GetObjectTorrentOutput{}
  3285. req = c.newRequest(op, input, output)
  3286. return
  3287. }
  3288. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  3289. //
  3290. // Return torrent files from a bucket.
  3291. //
  3292. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3293. // with awserr.Error's Code and Message methods to get detailed information about
  3294. // the error.
  3295. //
  3296. // See the AWS API reference guide for Amazon Simple Storage Service's
  3297. // API operation GetObjectTorrent for usage and error information.
  3298. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  3299. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  3300. req, out := c.GetObjectTorrentRequest(input)
  3301. return out, req.Send()
  3302. }
  3303. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  3304. // the ability to pass a context and additional request options.
  3305. //
  3306. // See GetObjectTorrent for details on how to use this API operation.
  3307. //
  3308. // The context must be non-nil and will be used for request cancellation. If
  3309. // the context is nil a panic will occur. In the future the SDK may create
  3310. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3311. // for more information on using Contexts.
  3312. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  3313. req, out := c.GetObjectTorrentRequest(input)
  3314. req.SetContext(ctx)
  3315. req.ApplyOptions(opts...)
  3316. return out, req.Send()
  3317. }
  3318. const opGetPublicAccessBlock = "GetPublicAccessBlock"
  3319. // GetPublicAccessBlockRequest generates a "aws/request.Request" representing the
  3320. // client's request for the GetPublicAccessBlock operation. The "output" return
  3321. // value will be populated with the request's response once the request completes
  3322. // successfully.
  3323. //
  3324. // Use "Send" method on the returned Request to send the API call to the service.
  3325. // the "output" return value is not valid until after Send returns without error.
  3326. //
  3327. // See GetPublicAccessBlock for more information on using the GetPublicAccessBlock
  3328. // API call, and error handling.
  3329. //
  3330. // This method is useful when you want to inject custom logic or configuration
  3331. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3332. //
  3333. //
  3334. // // Example sending a request using the GetPublicAccessBlockRequest method.
  3335. // req, resp := client.GetPublicAccessBlockRequest(params)
  3336. //
  3337. // err := req.Send()
  3338. // if err == nil { // resp is now filled
  3339. // fmt.Println(resp)
  3340. // }
  3341. //
  3342. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
  3343. func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) {
  3344. op := &request.Operation{
  3345. Name: opGetPublicAccessBlock,
  3346. HTTPMethod: "GET",
  3347. HTTPPath: "/{Bucket}?publicAccessBlock",
  3348. }
  3349. if input == nil {
  3350. input = &GetPublicAccessBlockInput{}
  3351. }
  3352. output = &GetPublicAccessBlockOutput{}
  3353. req = c.newRequest(op, input, output)
  3354. return
  3355. }
  3356. // GetPublicAccessBlock API operation for Amazon Simple Storage Service.
  3357. //
  3358. // Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket.
  3359. //
  3360. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3361. // with awserr.Error's Code and Message methods to get detailed information about
  3362. // the error.
  3363. //
  3364. // See the AWS API reference guide for Amazon Simple Storage Service's
  3365. // API operation GetPublicAccessBlock for usage and error information.
  3366. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
  3367. func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) {
  3368. req, out := c.GetPublicAccessBlockRequest(input)
  3369. return out, req.Send()
  3370. }
  3371. // GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of
  3372. // the ability to pass a context and additional request options.
  3373. //
  3374. // See GetPublicAccessBlock for details on how to use this API operation.
  3375. //
  3376. // The context must be non-nil and will be used for request cancellation. If
  3377. // the context is nil a panic will occur. In the future the SDK may create
  3378. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3379. // for more information on using Contexts.
  3380. func (c *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) {
  3381. req, out := c.GetPublicAccessBlockRequest(input)
  3382. req.SetContext(ctx)
  3383. req.ApplyOptions(opts...)
  3384. return out, req.Send()
  3385. }
  3386. const opHeadBucket = "HeadBucket"
  3387. // HeadBucketRequest generates a "aws/request.Request" representing the
  3388. // client's request for the HeadBucket operation. The "output" return
  3389. // value will be populated with the request's response once the request completes
  3390. // successfully.
  3391. //
  3392. // Use "Send" method on the returned Request to send the API call to the service.
  3393. // the "output" return value is not valid until after Send returns without error.
  3394. //
  3395. // See HeadBucket for more information on using the HeadBucket
  3396. // API call, and error handling.
  3397. //
  3398. // This method is useful when you want to inject custom logic or configuration
  3399. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3400. //
  3401. //
  3402. // // Example sending a request using the HeadBucketRequest method.
  3403. // req, resp := client.HeadBucketRequest(params)
  3404. //
  3405. // err := req.Send()
  3406. // if err == nil { // resp is now filled
  3407. // fmt.Println(resp)
  3408. // }
  3409. //
  3410. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3411. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  3412. op := &request.Operation{
  3413. Name: opHeadBucket,
  3414. HTTPMethod: "HEAD",
  3415. HTTPPath: "/{Bucket}",
  3416. }
  3417. if input == nil {
  3418. input = &HeadBucketInput{}
  3419. }
  3420. output = &HeadBucketOutput{}
  3421. req = c.newRequest(op, input, output)
  3422. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3423. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3424. return
  3425. }
  3426. // HeadBucket API operation for Amazon Simple Storage Service.
  3427. //
  3428. // This operation is useful to determine if a bucket exists and you have permission
  3429. // to access it.
  3430. //
  3431. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3432. // with awserr.Error's Code and Message methods to get detailed information about
  3433. // the error.
  3434. //
  3435. // See the AWS API reference guide for Amazon Simple Storage Service's
  3436. // API operation HeadBucket for usage and error information.
  3437. //
  3438. // Returned Error Codes:
  3439. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3440. // The specified bucket does not exist.
  3441. //
  3442. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3443. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  3444. req, out := c.HeadBucketRequest(input)
  3445. return out, req.Send()
  3446. }
  3447. // HeadBucketWithContext is the same as HeadBucket with the addition of
  3448. // the ability to pass a context and additional request options.
  3449. //
  3450. // See HeadBucket for details on how to use this API operation.
  3451. //
  3452. // The context must be non-nil and will be used for request cancellation. If
  3453. // the context is nil a panic will occur. In the future the SDK may create
  3454. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3455. // for more information on using Contexts.
  3456. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  3457. req, out := c.HeadBucketRequest(input)
  3458. req.SetContext(ctx)
  3459. req.ApplyOptions(opts...)
  3460. return out, req.Send()
  3461. }
  3462. const opHeadObject = "HeadObject"
  3463. // HeadObjectRequest generates a "aws/request.Request" representing the
  3464. // client's request for the HeadObject operation. The "output" return
  3465. // value will be populated with the request's response once the request completes
  3466. // successfully.
  3467. //
  3468. // Use "Send" method on the returned Request to send the API call to the service.
  3469. // the "output" return value is not valid until after Send returns without error.
  3470. //
  3471. // See HeadObject for more information on using the HeadObject
  3472. // API call, and error handling.
  3473. //
  3474. // This method is useful when you want to inject custom logic or configuration
  3475. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3476. //
  3477. //
  3478. // // Example sending a request using the HeadObjectRequest method.
  3479. // req, resp := client.HeadObjectRequest(params)
  3480. //
  3481. // err := req.Send()
  3482. // if err == nil { // resp is now filled
  3483. // fmt.Println(resp)
  3484. // }
  3485. //
  3486. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3487. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  3488. op := &request.Operation{
  3489. Name: opHeadObject,
  3490. HTTPMethod: "HEAD",
  3491. HTTPPath: "/{Bucket}/{Key+}",
  3492. }
  3493. if input == nil {
  3494. input = &HeadObjectInput{}
  3495. }
  3496. output = &HeadObjectOutput{}
  3497. req = c.newRequest(op, input, output)
  3498. return
  3499. }
  3500. // HeadObject API operation for Amazon Simple Storage Service.
  3501. //
  3502. // The HEAD operation retrieves metadata from an object without returning the
  3503. // object itself. This operation is useful if you're only interested in an object's
  3504. // metadata. To use HEAD, you must have READ access to the object.
  3505. //
  3506. // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
  3507. // for more information on returned errors.
  3508. //
  3509. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3510. // with awserr.Error's Code and Message methods to get detailed information about
  3511. // the error.
  3512. //
  3513. // See the AWS API reference guide for Amazon Simple Storage Service's
  3514. // API operation HeadObject for usage and error information.
  3515. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3516. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  3517. req, out := c.HeadObjectRequest(input)
  3518. return out, req.Send()
  3519. }
  3520. // HeadObjectWithContext is the same as HeadObject with the addition of
  3521. // the ability to pass a context and additional request options.
  3522. //
  3523. // See HeadObject for details on how to use this API operation.
  3524. //
  3525. // The context must be non-nil and will be used for request cancellation. If
  3526. // the context is nil a panic will occur. In the future the SDK may create
  3527. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3528. // for more information on using Contexts.
  3529. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  3530. req, out := c.HeadObjectRequest(input)
  3531. req.SetContext(ctx)
  3532. req.ApplyOptions(opts...)
  3533. return out, req.Send()
  3534. }
  3535. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  3536. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  3537. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  3538. // value will be populated with the request's response once the request completes
  3539. // successfully.
  3540. //
  3541. // Use "Send" method on the returned Request to send the API call to the service.
  3542. // the "output" return value is not valid until after Send returns without error.
  3543. //
  3544. // See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
  3545. // API call, and error handling.
  3546. //
  3547. // This method is useful when you want to inject custom logic or configuration
  3548. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3549. //
  3550. //
  3551. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  3552. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  3553. //
  3554. // err := req.Send()
  3555. // if err == nil { // resp is now filled
  3556. // fmt.Println(resp)
  3557. // }
  3558. //
  3559. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3560. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  3561. op := &request.Operation{
  3562. Name: opListBucketAnalyticsConfigurations,
  3563. HTTPMethod: "GET",
  3564. HTTPPath: "/{Bucket}?analytics",
  3565. }
  3566. if input == nil {
  3567. input = &ListBucketAnalyticsConfigurationsInput{}
  3568. }
  3569. output = &ListBucketAnalyticsConfigurationsOutput{}
  3570. req = c.newRequest(op, input, output)
  3571. return
  3572. }
  3573. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  3574. //
  3575. // Lists the analytics configurations for the bucket.
  3576. //
  3577. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3578. // with awserr.Error's Code and Message methods to get detailed information about
  3579. // the error.
  3580. //
  3581. // See the AWS API reference guide for Amazon Simple Storage Service's
  3582. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  3583. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3584. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3585. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3586. return out, req.Send()
  3587. }
  3588. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  3589. // the ability to pass a context and additional request options.
  3590. //
  3591. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  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) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3598. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3599. req.SetContext(ctx)
  3600. req.ApplyOptions(opts...)
  3601. return out, req.Send()
  3602. }
  3603. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  3604. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  3605. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  3606. // value will be populated with the request's response once the request completes
  3607. // successfully.
  3608. //
  3609. // Use "Send" method on the returned Request to send the API call to the service.
  3610. // the "output" return value is not valid until after Send returns without error.
  3611. //
  3612. // See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
  3613. // API call, and error handling.
  3614. //
  3615. // This method is useful when you want to inject custom logic or configuration
  3616. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3617. //
  3618. //
  3619. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  3620. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  3621. //
  3622. // err := req.Send()
  3623. // if err == nil { // resp is now filled
  3624. // fmt.Println(resp)
  3625. // }
  3626. //
  3627. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3628. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  3629. op := &request.Operation{
  3630. Name: opListBucketInventoryConfigurations,
  3631. HTTPMethod: "GET",
  3632. HTTPPath: "/{Bucket}?inventory",
  3633. }
  3634. if input == nil {
  3635. input = &ListBucketInventoryConfigurationsInput{}
  3636. }
  3637. output = &ListBucketInventoryConfigurationsOutput{}
  3638. req = c.newRequest(op, input, output)
  3639. return
  3640. }
  3641. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  3642. //
  3643. // Returns a list of inventory configurations for the bucket.
  3644. //
  3645. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3646. // with awserr.Error's Code and Message methods to get detailed information about
  3647. // the error.
  3648. //
  3649. // See the AWS API reference guide for Amazon Simple Storage Service's
  3650. // API operation ListBucketInventoryConfigurations for usage and error information.
  3651. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3652. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  3653. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3654. return out, req.Send()
  3655. }
  3656. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  3657. // the ability to pass a context and additional request options.
  3658. //
  3659. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  3660. //
  3661. // The context must be non-nil and will be used for request cancellation. If
  3662. // the context is nil a panic will occur. In the future the SDK may create
  3663. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3664. // for more information on using Contexts.
  3665. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  3666. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3667. req.SetContext(ctx)
  3668. req.ApplyOptions(opts...)
  3669. return out, req.Send()
  3670. }
  3671. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  3672. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  3673. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  3674. // value will be populated with the request's response once the request completes
  3675. // successfully.
  3676. //
  3677. // Use "Send" method on the returned Request to send the API call to the service.
  3678. // the "output" return value is not valid until after Send returns without error.
  3679. //
  3680. // See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
  3681. // API call, and error handling.
  3682. //
  3683. // This method is useful when you want to inject custom logic or configuration
  3684. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3685. //
  3686. //
  3687. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  3688. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  3689. //
  3690. // err := req.Send()
  3691. // if err == nil { // resp is now filled
  3692. // fmt.Println(resp)
  3693. // }
  3694. //
  3695. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3696. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  3697. op := &request.Operation{
  3698. Name: opListBucketMetricsConfigurations,
  3699. HTTPMethod: "GET",
  3700. HTTPPath: "/{Bucket}?metrics",
  3701. }
  3702. if input == nil {
  3703. input = &ListBucketMetricsConfigurationsInput{}
  3704. }
  3705. output = &ListBucketMetricsConfigurationsOutput{}
  3706. req = c.newRequest(op, input, output)
  3707. return
  3708. }
  3709. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  3710. //
  3711. // Lists the metrics configurations for the bucket.
  3712. //
  3713. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3714. // with awserr.Error's Code and Message methods to get detailed information about
  3715. // the error.
  3716. //
  3717. // See the AWS API reference guide for Amazon Simple Storage Service's
  3718. // API operation ListBucketMetricsConfigurations for usage and error information.
  3719. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3720. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  3721. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3722. return out, req.Send()
  3723. }
  3724. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  3725. // the ability to pass a context and additional request options.
  3726. //
  3727. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  3728. //
  3729. // The context must be non-nil and will be used for request cancellation. If
  3730. // the context is nil a panic will occur. In the future the SDK may create
  3731. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3732. // for more information on using Contexts.
  3733. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  3734. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3735. req.SetContext(ctx)
  3736. req.ApplyOptions(opts...)
  3737. return out, req.Send()
  3738. }
  3739. const opListBuckets = "ListBuckets"
  3740. // ListBucketsRequest generates a "aws/request.Request" representing the
  3741. // client's request for the ListBuckets operation. The "output" return
  3742. // value will be populated with the request's response once the request completes
  3743. // successfully.
  3744. //
  3745. // Use "Send" method on the returned Request to send the API call to the service.
  3746. // the "output" return value is not valid until after Send returns without error.
  3747. //
  3748. // See ListBuckets for more information on using the ListBuckets
  3749. // API call, and error handling.
  3750. //
  3751. // This method is useful when you want to inject custom logic or configuration
  3752. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3753. //
  3754. //
  3755. // // Example sending a request using the ListBucketsRequest method.
  3756. // req, resp := client.ListBucketsRequest(params)
  3757. //
  3758. // err := req.Send()
  3759. // if err == nil { // resp is now filled
  3760. // fmt.Println(resp)
  3761. // }
  3762. //
  3763. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3764. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  3765. op := &request.Operation{
  3766. Name: opListBuckets,
  3767. HTTPMethod: "GET",
  3768. HTTPPath: "/",
  3769. }
  3770. if input == nil {
  3771. input = &ListBucketsInput{}
  3772. }
  3773. output = &ListBucketsOutput{}
  3774. req = c.newRequest(op, input, output)
  3775. return
  3776. }
  3777. // ListBuckets API operation for Amazon Simple Storage Service.
  3778. //
  3779. // Returns a list of all buckets owned by the authenticated sender of the request.
  3780. //
  3781. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3782. // with awserr.Error's Code and Message methods to get detailed information about
  3783. // the error.
  3784. //
  3785. // See the AWS API reference guide for Amazon Simple Storage Service's
  3786. // API operation ListBuckets for usage and error information.
  3787. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3788. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  3789. req, out := c.ListBucketsRequest(input)
  3790. return out, req.Send()
  3791. }
  3792. // ListBucketsWithContext is the same as ListBuckets with the addition of
  3793. // the ability to pass a context and additional request options.
  3794. //
  3795. // See ListBuckets for details on how to use this API operation.
  3796. //
  3797. // The context must be non-nil and will be used for request cancellation. If
  3798. // the context is nil a panic will occur. In the future the SDK may create
  3799. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3800. // for more information on using Contexts.
  3801. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  3802. req, out := c.ListBucketsRequest(input)
  3803. req.SetContext(ctx)
  3804. req.ApplyOptions(opts...)
  3805. return out, req.Send()
  3806. }
  3807. const opListMultipartUploads = "ListMultipartUploads"
  3808. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  3809. // client's request for the ListMultipartUploads operation. The "output" return
  3810. // value will be populated with the request's response once the request completes
  3811. // successfully.
  3812. //
  3813. // Use "Send" method on the returned Request to send the API call to the service.
  3814. // the "output" return value is not valid until after Send returns without error.
  3815. //
  3816. // See ListMultipartUploads for more information on using the ListMultipartUploads
  3817. // API call, and error handling.
  3818. //
  3819. // This method is useful when you want to inject custom logic or configuration
  3820. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3821. //
  3822. //
  3823. // // Example sending a request using the ListMultipartUploadsRequest method.
  3824. // req, resp := client.ListMultipartUploadsRequest(params)
  3825. //
  3826. // err := req.Send()
  3827. // if err == nil { // resp is now filled
  3828. // fmt.Println(resp)
  3829. // }
  3830. //
  3831. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3832. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  3833. op := &request.Operation{
  3834. Name: opListMultipartUploads,
  3835. HTTPMethod: "GET",
  3836. HTTPPath: "/{Bucket}?uploads",
  3837. Paginator: &request.Paginator{
  3838. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  3839. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  3840. LimitToken: "MaxUploads",
  3841. TruncationToken: "IsTruncated",
  3842. },
  3843. }
  3844. if input == nil {
  3845. input = &ListMultipartUploadsInput{}
  3846. }
  3847. output = &ListMultipartUploadsOutput{}
  3848. req = c.newRequest(op, input, output)
  3849. return
  3850. }
  3851. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  3852. //
  3853. // This operation lists in-progress multipart uploads.
  3854. //
  3855. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3856. // with awserr.Error's Code and Message methods to get detailed information about
  3857. // the error.
  3858. //
  3859. // See the AWS API reference guide for Amazon Simple Storage Service's
  3860. // API operation ListMultipartUploads for usage and error information.
  3861. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3862. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  3863. req, out := c.ListMultipartUploadsRequest(input)
  3864. return out, req.Send()
  3865. }
  3866. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  3867. // the ability to pass a context and additional request options.
  3868. //
  3869. // See ListMultipartUploads for details on how to use this API operation.
  3870. //
  3871. // The context must be non-nil and will be used for request cancellation. If
  3872. // the context is nil a panic will occur. In the future the SDK may create
  3873. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3874. // for more information on using Contexts.
  3875. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  3876. req, out := c.ListMultipartUploadsRequest(input)
  3877. req.SetContext(ctx)
  3878. req.ApplyOptions(opts...)
  3879. return out, req.Send()
  3880. }
  3881. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  3882. // calling the "fn" function with the response data for each page. To stop
  3883. // iterating, return false from the fn function.
  3884. //
  3885. // See ListMultipartUploads method for more information on how to use this operation.
  3886. //
  3887. // Note: This operation can generate multiple requests to a service.
  3888. //
  3889. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  3890. // pageNum := 0
  3891. // err := client.ListMultipartUploadsPages(params,
  3892. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  3893. // pageNum++
  3894. // fmt.Println(page)
  3895. // return pageNum <= 3
  3896. // })
  3897. //
  3898. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  3899. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  3900. }
  3901. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  3902. // it takes a Context and allows setting request options on the pages.
  3903. //
  3904. // The context must be non-nil and will be used for request cancellation. If
  3905. // the context is nil a panic will occur. In the future the SDK may create
  3906. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3907. // for more information on using Contexts.
  3908. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  3909. p := request.Pagination{
  3910. NewRequest: func() (*request.Request, error) {
  3911. var inCpy *ListMultipartUploadsInput
  3912. if input != nil {
  3913. tmp := *input
  3914. inCpy = &tmp
  3915. }
  3916. req, _ := c.ListMultipartUploadsRequest(inCpy)
  3917. req.SetContext(ctx)
  3918. req.ApplyOptions(opts...)
  3919. return req, nil
  3920. },
  3921. }
  3922. cont := true
  3923. for p.Next() && cont {
  3924. cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
  3925. }
  3926. return p.Err()
  3927. }
  3928. const opListObjectVersions = "ListObjectVersions"
  3929. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  3930. // client's request for the ListObjectVersions operation. The "output" return
  3931. // value will be populated with the request's response once the request completes
  3932. // successfully.
  3933. //
  3934. // Use "Send" method on the returned Request to send the API call to the service.
  3935. // the "output" return value is not valid until after Send returns without error.
  3936. //
  3937. // See ListObjectVersions for more information on using the ListObjectVersions
  3938. // API call, and error handling.
  3939. //
  3940. // This method is useful when you want to inject custom logic or configuration
  3941. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3942. //
  3943. //
  3944. // // Example sending a request using the ListObjectVersionsRequest method.
  3945. // req, resp := client.ListObjectVersionsRequest(params)
  3946. //
  3947. // err := req.Send()
  3948. // if err == nil { // resp is now filled
  3949. // fmt.Println(resp)
  3950. // }
  3951. //
  3952. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3953. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  3954. op := &request.Operation{
  3955. Name: opListObjectVersions,
  3956. HTTPMethod: "GET",
  3957. HTTPPath: "/{Bucket}?versions",
  3958. Paginator: &request.Paginator{
  3959. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  3960. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  3961. LimitToken: "MaxKeys",
  3962. TruncationToken: "IsTruncated",
  3963. },
  3964. }
  3965. if input == nil {
  3966. input = &ListObjectVersionsInput{}
  3967. }
  3968. output = &ListObjectVersionsOutput{}
  3969. req = c.newRequest(op, input, output)
  3970. return
  3971. }
  3972. // ListObjectVersions API operation for Amazon Simple Storage Service.
  3973. //
  3974. // Returns metadata about all of the versions of objects in a bucket.
  3975. //
  3976. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3977. // with awserr.Error's Code and Message methods to get detailed information about
  3978. // the error.
  3979. //
  3980. // See the AWS API reference guide for Amazon Simple Storage Service's
  3981. // API operation ListObjectVersions for usage and error information.
  3982. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3983. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  3984. req, out := c.ListObjectVersionsRequest(input)
  3985. return out, req.Send()
  3986. }
  3987. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  3988. // the ability to pass a context and additional request options.
  3989. //
  3990. // See ListObjectVersions for details on how to use this API operation.
  3991. //
  3992. // The context must be non-nil and will be used for request cancellation. If
  3993. // the context is nil a panic will occur. In the future the SDK may create
  3994. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3995. // for more information on using Contexts.
  3996. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  3997. req, out := c.ListObjectVersionsRequest(input)
  3998. req.SetContext(ctx)
  3999. req.ApplyOptions(opts...)
  4000. return out, req.Send()
  4001. }
  4002. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  4003. // calling the "fn" function with the response data for each page. To stop
  4004. // iterating, return false from the fn function.
  4005. //
  4006. // See ListObjectVersions method for more information on how to use this operation.
  4007. //
  4008. // Note: This operation can generate multiple requests to a service.
  4009. //
  4010. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  4011. // pageNum := 0
  4012. // err := client.ListObjectVersionsPages(params,
  4013. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  4014. // pageNum++
  4015. // fmt.Println(page)
  4016. // return pageNum <= 3
  4017. // })
  4018. //
  4019. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  4020. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  4021. }
  4022. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  4023. // it takes a Context and allows setting request options on the pages.
  4024. //
  4025. // The context must be non-nil and will be used for request cancellation. If
  4026. // the context is nil a panic will occur. In the future the SDK may create
  4027. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4028. // for more information on using Contexts.
  4029. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  4030. p := request.Pagination{
  4031. NewRequest: func() (*request.Request, error) {
  4032. var inCpy *ListObjectVersionsInput
  4033. if input != nil {
  4034. tmp := *input
  4035. inCpy = &tmp
  4036. }
  4037. req, _ := c.ListObjectVersionsRequest(inCpy)
  4038. req.SetContext(ctx)
  4039. req.ApplyOptions(opts...)
  4040. return req, nil
  4041. },
  4042. }
  4043. cont := true
  4044. for p.Next() && cont {
  4045. cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
  4046. }
  4047. return p.Err()
  4048. }
  4049. const opListObjects = "ListObjects"
  4050. // ListObjectsRequest generates a "aws/request.Request" representing the
  4051. // client's request for the ListObjects operation. The "output" return
  4052. // value will be populated with the request's response once the request completes
  4053. // successfully.
  4054. //
  4055. // Use "Send" method on the returned Request to send the API call to the service.
  4056. // the "output" return value is not valid until after Send returns without error.
  4057. //
  4058. // See ListObjects for more information on using the ListObjects
  4059. // API call, and error handling.
  4060. //
  4061. // This method is useful when you want to inject custom logic or configuration
  4062. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4063. //
  4064. //
  4065. // // Example sending a request using the ListObjectsRequest method.
  4066. // req, resp := client.ListObjectsRequest(params)
  4067. //
  4068. // err := req.Send()
  4069. // if err == nil { // resp is now filled
  4070. // fmt.Println(resp)
  4071. // }
  4072. //
  4073. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  4074. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  4075. op := &request.Operation{
  4076. Name: opListObjects,
  4077. HTTPMethod: "GET",
  4078. HTTPPath: "/{Bucket}",
  4079. Paginator: &request.Paginator{
  4080. InputTokens: []string{"Marker"},
  4081. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  4082. LimitToken: "MaxKeys",
  4083. TruncationToken: "IsTruncated",
  4084. },
  4085. }
  4086. if input == nil {
  4087. input = &ListObjectsInput{}
  4088. }
  4089. output = &ListObjectsOutput{}
  4090. req = c.newRequest(op, input, output)
  4091. return
  4092. }
  4093. // ListObjects API operation for Amazon Simple Storage Service.
  4094. //
  4095. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  4096. // the request parameters as selection criteria to return a subset of the objects
  4097. // in a bucket.
  4098. //
  4099. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4100. // with awserr.Error's Code and Message methods to get detailed information about
  4101. // the error.
  4102. //
  4103. // See the AWS API reference guide for Amazon Simple Storage Service's
  4104. // API operation ListObjects for usage and error information.
  4105. //
  4106. // Returned Error Codes:
  4107. // * ErrCodeNoSuchBucket "NoSuchBucket"
  4108. // The specified bucket does not exist.
  4109. //
  4110. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  4111. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  4112. req, out := c.ListObjectsRequest(input)
  4113. return out, req.Send()
  4114. }
  4115. // ListObjectsWithContext is the same as ListObjects with the addition of
  4116. // the ability to pass a context and additional request options.
  4117. //
  4118. // See ListObjects for details on how to use this API operation.
  4119. //
  4120. // The context must be non-nil and will be used for request cancellation. If
  4121. // the context is nil a panic will occur. In the future the SDK may create
  4122. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4123. // for more information on using Contexts.
  4124. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  4125. req, out := c.ListObjectsRequest(input)
  4126. req.SetContext(ctx)
  4127. req.ApplyOptions(opts...)
  4128. return out, req.Send()
  4129. }
  4130. // ListObjectsPages iterates over the pages of a ListObjects operation,
  4131. // calling the "fn" function with the response data for each page. To stop
  4132. // iterating, return false from the fn function.
  4133. //
  4134. // See ListObjects method for more information on how to use this operation.
  4135. //
  4136. // Note: This operation can generate multiple requests to a service.
  4137. //
  4138. // // Example iterating over at most 3 pages of a ListObjects operation.
  4139. // pageNum := 0
  4140. // err := client.ListObjectsPages(params,
  4141. // func(page *ListObjectsOutput, lastPage bool) bool {
  4142. // pageNum++
  4143. // fmt.Println(page)
  4144. // return pageNum <= 3
  4145. // })
  4146. //
  4147. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  4148. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  4149. }
  4150. // ListObjectsPagesWithContext same as ListObjectsPages except
  4151. // it takes a Context and allows setting request options on the pages.
  4152. //
  4153. // The context must be non-nil and will be used for request cancellation. If
  4154. // the context is nil a panic will occur. In the future the SDK may create
  4155. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4156. // for more information on using Contexts.
  4157. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  4158. p := request.Pagination{
  4159. NewRequest: func() (*request.Request, error) {
  4160. var inCpy *ListObjectsInput
  4161. if input != nil {
  4162. tmp := *input
  4163. inCpy = &tmp
  4164. }
  4165. req, _ := c.ListObjectsRequest(inCpy)
  4166. req.SetContext(ctx)
  4167. req.ApplyOptions(opts...)
  4168. return req, nil
  4169. },
  4170. }
  4171. cont := true
  4172. for p.Next() && cont {
  4173. cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
  4174. }
  4175. return p.Err()
  4176. }
  4177. const opListObjectsV2 = "ListObjectsV2"
  4178. // ListObjectsV2Request generates a "aws/request.Request" representing the
  4179. // client's request for the ListObjectsV2 operation. The "output" return
  4180. // value will be populated with the request's response once the request completes
  4181. // successfully.
  4182. //
  4183. // Use "Send" method on the returned Request to send the API call to the service.
  4184. // the "output" return value is not valid until after Send returns without error.
  4185. //
  4186. // See ListObjectsV2 for more information on using the ListObjectsV2
  4187. // API call, and error handling.
  4188. //
  4189. // This method is useful when you want to inject custom logic or configuration
  4190. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4191. //
  4192. //
  4193. // // Example sending a request using the ListObjectsV2Request method.
  4194. // req, resp := client.ListObjectsV2Request(params)
  4195. //
  4196. // err := req.Send()
  4197. // if err == nil { // resp is now filled
  4198. // fmt.Println(resp)
  4199. // }
  4200. //
  4201. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  4202. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  4203. op := &request.Operation{
  4204. Name: opListObjectsV2,
  4205. HTTPMethod: "GET",
  4206. HTTPPath: "/{Bucket}?list-type=2",
  4207. Paginator: &request.Paginator{
  4208. InputTokens: []string{"ContinuationToken"},
  4209. OutputTokens: []string{"NextContinuationToken"},
  4210. LimitToken: "MaxKeys",
  4211. TruncationToken: "",
  4212. },
  4213. }
  4214. if input == nil {
  4215. input = &ListObjectsV2Input{}
  4216. }
  4217. output = &ListObjectsV2Output{}
  4218. req = c.newRequest(op, input, output)
  4219. return
  4220. }
  4221. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  4222. //
  4223. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  4224. // the request parameters as selection criteria to return a subset of the objects
  4225. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  4226. // you use this revised API for new application development.
  4227. //
  4228. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4229. // with awserr.Error's Code and Message methods to get detailed information about
  4230. // the error.
  4231. //
  4232. // See the AWS API reference guide for Amazon Simple Storage Service's
  4233. // API operation ListObjectsV2 for usage and error information.
  4234. //
  4235. // Returned Error Codes:
  4236. // * ErrCodeNoSuchBucket "NoSuchBucket"
  4237. // The specified bucket does not exist.
  4238. //
  4239. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  4240. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  4241. req, out := c.ListObjectsV2Request(input)
  4242. return out, req.Send()
  4243. }
  4244. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  4245. // the ability to pass a context and additional request options.
  4246. //
  4247. // See ListObjectsV2 for details on how to use this API operation.
  4248. //
  4249. // The context must be non-nil and will be used for request cancellation. If
  4250. // the context is nil a panic will occur. In the future the SDK may create
  4251. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4252. // for more information on using Contexts.
  4253. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  4254. req, out := c.ListObjectsV2Request(input)
  4255. req.SetContext(ctx)
  4256. req.ApplyOptions(opts...)
  4257. return out, req.Send()
  4258. }
  4259. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  4260. // calling the "fn" function with the response data for each page. To stop
  4261. // iterating, return false from the fn function.
  4262. //
  4263. // See ListObjectsV2 method for more information on how to use this operation.
  4264. //
  4265. // Note: This operation can generate multiple requests to a service.
  4266. //
  4267. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  4268. // pageNum := 0
  4269. // err := client.ListObjectsV2Pages(params,
  4270. // func(page *ListObjectsV2Output, lastPage bool) bool {
  4271. // pageNum++
  4272. // fmt.Println(page)
  4273. // return pageNum <= 3
  4274. // })
  4275. //
  4276. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  4277. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  4278. }
  4279. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  4280. // it takes a Context and allows setting request options on the pages.
  4281. //
  4282. // The context must be non-nil and will be used for request cancellation. If
  4283. // the context is nil a panic will occur. In the future the SDK may create
  4284. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4285. // for more information on using Contexts.
  4286. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  4287. p := request.Pagination{
  4288. NewRequest: func() (*request.Request, error) {
  4289. var inCpy *ListObjectsV2Input
  4290. if input != nil {
  4291. tmp := *input
  4292. inCpy = &tmp
  4293. }
  4294. req, _ := c.ListObjectsV2Request(inCpy)
  4295. req.SetContext(ctx)
  4296. req.ApplyOptions(opts...)
  4297. return req, nil
  4298. },
  4299. }
  4300. cont := true
  4301. for p.Next() && cont {
  4302. cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
  4303. }
  4304. return p.Err()
  4305. }
  4306. const opListParts = "ListParts"
  4307. // ListPartsRequest generates a "aws/request.Request" representing the
  4308. // client's request for the ListParts operation. The "output" return
  4309. // value will be populated with the request's response once the request completes
  4310. // successfully.
  4311. //
  4312. // Use "Send" method on the returned Request to send the API call to the service.
  4313. // the "output" return value is not valid until after Send returns without error.
  4314. //
  4315. // See ListParts for more information on using the ListParts
  4316. // API call, and error handling.
  4317. //
  4318. // This method is useful when you want to inject custom logic or configuration
  4319. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4320. //
  4321. //
  4322. // // Example sending a request using the ListPartsRequest method.
  4323. // req, resp := client.ListPartsRequest(params)
  4324. //
  4325. // err := req.Send()
  4326. // if err == nil { // resp is now filled
  4327. // fmt.Println(resp)
  4328. // }
  4329. //
  4330. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  4331. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  4332. op := &request.Operation{
  4333. Name: opListParts,
  4334. HTTPMethod: "GET",
  4335. HTTPPath: "/{Bucket}/{Key+}",
  4336. Paginator: &request.Paginator{
  4337. InputTokens: []string{"PartNumberMarker"},
  4338. OutputTokens: []string{"NextPartNumberMarker"},
  4339. LimitToken: "MaxParts",
  4340. TruncationToken: "IsTruncated",
  4341. },
  4342. }
  4343. if input == nil {
  4344. input = &ListPartsInput{}
  4345. }
  4346. output = &ListPartsOutput{}
  4347. req = c.newRequest(op, input, output)
  4348. return
  4349. }
  4350. // ListParts API operation for Amazon Simple Storage Service.
  4351. //
  4352. // Lists the parts that have been uploaded for a specific multipart upload.
  4353. //
  4354. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4355. // with awserr.Error's Code and Message methods to get detailed information about
  4356. // the error.
  4357. //
  4358. // See the AWS API reference guide for Amazon Simple Storage Service's
  4359. // API operation ListParts for usage and error information.
  4360. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  4361. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  4362. req, out := c.ListPartsRequest(input)
  4363. return out, req.Send()
  4364. }
  4365. // ListPartsWithContext is the same as ListParts with the addition of
  4366. // the ability to pass a context and additional request options.
  4367. //
  4368. // See ListParts for details on how to use this API operation.
  4369. //
  4370. // The context must be non-nil and will be used for request cancellation. If
  4371. // the context is nil a panic will occur. In the future the SDK may create
  4372. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4373. // for more information on using Contexts.
  4374. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  4375. req, out := c.ListPartsRequest(input)
  4376. req.SetContext(ctx)
  4377. req.ApplyOptions(opts...)
  4378. return out, req.Send()
  4379. }
  4380. // ListPartsPages iterates over the pages of a ListParts operation,
  4381. // calling the "fn" function with the response data for each page. To stop
  4382. // iterating, return false from the fn function.
  4383. //
  4384. // See ListParts method for more information on how to use this operation.
  4385. //
  4386. // Note: This operation can generate multiple requests to a service.
  4387. //
  4388. // // Example iterating over at most 3 pages of a ListParts operation.
  4389. // pageNum := 0
  4390. // err := client.ListPartsPages(params,
  4391. // func(page *ListPartsOutput, lastPage bool) bool {
  4392. // pageNum++
  4393. // fmt.Println(page)
  4394. // return pageNum <= 3
  4395. // })
  4396. //
  4397. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  4398. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  4399. }
  4400. // ListPartsPagesWithContext same as ListPartsPages except
  4401. // it takes a Context and allows setting request options on the pages.
  4402. //
  4403. // The context must be non-nil and will be used for request cancellation. If
  4404. // the context is nil a panic will occur. In the future the SDK may create
  4405. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4406. // for more information on using Contexts.
  4407. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  4408. p := request.Pagination{
  4409. NewRequest: func() (*request.Request, error) {
  4410. var inCpy *ListPartsInput
  4411. if input != nil {
  4412. tmp := *input
  4413. inCpy = &tmp
  4414. }
  4415. req, _ := c.ListPartsRequest(inCpy)
  4416. req.SetContext(ctx)
  4417. req.ApplyOptions(opts...)
  4418. return req, nil
  4419. },
  4420. }
  4421. cont := true
  4422. for p.Next() && cont {
  4423. cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
  4424. }
  4425. return p.Err()
  4426. }
  4427. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  4428. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  4429. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  4430. // value will be populated with the request's response once the request completes
  4431. // successfully.
  4432. //
  4433. // Use "Send" method on the returned Request to send the API call to the service.
  4434. // the "output" return value is not valid until after Send returns without error.
  4435. //
  4436. // See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
  4437. // API call, and error handling.
  4438. //
  4439. // This method is useful when you want to inject custom logic or configuration
  4440. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4441. //
  4442. //
  4443. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  4444. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  4445. //
  4446. // err := req.Send()
  4447. // if err == nil { // resp is now filled
  4448. // fmt.Println(resp)
  4449. // }
  4450. //
  4451. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4452. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  4453. op := &request.Operation{
  4454. Name: opPutBucketAccelerateConfiguration,
  4455. HTTPMethod: "PUT",
  4456. HTTPPath: "/{Bucket}?accelerate",
  4457. }
  4458. if input == nil {
  4459. input = &PutBucketAccelerateConfigurationInput{}
  4460. }
  4461. output = &PutBucketAccelerateConfigurationOutput{}
  4462. req = c.newRequest(op, input, output)
  4463. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4464. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4465. return
  4466. }
  4467. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  4468. //
  4469. // Sets the accelerate configuration of an existing bucket.
  4470. //
  4471. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4472. // with awserr.Error's Code and Message methods to get detailed information about
  4473. // the error.
  4474. //
  4475. // See the AWS API reference guide for Amazon Simple Storage Service's
  4476. // API operation PutBucketAccelerateConfiguration for usage and error information.
  4477. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4478. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  4479. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4480. return out, req.Send()
  4481. }
  4482. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  4483. // the ability to pass a context and additional request options.
  4484. //
  4485. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  4486. //
  4487. // The context must be non-nil and will be used for request cancellation. If
  4488. // the context is nil a panic will occur. In the future the SDK may create
  4489. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4490. // for more information on using Contexts.
  4491. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  4492. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4493. req.SetContext(ctx)
  4494. req.ApplyOptions(opts...)
  4495. return out, req.Send()
  4496. }
  4497. const opPutBucketAcl = "PutBucketAcl"
  4498. // PutBucketAclRequest generates a "aws/request.Request" representing the
  4499. // client's request for the PutBucketAcl operation. The "output" return
  4500. // value will be populated with the request's response once the request completes
  4501. // successfully.
  4502. //
  4503. // Use "Send" method on the returned Request to send the API call to the service.
  4504. // the "output" return value is not valid until after Send returns without error.
  4505. //
  4506. // See PutBucketAcl for more information on using the PutBucketAcl
  4507. // API call, and error handling.
  4508. //
  4509. // This method is useful when you want to inject custom logic or configuration
  4510. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4511. //
  4512. //
  4513. // // Example sending a request using the PutBucketAclRequest method.
  4514. // req, resp := client.PutBucketAclRequest(params)
  4515. //
  4516. // err := req.Send()
  4517. // if err == nil { // resp is now filled
  4518. // fmt.Println(resp)
  4519. // }
  4520. //
  4521. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4522. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  4523. op := &request.Operation{
  4524. Name: opPutBucketAcl,
  4525. HTTPMethod: "PUT",
  4526. HTTPPath: "/{Bucket}?acl",
  4527. }
  4528. if input == nil {
  4529. input = &PutBucketAclInput{}
  4530. }
  4531. output = &PutBucketAclOutput{}
  4532. req = c.newRequest(op, input, output)
  4533. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4534. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4535. return
  4536. }
  4537. // PutBucketAcl API operation for Amazon Simple Storage Service.
  4538. //
  4539. // Sets the permissions on a bucket using access control lists (ACL).
  4540. //
  4541. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4542. // with awserr.Error's Code and Message methods to get detailed information about
  4543. // the error.
  4544. //
  4545. // See the AWS API reference guide for Amazon Simple Storage Service's
  4546. // API operation PutBucketAcl for usage and error information.
  4547. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4548. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  4549. req, out := c.PutBucketAclRequest(input)
  4550. return out, req.Send()
  4551. }
  4552. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  4553. // the ability to pass a context and additional request options.
  4554. //
  4555. // See PutBucketAcl for details on how to use this API operation.
  4556. //
  4557. // The context must be non-nil and will be used for request cancellation. If
  4558. // the context is nil a panic will occur. In the future the SDK may create
  4559. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4560. // for more information on using Contexts.
  4561. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  4562. req, out := c.PutBucketAclRequest(input)
  4563. req.SetContext(ctx)
  4564. req.ApplyOptions(opts...)
  4565. return out, req.Send()
  4566. }
  4567. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  4568. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  4569. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  4570. // value will be populated with the request's response once the request completes
  4571. // successfully.
  4572. //
  4573. // Use "Send" method on the returned Request to send the API call to the service.
  4574. // the "output" return value is not valid until after Send returns without error.
  4575. //
  4576. // See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
  4577. // API call, and error handling.
  4578. //
  4579. // This method is useful when you want to inject custom logic or configuration
  4580. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4581. //
  4582. //
  4583. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  4584. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  4585. //
  4586. // err := req.Send()
  4587. // if err == nil { // resp is now filled
  4588. // fmt.Println(resp)
  4589. // }
  4590. //
  4591. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4592. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  4593. op := &request.Operation{
  4594. Name: opPutBucketAnalyticsConfiguration,
  4595. HTTPMethod: "PUT",
  4596. HTTPPath: "/{Bucket}?analytics",
  4597. }
  4598. if input == nil {
  4599. input = &PutBucketAnalyticsConfigurationInput{}
  4600. }
  4601. output = &PutBucketAnalyticsConfigurationOutput{}
  4602. req = c.newRequest(op, input, output)
  4603. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4604. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4605. return
  4606. }
  4607. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  4608. //
  4609. // Sets an analytics configuration for the bucket (specified by the analytics
  4610. // configuration ID).
  4611. //
  4612. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4613. // with awserr.Error's Code and Message methods to get detailed information about
  4614. // the error.
  4615. //
  4616. // See the AWS API reference guide for Amazon Simple Storage Service's
  4617. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  4618. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4619. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  4620. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4621. return out, req.Send()
  4622. }
  4623. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  4624. // the ability to pass a context and additional request options.
  4625. //
  4626. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  4627. //
  4628. // The context must be non-nil and will be used for request cancellation. If
  4629. // the context is nil a panic will occur. In the future the SDK may create
  4630. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4631. // for more information on using Contexts.
  4632. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  4633. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4634. req.SetContext(ctx)
  4635. req.ApplyOptions(opts...)
  4636. return out, req.Send()
  4637. }
  4638. const opPutBucketCors = "PutBucketCors"
  4639. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  4640. // client's request for the PutBucketCors operation. The "output" return
  4641. // value will be populated with the request's response once the request completes
  4642. // successfully.
  4643. //
  4644. // Use "Send" method on the returned Request to send the API call to the service.
  4645. // the "output" return value is not valid until after Send returns without error.
  4646. //
  4647. // See PutBucketCors for more information on using the PutBucketCors
  4648. // API call, and error handling.
  4649. //
  4650. // This method is useful when you want to inject custom logic or configuration
  4651. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4652. //
  4653. //
  4654. // // Example sending a request using the PutBucketCorsRequest method.
  4655. // req, resp := client.PutBucketCorsRequest(params)
  4656. //
  4657. // err := req.Send()
  4658. // if err == nil { // resp is now filled
  4659. // fmt.Println(resp)
  4660. // }
  4661. //
  4662. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4663. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  4664. op := &request.Operation{
  4665. Name: opPutBucketCors,
  4666. HTTPMethod: "PUT",
  4667. HTTPPath: "/{Bucket}?cors",
  4668. }
  4669. if input == nil {
  4670. input = &PutBucketCorsInput{}
  4671. }
  4672. output = &PutBucketCorsOutput{}
  4673. req = c.newRequest(op, input, output)
  4674. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4675. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4676. return
  4677. }
  4678. // PutBucketCors API operation for Amazon Simple Storage Service.
  4679. //
  4680. // Sets the CORS configuration for a bucket.
  4681. //
  4682. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4683. // with awserr.Error's Code and Message methods to get detailed information about
  4684. // the error.
  4685. //
  4686. // See the AWS API reference guide for Amazon Simple Storage Service's
  4687. // API operation PutBucketCors for usage and error information.
  4688. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4689. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  4690. req, out := c.PutBucketCorsRequest(input)
  4691. return out, req.Send()
  4692. }
  4693. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  4694. // the ability to pass a context and additional request options.
  4695. //
  4696. // See PutBucketCors for details on how to use this API operation.
  4697. //
  4698. // The context must be non-nil and will be used for request cancellation. If
  4699. // the context is nil a panic will occur. In the future the SDK may create
  4700. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4701. // for more information on using Contexts.
  4702. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  4703. req, out := c.PutBucketCorsRequest(input)
  4704. req.SetContext(ctx)
  4705. req.ApplyOptions(opts...)
  4706. return out, req.Send()
  4707. }
  4708. const opPutBucketEncryption = "PutBucketEncryption"
  4709. // PutBucketEncryptionRequest generates a "aws/request.Request" representing the
  4710. // client's request for the PutBucketEncryption operation. The "output" return
  4711. // value will be populated with the request's response once the request completes
  4712. // successfully.
  4713. //
  4714. // Use "Send" method on the returned Request to send the API call to the service.
  4715. // the "output" return value is not valid until after Send returns without error.
  4716. //
  4717. // See PutBucketEncryption for more information on using the PutBucketEncryption
  4718. // API call, and error handling.
  4719. //
  4720. // This method is useful when you want to inject custom logic or configuration
  4721. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4722. //
  4723. //
  4724. // // Example sending a request using the PutBucketEncryptionRequest method.
  4725. // req, resp := client.PutBucketEncryptionRequest(params)
  4726. //
  4727. // err := req.Send()
  4728. // if err == nil { // resp is now filled
  4729. // fmt.Println(resp)
  4730. // }
  4731. //
  4732. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4733. func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
  4734. op := &request.Operation{
  4735. Name: opPutBucketEncryption,
  4736. HTTPMethod: "PUT",
  4737. HTTPPath: "/{Bucket}?encryption",
  4738. }
  4739. if input == nil {
  4740. input = &PutBucketEncryptionInput{}
  4741. }
  4742. output = &PutBucketEncryptionOutput{}
  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. // PutBucketEncryption API operation for Amazon Simple Storage Service.
  4749. //
  4750. // Creates a new server-side encryption configuration (or replaces an existing
  4751. // one, if present).
  4752. //
  4753. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4754. // with awserr.Error's Code and Message methods to get detailed information about
  4755. // the error.
  4756. //
  4757. // See the AWS API reference guide for Amazon Simple Storage Service's
  4758. // API operation PutBucketEncryption for usage and error information.
  4759. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4760. func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
  4761. req, out := c.PutBucketEncryptionRequest(input)
  4762. return out, req.Send()
  4763. }
  4764. // PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
  4765. // the ability to pass a context and additional request options.
  4766. //
  4767. // See PutBucketEncryption for details on how to use this API operation.
  4768. //
  4769. // The context must be non-nil and will be used for request cancellation. If
  4770. // the context is nil a panic will occur. In the future the SDK may create
  4771. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4772. // for more information on using Contexts.
  4773. func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
  4774. req, out := c.PutBucketEncryptionRequest(input)
  4775. req.SetContext(ctx)
  4776. req.ApplyOptions(opts...)
  4777. return out, req.Send()
  4778. }
  4779. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  4780. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  4781. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  4782. // value will be populated with the request's response once the request completes
  4783. // successfully.
  4784. //
  4785. // Use "Send" method on the returned Request to send the API call to the service.
  4786. // the "output" return value is not valid until after Send returns without error.
  4787. //
  4788. // See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
  4789. // API call, and error handling.
  4790. //
  4791. // This method is useful when you want to inject custom logic or configuration
  4792. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4793. //
  4794. //
  4795. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  4796. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  4797. //
  4798. // err := req.Send()
  4799. // if err == nil { // resp is now filled
  4800. // fmt.Println(resp)
  4801. // }
  4802. //
  4803. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4804. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  4805. op := &request.Operation{
  4806. Name: opPutBucketInventoryConfiguration,
  4807. HTTPMethod: "PUT",
  4808. HTTPPath: "/{Bucket}?inventory",
  4809. }
  4810. if input == nil {
  4811. input = &PutBucketInventoryConfigurationInput{}
  4812. }
  4813. output = &PutBucketInventoryConfigurationOutput{}
  4814. req = c.newRequest(op, input, output)
  4815. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4816. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4817. return
  4818. }
  4819. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  4820. //
  4821. // Adds an inventory configuration (identified by the inventory ID) from the
  4822. // bucket.
  4823. //
  4824. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4825. // with awserr.Error's Code and Message methods to get detailed information about
  4826. // the error.
  4827. //
  4828. // See the AWS API reference guide for Amazon Simple Storage Service's
  4829. // API operation PutBucketInventoryConfiguration for usage and error information.
  4830. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4831. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  4832. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4833. return out, req.Send()
  4834. }
  4835. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  4836. // the ability to pass a context and additional request options.
  4837. //
  4838. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  4839. //
  4840. // The context must be non-nil and will be used for request cancellation. If
  4841. // the context is nil a panic will occur. In the future the SDK may create
  4842. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4843. // for more information on using Contexts.
  4844. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  4845. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4846. req.SetContext(ctx)
  4847. req.ApplyOptions(opts...)
  4848. return out, req.Send()
  4849. }
  4850. const opPutBucketLifecycle = "PutBucketLifecycle"
  4851. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  4852. // client's request for the PutBucketLifecycle operation. The "output" return
  4853. // value will be populated with the request's response once the request completes
  4854. // successfully.
  4855. //
  4856. // Use "Send" method on the returned Request to send the API call to the service.
  4857. // the "output" return value is not valid until after Send returns without error.
  4858. //
  4859. // See PutBucketLifecycle for more information on using the PutBucketLifecycle
  4860. // API call, and error handling.
  4861. //
  4862. // This method is useful when you want to inject custom logic or configuration
  4863. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4864. //
  4865. //
  4866. // // Example sending a request using the PutBucketLifecycleRequest method.
  4867. // req, resp := client.PutBucketLifecycleRequest(params)
  4868. //
  4869. // err := req.Send()
  4870. // if err == nil { // resp is now filled
  4871. // fmt.Println(resp)
  4872. // }
  4873. //
  4874. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4875. //
  4876. // Deprecated: PutBucketLifecycle has been deprecated
  4877. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  4878. if c.Client.Config.Logger != nil {
  4879. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  4880. }
  4881. op := &request.Operation{
  4882. Name: opPutBucketLifecycle,
  4883. HTTPMethod: "PUT",
  4884. HTTPPath: "/{Bucket}?lifecycle",
  4885. }
  4886. if input == nil {
  4887. input = &PutBucketLifecycleInput{}
  4888. }
  4889. output = &PutBucketLifecycleOutput{}
  4890. req = c.newRequest(op, input, output)
  4891. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4892. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4893. return
  4894. }
  4895. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  4896. //
  4897. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  4898. //
  4899. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4900. // with awserr.Error's Code and Message methods to get detailed information about
  4901. // the error.
  4902. //
  4903. // See the AWS API reference guide for Amazon Simple Storage Service's
  4904. // API operation PutBucketLifecycle for usage and error information.
  4905. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4906. //
  4907. // Deprecated: PutBucketLifecycle has been deprecated
  4908. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  4909. req, out := c.PutBucketLifecycleRequest(input)
  4910. return out, req.Send()
  4911. }
  4912. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  4913. // the ability to pass a context and additional request options.
  4914. //
  4915. // See PutBucketLifecycle for details on how to use this API operation.
  4916. //
  4917. // The context must be non-nil and will be used for request cancellation. If
  4918. // the context is nil a panic will occur. In the future the SDK may create
  4919. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4920. // for more information on using Contexts.
  4921. //
  4922. // Deprecated: PutBucketLifecycleWithContext has been deprecated
  4923. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  4924. req, out := c.PutBucketLifecycleRequest(input)
  4925. req.SetContext(ctx)
  4926. req.ApplyOptions(opts...)
  4927. return out, req.Send()
  4928. }
  4929. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  4930. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  4931. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  4932. // value will be populated with the request's response once the request completes
  4933. // successfully.
  4934. //
  4935. // Use "Send" method on the returned Request to send the API call to the service.
  4936. // the "output" return value is not valid until after Send returns without error.
  4937. //
  4938. // See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
  4939. // API call, and error handling.
  4940. //
  4941. // This method is useful when you want to inject custom logic or configuration
  4942. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4943. //
  4944. //
  4945. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  4946. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  4947. //
  4948. // err := req.Send()
  4949. // if err == nil { // resp is now filled
  4950. // fmt.Println(resp)
  4951. // }
  4952. //
  4953. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4954. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  4955. op := &request.Operation{
  4956. Name: opPutBucketLifecycleConfiguration,
  4957. HTTPMethod: "PUT",
  4958. HTTPPath: "/{Bucket}?lifecycle",
  4959. }
  4960. if input == nil {
  4961. input = &PutBucketLifecycleConfigurationInput{}
  4962. }
  4963. output = &PutBucketLifecycleConfigurationOutput{}
  4964. req = c.newRequest(op, input, output)
  4965. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4966. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4967. return
  4968. }
  4969. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  4970. //
  4971. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  4972. // exists, it replaces it.
  4973. //
  4974. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4975. // with awserr.Error's Code and Message methods to get detailed information about
  4976. // the error.
  4977. //
  4978. // See the AWS API reference guide for Amazon Simple Storage Service's
  4979. // API operation PutBucketLifecycleConfiguration for usage and error information.
  4980. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4981. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  4982. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4983. return out, req.Send()
  4984. }
  4985. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  4986. // the ability to pass a context and additional request options.
  4987. //
  4988. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  4989. //
  4990. // The context must be non-nil and will be used for request cancellation. If
  4991. // the context is nil a panic will occur. In the future the SDK may create
  4992. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4993. // for more information on using Contexts.
  4994. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  4995. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4996. req.SetContext(ctx)
  4997. req.ApplyOptions(opts...)
  4998. return out, req.Send()
  4999. }
  5000. const opPutBucketLogging = "PutBucketLogging"
  5001. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  5002. // client's request for the PutBucketLogging operation. The "output" return
  5003. // value will be populated with the request's response once the request completes
  5004. // successfully.
  5005. //
  5006. // Use "Send" method on the returned Request to send the API call to the service.
  5007. // the "output" return value is not valid until after Send returns without error.
  5008. //
  5009. // See PutBucketLogging for more information on using the PutBucketLogging
  5010. // API call, and error handling.
  5011. //
  5012. // This method is useful when you want to inject custom logic or configuration
  5013. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5014. //
  5015. //
  5016. // // Example sending a request using the PutBucketLoggingRequest method.
  5017. // req, resp := client.PutBucketLoggingRequest(params)
  5018. //
  5019. // err := req.Send()
  5020. // if err == nil { // resp is now filled
  5021. // fmt.Println(resp)
  5022. // }
  5023. //
  5024. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  5025. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  5026. op := &request.Operation{
  5027. Name: opPutBucketLogging,
  5028. HTTPMethod: "PUT",
  5029. HTTPPath: "/{Bucket}?logging",
  5030. }
  5031. if input == nil {
  5032. input = &PutBucketLoggingInput{}
  5033. }
  5034. output = &PutBucketLoggingOutput{}
  5035. req = c.newRequest(op, input, output)
  5036. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5037. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5038. return
  5039. }
  5040. // PutBucketLogging API operation for Amazon Simple Storage Service.
  5041. //
  5042. // Set the logging parameters for a bucket and to specify permissions for who
  5043. // can view and modify the logging parameters. To set the logging status of
  5044. // a bucket, you must be the bucket owner.
  5045. //
  5046. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5047. // with awserr.Error's Code and Message methods to get detailed information about
  5048. // the error.
  5049. //
  5050. // See the AWS API reference guide for Amazon Simple Storage Service's
  5051. // API operation PutBucketLogging for usage and error information.
  5052. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  5053. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  5054. req, out := c.PutBucketLoggingRequest(input)
  5055. return out, req.Send()
  5056. }
  5057. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  5058. // the ability to pass a context and additional request options.
  5059. //
  5060. // See PutBucketLogging for details on how to use this API operation.
  5061. //
  5062. // The context must be non-nil and will be used for request cancellation. If
  5063. // the context is nil a panic will occur. In the future the SDK may create
  5064. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5065. // for more information on using Contexts.
  5066. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  5067. req, out := c.PutBucketLoggingRequest(input)
  5068. req.SetContext(ctx)
  5069. req.ApplyOptions(opts...)
  5070. return out, req.Send()
  5071. }
  5072. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  5073. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  5074. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  5075. // value will be populated with the request's response once the request completes
  5076. // successfully.
  5077. //
  5078. // Use "Send" method on the returned Request to send the API call to the service.
  5079. // the "output" return value is not valid until after Send returns without error.
  5080. //
  5081. // See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
  5082. // API call, and error handling.
  5083. //
  5084. // This method is useful when you want to inject custom logic or configuration
  5085. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5086. //
  5087. //
  5088. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  5089. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  5090. //
  5091. // err := req.Send()
  5092. // if err == nil { // resp is now filled
  5093. // fmt.Println(resp)
  5094. // }
  5095. //
  5096. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  5097. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  5098. op := &request.Operation{
  5099. Name: opPutBucketMetricsConfiguration,
  5100. HTTPMethod: "PUT",
  5101. HTTPPath: "/{Bucket}?metrics",
  5102. }
  5103. if input == nil {
  5104. input = &PutBucketMetricsConfigurationInput{}
  5105. }
  5106. output = &PutBucketMetricsConfigurationOutput{}
  5107. req = c.newRequest(op, input, output)
  5108. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5109. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5110. return
  5111. }
  5112. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  5113. //
  5114. // Sets a metrics configuration (specified by the metrics configuration ID)
  5115. // for the bucket.
  5116. //
  5117. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5118. // with awserr.Error's Code and Message methods to get detailed information about
  5119. // the error.
  5120. //
  5121. // See the AWS API reference guide for Amazon Simple Storage Service's
  5122. // API operation PutBucketMetricsConfiguration for usage and error information.
  5123. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  5124. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  5125. req, out := c.PutBucketMetricsConfigurationRequest(input)
  5126. return out, req.Send()
  5127. }
  5128. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  5129. // the ability to pass a context and additional request options.
  5130. //
  5131. // See PutBucketMetricsConfiguration for details on how to use this API operation.
  5132. //
  5133. // The context must be non-nil and will be used for request cancellation. If
  5134. // the context is nil a panic will occur. In the future the SDK may create
  5135. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5136. // for more information on using Contexts.
  5137. func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  5138. req, out := c.PutBucketMetricsConfigurationRequest(input)
  5139. req.SetContext(ctx)
  5140. req.ApplyOptions(opts...)
  5141. return out, req.Send()
  5142. }
  5143. const opPutBucketNotification = "PutBucketNotification"
  5144. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  5145. // client's request for the PutBucketNotification operation. The "output" return
  5146. // value will be populated with the request's response once the request completes
  5147. // successfully.
  5148. //
  5149. // Use "Send" method on the returned Request to send the API call to the service.
  5150. // the "output" return value is not valid until after Send returns without error.
  5151. //
  5152. // See PutBucketNotification for more information on using the PutBucketNotification
  5153. // API call, and error handling.
  5154. //
  5155. // This method is useful when you want to inject custom logic or configuration
  5156. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5157. //
  5158. //
  5159. // // Example sending a request using the PutBucketNotificationRequest method.
  5160. // req, resp := client.PutBucketNotificationRequest(params)
  5161. //
  5162. // err := req.Send()
  5163. // if err == nil { // resp is now filled
  5164. // fmt.Println(resp)
  5165. // }
  5166. //
  5167. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  5168. //
  5169. // Deprecated: PutBucketNotification has been deprecated
  5170. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  5171. if c.Client.Config.Logger != nil {
  5172. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  5173. }
  5174. op := &request.Operation{
  5175. Name: opPutBucketNotification,
  5176. HTTPMethod: "PUT",
  5177. HTTPPath: "/{Bucket}?notification",
  5178. }
  5179. if input == nil {
  5180. input = &PutBucketNotificationInput{}
  5181. }
  5182. output = &PutBucketNotificationOutput{}
  5183. req = c.newRequest(op, input, output)
  5184. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5185. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5186. return
  5187. }
  5188. // PutBucketNotification API operation for Amazon Simple Storage Service.
  5189. //
  5190. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  5191. //
  5192. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5193. // with awserr.Error's Code and Message methods to get detailed information about
  5194. // the error.
  5195. //
  5196. // See the AWS API reference guide for Amazon Simple Storage Service's
  5197. // API operation PutBucketNotification for usage and error information.
  5198. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  5199. //
  5200. // Deprecated: PutBucketNotification has been deprecated
  5201. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  5202. req, out := c.PutBucketNotificationRequest(input)
  5203. return out, req.Send()
  5204. }
  5205. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  5206. // the ability to pass a context and additional request options.
  5207. //
  5208. // See PutBucketNotification for details on how to use this API operation.
  5209. //
  5210. // The context must be non-nil and will be used for request cancellation. If
  5211. // the context is nil a panic will occur. In the future the SDK may create
  5212. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5213. // for more information on using Contexts.
  5214. //
  5215. // Deprecated: PutBucketNotificationWithContext has been deprecated
  5216. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  5217. req, out := c.PutBucketNotificationRequest(input)
  5218. req.SetContext(ctx)
  5219. req.ApplyOptions(opts...)
  5220. return out, req.Send()
  5221. }
  5222. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  5223. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  5224. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  5225. // value will be populated with the request's response once the request completes
  5226. // successfully.
  5227. //
  5228. // Use "Send" method on the returned Request to send the API call to the service.
  5229. // the "output" return value is not valid until after Send returns without error.
  5230. //
  5231. // See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
  5232. // API call, and error handling.
  5233. //
  5234. // This method is useful when you want to inject custom logic or configuration
  5235. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5236. //
  5237. //
  5238. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  5239. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  5240. //
  5241. // err := req.Send()
  5242. // if err == nil { // resp is now filled
  5243. // fmt.Println(resp)
  5244. // }
  5245. //
  5246. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  5247. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  5248. op := &request.Operation{
  5249. Name: opPutBucketNotificationConfiguration,
  5250. HTTPMethod: "PUT",
  5251. HTTPPath: "/{Bucket}?notification",
  5252. }
  5253. if input == nil {
  5254. input = &PutBucketNotificationConfigurationInput{}
  5255. }
  5256. output = &PutBucketNotificationConfigurationOutput{}
  5257. req = c.newRequest(op, input, output)
  5258. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5259. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5260. return
  5261. }
  5262. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  5263. //
  5264. // Enables notifications of specified events for a bucket.
  5265. //
  5266. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5267. // with awserr.Error's Code and Message methods to get detailed information about
  5268. // the error.
  5269. //
  5270. // See the AWS API reference guide for Amazon Simple Storage Service's
  5271. // API operation PutBucketNotificationConfiguration for usage and error information.
  5272. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  5273. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  5274. req, out := c.PutBucketNotificationConfigurationRequest(input)
  5275. return out, req.Send()
  5276. }
  5277. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  5278. // the ability to pass a context and additional request options.
  5279. //
  5280. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  5281. //
  5282. // The context must be non-nil and will be used for request cancellation. If
  5283. // the context is nil a panic will occur. In the future the SDK may create
  5284. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5285. // for more information on using Contexts.
  5286. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  5287. req, out := c.PutBucketNotificationConfigurationRequest(input)
  5288. req.SetContext(ctx)
  5289. req.ApplyOptions(opts...)
  5290. return out, req.Send()
  5291. }
  5292. const opPutBucketPolicy = "PutBucketPolicy"
  5293. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  5294. // client's request for the PutBucketPolicy operation. The "output" return
  5295. // value will be populated with the request's response once the request completes
  5296. // successfully.
  5297. //
  5298. // Use "Send" method on the returned Request to send the API call to the service.
  5299. // the "output" return value is not valid until after Send returns without error.
  5300. //
  5301. // See PutBucketPolicy for more information on using the PutBucketPolicy
  5302. // API call, and error handling.
  5303. //
  5304. // This method is useful when you want to inject custom logic or configuration
  5305. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5306. //
  5307. //
  5308. // // Example sending a request using the PutBucketPolicyRequest method.
  5309. // req, resp := client.PutBucketPolicyRequest(params)
  5310. //
  5311. // err := req.Send()
  5312. // if err == nil { // resp is now filled
  5313. // fmt.Println(resp)
  5314. // }
  5315. //
  5316. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  5317. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  5318. op := &request.Operation{
  5319. Name: opPutBucketPolicy,
  5320. HTTPMethod: "PUT",
  5321. HTTPPath: "/{Bucket}?policy",
  5322. }
  5323. if input == nil {
  5324. input = &PutBucketPolicyInput{}
  5325. }
  5326. output = &PutBucketPolicyOutput{}
  5327. req = c.newRequest(op, input, output)
  5328. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5329. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5330. return
  5331. }
  5332. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  5333. //
  5334. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  5335. // in this request completely replaces it.
  5336. //
  5337. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5338. // with awserr.Error's Code and Message methods to get detailed information about
  5339. // the error.
  5340. //
  5341. // See the AWS API reference guide for Amazon Simple Storage Service's
  5342. // API operation PutBucketPolicy for usage and error information.
  5343. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  5344. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  5345. req, out := c.PutBucketPolicyRequest(input)
  5346. return out, req.Send()
  5347. }
  5348. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  5349. // the ability to pass a context and additional request options.
  5350. //
  5351. // See PutBucketPolicy for details on how to use this API operation.
  5352. //
  5353. // The context must be non-nil and will be used for request cancellation. If
  5354. // the context is nil a panic will occur. In the future the SDK may create
  5355. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5356. // for more information on using Contexts.
  5357. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  5358. req, out := c.PutBucketPolicyRequest(input)
  5359. req.SetContext(ctx)
  5360. req.ApplyOptions(opts...)
  5361. return out, req.Send()
  5362. }
  5363. const opPutBucketReplication = "PutBucketReplication"
  5364. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  5365. // client's request for the PutBucketReplication operation. The "output" return
  5366. // value will be populated with the request's response once the request completes
  5367. // successfully.
  5368. //
  5369. // Use "Send" method on the returned Request to send the API call to the service.
  5370. // the "output" return value is not valid until after Send returns without error.
  5371. //
  5372. // See PutBucketReplication for more information on using the PutBucketReplication
  5373. // API call, and error handling.
  5374. //
  5375. // This method is useful when you want to inject custom logic or configuration
  5376. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5377. //
  5378. //
  5379. // // Example sending a request using the PutBucketReplicationRequest method.
  5380. // req, resp := client.PutBucketReplicationRequest(params)
  5381. //
  5382. // err := req.Send()
  5383. // if err == nil { // resp is now filled
  5384. // fmt.Println(resp)
  5385. // }
  5386. //
  5387. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  5388. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  5389. op := &request.Operation{
  5390. Name: opPutBucketReplication,
  5391. HTTPMethod: "PUT",
  5392. HTTPPath: "/{Bucket}?replication",
  5393. }
  5394. if input == nil {
  5395. input = &PutBucketReplicationInput{}
  5396. }
  5397. output = &PutBucketReplicationOutput{}
  5398. req = c.newRequest(op, input, output)
  5399. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5400. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5401. return
  5402. }
  5403. // PutBucketReplication API operation for Amazon Simple Storage Service.
  5404. //
  5405. // Creates a replication configuration or replaces an existing one. For more
  5406. // information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  5407. // in the Amazon S3 Developer Guide.
  5408. //
  5409. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5410. // with awserr.Error's Code and Message methods to get detailed information about
  5411. // the error.
  5412. //
  5413. // See the AWS API reference guide for Amazon Simple Storage Service's
  5414. // API operation PutBucketReplication for usage and error information.
  5415. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  5416. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  5417. req, out := c.PutBucketReplicationRequest(input)
  5418. return out, req.Send()
  5419. }
  5420. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  5421. // the ability to pass a context and additional request options.
  5422. //
  5423. // See PutBucketReplication for details on how to use this API operation.
  5424. //
  5425. // The context must be non-nil and will be used for request cancellation. If
  5426. // the context is nil a panic will occur. In the future the SDK may create
  5427. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5428. // for more information on using Contexts.
  5429. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  5430. req, out := c.PutBucketReplicationRequest(input)
  5431. req.SetContext(ctx)
  5432. req.ApplyOptions(opts...)
  5433. return out, req.Send()
  5434. }
  5435. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  5436. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  5437. // client's request for the PutBucketRequestPayment operation. The "output" return
  5438. // value will be populated with the request's response once the request completes
  5439. // successfully.
  5440. //
  5441. // Use "Send" method on the returned Request to send the API call to the service.
  5442. // the "output" return value is not valid until after Send returns without error.
  5443. //
  5444. // See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
  5445. // API call, and error handling.
  5446. //
  5447. // This method is useful when you want to inject custom logic or configuration
  5448. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5449. //
  5450. //
  5451. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  5452. // req, resp := client.PutBucketRequestPaymentRequest(params)
  5453. //
  5454. // err := req.Send()
  5455. // if err == nil { // resp is now filled
  5456. // fmt.Println(resp)
  5457. // }
  5458. //
  5459. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5460. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  5461. op := &request.Operation{
  5462. Name: opPutBucketRequestPayment,
  5463. HTTPMethod: "PUT",
  5464. HTTPPath: "/{Bucket}?requestPayment",
  5465. }
  5466. if input == nil {
  5467. input = &PutBucketRequestPaymentInput{}
  5468. }
  5469. output = &PutBucketRequestPaymentOutput{}
  5470. req = c.newRequest(op, input, output)
  5471. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5472. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5473. return
  5474. }
  5475. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  5476. //
  5477. // Sets the request payment configuration for a bucket. By default, the bucket
  5478. // owner pays for downloads from the bucket. This configuration parameter enables
  5479. // the bucket owner (only) to specify that the person requesting the download
  5480. // will be charged for the download. Documentation on requester pays buckets
  5481. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  5482. //
  5483. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5484. // with awserr.Error's Code and Message methods to get detailed information about
  5485. // the error.
  5486. //
  5487. // See the AWS API reference guide for Amazon Simple Storage Service's
  5488. // API operation PutBucketRequestPayment for usage and error information.
  5489. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5490. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  5491. req, out := c.PutBucketRequestPaymentRequest(input)
  5492. return out, req.Send()
  5493. }
  5494. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  5495. // the ability to pass a context and additional request options.
  5496. //
  5497. // See PutBucketRequestPayment for details on how to use this API operation.
  5498. //
  5499. // The context must be non-nil and will be used for request cancellation. If
  5500. // the context is nil a panic will occur. In the future the SDK may create
  5501. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5502. // for more information on using Contexts.
  5503. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  5504. req, out := c.PutBucketRequestPaymentRequest(input)
  5505. req.SetContext(ctx)
  5506. req.ApplyOptions(opts...)
  5507. return out, req.Send()
  5508. }
  5509. const opPutBucketTagging = "PutBucketTagging"
  5510. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  5511. // client's request for the PutBucketTagging operation. The "output" return
  5512. // value will be populated with the request's response once the request completes
  5513. // successfully.
  5514. //
  5515. // Use "Send" method on the returned Request to send the API call to the service.
  5516. // the "output" return value is not valid until after Send returns without error.
  5517. //
  5518. // See PutBucketTagging for more information on using the PutBucketTagging
  5519. // API call, and error handling.
  5520. //
  5521. // This method is useful when you want to inject custom logic or configuration
  5522. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5523. //
  5524. //
  5525. // // Example sending a request using the PutBucketTaggingRequest method.
  5526. // req, resp := client.PutBucketTaggingRequest(params)
  5527. //
  5528. // err := req.Send()
  5529. // if err == nil { // resp is now filled
  5530. // fmt.Println(resp)
  5531. // }
  5532. //
  5533. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5534. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  5535. op := &request.Operation{
  5536. Name: opPutBucketTagging,
  5537. HTTPMethod: "PUT",
  5538. HTTPPath: "/{Bucket}?tagging",
  5539. }
  5540. if input == nil {
  5541. input = &PutBucketTaggingInput{}
  5542. }
  5543. output = &PutBucketTaggingOutput{}
  5544. req = c.newRequest(op, input, output)
  5545. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5546. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5547. return
  5548. }
  5549. // PutBucketTagging API operation for Amazon Simple Storage Service.
  5550. //
  5551. // Sets the tags for a bucket.
  5552. //
  5553. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5554. // with awserr.Error's Code and Message methods to get detailed information about
  5555. // the error.
  5556. //
  5557. // See the AWS API reference guide for Amazon Simple Storage Service's
  5558. // API operation PutBucketTagging for usage and error information.
  5559. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5560. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  5561. req, out := c.PutBucketTaggingRequest(input)
  5562. return out, req.Send()
  5563. }
  5564. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  5565. // the ability to pass a context and additional request options.
  5566. //
  5567. // See PutBucketTagging for details on how to use this API operation.
  5568. //
  5569. // The context must be non-nil and will be used for request cancellation. If
  5570. // the context is nil a panic will occur. In the future the SDK may create
  5571. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5572. // for more information on using Contexts.
  5573. func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  5574. req, out := c.PutBucketTaggingRequest(input)
  5575. req.SetContext(ctx)
  5576. req.ApplyOptions(opts...)
  5577. return out, req.Send()
  5578. }
  5579. const opPutBucketVersioning = "PutBucketVersioning"
  5580. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  5581. // client's request for the PutBucketVersioning operation. The "output" return
  5582. // value will be populated with the request's response once the request completes
  5583. // successfully.
  5584. //
  5585. // Use "Send" method on the returned Request to send the API call to the service.
  5586. // the "output" return value is not valid until after Send returns without error.
  5587. //
  5588. // See PutBucketVersioning for more information on using the PutBucketVersioning
  5589. // API call, and error handling.
  5590. //
  5591. // This method is useful when you want to inject custom logic or configuration
  5592. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5593. //
  5594. //
  5595. // // Example sending a request using the PutBucketVersioningRequest method.
  5596. // req, resp := client.PutBucketVersioningRequest(params)
  5597. //
  5598. // err := req.Send()
  5599. // if err == nil { // resp is now filled
  5600. // fmt.Println(resp)
  5601. // }
  5602. //
  5603. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5604. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  5605. op := &request.Operation{
  5606. Name: opPutBucketVersioning,
  5607. HTTPMethod: "PUT",
  5608. HTTPPath: "/{Bucket}?versioning",
  5609. }
  5610. if input == nil {
  5611. input = &PutBucketVersioningInput{}
  5612. }
  5613. output = &PutBucketVersioningOutput{}
  5614. req = c.newRequest(op, input, output)
  5615. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5616. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5617. return
  5618. }
  5619. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  5620. //
  5621. // Sets the versioning state of an existing bucket. To set the versioning state,
  5622. // you must be the bucket owner.
  5623. //
  5624. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5625. // with awserr.Error's Code and Message methods to get detailed information about
  5626. // the error.
  5627. //
  5628. // See the AWS API reference guide for Amazon Simple Storage Service's
  5629. // API operation PutBucketVersioning for usage and error information.
  5630. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5631. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  5632. req, out := c.PutBucketVersioningRequest(input)
  5633. return out, req.Send()
  5634. }
  5635. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  5636. // the ability to pass a context and additional request options.
  5637. //
  5638. // See PutBucketVersioning for details on how to use this API operation.
  5639. //
  5640. // The context must be non-nil and will be used for request cancellation. If
  5641. // the context is nil a panic will occur. In the future the SDK may create
  5642. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5643. // for more information on using Contexts.
  5644. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  5645. req, out := c.PutBucketVersioningRequest(input)
  5646. req.SetContext(ctx)
  5647. req.ApplyOptions(opts...)
  5648. return out, req.Send()
  5649. }
  5650. const opPutBucketWebsite = "PutBucketWebsite"
  5651. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  5652. // client's request for the PutBucketWebsite operation. The "output" return
  5653. // value will be populated with the request's response once the request completes
  5654. // successfully.
  5655. //
  5656. // Use "Send" method on the returned Request to send the API call to the service.
  5657. // the "output" return value is not valid until after Send returns without error.
  5658. //
  5659. // See PutBucketWebsite for more information on using the PutBucketWebsite
  5660. // API call, and error handling.
  5661. //
  5662. // This method is useful when you want to inject custom logic or configuration
  5663. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5664. //
  5665. //
  5666. // // Example sending a request using the PutBucketWebsiteRequest method.
  5667. // req, resp := client.PutBucketWebsiteRequest(params)
  5668. //
  5669. // err := req.Send()
  5670. // if err == nil { // resp is now filled
  5671. // fmt.Println(resp)
  5672. // }
  5673. //
  5674. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5675. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  5676. op := &request.Operation{
  5677. Name: opPutBucketWebsite,
  5678. HTTPMethod: "PUT",
  5679. HTTPPath: "/{Bucket}?website",
  5680. }
  5681. if input == nil {
  5682. input = &PutBucketWebsiteInput{}
  5683. }
  5684. output = &PutBucketWebsiteOutput{}
  5685. req = c.newRequest(op, input, output)
  5686. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5687. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5688. return
  5689. }
  5690. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  5691. //
  5692. // Set the website configuration for a bucket.
  5693. //
  5694. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5695. // with awserr.Error's Code and Message methods to get detailed information about
  5696. // the error.
  5697. //
  5698. // See the AWS API reference guide for Amazon Simple Storage Service's
  5699. // API operation PutBucketWebsite for usage and error information.
  5700. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5701. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  5702. req, out := c.PutBucketWebsiteRequest(input)
  5703. return out, req.Send()
  5704. }
  5705. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  5706. // the ability to pass a context and additional request options.
  5707. //
  5708. // See PutBucketWebsite for details on how to use this API operation.
  5709. //
  5710. // The context must be non-nil and will be used for request cancellation. If
  5711. // the context is nil a panic will occur. In the future the SDK may create
  5712. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5713. // for more information on using Contexts.
  5714. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  5715. req, out := c.PutBucketWebsiteRequest(input)
  5716. req.SetContext(ctx)
  5717. req.ApplyOptions(opts...)
  5718. return out, req.Send()
  5719. }
  5720. const opPutObject = "PutObject"
  5721. // PutObjectRequest generates a "aws/request.Request" representing the
  5722. // client's request for the PutObject operation. The "output" return
  5723. // value will be populated with the request's response once the request completes
  5724. // successfully.
  5725. //
  5726. // Use "Send" method on the returned Request to send the API call to the service.
  5727. // the "output" return value is not valid until after Send returns without error.
  5728. //
  5729. // See PutObject for more information on using the PutObject
  5730. // API call, and error handling.
  5731. //
  5732. // This method is useful when you want to inject custom logic or configuration
  5733. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5734. //
  5735. //
  5736. // // Example sending a request using the PutObjectRequest method.
  5737. // req, resp := client.PutObjectRequest(params)
  5738. //
  5739. // err := req.Send()
  5740. // if err == nil { // resp is now filled
  5741. // fmt.Println(resp)
  5742. // }
  5743. //
  5744. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5745. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  5746. op := &request.Operation{
  5747. Name: opPutObject,
  5748. HTTPMethod: "PUT",
  5749. HTTPPath: "/{Bucket}/{Key+}",
  5750. }
  5751. if input == nil {
  5752. input = &PutObjectInput{}
  5753. }
  5754. output = &PutObjectOutput{}
  5755. req = c.newRequest(op, input, output)
  5756. return
  5757. }
  5758. // PutObject API operation for Amazon Simple Storage Service.
  5759. //
  5760. // Adds an object to a bucket.
  5761. //
  5762. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5763. // with awserr.Error's Code and Message methods to get detailed information about
  5764. // the error.
  5765. //
  5766. // See the AWS API reference guide for Amazon Simple Storage Service's
  5767. // API operation PutObject for usage and error information.
  5768. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5769. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  5770. req, out := c.PutObjectRequest(input)
  5771. return out, req.Send()
  5772. }
  5773. // PutObjectWithContext is the same as PutObject with the addition of
  5774. // the ability to pass a context and additional request options.
  5775. //
  5776. // See PutObject for details on how to use this API operation.
  5777. //
  5778. // The context must be non-nil and will be used for request cancellation. If
  5779. // the context is nil a panic will occur. In the future the SDK may create
  5780. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5781. // for more information on using Contexts.
  5782. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  5783. req, out := c.PutObjectRequest(input)
  5784. req.SetContext(ctx)
  5785. req.ApplyOptions(opts...)
  5786. return out, req.Send()
  5787. }
  5788. const opPutObjectAcl = "PutObjectAcl"
  5789. // PutObjectAclRequest generates a "aws/request.Request" representing the
  5790. // client's request for the PutObjectAcl operation. The "output" return
  5791. // value will be populated with the request's response once the request completes
  5792. // successfully.
  5793. //
  5794. // Use "Send" method on the returned Request to send the API call to the service.
  5795. // the "output" return value is not valid until after Send returns without error.
  5796. //
  5797. // See PutObjectAcl for more information on using the PutObjectAcl
  5798. // API call, and error handling.
  5799. //
  5800. // This method is useful when you want to inject custom logic or configuration
  5801. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5802. //
  5803. //
  5804. // // Example sending a request using the PutObjectAclRequest method.
  5805. // req, resp := client.PutObjectAclRequest(params)
  5806. //
  5807. // err := req.Send()
  5808. // if err == nil { // resp is now filled
  5809. // fmt.Println(resp)
  5810. // }
  5811. //
  5812. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5813. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  5814. op := &request.Operation{
  5815. Name: opPutObjectAcl,
  5816. HTTPMethod: "PUT",
  5817. HTTPPath: "/{Bucket}/{Key+}?acl",
  5818. }
  5819. if input == nil {
  5820. input = &PutObjectAclInput{}
  5821. }
  5822. output = &PutObjectAclOutput{}
  5823. req = c.newRequest(op, input, output)
  5824. return
  5825. }
  5826. // PutObjectAcl API operation for Amazon Simple Storage Service.
  5827. //
  5828. // uses the acl subresource to set the access control list (ACL) permissions
  5829. // for an object that already exists in a bucket
  5830. //
  5831. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5832. // with awserr.Error's Code and Message methods to get detailed information about
  5833. // the error.
  5834. //
  5835. // See the AWS API reference guide for Amazon Simple Storage Service's
  5836. // API operation PutObjectAcl for usage and error information.
  5837. //
  5838. // Returned Error Codes:
  5839. // * ErrCodeNoSuchKey "NoSuchKey"
  5840. // The specified key does not exist.
  5841. //
  5842. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5843. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  5844. req, out := c.PutObjectAclRequest(input)
  5845. return out, req.Send()
  5846. }
  5847. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  5848. // the ability to pass a context and additional request options.
  5849. //
  5850. // See PutObjectAcl for details on how to use this API operation.
  5851. //
  5852. // The context must be non-nil and will be used for request cancellation. If
  5853. // the context is nil a panic will occur. In the future the SDK may create
  5854. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5855. // for more information on using Contexts.
  5856. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  5857. req, out := c.PutObjectAclRequest(input)
  5858. req.SetContext(ctx)
  5859. req.ApplyOptions(opts...)
  5860. return out, req.Send()
  5861. }
  5862. const opPutObjectLegalHold = "PutObjectLegalHold"
  5863. // PutObjectLegalHoldRequest generates a "aws/request.Request" representing the
  5864. // client's request for the PutObjectLegalHold operation. The "output" return
  5865. // value will be populated with the request's response once the request completes
  5866. // successfully.
  5867. //
  5868. // Use "Send" method on the returned Request to send the API call to the service.
  5869. // the "output" return value is not valid until after Send returns without error.
  5870. //
  5871. // See PutObjectLegalHold for more information on using the PutObjectLegalHold
  5872. // API call, and error handling.
  5873. //
  5874. // This method is useful when you want to inject custom logic or configuration
  5875. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5876. //
  5877. //
  5878. // // Example sending a request using the PutObjectLegalHoldRequest method.
  5879. // req, resp := client.PutObjectLegalHoldRequest(params)
  5880. //
  5881. // err := req.Send()
  5882. // if err == nil { // resp is now filled
  5883. // fmt.Println(resp)
  5884. // }
  5885. //
  5886. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
  5887. func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput) {
  5888. op := &request.Operation{
  5889. Name: opPutObjectLegalHold,
  5890. HTTPMethod: "PUT",
  5891. HTTPPath: "/{Bucket}/{Key+}?legal-hold",
  5892. }
  5893. if input == nil {
  5894. input = &PutObjectLegalHoldInput{}
  5895. }
  5896. output = &PutObjectLegalHoldOutput{}
  5897. req = c.newRequest(op, input, output)
  5898. return
  5899. }
  5900. // PutObjectLegalHold API operation for Amazon Simple Storage Service.
  5901. //
  5902. // Applies a Legal Hold configuration to the specified object.
  5903. //
  5904. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5905. // with awserr.Error's Code and Message methods to get detailed information about
  5906. // the error.
  5907. //
  5908. // See the AWS API reference guide for Amazon Simple Storage Service's
  5909. // API operation PutObjectLegalHold for usage and error information.
  5910. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
  5911. func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error) {
  5912. req, out := c.PutObjectLegalHoldRequest(input)
  5913. return out, req.Send()
  5914. }
  5915. // PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of
  5916. // the ability to pass a context and additional request options.
  5917. //
  5918. // See PutObjectLegalHold for details on how to use this API operation.
  5919. //
  5920. // The context must be non-nil and will be used for request cancellation. If
  5921. // the context is nil a panic will occur. In the future the SDK may create
  5922. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5923. // for more information on using Contexts.
  5924. func (c *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error) {
  5925. req, out := c.PutObjectLegalHoldRequest(input)
  5926. req.SetContext(ctx)
  5927. req.ApplyOptions(opts...)
  5928. return out, req.Send()
  5929. }
  5930. const opPutObjectLockConfiguration = "PutObjectLockConfiguration"
  5931. // PutObjectLockConfigurationRequest generates a "aws/request.Request" representing the
  5932. // client's request for the PutObjectLockConfiguration operation. The "output" return
  5933. // value will be populated with the request's response once the request completes
  5934. // successfully.
  5935. //
  5936. // Use "Send" method on the returned Request to send the API call to the service.
  5937. // the "output" return value is not valid until after Send returns without error.
  5938. //
  5939. // See PutObjectLockConfiguration for more information on using the PutObjectLockConfiguration
  5940. // API call, and error handling.
  5941. //
  5942. // This method is useful when you want to inject custom logic or configuration
  5943. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5944. //
  5945. //
  5946. // // Example sending a request using the PutObjectLockConfigurationRequest method.
  5947. // req, resp := client.PutObjectLockConfigurationRequest(params)
  5948. //
  5949. // err := req.Send()
  5950. // if err == nil { // resp is now filled
  5951. // fmt.Println(resp)
  5952. // }
  5953. //
  5954. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
  5955. func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput) {
  5956. op := &request.Operation{
  5957. Name: opPutObjectLockConfiguration,
  5958. HTTPMethod: "PUT",
  5959. HTTPPath: "/{Bucket}?object-lock",
  5960. }
  5961. if input == nil {
  5962. input = &PutObjectLockConfigurationInput{}
  5963. }
  5964. output = &PutObjectLockConfigurationOutput{}
  5965. req = c.newRequest(op, input, output)
  5966. return
  5967. }
  5968. // PutObjectLockConfiguration API operation for Amazon Simple Storage Service.
  5969. //
  5970. // Places an Object Lock configuration on the specified bucket. The rule specified
  5971. // in the Object Lock configuration will be applied by default to every new
  5972. // object placed in the specified bucket.
  5973. //
  5974. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5975. // with awserr.Error's Code and Message methods to get detailed information about
  5976. // the error.
  5977. //
  5978. // See the AWS API reference guide for Amazon Simple Storage Service's
  5979. // API operation PutObjectLockConfiguration for usage and error information.
  5980. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
  5981. func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error) {
  5982. req, out := c.PutObjectLockConfigurationRequest(input)
  5983. return out, req.Send()
  5984. }
  5985. // PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of
  5986. // the ability to pass a context and additional request options.
  5987. //
  5988. // See PutObjectLockConfiguration for details on how to use this API operation.
  5989. //
  5990. // The context must be non-nil and will be used for request cancellation. If
  5991. // the context is nil a panic will occur. In the future the SDK may create
  5992. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5993. // for more information on using Contexts.
  5994. func (c *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error) {
  5995. req, out := c.PutObjectLockConfigurationRequest(input)
  5996. req.SetContext(ctx)
  5997. req.ApplyOptions(opts...)
  5998. return out, req.Send()
  5999. }
  6000. const opPutObjectRetention = "PutObjectRetention"
  6001. // PutObjectRetentionRequest generates a "aws/request.Request" representing the
  6002. // client's request for the PutObjectRetention operation. The "output" return
  6003. // value will be populated with the request's response once the request completes
  6004. // successfully.
  6005. //
  6006. // Use "Send" method on the returned Request to send the API call to the service.
  6007. // the "output" return value is not valid until after Send returns without error.
  6008. //
  6009. // See PutObjectRetention for more information on using the PutObjectRetention
  6010. // API call, and error handling.
  6011. //
  6012. // This method is useful when you want to inject custom logic or configuration
  6013. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6014. //
  6015. //
  6016. // // Example sending a request using the PutObjectRetentionRequest method.
  6017. // req, resp := client.PutObjectRetentionRequest(params)
  6018. //
  6019. // err := req.Send()
  6020. // if err == nil { // resp is now filled
  6021. // fmt.Println(resp)
  6022. // }
  6023. //
  6024. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
  6025. func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput) {
  6026. op := &request.Operation{
  6027. Name: opPutObjectRetention,
  6028. HTTPMethod: "PUT",
  6029. HTTPPath: "/{Bucket}/{Key+}?retention",
  6030. }
  6031. if input == nil {
  6032. input = &PutObjectRetentionInput{}
  6033. }
  6034. output = &PutObjectRetentionOutput{}
  6035. req = c.newRequest(op, input, output)
  6036. return
  6037. }
  6038. // PutObjectRetention API operation for Amazon Simple Storage Service.
  6039. //
  6040. // Places an Object Retention configuration on an object.
  6041. //
  6042. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6043. // with awserr.Error's Code and Message methods to get detailed information about
  6044. // the error.
  6045. //
  6046. // See the AWS API reference guide for Amazon Simple Storage Service's
  6047. // API operation PutObjectRetention for usage and error information.
  6048. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
  6049. func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error) {
  6050. req, out := c.PutObjectRetentionRequest(input)
  6051. return out, req.Send()
  6052. }
  6053. // PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of
  6054. // the ability to pass a context and additional request options.
  6055. //
  6056. // See PutObjectRetention for details on how to use this API operation.
  6057. //
  6058. // The context must be non-nil and will be used for request cancellation. If
  6059. // the context is nil a panic will occur. In the future the SDK may create
  6060. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6061. // for more information on using Contexts.
  6062. func (c *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error) {
  6063. req, out := c.PutObjectRetentionRequest(input)
  6064. req.SetContext(ctx)
  6065. req.ApplyOptions(opts...)
  6066. return out, req.Send()
  6067. }
  6068. const opPutObjectTagging = "PutObjectTagging"
  6069. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  6070. // client's request for the PutObjectTagging operation. The "output" return
  6071. // value will be populated with the request's response once the request completes
  6072. // successfully.
  6073. //
  6074. // Use "Send" method on the returned Request to send the API call to the service.
  6075. // the "output" return value is not valid until after Send returns without error.
  6076. //
  6077. // See PutObjectTagging for more information on using the PutObjectTagging
  6078. // API call, and error handling.
  6079. //
  6080. // This method is useful when you want to inject custom logic or configuration
  6081. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6082. //
  6083. //
  6084. // // Example sending a request using the PutObjectTaggingRequest method.
  6085. // req, resp := client.PutObjectTaggingRequest(params)
  6086. //
  6087. // err := req.Send()
  6088. // if err == nil { // resp is now filled
  6089. // fmt.Println(resp)
  6090. // }
  6091. //
  6092. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  6093. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  6094. op := &request.Operation{
  6095. Name: opPutObjectTagging,
  6096. HTTPMethod: "PUT",
  6097. HTTPPath: "/{Bucket}/{Key+}?tagging",
  6098. }
  6099. if input == nil {
  6100. input = &PutObjectTaggingInput{}
  6101. }
  6102. output = &PutObjectTaggingOutput{}
  6103. req = c.newRequest(op, input, output)
  6104. return
  6105. }
  6106. // PutObjectTagging API operation for Amazon Simple Storage Service.
  6107. //
  6108. // Sets the supplied tag-set to an object that already exists in a bucket
  6109. //
  6110. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6111. // with awserr.Error's Code and Message methods to get detailed information about
  6112. // the error.
  6113. //
  6114. // See the AWS API reference guide for Amazon Simple Storage Service's
  6115. // API operation PutObjectTagging for usage and error information.
  6116. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  6117. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  6118. req, out := c.PutObjectTaggingRequest(input)
  6119. return out, req.Send()
  6120. }
  6121. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  6122. // the ability to pass a context and additional request options.
  6123. //
  6124. // See PutObjectTagging for details on how to use this API operation.
  6125. //
  6126. // The context must be non-nil and will be used for request cancellation. If
  6127. // the context is nil a panic will occur. In the future the SDK may create
  6128. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6129. // for more information on using Contexts.
  6130. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  6131. req, out := c.PutObjectTaggingRequest(input)
  6132. req.SetContext(ctx)
  6133. req.ApplyOptions(opts...)
  6134. return out, req.Send()
  6135. }
  6136. const opPutPublicAccessBlock = "PutPublicAccessBlock"
  6137. // PutPublicAccessBlockRequest generates a "aws/request.Request" representing the
  6138. // client's request for the PutPublicAccessBlock operation. The "output" return
  6139. // value will be populated with the request's response once the request completes
  6140. // successfully.
  6141. //
  6142. // Use "Send" method on the returned Request to send the API call to the service.
  6143. // the "output" return value is not valid until after Send returns without error.
  6144. //
  6145. // See PutPublicAccessBlock for more information on using the PutPublicAccessBlock
  6146. // API call, and error handling.
  6147. //
  6148. // This method is useful when you want to inject custom logic or configuration
  6149. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6150. //
  6151. //
  6152. // // Example sending a request using the PutPublicAccessBlockRequest method.
  6153. // req, resp := client.PutPublicAccessBlockRequest(params)
  6154. //
  6155. // err := req.Send()
  6156. // if err == nil { // resp is now filled
  6157. // fmt.Println(resp)
  6158. // }
  6159. //
  6160. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
  6161. func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) {
  6162. op := &request.Operation{
  6163. Name: opPutPublicAccessBlock,
  6164. HTTPMethod: "PUT",
  6165. HTTPPath: "/{Bucket}?publicAccessBlock",
  6166. }
  6167. if input == nil {
  6168. input = &PutPublicAccessBlockInput{}
  6169. }
  6170. output = &PutPublicAccessBlockOutput{}
  6171. req = c.newRequest(op, input, output)
  6172. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  6173. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  6174. return
  6175. }
  6176. // PutPublicAccessBlock API operation for Amazon Simple Storage Service.
  6177. //
  6178. // Creates or modifies the PublicAccessBlock configuration for an Amazon S3
  6179. // bucket.
  6180. //
  6181. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6182. // with awserr.Error's Code and Message methods to get detailed information about
  6183. // the error.
  6184. //
  6185. // See the AWS API reference guide for Amazon Simple Storage Service's
  6186. // API operation PutPublicAccessBlock for usage and error information.
  6187. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
  6188. func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) {
  6189. req, out := c.PutPublicAccessBlockRequest(input)
  6190. return out, req.Send()
  6191. }
  6192. // PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of
  6193. // the ability to pass a context and additional request options.
  6194. //
  6195. // See PutPublicAccessBlock for details on how to use this API operation.
  6196. //
  6197. // The context must be non-nil and will be used for request cancellation. If
  6198. // the context is nil a panic will occur. In the future the SDK may create
  6199. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6200. // for more information on using Contexts.
  6201. func (c *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) {
  6202. req, out := c.PutPublicAccessBlockRequest(input)
  6203. req.SetContext(ctx)
  6204. req.ApplyOptions(opts...)
  6205. return out, req.Send()
  6206. }
  6207. const opRestoreObject = "RestoreObject"
  6208. // RestoreObjectRequest generates a "aws/request.Request" representing the
  6209. // client's request for the RestoreObject operation. The "output" return
  6210. // value will be populated with the request's response once the request completes
  6211. // successfully.
  6212. //
  6213. // Use "Send" method on the returned Request to send the API call to the service.
  6214. // the "output" return value is not valid until after Send returns without error.
  6215. //
  6216. // See RestoreObject for more information on using the RestoreObject
  6217. // API call, and error handling.
  6218. //
  6219. // This method is useful when you want to inject custom logic or configuration
  6220. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6221. //
  6222. //
  6223. // // Example sending a request using the RestoreObjectRequest method.
  6224. // req, resp := client.RestoreObjectRequest(params)
  6225. //
  6226. // err := req.Send()
  6227. // if err == nil { // resp is now filled
  6228. // fmt.Println(resp)
  6229. // }
  6230. //
  6231. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  6232. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  6233. op := &request.Operation{
  6234. Name: opRestoreObject,
  6235. HTTPMethod: "POST",
  6236. HTTPPath: "/{Bucket}/{Key+}?restore",
  6237. }
  6238. if input == nil {
  6239. input = &RestoreObjectInput{}
  6240. }
  6241. output = &RestoreObjectOutput{}
  6242. req = c.newRequest(op, input, output)
  6243. return
  6244. }
  6245. // RestoreObject API operation for Amazon Simple Storage Service.
  6246. //
  6247. // Restores an archived copy of an object back into Amazon S3
  6248. //
  6249. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6250. // with awserr.Error's Code and Message methods to get detailed information about
  6251. // the error.
  6252. //
  6253. // See the AWS API reference guide for Amazon Simple Storage Service's
  6254. // API operation RestoreObject for usage and error information.
  6255. //
  6256. // Returned Error Codes:
  6257. // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  6258. // This operation is not allowed against this storage tier
  6259. //
  6260. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  6261. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  6262. req, out := c.RestoreObjectRequest(input)
  6263. return out, req.Send()
  6264. }
  6265. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  6266. // the ability to pass a context and additional request options.
  6267. //
  6268. // See RestoreObject for details on how to use this API operation.
  6269. //
  6270. // The context must be non-nil and will be used for request cancellation. If
  6271. // the context is nil a panic will occur. In the future the SDK may create
  6272. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6273. // for more information on using Contexts.
  6274. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  6275. req, out := c.RestoreObjectRequest(input)
  6276. req.SetContext(ctx)
  6277. req.ApplyOptions(opts...)
  6278. return out, req.Send()
  6279. }
  6280. const opSelectObjectContent = "SelectObjectContent"
  6281. // SelectObjectContentRequest generates a "aws/request.Request" representing the
  6282. // client's request for the SelectObjectContent operation. The "output" return
  6283. // value will be populated with the request's response once the request completes
  6284. // successfully.
  6285. //
  6286. // Use "Send" method on the returned Request to send the API call to the service.
  6287. // the "output" return value is not valid until after Send returns without error.
  6288. //
  6289. // See SelectObjectContent for more information on using the SelectObjectContent
  6290. // API call, and error handling.
  6291. //
  6292. // This method is useful when you want to inject custom logic or configuration
  6293. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6294. //
  6295. //
  6296. // // Example sending a request using the SelectObjectContentRequest method.
  6297. // req, resp := client.SelectObjectContentRequest(params)
  6298. //
  6299. // err := req.Send()
  6300. // if err == nil { // resp is now filled
  6301. // fmt.Println(resp)
  6302. // }
  6303. //
  6304. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  6305. func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) {
  6306. op := &request.Operation{
  6307. Name: opSelectObjectContent,
  6308. HTTPMethod: "POST",
  6309. HTTPPath: "/{Bucket}/{Key+}?select&select-type=2",
  6310. }
  6311. if input == nil {
  6312. input = &SelectObjectContentInput{}
  6313. }
  6314. output = &SelectObjectContentOutput{}
  6315. req = c.newRequest(op, input, output)
  6316. req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
  6317. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler)
  6318. req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop)
  6319. return
  6320. }
  6321. // SelectObjectContent API operation for Amazon Simple Storage Service.
  6322. //
  6323. // This operation filters the contents of an Amazon S3 object based on a simple
  6324. // Structured Query Language (SQL) statement. In the request, along with the
  6325. // SQL expression, you must also specify a data serialization format (JSON or
  6326. // CSV) of the object. Amazon S3 uses this to parse object data into records,
  6327. // and returns only records that match the specified SQL expression. You must
  6328. // also specify the data serialization format for the response.
  6329. //
  6330. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6331. // with awserr.Error's Code and Message methods to get detailed information about
  6332. // the error.
  6333. //
  6334. // See the AWS API reference guide for Amazon Simple Storage Service's
  6335. // API operation SelectObjectContent for usage and error information.
  6336. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  6337. func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) {
  6338. req, out := c.SelectObjectContentRequest(input)
  6339. return out, req.Send()
  6340. }
  6341. // SelectObjectContentWithContext is the same as SelectObjectContent with the addition of
  6342. // the ability to pass a context and additional request options.
  6343. //
  6344. // See SelectObjectContent for details on how to use this API operation.
  6345. //
  6346. // The context must be non-nil and will be used for request cancellation. If
  6347. // the context is nil a panic will occur. In the future the SDK may create
  6348. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6349. // for more information on using Contexts.
  6350. func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) {
  6351. req, out := c.SelectObjectContentRequest(input)
  6352. req.SetContext(ctx)
  6353. req.ApplyOptions(opts...)
  6354. return out, req.Send()
  6355. }
  6356. const opUploadPart = "UploadPart"
  6357. // UploadPartRequest generates a "aws/request.Request" representing the
  6358. // client's request for the UploadPart operation. The "output" return
  6359. // value will be populated with the request's response once the request completes
  6360. // successfully.
  6361. //
  6362. // Use "Send" method on the returned Request to send the API call to the service.
  6363. // the "output" return value is not valid until after Send returns without error.
  6364. //
  6365. // See UploadPart for more information on using the UploadPart
  6366. // API call, and error handling.
  6367. //
  6368. // This method is useful when you want to inject custom logic or configuration
  6369. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6370. //
  6371. //
  6372. // // Example sending a request using the UploadPartRequest method.
  6373. // req, resp := client.UploadPartRequest(params)
  6374. //
  6375. // err := req.Send()
  6376. // if err == nil { // resp is now filled
  6377. // fmt.Println(resp)
  6378. // }
  6379. //
  6380. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  6381. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  6382. op := &request.Operation{
  6383. Name: opUploadPart,
  6384. HTTPMethod: "PUT",
  6385. HTTPPath: "/{Bucket}/{Key+}",
  6386. }
  6387. if input == nil {
  6388. input = &UploadPartInput{}
  6389. }
  6390. output = &UploadPartOutput{}
  6391. req = c.newRequest(op, input, output)
  6392. return
  6393. }
  6394. // UploadPart API operation for Amazon Simple Storage Service.
  6395. //
  6396. // Uploads a part in a multipart upload.
  6397. //
  6398. // Note: After you initiate multipart upload and upload one or more parts, you
  6399. // must either complete or abort multipart upload in order to stop getting charged
  6400. // for storage of the uploaded parts. Only after you either complete or abort
  6401. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  6402. // you for the parts storage.
  6403. //
  6404. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6405. // with awserr.Error's Code and Message methods to get detailed information about
  6406. // the error.
  6407. //
  6408. // See the AWS API reference guide for Amazon Simple Storage Service's
  6409. // API operation UploadPart for usage and error information.
  6410. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  6411. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  6412. req, out := c.UploadPartRequest(input)
  6413. return out, req.Send()
  6414. }
  6415. // UploadPartWithContext is the same as UploadPart with the addition of
  6416. // the ability to pass a context and additional request options.
  6417. //
  6418. // See UploadPart for details on how to use this API operation.
  6419. //
  6420. // The context must be non-nil and will be used for request cancellation. If
  6421. // the context is nil a panic will occur. In the future the SDK may create
  6422. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6423. // for more information on using Contexts.
  6424. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  6425. req, out := c.UploadPartRequest(input)
  6426. req.SetContext(ctx)
  6427. req.ApplyOptions(opts...)
  6428. return out, req.Send()
  6429. }
  6430. const opUploadPartCopy = "UploadPartCopy"
  6431. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  6432. // client's request for the UploadPartCopy operation. The "output" return
  6433. // value will be populated with the request's response once the request completes
  6434. // successfully.
  6435. //
  6436. // Use "Send" method on the returned Request to send the API call to the service.
  6437. // the "output" return value is not valid until after Send returns without error.
  6438. //
  6439. // See UploadPartCopy for more information on using the UploadPartCopy
  6440. // API call, and error handling.
  6441. //
  6442. // This method is useful when you want to inject custom logic or configuration
  6443. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6444. //
  6445. //
  6446. // // Example sending a request using the UploadPartCopyRequest method.
  6447. // req, resp := client.UploadPartCopyRequest(params)
  6448. //
  6449. // err := req.Send()
  6450. // if err == nil { // resp is now filled
  6451. // fmt.Println(resp)
  6452. // }
  6453. //
  6454. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  6455. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  6456. op := &request.Operation{
  6457. Name: opUploadPartCopy,
  6458. HTTPMethod: "PUT",
  6459. HTTPPath: "/{Bucket}/{Key+}",
  6460. }
  6461. if input == nil {
  6462. input = &UploadPartCopyInput{}
  6463. }
  6464. output = &UploadPartCopyOutput{}
  6465. req = c.newRequest(op, input, output)
  6466. return
  6467. }
  6468. // UploadPartCopy API operation for Amazon Simple Storage Service.
  6469. //
  6470. // Uploads a part by copying data from an existing object as data source.
  6471. //
  6472. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6473. // with awserr.Error's Code and Message methods to get detailed information about
  6474. // the error.
  6475. //
  6476. // See the AWS API reference guide for Amazon Simple Storage Service's
  6477. // API operation UploadPartCopy for usage and error information.
  6478. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  6479. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  6480. req, out := c.UploadPartCopyRequest(input)
  6481. return out, req.Send()
  6482. }
  6483. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  6484. // the ability to pass a context and additional request options.
  6485. //
  6486. // See UploadPartCopy for details on how to use this API operation.
  6487. //
  6488. // The context must be non-nil and will be used for request cancellation. If
  6489. // the context is nil a panic will occur. In the future the SDK may create
  6490. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6491. // for more information on using Contexts.
  6492. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  6493. req, out := c.UploadPartCopyRequest(input)
  6494. req.SetContext(ctx)
  6495. req.ApplyOptions(opts...)
  6496. return out, req.Send()
  6497. }
  6498. // Specifies the days since the initiation of an Incomplete Multipart Upload
  6499. // that Lifecycle will wait before permanently removing all parts of the upload.
  6500. type AbortIncompleteMultipartUpload struct {
  6501. _ struct{} `type:"structure"`
  6502. // Indicates the number of days that must pass since initiation for Lifecycle
  6503. // to abort an Incomplete Multipart Upload.
  6504. DaysAfterInitiation *int64 `type:"integer"`
  6505. }
  6506. // String returns the string representation
  6507. func (s AbortIncompleteMultipartUpload) String() string {
  6508. return awsutil.Prettify(s)
  6509. }
  6510. // GoString returns the string representation
  6511. func (s AbortIncompleteMultipartUpload) GoString() string {
  6512. return s.String()
  6513. }
  6514. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  6515. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  6516. s.DaysAfterInitiation = &v
  6517. return s
  6518. }
  6519. type AbortMultipartUploadInput struct {
  6520. _ struct{} `type:"structure"`
  6521. // Bucket is a required field
  6522. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6523. // Key is a required field
  6524. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6525. // Confirms that the requester knows that she or he will be charged for the
  6526. // request. Bucket owners need not specify this parameter in their requests.
  6527. // Documentation on downloading objects from requester pays buckets can be found
  6528. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6529. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6530. // UploadId is a required field
  6531. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6532. }
  6533. // String returns the string representation
  6534. func (s AbortMultipartUploadInput) String() string {
  6535. return awsutil.Prettify(s)
  6536. }
  6537. // GoString returns the string representation
  6538. func (s AbortMultipartUploadInput) GoString() string {
  6539. return s.String()
  6540. }
  6541. // Validate inspects the fields of the type to determine if they are valid.
  6542. func (s *AbortMultipartUploadInput) Validate() error {
  6543. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  6544. if s.Bucket == nil {
  6545. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6546. }
  6547. if s.Bucket != nil && len(*s.Bucket) < 1 {
  6548. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  6549. }
  6550. if s.Key == nil {
  6551. invalidParams.Add(request.NewErrParamRequired("Key"))
  6552. }
  6553. if s.Key != nil && len(*s.Key) < 1 {
  6554. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6555. }
  6556. if s.UploadId == nil {
  6557. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6558. }
  6559. if invalidParams.Len() > 0 {
  6560. return invalidParams
  6561. }
  6562. return nil
  6563. }
  6564. // SetBucket sets the Bucket field's value.
  6565. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  6566. s.Bucket = &v
  6567. return s
  6568. }
  6569. func (s *AbortMultipartUploadInput) getBucket() (v string) {
  6570. if s.Bucket == nil {
  6571. return v
  6572. }
  6573. return *s.Bucket
  6574. }
  6575. // SetKey sets the Key field's value.
  6576. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  6577. s.Key = &v
  6578. return s
  6579. }
  6580. // SetRequestPayer sets the RequestPayer field's value.
  6581. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  6582. s.RequestPayer = &v
  6583. return s
  6584. }
  6585. // SetUploadId sets the UploadId field's value.
  6586. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  6587. s.UploadId = &v
  6588. return s
  6589. }
  6590. type AbortMultipartUploadOutput struct {
  6591. _ struct{} `type:"structure"`
  6592. // If present, indicates that the requester was successfully charged for the
  6593. // request.
  6594. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6595. }
  6596. // String returns the string representation
  6597. func (s AbortMultipartUploadOutput) String() string {
  6598. return awsutil.Prettify(s)
  6599. }
  6600. // GoString returns the string representation
  6601. func (s AbortMultipartUploadOutput) GoString() string {
  6602. return s.String()
  6603. }
  6604. // SetRequestCharged sets the RequestCharged field's value.
  6605. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  6606. s.RequestCharged = &v
  6607. return s
  6608. }
  6609. type AccelerateConfiguration struct {
  6610. _ struct{} `type:"structure"`
  6611. // The accelerate configuration of the bucket.
  6612. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  6613. }
  6614. // String returns the string representation
  6615. func (s AccelerateConfiguration) String() string {
  6616. return awsutil.Prettify(s)
  6617. }
  6618. // GoString returns the string representation
  6619. func (s AccelerateConfiguration) GoString() string {
  6620. return s.String()
  6621. }
  6622. // SetStatus sets the Status field's value.
  6623. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  6624. s.Status = &v
  6625. return s
  6626. }
  6627. type AccessControlPolicy struct {
  6628. _ struct{} `type:"structure"`
  6629. // A list of grants.
  6630. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  6631. Owner *Owner `type:"structure"`
  6632. }
  6633. // String returns the string representation
  6634. func (s AccessControlPolicy) String() string {
  6635. return awsutil.Prettify(s)
  6636. }
  6637. // GoString returns the string representation
  6638. func (s AccessControlPolicy) GoString() string {
  6639. return s.String()
  6640. }
  6641. // Validate inspects the fields of the type to determine if they are valid.
  6642. func (s *AccessControlPolicy) Validate() error {
  6643. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  6644. if s.Grants != nil {
  6645. for i, v := range s.Grants {
  6646. if v == nil {
  6647. continue
  6648. }
  6649. if err := v.Validate(); err != nil {
  6650. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  6651. }
  6652. }
  6653. }
  6654. if invalidParams.Len() > 0 {
  6655. return invalidParams
  6656. }
  6657. return nil
  6658. }
  6659. // SetGrants sets the Grants field's value.
  6660. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  6661. s.Grants = v
  6662. return s
  6663. }
  6664. // SetOwner sets the Owner field's value.
  6665. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  6666. s.Owner = v
  6667. return s
  6668. }
  6669. // A container for information about access control for replicas.
  6670. type AccessControlTranslation struct {
  6671. _ struct{} `type:"structure"`
  6672. // The override value for the owner of the replica object.
  6673. //
  6674. // Owner is a required field
  6675. Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
  6676. }
  6677. // String returns the string representation
  6678. func (s AccessControlTranslation) String() string {
  6679. return awsutil.Prettify(s)
  6680. }
  6681. // GoString returns the string representation
  6682. func (s AccessControlTranslation) GoString() string {
  6683. return s.String()
  6684. }
  6685. // Validate inspects the fields of the type to determine if they are valid.
  6686. func (s *AccessControlTranslation) Validate() error {
  6687. invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
  6688. if s.Owner == nil {
  6689. invalidParams.Add(request.NewErrParamRequired("Owner"))
  6690. }
  6691. if invalidParams.Len() > 0 {
  6692. return invalidParams
  6693. }
  6694. return nil
  6695. }
  6696. // SetOwner sets the Owner field's value.
  6697. func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
  6698. s.Owner = &v
  6699. return s
  6700. }
  6701. type AnalyticsAndOperator struct {
  6702. _ struct{} `type:"structure"`
  6703. // The prefix to use when evaluating an AND predicate.
  6704. Prefix *string `type:"string"`
  6705. // The list of tags to use when evaluating an AND predicate.
  6706. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  6707. }
  6708. // String returns the string representation
  6709. func (s AnalyticsAndOperator) String() string {
  6710. return awsutil.Prettify(s)
  6711. }
  6712. // GoString returns the string representation
  6713. func (s AnalyticsAndOperator) GoString() string {
  6714. return s.String()
  6715. }
  6716. // Validate inspects the fields of the type to determine if they are valid.
  6717. func (s *AnalyticsAndOperator) Validate() error {
  6718. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  6719. if s.Tags != nil {
  6720. for i, v := range s.Tags {
  6721. if v == nil {
  6722. continue
  6723. }
  6724. if err := v.Validate(); err != nil {
  6725. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6726. }
  6727. }
  6728. }
  6729. if invalidParams.Len() > 0 {
  6730. return invalidParams
  6731. }
  6732. return nil
  6733. }
  6734. // SetPrefix sets the Prefix field's value.
  6735. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  6736. s.Prefix = &v
  6737. return s
  6738. }
  6739. // SetTags sets the Tags field's value.
  6740. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  6741. s.Tags = v
  6742. return s
  6743. }
  6744. type AnalyticsConfiguration struct {
  6745. _ struct{} `type:"structure"`
  6746. // The filter used to describe a set of objects for analyses. A filter must
  6747. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  6748. // If no filter is provided, all objects will be considered in any analysis.
  6749. Filter *AnalyticsFilter `type:"structure"`
  6750. // The identifier used to represent an analytics configuration.
  6751. //
  6752. // Id is a required field
  6753. Id *string `type:"string" required:"true"`
  6754. // If present, it indicates that data related to access patterns will be collected
  6755. // and made available to analyze the tradeoffs between different storage classes.
  6756. //
  6757. // StorageClassAnalysis is a required field
  6758. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  6759. }
  6760. // String returns the string representation
  6761. func (s AnalyticsConfiguration) String() string {
  6762. return awsutil.Prettify(s)
  6763. }
  6764. // GoString returns the string representation
  6765. func (s AnalyticsConfiguration) GoString() string {
  6766. return s.String()
  6767. }
  6768. // Validate inspects the fields of the type to determine if they are valid.
  6769. func (s *AnalyticsConfiguration) Validate() error {
  6770. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  6771. if s.Id == nil {
  6772. invalidParams.Add(request.NewErrParamRequired("Id"))
  6773. }
  6774. if s.StorageClassAnalysis == nil {
  6775. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  6776. }
  6777. if s.Filter != nil {
  6778. if err := s.Filter.Validate(); err != nil {
  6779. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  6780. }
  6781. }
  6782. if s.StorageClassAnalysis != nil {
  6783. if err := s.StorageClassAnalysis.Validate(); err != nil {
  6784. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  6785. }
  6786. }
  6787. if invalidParams.Len() > 0 {
  6788. return invalidParams
  6789. }
  6790. return nil
  6791. }
  6792. // SetFilter sets the Filter field's value.
  6793. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  6794. s.Filter = v
  6795. return s
  6796. }
  6797. // SetId sets the Id field's value.
  6798. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  6799. s.Id = &v
  6800. return s
  6801. }
  6802. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  6803. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  6804. s.StorageClassAnalysis = v
  6805. return s
  6806. }
  6807. type AnalyticsExportDestination struct {
  6808. _ struct{} `type:"structure"`
  6809. // A destination signifying output to an S3 bucket.
  6810. //
  6811. // S3BucketDestination is a required field
  6812. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  6813. }
  6814. // String returns the string representation
  6815. func (s AnalyticsExportDestination) String() string {
  6816. return awsutil.Prettify(s)
  6817. }
  6818. // GoString returns the string representation
  6819. func (s AnalyticsExportDestination) GoString() string {
  6820. return s.String()
  6821. }
  6822. // Validate inspects the fields of the type to determine if they are valid.
  6823. func (s *AnalyticsExportDestination) Validate() error {
  6824. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  6825. if s.S3BucketDestination == nil {
  6826. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  6827. }
  6828. if s.S3BucketDestination != nil {
  6829. if err := s.S3BucketDestination.Validate(); err != nil {
  6830. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  6831. }
  6832. }
  6833. if invalidParams.Len() > 0 {
  6834. return invalidParams
  6835. }
  6836. return nil
  6837. }
  6838. // SetS3BucketDestination sets the S3BucketDestination field's value.
  6839. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  6840. s.S3BucketDestination = v
  6841. return s
  6842. }
  6843. type AnalyticsFilter struct {
  6844. _ struct{} `type:"structure"`
  6845. // A conjunction (logical AND) of predicates, which is used in evaluating an
  6846. // analytics filter. The operator must have at least two predicates.
  6847. And *AnalyticsAndOperator `type:"structure"`
  6848. // The prefix to use when evaluating an analytics filter.
  6849. Prefix *string `type:"string"`
  6850. // The tag to use when evaluating an analytics filter.
  6851. Tag *Tag `type:"structure"`
  6852. }
  6853. // String returns the string representation
  6854. func (s AnalyticsFilter) String() string {
  6855. return awsutil.Prettify(s)
  6856. }
  6857. // GoString returns the string representation
  6858. func (s AnalyticsFilter) GoString() string {
  6859. return s.String()
  6860. }
  6861. // Validate inspects the fields of the type to determine if they are valid.
  6862. func (s *AnalyticsFilter) Validate() error {
  6863. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  6864. if s.And != nil {
  6865. if err := s.And.Validate(); err != nil {
  6866. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  6867. }
  6868. }
  6869. if s.Tag != nil {
  6870. if err := s.Tag.Validate(); err != nil {
  6871. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  6872. }
  6873. }
  6874. if invalidParams.Len() > 0 {
  6875. return invalidParams
  6876. }
  6877. return nil
  6878. }
  6879. // SetAnd sets the And field's value.
  6880. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  6881. s.And = v
  6882. return s
  6883. }
  6884. // SetPrefix sets the Prefix field's value.
  6885. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  6886. s.Prefix = &v
  6887. return s
  6888. }
  6889. // SetTag sets the Tag field's value.
  6890. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  6891. s.Tag = v
  6892. return s
  6893. }
  6894. type AnalyticsS3BucketDestination struct {
  6895. _ struct{} `type:"structure"`
  6896. // The Amazon resource name (ARN) of the bucket to which data is exported.
  6897. //
  6898. // Bucket is a required field
  6899. Bucket *string `type:"string" required:"true"`
  6900. // The account ID that owns the destination bucket. If no account ID is provided,
  6901. // the owner will not be validated prior to exporting data.
  6902. BucketAccountId *string `type:"string"`
  6903. // The file format used when exporting data to Amazon S3.
  6904. //
  6905. // Format is a required field
  6906. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  6907. // The prefix to use when exporting data. The exported data begins with this
  6908. // prefix.
  6909. Prefix *string `type:"string"`
  6910. }
  6911. // String returns the string representation
  6912. func (s AnalyticsS3BucketDestination) String() string {
  6913. return awsutil.Prettify(s)
  6914. }
  6915. // GoString returns the string representation
  6916. func (s AnalyticsS3BucketDestination) GoString() string {
  6917. return s.String()
  6918. }
  6919. // Validate inspects the fields of the type to determine if they are valid.
  6920. func (s *AnalyticsS3BucketDestination) Validate() error {
  6921. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  6922. if s.Bucket == nil {
  6923. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6924. }
  6925. if s.Format == nil {
  6926. invalidParams.Add(request.NewErrParamRequired("Format"))
  6927. }
  6928. if invalidParams.Len() > 0 {
  6929. return invalidParams
  6930. }
  6931. return nil
  6932. }
  6933. // SetBucket sets the Bucket field's value.
  6934. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  6935. s.Bucket = &v
  6936. return s
  6937. }
  6938. func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
  6939. if s.Bucket == nil {
  6940. return v
  6941. }
  6942. return *s.Bucket
  6943. }
  6944. // SetBucketAccountId sets the BucketAccountId field's value.
  6945. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  6946. s.BucketAccountId = &v
  6947. return s
  6948. }
  6949. // SetFormat sets the Format field's value.
  6950. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  6951. s.Format = &v
  6952. return s
  6953. }
  6954. // SetPrefix sets the Prefix field's value.
  6955. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  6956. s.Prefix = &v
  6957. return s
  6958. }
  6959. type Bucket struct {
  6960. _ struct{} `type:"structure"`
  6961. // Date the bucket was created.
  6962. CreationDate *time.Time `type:"timestamp"`
  6963. // The name of the bucket.
  6964. Name *string `type:"string"`
  6965. }
  6966. // String returns the string representation
  6967. func (s Bucket) String() string {
  6968. return awsutil.Prettify(s)
  6969. }
  6970. // GoString returns the string representation
  6971. func (s Bucket) GoString() string {
  6972. return s.String()
  6973. }
  6974. // SetCreationDate sets the CreationDate field's value.
  6975. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  6976. s.CreationDate = &v
  6977. return s
  6978. }
  6979. // SetName sets the Name field's value.
  6980. func (s *Bucket) SetName(v string) *Bucket {
  6981. s.Name = &v
  6982. return s
  6983. }
  6984. type BucketLifecycleConfiguration struct {
  6985. _ struct{} `type:"structure"`
  6986. // Rules is a required field
  6987. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  6988. }
  6989. // String returns the string representation
  6990. func (s BucketLifecycleConfiguration) String() string {
  6991. return awsutil.Prettify(s)
  6992. }
  6993. // GoString returns the string representation
  6994. func (s BucketLifecycleConfiguration) GoString() string {
  6995. return s.String()
  6996. }
  6997. // Validate inspects the fields of the type to determine if they are valid.
  6998. func (s *BucketLifecycleConfiguration) Validate() error {
  6999. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  7000. if s.Rules == nil {
  7001. invalidParams.Add(request.NewErrParamRequired("Rules"))
  7002. }
  7003. if s.Rules != nil {
  7004. for i, v := range s.Rules {
  7005. if v == nil {
  7006. continue
  7007. }
  7008. if err := v.Validate(); err != nil {
  7009. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  7010. }
  7011. }
  7012. }
  7013. if invalidParams.Len() > 0 {
  7014. return invalidParams
  7015. }
  7016. return nil
  7017. }
  7018. // SetRules sets the Rules field's value.
  7019. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  7020. s.Rules = v
  7021. return s
  7022. }
  7023. type BucketLoggingStatus struct {
  7024. _ struct{} `type:"structure"`
  7025. // Container for logging information. Presence of this element indicates that
  7026. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  7027. // in this case.
  7028. LoggingEnabled *LoggingEnabled `type:"structure"`
  7029. }
  7030. // String returns the string representation
  7031. func (s BucketLoggingStatus) String() string {
  7032. return awsutil.Prettify(s)
  7033. }
  7034. // GoString returns the string representation
  7035. func (s BucketLoggingStatus) GoString() string {
  7036. return s.String()
  7037. }
  7038. // Validate inspects the fields of the type to determine if they are valid.
  7039. func (s *BucketLoggingStatus) Validate() error {
  7040. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  7041. if s.LoggingEnabled != nil {
  7042. if err := s.LoggingEnabled.Validate(); err != nil {
  7043. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  7044. }
  7045. }
  7046. if invalidParams.Len() > 0 {
  7047. return invalidParams
  7048. }
  7049. return nil
  7050. }
  7051. // SetLoggingEnabled sets the LoggingEnabled field's value.
  7052. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  7053. s.LoggingEnabled = v
  7054. return s
  7055. }
  7056. type CORSConfiguration struct {
  7057. _ struct{} `type:"structure"`
  7058. // CORSRules is a required field
  7059. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  7060. }
  7061. // String returns the string representation
  7062. func (s CORSConfiguration) String() string {
  7063. return awsutil.Prettify(s)
  7064. }
  7065. // GoString returns the string representation
  7066. func (s CORSConfiguration) GoString() string {
  7067. return s.String()
  7068. }
  7069. // Validate inspects the fields of the type to determine if they are valid.
  7070. func (s *CORSConfiguration) Validate() error {
  7071. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  7072. if s.CORSRules == nil {
  7073. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  7074. }
  7075. if s.CORSRules != nil {
  7076. for i, v := range s.CORSRules {
  7077. if v == nil {
  7078. continue
  7079. }
  7080. if err := v.Validate(); err != nil {
  7081. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  7082. }
  7083. }
  7084. }
  7085. if invalidParams.Len() > 0 {
  7086. return invalidParams
  7087. }
  7088. return nil
  7089. }
  7090. // SetCORSRules sets the CORSRules field's value.
  7091. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  7092. s.CORSRules = v
  7093. return s
  7094. }
  7095. type CORSRule struct {
  7096. _ struct{} `type:"structure"`
  7097. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  7098. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  7099. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  7100. // to execute.
  7101. //
  7102. // AllowedMethods is a required field
  7103. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  7104. // One or more origins you want customers to be able to access the bucket from.
  7105. //
  7106. // AllowedOrigins is a required field
  7107. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  7108. // One or more headers in the response that you want customers to be able to
  7109. // access from their applications (for example, from a JavaScript XMLHttpRequest
  7110. // object).
  7111. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  7112. // The time in seconds that your browser is to cache the preflight response
  7113. // for the specified resource.
  7114. MaxAgeSeconds *int64 `type:"integer"`
  7115. }
  7116. // String returns the string representation
  7117. func (s CORSRule) String() string {
  7118. return awsutil.Prettify(s)
  7119. }
  7120. // GoString returns the string representation
  7121. func (s CORSRule) GoString() string {
  7122. return s.String()
  7123. }
  7124. // Validate inspects the fields of the type to determine if they are valid.
  7125. func (s *CORSRule) Validate() error {
  7126. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  7127. if s.AllowedMethods == nil {
  7128. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  7129. }
  7130. if s.AllowedOrigins == nil {
  7131. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  7132. }
  7133. if invalidParams.Len() > 0 {
  7134. return invalidParams
  7135. }
  7136. return nil
  7137. }
  7138. // SetAllowedHeaders sets the AllowedHeaders field's value.
  7139. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  7140. s.AllowedHeaders = v
  7141. return s
  7142. }
  7143. // SetAllowedMethods sets the AllowedMethods field's value.
  7144. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  7145. s.AllowedMethods = v
  7146. return s
  7147. }
  7148. // SetAllowedOrigins sets the AllowedOrigins field's value.
  7149. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  7150. s.AllowedOrigins = v
  7151. return s
  7152. }
  7153. // SetExposeHeaders sets the ExposeHeaders field's value.
  7154. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  7155. s.ExposeHeaders = v
  7156. return s
  7157. }
  7158. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  7159. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  7160. s.MaxAgeSeconds = &v
  7161. return s
  7162. }
  7163. // Describes how a CSV-formatted input object is formatted.
  7164. type CSVInput struct {
  7165. _ struct{} `type:"structure"`
  7166. // Specifies that CSV field values may contain quoted record delimiters and
  7167. // such records should be allowed. Default value is FALSE. Setting this value
  7168. // to TRUE may lower performance.
  7169. AllowQuotedRecordDelimiter *bool `type:"boolean"`
  7170. // The single character used to indicate a row should be ignored when present
  7171. // at the start of a row.
  7172. Comments *string `type:"string"`
  7173. // The value used to separate individual fields in a record.
  7174. FieldDelimiter *string `type:"string"`
  7175. // Describes the first line of input. Valid values: None, Ignore, Use.
  7176. FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
  7177. // Value used for escaping where the field delimiter is part of the value.
  7178. QuoteCharacter *string `type:"string"`
  7179. // The single character used for escaping the quote character inside an already
  7180. // escaped value.
  7181. QuoteEscapeCharacter *string `type:"string"`
  7182. // The value used to separate individual records.
  7183. RecordDelimiter *string `type:"string"`
  7184. }
  7185. // String returns the string representation
  7186. func (s CSVInput) String() string {
  7187. return awsutil.Prettify(s)
  7188. }
  7189. // GoString returns the string representation
  7190. func (s CSVInput) GoString() string {
  7191. return s.String()
  7192. }
  7193. // SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value.
  7194. func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
  7195. s.AllowQuotedRecordDelimiter = &v
  7196. return s
  7197. }
  7198. // SetComments sets the Comments field's value.
  7199. func (s *CSVInput) SetComments(v string) *CSVInput {
  7200. s.Comments = &v
  7201. return s
  7202. }
  7203. // SetFieldDelimiter sets the FieldDelimiter field's value.
  7204. func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
  7205. s.FieldDelimiter = &v
  7206. return s
  7207. }
  7208. // SetFileHeaderInfo sets the FileHeaderInfo field's value.
  7209. func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
  7210. s.FileHeaderInfo = &v
  7211. return s
  7212. }
  7213. // SetQuoteCharacter sets the QuoteCharacter field's value.
  7214. func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
  7215. s.QuoteCharacter = &v
  7216. return s
  7217. }
  7218. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  7219. func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
  7220. s.QuoteEscapeCharacter = &v
  7221. return s
  7222. }
  7223. // SetRecordDelimiter sets the RecordDelimiter field's value.
  7224. func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
  7225. s.RecordDelimiter = &v
  7226. return s
  7227. }
  7228. // Describes how CSV-formatted results are formatted.
  7229. type CSVOutput struct {
  7230. _ struct{} `type:"structure"`
  7231. // The value used to separate individual fields in a record.
  7232. FieldDelimiter *string `type:"string"`
  7233. // The value used for escaping where the field delimiter is part of the value.
  7234. QuoteCharacter *string `type:"string"`
  7235. // Th single character used for escaping the quote character inside an already
  7236. // escaped value.
  7237. QuoteEscapeCharacter *string `type:"string"`
  7238. // Indicates whether or not all output fields should be quoted.
  7239. QuoteFields *string `type:"string" enum:"QuoteFields"`
  7240. // The value used to separate individual records.
  7241. RecordDelimiter *string `type:"string"`
  7242. }
  7243. // String returns the string representation
  7244. func (s CSVOutput) String() string {
  7245. return awsutil.Prettify(s)
  7246. }
  7247. // GoString returns the string representation
  7248. func (s CSVOutput) GoString() string {
  7249. return s.String()
  7250. }
  7251. // SetFieldDelimiter sets the FieldDelimiter field's value.
  7252. func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
  7253. s.FieldDelimiter = &v
  7254. return s
  7255. }
  7256. // SetQuoteCharacter sets the QuoteCharacter field's value.
  7257. func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
  7258. s.QuoteCharacter = &v
  7259. return s
  7260. }
  7261. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  7262. func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
  7263. s.QuoteEscapeCharacter = &v
  7264. return s
  7265. }
  7266. // SetQuoteFields sets the QuoteFields field's value.
  7267. func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
  7268. s.QuoteFields = &v
  7269. return s
  7270. }
  7271. // SetRecordDelimiter sets the RecordDelimiter field's value.
  7272. func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
  7273. s.RecordDelimiter = &v
  7274. return s
  7275. }
  7276. type CloudFunctionConfiguration struct {
  7277. _ struct{} `type:"structure"`
  7278. CloudFunction *string `type:"string"`
  7279. // The bucket event for which to send notifications.
  7280. //
  7281. // Deprecated: Event has been deprecated
  7282. Event *string `deprecated:"true" type:"string" enum:"Event"`
  7283. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  7284. // An optional unique identifier for configurations in a notification configuration.
  7285. // If you don't provide one, Amazon S3 will assign an ID.
  7286. Id *string `type:"string"`
  7287. InvocationRole *string `type:"string"`
  7288. }
  7289. // String returns the string representation
  7290. func (s CloudFunctionConfiguration) String() string {
  7291. return awsutil.Prettify(s)
  7292. }
  7293. // GoString returns the string representation
  7294. func (s CloudFunctionConfiguration) GoString() string {
  7295. return s.String()
  7296. }
  7297. // SetCloudFunction sets the CloudFunction field's value.
  7298. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  7299. s.CloudFunction = &v
  7300. return s
  7301. }
  7302. // SetEvent sets the Event field's value.
  7303. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  7304. s.Event = &v
  7305. return s
  7306. }
  7307. // SetEvents sets the Events field's value.
  7308. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  7309. s.Events = v
  7310. return s
  7311. }
  7312. // SetId sets the Id field's value.
  7313. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  7314. s.Id = &v
  7315. return s
  7316. }
  7317. // SetInvocationRole sets the InvocationRole field's value.
  7318. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  7319. s.InvocationRole = &v
  7320. return s
  7321. }
  7322. type CommonPrefix struct {
  7323. _ struct{} `type:"structure"`
  7324. Prefix *string `type:"string"`
  7325. }
  7326. // String returns the string representation
  7327. func (s CommonPrefix) String() string {
  7328. return awsutil.Prettify(s)
  7329. }
  7330. // GoString returns the string representation
  7331. func (s CommonPrefix) GoString() string {
  7332. return s.String()
  7333. }
  7334. // SetPrefix sets the Prefix field's value.
  7335. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  7336. s.Prefix = &v
  7337. return s
  7338. }
  7339. type CompleteMultipartUploadInput struct {
  7340. _ struct{} `type:"structure" payload:"MultipartUpload"`
  7341. // Bucket is a required field
  7342. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7343. // Key is a required field
  7344. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7345. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  7346. // Confirms that the requester knows that she or he will be charged for the
  7347. // request. Bucket owners need not specify this parameter in their requests.
  7348. // Documentation on downloading objects from requester pays buckets can be found
  7349. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7350. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7351. // UploadId is a required field
  7352. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  7353. }
  7354. // String returns the string representation
  7355. func (s CompleteMultipartUploadInput) String() string {
  7356. return awsutil.Prettify(s)
  7357. }
  7358. // GoString returns the string representation
  7359. func (s CompleteMultipartUploadInput) GoString() string {
  7360. return s.String()
  7361. }
  7362. // Validate inspects the fields of the type to determine if they are valid.
  7363. func (s *CompleteMultipartUploadInput) Validate() error {
  7364. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  7365. if s.Bucket == nil {
  7366. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7367. }
  7368. if s.Bucket != nil && len(*s.Bucket) < 1 {
  7369. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  7370. }
  7371. if s.Key == nil {
  7372. invalidParams.Add(request.NewErrParamRequired("Key"))
  7373. }
  7374. if s.Key != nil && len(*s.Key) < 1 {
  7375. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7376. }
  7377. if s.UploadId == nil {
  7378. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  7379. }
  7380. if invalidParams.Len() > 0 {
  7381. return invalidParams
  7382. }
  7383. return nil
  7384. }
  7385. // SetBucket sets the Bucket field's value.
  7386. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  7387. s.Bucket = &v
  7388. return s
  7389. }
  7390. func (s *CompleteMultipartUploadInput) getBucket() (v string) {
  7391. if s.Bucket == nil {
  7392. return v
  7393. }
  7394. return *s.Bucket
  7395. }
  7396. // SetKey sets the Key field's value.
  7397. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  7398. s.Key = &v
  7399. return s
  7400. }
  7401. // SetMultipartUpload sets the MultipartUpload field's value.
  7402. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  7403. s.MultipartUpload = v
  7404. return s
  7405. }
  7406. // SetRequestPayer sets the RequestPayer field's value.
  7407. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  7408. s.RequestPayer = &v
  7409. return s
  7410. }
  7411. // SetUploadId sets the UploadId field's value.
  7412. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  7413. s.UploadId = &v
  7414. return s
  7415. }
  7416. type CompleteMultipartUploadOutput struct {
  7417. _ struct{} `type:"structure"`
  7418. Bucket *string `type:"string"`
  7419. // Entity tag of the object.
  7420. ETag *string `type:"string"`
  7421. // If the object expiration is configured, this will contain the expiration
  7422. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  7423. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7424. Key *string `min:"1" type:"string"`
  7425. Location *string `type:"string"`
  7426. // If present, indicates that the requester was successfully charged for the
  7427. // request.
  7428. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7429. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7430. // encryption key that was used for the object.
  7431. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7432. // The Server-side encryption algorithm used when storing this object in S3
  7433. // (e.g., AES256, aws:kms).
  7434. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7435. // Version of the object.
  7436. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7437. }
  7438. // String returns the string representation
  7439. func (s CompleteMultipartUploadOutput) String() string {
  7440. return awsutil.Prettify(s)
  7441. }
  7442. // GoString returns the string representation
  7443. func (s CompleteMultipartUploadOutput) GoString() string {
  7444. return s.String()
  7445. }
  7446. // SetBucket sets the Bucket field's value.
  7447. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  7448. s.Bucket = &v
  7449. return s
  7450. }
  7451. func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
  7452. if s.Bucket == nil {
  7453. return v
  7454. }
  7455. return *s.Bucket
  7456. }
  7457. // SetETag sets the ETag field's value.
  7458. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  7459. s.ETag = &v
  7460. return s
  7461. }
  7462. // SetExpiration sets the Expiration field's value.
  7463. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  7464. s.Expiration = &v
  7465. return s
  7466. }
  7467. // SetKey sets the Key field's value.
  7468. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  7469. s.Key = &v
  7470. return s
  7471. }
  7472. // SetLocation sets the Location field's value.
  7473. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  7474. s.Location = &v
  7475. return s
  7476. }
  7477. // SetRequestCharged sets the RequestCharged field's value.
  7478. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  7479. s.RequestCharged = &v
  7480. return s
  7481. }
  7482. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7483. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  7484. s.SSEKMSKeyId = &v
  7485. return s
  7486. }
  7487. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7488. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  7489. s.ServerSideEncryption = &v
  7490. return s
  7491. }
  7492. // SetVersionId sets the VersionId field's value.
  7493. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  7494. s.VersionId = &v
  7495. return s
  7496. }
  7497. type CompletedMultipartUpload struct {
  7498. _ struct{} `type:"structure"`
  7499. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  7500. }
  7501. // String returns the string representation
  7502. func (s CompletedMultipartUpload) String() string {
  7503. return awsutil.Prettify(s)
  7504. }
  7505. // GoString returns the string representation
  7506. func (s CompletedMultipartUpload) GoString() string {
  7507. return s.String()
  7508. }
  7509. // SetParts sets the Parts field's value.
  7510. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  7511. s.Parts = v
  7512. return s
  7513. }
  7514. type CompletedPart struct {
  7515. _ struct{} `type:"structure"`
  7516. // Entity tag returned when the part was uploaded.
  7517. ETag *string `type:"string"`
  7518. // Part number that identifies the part. This is a positive integer between
  7519. // 1 and 10,000.
  7520. PartNumber *int64 `type:"integer"`
  7521. }
  7522. // String returns the string representation
  7523. func (s CompletedPart) String() string {
  7524. return awsutil.Prettify(s)
  7525. }
  7526. // GoString returns the string representation
  7527. func (s CompletedPart) GoString() string {
  7528. return s.String()
  7529. }
  7530. // SetETag sets the ETag field's value.
  7531. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  7532. s.ETag = &v
  7533. return s
  7534. }
  7535. // SetPartNumber sets the PartNumber field's value.
  7536. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  7537. s.PartNumber = &v
  7538. return s
  7539. }
  7540. type Condition struct {
  7541. _ struct{} `type:"structure"`
  7542. // The HTTP error code when the redirect is applied. In the event of an error,
  7543. // if the error code equals this value, then the specified redirect is applied.
  7544. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  7545. // is not specified. If both are specified, then both must be true for the redirect
  7546. // to be applied.
  7547. HttpErrorCodeReturnedEquals *string `type:"string"`
  7548. // The object key name prefix when the redirect is applied. For example, to
  7549. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  7550. // To redirect request for all pages with the prefix docs/, the key prefix will
  7551. // be /docs, which identifies all objects in the docs/ folder. Required when
  7552. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  7553. // is not specified. If both conditions are specified, both must be true for
  7554. // the redirect to be applied.
  7555. KeyPrefixEquals *string `type:"string"`
  7556. }
  7557. // String returns the string representation
  7558. func (s Condition) String() string {
  7559. return awsutil.Prettify(s)
  7560. }
  7561. // GoString returns the string representation
  7562. func (s Condition) GoString() string {
  7563. return s.String()
  7564. }
  7565. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  7566. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  7567. s.HttpErrorCodeReturnedEquals = &v
  7568. return s
  7569. }
  7570. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  7571. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  7572. s.KeyPrefixEquals = &v
  7573. return s
  7574. }
  7575. type ContinuationEvent struct {
  7576. _ struct{} `locationName:"ContinuationEvent" type:"structure"`
  7577. }
  7578. // String returns the string representation
  7579. func (s ContinuationEvent) String() string {
  7580. return awsutil.Prettify(s)
  7581. }
  7582. // GoString returns the string representation
  7583. func (s ContinuationEvent) GoString() string {
  7584. return s.String()
  7585. }
  7586. // The ContinuationEvent is and event in the SelectObjectContentEventStream group of events.
  7587. func (s *ContinuationEvent) eventSelectObjectContentEventStream() {}
  7588. // UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value.
  7589. // This method is only used internally within the SDK's EventStream handling.
  7590. func (s *ContinuationEvent) UnmarshalEvent(
  7591. payloadUnmarshaler protocol.PayloadUnmarshaler,
  7592. msg eventstream.Message,
  7593. ) error {
  7594. return nil
  7595. }
  7596. type CopyObjectInput struct {
  7597. _ struct{} `type:"structure"`
  7598. // The canned ACL to apply to the object.
  7599. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7600. // Bucket is a required field
  7601. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7602. // Specifies caching behavior along the request/reply chain.
  7603. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7604. // Specifies presentational information for the object.
  7605. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7606. // Specifies what content encodings have been applied to the object and thus
  7607. // what decoding mechanisms must be applied to obtain the media-type referenced
  7608. // by the Content-Type header field.
  7609. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7610. // The language the content is in.
  7611. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7612. // A standard MIME type describing the format of the object data.
  7613. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7614. // The name of the source bucket and key name of the source object, separated
  7615. // by a slash (/). Must be URL-encoded.
  7616. //
  7617. // CopySource is a required field
  7618. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  7619. // Copies the object if its entity tag (ETag) matches the specified tag.
  7620. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  7621. // Copies the object if it has been modified since the specified time.
  7622. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  7623. // Copies the object if its entity tag (ETag) is different than the specified
  7624. // ETag.
  7625. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  7626. // Copies the object if it hasn't been modified since the specified time.
  7627. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  7628. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  7629. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  7630. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  7631. // the source object. The encryption key provided in this header must be one
  7632. // that was used when the source object was created.
  7633. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  7634. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7635. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7636. // key was transmitted without error.
  7637. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  7638. // The date and time at which the object is no longer cacheable.
  7639. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  7640. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7641. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7642. // Allows grantee to read the object data and its metadata.
  7643. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7644. // Allows grantee to read the object ACL.
  7645. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7646. // Allows grantee to write the ACL for the applicable object.
  7647. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7648. // Key is a required field
  7649. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7650. // A map of metadata to store with the object in S3.
  7651. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7652. // Specifies whether the metadata is copied from the source object or replaced
  7653. // with metadata provided in the request.
  7654. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  7655. // Specifies whether you want to apply a Legal Hold to the copied object.
  7656. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  7657. // The Object Lock mode that you want to apply to the copied object.
  7658. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  7659. // The date and time when you want the copied object's Object Lock to expire.
  7660. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  7661. // Confirms that the requester knows that she or he will be charged for the
  7662. // request. Bucket owners need not specify this parameter in their requests.
  7663. // Documentation on downloading objects from requester pays buckets can be found
  7664. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7665. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7666. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7667. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7668. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7669. // data. This value is used to store the object and then it is discarded; Amazon
  7670. // does not store the encryption key. The key must be appropriate for use with
  7671. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7672. // header.
  7673. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  7674. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7675. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7676. // key was transmitted without error.
  7677. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7678. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7679. // requests for an object protected by AWS KMS will fail if not made via SSL
  7680. // or using SigV4. Documentation on configuring any of the officially supported
  7681. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7682. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7683. // The Server-side encryption algorithm used when storing this object in S3
  7684. // (e.g., AES256, aws:kms).
  7685. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7686. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7687. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7688. // The tag-set for the object destination object this value must be used in
  7689. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  7690. // Query parameters
  7691. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  7692. // Specifies whether the object tag-set are copied from the source object or
  7693. // replaced with tag-set provided in the request.
  7694. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  7695. // If the bucket is configured as a website, redirects requests for this object
  7696. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7697. // the value of this header in the object metadata.
  7698. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7699. }
  7700. // String returns the string representation
  7701. func (s CopyObjectInput) String() string {
  7702. return awsutil.Prettify(s)
  7703. }
  7704. // GoString returns the string representation
  7705. func (s CopyObjectInput) GoString() string {
  7706. return s.String()
  7707. }
  7708. // Validate inspects the fields of the type to determine if they are valid.
  7709. func (s *CopyObjectInput) Validate() error {
  7710. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  7711. if s.Bucket == nil {
  7712. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7713. }
  7714. if s.Bucket != nil && len(*s.Bucket) < 1 {
  7715. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  7716. }
  7717. if s.CopySource == nil {
  7718. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  7719. }
  7720. if s.Key == nil {
  7721. invalidParams.Add(request.NewErrParamRequired("Key"))
  7722. }
  7723. if s.Key != nil && len(*s.Key) < 1 {
  7724. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7725. }
  7726. if invalidParams.Len() > 0 {
  7727. return invalidParams
  7728. }
  7729. return nil
  7730. }
  7731. // SetACL sets the ACL field's value.
  7732. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  7733. s.ACL = &v
  7734. return s
  7735. }
  7736. // SetBucket sets the Bucket field's value.
  7737. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  7738. s.Bucket = &v
  7739. return s
  7740. }
  7741. func (s *CopyObjectInput) getBucket() (v string) {
  7742. if s.Bucket == nil {
  7743. return v
  7744. }
  7745. return *s.Bucket
  7746. }
  7747. // SetCacheControl sets the CacheControl field's value.
  7748. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  7749. s.CacheControl = &v
  7750. return s
  7751. }
  7752. // SetContentDisposition sets the ContentDisposition field's value.
  7753. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  7754. s.ContentDisposition = &v
  7755. return s
  7756. }
  7757. // SetContentEncoding sets the ContentEncoding field's value.
  7758. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  7759. s.ContentEncoding = &v
  7760. return s
  7761. }
  7762. // SetContentLanguage sets the ContentLanguage field's value.
  7763. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  7764. s.ContentLanguage = &v
  7765. return s
  7766. }
  7767. // SetContentType sets the ContentType field's value.
  7768. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  7769. s.ContentType = &v
  7770. return s
  7771. }
  7772. // SetCopySource sets the CopySource field's value.
  7773. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  7774. s.CopySource = &v
  7775. return s
  7776. }
  7777. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  7778. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  7779. s.CopySourceIfMatch = &v
  7780. return s
  7781. }
  7782. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  7783. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  7784. s.CopySourceIfModifiedSince = &v
  7785. return s
  7786. }
  7787. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  7788. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  7789. s.CopySourceIfNoneMatch = &v
  7790. return s
  7791. }
  7792. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  7793. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  7794. s.CopySourceIfUnmodifiedSince = &v
  7795. return s
  7796. }
  7797. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  7798. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  7799. s.CopySourceSSECustomerAlgorithm = &v
  7800. return s
  7801. }
  7802. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  7803. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  7804. s.CopySourceSSECustomerKey = &v
  7805. return s
  7806. }
  7807. func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
  7808. if s.CopySourceSSECustomerKey == nil {
  7809. return v
  7810. }
  7811. return *s.CopySourceSSECustomerKey
  7812. }
  7813. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  7814. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  7815. s.CopySourceSSECustomerKeyMD5 = &v
  7816. return s
  7817. }
  7818. // SetExpires sets the Expires field's value.
  7819. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  7820. s.Expires = &v
  7821. return s
  7822. }
  7823. // SetGrantFullControl sets the GrantFullControl field's value.
  7824. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  7825. s.GrantFullControl = &v
  7826. return s
  7827. }
  7828. // SetGrantRead sets the GrantRead field's value.
  7829. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  7830. s.GrantRead = &v
  7831. return s
  7832. }
  7833. // SetGrantReadACP sets the GrantReadACP field's value.
  7834. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  7835. s.GrantReadACP = &v
  7836. return s
  7837. }
  7838. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7839. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  7840. s.GrantWriteACP = &v
  7841. return s
  7842. }
  7843. // SetKey sets the Key field's value.
  7844. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  7845. s.Key = &v
  7846. return s
  7847. }
  7848. // SetMetadata sets the Metadata field's value.
  7849. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  7850. s.Metadata = v
  7851. return s
  7852. }
  7853. // SetMetadataDirective sets the MetadataDirective field's value.
  7854. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  7855. s.MetadataDirective = &v
  7856. return s
  7857. }
  7858. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  7859. func (s *CopyObjectInput) SetObjectLockLegalHoldStatus(v string) *CopyObjectInput {
  7860. s.ObjectLockLegalHoldStatus = &v
  7861. return s
  7862. }
  7863. // SetObjectLockMode sets the ObjectLockMode field's value.
  7864. func (s *CopyObjectInput) SetObjectLockMode(v string) *CopyObjectInput {
  7865. s.ObjectLockMode = &v
  7866. return s
  7867. }
  7868. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  7869. func (s *CopyObjectInput) SetObjectLockRetainUntilDate(v time.Time) *CopyObjectInput {
  7870. s.ObjectLockRetainUntilDate = &v
  7871. return s
  7872. }
  7873. // SetRequestPayer sets the RequestPayer field's value.
  7874. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  7875. s.RequestPayer = &v
  7876. return s
  7877. }
  7878. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7879. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  7880. s.SSECustomerAlgorithm = &v
  7881. return s
  7882. }
  7883. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7884. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  7885. s.SSECustomerKey = &v
  7886. return s
  7887. }
  7888. func (s *CopyObjectInput) getSSECustomerKey() (v string) {
  7889. if s.SSECustomerKey == nil {
  7890. return v
  7891. }
  7892. return *s.SSECustomerKey
  7893. }
  7894. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7895. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  7896. s.SSECustomerKeyMD5 = &v
  7897. return s
  7898. }
  7899. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7900. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  7901. s.SSEKMSKeyId = &v
  7902. return s
  7903. }
  7904. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7905. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  7906. s.ServerSideEncryption = &v
  7907. return s
  7908. }
  7909. // SetStorageClass sets the StorageClass field's value.
  7910. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  7911. s.StorageClass = &v
  7912. return s
  7913. }
  7914. // SetTagging sets the Tagging field's value.
  7915. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  7916. s.Tagging = &v
  7917. return s
  7918. }
  7919. // SetTaggingDirective sets the TaggingDirective field's value.
  7920. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  7921. s.TaggingDirective = &v
  7922. return s
  7923. }
  7924. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7925. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  7926. s.WebsiteRedirectLocation = &v
  7927. return s
  7928. }
  7929. type CopyObjectOutput struct {
  7930. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  7931. CopyObjectResult *CopyObjectResult `type:"structure"`
  7932. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  7933. // If the object expiration is configured, the response includes this header.
  7934. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7935. // If present, indicates that the requester was successfully charged for the
  7936. // request.
  7937. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7938. // If server-side encryption with a customer-provided encryption key was requested,
  7939. // the response will include this header confirming the encryption algorithm
  7940. // used.
  7941. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7942. // If server-side encryption with a customer-provided encryption key was requested,
  7943. // the response will include this header to provide round trip message integrity
  7944. // verification of the customer-provided encryption key.
  7945. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7946. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7947. // encryption key that was used for the object.
  7948. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7949. // The Server-side encryption algorithm used when storing this object in S3
  7950. // (e.g., AES256, aws:kms).
  7951. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7952. // Version ID of the newly created copy.
  7953. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7954. }
  7955. // String returns the string representation
  7956. func (s CopyObjectOutput) String() string {
  7957. return awsutil.Prettify(s)
  7958. }
  7959. // GoString returns the string representation
  7960. func (s CopyObjectOutput) GoString() string {
  7961. return s.String()
  7962. }
  7963. // SetCopyObjectResult sets the CopyObjectResult field's value.
  7964. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  7965. s.CopyObjectResult = v
  7966. return s
  7967. }
  7968. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  7969. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  7970. s.CopySourceVersionId = &v
  7971. return s
  7972. }
  7973. // SetExpiration sets the Expiration field's value.
  7974. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  7975. s.Expiration = &v
  7976. return s
  7977. }
  7978. // SetRequestCharged sets the RequestCharged field's value.
  7979. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  7980. s.RequestCharged = &v
  7981. return s
  7982. }
  7983. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7984. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  7985. s.SSECustomerAlgorithm = &v
  7986. return s
  7987. }
  7988. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7989. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  7990. s.SSECustomerKeyMD5 = &v
  7991. return s
  7992. }
  7993. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7994. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  7995. s.SSEKMSKeyId = &v
  7996. return s
  7997. }
  7998. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7999. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  8000. s.ServerSideEncryption = &v
  8001. return s
  8002. }
  8003. // SetVersionId sets the VersionId field's value.
  8004. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  8005. s.VersionId = &v
  8006. return s
  8007. }
  8008. type CopyObjectResult struct {
  8009. _ struct{} `type:"structure"`
  8010. ETag *string `type:"string"`
  8011. LastModified *time.Time `type:"timestamp"`
  8012. }
  8013. // String returns the string representation
  8014. func (s CopyObjectResult) String() string {
  8015. return awsutil.Prettify(s)
  8016. }
  8017. // GoString returns the string representation
  8018. func (s CopyObjectResult) GoString() string {
  8019. return s.String()
  8020. }
  8021. // SetETag sets the ETag field's value.
  8022. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  8023. s.ETag = &v
  8024. return s
  8025. }
  8026. // SetLastModified sets the LastModified field's value.
  8027. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  8028. s.LastModified = &v
  8029. return s
  8030. }
  8031. type CopyPartResult struct {
  8032. _ struct{} `type:"structure"`
  8033. // Entity tag of the object.
  8034. ETag *string `type:"string"`
  8035. // Date and time at which the object was uploaded.
  8036. LastModified *time.Time `type:"timestamp"`
  8037. }
  8038. // String returns the string representation
  8039. func (s CopyPartResult) String() string {
  8040. return awsutil.Prettify(s)
  8041. }
  8042. // GoString returns the string representation
  8043. func (s CopyPartResult) GoString() string {
  8044. return s.String()
  8045. }
  8046. // SetETag sets the ETag field's value.
  8047. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  8048. s.ETag = &v
  8049. return s
  8050. }
  8051. // SetLastModified sets the LastModified field's value.
  8052. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  8053. s.LastModified = &v
  8054. return s
  8055. }
  8056. type CreateBucketConfiguration struct {
  8057. _ struct{} `type:"structure"`
  8058. // Specifies the region where the bucket will be created. If you don't specify
  8059. // a region, the bucket will be created in US Standard.
  8060. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  8061. }
  8062. // String returns the string representation
  8063. func (s CreateBucketConfiguration) String() string {
  8064. return awsutil.Prettify(s)
  8065. }
  8066. // GoString returns the string representation
  8067. func (s CreateBucketConfiguration) GoString() string {
  8068. return s.String()
  8069. }
  8070. // SetLocationConstraint sets the LocationConstraint field's value.
  8071. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  8072. s.LocationConstraint = &v
  8073. return s
  8074. }
  8075. type CreateBucketInput struct {
  8076. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  8077. // The canned ACL to apply to the bucket.
  8078. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  8079. // Bucket is a required field
  8080. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8081. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  8082. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  8083. // bucket.
  8084. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  8085. // Allows grantee to list the objects in the bucket.
  8086. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  8087. // Allows grantee to read the bucket ACL.
  8088. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  8089. // Allows grantee to create, overwrite, and delete any object in the bucket.
  8090. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  8091. // Allows grantee to write the ACL for the applicable bucket.
  8092. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  8093. // Specifies whether you want S3 Object Lock to be enabled for the new bucket.
  8094. ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`
  8095. }
  8096. // String returns the string representation
  8097. func (s CreateBucketInput) String() string {
  8098. return awsutil.Prettify(s)
  8099. }
  8100. // GoString returns the string representation
  8101. func (s CreateBucketInput) GoString() string {
  8102. return s.String()
  8103. }
  8104. // Validate inspects the fields of the type to determine if they are valid.
  8105. func (s *CreateBucketInput) Validate() error {
  8106. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  8107. if s.Bucket == nil {
  8108. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8109. }
  8110. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8111. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8112. }
  8113. if invalidParams.Len() > 0 {
  8114. return invalidParams
  8115. }
  8116. return nil
  8117. }
  8118. // SetACL sets the ACL field's value.
  8119. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  8120. s.ACL = &v
  8121. return s
  8122. }
  8123. // SetBucket sets the Bucket field's value.
  8124. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  8125. s.Bucket = &v
  8126. return s
  8127. }
  8128. func (s *CreateBucketInput) getBucket() (v string) {
  8129. if s.Bucket == nil {
  8130. return v
  8131. }
  8132. return *s.Bucket
  8133. }
  8134. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  8135. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  8136. s.CreateBucketConfiguration = v
  8137. return s
  8138. }
  8139. // SetGrantFullControl sets the GrantFullControl field's value.
  8140. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  8141. s.GrantFullControl = &v
  8142. return s
  8143. }
  8144. // SetGrantRead sets the GrantRead field's value.
  8145. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  8146. s.GrantRead = &v
  8147. return s
  8148. }
  8149. // SetGrantReadACP sets the GrantReadACP field's value.
  8150. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  8151. s.GrantReadACP = &v
  8152. return s
  8153. }
  8154. // SetGrantWrite sets the GrantWrite field's value.
  8155. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  8156. s.GrantWrite = &v
  8157. return s
  8158. }
  8159. // SetGrantWriteACP sets the GrantWriteACP field's value.
  8160. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  8161. s.GrantWriteACP = &v
  8162. return s
  8163. }
  8164. // SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value.
  8165. func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput {
  8166. s.ObjectLockEnabledForBucket = &v
  8167. return s
  8168. }
  8169. type CreateBucketOutput struct {
  8170. _ struct{} `type:"structure"`
  8171. Location *string `location:"header" locationName:"Location" type:"string"`
  8172. }
  8173. // String returns the string representation
  8174. func (s CreateBucketOutput) String() string {
  8175. return awsutil.Prettify(s)
  8176. }
  8177. // GoString returns the string representation
  8178. func (s CreateBucketOutput) GoString() string {
  8179. return s.String()
  8180. }
  8181. // SetLocation sets the Location field's value.
  8182. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  8183. s.Location = &v
  8184. return s
  8185. }
  8186. type CreateMultipartUploadInput struct {
  8187. _ struct{} `type:"structure"`
  8188. // The canned ACL to apply to the object.
  8189. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  8190. // Bucket is a required field
  8191. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8192. // Specifies caching behavior along the request/reply chain.
  8193. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  8194. // Specifies presentational information for the object.
  8195. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  8196. // Specifies what content encodings have been applied to the object and thus
  8197. // what decoding mechanisms must be applied to obtain the media-type referenced
  8198. // by the Content-Type header field.
  8199. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  8200. // The language the content is in.
  8201. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  8202. // A standard MIME type describing the format of the object data.
  8203. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  8204. // The date and time at which the object is no longer cacheable.
  8205. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  8206. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  8207. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  8208. // Allows grantee to read the object data and its metadata.
  8209. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  8210. // Allows grantee to read the object ACL.
  8211. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  8212. // Allows grantee to write the ACL for the applicable object.
  8213. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  8214. // Key is a required field
  8215. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8216. // A map of metadata to store with the object in S3.
  8217. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  8218. // Specifies whether you want to apply a Legal Hold to the uploaded object.
  8219. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  8220. // Specifies the Object Lock mode that you want to apply to the uploaded object.
  8221. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  8222. // Specifies the date and time when you want the Object Lock to expire.
  8223. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  8224. // Confirms that the requester knows that she or he will be charged for the
  8225. // request. Bucket owners need not specify this parameter in their requests.
  8226. // Documentation on downloading objects from requester pays buckets can be found
  8227. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8228. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8229. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  8230. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8231. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  8232. // data. This value is used to store the object and then it is discarded; Amazon
  8233. // does not store the encryption key. The key must be appropriate for use with
  8234. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  8235. // header.
  8236. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  8237. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  8238. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  8239. // key was transmitted without error.
  8240. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8241. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  8242. // requests for an object protected by AWS KMS will fail if not made via SSL
  8243. // or using SigV4. Documentation on configuring any of the officially supported
  8244. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  8245. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  8246. // The Server-side encryption algorithm used when storing this object in S3
  8247. // (e.g., AES256, aws:kms).
  8248. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  8249. // The type of storage to use for the object. Defaults to 'STANDARD'.
  8250. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  8251. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  8252. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  8253. // If the bucket is configured as a website, redirects requests for this object
  8254. // to another object in the same bucket or to an external URL. Amazon S3 stores
  8255. // the value of this header in the object metadata.
  8256. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  8257. }
  8258. // String returns the string representation
  8259. func (s CreateMultipartUploadInput) String() string {
  8260. return awsutil.Prettify(s)
  8261. }
  8262. // GoString returns the string representation
  8263. func (s CreateMultipartUploadInput) GoString() string {
  8264. return s.String()
  8265. }
  8266. // Validate inspects the fields of the type to determine if they are valid.
  8267. func (s *CreateMultipartUploadInput) Validate() error {
  8268. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  8269. if s.Bucket == nil {
  8270. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8271. }
  8272. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8273. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8274. }
  8275. if s.Key == nil {
  8276. invalidParams.Add(request.NewErrParamRequired("Key"))
  8277. }
  8278. if s.Key != nil && len(*s.Key) < 1 {
  8279. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8280. }
  8281. if invalidParams.Len() > 0 {
  8282. return invalidParams
  8283. }
  8284. return nil
  8285. }
  8286. // SetACL sets the ACL field's value.
  8287. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  8288. s.ACL = &v
  8289. return s
  8290. }
  8291. // SetBucket sets the Bucket field's value.
  8292. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  8293. s.Bucket = &v
  8294. return s
  8295. }
  8296. func (s *CreateMultipartUploadInput) getBucket() (v string) {
  8297. if s.Bucket == nil {
  8298. return v
  8299. }
  8300. return *s.Bucket
  8301. }
  8302. // SetCacheControl sets the CacheControl field's value.
  8303. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  8304. s.CacheControl = &v
  8305. return s
  8306. }
  8307. // SetContentDisposition sets the ContentDisposition field's value.
  8308. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  8309. s.ContentDisposition = &v
  8310. return s
  8311. }
  8312. // SetContentEncoding sets the ContentEncoding field's value.
  8313. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  8314. s.ContentEncoding = &v
  8315. return s
  8316. }
  8317. // SetContentLanguage sets the ContentLanguage field's value.
  8318. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  8319. s.ContentLanguage = &v
  8320. return s
  8321. }
  8322. // SetContentType sets the ContentType field's value.
  8323. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  8324. s.ContentType = &v
  8325. return s
  8326. }
  8327. // SetExpires sets the Expires field's value.
  8328. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  8329. s.Expires = &v
  8330. return s
  8331. }
  8332. // SetGrantFullControl sets the GrantFullControl field's value.
  8333. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  8334. s.GrantFullControl = &v
  8335. return s
  8336. }
  8337. // SetGrantRead sets the GrantRead field's value.
  8338. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  8339. s.GrantRead = &v
  8340. return s
  8341. }
  8342. // SetGrantReadACP sets the GrantReadACP field's value.
  8343. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  8344. s.GrantReadACP = &v
  8345. return s
  8346. }
  8347. // SetGrantWriteACP sets the GrantWriteACP field's value.
  8348. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  8349. s.GrantWriteACP = &v
  8350. return s
  8351. }
  8352. // SetKey sets the Key field's value.
  8353. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  8354. s.Key = &v
  8355. return s
  8356. }
  8357. // SetMetadata sets the Metadata field's value.
  8358. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  8359. s.Metadata = v
  8360. return s
  8361. }
  8362. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  8363. func (s *CreateMultipartUploadInput) SetObjectLockLegalHoldStatus(v string) *CreateMultipartUploadInput {
  8364. s.ObjectLockLegalHoldStatus = &v
  8365. return s
  8366. }
  8367. // SetObjectLockMode sets the ObjectLockMode field's value.
  8368. func (s *CreateMultipartUploadInput) SetObjectLockMode(v string) *CreateMultipartUploadInput {
  8369. s.ObjectLockMode = &v
  8370. return s
  8371. }
  8372. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  8373. func (s *CreateMultipartUploadInput) SetObjectLockRetainUntilDate(v time.Time) *CreateMultipartUploadInput {
  8374. s.ObjectLockRetainUntilDate = &v
  8375. return s
  8376. }
  8377. // SetRequestPayer sets the RequestPayer field's value.
  8378. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  8379. s.RequestPayer = &v
  8380. return s
  8381. }
  8382. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  8383. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  8384. s.SSECustomerAlgorithm = &v
  8385. return s
  8386. }
  8387. // SetSSECustomerKey sets the SSECustomerKey field's value.
  8388. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  8389. s.SSECustomerKey = &v
  8390. return s
  8391. }
  8392. func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
  8393. if s.SSECustomerKey == nil {
  8394. return v
  8395. }
  8396. return *s.SSECustomerKey
  8397. }
  8398. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  8399. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  8400. s.SSECustomerKeyMD5 = &v
  8401. return s
  8402. }
  8403. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  8404. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  8405. s.SSEKMSKeyId = &v
  8406. return s
  8407. }
  8408. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  8409. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  8410. s.ServerSideEncryption = &v
  8411. return s
  8412. }
  8413. // SetStorageClass sets the StorageClass field's value.
  8414. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  8415. s.StorageClass = &v
  8416. return s
  8417. }
  8418. // SetTagging sets the Tagging field's value.
  8419. func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
  8420. s.Tagging = &v
  8421. return s
  8422. }
  8423. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  8424. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  8425. s.WebsiteRedirectLocation = &v
  8426. return s
  8427. }
  8428. type CreateMultipartUploadOutput struct {
  8429. _ struct{} `type:"structure"`
  8430. // Date when multipart upload will become eligible for abort operation by lifecycle.
  8431. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  8432. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  8433. // operation.
  8434. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  8435. // Name of the bucket to which the multipart upload was initiated.
  8436. Bucket *string `locationName:"Bucket" type:"string"`
  8437. // Object key for which the multipart upload was initiated.
  8438. Key *string `min:"1" type:"string"`
  8439. // If present, indicates that the requester was successfully charged for the
  8440. // request.
  8441. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8442. // If server-side encryption with a customer-provided encryption key was requested,
  8443. // the response will include this header confirming the encryption algorithm
  8444. // used.
  8445. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8446. // If server-side encryption with a customer-provided encryption key was requested,
  8447. // the response will include this header to provide round trip message integrity
  8448. // verification of the customer-provided encryption key.
  8449. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8450. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  8451. // encryption key that was used for the object.
  8452. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  8453. // The Server-side encryption algorithm used when storing this object in S3
  8454. // (e.g., AES256, aws:kms).
  8455. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  8456. // ID for the initiated multipart upload.
  8457. UploadId *string `type:"string"`
  8458. }
  8459. // String returns the string representation
  8460. func (s CreateMultipartUploadOutput) String() string {
  8461. return awsutil.Prettify(s)
  8462. }
  8463. // GoString returns the string representation
  8464. func (s CreateMultipartUploadOutput) GoString() string {
  8465. return s.String()
  8466. }
  8467. // SetAbortDate sets the AbortDate field's value.
  8468. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  8469. s.AbortDate = &v
  8470. return s
  8471. }
  8472. // SetAbortRuleId sets the AbortRuleId field's value.
  8473. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  8474. s.AbortRuleId = &v
  8475. return s
  8476. }
  8477. // SetBucket sets the Bucket field's value.
  8478. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  8479. s.Bucket = &v
  8480. return s
  8481. }
  8482. func (s *CreateMultipartUploadOutput) getBucket() (v string) {
  8483. if s.Bucket == nil {
  8484. return v
  8485. }
  8486. return *s.Bucket
  8487. }
  8488. // SetKey sets the Key field's value.
  8489. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  8490. s.Key = &v
  8491. return s
  8492. }
  8493. // SetRequestCharged sets the RequestCharged field's value.
  8494. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  8495. s.RequestCharged = &v
  8496. return s
  8497. }
  8498. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  8499. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  8500. s.SSECustomerAlgorithm = &v
  8501. return s
  8502. }
  8503. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  8504. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  8505. s.SSECustomerKeyMD5 = &v
  8506. return s
  8507. }
  8508. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  8509. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  8510. s.SSEKMSKeyId = &v
  8511. return s
  8512. }
  8513. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  8514. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  8515. s.ServerSideEncryption = &v
  8516. return s
  8517. }
  8518. // SetUploadId sets the UploadId field's value.
  8519. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  8520. s.UploadId = &v
  8521. return s
  8522. }
  8523. // The container element for specifying the default Object Lock retention settings
  8524. // for new objects placed in the specified bucket.
  8525. type DefaultRetention struct {
  8526. _ struct{} `type:"structure"`
  8527. // The number of days that you want to specify for the default retention period.
  8528. Days *int64 `type:"integer"`
  8529. // The default Object Lock retention mode you want to apply to new objects placed
  8530. // in the specified bucket.
  8531. Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
  8532. // The number of years that you want to specify for the default retention period.
  8533. Years *int64 `type:"integer"`
  8534. }
  8535. // String returns the string representation
  8536. func (s DefaultRetention) String() string {
  8537. return awsutil.Prettify(s)
  8538. }
  8539. // GoString returns the string representation
  8540. func (s DefaultRetention) GoString() string {
  8541. return s.String()
  8542. }
  8543. // SetDays sets the Days field's value.
  8544. func (s *DefaultRetention) SetDays(v int64) *DefaultRetention {
  8545. s.Days = &v
  8546. return s
  8547. }
  8548. // SetMode sets the Mode field's value.
  8549. func (s *DefaultRetention) SetMode(v string) *DefaultRetention {
  8550. s.Mode = &v
  8551. return s
  8552. }
  8553. // SetYears sets the Years field's value.
  8554. func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
  8555. s.Years = &v
  8556. return s
  8557. }
  8558. type Delete struct {
  8559. _ struct{} `type:"structure"`
  8560. // Objects is a required field
  8561. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  8562. // Element to enable quiet mode for the request. When you add this element,
  8563. // you must set its value to true.
  8564. Quiet *bool `type:"boolean"`
  8565. }
  8566. // String returns the string representation
  8567. func (s Delete) String() string {
  8568. return awsutil.Prettify(s)
  8569. }
  8570. // GoString returns the string representation
  8571. func (s Delete) GoString() string {
  8572. return s.String()
  8573. }
  8574. // Validate inspects the fields of the type to determine if they are valid.
  8575. func (s *Delete) Validate() error {
  8576. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  8577. if s.Objects == nil {
  8578. invalidParams.Add(request.NewErrParamRequired("Objects"))
  8579. }
  8580. if s.Objects != nil {
  8581. for i, v := range s.Objects {
  8582. if v == nil {
  8583. continue
  8584. }
  8585. if err := v.Validate(); err != nil {
  8586. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  8587. }
  8588. }
  8589. }
  8590. if invalidParams.Len() > 0 {
  8591. return invalidParams
  8592. }
  8593. return nil
  8594. }
  8595. // SetObjects sets the Objects field's value.
  8596. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  8597. s.Objects = v
  8598. return s
  8599. }
  8600. // SetQuiet sets the Quiet field's value.
  8601. func (s *Delete) SetQuiet(v bool) *Delete {
  8602. s.Quiet = &v
  8603. return s
  8604. }
  8605. type DeleteBucketAnalyticsConfigurationInput struct {
  8606. _ struct{} `type:"structure"`
  8607. // The name of the bucket from which an analytics configuration is deleted.
  8608. //
  8609. // Bucket is a required field
  8610. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8611. // The identifier used to represent an analytics configuration.
  8612. //
  8613. // Id is a required field
  8614. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8615. }
  8616. // String returns the string representation
  8617. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  8618. return awsutil.Prettify(s)
  8619. }
  8620. // GoString returns the string representation
  8621. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  8622. return s.String()
  8623. }
  8624. // Validate inspects the fields of the type to determine if they are valid.
  8625. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  8626. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  8627. if s.Bucket == nil {
  8628. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8629. }
  8630. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8631. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8632. }
  8633. if s.Id == nil {
  8634. invalidParams.Add(request.NewErrParamRequired("Id"))
  8635. }
  8636. if invalidParams.Len() > 0 {
  8637. return invalidParams
  8638. }
  8639. return nil
  8640. }
  8641. // SetBucket sets the Bucket field's value.
  8642. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  8643. s.Bucket = &v
  8644. return s
  8645. }
  8646. func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
  8647. if s.Bucket == nil {
  8648. return v
  8649. }
  8650. return *s.Bucket
  8651. }
  8652. // SetId sets the Id field's value.
  8653. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  8654. s.Id = &v
  8655. return s
  8656. }
  8657. type DeleteBucketAnalyticsConfigurationOutput struct {
  8658. _ struct{} `type:"structure"`
  8659. }
  8660. // String returns the string representation
  8661. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  8662. return awsutil.Prettify(s)
  8663. }
  8664. // GoString returns the string representation
  8665. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  8666. return s.String()
  8667. }
  8668. type DeleteBucketCorsInput struct {
  8669. _ struct{} `type:"structure"`
  8670. // Bucket is a required field
  8671. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8672. }
  8673. // String returns the string representation
  8674. func (s DeleteBucketCorsInput) String() string {
  8675. return awsutil.Prettify(s)
  8676. }
  8677. // GoString returns the string representation
  8678. func (s DeleteBucketCorsInput) GoString() string {
  8679. return s.String()
  8680. }
  8681. // Validate inspects the fields of the type to determine if they are valid.
  8682. func (s *DeleteBucketCorsInput) Validate() error {
  8683. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  8684. if s.Bucket == nil {
  8685. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8686. }
  8687. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8688. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8689. }
  8690. if invalidParams.Len() > 0 {
  8691. return invalidParams
  8692. }
  8693. return nil
  8694. }
  8695. // SetBucket sets the Bucket field's value.
  8696. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  8697. s.Bucket = &v
  8698. return s
  8699. }
  8700. func (s *DeleteBucketCorsInput) getBucket() (v string) {
  8701. if s.Bucket == nil {
  8702. return v
  8703. }
  8704. return *s.Bucket
  8705. }
  8706. type DeleteBucketCorsOutput struct {
  8707. _ struct{} `type:"structure"`
  8708. }
  8709. // String returns the string representation
  8710. func (s DeleteBucketCorsOutput) String() string {
  8711. return awsutil.Prettify(s)
  8712. }
  8713. // GoString returns the string representation
  8714. func (s DeleteBucketCorsOutput) GoString() string {
  8715. return s.String()
  8716. }
  8717. type DeleteBucketEncryptionInput struct {
  8718. _ struct{} `type:"structure"`
  8719. // The name of the bucket containing the server-side encryption configuration
  8720. // to delete.
  8721. //
  8722. // Bucket is a required field
  8723. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8724. }
  8725. // String returns the string representation
  8726. func (s DeleteBucketEncryptionInput) String() string {
  8727. return awsutil.Prettify(s)
  8728. }
  8729. // GoString returns the string representation
  8730. func (s DeleteBucketEncryptionInput) GoString() string {
  8731. return s.String()
  8732. }
  8733. // Validate inspects the fields of the type to determine if they are valid.
  8734. func (s *DeleteBucketEncryptionInput) Validate() error {
  8735. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
  8736. if s.Bucket == nil {
  8737. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8738. }
  8739. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8740. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8741. }
  8742. if invalidParams.Len() > 0 {
  8743. return invalidParams
  8744. }
  8745. return nil
  8746. }
  8747. // SetBucket sets the Bucket field's value.
  8748. func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
  8749. s.Bucket = &v
  8750. return s
  8751. }
  8752. func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
  8753. if s.Bucket == nil {
  8754. return v
  8755. }
  8756. return *s.Bucket
  8757. }
  8758. type DeleteBucketEncryptionOutput struct {
  8759. _ struct{} `type:"structure"`
  8760. }
  8761. // String returns the string representation
  8762. func (s DeleteBucketEncryptionOutput) String() string {
  8763. return awsutil.Prettify(s)
  8764. }
  8765. // GoString returns the string representation
  8766. func (s DeleteBucketEncryptionOutput) GoString() string {
  8767. return s.String()
  8768. }
  8769. type DeleteBucketInput struct {
  8770. _ struct{} `type:"structure"`
  8771. // Bucket is a required field
  8772. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8773. }
  8774. // String returns the string representation
  8775. func (s DeleteBucketInput) String() string {
  8776. return awsutil.Prettify(s)
  8777. }
  8778. // GoString returns the string representation
  8779. func (s DeleteBucketInput) GoString() string {
  8780. return s.String()
  8781. }
  8782. // Validate inspects the fields of the type to determine if they are valid.
  8783. func (s *DeleteBucketInput) Validate() error {
  8784. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  8785. if s.Bucket == nil {
  8786. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8787. }
  8788. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8789. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8790. }
  8791. if invalidParams.Len() > 0 {
  8792. return invalidParams
  8793. }
  8794. return nil
  8795. }
  8796. // SetBucket sets the Bucket field's value.
  8797. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  8798. s.Bucket = &v
  8799. return s
  8800. }
  8801. func (s *DeleteBucketInput) getBucket() (v string) {
  8802. if s.Bucket == nil {
  8803. return v
  8804. }
  8805. return *s.Bucket
  8806. }
  8807. type DeleteBucketInventoryConfigurationInput struct {
  8808. _ struct{} `type:"structure"`
  8809. // The name of the bucket containing the inventory configuration to delete.
  8810. //
  8811. // Bucket is a required field
  8812. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8813. // The ID used to identify the inventory configuration.
  8814. //
  8815. // Id is a required field
  8816. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8817. }
  8818. // String returns the string representation
  8819. func (s DeleteBucketInventoryConfigurationInput) String() string {
  8820. return awsutil.Prettify(s)
  8821. }
  8822. // GoString returns the string representation
  8823. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  8824. return s.String()
  8825. }
  8826. // Validate inspects the fields of the type to determine if they are valid.
  8827. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  8828. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  8829. if s.Bucket == nil {
  8830. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8831. }
  8832. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8833. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8834. }
  8835. if s.Id == nil {
  8836. invalidParams.Add(request.NewErrParamRequired("Id"))
  8837. }
  8838. if invalidParams.Len() > 0 {
  8839. return invalidParams
  8840. }
  8841. return nil
  8842. }
  8843. // SetBucket sets the Bucket field's value.
  8844. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  8845. s.Bucket = &v
  8846. return s
  8847. }
  8848. func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
  8849. if s.Bucket == nil {
  8850. return v
  8851. }
  8852. return *s.Bucket
  8853. }
  8854. // SetId sets the Id field's value.
  8855. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  8856. s.Id = &v
  8857. return s
  8858. }
  8859. type DeleteBucketInventoryConfigurationOutput struct {
  8860. _ struct{} `type:"structure"`
  8861. }
  8862. // String returns the string representation
  8863. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  8864. return awsutil.Prettify(s)
  8865. }
  8866. // GoString returns the string representation
  8867. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  8868. return s.String()
  8869. }
  8870. type DeleteBucketLifecycleInput struct {
  8871. _ struct{} `type:"structure"`
  8872. // Bucket is a required field
  8873. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8874. }
  8875. // String returns the string representation
  8876. func (s DeleteBucketLifecycleInput) String() string {
  8877. return awsutil.Prettify(s)
  8878. }
  8879. // GoString returns the string representation
  8880. func (s DeleteBucketLifecycleInput) GoString() string {
  8881. return s.String()
  8882. }
  8883. // Validate inspects the fields of the type to determine if they are valid.
  8884. func (s *DeleteBucketLifecycleInput) Validate() error {
  8885. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  8886. if s.Bucket == nil {
  8887. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8888. }
  8889. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8890. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8891. }
  8892. if invalidParams.Len() > 0 {
  8893. return invalidParams
  8894. }
  8895. return nil
  8896. }
  8897. // SetBucket sets the Bucket field's value.
  8898. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  8899. s.Bucket = &v
  8900. return s
  8901. }
  8902. func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
  8903. if s.Bucket == nil {
  8904. return v
  8905. }
  8906. return *s.Bucket
  8907. }
  8908. type DeleteBucketLifecycleOutput struct {
  8909. _ struct{} `type:"structure"`
  8910. }
  8911. // String returns the string representation
  8912. func (s DeleteBucketLifecycleOutput) String() string {
  8913. return awsutil.Prettify(s)
  8914. }
  8915. // GoString returns the string representation
  8916. func (s DeleteBucketLifecycleOutput) GoString() string {
  8917. return s.String()
  8918. }
  8919. type DeleteBucketMetricsConfigurationInput struct {
  8920. _ struct{} `type:"structure"`
  8921. // The name of the bucket containing the metrics configuration to delete.
  8922. //
  8923. // Bucket is a required field
  8924. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8925. // The ID used to identify the metrics configuration.
  8926. //
  8927. // Id is a required field
  8928. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8929. }
  8930. // String returns the string representation
  8931. func (s DeleteBucketMetricsConfigurationInput) String() string {
  8932. return awsutil.Prettify(s)
  8933. }
  8934. // GoString returns the string representation
  8935. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  8936. return s.String()
  8937. }
  8938. // Validate inspects the fields of the type to determine if they are valid.
  8939. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  8940. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  8941. if s.Bucket == nil {
  8942. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8943. }
  8944. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8945. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8946. }
  8947. if s.Id == nil {
  8948. invalidParams.Add(request.NewErrParamRequired("Id"))
  8949. }
  8950. if invalidParams.Len() > 0 {
  8951. return invalidParams
  8952. }
  8953. return nil
  8954. }
  8955. // SetBucket sets the Bucket field's value.
  8956. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  8957. s.Bucket = &v
  8958. return s
  8959. }
  8960. func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
  8961. if s.Bucket == nil {
  8962. return v
  8963. }
  8964. return *s.Bucket
  8965. }
  8966. // SetId sets the Id field's value.
  8967. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  8968. s.Id = &v
  8969. return s
  8970. }
  8971. type DeleteBucketMetricsConfigurationOutput struct {
  8972. _ struct{} `type:"structure"`
  8973. }
  8974. // String returns the string representation
  8975. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  8976. return awsutil.Prettify(s)
  8977. }
  8978. // GoString returns the string representation
  8979. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  8980. return s.String()
  8981. }
  8982. type DeleteBucketOutput struct {
  8983. _ struct{} `type:"structure"`
  8984. }
  8985. // String returns the string representation
  8986. func (s DeleteBucketOutput) String() string {
  8987. return awsutil.Prettify(s)
  8988. }
  8989. // GoString returns the string representation
  8990. func (s DeleteBucketOutput) GoString() string {
  8991. return s.String()
  8992. }
  8993. type DeleteBucketPolicyInput struct {
  8994. _ struct{} `type:"structure"`
  8995. // Bucket is a required field
  8996. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8997. }
  8998. // String returns the string representation
  8999. func (s DeleteBucketPolicyInput) String() string {
  9000. return awsutil.Prettify(s)
  9001. }
  9002. // GoString returns the string representation
  9003. func (s DeleteBucketPolicyInput) GoString() string {
  9004. return s.String()
  9005. }
  9006. // Validate inspects the fields of the type to determine if they are valid.
  9007. func (s *DeleteBucketPolicyInput) Validate() error {
  9008. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  9009. if s.Bucket == nil {
  9010. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9011. }
  9012. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9013. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9014. }
  9015. if invalidParams.Len() > 0 {
  9016. return invalidParams
  9017. }
  9018. return nil
  9019. }
  9020. // SetBucket sets the Bucket field's value.
  9021. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  9022. s.Bucket = &v
  9023. return s
  9024. }
  9025. func (s *DeleteBucketPolicyInput) getBucket() (v string) {
  9026. if s.Bucket == nil {
  9027. return v
  9028. }
  9029. return *s.Bucket
  9030. }
  9031. type DeleteBucketPolicyOutput struct {
  9032. _ struct{} `type:"structure"`
  9033. }
  9034. // String returns the string representation
  9035. func (s DeleteBucketPolicyOutput) String() string {
  9036. return awsutil.Prettify(s)
  9037. }
  9038. // GoString returns the string representation
  9039. func (s DeleteBucketPolicyOutput) GoString() string {
  9040. return s.String()
  9041. }
  9042. type DeleteBucketReplicationInput struct {
  9043. _ struct{} `type:"structure"`
  9044. // The bucket name.
  9045. //
  9046. // It can take a while to propagate the deletion of a replication configuration
  9047. // to all Amazon S3 systems.
  9048. //
  9049. // Bucket is a required field
  9050. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9051. }
  9052. // String returns the string representation
  9053. func (s DeleteBucketReplicationInput) String() string {
  9054. return awsutil.Prettify(s)
  9055. }
  9056. // GoString returns the string representation
  9057. func (s DeleteBucketReplicationInput) GoString() string {
  9058. return s.String()
  9059. }
  9060. // Validate inspects the fields of the type to determine if they are valid.
  9061. func (s *DeleteBucketReplicationInput) Validate() error {
  9062. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  9063. if s.Bucket == nil {
  9064. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9065. }
  9066. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9067. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9068. }
  9069. if invalidParams.Len() > 0 {
  9070. return invalidParams
  9071. }
  9072. return nil
  9073. }
  9074. // SetBucket sets the Bucket field's value.
  9075. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  9076. s.Bucket = &v
  9077. return s
  9078. }
  9079. func (s *DeleteBucketReplicationInput) getBucket() (v string) {
  9080. if s.Bucket == nil {
  9081. return v
  9082. }
  9083. return *s.Bucket
  9084. }
  9085. type DeleteBucketReplicationOutput struct {
  9086. _ struct{} `type:"structure"`
  9087. }
  9088. // String returns the string representation
  9089. func (s DeleteBucketReplicationOutput) String() string {
  9090. return awsutil.Prettify(s)
  9091. }
  9092. // GoString returns the string representation
  9093. func (s DeleteBucketReplicationOutput) GoString() string {
  9094. return s.String()
  9095. }
  9096. type DeleteBucketTaggingInput struct {
  9097. _ struct{} `type:"structure"`
  9098. // Bucket is a required field
  9099. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9100. }
  9101. // String returns the string representation
  9102. func (s DeleteBucketTaggingInput) String() string {
  9103. return awsutil.Prettify(s)
  9104. }
  9105. // GoString returns the string representation
  9106. func (s DeleteBucketTaggingInput) GoString() string {
  9107. return s.String()
  9108. }
  9109. // Validate inspects the fields of the type to determine if they are valid.
  9110. func (s *DeleteBucketTaggingInput) Validate() error {
  9111. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  9112. if s.Bucket == nil {
  9113. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9114. }
  9115. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9116. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9117. }
  9118. if invalidParams.Len() > 0 {
  9119. return invalidParams
  9120. }
  9121. return nil
  9122. }
  9123. // SetBucket sets the Bucket field's value.
  9124. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  9125. s.Bucket = &v
  9126. return s
  9127. }
  9128. func (s *DeleteBucketTaggingInput) getBucket() (v string) {
  9129. if s.Bucket == nil {
  9130. return v
  9131. }
  9132. return *s.Bucket
  9133. }
  9134. type DeleteBucketTaggingOutput struct {
  9135. _ struct{} `type:"structure"`
  9136. }
  9137. // String returns the string representation
  9138. func (s DeleteBucketTaggingOutput) String() string {
  9139. return awsutil.Prettify(s)
  9140. }
  9141. // GoString returns the string representation
  9142. func (s DeleteBucketTaggingOutput) GoString() string {
  9143. return s.String()
  9144. }
  9145. type DeleteBucketWebsiteInput struct {
  9146. _ struct{} `type:"structure"`
  9147. // Bucket is a required field
  9148. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9149. }
  9150. // String returns the string representation
  9151. func (s DeleteBucketWebsiteInput) String() string {
  9152. return awsutil.Prettify(s)
  9153. }
  9154. // GoString returns the string representation
  9155. func (s DeleteBucketWebsiteInput) GoString() string {
  9156. return s.String()
  9157. }
  9158. // Validate inspects the fields of the type to determine if they are valid.
  9159. func (s *DeleteBucketWebsiteInput) Validate() error {
  9160. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  9161. if s.Bucket == nil {
  9162. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9163. }
  9164. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9165. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9166. }
  9167. if invalidParams.Len() > 0 {
  9168. return invalidParams
  9169. }
  9170. return nil
  9171. }
  9172. // SetBucket sets the Bucket field's value.
  9173. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  9174. s.Bucket = &v
  9175. return s
  9176. }
  9177. func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
  9178. if s.Bucket == nil {
  9179. return v
  9180. }
  9181. return *s.Bucket
  9182. }
  9183. type DeleteBucketWebsiteOutput struct {
  9184. _ struct{} `type:"structure"`
  9185. }
  9186. // String returns the string representation
  9187. func (s DeleteBucketWebsiteOutput) String() string {
  9188. return awsutil.Prettify(s)
  9189. }
  9190. // GoString returns the string representation
  9191. func (s DeleteBucketWebsiteOutput) GoString() string {
  9192. return s.String()
  9193. }
  9194. type DeleteMarkerEntry struct {
  9195. _ struct{} `type:"structure"`
  9196. // Specifies whether the object is (true) or is not (false) the latest version
  9197. // of an object.
  9198. IsLatest *bool `type:"boolean"`
  9199. // The object key.
  9200. Key *string `min:"1" type:"string"`
  9201. // Date and time the object was last modified.
  9202. LastModified *time.Time `type:"timestamp"`
  9203. Owner *Owner `type:"structure"`
  9204. // Version ID of an object.
  9205. VersionId *string `type:"string"`
  9206. }
  9207. // String returns the string representation
  9208. func (s DeleteMarkerEntry) String() string {
  9209. return awsutil.Prettify(s)
  9210. }
  9211. // GoString returns the string representation
  9212. func (s DeleteMarkerEntry) GoString() string {
  9213. return s.String()
  9214. }
  9215. // SetIsLatest sets the IsLatest field's value.
  9216. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  9217. s.IsLatest = &v
  9218. return s
  9219. }
  9220. // SetKey sets the Key field's value.
  9221. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  9222. s.Key = &v
  9223. return s
  9224. }
  9225. // SetLastModified sets the LastModified field's value.
  9226. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  9227. s.LastModified = &v
  9228. return s
  9229. }
  9230. // SetOwner sets the Owner field's value.
  9231. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  9232. s.Owner = v
  9233. return s
  9234. }
  9235. // SetVersionId sets the VersionId field's value.
  9236. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  9237. s.VersionId = &v
  9238. return s
  9239. }
  9240. // Specifies whether Amazon S3 should replicate delete makers.
  9241. type DeleteMarkerReplication struct {
  9242. _ struct{} `type:"structure"`
  9243. // The status of the delete marker replication.
  9244. //
  9245. // In the current implementation, Amazon S3 doesn't replicate the delete markers.
  9246. // The status must be Disabled.
  9247. Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"`
  9248. }
  9249. // String returns the string representation
  9250. func (s DeleteMarkerReplication) String() string {
  9251. return awsutil.Prettify(s)
  9252. }
  9253. // GoString returns the string representation
  9254. func (s DeleteMarkerReplication) GoString() string {
  9255. return s.String()
  9256. }
  9257. // SetStatus sets the Status field's value.
  9258. func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication {
  9259. s.Status = &v
  9260. return s
  9261. }
  9262. type DeleteObjectInput struct {
  9263. _ struct{} `type:"structure"`
  9264. // Bucket is a required field
  9265. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9266. // Indicates whether S3 Object Lock should bypass Governance-mode restrictions
  9267. // to process this operation.
  9268. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  9269. // Key is a required field
  9270. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9271. // The concatenation of the authentication device's serial number, a space,
  9272. // and the value that is displayed on your authentication device.
  9273. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  9274. // Confirms that the requester knows that she or he will be charged for the
  9275. // request. Bucket owners need not specify this parameter in their requests.
  9276. // Documentation on downloading objects from requester pays buckets can be found
  9277. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9278. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9279. // VersionId used to reference a specific version of the object.
  9280. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9281. }
  9282. // String returns the string representation
  9283. func (s DeleteObjectInput) String() string {
  9284. return awsutil.Prettify(s)
  9285. }
  9286. // GoString returns the string representation
  9287. func (s DeleteObjectInput) GoString() string {
  9288. return s.String()
  9289. }
  9290. // Validate inspects the fields of the type to determine if they are valid.
  9291. func (s *DeleteObjectInput) Validate() error {
  9292. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  9293. if s.Bucket == nil {
  9294. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9295. }
  9296. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9297. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9298. }
  9299. if s.Key == nil {
  9300. invalidParams.Add(request.NewErrParamRequired("Key"))
  9301. }
  9302. if s.Key != nil && len(*s.Key) < 1 {
  9303. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9304. }
  9305. if invalidParams.Len() > 0 {
  9306. return invalidParams
  9307. }
  9308. return nil
  9309. }
  9310. // SetBucket sets the Bucket field's value.
  9311. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  9312. s.Bucket = &v
  9313. return s
  9314. }
  9315. func (s *DeleteObjectInput) getBucket() (v string) {
  9316. if s.Bucket == nil {
  9317. return v
  9318. }
  9319. return *s.Bucket
  9320. }
  9321. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  9322. func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput {
  9323. s.BypassGovernanceRetention = &v
  9324. return s
  9325. }
  9326. // SetKey sets the Key field's value.
  9327. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  9328. s.Key = &v
  9329. return s
  9330. }
  9331. // SetMFA sets the MFA field's value.
  9332. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  9333. s.MFA = &v
  9334. return s
  9335. }
  9336. // SetRequestPayer sets the RequestPayer field's value.
  9337. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  9338. s.RequestPayer = &v
  9339. return s
  9340. }
  9341. // SetVersionId sets the VersionId field's value.
  9342. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  9343. s.VersionId = &v
  9344. return s
  9345. }
  9346. type DeleteObjectOutput struct {
  9347. _ struct{} `type:"structure"`
  9348. // Specifies whether the versioned object that was permanently deleted was (true)
  9349. // or was not (false) a delete marker.
  9350. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  9351. // If present, indicates that the requester was successfully charged for the
  9352. // request.
  9353. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9354. // Returns the version ID of the delete marker created as a result of the DELETE
  9355. // operation.
  9356. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9357. }
  9358. // String returns the string representation
  9359. func (s DeleteObjectOutput) String() string {
  9360. return awsutil.Prettify(s)
  9361. }
  9362. // GoString returns the string representation
  9363. func (s DeleteObjectOutput) GoString() string {
  9364. return s.String()
  9365. }
  9366. // SetDeleteMarker sets the DeleteMarker field's value.
  9367. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  9368. s.DeleteMarker = &v
  9369. return s
  9370. }
  9371. // SetRequestCharged sets the RequestCharged field's value.
  9372. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  9373. s.RequestCharged = &v
  9374. return s
  9375. }
  9376. // SetVersionId sets the VersionId field's value.
  9377. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  9378. s.VersionId = &v
  9379. return s
  9380. }
  9381. type DeleteObjectTaggingInput struct {
  9382. _ struct{} `type:"structure"`
  9383. // Bucket is a required field
  9384. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9385. // Key is a required field
  9386. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9387. // The versionId of the object that the tag-set will be removed from.
  9388. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9389. }
  9390. // String returns the string representation
  9391. func (s DeleteObjectTaggingInput) String() string {
  9392. return awsutil.Prettify(s)
  9393. }
  9394. // GoString returns the string representation
  9395. func (s DeleteObjectTaggingInput) GoString() string {
  9396. return s.String()
  9397. }
  9398. // Validate inspects the fields of the type to determine if they are valid.
  9399. func (s *DeleteObjectTaggingInput) Validate() error {
  9400. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  9401. if s.Bucket == nil {
  9402. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9403. }
  9404. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9405. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9406. }
  9407. if s.Key == nil {
  9408. invalidParams.Add(request.NewErrParamRequired("Key"))
  9409. }
  9410. if s.Key != nil && len(*s.Key) < 1 {
  9411. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9412. }
  9413. if invalidParams.Len() > 0 {
  9414. return invalidParams
  9415. }
  9416. return nil
  9417. }
  9418. // SetBucket sets the Bucket field's value.
  9419. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  9420. s.Bucket = &v
  9421. return s
  9422. }
  9423. func (s *DeleteObjectTaggingInput) getBucket() (v string) {
  9424. if s.Bucket == nil {
  9425. return v
  9426. }
  9427. return *s.Bucket
  9428. }
  9429. // SetKey sets the Key field's value.
  9430. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  9431. s.Key = &v
  9432. return s
  9433. }
  9434. // SetVersionId sets the VersionId field's value.
  9435. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  9436. s.VersionId = &v
  9437. return s
  9438. }
  9439. type DeleteObjectTaggingOutput struct {
  9440. _ struct{} `type:"structure"`
  9441. // The versionId of the object the tag-set was removed from.
  9442. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9443. }
  9444. // String returns the string representation
  9445. func (s DeleteObjectTaggingOutput) String() string {
  9446. return awsutil.Prettify(s)
  9447. }
  9448. // GoString returns the string representation
  9449. func (s DeleteObjectTaggingOutput) GoString() string {
  9450. return s.String()
  9451. }
  9452. // SetVersionId sets the VersionId field's value.
  9453. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  9454. s.VersionId = &v
  9455. return s
  9456. }
  9457. type DeleteObjectsInput struct {
  9458. _ struct{} `type:"structure" payload:"Delete"`
  9459. // Bucket is a required field
  9460. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9461. // Specifies whether you want to delete this object even if it has a Governance-type
  9462. // Object Lock in place. You must have sufficient permissions to perform this
  9463. // operation.
  9464. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  9465. // Delete is a required field
  9466. Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  9467. // The concatenation of the authentication device's serial number, a space,
  9468. // and the value that is displayed on your authentication device.
  9469. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  9470. // Confirms that the requester knows that she or he will be charged for the
  9471. // request. Bucket owners need not specify this parameter in their requests.
  9472. // Documentation on downloading objects from requester pays buckets can be found
  9473. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9474. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9475. }
  9476. // String returns the string representation
  9477. func (s DeleteObjectsInput) String() string {
  9478. return awsutil.Prettify(s)
  9479. }
  9480. // GoString returns the string representation
  9481. func (s DeleteObjectsInput) GoString() string {
  9482. return s.String()
  9483. }
  9484. // Validate inspects the fields of the type to determine if they are valid.
  9485. func (s *DeleteObjectsInput) Validate() error {
  9486. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  9487. if s.Bucket == nil {
  9488. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9489. }
  9490. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9491. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9492. }
  9493. if s.Delete == nil {
  9494. invalidParams.Add(request.NewErrParamRequired("Delete"))
  9495. }
  9496. if s.Delete != nil {
  9497. if err := s.Delete.Validate(); err != nil {
  9498. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  9499. }
  9500. }
  9501. if invalidParams.Len() > 0 {
  9502. return invalidParams
  9503. }
  9504. return nil
  9505. }
  9506. // SetBucket sets the Bucket field's value.
  9507. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  9508. s.Bucket = &v
  9509. return s
  9510. }
  9511. func (s *DeleteObjectsInput) getBucket() (v string) {
  9512. if s.Bucket == nil {
  9513. return v
  9514. }
  9515. return *s.Bucket
  9516. }
  9517. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  9518. func (s *DeleteObjectsInput) SetBypassGovernanceRetention(v bool) *DeleteObjectsInput {
  9519. s.BypassGovernanceRetention = &v
  9520. return s
  9521. }
  9522. // SetDelete sets the Delete field's value.
  9523. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  9524. s.Delete = v
  9525. return s
  9526. }
  9527. // SetMFA sets the MFA field's value.
  9528. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  9529. s.MFA = &v
  9530. return s
  9531. }
  9532. // SetRequestPayer sets the RequestPayer field's value.
  9533. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  9534. s.RequestPayer = &v
  9535. return s
  9536. }
  9537. type DeleteObjectsOutput struct {
  9538. _ struct{} `type:"structure"`
  9539. Deleted []*DeletedObject `type:"list" flattened:"true"`
  9540. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  9541. // If present, indicates that the requester was successfully charged for the
  9542. // request.
  9543. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9544. }
  9545. // String returns the string representation
  9546. func (s DeleteObjectsOutput) String() string {
  9547. return awsutil.Prettify(s)
  9548. }
  9549. // GoString returns the string representation
  9550. func (s DeleteObjectsOutput) GoString() string {
  9551. return s.String()
  9552. }
  9553. // SetDeleted sets the Deleted field's value.
  9554. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  9555. s.Deleted = v
  9556. return s
  9557. }
  9558. // SetErrors sets the Errors field's value.
  9559. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  9560. s.Errors = v
  9561. return s
  9562. }
  9563. // SetRequestCharged sets the RequestCharged field's value.
  9564. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  9565. s.RequestCharged = &v
  9566. return s
  9567. }
  9568. type DeletePublicAccessBlockInput struct {
  9569. _ struct{} `type:"structure"`
  9570. // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.
  9571. //
  9572. // Bucket is a required field
  9573. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9574. }
  9575. // String returns the string representation
  9576. func (s DeletePublicAccessBlockInput) String() string {
  9577. return awsutil.Prettify(s)
  9578. }
  9579. // GoString returns the string representation
  9580. func (s DeletePublicAccessBlockInput) GoString() string {
  9581. return s.String()
  9582. }
  9583. // Validate inspects the fields of the type to determine if they are valid.
  9584. func (s *DeletePublicAccessBlockInput) Validate() error {
  9585. invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"}
  9586. if s.Bucket == nil {
  9587. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9588. }
  9589. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9590. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9591. }
  9592. if invalidParams.Len() > 0 {
  9593. return invalidParams
  9594. }
  9595. return nil
  9596. }
  9597. // SetBucket sets the Bucket field's value.
  9598. func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput {
  9599. s.Bucket = &v
  9600. return s
  9601. }
  9602. func (s *DeletePublicAccessBlockInput) getBucket() (v string) {
  9603. if s.Bucket == nil {
  9604. return v
  9605. }
  9606. return *s.Bucket
  9607. }
  9608. type DeletePublicAccessBlockOutput struct {
  9609. _ struct{} `type:"structure"`
  9610. }
  9611. // String returns the string representation
  9612. func (s DeletePublicAccessBlockOutput) String() string {
  9613. return awsutil.Prettify(s)
  9614. }
  9615. // GoString returns the string representation
  9616. func (s DeletePublicAccessBlockOutput) GoString() string {
  9617. return s.String()
  9618. }
  9619. type DeletedObject struct {
  9620. _ struct{} `type:"structure"`
  9621. DeleteMarker *bool `type:"boolean"`
  9622. DeleteMarkerVersionId *string `type:"string"`
  9623. Key *string `min:"1" type:"string"`
  9624. VersionId *string `type:"string"`
  9625. }
  9626. // String returns the string representation
  9627. func (s DeletedObject) String() string {
  9628. return awsutil.Prettify(s)
  9629. }
  9630. // GoString returns the string representation
  9631. func (s DeletedObject) GoString() string {
  9632. return s.String()
  9633. }
  9634. // SetDeleteMarker sets the DeleteMarker field's value.
  9635. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  9636. s.DeleteMarker = &v
  9637. return s
  9638. }
  9639. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  9640. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  9641. s.DeleteMarkerVersionId = &v
  9642. return s
  9643. }
  9644. // SetKey sets the Key field's value.
  9645. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  9646. s.Key = &v
  9647. return s
  9648. }
  9649. // SetVersionId sets the VersionId field's value.
  9650. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  9651. s.VersionId = &v
  9652. return s
  9653. }
  9654. // A container for information about the replication destination.
  9655. type Destination struct {
  9656. _ struct{} `type:"structure"`
  9657. // A container for information about access control for replicas.
  9658. //
  9659. // Use this element only in a cross-account scenario where source and destination
  9660. // bucket owners are not the same to change replica ownership to the AWS account
  9661. // that owns the destination bucket. If you don't add this element to the replication
  9662. // configuration, the replicas are owned by same AWS account that owns the source
  9663. // object.
  9664. AccessControlTranslation *AccessControlTranslation `type:"structure"`
  9665. // The account ID of the destination bucket. Currently, Amazon S3 verifies this
  9666. // value only if Access Control Translation is enabled.
  9667. //
  9668. // In a cross-account scenario, if you change replica ownership to the AWS account
  9669. // that owns the destination bucket by adding the AccessControlTranslation element,
  9670. // this is the account ID of the owner of the destination bucket.
  9671. Account *string `type:"string"`
  9672. // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
  9673. // store replicas of the object identified by the rule.
  9674. //
  9675. // If there are multiple rules in your replication configuration, all rules
  9676. // must specify the same bucket as the destination. A replication configuration
  9677. // can replicate objects to only one destination bucket.
  9678. //
  9679. // Bucket is a required field
  9680. Bucket *string `type:"string" required:"true"`
  9681. // A container that provides information about encryption. If SourceSelectionCriteria
  9682. // is specified, you must specify this element.
  9683. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  9684. // The class of storage used to store the object. By default Amazon S3 uses
  9685. // storage class of the source object when creating a replica.
  9686. StorageClass *string `type:"string" enum:"StorageClass"`
  9687. }
  9688. // String returns the string representation
  9689. func (s Destination) String() string {
  9690. return awsutil.Prettify(s)
  9691. }
  9692. // GoString returns the string representation
  9693. func (s Destination) GoString() string {
  9694. return s.String()
  9695. }
  9696. // Validate inspects the fields of the type to determine if they are valid.
  9697. func (s *Destination) Validate() error {
  9698. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  9699. if s.Bucket == nil {
  9700. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9701. }
  9702. if s.AccessControlTranslation != nil {
  9703. if err := s.AccessControlTranslation.Validate(); err != nil {
  9704. invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
  9705. }
  9706. }
  9707. if invalidParams.Len() > 0 {
  9708. return invalidParams
  9709. }
  9710. return nil
  9711. }
  9712. // SetAccessControlTranslation sets the AccessControlTranslation field's value.
  9713. func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
  9714. s.AccessControlTranslation = v
  9715. return s
  9716. }
  9717. // SetAccount sets the Account field's value.
  9718. func (s *Destination) SetAccount(v string) *Destination {
  9719. s.Account = &v
  9720. return s
  9721. }
  9722. // SetBucket sets the Bucket field's value.
  9723. func (s *Destination) SetBucket(v string) *Destination {
  9724. s.Bucket = &v
  9725. return s
  9726. }
  9727. func (s *Destination) getBucket() (v string) {
  9728. if s.Bucket == nil {
  9729. return v
  9730. }
  9731. return *s.Bucket
  9732. }
  9733. // SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
  9734. func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
  9735. s.EncryptionConfiguration = v
  9736. return s
  9737. }
  9738. // SetStorageClass sets the StorageClass field's value.
  9739. func (s *Destination) SetStorageClass(v string) *Destination {
  9740. s.StorageClass = &v
  9741. return s
  9742. }
  9743. // Describes the server-side encryption that will be applied to the restore
  9744. // results.
  9745. type Encryption struct {
  9746. _ struct{} `type:"structure"`
  9747. // The server-side encryption algorithm used when storing job results in Amazon
  9748. // S3 (e.g., AES256, aws:kms).
  9749. //
  9750. // EncryptionType is a required field
  9751. EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  9752. // If the encryption type is aws:kms, this optional value can be used to specify
  9753. // the encryption context for the restore results.
  9754. KMSContext *string `type:"string"`
  9755. // If the encryption type is aws:kms, this optional value specifies the AWS
  9756. // KMS key ID to use for encryption of job results.
  9757. KMSKeyId *string `type:"string" sensitive:"true"`
  9758. }
  9759. // String returns the string representation
  9760. func (s Encryption) String() string {
  9761. return awsutil.Prettify(s)
  9762. }
  9763. // GoString returns the string representation
  9764. func (s Encryption) GoString() string {
  9765. return s.String()
  9766. }
  9767. // Validate inspects the fields of the type to determine if they are valid.
  9768. func (s *Encryption) Validate() error {
  9769. invalidParams := request.ErrInvalidParams{Context: "Encryption"}
  9770. if s.EncryptionType == nil {
  9771. invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  9772. }
  9773. if invalidParams.Len() > 0 {
  9774. return invalidParams
  9775. }
  9776. return nil
  9777. }
  9778. // SetEncryptionType sets the EncryptionType field's value.
  9779. func (s *Encryption) SetEncryptionType(v string) *Encryption {
  9780. s.EncryptionType = &v
  9781. return s
  9782. }
  9783. // SetKMSContext sets the KMSContext field's value.
  9784. func (s *Encryption) SetKMSContext(v string) *Encryption {
  9785. s.KMSContext = &v
  9786. return s
  9787. }
  9788. // SetKMSKeyId sets the KMSKeyId field's value.
  9789. func (s *Encryption) SetKMSKeyId(v string) *Encryption {
  9790. s.KMSKeyId = &v
  9791. return s
  9792. }
  9793. // A container for information about the encryption-based configuration for
  9794. // replicas.
  9795. type EncryptionConfiguration struct {
  9796. _ struct{} `type:"structure"`
  9797. // The ID of the AWS KMS key for the AWS Region where the destination bucket
  9798. // resides. Amazon S3 uses this key to encrypt the replica object.
  9799. ReplicaKmsKeyID *string `type:"string"`
  9800. }
  9801. // String returns the string representation
  9802. func (s EncryptionConfiguration) String() string {
  9803. return awsutil.Prettify(s)
  9804. }
  9805. // GoString returns the string representation
  9806. func (s EncryptionConfiguration) GoString() string {
  9807. return s.String()
  9808. }
  9809. // SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
  9810. func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
  9811. s.ReplicaKmsKeyID = &v
  9812. return s
  9813. }
  9814. type EndEvent struct {
  9815. _ struct{} `locationName:"EndEvent" type:"structure"`
  9816. }
  9817. // String returns the string representation
  9818. func (s EndEvent) String() string {
  9819. return awsutil.Prettify(s)
  9820. }
  9821. // GoString returns the string representation
  9822. func (s EndEvent) GoString() string {
  9823. return s.String()
  9824. }
  9825. // The EndEvent is and event in the SelectObjectContentEventStream group of events.
  9826. func (s *EndEvent) eventSelectObjectContentEventStream() {}
  9827. // UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
  9828. // This method is only used internally within the SDK's EventStream handling.
  9829. func (s *EndEvent) UnmarshalEvent(
  9830. payloadUnmarshaler protocol.PayloadUnmarshaler,
  9831. msg eventstream.Message,
  9832. ) error {
  9833. return nil
  9834. }
  9835. type Error struct {
  9836. _ struct{} `type:"structure"`
  9837. Code *string `type:"string"`
  9838. Key *string `min:"1" type:"string"`
  9839. Message *string `type:"string"`
  9840. VersionId *string `type:"string"`
  9841. }
  9842. // String returns the string representation
  9843. func (s Error) String() string {
  9844. return awsutil.Prettify(s)
  9845. }
  9846. // GoString returns the string representation
  9847. func (s Error) GoString() string {
  9848. return s.String()
  9849. }
  9850. // SetCode sets the Code field's value.
  9851. func (s *Error) SetCode(v string) *Error {
  9852. s.Code = &v
  9853. return s
  9854. }
  9855. // SetKey sets the Key field's value.
  9856. func (s *Error) SetKey(v string) *Error {
  9857. s.Key = &v
  9858. return s
  9859. }
  9860. // SetMessage sets the Message field's value.
  9861. func (s *Error) SetMessage(v string) *Error {
  9862. s.Message = &v
  9863. return s
  9864. }
  9865. // SetVersionId sets the VersionId field's value.
  9866. func (s *Error) SetVersionId(v string) *Error {
  9867. s.VersionId = &v
  9868. return s
  9869. }
  9870. type ErrorDocument struct {
  9871. _ struct{} `type:"structure"`
  9872. // The object key name to use when a 4XX class error occurs.
  9873. //
  9874. // Key is a required field
  9875. Key *string `min:"1" type:"string" required:"true"`
  9876. }
  9877. // String returns the string representation
  9878. func (s ErrorDocument) String() string {
  9879. return awsutil.Prettify(s)
  9880. }
  9881. // GoString returns the string representation
  9882. func (s ErrorDocument) GoString() string {
  9883. return s.String()
  9884. }
  9885. // Validate inspects the fields of the type to determine if they are valid.
  9886. func (s *ErrorDocument) Validate() error {
  9887. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  9888. if s.Key == nil {
  9889. invalidParams.Add(request.NewErrParamRequired("Key"))
  9890. }
  9891. if s.Key != nil && len(*s.Key) < 1 {
  9892. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9893. }
  9894. if invalidParams.Len() > 0 {
  9895. return invalidParams
  9896. }
  9897. return nil
  9898. }
  9899. // SetKey sets the Key field's value.
  9900. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  9901. s.Key = &v
  9902. return s
  9903. }
  9904. // A container for a key value pair that defines the criteria for the filter
  9905. // rule.
  9906. type FilterRule struct {
  9907. _ struct{} `type:"structure"`
  9908. // The object key name prefix or suffix identifying one or more objects to which
  9909. // the filtering rule applies. The maximum prefix length is 1,024 characters.
  9910. // Overlapping prefixes and suffixes are not supported. For more information,
  9911. // see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  9912. // in the Amazon Simple Storage Service Developer Guide.
  9913. Name *string `type:"string" enum:"FilterRuleName"`
  9914. Value *string `type:"string"`
  9915. }
  9916. // String returns the string representation
  9917. func (s FilterRule) String() string {
  9918. return awsutil.Prettify(s)
  9919. }
  9920. // GoString returns the string representation
  9921. func (s FilterRule) GoString() string {
  9922. return s.String()
  9923. }
  9924. // SetName sets the Name field's value.
  9925. func (s *FilterRule) SetName(v string) *FilterRule {
  9926. s.Name = &v
  9927. return s
  9928. }
  9929. // SetValue sets the Value field's value.
  9930. func (s *FilterRule) SetValue(v string) *FilterRule {
  9931. s.Value = &v
  9932. return s
  9933. }
  9934. type GetBucketAccelerateConfigurationInput struct {
  9935. _ struct{} `type:"structure"`
  9936. // Name of the bucket for which the accelerate configuration is retrieved.
  9937. //
  9938. // Bucket is a required field
  9939. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9940. }
  9941. // String returns the string representation
  9942. func (s GetBucketAccelerateConfigurationInput) String() string {
  9943. return awsutil.Prettify(s)
  9944. }
  9945. // GoString returns the string representation
  9946. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  9947. return s.String()
  9948. }
  9949. // Validate inspects the fields of the type to determine if they are valid.
  9950. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  9951. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  9952. if s.Bucket == nil {
  9953. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9954. }
  9955. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9956. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9957. }
  9958. if invalidParams.Len() > 0 {
  9959. return invalidParams
  9960. }
  9961. return nil
  9962. }
  9963. // SetBucket sets the Bucket field's value.
  9964. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  9965. s.Bucket = &v
  9966. return s
  9967. }
  9968. func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
  9969. if s.Bucket == nil {
  9970. return v
  9971. }
  9972. return *s.Bucket
  9973. }
  9974. type GetBucketAccelerateConfigurationOutput struct {
  9975. _ struct{} `type:"structure"`
  9976. // The accelerate configuration of the bucket.
  9977. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  9978. }
  9979. // String returns the string representation
  9980. func (s GetBucketAccelerateConfigurationOutput) String() string {
  9981. return awsutil.Prettify(s)
  9982. }
  9983. // GoString returns the string representation
  9984. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  9985. return s.String()
  9986. }
  9987. // SetStatus sets the Status field's value.
  9988. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  9989. s.Status = &v
  9990. return s
  9991. }
  9992. type GetBucketAclInput struct {
  9993. _ struct{} `type:"structure"`
  9994. // Bucket is a required field
  9995. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9996. }
  9997. // String returns the string representation
  9998. func (s GetBucketAclInput) String() string {
  9999. return awsutil.Prettify(s)
  10000. }
  10001. // GoString returns the string representation
  10002. func (s GetBucketAclInput) GoString() string {
  10003. return s.String()
  10004. }
  10005. // Validate inspects the fields of the type to determine if they are valid.
  10006. func (s *GetBucketAclInput) Validate() error {
  10007. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  10008. if s.Bucket == nil {
  10009. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10010. }
  10011. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10012. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10013. }
  10014. if invalidParams.Len() > 0 {
  10015. return invalidParams
  10016. }
  10017. return nil
  10018. }
  10019. // SetBucket sets the Bucket field's value.
  10020. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  10021. s.Bucket = &v
  10022. return s
  10023. }
  10024. func (s *GetBucketAclInput) getBucket() (v string) {
  10025. if s.Bucket == nil {
  10026. return v
  10027. }
  10028. return *s.Bucket
  10029. }
  10030. type GetBucketAclOutput struct {
  10031. _ struct{} `type:"structure"`
  10032. // A list of grants.
  10033. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  10034. Owner *Owner `type:"structure"`
  10035. }
  10036. // String returns the string representation
  10037. func (s GetBucketAclOutput) String() string {
  10038. return awsutil.Prettify(s)
  10039. }
  10040. // GoString returns the string representation
  10041. func (s GetBucketAclOutput) GoString() string {
  10042. return s.String()
  10043. }
  10044. // SetGrants sets the Grants field's value.
  10045. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  10046. s.Grants = v
  10047. return s
  10048. }
  10049. // SetOwner sets the Owner field's value.
  10050. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  10051. s.Owner = v
  10052. return s
  10053. }
  10054. type GetBucketAnalyticsConfigurationInput struct {
  10055. _ struct{} `type:"structure"`
  10056. // The name of the bucket from which an analytics configuration is retrieved.
  10057. //
  10058. // Bucket is a required field
  10059. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10060. // The identifier used to represent an analytics configuration.
  10061. //
  10062. // Id is a required field
  10063. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10064. }
  10065. // String returns the string representation
  10066. func (s GetBucketAnalyticsConfigurationInput) String() string {
  10067. return awsutil.Prettify(s)
  10068. }
  10069. // GoString returns the string representation
  10070. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  10071. return s.String()
  10072. }
  10073. // Validate inspects the fields of the type to determine if they are valid.
  10074. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  10075. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  10076. if s.Bucket == nil {
  10077. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10078. }
  10079. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10080. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10081. }
  10082. if s.Id == nil {
  10083. invalidParams.Add(request.NewErrParamRequired("Id"))
  10084. }
  10085. if invalidParams.Len() > 0 {
  10086. return invalidParams
  10087. }
  10088. return nil
  10089. }
  10090. // SetBucket sets the Bucket field's value.
  10091. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  10092. s.Bucket = &v
  10093. return s
  10094. }
  10095. func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
  10096. if s.Bucket == nil {
  10097. return v
  10098. }
  10099. return *s.Bucket
  10100. }
  10101. // SetId sets the Id field's value.
  10102. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  10103. s.Id = &v
  10104. return s
  10105. }
  10106. type GetBucketAnalyticsConfigurationOutput struct {
  10107. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  10108. // The configuration and any analyses for the analytics filter.
  10109. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  10110. }
  10111. // String returns the string representation
  10112. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  10113. return awsutil.Prettify(s)
  10114. }
  10115. // GoString returns the string representation
  10116. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  10117. return s.String()
  10118. }
  10119. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  10120. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  10121. s.AnalyticsConfiguration = v
  10122. return s
  10123. }
  10124. type GetBucketCorsInput struct {
  10125. _ struct{} `type:"structure"`
  10126. // Bucket is a required field
  10127. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10128. }
  10129. // String returns the string representation
  10130. func (s GetBucketCorsInput) String() string {
  10131. return awsutil.Prettify(s)
  10132. }
  10133. // GoString returns the string representation
  10134. func (s GetBucketCorsInput) GoString() string {
  10135. return s.String()
  10136. }
  10137. // Validate inspects the fields of the type to determine if they are valid.
  10138. func (s *GetBucketCorsInput) Validate() error {
  10139. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  10140. if s.Bucket == nil {
  10141. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10142. }
  10143. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10144. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10145. }
  10146. if invalidParams.Len() > 0 {
  10147. return invalidParams
  10148. }
  10149. return nil
  10150. }
  10151. // SetBucket sets the Bucket field's value.
  10152. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  10153. s.Bucket = &v
  10154. return s
  10155. }
  10156. func (s *GetBucketCorsInput) getBucket() (v string) {
  10157. if s.Bucket == nil {
  10158. return v
  10159. }
  10160. return *s.Bucket
  10161. }
  10162. type GetBucketCorsOutput struct {
  10163. _ struct{} `type:"structure"`
  10164. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  10165. }
  10166. // String returns the string representation
  10167. func (s GetBucketCorsOutput) String() string {
  10168. return awsutil.Prettify(s)
  10169. }
  10170. // GoString returns the string representation
  10171. func (s GetBucketCorsOutput) GoString() string {
  10172. return s.String()
  10173. }
  10174. // SetCORSRules sets the CORSRules field's value.
  10175. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  10176. s.CORSRules = v
  10177. return s
  10178. }
  10179. type GetBucketEncryptionInput struct {
  10180. _ struct{} `type:"structure"`
  10181. // The name of the bucket from which the server-side encryption configuration
  10182. // is retrieved.
  10183. //
  10184. // Bucket is a required field
  10185. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10186. }
  10187. // String returns the string representation
  10188. func (s GetBucketEncryptionInput) String() string {
  10189. return awsutil.Prettify(s)
  10190. }
  10191. // GoString returns the string representation
  10192. func (s GetBucketEncryptionInput) GoString() string {
  10193. return s.String()
  10194. }
  10195. // Validate inspects the fields of the type to determine if they are valid.
  10196. func (s *GetBucketEncryptionInput) Validate() error {
  10197. invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
  10198. if s.Bucket == nil {
  10199. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10200. }
  10201. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10202. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10203. }
  10204. if invalidParams.Len() > 0 {
  10205. return invalidParams
  10206. }
  10207. return nil
  10208. }
  10209. // SetBucket sets the Bucket field's value.
  10210. func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
  10211. s.Bucket = &v
  10212. return s
  10213. }
  10214. func (s *GetBucketEncryptionInput) getBucket() (v string) {
  10215. if s.Bucket == nil {
  10216. return v
  10217. }
  10218. return *s.Bucket
  10219. }
  10220. type GetBucketEncryptionOutput struct {
  10221. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  10222. // Container for server-side encryption configuration rules. Currently S3 supports
  10223. // one rule only.
  10224. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
  10225. }
  10226. // String returns the string representation
  10227. func (s GetBucketEncryptionOutput) String() string {
  10228. return awsutil.Prettify(s)
  10229. }
  10230. // GoString returns the string representation
  10231. func (s GetBucketEncryptionOutput) GoString() string {
  10232. return s.String()
  10233. }
  10234. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  10235. func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
  10236. s.ServerSideEncryptionConfiguration = v
  10237. return s
  10238. }
  10239. type GetBucketInventoryConfigurationInput struct {
  10240. _ struct{} `type:"structure"`
  10241. // The name of the bucket containing the inventory configuration to retrieve.
  10242. //
  10243. // Bucket is a required field
  10244. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10245. // The ID used to identify the inventory configuration.
  10246. //
  10247. // Id is a required field
  10248. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10249. }
  10250. // String returns the string representation
  10251. func (s GetBucketInventoryConfigurationInput) String() string {
  10252. return awsutil.Prettify(s)
  10253. }
  10254. // GoString returns the string representation
  10255. func (s GetBucketInventoryConfigurationInput) GoString() string {
  10256. return s.String()
  10257. }
  10258. // Validate inspects the fields of the type to determine if they are valid.
  10259. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  10260. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  10261. if s.Bucket == nil {
  10262. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10263. }
  10264. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10265. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10266. }
  10267. if s.Id == nil {
  10268. invalidParams.Add(request.NewErrParamRequired("Id"))
  10269. }
  10270. if invalidParams.Len() > 0 {
  10271. return invalidParams
  10272. }
  10273. return nil
  10274. }
  10275. // SetBucket sets the Bucket field's value.
  10276. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  10277. s.Bucket = &v
  10278. return s
  10279. }
  10280. func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
  10281. if s.Bucket == nil {
  10282. return v
  10283. }
  10284. return *s.Bucket
  10285. }
  10286. // SetId sets the Id field's value.
  10287. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  10288. s.Id = &v
  10289. return s
  10290. }
  10291. type GetBucketInventoryConfigurationOutput struct {
  10292. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  10293. // Specifies the inventory configuration.
  10294. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  10295. }
  10296. // String returns the string representation
  10297. func (s GetBucketInventoryConfigurationOutput) String() string {
  10298. return awsutil.Prettify(s)
  10299. }
  10300. // GoString returns the string representation
  10301. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  10302. return s.String()
  10303. }
  10304. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  10305. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  10306. s.InventoryConfiguration = v
  10307. return s
  10308. }
  10309. type GetBucketLifecycleConfigurationInput struct {
  10310. _ struct{} `type:"structure"`
  10311. // Bucket is a required field
  10312. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10313. }
  10314. // String returns the string representation
  10315. func (s GetBucketLifecycleConfigurationInput) String() string {
  10316. return awsutil.Prettify(s)
  10317. }
  10318. // GoString returns the string representation
  10319. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  10320. return s.String()
  10321. }
  10322. // Validate inspects the fields of the type to determine if they are valid.
  10323. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  10324. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  10325. if s.Bucket == nil {
  10326. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10327. }
  10328. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10329. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10330. }
  10331. if invalidParams.Len() > 0 {
  10332. return invalidParams
  10333. }
  10334. return nil
  10335. }
  10336. // SetBucket sets the Bucket field's value.
  10337. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  10338. s.Bucket = &v
  10339. return s
  10340. }
  10341. func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
  10342. if s.Bucket == nil {
  10343. return v
  10344. }
  10345. return *s.Bucket
  10346. }
  10347. type GetBucketLifecycleConfigurationOutput struct {
  10348. _ struct{} `type:"structure"`
  10349. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  10350. }
  10351. // String returns the string representation
  10352. func (s GetBucketLifecycleConfigurationOutput) String() string {
  10353. return awsutil.Prettify(s)
  10354. }
  10355. // GoString returns the string representation
  10356. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  10357. return s.String()
  10358. }
  10359. // SetRules sets the Rules field's value.
  10360. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  10361. s.Rules = v
  10362. return s
  10363. }
  10364. type GetBucketLifecycleInput struct {
  10365. _ struct{} `type:"structure"`
  10366. // Bucket is a required field
  10367. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10368. }
  10369. // String returns the string representation
  10370. func (s GetBucketLifecycleInput) String() string {
  10371. return awsutil.Prettify(s)
  10372. }
  10373. // GoString returns the string representation
  10374. func (s GetBucketLifecycleInput) GoString() string {
  10375. return s.String()
  10376. }
  10377. // Validate inspects the fields of the type to determine if they are valid.
  10378. func (s *GetBucketLifecycleInput) Validate() error {
  10379. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  10380. if s.Bucket == nil {
  10381. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10382. }
  10383. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10384. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10385. }
  10386. if invalidParams.Len() > 0 {
  10387. return invalidParams
  10388. }
  10389. return nil
  10390. }
  10391. // SetBucket sets the Bucket field's value.
  10392. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  10393. s.Bucket = &v
  10394. return s
  10395. }
  10396. func (s *GetBucketLifecycleInput) getBucket() (v string) {
  10397. if s.Bucket == nil {
  10398. return v
  10399. }
  10400. return *s.Bucket
  10401. }
  10402. type GetBucketLifecycleOutput struct {
  10403. _ struct{} `type:"structure"`
  10404. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  10405. }
  10406. // String returns the string representation
  10407. func (s GetBucketLifecycleOutput) String() string {
  10408. return awsutil.Prettify(s)
  10409. }
  10410. // GoString returns the string representation
  10411. func (s GetBucketLifecycleOutput) GoString() string {
  10412. return s.String()
  10413. }
  10414. // SetRules sets the Rules field's value.
  10415. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  10416. s.Rules = v
  10417. return s
  10418. }
  10419. type GetBucketLocationInput struct {
  10420. _ struct{} `type:"structure"`
  10421. // Bucket is a required field
  10422. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10423. }
  10424. // String returns the string representation
  10425. func (s GetBucketLocationInput) String() string {
  10426. return awsutil.Prettify(s)
  10427. }
  10428. // GoString returns the string representation
  10429. func (s GetBucketLocationInput) GoString() string {
  10430. return s.String()
  10431. }
  10432. // Validate inspects the fields of the type to determine if they are valid.
  10433. func (s *GetBucketLocationInput) Validate() error {
  10434. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  10435. if s.Bucket == nil {
  10436. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10437. }
  10438. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10439. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10440. }
  10441. if invalidParams.Len() > 0 {
  10442. return invalidParams
  10443. }
  10444. return nil
  10445. }
  10446. // SetBucket sets the Bucket field's value.
  10447. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  10448. s.Bucket = &v
  10449. return s
  10450. }
  10451. func (s *GetBucketLocationInput) getBucket() (v string) {
  10452. if s.Bucket == nil {
  10453. return v
  10454. }
  10455. return *s.Bucket
  10456. }
  10457. type GetBucketLocationOutput struct {
  10458. _ struct{} `type:"structure"`
  10459. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  10460. }
  10461. // String returns the string representation
  10462. func (s GetBucketLocationOutput) String() string {
  10463. return awsutil.Prettify(s)
  10464. }
  10465. // GoString returns the string representation
  10466. func (s GetBucketLocationOutput) GoString() string {
  10467. return s.String()
  10468. }
  10469. // SetLocationConstraint sets the LocationConstraint field's value.
  10470. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  10471. s.LocationConstraint = &v
  10472. return s
  10473. }
  10474. type GetBucketLoggingInput struct {
  10475. _ struct{} `type:"structure"`
  10476. // Bucket is a required field
  10477. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10478. }
  10479. // String returns the string representation
  10480. func (s GetBucketLoggingInput) String() string {
  10481. return awsutil.Prettify(s)
  10482. }
  10483. // GoString returns the string representation
  10484. func (s GetBucketLoggingInput) GoString() string {
  10485. return s.String()
  10486. }
  10487. // Validate inspects the fields of the type to determine if they are valid.
  10488. func (s *GetBucketLoggingInput) Validate() error {
  10489. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  10490. if s.Bucket == nil {
  10491. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10492. }
  10493. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10494. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10495. }
  10496. if invalidParams.Len() > 0 {
  10497. return invalidParams
  10498. }
  10499. return nil
  10500. }
  10501. // SetBucket sets the Bucket field's value.
  10502. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  10503. s.Bucket = &v
  10504. return s
  10505. }
  10506. func (s *GetBucketLoggingInput) getBucket() (v string) {
  10507. if s.Bucket == nil {
  10508. return v
  10509. }
  10510. return *s.Bucket
  10511. }
  10512. type GetBucketLoggingOutput struct {
  10513. _ struct{} `type:"structure"`
  10514. // Container for logging information. Presence of this element indicates that
  10515. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  10516. // in this case.
  10517. LoggingEnabled *LoggingEnabled `type:"structure"`
  10518. }
  10519. // String returns the string representation
  10520. func (s GetBucketLoggingOutput) String() string {
  10521. return awsutil.Prettify(s)
  10522. }
  10523. // GoString returns the string representation
  10524. func (s GetBucketLoggingOutput) GoString() string {
  10525. return s.String()
  10526. }
  10527. // SetLoggingEnabled sets the LoggingEnabled field's value.
  10528. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  10529. s.LoggingEnabled = v
  10530. return s
  10531. }
  10532. type GetBucketMetricsConfigurationInput struct {
  10533. _ struct{} `type:"structure"`
  10534. // The name of the bucket containing the metrics configuration to retrieve.
  10535. //
  10536. // Bucket is a required field
  10537. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10538. // The ID used to identify the metrics configuration.
  10539. //
  10540. // Id is a required field
  10541. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10542. }
  10543. // String returns the string representation
  10544. func (s GetBucketMetricsConfigurationInput) String() string {
  10545. return awsutil.Prettify(s)
  10546. }
  10547. // GoString returns the string representation
  10548. func (s GetBucketMetricsConfigurationInput) GoString() string {
  10549. return s.String()
  10550. }
  10551. // Validate inspects the fields of the type to determine if they are valid.
  10552. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  10553. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  10554. if s.Bucket == nil {
  10555. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10556. }
  10557. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10558. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10559. }
  10560. if s.Id == nil {
  10561. invalidParams.Add(request.NewErrParamRequired("Id"))
  10562. }
  10563. if invalidParams.Len() > 0 {
  10564. return invalidParams
  10565. }
  10566. return nil
  10567. }
  10568. // SetBucket sets the Bucket field's value.
  10569. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  10570. s.Bucket = &v
  10571. return s
  10572. }
  10573. func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
  10574. if s.Bucket == nil {
  10575. return v
  10576. }
  10577. return *s.Bucket
  10578. }
  10579. // SetId sets the Id field's value.
  10580. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  10581. s.Id = &v
  10582. return s
  10583. }
  10584. type GetBucketMetricsConfigurationOutput struct {
  10585. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  10586. // Specifies the metrics configuration.
  10587. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  10588. }
  10589. // String returns the string representation
  10590. func (s GetBucketMetricsConfigurationOutput) String() string {
  10591. return awsutil.Prettify(s)
  10592. }
  10593. // GoString returns the string representation
  10594. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  10595. return s.String()
  10596. }
  10597. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  10598. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  10599. s.MetricsConfiguration = v
  10600. return s
  10601. }
  10602. type GetBucketNotificationConfigurationRequest struct {
  10603. _ struct{} `type:"structure"`
  10604. // Name of the bucket to get the notification configuration for.
  10605. //
  10606. // Bucket is a required field
  10607. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10608. }
  10609. // String returns the string representation
  10610. func (s GetBucketNotificationConfigurationRequest) String() string {
  10611. return awsutil.Prettify(s)
  10612. }
  10613. // GoString returns the string representation
  10614. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  10615. return s.String()
  10616. }
  10617. // Validate inspects the fields of the type to determine if they are valid.
  10618. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  10619. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  10620. if s.Bucket == nil {
  10621. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10622. }
  10623. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10624. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10625. }
  10626. if invalidParams.Len() > 0 {
  10627. return invalidParams
  10628. }
  10629. return nil
  10630. }
  10631. // SetBucket sets the Bucket field's value.
  10632. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  10633. s.Bucket = &v
  10634. return s
  10635. }
  10636. func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
  10637. if s.Bucket == nil {
  10638. return v
  10639. }
  10640. return *s.Bucket
  10641. }
  10642. type GetBucketPolicyInput struct {
  10643. _ struct{} `type:"structure"`
  10644. // Bucket is a required field
  10645. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10646. }
  10647. // String returns the string representation
  10648. func (s GetBucketPolicyInput) String() string {
  10649. return awsutil.Prettify(s)
  10650. }
  10651. // GoString returns the string representation
  10652. func (s GetBucketPolicyInput) GoString() string {
  10653. return s.String()
  10654. }
  10655. // Validate inspects the fields of the type to determine if they are valid.
  10656. func (s *GetBucketPolicyInput) Validate() error {
  10657. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  10658. if s.Bucket == nil {
  10659. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10660. }
  10661. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10662. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10663. }
  10664. if invalidParams.Len() > 0 {
  10665. return invalidParams
  10666. }
  10667. return nil
  10668. }
  10669. // SetBucket sets the Bucket field's value.
  10670. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  10671. s.Bucket = &v
  10672. return s
  10673. }
  10674. func (s *GetBucketPolicyInput) getBucket() (v string) {
  10675. if s.Bucket == nil {
  10676. return v
  10677. }
  10678. return *s.Bucket
  10679. }
  10680. type GetBucketPolicyOutput struct {
  10681. _ struct{} `type:"structure" payload:"Policy"`
  10682. // The bucket policy as a JSON document.
  10683. Policy *string `type:"string"`
  10684. }
  10685. // String returns the string representation
  10686. func (s GetBucketPolicyOutput) String() string {
  10687. return awsutil.Prettify(s)
  10688. }
  10689. // GoString returns the string representation
  10690. func (s GetBucketPolicyOutput) GoString() string {
  10691. return s.String()
  10692. }
  10693. // SetPolicy sets the Policy field's value.
  10694. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  10695. s.Policy = &v
  10696. return s
  10697. }
  10698. type GetBucketPolicyStatusInput struct {
  10699. _ struct{} `type:"structure"`
  10700. // The name of the Amazon S3 bucket whose policy status you want to retrieve.
  10701. //
  10702. // Bucket is a required field
  10703. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10704. }
  10705. // String returns the string representation
  10706. func (s GetBucketPolicyStatusInput) String() string {
  10707. return awsutil.Prettify(s)
  10708. }
  10709. // GoString returns the string representation
  10710. func (s GetBucketPolicyStatusInput) GoString() string {
  10711. return s.String()
  10712. }
  10713. // Validate inspects the fields of the type to determine if they are valid.
  10714. func (s *GetBucketPolicyStatusInput) Validate() error {
  10715. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyStatusInput"}
  10716. if s.Bucket == nil {
  10717. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10718. }
  10719. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10720. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10721. }
  10722. if invalidParams.Len() > 0 {
  10723. return invalidParams
  10724. }
  10725. return nil
  10726. }
  10727. // SetBucket sets the Bucket field's value.
  10728. func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput {
  10729. s.Bucket = &v
  10730. return s
  10731. }
  10732. func (s *GetBucketPolicyStatusInput) getBucket() (v string) {
  10733. if s.Bucket == nil {
  10734. return v
  10735. }
  10736. return *s.Bucket
  10737. }
  10738. type GetBucketPolicyStatusOutput struct {
  10739. _ struct{} `type:"structure" payload:"PolicyStatus"`
  10740. // The policy status for the specified bucket.
  10741. PolicyStatus *PolicyStatus `type:"structure"`
  10742. }
  10743. // String returns the string representation
  10744. func (s GetBucketPolicyStatusOutput) String() string {
  10745. return awsutil.Prettify(s)
  10746. }
  10747. // GoString returns the string representation
  10748. func (s GetBucketPolicyStatusOutput) GoString() string {
  10749. return s.String()
  10750. }
  10751. // SetPolicyStatus sets the PolicyStatus field's value.
  10752. func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput {
  10753. s.PolicyStatus = v
  10754. return s
  10755. }
  10756. type GetBucketReplicationInput struct {
  10757. _ struct{} `type:"structure"`
  10758. // Bucket is a required field
  10759. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10760. }
  10761. // String returns the string representation
  10762. func (s GetBucketReplicationInput) String() string {
  10763. return awsutil.Prettify(s)
  10764. }
  10765. // GoString returns the string representation
  10766. func (s GetBucketReplicationInput) GoString() string {
  10767. return s.String()
  10768. }
  10769. // Validate inspects the fields of the type to determine if they are valid.
  10770. func (s *GetBucketReplicationInput) Validate() error {
  10771. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  10772. if s.Bucket == nil {
  10773. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10774. }
  10775. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10776. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10777. }
  10778. if invalidParams.Len() > 0 {
  10779. return invalidParams
  10780. }
  10781. return nil
  10782. }
  10783. // SetBucket sets the Bucket field's value.
  10784. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  10785. s.Bucket = &v
  10786. return s
  10787. }
  10788. func (s *GetBucketReplicationInput) getBucket() (v string) {
  10789. if s.Bucket == nil {
  10790. return v
  10791. }
  10792. return *s.Bucket
  10793. }
  10794. type GetBucketReplicationOutput struct {
  10795. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  10796. // A container for replication rules. You can add up to 1,000 rules. The maximum
  10797. // size of a replication configuration is 2 MB.
  10798. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  10799. }
  10800. // String returns the string representation
  10801. func (s GetBucketReplicationOutput) String() string {
  10802. return awsutil.Prettify(s)
  10803. }
  10804. // GoString returns the string representation
  10805. func (s GetBucketReplicationOutput) GoString() string {
  10806. return s.String()
  10807. }
  10808. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  10809. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  10810. s.ReplicationConfiguration = v
  10811. return s
  10812. }
  10813. type GetBucketRequestPaymentInput struct {
  10814. _ struct{} `type:"structure"`
  10815. // Bucket is a required field
  10816. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10817. }
  10818. // String returns the string representation
  10819. func (s GetBucketRequestPaymentInput) String() string {
  10820. return awsutil.Prettify(s)
  10821. }
  10822. // GoString returns the string representation
  10823. func (s GetBucketRequestPaymentInput) GoString() string {
  10824. return s.String()
  10825. }
  10826. // Validate inspects the fields of the type to determine if they are valid.
  10827. func (s *GetBucketRequestPaymentInput) Validate() error {
  10828. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  10829. if s.Bucket == nil {
  10830. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10831. }
  10832. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10833. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10834. }
  10835. if invalidParams.Len() > 0 {
  10836. return invalidParams
  10837. }
  10838. return nil
  10839. }
  10840. // SetBucket sets the Bucket field's value.
  10841. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  10842. s.Bucket = &v
  10843. return s
  10844. }
  10845. func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
  10846. if s.Bucket == nil {
  10847. return v
  10848. }
  10849. return *s.Bucket
  10850. }
  10851. type GetBucketRequestPaymentOutput struct {
  10852. _ struct{} `type:"structure"`
  10853. // Specifies who pays for the download and request fees.
  10854. Payer *string `type:"string" enum:"Payer"`
  10855. }
  10856. // String returns the string representation
  10857. func (s GetBucketRequestPaymentOutput) String() string {
  10858. return awsutil.Prettify(s)
  10859. }
  10860. // GoString returns the string representation
  10861. func (s GetBucketRequestPaymentOutput) GoString() string {
  10862. return s.String()
  10863. }
  10864. // SetPayer sets the Payer field's value.
  10865. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  10866. s.Payer = &v
  10867. return s
  10868. }
  10869. type GetBucketTaggingInput struct {
  10870. _ struct{} `type:"structure"`
  10871. // Bucket is a required field
  10872. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10873. }
  10874. // String returns the string representation
  10875. func (s GetBucketTaggingInput) String() string {
  10876. return awsutil.Prettify(s)
  10877. }
  10878. // GoString returns the string representation
  10879. func (s GetBucketTaggingInput) GoString() string {
  10880. return s.String()
  10881. }
  10882. // Validate inspects the fields of the type to determine if they are valid.
  10883. func (s *GetBucketTaggingInput) Validate() error {
  10884. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  10885. if s.Bucket == nil {
  10886. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10887. }
  10888. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10889. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10890. }
  10891. if invalidParams.Len() > 0 {
  10892. return invalidParams
  10893. }
  10894. return nil
  10895. }
  10896. // SetBucket sets the Bucket field's value.
  10897. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  10898. s.Bucket = &v
  10899. return s
  10900. }
  10901. func (s *GetBucketTaggingInput) getBucket() (v string) {
  10902. if s.Bucket == nil {
  10903. return v
  10904. }
  10905. return *s.Bucket
  10906. }
  10907. type GetBucketTaggingOutput struct {
  10908. _ struct{} `type:"structure"`
  10909. // TagSet is a required field
  10910. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  10911. }
  10912. // String returns the string representation
  10913. func (s GetBucketTaggingOutput) String() string {
  10914. return awsutil.Prettify(s)
  10915. }
  10916. // GoString returns the string representation
  10917. func (s GetBucketTaggingOutput) GoString() string {
  10918. return s.String()
  10919. }
  10920. // SetTagSet sets the TagSet field's value.
  10921. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  10922. s.TagSet = v
  10923. return s
  10924. }
  10925. type GetBucketVersioningInput struct {
  10926. _ struct{} `type:"structure"`
  10927. // Bucket is a required field
  10928. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10929. }
  10930. // String returns the string representation
  10931. func (s GetBucketVersioningInput) String() string {
  10932. return awsutil.Prettify(s)
  10933. }
  10934. // GoString returns the string representation
  10935. func (s GetBucketVersioningInput) GoString() string {
  10936. return s.String()
  10937. }
  10938. // Validate inspects the fields of the type to determine if they are valid.
  10939. func (s *GetBucketVersioningInput) Validate() error {
  10940. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  10941. if s.Bucket == nil {
  10942. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10943. }
  10944. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10945. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10946. }
  10947. if invalidParams.Len() > 0 {
  10948. return invalidParams
  10949. }
  10950. return nil
  10951. }
  10952. // SetBucket sets the Bucket field's value.
  10953. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  10954. s.Bucket = &v
  10955. return s
  10956. }
  10957. func (s *GetBucketVersioningInput) getBucket() (v string) {
  10958. if s.Bucket == nil {
  10959. return v
  10960. }
  10961. return *s.Bucket
  10962. }
  10963. type GetBucketVersioningOutput struct {
  10964. _ struct{} `type:"structure"`
  10965. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  10966. // This element is only returned if the bucket has been configured with MFA
  10967. // delete. If the bucket has never been so configured, this element is not returned.
  10968. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  10969. // The versioning state of the bucket.
  10970. Status *string `type:"string" enum:"BucketVersioningStatus"`
  10971. }
  10972. // String returns the string representation
  10973. func (s GetBucketVersioningOutput) String() string {
  10974. return awsutil.Prettify(s)
  10975. }
  10976. // GoString returns the string representation
  10977. func (s GetBucketVersioningOutput) GoString() string {
  10978. return s.String()
  10979. }
  10980. // SetMFADelete sets the MFADelete field's value.
  10981. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  10982. s.MFADelete = &v
  10983. return s
  10984. }
  10985. // SetStatus sets the Status field's value.
  10986. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  10987. s.Status = &v
  10988. return s
  10989. }
  10990. type GetBucketWebsiteInput struct {
  10991. _ struct{} `type:"structure"`
  10992. // Bucket is a required field
  10993. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10994. }
  10995. // String returns the string representation
  10996. func (s GetBucketWebsiteInput) String() string {
  10997. return awsutil.Prettify(s)
  10998. }
  10999. // GoString returns the string representation
  11000. func (s GetBucketWebsiteInput) GoString() string {
  11001. return s.String()
  11002. }
  11003. // Validate inspects the fields of the type to determine if they are valid.
  11004. func (s *GetBucketWebsiteInput) Validate() error {
  11005. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  11006. if s.Bucket == nil {
  11007. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11008. }
  11009. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11010. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11011. }
  11012. if invalidParams.Len() > 0 {
  11013. return invalidParams
  11014. }
  11015. return nil
  11016. }
  11017. // SetBucket sets the Bucket field's value.
  11018. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  11019. s.Bucket = &v
  11020. return s
  11021. }
  11022. func (s *GetBucketWebsiteInput) getBucket() (v string) {
  11023. if s.Bucket == nil {
  11024. return v
  11025. }
  11026. return *s.Bucket
  11027. }
  11028. type GetBucketWebsiteOutput struct {
  11029. _ struct{} `type:"structure"`
  11030. ErrorDocument *ErrorDocument `type:"structure"`
  11031. IndexDocument *IndexDocument `type:"structure"`
  11032. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  11033. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  11034. }
  11035. // String returns the string representation
  11036. func (s GetBucketWebsiteOutput) String() string {
  11037. return awsutil.Prettify(s)
  11038. }
  11039. // GoString returns the string representation
  11040. func (s GetBucketWebsiteOutput) GoString() string {
  11041. return s.String()
  11042. }
  11043. // SetErrorDocument sets the ErrorDocument field's value.
  11044. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  11045. s.ErrorDocument = v
  11046. return s
  11047. }
  11048. // SetIndexDocument sets the IndexDocument field's value.
  11049. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  11050. s.IndexDocument = v
  11051. return s
  11052. }
  11053. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  11054. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  11055. s.RedirectAllRequestsTo = v
  11056. return s
  11057. }
  11058. // SetRoutingRules sets the RoutingRules field's value.
  11059. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  11060. s.RoutingRules = v
  11061. return s
  11062. }
  11063. type GetObjectAclInput struct {
  11064. _ struct{} `type:"structure"`
  11065. // Bucket is a required field
  11066. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11067. // Key is a required field
  11068. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11069. // Confirms that the requester knows that she or he will be charged for the
  11070. // request. Bucket owners need not specify this parameter in their requests.
  11071. // Documentation on downloading objects from requester pays buckets can be found
  11072. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11073. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11074. // VersionId used to reference a specific version of the object.
  11075. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11076. }
  11077. // String returns the string representation
  11078. func (s GetObjectAclInput) String() string {
  11079. return awsutil.Prettify(s)
  11080. }
  11081. // GoString returns the string representation
  11082. func (s GetObjectAclInput) GoString() string {
  11083. return s.String()
  11084. }
  11085. // Validate inspects the fields of the type to determine if they are valid.
  11086. func (s *GetObjectAclInput) Validate() error {
  11087. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  11088. if s.Bucket == nil {
  11089. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11090. }
  11091. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11092. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11093. }
  11094. if s.Key == nil {
  11095. invalidParams.Add(request.NewErrParamRequired("Key"))
  11096. }
  11097. if s.Key != nil && len(*s.Key) < 1 {
  11098. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11099. }
  11100. if invalidParams.Len() > 0 {
  11101. return invalidParams
  11102. }
  11103. return nil
  11104. }
  11105. // SetBucket sets the Bucket field's value.
  11106. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  11107. s.Bucket = &v
  11108. return s
  11109. }
  11110. func (s *GetObjectAclInput) getBucket() (v string) {
  11111. if s.Bucket == nil {
  11112. return v
  11113. }
  11114. return *s.Bucket
  11115. }
  11116. // SetKey sets the Key field's value.
  11117. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  11118. s.Key = &v
  11119. return s
  11120. }
  11121. // SetRequestPayer sets the RequestPayer field's value.
  11122. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  11123. s.RequestPayer = &v
  11124. return s
  11125. }
  11126. // SetVersionId sets the VersionId field's value.
  11127. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  11128. s.VersionId = &v
  11129. return s
  11130. }
  11131. type GetObjectAclOutput struct {
  11132. _ struct{} `type:"structure"`
  11133. // A list of grants.
  11134. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  11135. Owner *Owner `type:"structure"`
  11136. // If present, indicates that the requester was successfully charged for the
  11137. // request.
  11138. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11139. }
  11140. // String returns the string representation
  11141. func (s GetObjectAclOutput) String() string {
  11142. return awsutil.Prettify(s)
  11143. }
  11144. // GoString returns the string representation
  11145. func (s GetObjectAclOutput) GoString() string {
  11146. return s.String()
  11147. }
  11148. // SetGrants sets the Grants field's value.
  11149. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  11150. s.Grants = v
  11151. return s
  11152. }
  11153. // SetOwner sets the Owner field's value.
  11154. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  11155. s.Owner = v
  11156. return s
  11157. }
  11158. // SetRequestCharged sets the RequestCharged field's value.
  11159. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  11160. s.RequestCharged = &v
  11161. return s
  11162. }
  11163. type GetObjectInput struct {
  11164. _ struct{} `type:"structure"`
  11165. // Bucket is a required field
  11166. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11167. // Return the object only if its entity tag (ETag) is the same as the one specified,
  11168. // otherwise return a 412 (precondition failed).
  11169. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  11170. // Return the object only if it has been modified since the specified time,
  11171. // otherwise return a 304 (not modified).
  11172. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  11173. // Return the object only if its entity tag (ETag) is different from the one
  11174. // specified, otherwise return a 304 (not modified).
  11175. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  11176. // Return the object only if it has not been modified since the specified time,
  11177. // otherwise return a 412 (precondition failed).
  11178. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  11179. // Key is a required field
  11180. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11181. // Part number of the object being read. This is a positive integer between
  11182. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  11183. // Useful for downloading just a part of an object.
  11184. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  11185. // Downloads the specified range bytes of an object. For more information about
  11186. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  11187. Range *string `location:"header" locationName:"Range" type:"string"`
  11188. // Confirms that the requester knows that she or he will be charged for the
  11189. // request. Bucket owners need not specify this parameter in their requests.
  11190. // Documentation on downloading objects from requester pays buckets can be found
  11191. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11192. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11193. // Sets the Cache-Control header of the response.
  11194. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  11195. // Sets the Content-Disposition header of the response
  11196. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  11197. // Sets the Content-Encoding header of the response.
  11198. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  11199. // Sets the Content-Language header of the response.
  11200. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  11201. // Sets the Content-Type header of the response.
  11202. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  11203. // Sets the Expires header of the response.
  11204. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"`
  11205. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  11206. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11207. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  11208. // data. This value is used to store the object and then it is discarded; Amazon
  11209. // does not store the encryption key. The key must be appropriate for use with
  11210. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  11211. // header.
  11212. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  11213. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  11214. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  11215. // key was transmitted without error.
  11216. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11217. // VersionId used to reference a specific version of the object.
  11218. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11219. }
  11220. // String returns the string representation
  11221. func (s GetObjectInput) String() string {
  11222. return awsutil.Prettify(s)
  11223. }
  11224. // GoString returns the string representation
  11225. func (s GetObjectInput) GoString() string {
  11226. return s.String()
  11227. }
  11228. // Validate inspects the fields of the type to determine if they are valid.
  11229. func (s *GetObjectInput) Validate() error {
  11230. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  11231. if s.Bucket == nil {
  11232. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11233. }
  11234. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11235. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11236. }
  11237. if s.Key == nil {
  11238. invalidParams.Add(request.NewErrParamRequired("Key"))
  11239. }
  11240. if s.Key != nil && len(*s.Key) < 1 {
  11241. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11242. }
  11243. if invalidParams.Len() > 0 {
  11244. return invalidParams
  11245. }
  11246. return nil
  11247. }
  11248. // SetBucket sets the Bucket field's value.
  11249. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  11250. s.Bucket = &v
  11251. return s
  11252. }
  11253. func (s *GetObjectInput) getBucket() (v string) {
  11254. if s.Bucket == nil {
  11255. return v
  11256. }
  11257. return *s.Bucket
  11258. }
  11259. // SetIfMatch sets the IfMatch field's value.
  11260. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  11261. s.IfMatch = &v
  11262. return s
  11263. }
  11264. // SetIfModifiedSince sets the IfModifiedSince field's value.
  11265. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  11266. s.IfModifiedSince = &v
  11267. return s
  11268. }
  11269. // SetIfNoneMatch sets the IfNoneMatch field's value.
  11270. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  11271. s.IfNoneMatch = &v
  11272. return s
  11273. }
  11274. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  11275. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  11276. s.IfUnmodifiedSince = &v
  11277. return s
  11278. }
  11279. // SetKey sets the Key field's value.
  11280. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  11281. s.Key = &v
  11282. return s
  11283. }
  11284. // SetPartNumber sets the PartNumber field's value.
  11285. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  11286. s.PartNumber = &v
  11287. return s
  11288. }
  11289. // SetRange sets the Range field's value.
  11290. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  11291. s.Range = &v
  11292. return s
  11293. }
  11294. // SetRequestPayer sets the RequestPayer field's value.
  11295. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  11296. s.RequestPayer = &v
  11297. return s
  11298. }
  11299. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  11300. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  11301. s.ResponseCacheControl = &v
  11302. return s
  11303. }
  11304. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  11305. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  11306. s.ResponseContentDisposition = &v
  11307. return s
  11308. }
  11309. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  11310. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  11311. s.ResponseContentEncoding = &v
  11312. return s
  11313. }
  11314. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  11315. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  11316. s.ResponseContentLanguage = &v
  11317. return s
  11318. }
  11319. // SetResponseContentType sets the ResponseContentType field's value.
  11320. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  11321. s.ResponseContentType = &v
  11322. return s
  11323. }
  11324. // SetResponseExpires sets the ResponseExpires field's value.
  11325. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  11326. s.ResponseExpires = &v
  11327. return s
  11328. }
  11329. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11330. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  11331. s.SSECustomerAlgorithm = &v
  11332. return s
  11333. }
  11334. // SetSSECustomerKey sets the SSECustomerKey field's value.
  11335. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  11336. s.SSECustomerKey = &v
  11337. return s
  11338. }
  11339. func (s *GetObjectInput) getSSECustomerKey() (v string) {
  11340. if s.SSECustomerKey == nil {
  11341. return v
  11342. }
  11343. return *s.SSECustomerKey
  11344. }
  11345. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11346. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  11347. s.SSECustomerKeyMD5 = &v
  11348. return s
  11349. }
  11350. // SetVersionId sets the VersionId field's value.
  11351. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  11352. s.VersionId = &v
  11353. return s
  11354. }
  11355. type GetObjectLegalHoldInput struct {
  11356. _ struct{} `type:"structure"`
  11357. // The bucket containing the object whose Legal Hold status you want to retrieve.
  11358. //
  11359. // Bucket is a required field
  11360. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11361. // The key name for the object whose Legal Hold status you want to retrieve.
  11362. //
  11363. // Key is a required field
  11364. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11365. // Confirms that the requester knows that she or he will be charged for the
  11366. // request. Bucket owners need not specify this parameter in their requests.
  11367. // Documentation on downloading objects from requester pays buckets can be found
  11368. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11369. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11370. // The version ID of the object whose Legal Hold status you want to retrieve.
  11371. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11372. }
  11373. // String returns the string representation
  11374. func (s GetObjectLegalHoldInput) String() string {
  11375. return awsutil.Prettify(s)
  11376. }
  11377. // GoString returns the string representation
  11378. func (s GetObjectLegalHoldInput) GoString() string {
  11379. return s.String()
  11380. }
  11381. // Validate inspects the fields of the type to determine if they are valid.
  11382. func (s *GetObjectLegalHoldInput) Validate() error {
  11383. invalidParams := request.ErrInvalidParams{Context: "GetObjectLegalHoldInput"}
  11384. if s.Bucket == nil {
  11385. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11386. }
  11387. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11388. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11389. }
  11390. if s.Key == nil {
  11391. invalidParams.Add(request.NewErrParamRequired("Key"))
  11392. }
  11393. if s.Key != nil && len(*s.Key) < 1 {
  11394. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11395. }
  11396. if invalidParams.Len() > 0 {
  11397. return invalidParams
  11398. }
  11399. return nil
  11400. }
  11401. // SetBucket sets the Bucket field's value.
  11402. func (s *GetObjectLegalHoldInput) SetBucket(v string) *GetObjectLegalHoldInput {
  11403. s.Bucket = &v
  11404. return s
  11405. }
  11406. func (s *GetObjectLegalHoldInput) getBucket() (v string) {
  11407. if s.Bucket == nil {
  11408. return v
  11409. }
  11410. return *s.Bucket
  11411. }
  11412. // SetKey sets the Key field's value.
  11413. func (s *GetObjectLegalHoldInput) SetKey(v string) *GetObjectLegalHoldInput {
  11414. s.Key = &v
  11415. return s
  11416. }
  11417. // SetRequestPayer sets the RequestPayer field's value.
  11418. func (s *GetObjectLegalHoldInput) SetRequestPayer(v string) *GetObjectLegalHoldInput {
  11419. s.RequestPayer = &v
  11420. return s
  11421. }
  11422. // SetVersionId sets the VersionId field's value.
  11423. func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInput {
  11424. s.VersionId = &v
  11425. return s
  11426. }
  11427. type GetObjectLegalHoldOutput struct {
  11428. _ struct{} `type:"structure" payload:"LegalHold"`
  11429. // The current Legal Hold status for the specified object.
  11430. LegalHold *ObjectLockLegalHold `type:"structure"`
  11431. }
  11432. // String returns the string representation
  11433. func (s GetObjectLegalHoldOutput) String() string {
  11434. return awsutil.Prettify(s)
  11435. }
  11436. // GoString returns the string representation
  11437. func (s GetObjectLegalHoldOutput) GoString() string {
  11438. return s.String()
  11439. }
  11440. // SetLegalHold sets the LegalHold field's value.
  11441. func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObjectLegalHoldOutput {
  11442. s.LegalHold = v
  11443. return s
  11444. }
  11445. type GetObjectLockConfigurationInput struct {
  11446. _ struct{} `type:"structure"`
  11447. // The bucket whose Object Lock configuration you want to retrieve.
  11448. //
  11449. // Bucket is a required field
  11450. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11451. }
  11452. // String returns the string representation
  11453. func (s GetObjectLockConfigurationInput) String() string {
  11454. return awsutil.Prettify(s)
  11455. }
  11456. // GoString returns the string representation
  11457. func (s GetObjectLockConfigurationInput) GoString() string {
  11458. return s.String()
  11459. }
  11460. // Validate inspects the fields of the type to determine if they are valid.
  11461. func (s *GetObjectLockConfigurationInput) Validate() error {
  11462. invalidParams := request.ErrInvalidParams{Context: "GetObjectLockConfigurationInput"}
  11463. if s.Bucket == nil {
  11464. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11465. }
  11466. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11467. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11468. }
  11469. if invalidParams.Len() > 0 {
  11470. return invalidParams
  11471. }
  11472. return nil
  11473. }
  11474. // SetBucket sets the Bucket field's value.
  11475. func (s *GetObjectLockConfigurationInput) SetBucket(v string) *GetObjectLockConfigurationInput {
  11476. s.Bucket = &v
  11477. return s
  11478. }
  11479. func (s *GetObjectLockConfigurationInput) getBucket() (v string) {
  11480. if s.Bucket == nil {
  11481. return v
  11482. }
  11483. return *s.Bucket
  11484. }
  11485. type GetObjectLockConfigurationOutput struct {
  11486. _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
  11487. // The specified bucket's Object Lock configuration.
  11488. ObjectLockConfiguration *ObjectLockConfiguration `type:"structure"`
  11489. }
  11490. // String returns the string representation
  11491. func (s GetObjectLockConfigurationOutput) String() string {
  11492. return awsutil.Prettify(s)
  11493. }
  11494. // GoString returns the string representation
  11495. func (s GetObjectLockConfigurationOutput) GoString() string {
  11496. return s.String()
  11497. }
  11498. // SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
  11499. func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *GetObjectLockConfigurationOutput {
  11500. s.ObjectLockConfiguration = v
  11501. return s
  11502. }
  11503. type GetObjectOutput struct {
  11504. _ struct{} `type:"structure" payload:"Body"`
  11505. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  11506. // Object data.
  11507. Body io.ReadCloser `type:"blob"`
  11508. // Specifies caching behavior along the request/reply chain.
  11509. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  11510. // Specifies presentational information for the object.
  11511. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  11512. // Specifies what content encodings have been applied to the object and thus
  11513. // what decoding mechanisms must be applied to obtain the media-type referenced
  11514. // by the Content-Type header field.
  11515. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  11516. // The language the content is in.
  11517. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  11518. // Size of the body in bytes.
  11519. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  11520. // The portion of the object returned in the response.
  11521. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  11522. // A standard MIME type describing the format of the object data.
  11523. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  11524. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  11525. // Marker. If false, this response header does not appear in the response.
  11526. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  11527. // An ETag is an opaque identifier assigned by a web server to a specific version
  11528. // of a resource found at a URL
  11529. ETag *string `location:"header" locationName:"ETag" type:"string"`
  11530. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  11531. // includes this header. It includes the expiry-date and rule-id key value pairs
  11532. // providing object expiration information. The value of the rule-id is URL
  11533. // encoded.
  11534. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  11535. // The date and time at which the object is no longer cacheable.
  11536. Expires *string `location:"header" locationName:"Expires" type:"string"`
  11537. // Last modified date of the object
  11538. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  11539. // A map of metadata to store with the object in S3.
  11540. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  11541. // This is set to the number of metadata entries not returned in x-amz-meta
  11542. // headers. This can happen if you create metadata using an API like SOAP that
  11543. // supports more flexible metadata than the REST API. For example, using SOAP,
  11544. // you can create metadata whose values are not legal HTTP headers.
  11545. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  11546. // Indicates whether this object has an active legal hold. This field is only
  11547. // returned if you have permission to view an object's legal hold status.
  11548. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  11549. // The Object Lock mode currently in place for this object.
  11550. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  11551. // The date and time when this object's Object Lock will expire.
  11552. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  11553. // The count of parts this object has.
  11554. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  11555. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  11556. // If present, indicates that the requester was successfully charged for the
  11557. // request.
  11558. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11559. // Provides information about object restoration operation and expiration time
  11560. // of the restored object copy.
  11561. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  11562. // If server-side encryption with a customer-provided encryption key was requested,
  11563. // the response will include this header confirming the encryption algorithm
  11564. // used.
  11565. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11566. // If server-side encryption with a customer-provided encryption key was requested,
  11567. // the response will include this header to provide round trip message integrity
  11568. // verification of the customer-provided encryption key.
  11569. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11570. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  11571. // encryption key that was used for the object.
  11572. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  11573. // The Server-side encryption algorithm used when storing this object in S3
  11574. // (e.g., AES256, aws:kms).
  11575. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  11576. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  11577. // The number of tags, if any, on the object.
  11578. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  11579. // Version of the object.
  11580. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  11581. // If the bucket is configured as a website, redirects requests for this object
  11582. // to another object in the same bucket or to an external URL. Amazon S3 stores
  11583. // the value of this header in the object metadata.
  11584. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  11585. }
  11586. // String returns the string representation
  11587. func (s GetObjectOutput) String() string {
  11588. return awsutil.Prettify(s)
  11589. }
  11590. // GoString returns the string representation
  11591. func (s GetObjectOutput) GoString() string {
  11592. return s.String()
  11593. }
  11594. // SetAcceptRanges sets the AcceptRanges field's value.
  11595. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  11596. s.AcceptRanges = &v
  11597. return s
  11598. }
  11599. // SetBody sets the Body field's value.
  11600. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  11601. s.Body = v
  11602. return s
  11603. }
  11604. // SetCacheControl sets the CacheControl field's value.
  11605. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  11606. s.CacheControl = &v
  11607. return s
  11608. }
  11609. // SetContentDisposition sets the ContentDisposition field's value.
  11610. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  11611. s.ContentDisposition = &v
  11612. return s
  11613. }
  11614. // SetContentEncoding sets the ContentEncoding field's value.
  11615. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  11616. s.ContentEncoding = &v
  11617. return s
  11618. }
  11619. // SetContentLanguage sets the ContentLanguage field's value.
  11620. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  11621. s.ContentLanguage = &v
  11622. return s
  11623. }
  11624. // SetContentLength sets the ContentLength field's value.
  11625. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  11626. s.ContentLength = &v
  11627. return s
  11628. }
  11629. // SetContentRange sets the ContentRange field's value.
  11630. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  11631. s.ContentRange = &v
  11632. return s
  11633. }
  11634. // SetContentType sets the ContentType field's value.
  11635. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  11636. s.ContentType = &v
  11637. return s
  11638. }
  11639. // SetDeleteMarker sets the DeleteMarker field's value.
  11640. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  11641. s.DeleteMarker = &v
  11642. return s
  11643. }
  11644. // SetETag sets the ETag field's value.
  11645. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  11646. s.ETag = &v
  11647. return s
  11648. }
  11649. // SetExpiration sets the Expiration field's value.
  11650. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  11651. s.Expiration = &v
  11652. return s
  11653. }
  11654. // SetExpires sets the Expires field's value.
  11655. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  11656. s.Expires = &v
  11657. return s
  11658. }
  11659. // SetLastModified sets the LastModified field's value.
  11660. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  11661. s.LastModified = &v
  11662. return s
  11663. }
  11664. // SetMetadata sets the Metadata field's value.
  11665. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  11666. s.Metadata = v
  11667. return s
  11668. }
  11669. // SetMissingMeta sets the MissingMeta field's value.
  11670. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  11671. s.MissingMeta = &v
  11672. return s
  11673. }
  11674. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  11675. func (s *GetObjectOutput) SetObjectLockLegalHoldStatus(v string) *GetObjectOutput {
  11676. s.ObjectLockLegalHoldStatus = &v
  11677. return s
  11678. }
  11679. // SetObjectLockMode sets the ObjectLockMode field's value.
  11680. func (s *GetObjectOutput) SetObjectLockMode(v string) *GetObjectOutput {
  11681. s.ObjectLockMode = &v
  11682. return s
  11683. }
  11684. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  11685. func (s *GetObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *GetObjectOutput {
  11686. s.ObjectLockRetainUntilDate = &v
  11687. return s
  11688. }
  11689. // SetPartsCount sets the PartsCount field's value.
  11690. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  11691. s.PartsCount = &v
  11692. return s
  11693. }
  11694. // SetReplicationStatus sets the ReplicationStatus field's value.
  11695. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  11696. s.ReplicationStatus = &v
  11697. return s
  11698. }
  11699. // SetRequestCharged sets the RequestCharged field's value.
  11700. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  11701. s.RequestCharged = &v
  11702. return s
  11703. }
  11704. // SetRestore sets the Restore field's value.
  11705. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  11706. s.Restore = &v
  11707. return s
  11708. }
  11709. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11710. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  11711. s.SSECustomerAlgorithm = &v
  11712. return s
  11713. }
  11714. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11715. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  11716. s.SSECustomerKeyMD5 = &v
  11717. return s
  11718. }
  11719. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  11720. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  11721. s.SSEKMSKeyId = &v
  11722. return s
  11723. }
  11724. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  11725. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  11726. s.ServerSideEncryption = &v
  11727. return s
  11728. }
  11729. // SetStorageClass sets the StorageClass field's value.
  11730. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  11731. s.StorageClass = &v
  11732. return s
  11733. }
  11734. // SetTagCount sets the TagCount field's value.
  11735. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  11736. s.TagCount = &v
  11737. return s
  11738. }
  11739. // SetVersionId sets the VersionId field's value.
  11740. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  11741. s.VersionId = &v
  11742. return s
  11743. }
  11744. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  11745. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  11746. s.WebsiteRedirectLocation = &v
  11747. return s
  11748. }
  11749. type GetObjectRetentionInput struct {
  11750. _ struct{} `type:"structure"`
  11751. // The bucket containing the object whose retention settings you want to retrieve.
  11752. //
  11753. // Bucket is a required field
  11754. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11755. // The key name for the object whose retention settings you want to retrieve.
  11756. //
  11757. // Key is a required field
  11758. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11759. // Confirms that the requester knows that she or he will be charged for the
  11760. // request. Bucket owners need not specify this parameter in their requests.
  11761. // Documentation on downloading objects from requester pays buckets can be found
  11762. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11763. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11764. // The version ID for the object whose retention settings you want to retrieve.
  11765. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11766. }
  11767. // String returns the string representation
  11768. func (s GetObjectRetentionInput) String() string {
  11769. return awsutil.Prettify(s)
  11770. }
  11771. // GoString returns the string representation
  11772. func (s GetObjectRetentionInput) GoString() string {
  11773. return s.String()
  11774. }
  11775. // Validate inspects the fields of the type to determine if they are valid.
  11776. func (s *GetObjectRetentionInput) Validate() error {
  11777. invalidParams := request.ErrInvalidParams{Context: "GetObjectRetentionInput"}
  11778. if s.Bucket == nil {
  11779. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11780. }
  11781. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11782. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11783. }
  11784. if s.Key == nil {
  11785. invalidParams.Add(request.NewErrParamRequired("Key"))
  11786. }
  11787. if s.Key != nil && len(*s.Key) < 1 {
  11788. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11789. }
  11790. if invalidParams.Len() > 0 {
  11791. return invalidParams
  11792. }
  11793. return nil
  11794. }
  11795. // SetBucket sets the Bucket field's value.
  11796. func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput {
  11797. s.Bucket = &v
  11798. return s
  11799. }
  11800. func (s *GetObjectRetentionInput) getBucket() (v string) {
  11801. if s.Bucket == nil {
  11802. return v
  11803. }
  11804. return *s.Bucket
  11805. }
  11806. // SetKey sets the Key field's value.
  11807. func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput {
  11808. s.Key = &v
  11809. return s
  11810. }
  11811. // SetRequestPayer sets the RequestPayer field's value.
  11812. func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionInput {
  11813. s.RequestPayer = &v
  11814. return s
  11815. }
  11816. // SetVersionId sets the VersionId field's value.
  11817. func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput {
  11818. s.VersionId = &v
  11819. return s
  11820. }
  11821. type GetObjectRetentionOutput struct {
  11822. _ struct{} `type:"structure" payload:"Retention"`
  11823. // The container element for an object's retention settings.
  11824. Retention *ObjectLockRetention `type:"structure"`
  11825. }
  11826. // String returns the string representation
  11827. func (s GetObjectRetentionOutput) String() string {
  11828. return awsutil.Prettify(s)
  11829. }
  11830. // GoString returns the string representation
  11831. func (s GetObjectRetentionOutput) GoString() string {
  11832. return s.String()
  11833. }
  11834. // SetRetention sets the Retention field's value.
  11835. func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput {
  11836. s.Retention = v
  11837. return s
  11838. }
  11839. type GetObjectTaggingInput struct {
  11840. _ struct{} `type:"structure"`
  11841. // Bucket is a required field
  11842. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11843. // Key is a required field
  11844. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11845. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11846. }
  11847. // String returns the string representation
  11848. func (s GetObjectTaggingInput) String() string {
  11849. return awsutil.Prettify(s)
  11850. }
  11851. // GoString returns the string representation
  11852. func (s GetObjectTaggingInput) GoString() string {
  11853. return s.String()
  11854. }
  11855. // Validate inspects the fields of the type to determine if they are valid.
  11856. func (s *GetObjectTaggingInput) Validate() error {
  11857. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  11858. if s.Bucket == nil {
  11859. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11860. }
  11861. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11862. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11863. }
  11864. if s.Key == nil {
  11865. invalidParams.Add(request.NewErrParamRequired("Key"))
  11866. }
  11867. if s.Key != nil && len(*s.Key) < 1 {
  11868. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11869. }
  11870. if invalidParams.Len() > 0 {
  11871. return invalidParams
  11872. }
  11873. return nil
  11874. }
  11875. // SetBucket sets the Bucket field's value.
  11876. func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  11877. s.Bucket = &v
  11878. return s
  11879. }
  11880. func (s *GetObjectTaggingInput) getBucket() (v string) {
  11881. if s.Bucket == nil {
  11882. return v
  11883. }
  11884. return *s.Bucket
  11885. }
  11886. // SetKey sets the Key field's value.
  11887. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  11888. s.Key = &v
  11889. return s
  11890. }
  11891. // SetVersionId sets the VersionId field's value.
  11892. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  11893. s.VersionId = &v
  11894. return s
  11895. }
  11896. type GetObjectTaggingOutput struct {
  11897. _ struct{} `type:"structure"`
  11898. // TagSet is a required field
  11899. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  11900. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  11901. }
  11902. // String returns the string representation
  11903. func (s GetObjectTaggingOutput) String() string {
  11904. return awsutil.Prettify(s)
  11905. }
  11906. // GoString returns the string representation
  11907. func (s GetObjectTaggingOutput) GoString() string {
  11908. return s.String()
  11909. }
  11910. // SetTagSet sets the TagSet field's value.
  11911. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  11912. s.TagSet = v
  11913. return s
  11914. }
  11915. // SetVersionId sets the VersionId field's value.
  11916. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  11917. s.VersionId = &v
  11918. return s
  11919. }
  11920. type GetObjectTorrentInput struct {
  11921. _ struct{} `type:"structure"`
  11922. // Bucket is a required field
  11923. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11924. // Key is a required field
  11925. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11926. // Confirms that the requester knows that she or he will be charged for the
  11927. // request. Bucket owners need not specify this parameter in their requests.
  11928. // Documentation on downloading objects from requester pays buckets can be found
  11929. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11930. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11931. }
  11932. // String returns the string representation
  11933. func (s GetObjectTorrentInput) String() string {
  11934. return awsutil.Prettify(s)
  11935. }
  11936. // GoString returns the string representation
  11937. func (s GetObjectTorrentInput) GoString() string {
  11938. return s.String()
  11939. }
  11940. // Validate inspects the fields of the type to determine if they are valid.
  11941. func (s *GetObjectTorrentInput) Validate() error {
  11942. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  11943. if s.Bucket == nil {
  11944. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11945. }
  11946. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11947. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11948. }
  11949. if s.Key == nil {
  11950. invalidParams.Add(request.NewErrParamRequired("Key"))
  11951. }
  11952. if s.Key != nil && len(*s.Key) < 1 {
  11953. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11954. }
  11955. if invalidParams.Len() > 0 {
  11956. return invalidParams
  11957. }
  11958. return nil
  11959. }
  11960. // SetBucket sets the Bucket field's value.
  11961. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  11962. s.Bucket = &v
  11963. return s
  11964. }
  11965. func (s *GetObjectTorrentInput) getBucket() (v string) {
  11966. if s.Bucket == nil {
  11967. return v
  11968. }
  11969. return *s.Bucket
  11970. }
  11971. // SetKey sets the Key field's value.
  11972. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  11973. s.Key = &v
  11974. return s
  11975. }
  11976. // SetRequestPayer sets the RequestPayer field's value.
  11977. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  11978. s.RequestPayer = &v
  11979. return s
  11980. }
  11981. type GetObjectTorrentOutput struct {
  11982. _ struct{} `type:"structure" payload:"Body"`
  11983. Body io.ReadCloser `type:"blob"`
  11984. // If present, indicates that the requester was successfully charged for the
  11985. // request.
  11986. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11987. }
  11988. // String returns the string representation
  11989. func (s GetObjectTorrentOutput) String() string {
  11990. return awsutil.Prettify(s)
  11991. }
  11992. // GoString returns the string representation
  11993. func (s GetObjectTorrentOutput) GoString() string {
  11994. return s.String()
  11995. }
  11996. // SetBody sets the Body field's value.
  11997. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  11998. s.Body = v
  11999. return s
  12000. }
  12001. // SetRequestCharged sets the RequestCharged field's value.
  12002. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  12003. s.RequestCharged = &v
  12004. return s
  12005. }
  12006. type GetPublicAccessBlockInput struct {
  12007. _ struct{} `type:"structure"`
  12008. // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
  12009. // want to retrieve.
  12010. //
  12011. // Bucket is a required field
  12012. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12013. }
  12014. // String returns the string representation
  12015. func (s GetPublicAccessBlockInput) String() string {
  12016. return awsutil.Prettify(s)
  12017. }
  12018. // GoString returns the string representation
  12019. func (s GetPublicAccessBlockInput) GoString() string {
  12020. return s.String()
  12021. }
  12022. // Validate inspects the fields of the type to determine if they are valid.
  12023. func (s *GetPublicAccessBlockInput) Validate() error {
  12024. invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"}
  12025. if s.Bucket == nil {
  12026. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12027. }
  12028. if s.Bucket != nil && len(*s.Bucket) < 1 {
  12029. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  12030. }
  12031. if invalidParams.Len() > 0 {
  12032. return invalidParams
  12033. }
  12034. return nil
  12035. }
  12036. // SetBucket sets the Bucket field's value.
  12037. func (s *GetPublicAccessBlockInput) SetBucket(v string) *GetPublicAccessBlockInput {
  12038. s.Bucket = &v
  12039. return s
  12040. }
  12041. func (s *GetPublicAccessBlockInput) getBucket() (v string) {
  12042. if s.Bucket == nil {
  12043. return v
  12044. }
  12045. return *s.Bucket
  12046. }
  12047. type GetPublicAccessBlockOutput struct {
  12048. _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
  12049. // The PublicAccessBlock configuration currently in effect for this Amazon S3
  12050. // bucket.
  12051. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"`
  12052. }
  12053. // String returns the string representation
  12054. func (s GetPublicAccessBlockOutput) String() string {
  12055. return awsutil.Prettify(s)
  12056. }
  12057. // GoString returns the string representation
  12058. func (s GetPublicAccessBlockOutput) GoString() string {
  12059. return s.String()
  12060. }
  12061. // SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
  12062. func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput {
  12063. s.PublicAccessBlockConfiguration = v
  12064. return s
  12065. }
  12066. type GlacierJobParameters struct {
  12067. _ struct{} `type:"structure"`
  12068. // Glacier retrieval tier at which the restore will be processed.
  12069. //
  12070. // Tier is a required field
  12071. Tier *string `type:"string" required:"true" enum:"Tier"`
  12072. }
  12073. // String returns the string representation
  12074. func (s GlacierJobParameters) String() string {
  12075. return awsutil.Prettify(s)
  12076. }
  12077. // GoString returns the string representation
  12078. func (s GlacierJobParameters) GoString() string {
  12079. return s.String()
  12080. }
  12081. // Validate inspects the fields of the type to determine if they are valid.
  12082. func (s *GlacierJobParameters) Validate() error {
  12083. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  12084. if s.Tier == nil {
  12085. invalidParams.Add(request.NewErrParamRequired("Tier"))
  12086. }
  12087. if invalidParams.Len() > 0 {
  12088. return invalidParams
  12089. }
  12090. return nil
  12091. }
  12092. // SetTier sets the Tier field's value.
  12093. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  12094. s.Tier = &v
  12095. return s
  12096. }
  12097. type Grant struct {
  12098. _ struct{} `type:"structure"`
  12099. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  12100. // Specifies the permission given to the grantee.
  12101. Permission *string `type:"string" enum:"Permission"`
  12102. }
  12103. // String returns the string representation
  12104. func (s Grant) String() string {
  12105. return awsutil.Prettify(s)
  12106. }
  12107. // GoString returns the string representation
  12108. func (s Grant) GoString() string {
  12109. return s.String()
  12110. }
  12111. // Validate inspects the fields of the type to determine if they are valid.
  12112. func (s *Grant) Validate() error {
  12113. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  12114. if s.Grantee != nil {
  12115. if err := s.Grantee.Validate(); err != nil {
  12116. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  12117. }
  12118. }
  12119. if invalidParams.Len() > 0 {
  12120. return invalidParams
  12121. }
  12122. return nil
  12123. }
  12124. // SetGrantee sets the Grantee field's value.
  12125. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  12126. s.Grantee = v
  12127. return s
  12128. }
  12129. // SetPermission sets the Permission field's value.
  12130. func (s *Grant) SetPermission(v string) *Grant {
  12131. s.Permission = &v
  12132. return s
  12133. }
  12134. type Grantee struct {
  12135. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  12136. // Screen name of the grantee.
  12137. DisplayName *string `type:"string"`
  12138. // Email address of the grantee.
  12139. EmailAddress *string `type:"string"`
  12140. // The canonical user ID of the grantee.
  12141. ID *string `type:"string"`
  12142. // Type of grantee
  12143. //
  12144. // Type is a required field
  12145. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  12146. // URI of the grantee group.
  12147. URI *string `type:"string"`
  12148. }
  12149. // String returns the string representation
  12150. func (s Grantee) String() string {
  12151. return awsutil.Prettify(s)
  12152. }
  12153. // GoString returns the string representation
  12154. func (s Grantee) GoString() string {
  12155. return s.String()
  12156. }
  12157. // Validate inspects the fields of the type to determine if they are valid.
  12158. func (s *Grantee) Validate() error {
  12159. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  12160. if s.Type == nil {
  12161. invalidParams.Add(request.NewErrParamRequired("Type"))
  12162. }
  12163. if invalidParams.Len() > 0 {
  12164. return invalidParams
  12165. }
  12166. return nil
  12167. }
  12168. // SetDisplayName sets the DisplayName field's value.
  12169. func (s *Grantee) SetDisplayName(v string) *Grantee {
  12170. s.DisplayName = &v
  12171. return s
  12172. }
  12173. // SetEmailAddress sets the EmailAddress field's value.
  12174. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  12175. s.EmailAddress = &v
  12176. return s
  12177. }
  12178. // SetID sets the ID field's value.
  12179. func (s *Grantee) SetID(v string) *Grantee {
  12180. s.ID = &v
  12181. return s
  12182. }
  12183. // SetType sets the Type field's value.
  12184. func (s *Grantee) SetType(v string) *Grantee {
  12185. s.Type = &v
  12186. return s
  12187. }
  12188. // SetURI sets the URI field's value.
  12189. func (s *Grantee) SetURI(v string) *Grantee {
  12190. s.URI = &v
  12191. return s
  12192. }
  12193. type HeadBucketInput struct {
  12194. _ struct{} `type:"structure"`
  12195. // Bucket is a required field
  12196. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12197. }
  12198. // String returns the string representation
  12199. func (s HeadBucketInput) String() string {
  12200. return awsutil.Prettify(s)
  12201. }
  12202. // GoString returns the string representation
  12203. func (s HeadBucketInput) GoString() string {
  12204. return s.String()
  12205. }
  12206. // Validate inspects the fields of the type to determine if they are valid.
  12207. func (s *HeadBucketInput) Validate() error {
  12208. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  12209. if s.Bucket == nil {
  12210. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12211. }
  12212. if s.Bucket != nil && len(*s.Bucket) < 1 {
  12213. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  12214. }
  12215. if invalidParams.Len() > 0 {
  12216. return invalidParams
  12217. }
  12218. return nil
  12219. }
  12220. // SetBucket sets the Bucket field's value.
  12221. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  12222. s.Bucket = &v
  12223. return s
  12224. }
  12225. func (s *HeadBucketInput) getBucket() (v string) {
  12226. if s.Bucket == nil {
  12227. return v
  12228. }
  12229. return *s.Bucket
  12230. }
  12231. type HeadBucketOutput struct {
  12232. _ struct{} `type:"structure"`
  12233. }
  12234. // String returns the string representation
  12235. func (s HeadBucketOutput) String() string {
  12236. return awsutil.Prettify(s)
  12237. }
  12238. // GoString returns the string representation
  12239. func (s HeadBucketOutput) GoString() string {
  12240. return s.String()
  12241. }
  12242. type HeadObjectInput struct {
  12243. _ struct{} `type:"structure"`
  12244. // Bucket is a required field
  12245. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12246. // Return the object only if its entity tag (ETag) is the same as the one specified,
  12247. // otherwise return a 412 (precondition failed).
  12248. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  12249. // Return the object only if it has been modified since the specified time,
  12250. // otherwise return a 304 (not modified).
  12251. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  12252. // Return the object only if its entity tag (ETag) is different from the one
  12253. // specified, otherwise return a 304 (not modified).
  12254. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  12255. // Return the object only if it has not been modified since the specified time,
  12256. // otherwise return a 412 (precondition failed).
  12257. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  12258. // Key is a required field
  12259. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  12260. // Part number of the object being read. This is a positive integer between
  12261. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  12262. // Useful querying about the size of the part and the number of parts in this
  12263. // object.
  12264. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  12265. // Downloads the specified range bytes of an object. For more information about
  12266. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  12267. Range *string `location:"header" locationName:"Range" type:"string"`
  12268. // Confirms that the requester knows that she or he will be charged for the
  12269. // request. Bucket owners need not specify this parameter in their requests.
  12270. // Documentation on downloading objects from requester pays buckets can be found
  12271. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  12272. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12273. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  12274. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  12275. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  12276. // data. This value is used to store the object and then it is discarded; Amazon
  12277. // does not store the encryption key. The key must be appropriate for use with
  12278. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  12279. // header.
  12280. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  12281. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  12282. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  12283. // key was transmitted without error.
  12284. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  12285. // VersionId used to reference a specific version of the object.
  12286. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  12287. }
  12288. // String returns the string representation
  12289. func (s HeadObjectInput) String() string {
  12290. return awsutil.Prettify(s)
  12291. }
  12292. // GoString returns the string representation
  12293. func (s HeadObjectInput) GoString() string {
  12294. return s.String()
  12295. }
  12296. // Validate inspects the fields of the type to determine if they are valid.
  12297. func (s *HeadObjectInput) Validate() error {
  12298. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  12299. if s.Bucket == nil {
  12300. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12301. }
  12302. if s.Bucket != nil && len(*s.Bucket) < 1 {
  12303. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  12304. }
  12305. if s.Key == nil {
  12306. invalidParams.Add(request.NewErrParamRequired("Key"))
  12307. }
  12308. if s.Key != nil && len(*s.Key) < 1 {
  12309. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12310. }
  12311. if invalidParams.Len() > 0 {
  12312. return invalidParams
  12313. }
  12314. return nil
  12315. }
  12316. // SetBucket sets the Bucket field's value.
  12317. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  12318. s.Bucket = &v
  12319. return s
  12320. }
  12321. func (s *HeadObjectInput) getBucket() (v string) {
  12322. if s.Bucket == nil {
  12323. return v
  12324. }
  12325. return *s.Bucket
  12326. }
  12327. // SetIfMatch sets the IfMatch field's value.
  12328. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  12329. s.IfMatch = &v
  12330. return s
  12331. }
  12332. // SetIfModifiedSince sets the IfModifiedSince field's value.
  12333. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  12334. s.IfModifiedSince = &v
  12335. return s
  12336. }
  12337. // SetIfNoneMatch sets the IfNoneMatch field's value.
  12338. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  12339. s.IfNoneMatch = &v
  12340. return s
  12341. }
  12342. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  12343. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  12344. s.IfUnmodifiedSince = &v
  12345. return s
  12346. }
  12347. // SetKey sets the Key field's value.
  12348. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  12349. s.Key = &v
  12350. return s
  12351. }
  12352. // SetPartNumber sets the PartNumber field's value.
  12353. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  12354. s.PartNumber = &v
  12355. return s
  12356. }
  12357. // SetRange sets the Range field's value.
  12358. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  12359. s.Range = &v
  12360. return s
  12361. }
  12362. // SetRequestPayer sets the RequestPayer field's value.
  12363. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  12364. s.RequestPayer = &v
  12365. return s
  12366. }
  12367. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  12368. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  12369. s.SSECustomerAlgorithm = &v
  12370. return s
  12371. }
  12372. // SetSSECustomerKey sets the SSECustomerKey field's value.
  12373. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  12374. s.SSECustomerKey = &v
  12375. return s
  12376. }
  12377. func (s *HeadObjectInput) getSSECustomerKey() (v string) {
  12378. if s.SSECustomerKey == nil {
  12379. return v
  12380. }
  12381. return *s.SSECustomerKey
  12382. }
  12383. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  12384. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  12385. s.SSECustomerKeyMD5 = &v
  12386. return s
  12387. }
  12388. // SetVersionId sets the VersionId field's value.
  12389. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  12390. s.VersionId = &v
  12391. return s
  12392. }
  12393. type HeadObjectOutput struct {
  12394. _ struct{} `type:"structure"`
  12395. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  12396. // Specifies caching behavior along the request/reply chain.
  12397. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  12398. // Specifies presentational information for the object.
  12399. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  12400. // Specifies what content encodings have been applied to the object and thus
  12401. // what decoding mechanisms must be applied to obtain the media-type referenced
  12402. // by the Content-Type header field.
  12403. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  12404. // The language the content is in.
  12405. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  12406. // Size of the body in bytes.
  12407. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  12408. // A standard MIME type describing the format of the object data.
  12409. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  12410. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  12411. // Marker. If false, this response header does not appear in the response.
  12412. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  12413. // An ETag is an opaque identifier assigned by a web server to a specific version
  12414. // of a resource found at a URL
  12415. ETag *string `location:"header" locationName:"ETag" type:"string"`
  12416. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  12417. // includes this header. It includes the expiry-date and rule-id key value pairs
  12418. // providing object expiration information. The value of the rule-id is URL
  12419. // encoded.
  12420. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  12421. // The date and time at which the object is no longer cacheable.
  12422. Expires *string `location:"header" locationName:"Expires" type:"string"`
  12423. // Last modified date of the object
  12424. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  12425. // A map of metadata to store with the object in S3.
  12426. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  12427. // This is set to the number of metadata entries not returned in x-amz-meta
  12428. // headers. This can happen if you create metadata using an API like SOAP that
  12429. // supports more flexible metadata than the REST API. For example, using SOAP,
  12430. // you can create metadata whose values are not legal HTTP headers.
  12431. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  12432. // The Legal Hold status for the specified object.
  12433. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  12434. // The Object Lock mode currently in place for this object.
  12435. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  12436. // The date and time when this object's Object Lock will expire.
  12437. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  12438. // The count of parts this object has.
  12439. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  12440. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  12441. // If present, indicates that the requester was successfully charged for the
  12442. // request.
  12443. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  12444. // Provides information about object restoration operation and expiration time
  12445. // of the restored object copy.
  12446. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  12447. // If server-side encryption with a customer-provided encryption key was requested,
  12448. // the response will include this header confirming the encryption algorithm
  12449. // used.
  12450. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  12451. // If server-side encryption with a customer-provided encryption key was requested,
  12452. // the response will include this header to provide round trip message integrity
  12453. // verification of the customer-provided encryption key.
  12454. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  12455. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  12456. // encryption key that was used for the object.
  12457. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  12458. // The Server-side encryption algorithm used when storing this object in S3
  12459. // (e.g., AES256, aws:kms).
  12460. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  12461. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  12462. // Version of the object.
  12463. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  12464. // If the bucket is configured as a website, redirects requests for this object
  12465. // to another object in the same bucket or to an external URL. Amazon S3 stores
  12466. // the value of this header in the object metadata.
  12467. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  12468. }
  12469. // String returns the string representation
  12470. func (s HeadObjectOutput) String() string {
  12471. return awsutil.Prettify(s)
  12472. }
  12473. // GoString returns the string representation
  12474. func (s HeadObjectOutput) GoString() string {
  12475. return s.String()
  12476. }
  12477. // SetAcceptRanges sets the AcceptRanges field's value.
  12478. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  12479. s.AcceptRanges = &v
  12480. return s
  12481. }
  12482. // SetCacheControl sets the CacheControl field's value.
  12483. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  12484. s.CacheControl = &v
  12485. return s
  12486. }
  12487. // SetContentDisposition sets the ContentDisposition field's value.
  12488. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  12489. s.ContentDisposition = &v
  12490. return s
  12491. }
  12492. // SetContentEncoding sets the ContentEncoding field's value.
  12493. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  12494. s.ContentEncoding = &v
  12495. return s
  12496. }
  12497. // SetContentLanguage sets the ContentLanguage field's value.
  12498. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  12499. s.ContentLanguage = &v
  12500. return s
  12501. }
  12502. // SetContentLength sets the ContentLength field's value.
  12503. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  12504. s.ContentLength = &v
  12505. return s
  12506. }
  12507. // SetContentType sets the ContentType field's value.
  12508. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  12509. s.ContentType = &v
  12510. return s
  12511. }
  12512. // SetDeleteMarker sets the DeleteMarker field's value.
  12513. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  12514. s.DeleteMarker = &v
  12515. return s
  12516. }
  12517. // SetETag sets the ETag field's value.
  12518. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  12519. s.ETag = &v
  12520. return s
  12521. }
  12522. // SetExpiration sets the Expiration field's value.
  12523. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  12524. s.Expiration = &v
  12525. return s
  12526. }
  12527. // SetExpires sets the Expires field's value.
  12528. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  12529. s.Expires = &v
  12530. return s
  12531. }
  12532. // SetLastModified sets the LastModified field's value.
  12533. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  12534. s.LastModified = &v
  12535. return s
  12536. }
  12537. // SetMetadata sets the Metadata field's value.
  12538. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  12539. s.Metadata = v
  12540. return s
  12541. }
  12542. // SetMissingMeta sets the MissingMeta field's value.
  12543. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  12544. s.MissingMeta = &v
  12545. return s
  12546. }
  12547. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  12548. func (s *HeadObjectOutput) SetObjectLockLegalHoldStatus(v string) *HeadObjectOutput {
  12549. s.ObjectLockLegalHoldStatus = &v
  12550. return s
  12551. }
  12552. // SetObjectLockMode sets the ObjectLockMode field's value.
  12553. func (s *HeadObjectOutput) SetObjectLockMode(v string) *HeadObjectOutput {
  12554. s.ObjectLockMode = &v
  12555. return s
  12556. }
  12557. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  12558. func (s *HeadObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *HeadObjectOutput {
  12559. s.ObjectLockRetainUntilDate = &v
  12560. return s
  12561. }
  12562. // SetPartsCount sets the PartsCount field's value.
  12563. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  12564. s.PartsCount = &v
  12565. return s
  12566. }
  12567. // SetReplicationStatus sets the ReplicationStatus field's value.
  12568. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  12569. s.ReplicationStatus = &v
  12570. return s
  12571. }
  12572. // SetRequestCharged sets the RequestCharged field's value.
  12573. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  12574. s.RequestCharged = &v
  12575. return s
  12576. }
  12577. // SetRestore sets the Restore field's value.
  12578. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  12579. s.Restore = &v
  12580. return s
  12581. }
  12582. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  12583. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  12584. s.SSECustomerAlgorithm = &v
  12585. return s
  12586. }
  12587. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  12588. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  12589. s.SSECustomerKeyMD5 = &v
  12590. return s
  12591. }
  12592. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  12593. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  12594. s.SSEKMSKeyId = &v
  12595. return s
  12596. }
  12597. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  12598. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  12599. s.ServerSideEncryption = &v
  12600. return s
  12601. }
  12602. // SetStorageClass sets the StorageClass field's value.
  12603. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  12604. s.StorageClass = &v
  12605. return s
  12606. }
  12607. // SetVersionId sets the VersionId field's value.
  12608. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  12609. s.VersionId = &v
  12610. return s
  12611. }
  12612. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  12613. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  12614. s.WebsiteRedirectLocation = &v
  12615. return s
  12616. }
  12617. type IndexDocument struct {
  12618. _ struct{} `type:"structure"`
  12619. // A suffix that is appended to a request that is for a directory on the website
  12620. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  12621. // the data that is returned will be for the object with the key name images/index.html)
  12622. // The suffix must not be empty and must not include a slash character.
  12623. //
  12624. // Suffix is a required field
  12625. Suffix *string `type:"string" required:"true"`
  12626. }
  12627. // String returns the string representation
  12628. func (s IndexDocument) String() string {
  12629. return awsutil.Prettify(s)
  12630. }
  12631. // GoString returns the string representation
  12632. func (s IndexDocument) GoString() string {
  12633. return s.String()
  12634. }
  12635. // Validate inspects the fields of the type to determine if they are valid.
  12636. func (s *IndexDocument) Validate() error {
  12637. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  12638. if s.Suffix == nil {
  12639. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  12640. }
  12641. if invalidParams.Len() > 0 {
  12642. return invalidParams
  12643. }
  12644. return nil
  12645. }
  12646. // SetSuffix sets the Suffix field's value.
  12647. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  12648. s.Suffix = &v
  12649. return s
  12650. }
  12651. type Initiator struct {
  12652. _ struct{} `type:"structure"`
  12653. // Name of the Principal.
  12654. DisplayName *string `type:"string"`
  12655. // If the principal is an AWS account, it provides the Canonical User ID. If
  12656. // the principal is an IAM User, it provides a user ARN value.
  12657. ID *string `type:"string"`
  12658. }
  12659. // String returns the string representation
  12660. func (s Initiator) String() string {
  12661. return awsutil.Prettify(s)
  12662. }
  12663. // GoString returns the string representation
  12664. func (s Initiator) GoString() string {
  12665. return s.String()
  12666. }
  12667. // SetDisplayName sets the DisplayName field's value.
  12668. func (s *Initiator) SetDisplayName(v string) *Initiator {
  12669. s.DisplayName = &v
  12670. return s
  12671. }
  12672. // SetID sets the ID field's value.
  12673. func (s *Initiator) SetID(v string) *Initiator {
  12674. s.ID = &v
  12675. return s
  12676. }
  12677. // Describes the serialization format of the object.
  12678. type InputSerialization struct {
  12679. _ struct{} `type:"structure"`
  12680. // Describes the serialization of a CSV-encoded object.
  12681. CSV *CSVInput `type:"structure"`
  12682. // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default
  12683. // Value: NONE.
  12684. CompressionType *string `type:"string" enum:"CompressionType"`
  12685. // Specifies JSON as object's input serialization format.
  12686. JSON *JSONInput `type:"structure"`
  12687. // Specifies Parquet as object's input serialization format.
  12688. Parquet *ParquetInput `type:"structure"`
  12689. }
  12690. // String returns the string representation
  12691. func (s InputSerialization) String() string {
  12692. return awsutil.Prettify(s)
  12693. }
  12694. // GoString returns the string representation
  12695. func (s InputSerialization) GoString() string {
  12696. return s.String()
  12697. }
  12698. // SetCSV sets the CSV field's value.
  12699. func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
  12700. s.CSV = v
  12701. return s
  12702. }
  12703. // SetCompressionType sets the CompressionType field's value.
  12704. func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
  12705. s.CompressionType = &v
  12706. return s
  12707. }
  12708. // SetJSON sets the JSON field's value.
  12709. func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
  12710. s.JSON = v
  12711. return s
  12712. }
  12713. // SetParquet sets the Parquet field's value.
  12714. func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
  12715. s.Parquet = v
  12716. return s
  12717. }
  12718. type InventoryConfiguration struct {
  12719. _ struct{} `type:"structure"`
  12720. // Contains information about where to publish the inventory results.
  12721. //
  12722. // Destination is a required field
  12723. Destination *InventoryDestination `type:"structure" required:"true"`
  12724. // Specifies an inventory filter. The inventory only includes objects that meet
  12725. // the filter's criteria.
  12726. Filter *InventoryFilter `type:"structure"`
  12727. // The ID used to identify the inventory configuration.
  12728. //
  12729. // Id is a required field
  12730. Id *string `type:"string" required:"true"`
  12731. // Specifies which object version(s) to included in the inventory results.
  12732. //
  12733. // IncludedObjectVersions is a required field
  12734. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  12735. // Specifies whether the inventory is enabled or disabled.
  12736. //
  12737. // IsEnabled is a required field
  12738. IsEnabled *bool `type:"boolean" required:"true"`
  12739. // Contains the optional fields that are included in the inventory results.
  12740. OptionalFields []*string `locationNameList:"Field" type:"list"`
  12741. // Specifies the schedule for generating inventory results.
  12742. //
  12743. // Schedule is a required field
  12744. Schedule *InventorySchedule `type:"structure" required:"true"`
  12745. }
  12746. // String returns the string representation
  12747. func (s InventoryConfiguration) String() string {
  12748. return awsutil.Prettify(s)
  12749. }
  12750. // GoString returns the string representation
  12751. func (s InventoryConfiguration) GoString() string {
  12752. return s.String()
  12753. }
  12754. // Validate inspects the fields of the type to determine if they are valid.
  12755. func (s *InventoryConfiguration) Validate() error {
  12756. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  12757. if s.Destination == nil {
  12758. invalidParams.Add(request.NewErrParamRequired("Destination"))
  12759. }
  12760. if s.Id == nil {
  12761. invalidParams.Add(request.NewErrParamRequired("Id"))
  12762. }
  12763. if s.IncludedObjectVersions == nil {
  12764. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  12765. }
  12766. if s.IsEnabled == nil {
  12767. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  12768. }
  12769. if s.Schedule == nil {
  12770. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  12771. }
  12772. if s.Destination != nil {
  12773. if err := s.Destination.Validate(); err != nil {
  12774. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  12775. }
  12776. }
  12777. if s.Filter != nil {
  12778. if err := s.Filter.Validate(); err != nil {
  12779. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  12780. }
  12781. }
  12782. if s.Schedule != nil {
  12783. if err := s.Schedule.Validate(); err != nil {
  12784. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  12785. }
  12786. }
  12787. if invalidParams.Len() > 0 {
  12788. return invalidParams
  12789. }
  12790. return nil
  12791. }
  12792. // SetDestination sets the Destination field's value.
  12793. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  12794. s.Destination = v
  12795. return s
  12796. }
  12797. // SetFilter sets the Filter field's value.
  12798. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  12799. s.Filter = v
  12800. return s
  12801. }
  12802. // SetId sets the Id field's value.
  12803. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  12804. s.Id = &v
  12805. return s
  12806. }
  12807. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  12808. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  12809. s.IncludedObjectVersions = &v
  12810. return s
  12811. }
  12812. // SetIsEnabled sets the IsEnabled field's value.
  12813. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  12814. s.IsEnabled = &v
  12815. return s
  12816. }
  12817. // SetOptionalFields sets the OptionalFields field's value.
  12818. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  12819. s.OptionalFields = v
  12820. return s
  12821. }
  12822. // SetSchedule sets the Schedule field's value.
  12823. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  12824. s.Schedule = v
  12825. return s
  12826. }
  12827. type InventoryDestination struct {
  12828. _ struct{} `type:"structure"`
  12829. // Contains the bucket name, file format, bucket owner (optional), and prefix
  12830. // (optional) where inventory results are published.
  12831. //
  12832. // S3BucketDestination is a required field
  12833. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  12834. }
  12835. // String returns the string representation
  12836. func (s InventoryDestination) String() string {
  12837. return awsutil.Prettify(s)
  12838. }
  12839. // GoString returns the string representation
  12840. func (s InventoryDestination) GoString() string {
  12841. return s.String()
  12842. }
  12843. // Validate inspects the fields of the type to determine if they are valid.
  12844. func (s *InventoryDestination) Validate() error {
  12845. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  12846. if s.S3BucketDestination == nil {
  12847. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  12848. }
  12849. if s.S3BucketDestination != nil {
  12850. if err := s.S3BucketDestination.Validate(); err != nil {
  12851. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  12852. }
  12853. }
  12854. if invalidParams.Len() > 0 {
  12855. return invalidParams
  12856. }
  12857. return nil
  12858. }
  12859. // SetS3BucketDestination sets the S3BucketDestination field's value.
  12860. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  12861. s.S3BucketDestination = v
  12862. return s
  12863. }
  12864. // Contains the type of server-side encryption used to encrypt the inventory
  12865. // results.
  12866. type InventoryEncryption struct {
  12867. _ struct{} `type:"structure"`
  12868. // Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
  12869. SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
  12870. // Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
  12871. SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
  12872. }
  12873. // String returns the string representation
  12874. func (s InventoryEncryption) String() string {
  12875. return awsutil.Prettify(s)
  12876. }
  12877. // GoString returns the string representation
  12878. func (s InventoryEncryption) GoString() string {
  12879. return s.String()
  12880. }
  12881. // Validate inspects the fields of the type to determine if they are valid.
  12882. func (s *InventoryEncryption) Validate() error {
  12883. invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
  12884. if s.SSEKMS != nil {
  12885. if err := s.SSEKMS.Validate(); err != nil {
  12886. invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
  12887. }
  12888. }
  12889. if invalidParams.Len() > 0 {
  12890. return invalidParams
  12891. }
  12892. return nil
  12893. }
  12894. // SetSSEKMS sets the SSEKMS field's value.
  12895. func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
  12896. s.SSEKMS = v
  12897. return s
  12898. }
  12899. // SetSSES3 sets the SSES3 field's value.
  12900. func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
  12901. s.SSES3 = v
  12902. return s
  12903. }
  12904. type InventoryFilter struct {
  12905. _ struct{} `type:"structure"`
  12906. // The prefix that an object must have to be included in the inventory results.
  12907. //
  12908. // Prefix is a required field
  12909. Prefix *string `type:"string" required:"true"`
  12910. }
  12911. // String returns the string representation
  12912. func (s InventoryFilter) String() string {
  12913. return awsutil.Prettify(s)
  12914. }
  12915. // GoString returns the string representation
  12916. func (s InventoryFilter) GoString() string {
  12917. return s.String()
  12918. }
  12919. // Validate inspects the fields of the type to determine if they are valid.
  12920. func (s *InventoryFilter) Validate() error {
  12921. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  12922. if s.Prefix == nil {
  12923. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  12924. }
  12925. if invalidParams.Len() > 0 {
  12926. return invalidParams
  12927. }
  12928. return nil
  12929. }
  12930. // SetPrefix sets the Prefix field's value.
  12931. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  12932. s.Prefix = &v
  12933. return s
  12934. }
  12935. type InventoryS3BucketDestination struct {
  12936. _ struct{} `type:"structure"`
  12937. // The ID of the account that owns the destination bucket.
  12938. AccountId *string `type:"string"`
  12939. // The Amazon resource name (ARN) of the bucket where inventory results will
  12940. // be published.
  12941. //
  12942. // Bucket is a required field
  12943. Bucket *string `type:"string" required:"true"`
  12944. // Contains the type of server-side encryption used to encrypt the inventory
  12945. // results.
  12946. Encryption *InventoryEncryption `type:"structure"`
  12947. // Specifies the output format of the inventory results.
  12948. //
  12949. // Format is a required field
  12950. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  12951. // The prefix that is prepended to all inventory results.
  12952. Prefix *string `type:"string"`
  12953. }
  12954. // String returns the string representation
  12955. func (s InventoryS3BucketDestination) String() string {
  12956. return awsutil.Prettify(s)
  12957. }
  12958. // GoString returns the string representation
  12959. func (s InventoryS3BucketDestination) GoString() string {
  12960. return s.String()
  12961. }
  12962. // Validate inspects the fields of the type to determine if they are valid.
  12963. func (s *InventoryS3BucketDestination) Validate() error {
  12964. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  12965. if s.Bucket == nil {
  12966. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12967. }
  12968. if s.Format == nil {
  12969. invalidParams.Add(request.NewErrParamRequired("Format"))
  12970. }
  12971. if s.Encryption != nil {
  12972. if err := s.Encryption.Validate(); err != nil {
  12973. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  12974. }
  12975. }
  12976. if invalidParams.Len() > 0 {
  12977. return invalidParams
  12978. }
  12979. return nil
  12980. }
  12981. // SetAccountId sets the AccountId field's value.
  12982. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  12983. s.AccountId = &v
  12984. return s
  12985. }
  12986. // SetBucket sets the Bucket field's value.
  12987. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  12988. s.Bucket = &v
  12989. return s
  12990. }
  12991. func (s *InventoryS3BucketDestination) getBucket() (v string) {
  12992. if s.Bucket == nil {
  12993. return v
  12994. }
  12995. return *s.Bucket
  12996. }
  12997. // SetEncryption sets the Encryption field's value.
  12998. func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
  12999. s.Encryption = v
  13000. return s
  13001. }
  13002. // SetFormat sets the Format field's value.
  13003. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  13004. s.Format = &v
  13005. return s
  13006. }
  13007. // SetPrefix sets the Prefix field's value.
  13008. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  13009. s.Prefix = &v
  13010. return s
  13011. }
  13012. type InventorySchedule struct {
  13013. _ struct{} `type:"structure"`
  13014. // Specifies how frequently inventory results are produced.
  13015. //
  13016. // Frequency is a required field
  13017. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  13018. }
  13019. // String returns the string representation
  13020. func (s InventorySchedule) String() string {
  13021. return awsutil.Prettify(s)
  13022. }
  13023. // GoString returns the string representation
  13024. func (s InventorySchedule) GoString() string {
  13025. return s.String()
  13026. }
  13027. // Validate inspects the fields of the type to determine if they are valid.
  13028. func (s *InventorySchedule) Validate() error {
  13029. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  13030. if s.Frequency == nil {
  13031. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  13032. }
  13033. if invalidParams.Len() > 0 {
  13034. return invalidParams
  13035. }
  13036. return nil
  13037. }
  13038. // SetFrequency sets the Frequency field's value.
  13039. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  13040. s.Frequency = &v
  13041. return s
  13042. }
  13043. type JSONInput struct {
  13044. _ struct{} `type:"structure"`
  13045. // The type of JSON. Valid values: Document, Lines.
  13046. Type *string `type:"string" enum:"JSONType"`
  13047. }
  13048. // String returns the string representation
  13049. func (s JSONInput) String() string {
  13050. return awsutil.Prettify(s)
  13051. }
  13052. // GoString returns the string representation
  13053. func (s JSONInput) GoString() string {
  13054. return s.String()
  13055. }
  13056. // SetType sets the Type field's value.
  13057. func (s *JSONInput) SetType(v string) *JSONInput {
  13058. s.Type = &v
  13059. return s
  13060. }
  13061. type JSONOutput struct {
  13062. _ struct{} `type:"structure"`
  13063. // The value used to separate individual records in the output.
  13064. RecordDelimiter *string `type:"string"`
  13065. }
  13066. // String returns the string representation
  13067. func (s JSONOutput) String() string {
  13068. return awsutil.Prettify(s)
  13069. }
  13070. // GoString returns the string representation
  13071. func (s JSONOutput) GoString() string {
  13072. return s.String()
  13073. }
  13074. // SetRecordDelimiter sets the RecordDelimiter field's value.
  13075. func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
  13076. s.RecordDelimiter = &v
  13077. return s
  13078. }
  13079. // A container for object key name prefix and suffix filtering rules.
  13080. type KeyFilter struct {
  13081. _ struct{} `type:"structure"`
  13082. // A list of containers for the key value pair that defines the criteria for
  13083. // the filter rule.
  13084. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  13085. }
  13086. // String returns the string representation
  13087. func (s KeyFilter) String() string {
  13088. return awsutil.Prettify(s)
  13089. }
  13090. // GoString returns the string representation
  13091. func (s KeyFilter) GoString() string {
  13092. return s.String()
  13093. }
  13094. // SetFilterRules sets the FilterRules field's value.
  13095. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  13096. s.FilterRules = v
  13097. return s
  13098. }
  13099. // A container for specifying the configuration for AWS Lambda notifications.
  13100. type LambdaFunctionConfiguration struct {
  13101. _ struct{} `type:"structure"`
  13102. // Events is a required field
  13103. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  13104. // A container for object key name filtering rules. For information about key
  13105. // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  13106. // in the Amazon Simple Storage Service Developer Guide.
  13107. Filter *NotificationConfigurationFilter `type:"structure"`
  13108. // An optional unique identifier for configurations in a notification configuration.
  13109. // If you don't provide one, Amazon S3 will assign an ID.
  13110. Id *string `type:"string"`
  13111. // The Amazon Resource Name (ARN) of the Lambda cloud function that Amazon S3
  13112. // can invoke when it detects events of the specified type.
  13113. //
  13114. // LambdaFunctionArn is a required field
  13115. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  13116. }
  13117. // String returns the string representation
  13118. func (s LambdaFunctionConfiguration) String() string {
  13119. return awsutil.Prettify(s)
  13120. }
  13121. // GoString returns the string representation
  13122. func (s LambdaFunctionConfiguration) GoString() string {
  13123. return s.String()
  13124. }
  13125. // Validate inspects the fields of the type to determine if they are valid.
  13126. func (s *LambdaFunctionConfiguration) Validate() error {
  13127. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  13128. if s.Events == nil {
  13129. invalidParams.Add(request.NewErrParamRequired("Events"))
  13130. }
  13131. if s.LambdaFunctionArn == nil {
  13132. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  13133. }
  13134. if invalidParams.Len() > 0 {
  13135. return invalidParams
  13136. }
  13137. return nil
  13138. }
  13139. // SetEvents sets the Events field's value.
  13140. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  13141. s.Events = v
  13142. return s
  13143. }
  13144. // SetFilter sets the Filter field's value.
  13145. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  13146. s.Filter = v
  13147. return s
  13148. }
  13149. // SetId sets the Id field's value.
  13150. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  13151. s.Id = &v
  13152. return s
  13153. }
  13154. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  13155. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  13156. s.LambdaFunctionArn = &v
  13157. return s
  13158. }
  13159. type LifecycleConfiguration struct {
  13160. _ struct{} `type:"structure"`
  13161. // Rules is a required field
  13162. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  13163. }
  13164. // String returns the string representation
  13165. func (s LifecycleConfiguration) String() string {
  13166. return awsutil.Prettify(s)
  13167. }
  13168. // GoString returns the string representation
  13169. func (s LifecycleConfiguration) GoString() string {
  13170. return s.String()
  13171. }
  13172. // Validate inspects the fields of the type to determine if they are valid.
  13173. func (s *LifecycleConfiguration) Validate() error {
  13174. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  13175. if s.Rules == nil {
  13176. invalidParams.Add(request.NewErrParamRequired("Rules"))
  13177. }
  13178. if s.Rules != nil {
  13179. for i, v := range s.Rules {
  13180. if v == nil {
  13181. continue
  13182. }
  13183. if err := v.Validate(); err != nil {
  13184. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  13185. }
  13186. }
  13187. }
  13188. if invalidParams.Len() > 0 {
  13189. return invalidParams
  13190. }
  13191. return nil
  13192. }
  13193. // SetRules sets the Rules field's value.
  13194. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  13195. s.Rules = v
  13196. return s
  13197. }
  13198. type LifecycleExpiration struct {
  13199. _ struct{} `type:"structure"`
  13200. // Indicates at what date the object is to be moved or deleted. Should be in
  13201. // GMT ISO 8601 Format.
  13202. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13203. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  13204. // The value must be a non-zero positive integer.
  13205. Days *int64 `type:"integer"`
  13206. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  13207. // versions. If set to true, the delete marker will be expired; if set to false
  13208. // the policy takes no action. This cannot be specified with Days or Date in
  13209. // a Lifecycle Expiration Policy.
  13210. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  13211. }
  13212. // String returns the string representation
  13213. func (s LifecycleExpiration) String() string {
  13214. return awsutil.Prettify(s)
  13215. }
  13216. // GoString returns the string representation
  13217. func (s LifecycleExpiration) GoString() string {
  13218. return s.String()
  13219. }
  13220. // SetDate sets the Date field's value.
  13221. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  13222. s.Date = &v
  13223. return s
  13224. }
  13225. // SetDays sets the Days field's value.
  13226. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  13227. s.Days = &v
  13228. return s
  13229. }
  13230. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  13231. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  13232. s.ExpiredObjectDeleteMarker = &v
  13233. return s
  13234. }
  13235. type LifecycleRule struct {
  13236. _ struct{} `type:"structure"`
  13237. // Specifies the days since the initiation of an Incomplete Multipart Upload
  13238. // that Lifecycle will wait before permanently removing all parts of the upload.
  13239. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  13240. Expiration *LifecycleExpiration `type:"structure"`
  13241. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  13242. // A Filter must have exactly one of Prefix, Tag, or And specified.
  13243. Filter *LifecycleRuleFilter `type:"structure"`
  13244. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  13245. ID *string `type:"string"`
  13246. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  13247. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  13248. // configuration action on a bucket that has versioning enabled (or suspended)
  13249. // to request that Amazon S3 delete noncurrent object versions at a specific
  13250. // period in the object's lifetime.
  13251. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  13252. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  13253. // Prefix identifying one or more objects to which the rule applies. This is
  13254. // deprecated; use Filter instead.
  13255. //
  13256. // Deprecated: Prefix has been deprecated
  13257. Prefix *string `deprecated:"true" type:"string"`
  13258. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  13259. // is not currently being applied.
  13260. //
  13261. // Status is a required field
  13262. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  13263. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  13264. }
  13265. // String returns the string representation
  13266. func (s LifecycleRule) String() string {
  13267. return awsutil.Prettify(s)
  13268. }
  13269. // GoString returns the string representation
  13270. func (s LifecycleRule) GoString() string {
  13271. return s.String()
  13272. }
  13273. // Validate inspects the fields of the type to determine if they are valid.
  13274. func (s *LifecycleRule) Validate() error {
  13275. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  13276. if s.Status == nil {
  13277. invalidParams.Add(request.NewErrParamRequired("Status"))
  13278. }
  13279. if s.Filter != nil {
  13280. if err := s.Filter.Validate(); err != nil {
  13281. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  13282. }
  13283. }
  13284. if invalidParams.Len() > 0 {
  13285. return invalidParams
  13286. }
  13287. return nil
  13288. }
  13289. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  13290. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  13291. s.AbortIncompleteMultipartUpload = v
  13292. return s
  13293. }
  13294. // SetExpiration sets the Expiration field's value.
  13295. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  13296. s.Expiration = v
  13297. return s
  13298. }
  13299. // SetFilter sets the Filter field's value.
  13300. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  13301. s.Filter = v
  13302. return s
  13303. }
  13304. // SetID sets the ID field's value.
  13305. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  13306. s.ID = &v
  13307. return s
  13308. }
  13309. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  13310. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  13311. s.NoncurrentVersionExpiration = v
  13312. return s
  13313. }
  13314. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  13315. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  13316. s.NoncurrentVersionTransitions = v
  13317. return s
  13318. }
  13319. // SetPrefix sets the Prefix field's value.
  13320. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  13321. s.Prefix = &v
  13322. return s
  13323. }
  13324. // SetStatus sets the Status field's value.
  13325. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  13326. s.Status = &v
  13327. return s
  13328. }
  13329. // SetTransitions sets the Transitions field's value.
  13330. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  13331. s.Transitions = v
  13332. return s
  13333. }
  13334. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  13335. // more predicates. The Lifecycle Rule will apply to any object matching all
  13336. // of the predicates configured inside the And operator.
  13337. type LifecycleRuleAndOperator struct {
  13338. _ struct{} `type:"structure"`
  13339. Prefix *string `type:"string"`
  13340. // All of these tags must exist in the object's tag set in order for the rule
  13341. // to apply.
  13342. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  13343. }
  13344. // String returns the string representation
  13345. func (s LifecycleRuleAndOperator) String() string {
  13346. return awsutil.Prettify(s)
  13347. }
  13348. // GoString returns the string representation
  13349. func (s LifecycleRuleAndOperator) GoString() string {
  13350. return s.String()
  13351. }
  13352. // Validate inspects the fields of the type to determine if they are valid.
  13353. func (s *LifecycleRuleAndOperator) Validate() error {
  13354. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  13355. if s.Tags != nil {
  13356. for i, v := range s.Tags {
  13357. if v == nil {
  13358. continue
  13359. }
  13360. if err := v.Validate(); err != nil {
  13361. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  13362. }
  13363. }
  13364. }
  13365. if invalidParams.Len() > 0 {
  13366. return invalidParams
  13367. }
  13368. return nil
  13369. }
  13370. // SetPrefix sets the Prefix field's value.
  13371. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  13372. s.Prefix = &v
  13373. return s
  13374. }
  13375. // SetTags sets the Tags field's value.
  13376. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  13377. s.Tags = v
  13378. return s
  13379. }
  13380. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  13381. // A Filter must have exactly one of Prefix, Tag, or And specified.
  13382. type LifecycleRuleFilter struct {
  13383. _ struct{} `type:"structure"`
  13384. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  13385. // more predicates. The Lifecycle Rule will apply to any object matching all
  13386. // of the predicates configured inside the And operator.
  13387. And *LifecycleRuleAndOperator `type:"structure"`
  13388. // Prefix identifying one or more objects to which the rule applies.
  13389. Prefix *string `type:"string"`
  13390. // This tag must exist in the object's tag set in order for the rule to apply.
  13391. Tag *Tag `type:"structure"`
  13392. }
  13393. // String returns the string representation
  13394. func (s LifecycleRuleFilter) String() string {
  13395. return awsutil.Prettify(s)
  13396. }
  13397. // GoString returns the string representation
  13398. func (s LifecycleRuleFilter) GoString() string {
  13399. return s.String()
  13400. }
  13401. // Validate inspects the fields of the type to determine if they are valid.
  13402. func (s *LifecycleRuleFilter) Validate() error {
  13403. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  13404. if s.And != nil {
  13405. if err := s.And.Validate(); err != nil {
  13406. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  13407. }
  13408. }
  13409. if s.Tag != nil {
  13410. if err := s.Tag.Validate(); err != nil {
  13411. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  13412. }
  13413. }
  13414. if invalidParams.Len() > 0 {
  13415. return invalidParams
  13416. }
  13417. return nil
  13418. }
  13419. // SetAnd sets the And field's value.
  13420. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  13421. s.And = v
  13422. return s
  13423. }
  13424. // SetPrefix sets the Prefix field's value.
  13425. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  13426. s.Prefix = &v
  13427. return s
  13428. }
  13429. // SetTag sets the Tag field's value.
  13430. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  13431. s.Tag = v
  13432. return s
  13433. }
  13434. type ListBucketAnalyticsConfigurationsInput struct {
  13435. _ struct{} `type:"structure"`
  13436. // The name of the bucket from which analytics configurations are retrieved.
  13437. //
  13438. // Bucket is a required field
  13439. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13440. // The ContinuationToken that represents a placeholder from where this request
  13441. // should begin.
  13442. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13443. }
  13444. // String returns the string representation
  13445. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  13446. return awsutil.Prettify(s)
  13447. }
  13448. // GoString returns the string representation
  13449. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  13450. return s.String()
  13451. }
  13452. // Validate inspects the fields of the type to determine if they are valid.
  13453. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  13454. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  13455. if s.Bucket == nil {
  13456. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13457. }
  13458. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13459. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13460. }
  13461. if invalidParams.Len() > 0 {
  13462. return invalidParams
  13463. }
  13464. return nil
  13465. }
  13466. // SetBucket sets the Bucket field's value.
  13467. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  13468. s.Bucket = &v
  13469. return s
  13470. }
  13471. func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
  13472. if s.Bucket == nil {
  13473. return v
  13474. }
  13475. return *s.Bucket
  13476. }
  13477. // SetContinuationToken sets the ContinuationToken field's value.
  13478. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  13479. s.ContinuationToken = &v
  13480. return s
  13481. }
  13482. type ListBucketAnalyticsConfigurationsOutput struct {
  13483. _ struct{} `type:"structure"`
  13484. // The list of analytics configurations for a bucket.
  13485. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  13486. // The ContinuationToken that represents where this request began.
  13487. ContinuationToken *string `type:"string"`
  13488. // Indicates whether the returned list of analytics configurations is complete.
  13489. // A value of true indicates that the list is not complete and the NextContinuationToken
  13490. // will be provided for a subsequent request.
  13491. IsTruncated *bool `type:"boolean"`
  13492. // NextContinuationToken is sent when isTruncated is true, which indicates that
  13493. // there are more analytics configurations to list. The next request must include
  13494. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  13495. NextContinuationToken *string `type:"string"`
  13496. }
  13497. // String returns the string representation
  13498. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  13499. return awsutil.Prettify(s)
  13500. }
  13501. // GoString returns the string representation
  13502. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  13503. return s.String()
  13504. }
  13505. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  13506. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  13507. s.AnalyticsConfigurationList = v
  13508. return s
  13509. }
  13510. // SetContinuationToken sets the ContinuationToken field's value.
  13511. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  13512. s.ContinuationToken = &v
  13513. return s
  13514. }
  13515. // SetIsTruncated sets the IsTruncated field's value.
  13516. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  13517. s.IsTruncated = &v
  13518. return s
  13519. }
  13520. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13521. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  13522. s.NextContinuationToken = &v
  13523. return s
  13524. }
  13525. type ListBucketInventoryConfigurationsInput struct {
  13526. _ struct{} `type:"structure"`
  13527. // The name of the bucket containing the inventory configurations to retrieve.
  13528. //
  13529. // Bucket is a required field
  13530. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13531. // The marker used to continue an inventory configuration listing that has been
  13532. // truncated. Use the NextContinuationToken from a previously truncated list
  13533. // response to continue the listing. The continuation token is an opaque value
  13534. // that Amazon S3 understands.
  13535. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13536. }
  13537. // String returns the string representation
  13538. func (s ListBucketInventoryConfigurationsInput) String() string {
  13539. return awsutil.Prettify(s)
  13540. }
  13541. // GoString returns the string representation
  13542. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  13543. return s.String()
  13544. }
  13545. // Validate inspects the fields of the type to determine if they are valid.
  13546. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  13547. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  13548. if s.Bucket == nil {
  13549. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13550. }
  13551. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13552. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13553. }
  13554. if invalidParams.Len() > 0 {
  13555. return invalidParams
  13556. }
  13557. return nil
  13558. }
  13559. // SetBucket sets the Bucket field's value.
  13560. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  13561. s.Bucket = &v
  13562. return s
  13563. }
  13564. func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
  13565. if s.Bucket == nil {
  13566. return v
  13567. }
  13568. return *s.Bucket
  13569. }
  13570. // SetContinuationToken sets the ContinuationToken field's value.
  13571. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  13572. s.ContinuationToken = &v
  13573. return s
  13574. }
  13575. type ListBucketInventoryConfigurationsOutput struct {
  13576. _ struct{} `type:"structure"`
  13577. // If sent in the request, the marker that is used as a starting point for this
  13578. // inventory configuration list response.
  13579. ContinuationToken *string `type:"string"`
  13580. // The list of inventory configurations for a bucket.
  13581. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  13582. // Indicates whether the returned list of inventory configurations is truncated
  13583. // in this response. A value of true indicates that the list is truncated.
  13584. IsTruncated *bool `type:"boolean"`
  13585. // The marker used to continue this inventory configuration listing. Use the
  13586. // NextContinuationToken from this response to continue the listing in a subsequent
  13587. // request. The continuation token is an opaque value that Amazon S3 understands.
  13588. NextContinuationToken *string `type:"string"`
  13589. }
  13590. // String returns the string representation
  13591. func (s ListBucketInventoryConfigurationsOutput) String() string {
  13592. return awsutil.Prettify(s)
  13593. }
  13594. // GoString returns the string representation
  13595. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  13596. return s.String()
  13597. }
  13598. // SetContinuationToken sets the ContinuationToken field's value.
  13599. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  13600. s.ContinuationToken = &v
  13601. return s
  13602. }
  13603. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  13604. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  13605. s.InventoryConfigurationList = v
  13606. return s
  13607. }
  13608. // SetIsTruncated sets the IsTruncated field's value.
  13609. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  13610. s.IsTruncated = &v
  13611. return s
  13612. }
  13613. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13614. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  13615. s.NextContinuationToken = &v
  13616. return s
  13617. }
  13618. type ListBucketMetricsConfigurationsInput struct {
  13619. _ struct{} `type:"structure"`
  13620. // The name of the bucket containing the metrics configurations to retrieve.
  13621. //
  13622. // Bucket is a required field
  13623. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13624. // The marker that is used to continue a metrics configuration listing that
  13625. // has been truncated. Use the NextContinuationToken from a previously truncated
  13626. // list response to continue the listing. The continuation token is an opaque
  13627. // value that Amazon S3 understands.
  13628. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13629. }
  13630. // String returns the string representation
  13631. func (s ListBucketMetricsConfigurationsInput) String() string {
  13632. return awsutil.Prettify(s)
  13633. }
  13634. // GoString returns the string representation
  13635. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  13636. return s.String()
  13637. }
  13638. // Validate inspects the fields of the type to determine if they are valid.
  13639. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  13640. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  13641. if s.Bucket == nil {
  13642. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13643. }
  13644. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13645. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13646. }
  13647. if invalidParams.Len() > 0 {
  13648. return invalidParams
  13649. }
  13650. return nil
  13651. }
  13652. // SetBucket sets the Bucket field's value.
  13653. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  13654. s.Bucket = &v
  13655. return s
  13656. }
  13657. func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
  13658. if s.Bucket == nil {
  13659. return v
  13660. }
  13661. return *s.Bucket
  13662. }
  13663. // SetContinuationToken sets the ContinuationToken field's value.
  13664. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  13665. s.ContinuationToken = &v
  13666. return s
  13667. }
  13668. type ListBucketMetricsConfigurationsOutput struct {
  13669. _ struct{} `type:"structure"`
  13670. // The marker that is used as a starting point for this metrics configuration
  13671. // list response. This value is present if it was sent in the request.
  13672. ContinuationToken *string `type:"string"`
  13673. // Indicates whether the returned list of metrics configurations is complete.
  13674. // A value of true indicates that the list is not complete and the NextContinuationToken
  13675. // will be provided for a subsequent request.
  13676. IsTruncated *bool `type:"boolean"`
  13677. // The list of metrics configurations for a bucket.
  13678. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  13679. // The marker used to continue a metrics configuration listing that has been
  13680. // truncated. Use the NextContinuationToken from a previously truncated list
  13681. // response to continue the listing. The continuation token is an opaque value
  13682. // that Amazon S3 understands.
  13683. NextContinuationToken *string `type:"string"`
  13684. }
  13685. // String returns the string representation
  13686. func (s ListBucketMetricsConfigurationsOutput) String() string {
  13687. return awsutil.Prettify(s)
  13688. }
  13689. // GoString returns the string representation
  13690. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  13691. return s.String()
  13692. }
  13693. // SetContinuationToken sets the ContinuationToken field's value.
  13694. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  13695. s.ContinuationToken = &v
  13696. return s
  13697. }
  13698. // SetIsTruncated sets the IsTruncated field's value.
  13699. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  13700. s.IsTruncated = &v
  13701. return s
  13702. }
  13703. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  13704. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  13705. s.MetricsConfigurationList = v
  13706. return s
  13707. }
  13708. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13709. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  13710. s.NextContinuationToken = &v
  13711. return s
  13712. }
  13713. type ListBucketsInput struct {
  13714. _ struct{} `type:"structure"`
  13715. }
  13716. // String returns the string representation
  13717. func (s ListBucketsInput) String() string {
  13718. return awsutil.Prettify(s)
  13719. }
  13720. // GoString returns the string representation
  13721. func (s ListBucketsInput) GoString() string {
  13722. return s.String()
  13723. }
  13724. type ListBucketsOutput struct {
  13725. _ struct{} `type:"structure"`
  13726. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  13727. Owner *Owner `type:"structure"`
  13728. }
  13729. // String returns the string representation
  13730. func (s ListBucketsOutput) String() string {
  13731. return awsutil.Prettify(s)
  13732. }
  13733. // GoString returns the string representation
  13734. func (s ListBucketsOutput) GoString() string {
  13735. return s.String()
  13736. }
  13737. // SetBuckets sets the Buckets field's value.
  13738. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  13739. s.Buckets = v
  13740. return s
  13741. }
  13742. // SetOwner sets the Owner field's value.
  13743. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  13744. s.Owner = v
  13745. return s
  13746. }
  13747. type ListMultipartUploadsInput struct {
  13748. _ struct{} `type:"structure"`
  13749. // Bucket is a required field
  13750. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13751. // Character you use to group keys.
  13752. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  13753. // Requests Amazon S3 to encode the object keys in the response and specifies
  13754. // the encoding method to use. An object key may contain any Unicode character;
  13755. // however, XML 1.0 parser cannot parse some characters, such as characters
  13756. // with an ASCII value from 0 to 10. For characters that are not supported in
  13757. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  13758. // keys in the response.
  13759. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  13760. // Together with upload-id-marker, this parameter specifies the multipart upload
  13761. // after which listing should begin.
  13762. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  13763. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  13764. // in the response body. 1,000 is the maximum number of uploads that can be
  13765. // returned in a response.
  13766. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  13767. // Lists in-progress uploads only for those keys that begin with the specified
  13768. // prefix.
  13769. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  13770. // Together with key-marker, specifies the multipart upload after which listing
  13771. // should begin. If key-marker is not specified, the upload-id-marker parameter
  13772. // is ignored.
  13773. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  13774. }
  13775. // String returns the string representation
  13776. func (s ListMultipartUploadsInput) String() string {
  13777. return awsutil.Prettify(s)
  13778. }
  13779. // GoString returns the string representation
  13780. func (s ListMultipartUploadsInput) GoString() string {
  13781. return s.String()
  13782. }
  13783. // Validate inspects the fields of the type to determine if they are valid.
  13784. func (s *ListMultipartUploadsInput) Validate() error {
  13785. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  13786. if s.Bucket == nil {
  13787. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13788. }
  13789. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13790. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13791. }
  13792. if invalidParams.Len() > 0 {
  13793. return invalidParams
  13794. }
  13795. return nil
  13796. }
  13797. // SetBucket sets the Bucket field's value.
  13798. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  13799. s.Bucket = &v
  13800. return s
  13801. }
  13802. func (s *ListMultipartUploadsInput) getBucket() (v string) {
  13803. if s.Bucket == nil {
  13804. return v
  13805. }
  13806. return *s.Bucket
  13807. }
  13808. // SetDelimiter sets the Delimiter field's value.
  13809. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  13810. s.Delimiter = &v
  13811. return s
  13812. }
  13813. // SetEncodingType sets the EncodingType field's value.
  13814. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  13815. s.EncodingType = &v
  13816. return s
  13817. }
  13818. // SetKeyMarker sets the KeyMarker field's value.
  13819. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  13820. s.KeyMarker = &v
  13821. return s
  13822. }
  13823. // SetMaxUploads sets the MaxUploads field's value.
  13824. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  13825. s.MaxUploads = &v
  13826. return s
  13827. }
  13828. // SetPrefix sets the Prefix field's value.
  13829. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  13830. s.Prefix = &v
  13831. return s
  13832. }
  13833. // SetUploadIdMarker sets the UploadIdMarker field's value.
  13834. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  13835. s.UploadIdMarker = &v
  13836. return s
  13837. }
  13838. type ListMultipartUploadsOutput struct {
  13839. _ struct{} `type:"structure"`
  13840. // Name of the bucket to which the multipart upload was initiated.
  13841. Bucket *string `type:"string"`
  13842. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  13843. Delimiter *string `type:"string"`
  13844. // Encoding type used by Amazon S3 to encode object keys in the response.
  13845. EncodingType *string `type:"string" enum:"EncodingType"`
  13846. // Indicates whether the returned list of multipart uploads is truncated. A
  13847. // value of true indicates that the list was truncated. The list can be truncated
  13848. // if the number of multipart uploads exceeds the limit allowed or specified
  13849. // by max uploads.
  13850. IsTruncated *bool `type:"boolean"`
  13851. // The key at or after which the listing began.
  13852. KeyMarker *string `type:"string"`
  13853. // Maximum number of multipart uploads that could have been included in the
  13854. // response.
  13855. MaxUploads *int64 `type:"integer"`
  13856. // When a list is truncated, this element specifies the value that should be
  13857. // used for the key-marker request parameter in a subsequent request.
  13858. NextKeyMarker *string `type:"string"`
  13859. // When a list is truncated, this element specifies the value that should be
  13860. // used for the upload-id-marker request parameter in a subsequent request.
  13861. NextUploadIdMarker *string `type:"string"`
  13862. // When a prefix is provided in the request, this field contains the specified
  13863. // prefix. The result contains only keys starting with the specified prefix.
  13864. Prefix *string `type:"string"`
  13865. // Upload ID after which listing began.
  13866. UploadIdMarker *string `type:"string"`
  13867. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  13868. }
  13869. // String returns the string representation
  13870. func (s ListMultipartUploadsOutput) String() string {
  13871. return awsutil.Prettify(s)
  13872. }
  13873. // GoString returns the string representation
  13874. func (s ListMultipartUploadsOutput) GoString() string {
  13875. return s.String()
  13876. }
  13877. // SetBucket sets the Bucket field's value.
  13878. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  13879. s.Bucket = &v
  13880. return s
  13881. }
  13882. func (s *ListMultipartUploadsOutput) getBucket() (v string) {
  13883. if s.Bucket == nil {
  13884. return v
  13885. }
  13886. return *s.Bucket
  13887. }
  13888. // SetCommonPrefixes sets the CommonPrefixes field's value.
  13889. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  13890. s.CommonPrefixes = v
  13891. return s
  13892. }
  13893. // SetDelimiter sets the Delimiter field's value.
  13894. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  13895. s.Delimiter = &v
  13896. return s
  13897. }
  13898. // SetEncodingType sets the EncodingType field's value.
  13899. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  13900. s.EncodingType = &v
  13901. return s
  13902. }
  13903. // SetIsTruncated sets the IsTruncated field's value.
  13904. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  13905. s.IsTruncated = &v
  13906. return s
  13907. }
  13908. // SetKeyMarker sets the KeyMarker field's value.
  13909. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  13910. s.KeyMarker = &v
  13911. return s
  13912. }
  13913. // SetMaxUploads sets the MaxUploads field's value.
  13914. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  13915. s.MaxUploads = &v
  13916. return s
  13917. }
  13918. // SetNextKeyMarker sets the NextKeyMarker field's value.
  13919. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  13920. s.NextKeyMarker = &v
  13921. return s
  13922. }
  13923. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  13924. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  13925. s.NextUploadIdMarker = &v
  13926. return s
  13927. }
  13928. // SetPrefix sets the Prefix field's value.
  13929. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  13930. s.Prefix = &v
  13931. return s
  13932. }
  13933. // SetUploadIdMarker sets the UploadIdMarker field's value.
  13934. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  13935. s.UploadIdMarker = &v
  13936. return s
  13937. }
  13938. // SetUploads sets the Uploads field's value.
  13939. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  13940. s.Uploads = v
  13941. return s
  13942. }
  13943. type ListObjectVersionsInput struct {
  13944. _ struct{} `type:"structure"`
  13945. // Bucket is a required field
  13946. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13947. // A delimiter is a character you use to group keys.
  13948. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  13949. // Requests Amazon S3 to encode the object keys in the response and specifies
  13950. // the encoding method to use. An object key may contain any Unicode character;
  13951. // however, XML 1.0 parser cannot parse some characters, such as characters
  13952. // with an ASCII value from 0 to 10. For characters that are not supported in
  13953. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  13954. // keys in the response.
  13955. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  13956. // Specifies the key to start with when listing objects in a bucket.
  13957. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  13958. // Sets the maximum number of keys returned in the response. The response might
  13959. // contain fewer keys but will never contain more.
  13960. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  13961. // Limits the response to keys that begin with the specified prefix.
  13962. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  13963. // Specifies the object version you want to start listing from.
  13964. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  13965. }
  13966. // String returns the string representation
  13967. func (s ListObjectVersionsInput) String() string {
  13968. return awsutil.Prettify(s)
  13969. }
  13970. // GoString returns the string representation
  13971. func (s ListObjectVersionsInput) GoString() string {
  13972. return s.String()
  13973. }
  13974. // Validate inspects the fields of the type to determine if they are valid.
  13975. func (s *ListObjectVersionsInput) Validate() error {
  13976. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  13977. if s.Bucket == nil {
  13978. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13979. }
  13980. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13981. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13982. }
  13983. if invalidParams.Len() > 0 {
  13984. return invalidParams
  13985. }
  13986. return nil
  13987. }
  13988. // SetBucket sets the Bucket field's value.
  13989. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  13990. s.Bucket = &v
  13991. return s
  13992. }
  13993. func (s *ListObjectVersionsInput) getBucket() (v string) {
  13994. if s.Bucket == nil {
  13995. return v
  13996. }
  13997. return *s.Bucket
  13998. }
  13999. // SetDelimiter sets the Delimiter field's value.
  14000. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  14001. s.Delimiter = &v
  14002. return s
  14003. }
  14004. // SetEncodingType sets the EncodingType field's value.
  14005. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  14006. s.EncodingType = &v
  14007. return s
  14008. }
  14009. // SetKeyMarker sets the KeyMarker field's value.
  14010. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  14011. s.KeyMarker = &v
  14012. return s
  14013. }
  14014. // SetMaxKeys sets the MaxKeys field's value.
  14015. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  14016. s.MaxKeys = &v
  14017. return s
  14018. }
  14019. // SetPrefix sets the Prefix field's value.
  14020. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  14021. s.Prefix = &v
  14022. return s
  14023. }
  14024. // SetVersionIdMarker sets the VersionIdMarker field's value.
  14025. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  14026. s.VersionIdMarker = &v
  14027. return s
  14028. }
  14029. type ListObjectVersionsOutput struct {
  14030. _ struct{} `type:"structure"`
  14031. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14032. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  14033. Delimiter *string `type:"string"`
  14034. // Encoding type used by Amazon S3 to encode object keys in the response.
  14035. EncodingType *string `type:"string" enum:"EncodingType"`
  14036. // A flag that indicates whether or not Amazon S3 returned all of the results
  14037. // that satisfied the search criteria. If your results were truncated, you can
  14038. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  14039. // response parameters as a starting place in another request to return the
  14040. // rest of the results.
  14041. IsTruncated *bool `type:"boolean"`
  14042. // Marks the last Key returned in a truncated response.
  14043. KeyMarker *string `type:"string"`
  14044. MaxKeys *int64 `type:"integer"`
  14045. Name *string `type:"string"`
  14046. // Use this value for the key marker request parameter in a subsequent request.
  14047. NextKeyMarker *string `type:"string"`
  14048. // Use this value for the next version id marker parameter in a subsequent request.
  14049. NextVersionIdMarker *string `type:"string"`
  14050. Prefix *string `type:"string"`
  14051. VersionIdMarker *string `type:"string"`
  14052. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  14053. }
  14054. // String returns the string representation
  14055. func (s ListObjectVersionsOutput) String() string {
  14056. return awsutil.Prettify(s)
  14057. }
  14058. // GoString returns the string representation
  14059. func (s ListObjectVersionsOutput) GoString() string {
  14060. return s.String()
  14061. }
  14062. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14063. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  14064. s.CommonPrefixes = v
  14065. return s
  14066. }
  14067. // SetDeleteMarkers sets the DeleteMarkers field's value.
  14068. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  14069. s.DeleteMarkers = v
  14070. return s
  14071. }
  14072. // SetDelimiter sets the Delimiter field's value.
  14073. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  14074. s.Delimiter = &v
  14075. return s
  14076. }
  14077. // SetEncodingType sets the EncodingType field's value.
  14078. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  14079. s.EncodingType = &v
  14080. return s
  14081. }
  14082. // SetIsTruncated sets the IsTruncated field's value.
  14083. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  14084. s.IsTruncated = &v
  14085. return s
  14086. }
  14087. // SetKeyMarker sets the KeyMarker field's value.
  14088. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  14089. s.KeyMarker = &v
  14090. return s
  14091. }
  14092. // SetMaxKeys sets the MaxKeys field's value.
  14093. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  14094. s.MaxKeys = &v
  14095. return s
  14096. }
  14097. // SetName sets the Name field's value.
  14098. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  14099. s.Name = &v
  14100. return s
  14101. }
  14102. // SetNextKeyMarker sets the NextKeyMarker field's value.
  14103. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  14104. s.NextKeyMarker = &v
  14105. return s
  14106. }
  14107. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  14108. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  14109. s.NextVersionIdMarker = &v
  14110. return s
  14111. }
  14112. // SetPrefix sets the Prefix field's value.
  14113. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  14114. s.Prefix = &v
  14115. return s
  14116. }
  14117. // SetVersionIdMarker sets the VersionIdMarker field's value.
  14118. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  14119. s.VersionIdMarker = &v
  14120. return s
  14121. }
  14122. // SetVersions sets the Versions field's value.
  14123. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  14124. s.Versions = v
  14125. return s
  14126. }
  14127. type ListObjectsInput struct {
  14128. _ struct{} `type:"structure"`
  14129. // Bucket is a required field
  14130. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14131. // A delimiter is a character you use to group keys.
  14132. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  14133. // Requests Amazon S3 to encode the object keys in the response and specifies
  14134. // the encoding method to use. An object key may contain any Unicode character;
  14135. // however, XML 1.0 parser cannot parse some characters, such as characters
  14136. // with an ASCII value from 0 to 10. For characters that are not supported in
  14137. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  14138. // keys in the response.
  14139. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  14140. // Specifies the key to start with when listing objects in a bucket.
  14141. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  14142. // Sets the maximum number of keys returned in the response. The response might
  14143. // contain fewer keys but will never contain more.
  14144. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  14145. // Limits the response to keys that begin with the specified prefix.
  14146. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  14147. // Confirms that the requester knows that she or he will be charged for the
  14148. // list objects request. Bucket owners need not specify this parameter in their
  14149. // requests.
  14150. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14151. }
  14152. // String returns the string representation
  14153. func (s ListObjectsInput) String() string {
  14154. return awsutil.Prettify(s)
  14155. }
  14156. // GoString returns the string representation
  14157. func (s ListObjectsInput) GoString() string {
  14158. return s.String()
  14159. }
  14160. // Validate inspects the fields of the type to determine if they are valid.
  14161. func (s *ListObjectsInput) Validate() error {
  14162. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  14163. if s.Bucket == nil {
  14164. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14165. }
  14166. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14167. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14168. }
  14169. if invalidParams.Len() > 0 {
  14170. return invalidParams
  14171. }
  14172. return nil
  14173. }
  14174. // SetBucket sets the Bucket field's value.
  14175. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  14176. s.Bucket = &v
  14177. return s
  14178. }
  14179. func (s *ListObjectsInput) getBucket() (v string) {
  14180. if s.Bucket == nil {
  14181. return v
  14182. }
  14183. return *s.Bucket
  14184. }
  14185. // SetDelimiter sets the Delimiter field's value.
  14186. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  14187. s.Delimiter = &v
  14188. return s
  14189. }
  14190. // SetEncodingType sets the EncodingType field's value.
  14191. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  14192. s.EncodingType = &v
  14193. return s
  14194. }
  14195. // SetMarker sets the Marker field's value.
  14196. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  14197. s.Marker = &v
  14198. return s
  14199. }
  14200. // SetMaxKeys sets the MaxKeys field's value.
  14201. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  14202. s.MaxKeys = &v
  14203. return s
  14204. }
  14205. // SetPrefix sets the Prefix field's value.
  14206. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  14207. s.Prefix = &v
  14208. return s
  14209. }
  14210. // SetRequestPayer sets the RequestPayer field's value.
  14211. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  14212. s.RequestPayer = &v
  14213. return s
  14214. }
  14215. type ListObjectsOutput struct {
  14216. _ struct{} `type:"structure"`
  14217. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14218. Contents []*Object `type:"list" flattened:"true"`
  14219. Delimiter *string `type:"string"`
  14220. // Encoding type used by Amazon S3 to encode object keys in the response.
  14221. EncodingType *string `type:"string" enum:"EncodingType"`
  14222. // A flag that indicates whether or not Amazon S3 returned all of the results
  14223. // that satisfied the search criteria.
  14224. IsTruncated *bool `type:"boolean"`
  14225. Marker *string `type:"string"`
  14226. MaxKeys *int64 `type:"integer"`
  14227. Name *string `type:"string"`
  14228. // When response is truncated (the IsTruncated element value in the response
  14229. // is true), you can use the key name in this field as marker in the subsequent
  14230. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  14231. // order Note: This element is returned only if you have delimiter request parameter
  14232. // specified. If response does not include the NextMaker and it is truncated,
  14233. // you can use the value of the last Key in the response as the marker in the
  14234. // subsequent request to get the next set of object keys.
  14235. NextMarker *string `type:"string"`
  14236. Prefix *string `type:"string"`
  14237. }
  14238. // String returns the string representation
  14239. func (s ListObjectsOutput) String() string {
  14240. return awsutil.Prettify(s)
  14241. }
  14242. // GoString returns the string representation
  14243. func (s ListObjectsOutput) GoString() string {
  14244. return s.String()
  14245. }
  14246. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14247. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  14248. s.CommonPrefixes = v
  14249. return s
  14250. }
  14251. // SetContents sets the Contents field's value.
  14252. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  14253. s.Contents = v
  14254. return s
  14255. }
  14256. // SetDelimiter sets the Delimiter field's value.
  14257. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  14258. s.Delimiter = &v
  14259. return s
  14260. }
  14261. // SetEncodingType sets the EncodingType field's value.
  14262. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  14263. s.EncodingType = &v
  14264. return s
  14265. }
  14266. // SetIsTruncated sets the IsTruncated field's value.
  14267. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  14268. s.IsTruncated = &v
  14269. return s
  14270. }
  14271. // SetMarker sets the Marker field's value.
  14272. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  14273. s.Marker = &v
  14274. return s
  14275. }
  14276. // SetMaxKeys sets the MaxKeys field's value.
  14277. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  14278. s.MaxKeys = &v
  14279. return s
  14280. }
  14281. // SetName sets the Name field's value.
  14282. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  14283. s.Name = &v
  14284. return s
  14285. }
  14286. // SetNextMarker sets the NextMarker field's value.
  14287. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  14288. s.NextMarker = &v
  14289. return s
  14290. }
  14291. // SetPrefix sets the Prefix field's value.
  14292. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  14293. s.Prefix = &v
  14294. return s
  14295. }
  14296. type ListObjectsV2Input struct {
  14297. _ struct{} `type:"structure"`
  14298. // Name of the bucket to list.
  14299. //
  14300. // Bucket is a required field
  14301. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14302. // ContinuationToken indicates Amazon S3 that the list is being continued on
  14303. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  14304. // key
  14305. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  14306. // A delimiter is a character you use to group keys.
  14307. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  14308. // Encoding type used by Amazon S3 to encode object keys in the response.
  14309. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  14310. // The owner field is not present in listV2 by default, if you want to return
  14311. // owner field with each key in the result then set the fetch owner field to
  14312. // true
  14313. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  14314. // Sets the maximum number of keys returned in the response. The response might
  14315. // contain fewer keys but will never contain more.
  14316. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  14317. // Limits the response to keys that begin with the specified prefix.
  14318. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  14319. // Confirms that the requester knows that she or he will be charged for the
  14320. // list objects request in V2 style. Bucket owners need not specify this parameter
  14321. // in their requests.
  14322. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14323. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  14324. // listing after this specified key. StartAfter can be any key in the bucket
  14325. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  14326. }
  14327. // String returns the string representation
  14328. func (s ListObjectsV2Input) String() string {
  14329. return awsutil.Prettify(s)
  14330. }
  14331. // GoString returns the string representation
  14332. func (s ListObjectsV2Input) GoString() string {
  14333. return s.String()
  14334. }
  14335. // Validate inspects the fields of the type to determine if they are valid.
  14336. func (s *ListObjectsV2Input) Validate() error {
  14337. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  14338. if s.Bucket == nil {
  14339. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14340. }
  14341. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14342. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14343. }
  14344. if invalidParams.Len() > 0 {
  14345. return invalidParams
  14346. }
  14347. return nil
  14348. }
  14349. // SetBucket sets the Bucket field's value.
  14350. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  14351. s.Bucket = &v
  14352. return s
  14353. }
  14354. func (s *ListObjectsV2Input) getBucket() (v string) {
  14355. if s.Bucket == nil {
  14356. return v
  14357. }
  14358. return *s.Bucket
  14359. }
  14360. // SetContinuationToken sets the ContinuationToken field's value.
  14361. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  14362. s.ContinuationToken = &v
  14363. return s
  14364. }
  14365. // SetDelimiter sets the Delimiter field's value.
  14366. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  14367. s.Delimiter = &v
  14368. return s
  14369. }
  14370. // SetEncodingType sets the EncodingType field's value.
  14371. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  14372. s.EncodingType = &v
  14373. return s
  14374. }
  14375. // SetFetchOwner sets the FetchOwner field's value.
  14376. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  14377. s.FetchOwner = &v
  14378. return s
  14379. }
  14380. // SetMaxKeys sets the MaxKeys field's value.
  14381. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  14382. s.MaxKeys = &v
  14383. return s
  14384. }
  14385. // SetPrefix sets the Prefix field's value.
  14386. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  14387. s.Prefix = &v
  14388. return s
  14389. }
  14390. // SetRequestPayer sets the RequestPayer field's value.
  14391. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  14392. s.RequestPayer = &v
  14393. return s
  14394. }
  14395. // SetStartAfter sets the StartAfter field's value.
  14396. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  14397. s.StartAfter = &v
  14398. return s
  14399. }
  14400. type ListObjectsV2Output struct {
  14401. _ struct{} `type:"structure"`
  14402. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  14403. // next occurrence of the string specified by delimiter
  14404. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14405. // Metadata about each object returned.
  14406. Contents []*Object `type:"list" flattened:"true"`
  14407. // ContinuationToken indicates Amazon S3 that the list is being continued on
  14408. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  14409. // key
  14410. ContinuationToken *string `type:"string"`
  14411. // A delimiter is a character you use to group keys.
  14412. Delimiter *string `type:"string"`
  14413. // Encoding type used by Amazon S3 to encode object keys in the response.
  14414. EncodingType *string `type:"string" enum:"EncodingType"`
  14415. // A flag that indicates whether or not Amazon S3 returned all of the results
  14416. // that satisfied the search criteria.
  14417. IsTruncated *bool `type:"boolean"`
  14418. // KeyCount is the number of keys returned with this request. KeyCount will
  14419. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  14420. // result will include less than equals 50 keys
  14421. KeyCount *int64 `type:"integer"`
  14422. // Sets the maximum number of keys returned in the response. The response might
  14423. // contain fewer keys but will never contain more.
  14424. MaxKeys *int64 `type:"integer"`
  14425. // Name of the bucket to list.
  14426. Name *string `type:"string"`
  14427. // NextContinuationToken is sent when isTruncated is true which means there
  14428. // are more keys in the bucket that can be listed. The next list requests to
  14429. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  14430. // is obfuscated and is not a real key
  14431. NextContinuationToken *string `type:"string"`
  14432. // Limits the response to keys that begin with the specified prefix.
  14433. Prefix *string `type:"string"`
  14434. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  14435. // listing after this specified key. StartAfter can be any key in the bucket
  14436. StartAfter *string `type:"string"`
  14437. }
  14438. // String returns the string representation
  14439. func (s ListObjectsV2Output) String() string {
  14440. return awsutil.Prettify(s)
  14441. }
  14442. // GoString returns the string representation
  14443. func (s ListObjectsV2Output) GoString() string {
  14444. return s.String()
  14445. }
  14446. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14447. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  14448. s.CommonPrefixes = v
  14449. return s
  14450. }
  14451. // SetContents sets the Contents field's value.
  14452. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  14453. s.Contents = v
  14454. return s
  14455. }
  14456. // SetContinuationToken sets the ContinuationToken field's value.
  14457. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  14458. s.ContinuationToken = &v
  14459. return s
  14460. }
  14461. // SetDelimiter sets the Delimiter field's value.
  14462. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  14463. s.Delimiter = &v
  14464. return s
  14465. }
  14466. // SetEncodingType sets the EncodingType field's value.
  14467. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  14468. s.EncodingType = &v
  14469. return s
  14470. }
  14471. // SetIsTruncated sets the IsTruncated field's value.
  14472. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  14473. s.IsTruncated = &v
  14474. return s
  14475. }
  14476. // SetKeyCount sets the KeyCount field's value.
  14477. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  14478. s.KeyCount = &v
  14479. return s
  14480. }
  14481. // SetMaxKeys sets the MaxKeys field's value.
  14482. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  14483. s.MaxKeys = &v
  14484. return s
  14485. }
  14486. // SetName sets the Name field's value.
  14487. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  14488. s.Name = &v
  14489. return s
  14490. }
  14491. // SetNextContinuationToken sets the NextContinuationToken field's value.
  14492. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  14493. s.NextContinuationToken = &v
  14494. return s
  14495. }
  14496. // SetPrefix sets the Prefix field's value.
  14497. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  14498. s.Prefix = &v
  14499. return s
  14500. }
  14501. // SetStartAfter sets the StartAfter field's value.
  14502. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  14503. s.StartAfter = &v
  14504. return s
  14505. }
  14506. type ListPartsInput struct {
  14507. _ struct{} `type:"structure"`
  14508. // Bucket is a required field
  14509. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14510. // Key is a required field
  14511. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14512. // Sets the maximum number of parts to return.
  14513. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  14514. // Specifies the part after which listing should begin. Only parts with higher
  14515. // part numbers will be listed.
  14516. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  14517. // Confirms that the requester knows that she or he will be charged for the
  14518. // request. Bucket owners need not specify this parameter in their requests.
  14519. // Documentation on downloading objects from requester pays buckets can be found
  14520. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  14521. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14522. // Upload ID identifying the multipart upload whose parts are being listed.
  14523. //
  14524. // UploadId is a required field
  14525. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  14526. }
  14527. // String returns the string representation
  14528. func (s ListPartsInput) String() string {
  14529. return awsutil.Prettify(s)
  14530. }
  14531. // GoString returns the string representation
  14532. func (s ListPartsInput) GoString() string {
  14533. return s.String()
  14534. }
  14535. // Validate inspects the fields of the type to determine if they are valid.
  14536. func (s *ListPartsInput) Validate() error {
  14537. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  14538. if s.Bucket == nil {
  14539. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14540. }
  14541. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14542. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14543. }
  14544. if s.Key == nil {
  14545. invalidParams.Add(request.NewErrParamRequired("Key"))
  14546. }
  14547. if s.Key != nil && len(*s.Key) < 1 {
  14548. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14549. }
  14550. if s.UploadId == nil {
  14551. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  14552. }
  14553. if invalidParams.Len() > 0 {
  14554. return invalidParams
  14555. }
  14556. return nil
  14557. }
  14558. // SetBucket sets the Bucket field's value.
  14559. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  14560. s.Bucket = &v
  14561. return s
  14562. }
  14563. func (s *ListPartsInput) getBucket() (v string) {
  14564. if s.Bucket == nil {
  14565. return v
  14566. }
  14567. return *s.Bucket
  14568. }
  14569. // SetKey sets the Key field's value.
  14570. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  14571. s.Key = &v
  14572. return s
  14573. }
  14574. // SetMaxParts sets the MaxParts field's value.
  14575. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  14576. s.MaxParts = &v
  14577. return s
  14578. }
  14579. // SetPartNumberMarker sets the PartNumberMarker field's value.
  14580. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  14581. s.PartNumberMarker = &v
  14582. return s
  14583. }
  14584. // SetRequestPayer sets the RequestPayer field's value.
  14585. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  14586. s.RequestPayer = &v
  14587. return s
  14588. }
  14589. // SetUploadId sets the UploadId field's value.
  14590. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  14591. s.UploadId = &v
  14592. return s
  14593. }
  14594. type ListPartsOutput struct {
  14595. _ struct{} `type:"structure"`
  14596. // Date when multipart upload will become eligible for abort operation by lifecycle.
  14597. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  14598. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  14599. // operation.
  14600. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  14601. // Name of the bucket to which the multipart upload was initiated.
  14602. Bucket *string `type:"string"`
  14603. // Identifies who initiated the multipart upload.
  14604. Initiator *Initiator `type:"structure"`
  14605. // Indicates whether the returned list of parts is truncated.
  14606. IsTruncated *bool `type:"boolean"`
  14607. // Object key for which the multipart upload was initiated.
  14608. Key *string `min:"1" type:"string"`
  14609. // Maximum number of parts that were allowed in the response.
  14610. MaxParts *int64 `type:"integer"`
  14611. // When a list is truncated, this element specifies the last part in the list,
  14612. // as well as the value to use for the part-number-marker request parameter
  14613. // in a subsequent request.
  14614. NextPartNumberMarker *int64 `type:"integer"`
  14615. Owner *Owner `type:"structure"`
  14616. // Part number after which listing begins.
  14617. PartNumberMarker *int64 `type:"integer"`
  14618. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  14619. // If present, indicates that the requester was successfully charged for the
  14620. // request.
  14621. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  14622. // The class of storage used to store the object.
  14623. StorageClass *string `type:"string" enum:"StorageClass"`
  14624. // Upload ID identifying the multipart upload whose parts are being listed.
  14625. UploadId *string `type:"string"`
  14626. }
  14627. // String returns the string representation
  14628. func (s ListPartsOutput) String() string {
  14629. return awsutil.Prettify(s)
  14630. }
  14631. // GoString returns the string representation
  14632. func (s ListPartsOutput) GoString() string {
  14633. return s.String()
  14634. }
  14635. // SetAbortDate sets the AbortDate field's value.
  14636. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  14637. s.AbortDate = &v
  14638. return s
  14639. }
  14640. // SetAbortRuleId sets the AbortRuleId field's value.
  14641. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  14642. s.AbortRuleId = &v
  14643. return s
  14644. }
  14645. // SetBucket sets the Bucket field's value.
  14646. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  14647. s.Bucket = &v
  14648. return s
  14649. }
  14650. func (s *ListPartsOutput) getBucket() (v string) {
  14651. if s.Bucket == nil {
  14652. return v
  14653. }
  14654. return *s.Bucket
  14655. }
  14656. // SetInitiator sets the Initiator field's value.
  14657. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  14658. s.Initiator = v
  14659. return s
  14660. }
  14661. // SetIsTruncated sets the IsTruncated field's value.
  14662. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  14663. s.IsTruncated = &v
  14664. return s
  14665. }
  14666. // SetKey sets the Key field's value.
  14667. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  14668. s.Key = &v
  14669. return s
  14670. }
  14671. // SetMaxParts sets the MaxParts field's value.
  14672. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  14673. s.MaxParts = &v
  14674. return s
  14675. }
  14676. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  14677. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  14678. s.NextPartNumberMarker = &v
  14679. return s
  14680. }
  14681. // SetOwner sets the Owner field's value.
  14682. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  14683. s.Owner = v
  14684. return s
  14685. }
  14686. // SetPartNumberMarker sets the PartNumberMarker field's value.
  14687. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  14688. s.PartNumberMarker = &v
  14689. return s
  14690. }
  14691. // SetParts sets the Parts field's value.
  14692. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  14693. s.Parts = v
  14694. return s
  14695. }
  14696. // SetRequestCharged sets the RequestCharged field's value.
  14697. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  14698. s.RequestCharged = &v
  14699. return s
  14700. }
  14701. // SetStorageClass sets the StorageClass field's value.
  14702. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  14703. s.StorageClass = &v
  14704. return s
  14705. }
  14706. // SetUploadId sets the UploadId field's value.
  14707. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  14708. s.UploadId = &v
  14709. return s
  14710. }
  14711. // Describes an S3 location that will receive the results of the restore request.
  14712. type Location struct {
  14713. _ struct{} `type:"structure"`
  14714. // A list of grants that control access to the staged results.
  14715. AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
  14716. // The name of the bucket where the restore results will be placed.
  14717. //
  14718. // BucketName is a required field
  14719. BucketName *string `type:"string" required:"true"`
  14720. // The canned ACL to apply to the restore results.
  14721. CannedACL *string `type:"string" enum:"ObjectCannedACL"`
  14722. // Describes the server-side encryption that will be applied to the restore
  14723. // results.
  14724. Encryption *Encryption `type:"structure"`
  14725. // The prefix that is prepended to the restore results for this request.
  14726. //
  14727. // Prefix is a required field
  14728. Prefix *string `type:"string" required:"true"`
  14729. // The class of storage used to store the restore results.
  14730. StorageClass *string `type:"string" enum:"StorageClass"`
  14731. // The tag-set that is applied to the restore results.
  14732. Tagging *Tagging `type:"structure"`
  14733. // A list of metadata to store with the restore results in S3.
  14734. UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
  14735. }
  14736. // String returns the string representation
  14737. func (s Location) String() string {
  14738. return awsutil.Prettify(s)
  14739. }
  14740. // GoString returns the string representation
  14741. func (s Location) GoString() string {
  14742. return s.String()
  14743. }
  14744. // Validate inspects the fields of the type to determine if they are valid.
  14745. func (s *Location) Validate() error {
  14746. invalidParams := request.ErrInvalidParams{Context: "Location"}
  14747. if s.BucketName == nil {
  14748. invalidParams.Add(request.NewErrParamRequired("BucketName"))
  14749. }
  14750. if s.Prefix == nil {
  14751. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  14752. }
  14753. if s.AccessControlList != nil {
  14754. for i, v := range s.AccessControlList {
  14755. if v == nil {
  14756. continue
  14757. }
  14758. if err := v.Validate(); err != nil {
  14759. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
  14760. }
  14761. }
  14762. }
  14763. if s.Encryption != nil {
  14764. if err := s.Encryption.Validate(); err != nil {
  14765. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  14766. }
  14767. }
  14768. if s.Tagging != nil {
  14769. if err := s.Tagging.Validate(); err != nil {
  14770. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  14771. }
  14772. }
  14773. if invalidParams.Len() > 0 {
  14774. return invalidParams
  14775. }
  14776. return nil
  14777. }
  14778. // SetAccessControlList sets the AccessControlList field's value.
  14779. func (s *Location) SetAccessControlList(v []*Grant) *Location {
  14780. s.AccessControlList = v
  14781. return s
  14782. }
  14783. // SetBucketName sets the BucketName field's value.
  14784. func (s *Location) SetBucketName(v string) *Location {
  14785. s.BucketName = &v
  14786. return s
  14787. }
  14788. // SetCannedACL sets the CannedACL field's value.
  14789. func (s *Location) SetCannedACL(v string) *Location {
  14790. s.CannedACL = &v
  14791. return s
  14792. }
  14793. // SetEncryption sets the Encryption field's value.
  14794. func (s *Location) SetEncryption(v *Encryption) *Location {
  14795. s.Encryption = v
  14796. return s
  14797. }
  14798. // SetPrefix sets the Prefix field's value.
  14799. func (s *Location) SetPrefix(v string) *Location {
  14800. s.Prefix = &v
  14801. return s
  14802. }
  14803. // SetStorageClass sets the StorageClass field's value.
  14804. func (s *Location) SetStorageClass(v string) *Location {
  14805. s.StorageClass = &v
  14806. return s
  14807. }
  14808. // SetTagging sets the Tagging field's value.
  14809. func (s *Location) SetTagging(v *Tagging) *Location {
  14810. s.Tagging = v
  14811. return s
  14812. }
  14813. // SetUserMetadata sets the UserMetadata field's value.
  14814. func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
  14815. s.UserMetadata = v
  14816. return s
  14817. }
  14818. // Container for logging information. Presence of this element indicates that
  14819. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  14820. // in this case.
  14821. type LoggingEnabled struct {
  14822. _ struct{} `type:"structure"`
  14823. // Specifies the bucket where you want Amazon S3 to store server access logs.
  14824. // You can have your logs delivered to any bucket that you own, including the
  14825. // same bucket that is being logged. You can also configure multiple buckets
  14826. // to deliver their logs to the same target bucket. In this case you should
  14827. // choose a different TargetPrefix for each source bucket so that the delivered
  14828. // log files can be distinguished by key.
  14829. //
  14830. // TargetBucket is a required field
  14831. TargetBucket *string `type:"string" required:"true"`
  14832. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  14833. // This element lets you specify a prefix for the keys that the log files will
  14834. // be stored under.
  14835. //
  14836. // TargetPrefix is a required field
  14837. TargetPrefix *string `type:"string" required:"true"`
  14838. }
  14839. // String returns the string representation
  14840. func (s LoggingEnabled) String() string {
  14841. return awsutil.Prettify(s)
  14842. }
  14843. // GoString returns the string representation
  14844. func (s LoggingEnabled) GoString() string {
  14845. return s.String()
  14846. }
  14847. // Validate inspects the fields of the type to determine if they are valid.
  14848. func (s *LoggingEnabled) Validate() error {
  14849. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  14850. if s.TargetBucket == nil {
  14851. invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
  14852. }
  14853. if s.TargetPrefix == nil {
  14854. invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
  14855. }
  14856. if s.TargetGrants != nil {
  14857. for i, v := range s.TargetGrants {
  14858. if v == nil {
  14859. continue
  14860. }
  14861. if err := v.Validate(); err != nil {
  14862. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  14863. }
  14864. }
  14865. }
  14866. if invalidParams.Len() > 0 {
  14867. return invalidParams
  14868. }
  14869. return nil
  14870. }
  14871. // SetTargetBucket sets the TargetBucket field's value.
  14872. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  14873. s.TargetBucket = &v
  14874. return s
  14875. }
  14876. // SetTargetGrants sets the TargetGrants field's value.
  14877. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  14878. s.TargetGrants = v
  14879. return s
  14880. }
  14881. // SetTargetPrefix sets the TargetPrefix field's value.
  14882. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  14883. s.TargetPrefix = &v
  14884. return s
  14885. }
  14886. // A metadata key-value pair to store with an object.
  14887. type MetadataEntry struct {
  14888. _ struct{} `type:"structure"`
  14889. Name *string `type:"string"`
  14890. Value *string `type:"string"`
  14891. }
  14892. // String returns the string representation
  14893. func (s MetadataEntry) String() string {
  14894. return awsutil.Prettify(s)
  14895. }
  14896. // GoString returns the string representation
  14897. func (s MetadataEntry) GoString() string {
  14898. return s.String()
  14899. }
  14900. // SetName sets the Name field's value.
  14901. func (s *MetadataEntry) SetName(v string) *MetadataEntry {
  14902. s.Name = &v
  14903. return s
  14904. }
  14905. // SetValue sets the Value field's value.
  14906. func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
  14907. s.Value = &v
  14908. return s
  14909. }
  14910. type MetricsAndOperator struct {
  14911. _ struct{} `type:"structure"`
  14912. // The prefix used when evaluating an AND predicate.
  14913. Prefix *string `type:"string"`
  14914. // The list of tags used when evaluating an AND predicate.
  14915. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  14916. }
  14917. // String returns the string representation
  14918. func (s MetricsAndOperator) String() string {
  14919. return awsutil.Prettify(s)
  14920. }
  14921. // GoString returns the string representation
  14922. func (s MetricsAndOperator) GoString() string {
  14923. return s.String()
  14924. }
  14925. // Validate inspects the fields of the type to determine if they are valid.
  14926. func (s *MetricsAndOperator) Validate() error {
  14927. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  14928. if s.Tags != nil {
  14929. for i, v := range s.Tags {
  14930. if v == nil {
  14931. continue
  14932. }
  14933. if err := v.Validate(); err != nil {
  14934. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  14935. }
  14936. }
  14937. }
  14938. if invalidParams.Len() > 0 {
  14939. return invalidParams
  14940. }
  14941. return nil
  14942. }
  14943. // SetPrefix sets the Prefix field's value.
  14944. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  14945. s.Prefix = &v
  14946. return s
  14947. }
  14948. // SetTags sets the Tags field's value.
  14949. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  14950. s.Tags = v
  14951. return s
  14952. }
  14953. type MetricsConfiguration struct {
  14954. _ struct{} `type:"structure"`
  14955. // Specifies a metrics configuration filter. The metrics configuration will
  14956. // only include objects that meet the filter's criteria. A filter must be a
  14957. // prefix, a tag, or a conjunction (MetricsAndOperator).
  14958. Filter *MetricsFilter `type:"structure"`
  14959. // The ID used to identify the metrics configuration.
  14960. //
  14961. // Id is a required field
  14962. Id *string `type:"string" required:"true"`
  14963. }
  14964. // String returns the string representation
  14965. func (s MetricsConfiguration) String() string {
  14966. return awsutil.Prettify(s)
  14967. }
  14968. // GoString returns the string representation
  14969. func (s MetricsConfiguration) GoString() string {
  14970. return s.String()
  14971. }
  14972. // Validate inspects the fields of the type to determine if they are valid.
  14973. func (s *MetricsConfiguration) Validate() error {
  14974. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  14975. if s.Id == nil {
  14976. invalidParams.Add(request.NewErrParamRequired("Id"))
  14977. }
  14978. if s.Filter != nil {
  14979. if err := s.Filter.Validate(); err != nil {
  14980. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  14981. }
  14982. }
  14983. if invalidParams.Len() > 0 {
  14984. return invalidParams
  14985. }
  14986. return nil
  14987. }
  14988. // SetFilter sets the Filter field's value.
  14989. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  14990. s.Filter = v
  14991. return s
  14992. }
  14993. // SetId sets the Id field's value.
  14994. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  14995. s.Id = &v
  14996. return s
  14997. }
  14998. type MetricsFilter struct {
  14999. _ struct{} `type:"structure"`
  15000. // A conjunction (logical AND) of predicates, which is used in evaluating a
  15001. // metrics filter. The operator must have at least two predicates, and an object
  15002. // must match all of the predicates in order for the filter to apply.
  15003. And *MetricsAndOperator `type:"structure"`
  15004. // The prefix used when evaluating a metrics filter.
  15005. Prefix *string `type:"string"`
  15006. // The tag used when evaluating a metrics filter.
  15007. Tag *Tag `type:"structure"`
  15008. }
  15009. // String returns the string representation
  15010. func (s MetricsFilter) String() string {
  15011. return awsutil.Prettify(s)
  15012. }
  15013. // GoString returns the string representation
  15014. func (s MetricsFilter) GoString() string {
  15015. return s.String()
  15016. }
  15017. // Validate inspects the fields of the type to determine if they are valid.
  15018. func (s *MetricsFilter) Validate() error {
  15019. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  15020. if s.And != nil {
  15021. if err := s.And.Validate(); err != nil {
  15022. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  15023. }
  15024. }
  15025. if s.Tag != nil {
  15026. if err := s.Tag.Validate(); err != nil {
  15027. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  15028. }
  15029. }
  15030. if invalidParams.Len() > 0 {
  15031. return invalidParams
  15032. }
  15033. return nil
  15034. }
  15035. // SetAnd sets the And field's value.
  15036. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  15037. s.And = v
  15038. return s
  15039. }
  15040. // SetPrefix sets the Prefix field's value.
  15041. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  15042. s.Prefix = &v
  15043. return s
  15044. }
  15045. // SetTag sets the Tag field's value.
  15046. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  15047. s.Tag = v
  15048. return s
  15049. }
  15050. type MultipartUpload struct {
  15051. _ struct{} `type:"structure"`
  15052. // Date and time at which the multipart upload was initiated.
  15053. Initiated *time.Time `type:"timestamp"`
  15054. // Identifies who initiated the multipart upload.
  15055. Initiator *Initiator `type:"structure"`
  15056. // Key of the object for which the multipart upload was initiated.
  15057. Key *string `min:"1" type:"string"`
  15058. Owner *Owner `type:"structure"`
  15059. // The class of storage used to store the object.
  15060. StorageClass *string `type:"string" enum:"StorageClass"`
  15061. // Upload ID that identifies the multipart upload.
  15062. UploadId *string `type:"string"`
  15063. }
  15064. // String returns the string representation
  15065. func (s MultipartUpload) String() string {
  15066. return awsutil.Prettify(s)
  15067. }
  15068. // GoString returns the string representation
  15069. func (s MultipartUpload) GoString() string {
  15070. return s.String()
  15071. }
  15072. // SetInitiated sets the Initiated field's value.
  15073. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  15074. s.Initiated = &v
  15075. return s
  15076. }
  15077. // SetInitiator sets the Initiator field's value.
  15078. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  15079. s.Initiator = v
  15080. return s
  15081. }
  15082. // SetKey sets the Key field's value.
  15083. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  15084. s.Key = &v
  15085. return s
  15086. }
  15087. // SetOwner sets the Owner field's value.
  15088. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  15089. s.Owner = v
  15090. return s
  15091. }
  15092. // SetStorageClass sets the StorageClass field's value.
  15093. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  15094. s.StorageClass = &v
  15095. return s
  15096. }
  15097. // SetUploadId sets the UploadId field's value.
  15098. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  15099. s.UploadId = &v
  15100. return s
  15101. }
  15102. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  15103. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  15104. // configuration action on a bucket that has versioning enabled (or suspended)
  15105. // to request that Amazon S3 delete noncurrent object versions at a specific
  15106. // period in the object's lifetime.
  15107. type NoncurrentVersionExpiration struct {
  15108. _ struct{} `type:"structure"`
  15109. // Specifies the number of days an object is noncurrent before Amazon S3 can
  15110. // perform the associated action. For information about the noncurrent days
  15111. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  15112. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in
  15113. // the Amazon Simple Storage Service Developer Guide.
  15114. NoncurrentDays *int64 `type:"integer"`
  15115. }
  15116. // String returns the string representation
  15117. func (s NoncurrentVersionExpiration) String() string {
  15118. return awsutil.Prettify(s)
  15119. }
  15120. // GoString returns the string representation
  15121. func (s NoncurrentVersionExpiration) GoString() string {
  15122. return s.String()
  15123. }
  15124. // SetNoncurrentDays sets the NoncurrentDays field's value.
  15125. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  15126. s.NoncurrentDays = &v
  15127. return s
  15128. }
  15129. // Container for the transition rule that describes when noncurrent objects
  15130. // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER
  15131. // storage class. If your bucket is versioning-enabled (or versioning is suspended),
  15132. // you can set this action to request that Amazon S3 transition noncurrent object
  15133. // versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER storage
  15134. // class at a specific period in the object's lifetime.
  15135. type NoncurrentVersionTransition struct {
  15136. _ struct{} `type:"structure"`
  15137. // Specifies the number of days an object is noncurrent before Amazon S3 can
  15138. // perform the associated action. For information about the noncurrent days
  15139. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  15140. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in
  15141. // the Amazon Simple Storage Service Developer Guide.
  15142. NoncurrentDays *int64 `type:"integer"`
  15143. // The class of storage used to store the object.
  15144. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  15145. }
  15146. // String returns the string representation
  15147. func (s NoncurrentVersionTransition) String() string {
  15148. return awsutil.Prettify(s)
  15149. }
  15150. // GoString returns the string representation
  15151. func (s NoncurrentVersionTransition) GoString() string {
  15152. return s.String()
  15153. }
  15154. // SetNoncurrentDays sets the NoncurrentDays field's value.
  15155. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  15156. s.NoncurrentDays = &v
  15157. return s
  15158. }
  15159. // SetStorageClass sets the StorageClass field's value.
  15160. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  15161. s.StorageClass = &v
  15162. return s
  15163. }
  15164. // A container for specifying the notification configuration of the bucket.
  15165. // If this element is empty, notifications are turned off for the bucket.
  15166. type NotificationConfiguration struct {
  15167. _ struct{} `type:"structure"`
  15168. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  15169. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  15170. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  15171. }
  15172. // String returns the string representation
  15173. func (s NotificationConfiguration) String() string {
  15174. return awsutil.Prettify(s)
  15175. }
  15176. // GoString returns the string representation
  15177. func (s NotificationConfiguration) GoString() string {
  15178. return s.String()
  15179. }
  15180. // Validate inspects the fields of the type to determine if they are valid.
  15181. func (s *NotificationConfiguration) Validate() error {
  15182. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  15183. if s.LambdaFunctionConfigurations != nil {
  15184. for i, v := range s.LambdaFunctionConfigurations {
  15185. if v == nil {
  15186. continue
  15187. }
  15188. if err := v.Validate(); err != nil {
  15189. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  15190. }
  15191. }
  15192. }
  15193. if s.QueueConfigurations != nil {
  15194. for i, v := range s.QueueConfigurations {
  15195. if v == nil {
  15196. continue
  15197. }
  15198. if err := v.Validate(); err != nil {
  15199. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  15200. }
  15201. }
  15202. }
  15203. if s.TopicConfigurations != nil {
  15204. for i, v := range s.TopicConfigurations {
  15205. if v == nil {
  15206. continue
  15207. }
  15208. if err := v.Validate(); err != nil {
  15209. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  15210. }
  15211. }
  15212. }
  15213. if invalidParams.Len() > 0 {
  15214. return invalidParams
  15215. }
  15216. return nil
  15217. }
  15218. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  15219. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  15220. s.LambdaFunctionConfigurations = v
  15221. return s
  15222. }
  15223. // SetQueueConfigurations sets the QueueConfigurations field's value.
  15224. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  15225. s.QueueConfigurations = v
  15226. return s
  15227. }
  15228. // SetTopicConfigurations sets the TopicConfigurations field's value.
  15229. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  15230. s.TopicConfigurations = v
  15231. return s
  15232. }
  15233. type NotificationConfigurationDeprecated struct {
  15234. _ struct{} `type:"structure"`
  15235. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  15236. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  15237. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  15238. }
  15239. // String returns the string representation
  15240. func (s NotificationConfigurationDeprecated) String() string {
  15241. return awsutil.Prettify(s)
  15242. }
  15243. // GoString returns the string representation
  15244. func (s NotificationConfigurationDeprecated) GoString() string {
  15245. return s.String()
  15246. }
  15247. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  15248. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  15249. s.CloudFunctionConfiguration = v
  15250. return s
  15251. }
  15252. // SetQueueConfiguration sets the QueueConfiguration field's value.
  15253. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  15254. s.QueueConfiguration = v
  15255. return s
  15256. }
  15257. // SetTopicConfiguration sets the TopicConfiguration field's value.
  15258. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  15259. s.TopicConfiguration = v
  15260. return s
  15261. }
  15262. // A container for object key name filtering rules. For information about key
  15263. // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  15264. // in the Amazon Simple Storage Service Developer Guide.
  15265. type NotificationConfigurationFilter struct {
  15266. _ struct{} `type:"structure"`
  15267. // A container for object key name prefix and suffix filtering rules.
  15268. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  15269. }
  15270. // String returns the string representation
  15271. func (s NotificationConfigurationFilter) String() string {
  15272. return awsutil.Prettify(s)
  15273. }
  15274. // GoString returns the string representation
  15275. func (s NotificationConfigurationFilter) GoString() string {
  15276. return s.String()
  15277. }
  15278. // SetKey sets the Key field's value.
  15279. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  15280. s.Key = v
  15281. return s
  15282. }
  15283. type Object struct {
  15284. _ struct{} `type:"structure"`
  15285. ETag *string `type:"string"`
  15286. Key *string `min:"1" type:"string"`
  15287. LastModified *time.Time `type:"timestamp"`
  15288. Owner *Owner `type:"structure"`
  15289. Size *int64 `type:"integer"`
  15290. // The class of storage used to store the object.
  15291. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  15292. }
  15293. // String returns the string representation
  15294. func (s Object) String() string {
  15295. return awsutil.Prettify(s)
  15296. }
  15297. // GoString returns the string representation
  15298. func (s Object) GoString() string {
  15299. return s.String()
  15300. }
  15301. // SetETag sets the ETag field's value.
  15302. func (s *Object) SetETag(v string) *Object {
  15303. s.ETag = &v
  15304. return s
  15305. }
  15306. // SetKey sets the Key field's value.
  15307. func (s *Object) SetKey(v string) *Object {
  15308. s.Key = &v
  15309. return s
  15310. }
  15311. // SetLastModified sets the LastModified field's value.
  15312. func (s *Object) SetLastModified(v time.Time) *Object {
  15313. s.LastModified = &v
  15314. return s
  15315. }
  15316. // SetOwner sets the Owner field's value.
  15317. func (s *Object) SetOwner(v *Owner) *Object {
  15318. s.Owner = v
  15319. return s
  15320. }
  15321. // SetSize sets the Size field's value.
  15322. func (s *Object) SetSize(v int64) *Object {
  15323. s.Size = &v
  15324. return s
  15325. }
  15326. // SetStorageClass sets the StorageClass field's value.
  15327. func (s *Object) SetStorageClass(v string) *Object {
  15328. s.StorageClass = &v
  15329. return s
  15330. }
  15331. type ObjectIdentifier struct {
  15332. _ struct{} `type:"structure"`
  15333. // Key name of the object to delete.
  15334. //
  15335. // Key is a required field
  15336. Key *string `min:"1" type:"string" required:"true"`
  15337. // VersionId for the specific version of the object to delete.
  15338. VersionId *string `type:"string"`
  15339. }
  15340. // String returns the string representation
  15341. func (s ObjectIdentifier) String() string {
  15342. return awsutil.Prettify(s)
  15343. }
  15344. // GoString returns the string representation
  15345. func (s ObjectIdentifier) GoString() string {
  15346. return s.String()
  15347. }
  15348. // Validate inspects the fields of the type to determine if they are valid.
  15349. func (s *ObjectIdentifier) Validate() error {
  15350. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  15351. if s.Key == nil {
  15352. invalidParams.Add(request.NewErrParamRequired("Key"))
  15353. }
  15354. if s.Key != nil && len(*s.Key) < 1 {
  15355. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15356. }
  15357. if invalidParams.Len() > 0 {
  15358. return invalidParams
  15359. }
  15360. return nil
  15361. }
  15362. // SetKey sets the Key field's value.
  15363. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  15364. s.Key = &v
  15365. return s
  15366. }
  15367. // SetVersionId sets the VersionId field's value.
  15368. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  15369. s.VersionId = &v
  15370. return s
  15371. }
  15372. // The container element for Object Lock configuration parameters.
  15373. type ObjectLockConfiguration struct {
  15374. _ struct{} `type:"structure"`
  15375. // Indicates whether this bucket has an Object Lock configuration enabled.
  15376. ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"`
  15377. // The Object Lock rule in place for the specified object.
  15378. Rule *ObjectLockRule `type:"structure"`
  15379. }
  15380. // String returns the string representation
  15381. func (s ObjectLockConfiguration) String() string {
  15382. return awsutil.Prettify(s)
  15383. }
  15384. // GoString returns the string representation
  15385. func (s ObjectLockConfiguration) GoString() string {
  15386. return s.String()
  15387. }
  15388. // SetObjectLockEnabled sets the ObjectLockEnabled field's value.
  15389. func (s *ObjectLockConfiguration) SetObjectLockEnabled(v string) *ObjectLockConfiguration {
  15390. s.ObjectLockEnabled = &v
  15391. return s
  15392. }
  15393. // SetRule sets the Rule field's value.
  15394. func (s *ObjectLockConfiguration) SetRule(v *ObjectLockRule) *ObjectLockConfiguration {
  15395. s.Rule = v
  15396. return s
  15397. }
  15398. // A Legal Hold configuration for an object.
  15399. type ObjectLockLegalHold struct {
  15400. _ struct{} `type:"structure"`
  15401. // Indicates whether the specified object has a Legal Hold in place.
  15402. Status *string `type:"string" enum:"ObjectLockLegalHoldStatus"`
  15403. }
  15404. // String returns the string representation
  15405. func (s ObjectLockLegalHold) String() string {
  15406. return awsutil.Prettify(s)
  15407. }
  15408. // GoString returns the string representation
  15409. func (s ObjectLockLegalHold) GoString() string {
  15410. return s.String()
  15411. }
  15412. // SetStatus sets the Status field's value.
  15413. func (s *ObjectLockLegalHold) SetStatus(v string) *ObjectLockLegalHold {
  15414. s.Status = &v
  15415. return s
  15416. }
  15417. // A Retention configuration for an object.
  15418. type ObjectLockRetention struct {
  15419. _ struct{} `type:"structure"`
  15420. // Indicates the Retention mode for the specified object.
  15421. Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
  15422. // The date on which this Object Lock Retention will expire.
  15423. RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  15424. }
  15425. // String returns the string representation
  15426. func (s ObjectLockRetention) String() string {
  15427. return awsutil.Prettify(s)
  15428. }
  15429. // GoString returns the string representation
  15430. func (s ObjectLockRetention) GoString() string {
  15431. return s.String()
  15432. }
  15433. // SetMode sets the Mode field's value.
  15434. func (s *ObjectLockRetention) SetMode(v string) *ObjectLockRetention {
  15435. s.Mode = &v
  15436. return s
  15437. }
  15438. // SetRetainUntilDate sets the RetainUntilDate field's value.
  15439. func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetention {
  15440. s.RetainUntilDate = &v
  15441. return s
  15442. }
  15443. // The container element for an Object Lock rule.
  15444. type ObjectLockRule struct {
  15445. _ struct{} `type:"structure"`
  15446. // The default retention period that you want to apply to new objects placed
  15447. // in the specified bucket.
  15448. DefaultRetention *DefaultRetention `type:"structure"`
  15449. }
  15450. // String returns the string representation
  15451. func (s ObjectLockRule) String() string {
  15452. return awsutil.Prettify(s)
  15453. }
  15454. // GoString returns the string representation
  15455. func (s ObjectLockRule) GoString() string {
  15456. return s.String()
  15457. }
  15458. // SetDefaultRetention sets the DefaultRetention field's value.
  15459. func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRule {
  15460. s.DefaultRetention = v
  15461. return s
  15462. }
  15463. type ObjectVersion struct {
  15464. _ struct{} `type:"structure"`
  15465. ETag *string `type:"string"`
  15466. // Specifies whether the object is (true) or is not (false) the latest version
  15467. // of an object.
  15468. IsLatest *bool `type:"boolean"`
  15469. // The object key.
  15470. Key *string `min:"1" type:"string"`
  15471. // Date and time the object was last modified.
  15472. LastModified *time.Time `type:"timestamp"`
  15473. Owner *Owner `type:"structure"`
  15474. // Size in bytes of the object.
  15475. Size *int64 `type:"integer"`
  15476. // The class of storage used to store the object.
  15477. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  15478. // Version ID of an object.
  15479. VersionId *string `type:"string"`
  15480. }
  15481. // String returns the string representation
  15482. func (s ObjectVersion) String() string {
  15483. return awsutil.Prettify(s)
  15484. }
  15485. // GoString returns the string representation
  15486. func (s ObjectVersion) GoString() string {
  15487. return s.String()
  15488. }
  15489. // SetETag sets the ETag field's value.
  15490. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  15491. s.ETag = &v
  15492. return s
  15493. }
  15494. // SetIsLatest sets the IsLatest field's value.
  15495. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  15496. s.IsLatest = &v
  15497. return s
  15498. }
  15499. // SetKey sets the Key field's value.
  15500. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  15501. s.Key = &v
  15502. return s
  15503. }
  15504. // SetLastModified sets the LastModified field's value.
  15505. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  15506. s.LastModified = &v
  15507. return s
  15508. }
  15509. // SetOwner sets the Owner field's value.
  15510. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  15511. s.Owner = v
  15512. return s
  15513. }
  15514. // SetSize sets the Size field's value.
  15515. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  15516. s.Size = &v
  15517. return s
  15518. }
  15519. // SetStorageClass sets the StorageClass field's value.
  15520. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  15521. s.StorageClass = &v
  15522. return s
  15523. }
  15524. // SetVersionId sets the VersionId field's value.
  15525. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  15526. s.VersionId = &v
  15527. return s
  15528. }
  15529. // Describes the location where the restore job's output is stored.
  15530. type OutputLocation struct {
  15531. _ struct{} `type:"structure"`
  15532. // Describes an S3 location that will receive the results of the restore request.
  15533. S3 *Location `type:"structure"`
  15534. }
  15535. // String returns the string representation
  15536. func (s OutputLocation) String() string {
  15537. return awsutil.Prettify(s)
  15538. }
  15539. // GoString returns the string representation
  15540. func (s OutputLocation) GoString() string {
  15541. return s.String()
  15542. }
  15543. // Validate inspects the fields of the type to determine if they are valid.
  15544. func (s *OutputLocation) Validate() error {
  15545. invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
  15546. if s.S3 != nil {
  15547. if err := s.S3.Validate(); err != nil {
  15548. invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
  15549. }
  15550. }
  15551. if invalidParams.Len() > 0 {
  15552. return invalidParams
  15553. }
  15554. return nil
  15555. }
  15556. // SetS3 sets the S3 field's value.
  15557. func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
  15558. s.S3 = v
  15559. return s
  15560. }
  15561. // Describes how results of the Select job are serialized.
  15562. type OutputSerialization struct {
  15563. _ struct{} `type:"structure"`
  15564. // Describes the serialization of CSV-encoded Select results.
  15565. CSV *CSVOutput `type:"structure"`
  15566. // Specifies JSON as request's output serialization format.
  15567. JSON *JSONOutput `type:"structure"`
  15568. }
  15569. // String returns the string representation
  15570. func (s OutputSerialization) String() string {
  15571. return awsutil.Prettify(s)
  15572. }
  15573. // GoString returns the string representation
  15574. func (s OutputSerialization) GoString() string {
  15575. return s.String()
  15576. }
  15577. // SetCSV sets the CSV field's value.
  15578. func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
  15579. s.CSV = v
  15580. return s
  15581. }
  15582. // SetJSON sets the JSON field's value.
  15583. func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
  15584. s.JSON = v
  15585. return s
  15586. }
  15587. type Owner struct {
  15588. _ struct{} `type:"structure"`
  15589. DisplayName *string `type:"string"`
  15590. ID *string `type:"string"`
  15591. }
  15592. // String returns the string representation
  15593. func (s Owner) String() string {
  15594. return awsutil.Prettify(s)
  15595. }
  15596. // GoString returns the string representation
  15597. func (s Owner) GoString() string {
  15598. return s.String()
  15599. }
  15600. // SetDisplayName sets the DisplayName field's value.
  15601. func (s *Owner) SetDisplayName(v string) *Owner {
  15602. s.DisplayName = &v
  15603. return s
  15604. }
  15605. // SetID sets the ID field's value.
  15606. func (s *Owner) SetID(v string) *Owner {
  15607. s.ID = &v
  15608. return s
  15609. }
  15610. type ParquetInput struct {
  15611. _ struct{} `type:"structure"`
  15612. }
  15613. // String returns the string representation
  15614. func (s ParquetInput) String() string {
  15615. return awsutil.Prettify(s)
  15616. }
  15617. // GoString returns the string representation
  15618. func (s ParquetInput) GoString() string {
  15619. return s.String()
  15620. }
  15621. type Part struct {
  15622. _ struct{} `type:"structure"`
  15623. // Entity tag returned when the part was uploaded.
  15624. ETag *string `type:"string"`
  15625. // Date and time at which the part was uploaded.
  15626. LastModified *time.Time `type:"timestamp"`
  15627. // Part number identifying the part. This is a positive integer between 1 and
  15628. // 10,000.
  15629. PartNumber *int64 `type:"integer"`
  15630. // Size in bytes of the uploaded part data.
  15631. Size *int64 `type:"integer"`
  15632. }
  15633. // String returns the string representation
  15634. func (s Part) String() string {
  15635. return awsutil.Prettify(s)
  15636. }
  15637. // GoString returns the string representation
  15638. func (s Part) GoString() string {
  15639. return s.String()
  15640. }
  15641. // SetETag sets the ETag field's value.
  15642. func (s *Part) SetETag(v string) *Part {
  15643. s.ETag = &v
  15644. return s
  15645. }
  15646. // SetLastModified sets the LastModified field's value.
  15647. func (s *Part) SetLastModified(v time.Time) *Part {
  15648. s.LastModified = &v
  15649. return s
  15650. }
  15651. // SetPartNumber sets the PartNumber field's value.
  15652. func (s *Part) SetPartNumber(v int64) *Part {
  15653. s.PartNumber = &v
  15654. return s
  15655. }
  15656. // SetSize sets the Size field's value.
  15657. func (s *Part) SetSize(v int64) *Part {
  15658. s.Size = &v
  15659. return s
  15660. }
  15661. // The container element for a bucket's policy status.
  15662. type PolicyStatus struct {
  15663. _ struct{} `type:"structure"`
  15664. // The policy status for this bucket. TRUE indicates that this bucket is public.
  15665. // FALSE indicates that the bucket is not public.
  15666. IsPublic *bool `locationName:"IsPublic" type:"boolean"`
  15667. }
  15668. // String returns the string representation
  15669. func (s PolicyStatus) String() string {
  15670. return awsutil.Prettify(s)
  15671. }
  15672. // GoString returns the string representation
  15673. func (s PolicyStatus) GoString() string {
  15674. return s.String()
  15675. }
  15676. // SetIsPublic sets the IsPublic field's value.
  15677. func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus {
  15678. s.IsPublic = &v
  15679. return s
  15680. }
  15681. type Progress struct {
  15682. _ struct{} `type:"structure"`
  15683. // The current number of uncompressed object bytes processed.
  15684. BytesProcessed *int64 `type:"long"`
  15685. // The current number of bytes of records payload data returned.
  15686. BytesReturned *int64 `type:"long"`
  15687. // The current number of object bytes scanned.
  15688. BytesScanned *int64 `type:"long"`
  15689. }
  15690. // String returns the string representation
  15691. func (s Progress) String() string {
  15692. return awsutil.Prettify(s)
  15693. }
  15694. // GoString returns the string representation
  15695. func (s Progress) GoString() string {
  15696. return s.String()
  15697. }
  15698. // SetBytesProcessed sets the BytesProcessed field's value.
  15699. func (s *Progress) SetBytesProcessed(v int64) *Progress {
  15700. s.BytesProcessed = &v
  15701. return s
  15702. }
  15703. // SetBytesReturned sets the BytesReturned field's value.
  15704. func (s *Progress) SetBytesReturned(v int64) *Progress {
  15705. s.BytesReturned = &v
  15706. return s
  15707. }
  15708. // SetBytesScanned sets the BytesScanned field's value.
  15709. func (s *Progress) SetBytesScanned(v int64) *Progress {
  15710. s.BytesScanned = &v
  15711. return s
  15712. }
  15713. type ProgressEvent struct {
  15714. _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"`
  15715. // The Progress event details.
  15716. Details *Progress `locationName:"Details" type:"structure"`
  15717. }
  15718. // String returns the string representation
  15719. func (s ProgressEvent) String() string {
  15720. return awsutil.Prettify(s)
  15721. }
  15722. // GoString returns the string representation
  15723. func (s ProgressEvent) GoString() string {
  15724. return s.String()
  15725. }
  15726. // SetDetails sets the Details field's value.
  15727. func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent {
  15728. s.Details = v
  15729. return s
  15730. }
  15731. // The ProgressEvent is and event in the SelectObjectContentEventStream group of events.
  15732. func (s *ProgressEvent) eventSelectObjectContentEventStream() {}
  15733. // UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value.
  15734. // This method is only used internally within the SDK's EventStream handling.
  15735. func (s *ProgressEvent) UnmarshalEvent(
  15736. payloadUnmarshaler protocol.PayloadUnmarshaler,
  15737. msg eventstream.Message,
  15738. ) error {
  15739. if err := payloadUnmarshaler.UnmarshalPayload(
  15740. bytes.NewReader(msg.Payload), s,
  15741. ); err != nil {
  15742. return err
  15743. }
  15744. return nil
  15745. }
  15746. type PublicAccessBlockConfiguration struct {
  15747. _ struct{} `type:"structure"`
  15748. // Specifies whether Amazon S3 should block public access control lists (ACLs)
  15749. // for this bucket and objects in this bucket. Setting this element to TRUE
  15750. // causes the following behavior:
  15751. //
  15752. // * PUT Bucket acl and PUT Object acl calls fail if the specified ACL is
  15753. // public.
  15754. //
  15755. // * PUT Object calls fail if the request includes a public ACL.
  15756. //
  15757. // Enabling this setting doesn't affect existing policies or ACLs.
  15758. BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"`
  15759. // Specifies whether Amazon S3 should block public bucket policies for this
  15760. // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to
  15761. // PUT Bucket policy if the specified bucket policy allows public access.
  15762. //
  15763. // Enabling this setting doesn't affect existing bucket policies.
  15764. BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"`
  15765. // Specifies whether Amazon S3 should ignore public ACLs for this bucket and
  15766. // objects in this bucket. Setting this element to TRUE causes Amazon S3 to
  15767. // ignore all public ACLs on this bucket and objects in this bucket.
  15768. //
  15769. // Enabling this setting doesn't affect the persistence of any existing ACLs
  15770. // and doesn't prevent new public ACLs from being set.
  15771. IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"`
  15772. // Specifies whether Amazon S3 should restrict public bucket policies for this
  15773. // bucket. Setting this element to TRUE restricts access to this bucket to only
  15774. // AWS services and authorized users within this account if the bucket has a
  15775. // public policy.
  15776. //
  15777. // Enabling this setting doesn't affect previously stored bucket policies, except
  15778. // that public and cross-account access within any public bucket policy, including
  15779. // non-public delegation to specific accounts, is blocked.
  15780. RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"`
  15781. }
  15782. // String returns the string representation
  15783. func (s PublicAccessBlockConfiguration) String() string {
  15784. return awsutil.Prettify(s)
  15785. }
  15786. // GoString returns the string representation
  15787. func (s PublicAccessBlockConfiguration) GoString() string {
  15788. return s.String()
  15789. }
  15790. // SetBlockPublicAcls sets the BlockPublicAcls field's value.
  15791. func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration {
  15792. s.BlockPublicAcls = &v
  15793. return s
  15794. }
  15795. // SetBlockPublicPolicy sets the BlockPublicPolicy field's value.
  15796. func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration {
  15797. s.BlockPublicPolicy = &v
  15798. return s
  15799. }
  15800. // SetIgnorePublicAcls sets the IgnorePublicAcls field's value.
  15801. func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration {
  15802. s.IgnorePublicAcls = &v
  15803. return s
  15804. }
  15805. // SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value.
  15806. func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration {
  15807. s.RestrictPublicBuckets = &v
  15808. return s
  15809. }
  15810. type PutBucketAccelerateConfigurationInput struct {
  15811. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  15812. // Specifies the Accelerate Configuration you want to set for the bucket.
  15813. //
  15814. // AccelerateConfiguration is a required field
  15815. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15816. // Name of the bucket for which the accelerate configuration is set.
  15817. //
  15818. // Bucket is a required field
  15819. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15820. }
  15821. // String returns the string representation
  15822. func (s PutBucketAccelerateConfigurationInput) String() string {
  15823. return awsutil.Prettify(s)
  15824. }
  15825. // GoString returns the string representation
  15826. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  15827. return s.String()
  15828. }
  15829. // Validate inspects the fields of the type to determine if they are valid.
  15830. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  15831. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  15832. if s.AccelerateConfiguration == nil {
  15833. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  15834. }
  15835. if s.Bucket == nil {
  15836. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15837. }
  15838. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15839. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15840. }
  15841. if invalidParams.Len() > 0 {
  15842. return invalidParams
  15843. }
  15844. return nil
  15845. }
  15846. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  15847. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  15848. s.AccelerateConfiguration = v
  15849. return s
  15850. }
  15851. // SetBucket sets the Bucket field's value.
  15852. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  15853. s.Bucket = &v
  15854. return s
  15855. }
  15856. func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
  15857. if s.Bucket == nil {
  15858. return v
  15859. }
  15860. return *s.Bucket
  15861. }
  15862. type PutBucketAccelerateConfigurationOutput struct {
  15863. _ struct{} `type:"structure"`
  15864. }
  15865. // String returns the string representation
  15866. func (s PutBucketAccelerateConfigurationOutput) String() string {
  15867. return awsutil.Prettify(s)
  15868. }
  15869. // GoString returns the string representation
  15870. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  15871. return s.String()
  15872. }
  15873. type PutBucketAclInput struct {
  15874. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  15875. // The canned ACL to apply to the bucket.
  15876. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  15877. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15878. // Bucket is a required field
  15879. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15880. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  15881. // bucket.
  15882. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15883. // Allows grantee to list the objects in the bucket.
  15884. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15885. // Allows grantee to read the bucket ACL.
  15886. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15887. // Allows grantee to create, overwrite, and delete any object in the bucket.
  15888. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  15889. // Allows grantee to write the ACL for the applicable bucket.
  15890. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15891. }
  15892. // String returns the string representation
  15893. func (s PutBucketAclInput) String() string {
  15894. return awsutil.Prettify(s)
  15895. }
  15896. // GoString returns the string representation
  15897. func (s PutBucketAclInput) GoString() string {
  15898. return s.String()
  15899. }
  15900. // Validate inspects the fields of the type to determine if they are valid.
  15901. func (s *PutBucketAclInput) Validate() error {
  15902. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  15903. if s.Bucket == nil {
  15904. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15905. }
  15906. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15907. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15908. }
  15909. if s.AccessControlPolicy != nil {
  15910. if err := s.AccessControlPolicy.Validate(); err != nil {
  15911. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  15912. }
  15913. }
  15914. if invalidParams.Len() > 0 {
  15915. return invalidParams
  15916. }
  15917. return nil
  15918. }
  15919. // SetACL sets the ACL field's value.
  15920. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  15921. s.ACL = &v
  15922. return s
  15923. }
  15924. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  15925. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  15926. s.AccessControlPolicy = v
  15927. return s
  15928. }
  15929. // SetBucket sets the Bucket field's value.
  15930. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  15931. s.Bucket = &v
  15932. return s
  15933. }
  15934. func (s *PutBucketAclInput) getBucket() (v string) {
  15935. if s.Bucket == nil {
  15936. return v
  15937. }
  15938. return *s.Bucket
  15939. }
  15940. // SetGrantFullControl sets the GrantFullControl field's value.
  15941. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  15942. s.GrantFullControl = &v
  15943. return s
  15944. }
  15945. // SetGrantRead sets the GrantRead field's value.
  15946. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  15947. s.GrantRead = &v
  15948. return s
  15949. }
  15950. // SetGrantReadACP sets the GrantReadACP field's value.
  15951. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  15952. s.GrantReadACP = &v
  15953. return s
  15954. }
  15955. // SetGrantWrite sets the GrantWrite field's value.
  15956. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  15957. s.GrantWrite = &v
  15958. return s
  15959. }
  15960. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15961. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  15962. s.GrantWriteACP = &v
  15963. return s
  15964. }
  15965. type PutBucketAclOutput struct {
  15966. _ struct{} `type:"structure"`
  15967. }
  15968. // String returns the string representation
  15969. func (s PutBucketAclOutput) String() string {
  15970. return awsutil.Prettify(s)
  15971. }
  15972. // GoString returns the string representation
  15973. func (s PutBucketAclOutput) GoString() string {
  15974. return s.String()
  15975. }
  15976. type PutBucketAnalyticsConfigurationInput struct {
  15977. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  15978. // The configuration and any analyses for the analytics filter.
  15979. //
  15980. // AnalyticsConfiguration is a required field
  15981. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15982. // The name of the bucket to which an analytics configuration is stored.
  15983. //
  15984. // Bucket is a required field
  15985. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15986. // The identifier used to represent an analytics configuration.
  15987. //
  15988. // Id is a required field
  15989. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  15990. }
  15991. // String returns the string representation
  15992. func (s PutBucketAnalyticsConfigurationInput) String() string {
  15993. return awsutil.Prettify(s)
  15994. }
  15995. // GoString returns the string representation
  15996. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  15997. return s.String()
  15998. }
  15999. // Validate inspects the fields of the type to determine if they are valid.
  16000. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  16001. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  16002. if s.AnalyticsConfiguration == nil {
  16003. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  16004. }
  16005. if s.Bucket == nil {
  16006. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16007. }
  16008. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16009. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16010. }
  16011. if s.Id == nil {
  16012. invalidParams.Add(request.NewErrParamRequired("Id"))
  16013. }
  16014. if s.AnalyticsConfiguration != nil {
  16015. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  16016. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  16017. }
  16018. }
  16019. if invalidParams.Len() > 0 {
  16020. return invalidParams
  16021. }
  16022. return nil
  16023. }
  16024. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  16025. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  16026. s.AnalyticsConfiguration = v
  16027. return s
  16028. }
  16029. // SetBucket sets the Bucket field's value.
  16030. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  16031. s.Bucket = &v
  16032. return s
  16033. }
  16034. func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
  16035. if s.Bucket == nil {
  16036. return v
  16037. }
  16038. return *s.Bucket
  16039. }
  16040. // SetId sets the Id field's value.
  16041. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  16042. s.Id = &v
  16043. return s
  16044. }
  16045. type PutBucketAnalyticsConfigurationOutput struct {
  16046. _ struct{} `type:"structure"`
  16047. }
  16048. // String returns the string representation
  16049. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  16050. return awsutil.Prettify(s)
  16051. }
  16052. // GoString returns the string representation
  16053. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  16054. return s.String()
  16055. }
  16056. type PutBucketCorsInput struct {
  16057. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  16058. // Bucket is a required field
  16059. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16060. // CORSConfiguration is a required field
  16061. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16062. }
  16063. // String returns the string representation
  16064. func (s PutBucketCorsInput) String() string {
  16065. return awsutil.Prettify(s)
  16066. }
  16067. // GoString returns the string representation
  16068. func (s PutBucketCorsInput) GoString() string {
  16069. return s.String()
  16070. }
  16071. // Validate inspects the fields of the type to determine if they are valid.
  16072. func (s *PutBucketCorsInput) Validate() error {
  16073. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  16074. if s.Bucket == nil {
  16075. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16076. }
  16077. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16078. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16079. }
  16080. if s.CORSConfiguration == nil {
  16081. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  16082. }
  16083. if s.CORSConfiguration != nil {
  16084. if err := s.CORSConfiguration.Validate(); err != nil {
  16085. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  16086. }
  16087. }
  16088. if invalidParams.Len() > 0 {
  16089. return invalidParams
  16090. }
  16091. return nil
  16092. }
  16093. // SetBucket sets the Bucket field's value.
  16094. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  16095. s.Bucket = &v
  16096. return s
  16097. }
  16098. func (s *PutBucketCorsInput) getBucket() (v string) {
  16099. if s.Bucket == nil {
  16100. return v
  16101. }
  16102. return *s.Bucket
  16103. }
  16104. // SetCORSConfiguration sets the CORSConfiguration field's value.
  16105. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  16106. s.CORSConfiguration = v
  16107. return s
  16108. }
  16109. type PutBucketCorsOutput struct {
  16110. _ struct{} `type:"structure"`
  16111. }
  16112. // String returns the string representation
  16113. func (s PutBucketCorsOutput) String() string {
  16114. return awsutil.Prettify(s)
  16115. }
  16116. // GoString returns the string representation
  16117. func (s PutBucketCorsOutput) GoString() string {
  16118. return s.String()
  16119. }
  16120. type PutBucketEncryptionInput struct {
  16121. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  16122. // The name of the bucket for which the server-side encryption configuration
  16123. // is set.
  16124. //
  16125. // Bucket is a required field
  16126. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16127. // Container for server-side encryption configuration rules. Currently S3 supports
  16128. // one rule only.
  16129. //
  16130. // ServerSideEncryptionConfiguration is a required field
  16131. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16132. }
  16133. // String returns the string representation
  16134. func (s PutBucketEncryptionInput) String() string {
  16135. return awsutil.Prettify(s)
  16136. }
  16137. // GoString returns the string representation
  16138. func (s PutBucketEncryptionInput) GoString() string {
  16139. return s.String()
  16140. }
  16141. // Validate inspects the fields of the type to determine if they are valid.
  16142. func (s *PutBucketEncryptionInput) Validate() error {
  16143. invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
  16144. if s.Bucket == nil {
  16145. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16146. }
  16147. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16148. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16149. }
  16150. if s.ServerSideEncryptionConfiguration == nil {
  16151. invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
  16152. }
  16153. if s.ServerSideEncryptionConfiguration != nil {
  16154. if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
  16155. invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
  16156. }
  16157. }
  16158. if invalidParams.Len() > 0 {
  16159. return invalidParams
  16160. }
  16161. return nil
  16162. }
  16163. // SetBucket sets the Bucket field's value.
  16164. func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
  16165. s.Bucket = &v
  16166. return s
  16167. }
  16168. func (s *PutBucketEncryptionInput) getBucket() (v string) {
  16169. if s.Bucket == nil {
  16170. return v
  16171. }
  16172. return *s.Bucket
  16173. }
  16174. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  16175. func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
  16176. s.ServerSideEncryptionConfiguration = v
  16177. return s
  16178. }
  16179. type PutBucketEncryptionOutput struct {
  16180. _ struct{} `type:"structure"`
  16181. }
  16182. // String returns the string representation
  16183. func (s PutBucketEncryptionOutput) String() string {
  16184. return awsutil.Prettify(s)
  16185. }
  16186. // GoString returns the string representation
  16187. func (s PutBucketEncryptionOutput) GoString() string {
  16188. return s.String()
  16189. }
  16190. type PutBucketInventoryConfigurationInput struct {
  16191. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  16192. // The name of the bucket where the inventory configuration will be stored.
  16193. //
  16194. // Bucket is a required field
  16195. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16196. // The ID used to identify the inventory configuration.
  16197. //
  16198. // Id is a required field
  16199. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  16200. // Specifies the inventory configuration.
  16201. //
  16202. // InventoryConfiguration is a required field
  16203. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16204. }
  16205. // String returns the string representation
  16206. func (s PutBucketInventoryConfigurationInput) String() string {
  16207. return awsutil.Prettify(s)
  16208. }
  16209. // GoString returns the string representation
  16210. func (s PutBucketInventoryConfigurationInput) GoString() string {
  16211. return s.String()
  16212. }
  16213. // Validate inspects the fields of the type to determine if they are valid.
  16214. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  16215. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  16216. if s.Bucket == nil {
  16217. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16218. }
  16219. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16220. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16221. }
  16222. if s.Id == nil {
  16223. invalidParams.Add(request.NewErrParamRequired("Id"))
  16224. }
  16225. if s.InventoryConfiguration == nil {
  16226. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  16227. }
  16228. if s.InventoryConfiguration != nil {
  16229. if err := s.InventoryConfiguration.Validate(); err != nil {
  16230. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  16231. }
  16232. }
  16233. if invalidParams.Len() > 0 {
  16234. return invalidParams
  16235. }
  16236. return nil
  16237. }
  16238. // SetBucket sets the Bucket field's value.
  16239. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  16240. s.Bucket = &v
  16241. return s
  16242. }
  16243. func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
  16244. if s.Bucket == nil {
  16245. return v
  16246. }
  16247. return *s.Bucket
  16248. }
  16249. // SetId sets the Id field's value.
  16250. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  16251. s.Id = &v
  16252. return s
  16253. }
  16254. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  16255. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  16256. s.InventoryConfiguration = v
  16257. return s
  16258. }
  16259. type PutBucketInventoryConfigurationOutput struct {
  16260. _ struct{} `type:"structure"`
  16261. }
  16262. // String returns the string representation
  16263. func (s PutBucketInventoryConfigurationOutput) String() string {
  16264. return awsutil.Prettify(s)
  16265. }
  16266. // GoString returns the string representation
  16267. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  16268. return s.String()
  16269. }
  16270. type PutBucketLifecycleConfigurationInput struct {
  16271. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  16272. // Bucket is a required field
  16273. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16274. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16275. }
  16276. // String returns the string representation
  16277. func (s PutBucketLifecycleConfigurationInput) String() string {
  16278. return awsutil.Prettify(s)
  16279. }
  16280. // GoString returns the string representation
  16281. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  16282. return s.String()
  16283. }
  16284. // Validate inspects the fields of the type to determine if they are valid.
  16285. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  16286. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  16287. if s.Bucket == nil {
  16288. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16289. }
  16290. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16291. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16292. }
  16293. if s.LifecycleConfiguration != nil {
  16294. if err := s.LifecycleConfiguration.Validate(); err != nil {
  16295. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  16296. }
  16297. }
  16298. if invalidParams.Len() > 0 {
  16299. return invalidParams
  16300. }
  16301. return nil
  16302. }
  16303. // SetBucket sets the Bucket field's value.
  16304. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  16305. s.Bucket = &v
  16306. return s
  16307. }
  16308. func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
  16309. if s.Bucket == nil {
  16310. return v
  16311. }
  16312. return *s.Bucket
  16313. }
  16314. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  16315. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  16316. s.LifecycleConfiguration = v
  16317. return s
  16318. }
  16319. type PutBucketLifecycleConfigurationOutput struct {
  16320. _ struct{} `type:"structure"`
  16321. }
  16322. // String returns the string representation
  16323. func (s PutBucketLifecycleConfigurationOutput) String() string {
  16324. return awsutil.Prettify(s)
  16325. }
  16326. // GoString returns the string representation
  16327. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  16328. return s.String()
  16329. }
  16330. type PutBucketLifecycleInput struct {
  16331. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  16332. // Bucket is a required field
  16333. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16334. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16335. }
  16336. // String returns the string representation
  16337. func (s PutBucketLifecycleInput) String() string {
  16338. return awsutil.Prettify(s)
  16339. }
  16340. // GoString returns the string representation
  16341. func (s PutBucketLifecycleInput) GoString() string {
  16342. return s.String()
  16343. }
  16344. // Validate inspects the fields of the type to determine if they are valid.
  16345. func (s *PutBucketLifecycleInput) Validate() error {
  16346. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  16347. if s.Bucket == nil {
  16348. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16349. }
  16350. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16351. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16352. }
  16353. if s.LifecycleConfiguration != nil {
  16354. if err := s.LifecycleConfiguration.Validate(); err != nil {
  16355. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  16356. }
  16357. }
  16358. if invalidParams.Len() > 0 {
  16359. return invalidParams
  16360. }
  16361. return nil
  16362. }
  16363. // SetBucket sets the Bucket field's value.
  16364. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  16365. s.Bucket = &v
  16366. return s
  16367. }
  16368. func (s *PutBucketLifecycleInput) getBucket() (v string) {
  16369. if s.Bucket == nil {
  16370. return v
  16371. }
  16372. return *s.Bucket
  16373. }
  16374. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  16375. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  16376. s.LifecycleConfiguration = v
  16377. return s
  16378. }
  16379. type PutBucketLifecycleOutput struct {
  16380. _ struct{} `type:"structure"`
  16381. }
  16382. // String returns the string representation
  16383. func (s PutBucketLifecycleOutput) String() string {
  16384. return awsutil.Prettify(s)
  16385. }
  16386. // GoString returns the string representation
  16387. func (s PutBucketLifecycleOutput) GoString() string {
  16388. return s.String()
  16389. }
  16390. type PutBucketLoggingInput struct {
  16391. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  16392. // Bucket is a required field
  16393. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16394. // BucketLoggingStatus is a required field
  16395. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16396. }
  16397. // String returns the string representation
  16398. func (s PutBucketLoggingInput) String() string {
  16399. return awsutil.Prettify(s)
  16400. }
  16401. // GoString returns the string representation
  16402. func (s PutBucketLoggingInput) GoString() string {
  16403. return s.String()
  16404. }
  16405. // Validate inspects the fields of the type to determine if they are valid.
  16406. func (s *PutBucketLoggingInput) Validate() error {
  16407. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  16408. if s.Bucket == nil {
  16409. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16410. }
  16411. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16412. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16413. }
  16414. if s.BucketLoggingStatus == nil {
  16415. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  16416. }
  16417. if s.BucketLoggingStatus != nil {
  16418. if err := s.BucketLoggingStatus.Validate(); err != nil {
  16419. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  16420. }
  16421. }
  16422. if invalidParams.Len() > 0 {
  16423. return invalidParams
  16424. }
  16425. return nil
  16426. }
  16427. // SetBucket sets the Bucket field's value.
  16428. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  16429. s.Bucket = &v
  16430. return s
  16431. }
  16432. func (s *PutBucketLoggingInput) getBucket() (v string) {
  16433. if s.Bucket == nil {
  16434. return v
  16435. }
  16436. return *s.Bucket
  16437. }
  16438. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  16439. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  16440. s.BucketLoggingStatus = v
  16441. return s
  16442. }
  16443. type PutBucketLoggingOutput struct {
  16444. _ struct{} `type:"structure"`
  16445. }
  16446. // String returns the string representation
  16447. func (s PutBucketLoggingOutput) String() string {
  16448. return awsutil.Prettify(s)
  16449. }
  16450. // GoString returns the string representation
  16451. func (s PutBucketLoggingOutput) GoString() string {
  16452. return s.String()
  16453. }
  16454. type PutBucketMetricsConfigurationInput struct {
  16455. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  16456. // The name of the bucket for which the metrics configuration is set.
  16457. //
  16458. // Bucket is a required field
  16459. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16460. // The ID used to identify the metrics configuration.
  16461. //
  16462. // Id is a required field
  16463. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  16464. // Specifies the metrics configuration.
  16465. //
  16466. // MetricsConfiguration is a required field
  16467. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16468. }
  16469. // String returns the string representation
  16470. func (s PutBucketMetricsConfigurationInput) String() string {
  16471. return awsutil.Prettify(s)
  16472. }
  16473. // GoString returns the string representation
  16474. func (s PutBucketMetricsConfigurationInput) GoString() string {
  16475. return s.String()
  16476. }
  16477. // Validate inspects the fields of the type to determine if they are valid.
  16478. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  16479. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  16480. if s.Bucket == nil {
  16481. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16482. }
  16483. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16484. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16485. }
  16486. if s.Id == nil {
  16487. invalidParams.Add(request.NewErrParamRequired("Id"))
  16488. }
  16489. if s.MetricsConfiguration == nil {
  16490. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  16491. }
  16492. if s.MetricsConfiguration != nil {
  16493. if err := s.MetricsConfiguration.Validate(); err != nil {
  16494. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  16495. }
  16496. }
  16497. if invalidParams.Len() > 0 {
  16498. return invalidParams
  16499. }
  16500. return nil
  16501. }
  16502. // SetBucket sets the Bucket field's value.
  16503. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  16504. s.Bucket = &v
  16505. return s
  16506. }
  16507. func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
  16508. if s.Bucket == nil {
  16509. return v
  16510. }
  16511. return *s.Bucket
  16512. }
  16513. // SetId sets the Id field's value.
  16514. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  16515. s.Id = &v
  16516. return s
  16517. }
  16518. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  16519. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  16520. s.MetricsConfiguration = v
  16521. return s
  16522. }
  16523. type PutBucketMetricsConfigurationOutput struct {
  16524. _ struct{} `type:"structure"`
  16525. }
  16526. // String returns the string representation
  16527. func (s PutBucketMetricsConfigurationOutput) String() string {
  16528. return awsutil.Prettify(s)
  16529. }
  16530. // GoString returns the string representation
  16531. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  16532. return s.String()
  16533. }
  16534. type PutBucketNotificationConfigurationInput struct {
  16535. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  16536. // Bucket is a required field
  16537. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16538. // A container for specifying the notification configuration of the bucket.
  16539. // If this element is empty, notifications are turned off for the bucket.
  16540. //
  16541. // NotificationConfiguration is a required field
  16542. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16543. }
  16544. // String returns the string representation
  16545. func (s PutBucketNotificationConfigurationInput) String() string {
  16546. return awsutil.Prettify(s)
  16547. }
  16548. // GoString returns the string representation
  16549. func (s PutBucketNotificationConfigurationInput) GoString() string {
  16550. return s.String()
  16551. }
  16552. // Validate inspects the fields of the type to determine if they are valid.
  16553. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  16554. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  16555. if s.Bucket == nil {
  16556. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16557. }
  16558. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16559. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16560. }
  16561. if s.NotificationConfiguration == nil {
  16562. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  16563. }
  16564. if s.NotificationConfiguration != nil {
  16565. if err := s.NotificationConfiguration.Validate(); err != nil {
  16566. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  16567. }
  16568. }
  16569. if invalidParams.Len() > 0 {
  16570. return invalidParams
  16571. }
  16572. return nil
  16573. }
  16574. // SetBucket sets the Bucket field's value.
  16575. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  16576. s.Bucket = &v
  16577. return s
  16578. }
  16579. func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
  16580. if s.Bucket == nil {
  16581. return v
  16582. }
  16583. return *s.Bucket
  16584. }
  16585. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  16586. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  16587. s.NotificationConfiguration = v
  16588. return s
  16589. }
  16590. type PutBucketNotificationConfigurationOutput struct {
  16591. _ struct{} `type:"structure"`
  16592. }
  16593. // String returns the string representation
  16594. func (s PutBucketNotificationConfigurationOutput) String() string {
  16595. return awsutil.Prettify(s)
  16596. }
  16597. // GoString returns the string representation
  16598. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  16599. return s.String()
  16600. }
  16601. type PutBucketNotificationInput struct {
  16602. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  16603. // Bucket is a required field
  16604. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16605. // NotificationConfiguration is a required field
  16606. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16607. }
  16608. // String returns the string representation
  16609. func (s PutBucketNotificationInput) String() string {
  16610. return awsutil.Prettify(s)
  16611. }
  16612. // GoString returns the string representation
  16613. func (s PutBucketNotificationInput) GoString() string {
  16614. return s.String()
  16615. }
  16616. // Validate inspects the fields of the type to determine if they are valid.
  16617. func (s *PutBucketNotificationInput) Validate() error {
  16618. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  16619. if s.Bucket == nil {
  16620. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16621. }
  16622. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16623. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16624. }
  16625. if s.NotificationConfiguration == nil {
  16626. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  16627. }
  16628. if invalidParams.Len() > 0 {
  16629. return invalidParams
  16630. }
  16631. return nil
  16632. }
  16633. // SetBucket sets the Bucket field's value.
  16634. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  16635. s.Bucket = &v
  16636. return s
  16637. }
  16638. func (s *PutBucketNotificationInput) getBucket() (v string) {
  16639. if s.Bucket == nil {
  16640. return v
  16641. }
  16642. return *s.Bucket
  16643. }
  16644. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  16645. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  16646. s.NotificationConfiguration = v
  16647. return s
  16648. }
  16649. type PutBucketNotificationOutput struct {
  16650. _ struct{} `type:"structure"`
  16651. }
  16652. // String returns the string representation
  16653. func (s PutBucketNotificationOutput) String() string {
  16654. return awsutil.Prettify(s)
  16655. }
  16656. // GoString returns the string representation
  16657. func (s PutBucketNotificationOutput) GoString() string {
  16658. return s.String()
  16659. }
  16660. type PutBucketPolicyInput struct {
  16661. _ struct{} `type:"structure" payload:"Policy"`
  16662. // Bucket is a required field
  16663. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16664. // Set this parameter to true to confirm that you want to remove your permissions
  16665. // to change this bucket policy in the future.
  16666. ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
  16667. // The bucket policy as a JSON document.
  16668. //
  16669. // Policy is a required field
  16670. Policy *string `type:"string" required:"true"`
  16671. }
  16672. // String returns the string representation
  16673. func (s PutBucketPolicyInput) String() string {
  16674. return awsutil.Prettify(s)
  16675. }
  16676. // GoString returns the string representation
  16677. func (s PutBucketPolicyInput) GoString() string {
  16678. return s.String()
  16679. }
  16680. // Validate inspects the fields of the type to determine if they are valid.
  16681. func (s *PutBucketPolicyInput) Validate() error {
  16682. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  16683. if s.Bucket == nil {
  16684. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16685. }
  16686. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16687. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16688. }
  16689. if s.Policy == nil {
  16690. invalidParams.Add(request.NewErrParamRequired("Policy"))
  16691. }
  16692. if invalidParams.Len() > 0 {
  16693. return invalidParams
  16694. }
  16695. return nil
  16696. }
  16697. // SetBucket sets the Bucket field's value.
  16698. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  16699. s.Bucket = &v
  16700. return s
  16701. }
  16702. func (s *PutBucketPolicyInput) getBucket() (v string) {
  16703. if s.Bucket == nil {
  16704. return v
  16705. }
  16706. return *s.Bucket
  16707. }
  16708. // SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
  16709. func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
  16710. s.ConfirmRemoveSelfBucketAccess = &v
  16711. return s
  16712. }
  16713. // SetPolicy sets the Policy field's value.
  16714. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  16715. s.Policy = &v
  16716. return s
  16717. }
  16718. type PutBucketPolicyOutput struct {
  16719. _ struct{} `type:"structure"`
  16720. }
  16721. // String returns the string representation
  16722. func (s PutBucketPolicyOutput) String() string {
  16723. return awsutil.Prettify(s)
  16724. }
  16725. // GoString returns the string representation
  16726. func (s PutBucketPolicyOutput) GoString() string {
  16727. return s.String()
  16728. }
  16729. type PutBucketReplicationInput struct {
  16730. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  16731. // Bucket is a required field
  16732. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16733. // A container for replication rules. You can add up to 1,000 rules. The maximum
  16734. // size of a replication configuration is 2 MB.
  16735. //
  16736. // ReplicationConfiguration is a required field
  16737. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16738. }
  16739. // String returns the string representation
  16740. func (s PutBucketReplicationInput) String() string {
  16741. return awsutil.Prettify(s)
  16742. }
  16743. // GoString returns the string representation
  16744. func (s PutBucketReplicationInput) GoString() string {
  16745. return s.String()
  16746. }
  16747. // Validate inspects the fields of the type to determine if they are valid.
  16748. func (s *PutBucketReplicationInput) Validate() error {
  16749. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  16750. if s.Bucket == nil {
  16751. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16752. }
  16753. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16754. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16755. }
  16756. if s.ReplicationConfiguration == nil {
  16757. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  16758. }
  16759. if s.ReplicationConfiguration != nil {
  16760. if err := s.ReplicationConfiguration.Validate(); err != nil {
  16761. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  16762. }
  16763. }
  16764. if invalidParams.Len() > 0 {
  16765. return invalidParams
  16766. }
  16767. return nil
  16768. }
  16769. // SetBucket sets the Bucket field's value.
  16770. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  16771. s.Bucket = &v
  16772. return s
  16773. }
  16774. func (s *PutBucketReplicationInput) getBucket() (v string) {
  16775. if s.Bucket == nil {
  16776. return v
  16777. }
  16778. return *s.Bucket
  16779. }
  16780. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  16781. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  16782. s.ReplicationConfiguration = v
  16783. return s
  16784. }
  16785. type PutBucketReplicationOutput struct {
  16786. _ struct{} `type:"structure"`
  16787. }
  16788. // String returns the string representation
  16789. func (s PutBucketReplicationOutput) String() string {
  16790. return awsutil.Prettify(s)
  16791. }
  16792. // GoString returns the string representation
  16793. func (s PutBucketReplicationOutput) GoString() string {
  16794. return s.String()
  16795. }
  16796. type PutBucketRequestPaymentInput struct {
  16797. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  16798. // Bucket is a required field
  16799. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16800. // RequestPaymentConfiguration is a required field
  16801. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16802. }
  16803. // String returns the string representation
  16804. func (s PutBucketRequestPaymentInput) String() string {
  16805. return awsutil.Prettify(s)
  16806. }
  16807. // GoString returns the string representation
  16808. func (s PutBucketRequestPaymentInput) GoString() string {
  16809. return s.String()
  16810. }
  16811. // Validate inspects the fields of the type to determine if they are valid.
  16812. func (s *PutBucketRequestPaymentInput) Validate() error {
  16813. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  16814. if s.Bucket == nil {
  16815. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16816. }
  16817. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16818. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16819. }
  16820. if s.RequestPaymentConfiguration == nil {
  16821. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  16822. }
  16823. if s.RequestPaymentConfiguration != nil {
  16824. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  16825. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  16826. }
  16827. }
  16828. if invalidParams.Len() > 0 {
  16829. return invalidParams
  16830. }
  16831. return nil
  16832. }
  16833. // SetBucket sets the Bucket field's value.
  16834. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  16835. s.Bucket = &v
  16836. return s
  16837. }
  16838. func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
  16839. if s.Bucket == nil {
  16840. return v
  16841. }
  16842. return *s.Bucket
  16843. }
  16844. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  16845. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  16846. s.RequestPaymentConfiguration = v
  16847. return s
  16848. }
  16849. type PutBucketRequestPaymentOutput struct {
  16850. _ struct{} `type:"structure"`
  16851. }
  16852. // String returns the string representation
  16853. func (s PutBucketRequestPaymentOutput) String() string {
  16854. return awsutil.Prettify(s)
  16855. }
  16856. // GoString returns the string representation
  16857. func (s PutBucketRequestPaymentOutput) GoString() string {
  16858. return s.String()
  16859. }
  16860. type PutBucketTaggingInput struct {
  16861. _ struct{} `type:"structure" payload:"Tagging"`
  16862. // Bucket is a required field
  16863. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16864. // Tagging is a required field
  16865. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16866. }
  16867. // String returns the string representation
  16868. func (s PutBucketTaggingInput) String() string {
  16869. return awsutil.Prettify(s)
  16870. }
  16871. // GoString returns the string representation
  16872. func (s PutBucketTaggingInput) GoString() string {
  16873. return s.String()
  16874. }
  16875. // Validate inspects the fields of the type to determine if they are valid.
  16876. func (s *PutBucketTaggingInput) Validate() error {
  16877. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  16878. if s.Bucket == nil {
  16879. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16880. }
  16881. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16882. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16883. }
  16884. if s.Tagging == nil {
  16885. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  16886. }
  16887. if s.Tagging != nil {
  16888. if err := s.Tagging.Validate(); err != nil {
  16889. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  16890. }
  16891. }
  16892. if invalidParams.Len() > 0 {
  16893. return invalidParams
  16894. }
  16895. return nil
  16896. }
  16897. // SetBucket sets the Bucket field's value.
  16898. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  16899. s.Bucket = &v
  16900. return s
  16901. }
  16902. func (s *PutBucketTaggingInput) getBucket() (v string) {
  16903. if s.Bucket == nil {
  16904. return v
  16905. }
  16906. return *s.Bucket
  16907. }
  16908. // SetTagging sets the Tagging field's value.
  16909. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  16910. s.Tagging = v
  16911. return s
  16912. }
  16913. type PutBucketTaggingOutput struct {
  16914. _ struct{} `type:"structure"`
  16915. }
  16916. // String returns the string representation
  16917. func (s PutBucketTaggingOutput) String() string {
  16918. return awsutil.Prettify(s)
  16919. }
  16920. // GoString returns the string representation
  16921. func (s PutBucketTaggingOutput) GoString() string {
  16922. return s.String()
  16923. }
  16924. type PutBucketVersioningInput struct {
  16925. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  16926. // Bucket is a required field
  16927. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16928. // The concatenation of the authentication device's serial number, a space,
  16929. // and the value that is displayed on your authentication device.
  16930. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  16931. // VersioningConfiguration is a required field
  16932. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16933. }
  16934. // String returns the string representation
  16935. func (s PutBucketVersioningInput) String() string {
  16936. return awsutil.Prettify(s)
  16937. }
  16938. // GoString returns the string representation
  16939. func (s PutBucketVersioningInput) GoString() string {
  16940. return s.String()
  16941. }
  16942. // Validate inspects the fields of the type to determine if they are valid.
  16943. func (s *PutBucketVersioningInput) Validate() error {
  16944. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  16945. if s.Bucket == nil {
  16946. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16947. }
  16948. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16949. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16950. }
  16951. if s.VersioningConfiguration == nil {
  16952. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  16953. }
  16954. if invalidParams.Len() > 0 {
  16955. return invalidParams
  16956. }
  16957. return nil
  16958. }
  16959. // SetBucket sets the Bucket field's value.
  16960. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  16961. s.Bucket = &v
  16962. return s
  16963. }
  16964. func (s *PutBucketVersioningInput) getBucket() (v string) {
  16965. if s.Bucket == nil {
  16966. return v
  16967. }
  16968. return *s.Bucket
  16969. }
  16970. // SetMFA sets the MFA field's value.
  16971. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  16972. s.MFA = &v
  16973. return s
  16974. }
  16975. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  16976. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  16977. s.VersioningConfiguration = v
  16978. return s
  16979. }
  16980. type PutBucketVersioningOutput struct {
  16981. _ struct{} `type:"structure"`
  16982. }
  16983. // String returns the string representation
  16984. func (s PutBucketVersioningOutput) String() string {
  16985. return awsutil.Prettify(s)
  16986. }
  16987. // GoString returns the string representation
  16988. func (s PutBucketVersioningOutput) GoString() string {
  16989. return s.String()
  16990. }
  16991. type PutBucketWebsiteInput struct {
  16992. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  16993. // Bucket is a required field
  16994. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16995. // WebsiteConfiguration is a required field
  16996. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16997. }
  16998. // String returns the string representation
  16999. func (s PutBucketWebsiteInput) String() string {
  17000. return awsutil.Prettify(s)
  17001. }
  17002. // GoString returns the string representation
  17003. func (s PutBucketWebsiteInput) GoString() string {
  17004. return s.String()
  17005. }
  17006. // Validate inspects the fields of the type to determine if they are valid.
  17007. func (s *PutBucketWebsiteInput) Validate() error {
  17008. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  17009. if s.Bucket == nil {
  17010. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17011. }
  17012. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17013. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17014. }
  17015. if s.WebsiteConfiguration == nil {
  17016. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  17017. }
  17018. if s.WebsiteConfiguration != nil {
  17019. if err := s.WebsiteConfiguration.Validate(); err != nil {
  17020. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  17021. }
  17022. }
  17023. if invalidParams.Len() > 0 {
  17024. return invalidParams
  17025. }
  17026. return nil
  17027. }
  17028. // SetBucket sets the Bucket field's value.
  17029. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  17030. s.Bucket = &v
  17031. return s
  17032. }
  17033. func (s *PutBucketWebsiteInput) getBucket() (v string) {
  17034. if s.Bucket == nil {
  17035. return v
  17036. }
  17037. return *s.Bucket
  17038. }
  17039. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  17040. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  17041. s.WebsiteConfiguration = v
  17042. return s
  17043. }
  17044. type PutBucketWebsiteOutput struct {
  17045. _ struct{} `type:"structure"`
  17046. }
  17047. // String returns the string representation
  17048. func (s PutBucketWebsiteOutput) String() string {
  17049. return awsutil.Prettify(s)
  17050. }
  17051. // GoString returns the string representation
  17052. func (s PutBucketWebsiteOutput) GoString() string {
  17053. return s.String()
  17054. }
  17055. type PutObjectAclInput struct {
  17056. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  17057. // The canned ACL to apply to the object.
  17058. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  17059. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17060. // Bucket is a required field
  17061. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17062. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  17063. // bucket.
  17064. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  17065. // Allows grantee to list the objects in the bucket.
  17066. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  17067. // Allows grantee to read the bucket ACL.
  17068. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  17069. // Allows grantee to create, overwrite, and delete any object in the bucket.
  17070. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  17071. // Allows grantee to write the ACL for the applicable bucket.
  17072. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  17073. // Key is a required field
  17074. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17075. // Confirms that the requester knows that she or he will be charged for the
  17076. // request. Bucket owners need not specify this parameter in their requests.
  17077. // Documentation on downloading objects from requester pays buckets can be found
  17078. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17079. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17080. // VersionId used to reference a specific version of the object.
  17081. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17082. }
  17083. // String returns the string representation
  17084. func (s PutObjectAclInput) String() string {
  17085. return awsutil.Prettify(s)
  17086. }
  17087. // GoString returns the string representation
  17088. func (s PutObjectAclInput) GoString() string {
  17089. return s.String()
  17090. }
  17091. // Validate inspects the fields of the type to determine if they are valid.
  17092. func (s *PutObjectAclInput) Validate() error {
  17093. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  17094. if s.Bucket == nil {
  17095. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17096. }
  17097. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17098. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17099. }
  17100. if s.Key == nil {
  17101. invalidParams.Add(request.NewErrParamRequired("Key"))
  17102. }
  17103. if s.Key != nil && len(*s.Key) < 1 {
  17104. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17105. }
  17106. if s.AccessControlPolicy != nil {
  17107. if err := s.AccessControlPolicy.Validate(); err != nil {
  17108. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  17109. }
  17110. }
  17111. if invalidParams.Len() > 0 {
  17112. return invalidParams
  17113. }
  17114. return nil
  17115. }
  17116. // SetACL sets the ACL field's value.
  17117. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  17118. s.ACL = &v
  17119. return s
  17120. }
  17121. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  17122. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  17123. s.AccessControlPolicy = v
  17124. return s
  17125. }
  17126. // SetBucket sets the Bucket field's value.
  17127. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  17128. s.Bucket = &v
  17129. return s
  17130. }
  17131. func (s *PutObjectAclInput) getBucket() (v string) {
  17132. if s.Bucket == nil {
  17133. return v
  17134. }
  17135. return *s.Bucket
  17136. }
  17137. // SetGrantFullControl sets the GrantFullControl field's value.
  17138. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  17139. s.GrantFullControl = &v
  17140. return s
  17141. }
  17142. // SetGrantRead sets the GrantRead field's value.
  17143. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  17144. s.GrantRead = &v
  17145. return s
  17146. }
  17147. // SetGrantReadACP sets the GrantReadACP field's value.
  17148. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  17149. s.GrantReadACP = &v
  17150. return s
  17151. }
  17152. // SetGrantWrite sets the GrantWrite field's value.
  17153. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  17154. s.GrantWrite = &v
  17155. return s
  17156. }
  17157. // SetGrantWriteACP sets the GrantWriteACP field's value.
  17158. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  17159. s.GrantWriteACP = &v
  17160. return s
  17161. }
  17162. // SetKey sets the Key field's value.
  17163. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  17164. s.Key = &v
  17165. return s
  17166. }
  17167. // SetRequestPayer sets the RequestPayer field's value.
  17168. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  17169. s.RequestPayer = &v
  17170. return s
  17171. }
  17172. // SetVersionId sets the VersionId field's value.
  17173. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  17174. s.VersionId = &v
  17175. return s
  17176. }
  17177. type PutObjectAclOutput struct {
  17178. _ struct{} `type:"structure"`
  17179. // If present, indicates that the requester was successfully charged for the
  17180. // request.
  17181. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17182. }
  17183. // String returns the string representation
  17184. func (s PutObjectAclOutput) String() string {
  17185. return awsutil.Prettify(s)
  17186. }
  17187. // GoString returns the string representation
  17188. func (s PutObjectAclOutput) GoString() string {
  17189. return s.String()
  17190. }
  17191. // SetRequestCharged sets the RequestCharged field's value.
  17192. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  17193. s.RequestCharged = &v
  17194. return s
  17195. }
  17196. type PutObjectInput struct {
  17197. _ struct{} `type:"structure" payload:"Body"`
  17198. // The canned ACL to apply to the object.
  17199. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  17200. // Object data.
  17201. Body io.ReadSeeker `type:"blob"`
  17202. // Name of the bucket to which the PUT operation was initiated.
  17203. //
  17204. // Bucket is a required field
  17205. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17206. // Specifies caching behavior along the request/reply chain.
  17207. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  17208. // Specifies presentational information for the object.
  17209. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  17210. // Specifies what content encodings have been applied to the object and thus
  17211. // what decoding mechanisms must be applied to obtain the media-type referenced
  17212. // by the Content-Type header field.
  17213. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  17214. // The language the content is in.
  17215. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  17216. // Size of the body in bytes. This parameter is useful when the size of the
  17217. // body cannot be determined automatically.
  17218. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  17219. // The base64-encoded 128-bit MD5 digest of the part data.
  17220. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  17221. // A standard MIME type describing the format of the object data.
  17222. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  17223. // The date and time at which the object is no longer cacheable.
  17224. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  17225. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  17226. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  17227. // Allows grantee to read the object data and its metadata.
  17228. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  17229. // Allows grantee to read the object ACL.
  17230. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  17231. // Allows grantee to write the ACL for the applicable object.
  17232. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  17233. // Object key for which the PUT operation was initiated.
  17234. //
  17235. // Key is a required field
  17236. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17237. // A map of metadata to store with the object in S3.
  17238. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  17239. // The Legal Hold status that you want to apply to the specified object.
  17240. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  17241. // The Object Lock mode that you want to apply to this object.
  17242. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  17243. // The date and time when you want this object's Object Lock to expire.
  17244. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  17245. // Confirms that the requester knows that she or he will be charged for the
  17246. // request. Bucket owners need not specify this parameter in their requests.
  17247. // Documentation on downloading objects from requester pays buckets can be found
  17248. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17249. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17250. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  17251. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17252. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  17253. // data. This value is used to store the object and then it is discarded; Amazon
  17254. // does not store the encryption key. The key must be appropriate for use with
  17255. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  17256. // header.
  17257. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  17258. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17259. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17260. // key was transmitted without error.
  17261. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17262. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  17263. // requests for an object protected by AWS KMS will fail if not made via SSL
  17264. // or using SigV4. Documentation on configuring any of the officially supported
  17265. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  17266. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  17267. // The Server-side encryption algorithm used when storing this object in S3
  17268. // (e.g., AES256, aws:kms).
  17269. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17270. // The type of storage to use for the object. Defaults to 'STANDARD'.
  17271. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  17272. // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
  17273. // (For example, "Key1=Value1")
  17274. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  17275. // If the bucket is configured as a website, redirects requests for this object
  17276. // to another object in the same bucket or to an external URL. Amazon S3 stores
  17277. // the value of this header in the object metadata.
  17278. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  17279. }
  17280. // String returns the string representation
  17281. func (s PutObjectInput) String() string {
  17282. return awsutil.Prettify(s)
  17283. }
  17284. // GoString returns the string representation
  17285. func (s PutObjectInput) GoString() string {
  17286. return s.String()
  17287. }
  17288. // Validate inspects the fields of the type to determine if they are valid.
  17289. func (s *PutObjectInput) Validate() error {
  17290. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  17291. if s.Bucket == nil {
  17292. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17293. }
  17294. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17295. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17296. }
  17297. if s.Key == nil {
  17298. invalidParams.Add(request.NewErrParamRequired("Key"))
  17299. }
  17300. if s.Key != nil && len(*s.Key) < 1 {
  17301. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17302. }
  17303. if invalidParams.Len() > 0 {
  17304. return invalidParams
  17305. }
  17306. return nil
  17307. }
  17308. // SetACL sets the ACL field's value.
  17309. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  17310. s.ACL = &v
  17311. return s
  17312. }
  17313. // SetBody sets the Body field's value.
  17314. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  17315. s.Body = v
  17316. return s
  17317. }
  17318. // SetBucket sets the Bucket field's value.
  17319. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  17320. s.Bucket = &v
  17321. return s
  17322. }
  17323. func (s *PutObjectInput) getBucket() (v string) {
  17324. if s.Bucket == nil {
  17325. return v
  17326. }
  17327. return *s.Bucket
  17328. }
  17329. // SetCacheControl sets the CacheControl field's value.
  17330. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  17331. s.CacheControl = &v
  17332. return s
  17333. }
  17334. // SetContentDisposition sets the ContentDisposition field's value.
  17335. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  17336. s.ContentDisposition = &v
  17337. return s
  17338. }
  17339. // SetContentEncoding sets the ContentEncoding field's value.
  17340. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  17341. s.ContentEncoding = &v
  17342. return s
  17343. }
  17344. // SetContentLanguage sets the ContentLanguage field's value.
  17345. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  17346. s.ContentLanguage = &v
  17347. return s
  17348. }
  17349. // SetContentLength sets the ContentLength field's value.
  17350. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  17351. s.ContentLength = &v
  17352. return s
  17353. }
  17354. // SetContentMD5 sets the ContentMD5 field's value.
  17355. func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
  17356. s.ContentMD5 = &v
  17357. return s
  17358. }
  17359. // SetContentType sets the ContentType field's value.
  17360. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  17361. s.ContentType = &v
  17362. return s
  17363. }
  17364. // SetExpires sets the Expires field's value.
  17365. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  17366. s.Expires = &v
  17367. return s
  17368. }
  17369. // SetGrantFullControl sets the GrantFullControl field's value.
  17370. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  17371. s.GrantFullControl = &v
  17372. return s
  17373. }
  17374. // SetGrantRead sets the GrantRead field's value.
  17375. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  17376. s.GrantRead = &v
  17377. return s
  17378. }
  17379. // SetGrantReadACP sets the GrantReadACP field's value.
  17380. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  17381. s.GrantReadACP = &v
  17382. return s
  17383. }
  17384. // SetGrantWriteACP sets the GrantWriteACP field's value.
  17385. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  17386. s.GrantWriteACP = &v
  17387. return s
  17388. }
  17389. // SetKey sets the Key field's value.
  17390. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  17391. s.Key = &v
  17392. return s
  17393. }
  17394. // SetMetadata sets the Metadata field's value.
  17395. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  17396. s.Metadata = v
  17397. return s
  17398. }
  17399. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  17400. func (s *PutObjectInput) SetObjectLockLegalHoldStatus(v string) *PutObjectInput {
  17401. s.ObjectLockLegalHoldStatus = &v
  17402. return s
  17403. }
  17404. // SetObjectLockMode sets the ObjectLockMode field's value.
  17405. func (s *PutObjectInput) SetObjectLockMode(v string) *PutObjectInput {
  17406. s.ObjectLockMode = &v
  17407. return s
  17408. }
  17409. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  17410. func (s *PutObjectInput) SetObjectLockRetainUntilDate(v time.Time) *PutObjectInput {
  17411. s.ObjectLockRetainUntilDate = &v
  17412. return s
  17413. }
  17414. // SetRequestPayer sets the RequestPayer field's value.
  17415. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  17416. s.RequestPayer = &v
  17417. return s
  17418. }
  17419. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17420. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  17421. s.SSECustomerAlgorithm = &v
  17422. return s
  17423. }
  17424. // SetSSECustomerKey sets the SSECustomerKey field's value.
  17425. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  17426. s.SSECustomerKey = &v
  17427. return s
  17428. }
  17429. func (s *PutObjectInput) getSSECustomerKey() (v string) {
  17430. if s.SSECustomerKey == nil {
  17431. return v
  17432. }
  17433. return *s.SSECustomerKey
  17434. }
  17435. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17436. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  17437. s.SSECustomerKeyMD5 = &v
  17438. return s
  17439. }
  17440. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17441. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  17442. s.SSEKMSKeyId = &v
  17443. return s
  17444. }
  17445. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17446. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  17447. s.ServerSideEncryption = &v
  17448. return s
  17449. }
  17450. // SetStorageClass sets the StorageClass field's value.
  17451. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  17452. s.StorageClass = &v
  17453. return s
  17454. }
  17455. // SetTagging sets the Tagging field's value.
  17456. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  17457. s.Tagging = &v
  17458. return s
  17459. }
  17460. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  17461. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  17462. s.WebsiteRedirectLocation = &v
  17463. return s
  17464. }
  17465. type PutObjectLegalHoldInput struct {
  17466. _ struct{} `type:"structure" payload:"LegalHold"`
  17467. // The bucket containing the object that you want to place a Legal Hold on.
  17468. //
  17469. // Bucket is a required field
  17470. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17471. // The key name for the object that you want to place a Legal Hold on.
  17472. //
  17473. // Key is a required field
  17474. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17475. // Container element for the Legal Hold configuration you want to apply to the
  17476. // specified object.
  17477. LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17478. // Confirms that the requester knows that she or he will be charged for the
  17479. // request. Bucket owners need not specify this parameter in their requests.
  17480. // Documentation on downloading objects from requester pays buckets can be found
  17481. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17482. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17483. // The version ID of the object that you want to place a Legal Hold on.
  17484. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17485. }
  17486. // String returns the string representation
  17487. func (s PutObjectLegalHoldInput) String() string {
  17488. return awsutil.Prettify(s)
  17489. }
  17490. // GoString returns the string representation
  17491. func (s PutObjectLegalHoldInput) GoString() string {
  17492. return s.String()
  17493. }
  17494. // Validate inspects the fields of the type to determine if they are valid.
  17495. func (s *PutObjectLegalHoldInput) Validate() error {
  17496. invalidParams := request.ErrInvalidParams{Context: "PutObjectLegalHoldInput"}
  17497. if s.Bucket == nil {
  17498. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17499. }
  17500. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17501. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17502. }
  17503. if s.Key == nil {
  17504. invalidParams.Add(request.NewErrParamRequired("Key"))
  17505. }
  17506. if s.Key != nil && len(*s.Key) < 1 {
  17507. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17508. }
  17509. if invalidParams.Len() > 0 {
  17510. return invalidParams
  17511. }
  17512. return nil
  17513. }
  17514. // SetBucket sets the Bucket field's value.
  17515. func (s *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput {
  17516. s.Bucket = &v
  17517. return s
  17518. }
  17519. func (s *PutObjectLegalHoldInput) getBucket() (v string) {
  17520. if s.Bucket == nil {
  17521. return v
  17522. }
  17523. return *s.Bucket
  17524. }
  17525. // SetKey sets the Key field's value.
  17526. func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput {
  17527. s.Key = &v
  17528. return s
  17529. }
  17530. // SetLegalHold sets the LegalHold field's value.
  17531. func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput {
  17532. s.LegalHold = v
  17533. return s
  17534. }
  17535. // SetRequestPayer sets the RequestPayer field's value.
  17536. func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput {
  17537. s.RequestPayer = &v
  17538. return s
  17539. }
  17540. // SetVersionId sets the VersionId field's value.
  17541. func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput {
  17542. s.VersionId = &v
  17543. return s
  17544. }
  17545. type PutObjectLegalHoldOutput struct {
  17546. _ struct{} `type:"structure"`
  17547. // If present, indicates that the requester was successfully charged for the
  17548. // request.
  17549. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17550. }
  17551. // String returns the string representation
  17552. func (s PutObjectLegalHoldOutput) String() string {
  17553. return awsutil.Prettify(s)
  17554. }
  17555. // GoString returns the string representation
  17556. func (s PutObjectLegalHoldOutput) GoString() string {
  17557. return s.String()
  17558. }
  17559. // SetRequestCharged sets the RequestCharged field's value.
  17560. func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput {
  17561. s.RequestCharged = &v
  17562. return s
  17563. }
  17564. type PutObjectLockConfigurationInput struct {
  17565. _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
  17566. // The bucket whose Object Lock configuration you want to create or replace.
  17567. //
  17568. // Bucket is a required field
  17569. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17570. // The Object Lock configuration that you want to apply to the specified bucket.
  17571. ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17572. // Confirms that the requester knows that she or he will be charged for the
  17573. // request. Bucket owners need not specify this parameter in their requests.
  17574. // Documentation on downloading objects from requester pays buckets can be found
  17575. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17576. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17577. Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
  17578. }
  17579. // String returns the string representation
  17580. func (s PutObjectLockConfigurationInput) String() string {
  17581. return awsutil.Prettify(s)
  17582. }
  17583. // GoString returns the string representation
  17584. func (s PutObjectLockConfigurationInput) GoString() string {
  17585. return s.String()
  17586. }
  17587. // Validate inspects the fields of the type to determine if they are valid.
  17588. func (s *PutObjectLockConfigurationInput) Validate() error {
  17589. invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"}
  17590. if s.Bucket == nil {
  17591. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17592. }
  17593. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17594. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17595. }
  17596. if invalidParams.Len() > 0 {
  17597. return invalidParams
  17598. }
  17599. return nil
  17600. }
  17601. // SetBucket sets the Bucket field's value.
  17602. func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput {
  17603. s.Bucket = &v
  17604. return s
  17605. }
  17606. func (s *PutObjectLockConfigurationInput) getBucket() (v string) {
  17607. if s.Bucket == nil {
  17608. return v
  17609. }
  17610. return *s.Bucket
  17611. }
  17612. // SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
  17613. func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput {
  17614. s.ObjectLockConfiguration = v
  17615. return s
  17616. }
  17617. // SetRequestPayer sets the RequestPayer field's value.
  17618. func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput {
  17619. s.RequestPayer = &v
  17620. return s
  17621. }
  17622. // SetToken sets the Token field's value.
  17623. func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput {
  17624. s.Token = &v
  17625. return s
  17626. }
  17627. type PutObjectLockConfigurationOutput struct {
  17628. _ struct{} `type:"structure"`
  17629. // If present, indicates that the requester was successfully charged for the
  17630. // request.
  17631. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17632. }
  17633. // String returns the string representation
  17634. func (s PutObjectLockConfigurationOutput) String() string {
  17635. return awsutil.Prettify(s)
  17636. }
  17637. // GoString returns the string representation
  17638. func (s PutObjectLockConfigurationOutput) GoString() string {
  17639. return s.String()
  17640. }
  17641. // SetRequestCharged sets the RequestCharged field's value.
  17642. func (s *PutObjectLockConfigurationOutput) SetRequestCharged(v string) *PutObjectLockConfigurationOutput {
  17643. s.RequestCharged = &v
  17644. return s
  17645. }
  17646. type PutObjectOutput struct {
  17647. _ struct{} `type:"structure"`
  17648. // Entity tag for the uploaded object.
  17649. ETag *string `location:"header" locationName:"ETag" type:"string"`
  17650. // If the object expiration is configured, this will contain the expiration
  17651. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  17652. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  17653. // If present, indicates that the requester was successfully charged for the
  17654. // request.
  17655. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17656. // If server-side encryption with a customer-provided encryption key was requested,
  17657. // the response will include this header confirming the encryption algorithm
  17658. // used.
  17659. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17660. // If server-side encryption with a customer-provided encryption key was requested,
  17661. // the response will include this header to provide round trip message integrity
  17662. // verification of the customer-provided encryption key.
  17663. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17664. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  17665. // encryption key that was used for the object.
  17666. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  17667. // The Server-side encryption algorithm used when storing this object in S3
  17668. // (e.g., AES256, aws:kms).
  17669. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17670. // Version of the object.
  17671. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  17672. }
  17673. // String returns the string representation
  17674. func (s PutObjectOutput) String() string {
  17675. return awsutil.Prettify(s)
  17676. }
  17677. // GoString returns the string representation
  17678. func (s PutObjectOutput) GoString() string {
  17679. return s.String()
  17680. }
  17681. // SetETag sets the ETag field's value.
  17682. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  17683. s.ETag = &v
  17684. return s
  17685. }
  17686. // SetExpiration sets the Expiration field's value.
  17687. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  17688. s.Expiration = &v
  17689. return s
  17690. }
  17691. // SetRequestCharged sets the RequestCharged field's value.
  17692. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  17693. s.RequestCharged = &v
  17694. return s
  17695. }
  17696. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17697. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  17698. s.SSECustomerAlgorithm = &v
  17699. return s
  17700. }
  17701. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17702. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  17703. s.SSECustomerKeyMD5 = &v
  17704. return s
  17705. }
  17706. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17707. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  17708. s.SSEKMSKeyId = &v
  17709. return s
  17710. }
  17711. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17712. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  17713. s.ServerSideEncryption = &v
  17714. return s
  17715. }
  17716. // SetVersionId sets the VersionId field's value.
  17717. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  17718. s.VersionId = &v
  17719. return s
  17720. }
  17721. type PutObjectRetentionInput struct {
  17722. _ struct{} `type:"structure" payload:"Retention"`
  17723. // The bucket that contains the object you want to apply this Object Retention
  17724. // configuration to.
  17725. //
  17726. // Bucket is a required field
  17727. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17728. // Indicates whether this operation should bypass Governance-mode restrictions.j
  17729. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  17730. // The key name for the object that you want to apply this Object Retention
  17731. // configuration to.
  17732. //
  17733. // Key is a required field
  17734. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17735. // Confirms that the requester knows that she or he will be charged for the
  17736. // request. Bucket owners need not specify this parameter in their requests.
  17737. // Documentation on downloading objects from requester pays buckets can be found
  17738. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17739. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17740. // The container element for the Object Retention configuration.
  17741. Retention *ObjectLockRetention `locationName:"Retention" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17742. // The version ID for the object that you want to apply this Object Retention
  17743. // configuration to.
  17744. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17745. }
  17746. // String returns the string representation
  17747. func (s PutObjectRetentionInput) String() string {
  17748. return awsutil.Prettify(s)
  17749. }
  17750. // GoString returns the string representation
  17751. func (s PutObjectRetentionInput) GoString() string {
  17752. return s.String()
  17753. }
  17754. // Validate inspects the fields of the type to determine if they are valid.
  17755. func (s *PutObjectRetentionInput) Validate() error {
  17756. invalidParams := request.ErrInvalidParams{Context: "PutObjectRetentionInput"}
  17757. if s.Bucket == nil {
  17758. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17759. }
  17760. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17761. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17762. }
  17763. if s.Key == nil {
  17764. invalidParams.Add(request.NewErrParamRequired("Key"))
  17765. }
  17766. if s.Key != nil && len(*s.Key) < 1 {
  17767. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17768. }
  17769. if invalidParams.Len() > 0 {
  17770. return invalidParams
  17771. }
  17772. return nil
  17773. }
  17774. // SetBucket sets the Bucket field's value.
  17775. func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput {
  17776. s.Bucket = &v
  17777. return s
  17778. }
  17779. func (s *PutObjectRetentionInput) getBucket() (v string) {
  17780. if s.Bucket == nil {
  17781. return v
  17782. }
  17783. return *s.Bucket
  17784. }
  17785. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  17786. func (s *PutObjectRetentionInput) SetBypassGovernanceRetention(v bool) *PutObjectRetentionInput {
  17787. s.BypassGovernanceRetention = &v
  17788. return s
  17789. }
  17790. // SetKey sets the Key field's value.
  17791. func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput {
  17792. s.Key = &v
  17793. return s
  17794. }
  17795. // SetRequestPayer sets the RequestPayer field's value.
  17796. func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput {
  17797. s.RequestPayer = &v
  17798. return s
  17799. }
  17800. // SetRetention sets the Retention field's value.
  17801. func (s *PutObjectRetentionInput) SetRetention(v *ObjectLockRetention) *PutObjectRetentionInput {
  17802. s.Retention = v
  17803. return s
  17804. }
  17805. // SetVersionId sets the VersionId field's value.
  17806. func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInput {
  17807. s.VersionId = &v
  17808. return s
  17809. }
  17810. type PutObjectRetentionOutput struct {
  17811. _ struct{} `type:"structure"`
  17812. // If present, indicates that the requester was successfully charged for the
  17813. // request.
  17814. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17815. }
  17816. // String returns the string representation
  17817. func (s PutObjectRetentionOutput) String() string {
  17818. return awsutil.Prettify(s)
  17819. }
  17820. // GoString returns the string representation
  17821. func (s PutObjectRetentionOutput) GoString() string {
  17822. return s.String()
  17823. }
  17824. // SetRequestCharged sets the RequestCharged field's value.
  17825. func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetentionOutput {
  17826. s.RequestCharged = &v
  17827. return s
  17828. }
  17829. type PutObjectTaggingInput struct {
  17830. _ struct{} `type:"structure" payload:"Tagging"`
  17831. // Bucket is a required field
  17832. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17833. // Key is a required field
  17834. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17835. // Tagging is a required field
  17836. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17837. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17838. }
  17839. // String returns the string representation
  17840. func (s PutObjectTaggingInput) String() string {
  17841. return awsutil.Prettify(s)
  17842. }
  17843. // GoString returns the string representation
  17844. func (s PutObjectTaggingInput) GoString() string {
  17845. return s.String()
  17846. }
  17847. // Validate inspects the fields of the type to determine if they are valid.
  17848. func (s *PutObjectTaggingInput) Validate() error {
  17849. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  17850. if s.Bucket == nil {
  17851. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17852. }
  17853. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17854. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17855. }
  17856. if s.Key == nil {
  17857. invalidParams.Add(request.NewErrParamRequired("Key"))
  17858. }
  17859. if s.Key != nil && len(*s.Key) < 1 {
  17860. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17861. }
  17862. if s.Tagging == nil {
  17863. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  17864. }
  17865. if s.Tagging != nil {
  17866. if err := s.Tagging.Validate(); err != nil {
  17867. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  17868. }
  17869. }
  17870. if invalidParams.Len() > 0 {
  17871. return invalidParams
  17872. }
  17873. return nil
  17874. }
  17875. // SetBucket sets the Bucket field's value.
  17876. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  17877. s.Bucket = &v
  17878. return s
  17879. }
  17880. func (s *PutObjectTaggingInput) getBucket() (v string) {
  17881. if s.Bucket == nil {
  17882. return v
  17883. }
  17884. return *s.Bucket
  17885. }
  17886. // SetKey sets the Key field's value.
  17887. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  17888. s.Key = &v
  17889. return s
  17890. }
  17891. // SetTagging sets the Tagging field's value.
  17892. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  17893. s.Tagging = v
  17894. return s
  17895. }
  17896. // SetVersionId sets the VersionId field's value.
  17897. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  17898. s.VersionId = &v
  17899. return s
  17900. }
  17901. type PutObjectTaggingOutput struct {
  17902. _ struct{} `type:"structure"`
  17903. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  17904. }
  17905. // String returns the string representation
  17906. func (s PutObjectTaggingOutput) String() string {
  17907. return awsutil.Prettify(s)
  17908. }
  17909. // GoString returns the string representation
  17910. func (s PutObjectTaggingOutput) GoString() string {
  17911. return s.String()
  17912. }
  17913. // SetVersionId sets the VersionId field's value.
  17914. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  17915. s.VersionId = &v
  17916. return s
  17917. }
  17918. type PutPublicAccessBlockInput struct {
  17919. _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
  17920. // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
  17921. // want to set.
  17922. //
  17923. // Bucket is a required field
  17924. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17925. // The PublicAccessBlock configuration that you want to apply to this Amazon
  17926. // S3 bucket. You can enable the configuration options in any combination. For
  17927. // more information about when Amazon S3 considers a bucket or object public,
  17928. // see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
  17929. // in the Amazon Simple Storage Service Developer Guide.
  17930. //
  17931. // PublicAccessBlockConfiguration is a required field
  17932. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17933. }
  17934. // String returns the string representation
  17935. func (s PutPublicAccessBlockInput) String() string {
  17936. return awsutil.Prettify(s)
  17937. }
  17938. // GoString returns the string representation
  17939. func (s PutPublicAccessBlockInput) GoString() string {
  17940. return s.String()
  17941. }
  17942. // Validate inspects the fields of the type to determine if they are valid.
  17943. func (s *PutPublicAccessBlockInput) Validate() error {
  17944. invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"}
  17945. if s.Bucket == nil {
  17946. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17947. }
  17948. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17949. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17950. }
  17951. if s.PublicAccessBlockConfiguration == nil {
  17952. invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration"))
  17953. }
  17954. if invalidParams.Len() > 0 {
  17955. return invalidParams
  17956. }
  17957. return nil
  17958. }
  17959. // SetBucket sets the Bucket field's value.
  17960. func (s *PutPublicAccessBlockInput) SetBucket(v string) *PutPublicAccessBlockInput {
  17961. s.Bucket = &v
  17962. return s
  17963. }
  17964. func (s *PutPublicAccessBlockInput) getBucket() (v string) {
  17965. if s.Bucket == nil {
  17966. return v
  17967. }
  17968. return *s.Bucket
  17969. }
  17970. // SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
  17971. func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput {
  17972. s.PublicAccessBlockConfiguration = v
  17973. return s
  17974. }
  17975. type PutPublicAccessBlockOutput struct {
  17976. _ struct{} `type:"structure"`
  17977. }
  17978. // String returns the string representation
  17979. func (s PutPublicAccessBlockOutput) String() string {
  17980. return awsutil.Prettify(s)
  17981. }
  17982. // GoString returns the string representation
  17983. func (s PutPublicAccessBlockOutput) GoString() string {
  17984. return s.String()
  17985. }
  17986. // A container for specifying the configuration for publication of messages
  17987. // to an Amazon Simple Queue Service (Amazon SQS) queue.when Amazon S3 detects
  17988. // specified events.
  17989. type QueueConfiguration struct {
  17990. _ struct{} `type:"structure"`
  17991. // Events is a required field
  17992. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  17993. // A container for object key name filtering rules. For information about key
  17994. // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  17995. // in the Amazon Simple Storage Service Developer Guide.
  17996. Filter *NotificationConfigurationFilter `type:"structure"`
  17997. // An optional unique identifier for configurations in a notification configuration.
  17998. // If you don't provide one, Amazon S3 will assign an ID.
  17999. Id *string `type:"string"`
  18000. // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3
  18001. // will publish a message when it detects events of the specified type.
  18002. //
  18003. // QueueArn is a required field
  18004. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  18005. }
  18006. // String returns the string representation
  18007. func (s QueueConfiguration) String() string {
  18008. return awsutil.Prettify(s)
  18009. }
  18010. // GoString returns the string representation
  18011. func (s QueueConfiguration) GoString() string {
  18012. return s.String()
  18013. }
  18014. // Validate inspects the fields of the type to determine if they are valid.
  18015. func (s *QueueConfiguration) Validate() error {
  18016. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  18017. if s.Events == nil {
  18018. invalidParams.Add(request.NewErrParamRequired("Events"))
  18019. }
  18020. if s.QueueArn == nil {
  18021. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  18022. }
  18023. if invalidParams.Len() > 0 {
  18024. return invalidParams
  18025. }
  18026. return nil
  18027. }
  18028. // SetEvents sets the Events field's value.
  18029. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  18030. s.Events = v
  18031. return s
  18032. }
  18033. // SetFilter sets the Filter field's value.
  18034. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  18035. s.Filter = v
  18036. return s
  18037. }
  18038. // SetId sets the Id field's value.
  18039. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  18040. s.Id = &v
  18041. return s
  18042. }
  18043. // SetQueueArn sets the QueueArn field's value.
  18044. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  18045. s.QueueArn = &v
  18046. return s
  18047. }
  18048. type QueueConfigurationDeprecated struct {
  18049. _ struct{} `type:"structure"`
  18050. // The bucket event for which to send notifications.
  18051. //
  18052. // Deprecated: Event has been deprecated
  18053. Event *string `deprecated:"true" type:"string" enum:"Event"`
  18054. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  18055. // An optional unique identifier for configurations in a notification configuration.
  18056. // If you don't provide one, Amazon S3 will assign an ID.
  18057. Id *string `type:"string"`
  18058. Queue *string `type:"string"`
  18059. }
  18060. // String returns the string representation
  18061. func (s QueueConfigurationDeprecated) String() string {
  18062. return awsutil.Prettify(s)
  18063. }
  18064. // GoString returns the string representation
  18065. func (s QueueConfigurationDeprecated) GoString() string {
  18066. return s.String()
  18067. }
  18068. // SetEvent sets the Event field's value.
  18069. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  18070. s.Event = &v
  18071. return s
  18072. }
  18073. // SetEvents sets the Events field's value.
  18074. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  18075. s.Events = v
  18076. return s
  18077. }
  18078. // SetId sets the Id field's value.
  18079. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  18080. s.Id = &v
  18081. return s
  18082. }
  18083. // SetQueue sets the Queue field's value.
  18084. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  18085. s.Queue = &v
  18086. return s
  18087. }
  18088. type RecordsEvent struct {
  18089. _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"`
  18090. // The byte array of partial, one or more result records.
  18091. //
  18092. // Payload is automatically base64 encoded/decoded by the SDK.
  18093. Payload []byte `type:"blob"`
  18094. }
  18095. // String returns the string representation
  18096. func (s RecordsEvent) String() string {
  18097. return awsutil.Prettify(s)
  18098. }
  18099. // GoString returns the string representation
  18100. func (s RecordsEvent) GoString() string {
  18101. return s.String()
  18102. }
  18103. // SetPayload sets the Payload field's value.
  18104. func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent {
  18105. s.Payload = v
  18106. return s
  18107. }
  18108. // The RecordsEvent is and event in the SelectObjectContentEventStream group of events.
  18109. func (s *RecordsEvent) eventSelectObjectContentEventStream() {}
  18110. // UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value.
  18111. // This method is only used internally within the SDK's EventStream handling.
  18112. func (s *RecordsEvent) UnmarshalEvent(
  18113. payloadUnmarshaler protocol.PayloadUnmarshaler,
  18114. msg eventstream.Message,
  18115. ) error {
  18116. s.Payload = make([]byte, len(msg.Payload))
  18117. copy(s.Payload, msg.Payload)
  18118. return nil
  18119. }
  18120. type Redirect struct {
  18121. _ struct{} `type:"structure"`
  18122. // The host name to use in the redirect request.
  18123. HostName *string `type:"string"`
  18124. // The HTTP redirect code to use on the response. Not required if one of the
  18125. // siblings is present.
  18126. HttpRedirectCode *string `type:"string"`
  18127. // Protocol to use (http, https) when redirecting requests. The default is the
  18128. // protocol that is used in the original request.
  18129. Protocol *string `type:"string" enum:"Protocol"`
  18130. // The object key prefix to use in the redirect request. For example, to redirect
  18131. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  18132. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  18133. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  18134. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  18135. // is not provided.
  18136. ReplaceKeyPrefixWith *string `type:"string"`
  18137. // The specific object key to use in the redirect request. For example, redirect
  18138. // request to error.html. Not required if one of the sibling is present. Can
  18139. // be present only if ReplaceKeyPrefixWith is not provided.
  18140. ReplaceKeyWith *string `type:"string"`
  18141. }
  18142. // String returns the string representation
  18143. func (s Redirect) String() string {
  18144. return awsutil.Prettify(s)
  18145. }
  18146. // GoString returns the string representation
  18147. func (s Redirect) GoString() string {
  18148. return s.String()
  18149. }
  18150. // SetHostName sets the HostName field's value.
  18151. func (s *Redirect) SetHostName(v string) *Redirect {
  18152. s.HostName = &v
  18153. return s
  18154. }
  18155. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  18156. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  18157. s.HttpRedirectCode = &v
  18158. return s
  18159. }
  18160. // SetProtocol sets the Protocol field's value.
  18161. func (s *Redirect) SetProtocol(v string) *Redirect {
  18162. s.Protocol = &v
  18163. return s
  18164. }
  18165. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  18166. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  18167. s.ReplaceKeyPrefixWith = &v
  18168. return s
  18169. }
  18170. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  18171. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  18172. s.ReplaceKeyWith = &v
  18173. return s
  18174. }
  18175. type RedirectAllRequestsTo struct {
  18176. _ struct{} `type:"structure"`
  18177. // Name of the host where requests will be redirected.
  18178. //
  18179. // HostName is a required field
  18180. HostName *string `type:"string" required:"true"`
  18181. // Protocol to use (http, https) when redirecting requests. The default is the
  18182. // protocol that is used in the original request.
  18183. Protocol *string `type:"string" enum:"Protocol"`
  18184. }
  18185. // String returns the string representation
  18186. func (s RedirectAllRequestsTo) String() string {
  18187. return awsutil.Prettify(s)
  18188. }
  18189. // GoString returns the string representation
  18190. func (s RedirectAllRequestsTo) GoString() string {
  18191. return s.String()
  18192. }
  18193. // Validate inspects the fields of the type to determine if they are valid.
  18194. func (s *RedirectAllRequestsTo) Validate() error {
  18195. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  18196. if s.HostName == nil {
  18197. invalidParams.Add(request.NewErrParamRequired("HostName"))
  18198. }
  18199. if invalidParams.Len() > 0 {
  18200. return invalidParams
  18201. }
  18202. return nil
  18203. }
  18204. // SetHostName sets the HostName field's value.
  18205. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  18206. s.HostName = &v
  18207. return s
  18208. }
  18209. // SetProtocol sets the Protocol field's value.
  18210. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  18211. s.Protocol = &v
  18212. return s
  18213. }
  18214. // A container for replication rules. You can add up to 1,000 rules. The maximum
  18215. // size of a replication configuration is 2 MB.
  18216. type ReplicationConfiguration struct {
  18217. _ struct{} `type:"structure"`
  18218. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  18219. // (IAM) role that Amazon S3 can assume when replicating the objects.
  18220. //
  18221. // Role is a required field
  18222. Role *string `type:"string" required:"true"`
  18223. // A container for one or more replication rules. A replication configuration
  18224. // must have at least one rule and can contain a maximum of 1,000 rules.
  18225. //
  18226. // Rules is a required field
  18227. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  18228. }
  18229. // String returns the string representation
  18230. func (s ReplicationConfiguration) String() string {
  18231. return awsutil.Prettify(s)
  18232. }
  18233. // GoString returns the string representation
  18234. func (s ReplicationConfiguration) GoString() string {
  18235. return s.String()
  18236. }
  18237. // Validate inspects the fields of the type to determine if they are valid.
  18238. func (s *ReplicationConfiguration) Validate() error {
  18239. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  18240. if s.Role == nil {
  18241. invalidParams.Add(request.NewErrParamRequired("Role"))
  18242. }
  18243. if s.Rules == nil {
  18244. invalidParams.Add(request.NewErrParamRequired("Rules"))
  18245. }
  18246. if s.Rules != nil {
  18247. for i, v := range s.Rules {
  18248. if v == nil {
  18249. continue
  18250. }
  18251. if err := v.Validate(); err != nil {
  18252. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  18253. }
  18254. }
  18255. }
  18256. if invalidParams.Len() > 0 {
  18257. return invalidParams
  18258. }
  18259. return nil
  18260. }
  18261. // SetRole sets the Role field's value.
  18262. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  18263. s.Role = &v
  18264. return s
  18265. }
  18266. // SetRules sets the Rules field's value.
  18267. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  18268. s.Rules = v
  18269. return s
  18270. }
  18271. // A container for information about a specific replication rule.
  18272. type ReplicationRule struct {
  18273. _ struct{} `type:"structure"`
  18274. // Specifies whether Amazon S3 should replicate delete makers.
  18275. DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"`
  18276. // A container for information about the replication destination.
  18277. //
  18278. // Destination is a required field
  18279. Destination *Destination `type:"structure" required:"true"`
  18280. // A filter that identifies the subset of objects to which the replication rule
  18281. // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
  18282. Filter *ReplicationRuleFilter `type:"structure"`
  18283. // A unique identifier for the rule. The maximum value is 255 characters.
  18284. ID *string `type:"string"`
  18285. // An object keyname prefix that identifies the object or objects to which the
  18286. // rule applies. The maximum prefix length is 1,024 characters.
  18287. //
  18288. // Deprecated: Prefix has been deprecated
  18289. Prefix *string `deprecated:"true" type:"string"`
  18290. // The priority associated with the rule. If you specify multiple rules in a
  18291. // replication configuration, Amazon S3 prioritizes the rules to prevent conflicts
  18292. // when filtering. If two or more rules identify the same object based on a
  18293. // specified filter, the rule with higher priority takes precedence. For example:
  18294. //
  18295. // * Same object quality prefix based filter criteria If prefixes you specified
  18296. // in multiple rules overlap
  18297. //
  18298. // * Same object qualify tag based filter criteria specified in multiple
  18299. // rules
  18300. //
  18301. // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  18302. // in the Amazon S3 Developer Guide.
  18303. Priority *int64 `type:"integer"`
  18304. // A container that describes additional filters for identifying the source
  18305. // objects that you want to replicate. You can choose to enable or disable the
  18306. // replication of these objects. Currently, Amazon S3 supports only the filter
  18307. // that you can specify for objects created with server-side encryption using
  18308. // an AWS KMS-Managed Key (SSE-KMS).
  18309. //
  18310. // If you want Amazon S3 to replicate objects created with server-side encryption
  18311. // using AWS KMS-Managed Keys.
  18312. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
  18313. // If status isn't enabled, the rule is ignored.
  18314. //
  18315. // Status is a required field
  18316. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  18317. }
  18318. // String returns the string representation
  18319. func (s ReplicationRule) String() string {
  18320. return awsutil.Prettify(s)
  18321. }
  18322. // GoString returns the string representation
  18323. func (s ReplicationRule) GoString() string {
  18324. return s.String()
  18325. }
  18326. // Validate inspects the fields of the type to determine if they are valid.
  18327. func (s *ReplicationRule) Validate() error {
  18328. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  18329. if s.Destination == nil {
  18330. invalidParams.Add(request.NewErrParamRequired("Destination"))
  18331. }
  18332. if s.Status == nil {
  18333. invalidParams.Add(request.NewErrParamRequired("Status"))
  18334. }
  18335. if s.Destination != nil {
  18336. if err := s.Destination.Validate(); err != nil {
  18337. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  18338. }
  18339. }
  18340. if s.Filter != nil {
  18341. if err := s.Filter.Validate(); err != nil {
  18342. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  18343. }
  18344. }
  18345. if s.SourceSelectionCriteria != nil {
  18346. if err := s.SourceSelectionCriteria.Validate(); err != nil {
  18347. invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
  18348. }
  18349. }
  18350. if invalidParams.Len() > 0 {
  18351. return invalidParams
  18352. }
  18353. return nil
  18354. }
  18355. // SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.
  18356. func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule {
  18357. s.DeleteMarkerReplication = v
  18358. return s
  18359. }
  18360. // SetDestination sets the Destination field's value.
  18361. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  18362. s.Destination = v
  18363. return s
  18364. }
  18365. // SetFilter sets the Filter field's value.
  18366. func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule {
  18367. s.Filter = v
  18368. return s
  18369. }
  18370. // SetID sets the ID field's value.
  18371. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  18372. s.ID = &v
  18373. return s
  18374. }
  18375. // SetPrefix sets the Prefix field's value.
  18376. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  18377. s.Prefix = &v
  18378. return s
  18379. }
  18380. // SetPriority sets the Priority field's value.
  18381. func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule {
  18382. s.Priority = &v
  18383. return s
  18384. }
  18385. // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
  18386. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
  18387. s.SourceSelectionCriteria = v
  18388. return s
  18389. }
  18390. // SetStatus sets the Status field's value.
  18391. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  18392. s.Status = &v
  18393. return s
  18394. }
  18395. type ReplicationRuleAndOperator struct {
  18396. _ struct{} `type:"structure"`
  18397. Prefix *string `type:"string"`
  18398. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  18399. }
  18400. // String returns the string representation
  18401. func (s ReplicationRuleAndOperator) String() string {
  18402. return awsutil.Prettify(s)
  18403. }
  18404. // GoString returns the string representation
  18405. func (s ReplicationRuleAndOperator) GoString() string {
  18406. return s.String()
  18407. }
  18408. // Validate inspects the fields of the type to determine if they are valid.
  18409. func (s *ReplicationRuleAndOperator) Validate() error {
  18410. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"}
  18411. if s.Tags != nil {
  18412. for i, v := range s.Tags {
  18413. if v == nil {
  18414. continue
  18415. }
  18416. if err := v.Validate(); err != nil {
  18417. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  18418. }
  18419. }
  18420. }
  18421. if invalidParams.Len() > 0 {
  18422. return invalidParams
  18423. }
  18424. return nil
  18425. }
  18426. // SetPrefix sets the Prefix field's value.
  18427. func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator {
  18428. s.Prefix = &v
  18429. return s
  18430. }
  18431. // SetTags sets the Tags field's value.
  18432. func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
  18433. s.Tags = v
  18434. return s
  18435. }
  18436. // A filter that identifies the subset of objects to which the replication rule
  18437. // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
  18438. type ReplicationRuleFilter struct {
  18439. _ struct{} `type:"structure"`
  18440. // A container for specifying rule filters. The filters determine the subset
  18441. // of objects to which the rule applies. This element is required only if you
  18442. // specify more than one filter. For example:
  18443. //
  18444. // * If you specify both a Prefix and a Tag filter, wrap these filters in
  18445. // an And tag.
  18446. //
  18447. // * If you specify a filter based on multiple tags, wrap the Tag elements
  18448. // in an And tag.
  18449. And *ReplicationRuleAndOperator `type:"structure"`
  18450. // An object keyname prefix that identifies the subset of objects to which the
  18451. // rule applies.
  18452. Prefix *string `type:"string"`
  18453. // A container for specifying a tag key and value.
  18454. //
  18455. // The rule applies only to objects that have the tag in their tag set.
  18456. Tag *Tag `type:"structure"`
  18457. }
  18458. // String returns the string representation
  18459. func (s ReplicationRuleFilter) String() string {
  18460. return awsutil.Prettify(s)
  18461. }
  18462. // GoString returns the string representation
  18463. func (s ReplicationRuleFilter) GoString() string {
  18464. return s.String()
  18465. }
  18466. // Validate inspects the fields of the type to determine if they are valid.
  18467. func (s *ReplicationRuleFilter) Validate() error {
  18468. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"}
  18469. if s.And != nil {
  18470. if err := s.And.Validate(); err != nil {
  18471. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  18472. }
  18473. }
  18474. if s.Tag != nil {
  18475. if err := s.Tag.Validate(); err != nil {
  18476. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  18477. }
  18478. }
  18479. if invalidParams.Len() > 0 {
  18480. return invalidParams
  18481. }
  18482. return nil
  18483. }
  18484. // SetAnd sets the And field's value.
  18485. func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter {
  18486. s.And = v
  18487. return s
  18488. }
  18489. // SetPrefix sets the Prefix field's value.
  18490. func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
  18491. s.Prefix = &v
  18492. return s
  18493. }
  18494. // SetTag sets the Tag field's value.
  18495. func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
  18496. s.Tag = v
  18497. return s
  18498. }
  18499. type RequestPaymentConfiguration struct {
  18500. _ struct{} `type:"structure"`
  18501. // Specifies who pays for the download and request fees.
  18502. //
  18503. // Payer is a required field
  18504. Payer *string `type:"string" required:"true" enum:"Payer"`
  18505. }
  18506. // String returns the string representation
  18507. func (s RequestPaymentConfiguration) String() string {
  18508. return awsutil.Prettify(s)
  18509. }
  18510. // GoString returns the string representation
  18511. func (s RequestPaymentConfiguration) GoString() string {
  18512. return s.String()
  18513. }
  18514. // Validate inspects the fields of the type to determine if they are valid.
  18515. func (s *RequestPaymentConfiguration) Validate() error {
  18516. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  18517. if s.Payer == nil {
  18518. invalidParams.Add(request.NewErrParamRequired("Payer"))
  18519. }
  18520. if invalidParams.Len() > 0 {
  18521. return invalidParams
  18522. }
  18523. return nil
  18524. }
  18525. // SetPayer sets the Payer field's value.
  18526. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  18527. s.Payer = &v
  18528. return s
  18529. }
  18530. type RequestProgress struct {
  18531. _ struct{} `type:"structure"`
  18532. // Specifies whether periodic QueryProgress frames should be sent. Valid values:
  18533. // TRUE, FALSE. Default value: FALSE.
  18534. Enabled *bool `type:"boolean"`
  18535. }
  18536. // String returns the string representation
  18537. func (s RequestProgress) String() string {
  18538. return awsutil.Prettify(s)
  18539. }
  18540. // GoString returns the string representation
  18541. func (s RequestProgress) GoString() string {
  18542. return s.String()
  18543. }
  18544. // SetEnabled sets the Enabled field's value.
  18545. func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
  18546. s.Enabled = &v
  18547. return s
  18548. }
  18549. type RestoreObjectInput struct {
  18550. _ struct{} `type:"structure" payload:"RestoreRequest"`
  18551. // Bucket is a required field
  18552. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18553. // Key is a required field
  18554. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  18555. // Confirms that the requester knows that she or he will be charged for the
  18556. // request. Bucket owners need not specify this parameter in their requests.
  18557. // Documentation on downloading objects from requester pays buckets can be found
  18558. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  18559. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  18560. // Container for restore job parameters.
  18561. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  18562. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  18563. }
  18564. // String returns the string representation
  18565. func (s RestoreObjectInput) String() string {
  18566. return awsutil.Prettify(s)
  18567. }
  18568. // GoString returns the string representation
  18569. func (s RestoreObjectInput) GoString() string {
  18570. return s.String()
  18571. }
  18572. // Validate inspects the fields of the type to determine if they are valid.
  18573. func (s *RestoreObjectInput) Validate() error {
  18574. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  18575. if s.Bucket == nil {
  18576. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18577. }
  18578. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18579. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18580. }
  18581. if s.Key == nil {
  18582. invalidParams.Add(request.NewErrParamRequired("Key"))
  18583. }
  18584. if s.Key != nil && len(*s.Key) < 1 {
  18585. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  18586. }
  18587. if s.RestoreRequest != nil {
  18588. if err := s.RestoreRequest.Validate(); err != nil {
  18589. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  18590. }
  18591. }
  18592. if invalidParams.Len() > 0 {
  18593. return invalidParams
  18594. }
  18595. return nil
  18596. }
  18597. // SetBucket sets the Bucket field's value.
  18598. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  18599. s.Bucket = &v
  18600. return s
  18601. }
  18602. func (s *RestoreObjectInput) getBucket() (v string) {
  18603. if s.Bucket == nil {
  18604. return v
  18605. }
  18606. return *s.Bucket
  18607. }
  18608. // SetKey sets the Key field's value.
  18609. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  18610. s.Key = &v
  18611. return s
  18612. }
  18613. // SetRequestPayer sets the RequestPayer field's value.
  18614. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  18615. s.RequestPayer = &v
  18616. return s
  18617. }
  18618. // SetRestoreRequest sets the RestoreRequest field's value.
  18619. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  18620. s.RestoreRequest = v
  18621. return s
  18622. }
  18623. // SetVersionId sets the VersionId field's value.
  18624. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  18625. s.VersionId = &v
  18626. return s
  18627. }
  18628. type RestoreObjectOutput struct {
  18629. _ struct{} `type:"structure"`
  18630. // If present, indicates that the requester was successfully charged for the
  18631. // request.
  18632. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  18633. // Indicates the path in the provided S3 output location where Select results
  18634. // will be restored to.
  18635. RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
  18636. }
  18637. // String returns the string representation
  18638. func (s RestoreObjectOutput) String() string {
  18639. return awsutil.Prettify(s)
  18640. }
  18641. // GoString returns the string representation
  18642. func (s RestoreObjectOutput) GoString() string {
  18643. return s.String()
  18644. }
  18645. // SetRequestCharged sets the RequestCharged field's value.
  18646. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  18647. s.RequestCharged = &v
  18648. return s
  18649. }
  18650. // SetRestoreOutputPath sets the RestoreOutputPath field's value.
  18651. func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
  18652. s.RestoreOutputPath = &v
  18653. return s
  18654. }
  18655. // Container for restore job parameters.
  18656. type RestoreRequest struct {
  18657. _ struct{} `type:"structure"`
  18658. // Lifetime of the active copy in days. Do not use with restores that specify
  18659. // OutputLocation.
  18660. Days *int64 `type:"integer"`
  18661. // The optional description for the job.
  18662. Description *string `type:"string"`
  18663. // Glacier related parameters pertaining to this job. Do not use with restores
  18664. // that specify OutputLocation.
  18665. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  18666. // Describes the location where the restore job's output is stored.
  18667. OutputLocation *OutputLocation `type:"structure"`
  18668. // Describes the parameters for Select job types.
  18669. SelectParameters *SelectParameters `type:"structure"`
  18670. // Glacier retrieval tier at which the restore will be processed.
  18671. Tier *string `type:"string" enum:"Tier"`
  18672. // Type of restore request.
  18673. Type *string `type:"string" enum:"RestoreRequestType"`
  18674. }
  18675. // String returns the string representation
  18676. func (s RestoreRequest) String() string {
  18677. return awsutil.Prettify(s)
  18678. }
  18679. // GoString returns the string representation
  18680. func (s RestoreRequest) GoString() string {
  18681. return s.String()
  18682. }
  18683. // Validate inspects the fields of the type to determine if they are valid.
  18684. func (s *RestoreRequest) Validate() error {
  18685. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  18686. if s.GlacierJobParameters != nil {
  18687. if err := s.GlacierJobParameters.Validate(); err != nil {
  18688. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  18689. }
  18690. }
  18691. if s.OutputLocation != nil {
  18692. if err := s.OutputLocation.Validate(); err != nil {
  18693. invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
  18694. }
  18695. }
  18696. if s.SelectParameters != nil {
  18697. if err := s.SelectParameters.Validate(); err != nil {
  18698. invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
  18699. }
  18700. }
  18701. if invalidParams.Len() > 0 {
  18702. return invalidParams
  18703. }
  18704. return nil
  18705. }
  18706. // SetDays sets the Days field's value.
  18707. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  18708. s.Days = &v
  18709. return s
  18710. }
  18711. // SetDescription sets the Description field's value.
  18712. func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
  18713. s.Description = &v
  18714. return s
  18715. }
  18716. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  18717. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  18718. s.GlacierJobParameters = v
  18719. return s
  18720. }
  18721. // SetOutputLocation sets the OutputLocation field's value.
  18722. func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
  18723. s.OutputLocation = v
  18724. return s
  18725. }
  18726. // SetSelectParameters sets the SelectParameters field's value.
  18727. func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
  18728. s.SelectParameters = v
  18729. return s
  18730. }
  18731. // SetTier sets the Tier field's value.
  18732. func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
  18733. s.Tier = &v
  18734. return s
  18735. }
  18736. // SetType sets the Type field's value.
  18737. func (s *RestoreRequest) SetType(v string) *RestoreRequest {
  18738. s.Type = &v
  18739. return s
  18740. }
  18741. type RoutingRule struct {
  18742. _ struct{} `type:"structure"`
  18743. // A container for describing a condition that must be met for the specified
  18744. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  18745. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  18746. // redirect request to another host where you might process the error.
  18747. Condition *Condition `type:"structure"`
  18748. // Container for redirect information. You can redirect requests to another
  18749. // host, to another page, or with another protocol. In the event of an error,
  18750. // you can specify a different error code to return.
  18751. //
  18752. // Redirect is a required field
  18753. Redirect *Redirect `type:"structure" required:"true"`
  18754. }
  18755. // String returns the string representation
  18756. func (s RoutingRule) String() string {
  18757. return awsutil.Prettify(s)
  18758. }
  18759. // GoString returns the string representation
  18760. func (s RoutingRule) GoString() string {
  18761. return s.String()
  18762. }
  18763. // Validate inspects the fields of the type to determine if they are valid.
  18764. func (s *RoutingRule) Validate() error {
  18765. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  18766. if s.Redirect == nil {
  18767. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  18768. }
  18769. if invalidParams.Len() > 0 {
  18770. return invalidParams
  18771. }
  18772. return nil
  18773. }
  18774. // SetCondition sets the Condition field's value.
  18775. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  18776. s.Condition = v
  18777. return s
  18778. }
  18779. // SetRedirect sets the Redirect field's value.
  18780. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  18781. s.Redirect = v
  18782. return s
  18783. }
  18784. type Rule struct {
  18785. _ struct{} `type:"structure"`
  18786. // Specifies the days since the initiation of an Incomplete Multipart Upload
  18787. // that Lifecycle will wait before permanently removing all parts of the upload.
  18788. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  18789. Expiration *LifecycleExpiration `type:"structure"`
  18790. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  18791. ID *string `type:"string"`
  18792. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  18793. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  18794. // configuration action on a bucket that has versioning enabled (or suspended)
  18795. // to request that Amazon S3 delete noncurrent object versions at a specific
  18796. // period in the object's lifetime.
  18797. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  18798. // Container for the transition rule that describes when noncurrent objects
  18799. // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER
  18800. // storage class. If your bucket is versioning-enabled (or versioning is suspended),
  18801. // you can set this action to request that Amazon S3 transition noncurrent object
  18802. // versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER storage
  18803. // class at a specific period in the object's lifetime.
  18804. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  18805. // Prefix identifying one or more objects to which the rule applies.
  18806. //
  18807. // Prefix is a required field
  18808. Prefix *string `type:"string" required:"true"`
  18809. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  18810. // is not currently being applied.
  18811. //
  18812. // Status is a required field
  18813. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  18814. Transition *Transition `type:"structure"`
  18815. }
  18816. // String returns the string representation
  18817. func (s Rule) String() string {
  18818. return awsutil.Prettify(s)
  18819. }
  18820. // GoString returns the string representation
  18821. func (s Rule) GoString() string {
  18822. return s.String()
  18823. }
  18824. // Validate inspects the fields of the type to determine if they are valid.
  18825. func (s *Rule) Validate() error {
  18826. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  18827. if s.Prefix == nil {
  18828. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  18829. }
  18830. if s.Status == nil {
  18831. invalidParams.Add(request.NewErrParamRequired("Status"))
  18832. }
  18833. if invalidParams.Len() > 0 {
  18834. return invalidParams
  18835. }
  18836. return nil
  18837. }
  18838. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  18839. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  18840. s.AbortIncompleteMultipartUpload = v
  18841. return s
  18842. }
  18843. // SetExpiration sets the Expiration field's value.
  18844. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  18845. s.Expiration = v
  18846. return s
  18847. }
  18848. // SetID sets the ID field's value.
  18849. func (s *Rule) SetID(v string) *Rule {
  18850. s.ID = &v
  18851. return s
  18852. }
  18853. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  18854. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  18855. s.NoncurrentVersionExpiration = v
  18856. return s
  18857. }
  18858. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  18859. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  18860. s.NoncurrentVersionTransition = v
  18861. return s
  18862. }
  18863. // SetPrefix sets the Prefix field's value.
  18864. func (s *Rule) SetPrefix(v string) *Rule {
  18865. s.Prefix = &v
  18866. return s
  18867. }
  18868. // SetStatus sets the Status field's value.
  18869. func (s *Rule) SetStatus(v string) *Rule {
  18870. s.Status = &v
  18871. return s
  18872. }
  18873. // SetTransition sets the Transition field's value.
  18874. func (s *Rule) SetTransition(v *Transition) *Rule {
  18875. s.Transition = v
  18876. return s
  18877. }
  18878. // Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
  18879. type SSEKMS struct {
  18880. _ struct{} `locationName:"SSE-KMS" type:"structure"`
  18881. // Specifies the ID of the AWS Key Management Service (KMS) master encryption
  18882. // key to use for encrypting Inventory reports.
  18883. //
  18884. // KeyId is a required field
  18885. KeyId *string `type:"string" required:"true" sensitive:"true"`
  18886. }
  18887. // String returns the string representation
  18888. func (s SSEKMS) String() string {
  18889. return awsutil.Prettify(s)
  18890. }
  18891. // GoString returns the string representation
  18892. func (s SSEKMS) GoString() string {
  18893. return s.String()
  18894. }
  18895. // Validate inspects the fields of the type to determine if they are valid.
  18896. func (s *SSEKMS) Validate() error {
  18897. invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
  18898. if s.KeyId == nil {
  18899. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  18900. }
  18901. if invalidParams.Len() > 0 {
  18902. return invalidParams
  18903. }
  18904. return nil
  18905. }
  18906. // SetKeyId sets the KeyId field's value.
  18907. func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
  18908. s.KeyId = &v
  18909. return s
  18910. }
  18911. // Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
  18912. type SSES3 struct {
  18913. _ struct{} `locationName:"SSE-S3" type:"structure"`
  18914. }
  18915. // String returns the string representation
  18916. func (s SSES3) String() string {
  18917. return awsutil.Prettify(s)
  18918. }
  18919. // GoString returns the string representation
  18920. func (s SSES3) GoString() string {
  18921. return s.String()
  18922. }
  18923. // SelectObjectContentEventStream provides handling of EventStreams for
  18924. // the SelectObjectContent API.
  18925. //
  18926. // Use this type to receive SelectObjectContentEventStream events. The events
  18927. // can be read from the Events channel member.
  18928. //
  18929. // The events that can be received are:
  18930. //
  18931. // * ContinuationEvent
  18932. // * EndEvent
  18933. // * ProgressEvent
  18934. // * RecordsEvent
  18935. // * StatsEvent
  18936. type SelectObjectContentEventStream struct {
  18937. // Reader is the EventStream reader for the SelectObjectContentEventStream
  18938. // events. This value is automatically set by the SDK when the API call is made
  18939. // Use this member when unit testing your code with the SDK to mock out the
  18940. // EventStream Reader.
  18941. //
  18942. // Must not be nil.
  18943. Reader SelectObjectContentEventStreamReader
  18944. // StreamCloser is the io.Closer for the EventStream connection. For HTTP
  18945. // EventStream this is the response Body. The stream will be closed when
  18946. // the Close method of the EventStream is called.
  18947. StreamCloser io.Closer
  18948. }
  18949. // Close closes the EventStream. This will also cause the Events channel to be
  18950. // closed. You can use the closing of the Events channel to terminate your
  18951. // application's read from the API's EventStream.
  18952. //
  18953. // Will close the underlying EventStream reader. For EventStream over HTTP
  18954. // connection this will also close the HTTP connection.
  18955. //
  18956. // Close must be called when done using the EventStream API. Not calling Close
  18957. // may result in resource leaks.
  18958. func (es *SelectObjectContentEventStream) Close() (err error) {
  18959. es.Reader.Close()
  18960. return es.Err()
  18961. }
  18962. // Err returns any error that occurred while reading EventStream Events from
  18963. // the service API's response. Returns nil if there were no errors.
  18964. func (es *SelectObjectContentEventStream) Err() error {
  18965. if err := es.Reader.Err(); err != nil {
  18966. return err
  18967. }
  18968. es.StreamCloser.Close()
  18969. return nil
  18970. }
  18971. // Events returns a channel to read EventStream Events from the
  18972. // SelectObjectContent API.
  18973. //
  18974. // These events are:
  18975. //
  18976. // * ContinuationEvent
  18977. // * EndEvent
  18978. // * ProgressEvent
  18979. // * RecordsEvent
  18980. // * StatsEvent
  18981. func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  18982. return es.Reader.Events()
  18983. }
  18984. // SelectObjectContentEventStreamEvent groups together all EventStream
  18985. // events read from the SelectObjectContent API.
  18986. //
  18987. // These events are:
  18988. //
  18989. // * ContinuationEvent
  18990. // * EndEvent
  18991. // * ProgressEvent
  18992. // * RecordsEvent
  18993. // * StatsEvent
  18994. type SelectObjectContentEventStreamEvent interface {
  18995. eventSelectObjectContentEventStream()
  18996. }
  18997. // SelectObjectContentEventStreamReader provides the interface for reading EventStream
  18998. // Events from the SelectObjectContent API. The
  18999. // default implementation for this interface will be SelectObjectContentEventStream.
  19000. //
  19001. // The reader's Close method must allow multiple concurrent calls.
  19002. //
  19003. // These events are:
  19004. //
  19005. // * ContinuationEvent
  19006. // * EndEvent
  19007. // * ProgressEvent
  19008. // * RecordsEvent
  19009. // * StatsEvent
  19010. type SelectObjectContentEventStreamReader interface {
  19011. // Returns a channel of events as they are read from the event stream.
  19012. Events() <-chan SelectObjectContentEventStreamEvent
  19013. // Close will close the underlying event stream reader. For event stream over
  19014. // HTTP this will also close the HTTP connection.
  19015. Close() error
  19016. // Returns any error that has occured while reading from the event stream.
  19017. Err() error
  19018. }
  19019. type readSelectObjectContentEventStream struct {
  19020. eventReader *eventstreamapi.EventReader
  19021. stream chan SelectObjectContentEventStreamEvent
  19022. errVal atomic.Value
  19023. done chan struct{}
  19024. closeOnce sync.Once
  19025. }
  19026. func newReadSelectObjectContentEventStream(
  19027. reader io.ReadCloser,
  19028. unmarshalers request.HandlerList,
  19029. logger aws.Logger,
  19030. logLevel aws.LogLevelType,
  19031. ) *readSelectObjectContentEventStream {
  19032. r := &readSelectObjectContentEventStream{
  19033. stream: make(chan SelectObjectContentEventStreamEvent),
  19034. done: make(chan struct{}),
  19035. }
  19036. r.eventReader = eventstreamapi.NewEventReader(
  19037. reader,
  19038. protocol.HandlerPayloadUnmarshal{
  19039. Unmarshalers: unmarshalers,
  19040. },
  19041. r.unmarshalerForEventType,
  19042. )
  19043. r.eventReader.UseLogger(logger, logLevel)
  19044. return r
  19045. }
  19046. // Close will close the underlying event stream reader. For EventStream over
  19047. // HTTP this will also close the HTTP connection.
  19048. func (r *readSelectObjectContentEventStream) Close() error {
  19049. r.closeOnce.Do(r.safeClose)
  19050. return r.Err()
  19051. }
  19052. func (r *readSelectObjectContentEventStream) safeClose() {
  19053. close(r.done)
  19054. err := r.eventReader.Close()
  19055. if err != nil {
  19056. r.errVal.Store(err)
  19057. }
  19058. }
  19059. func (r *readSelectObjectContentEventStream) Err() error {
  19060. if v := r.errVal.Load(); v != nil {
  19061. return v.(error)
  19062. }
  19063. return nil
  19064. }
  19065. func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  19066. return r.stream
  19067. }
  19068. func (r *readSelectObjectContentEventStream) readEventStream() {
  19069. defer close(r.stream)
  19070. for {
  19071. event, err := r.eventReader.ReadEvent()
  19072. if err != nil {
  19073. if err == io.EOF {
  19074. return
  19075. }
  19076. select {
  19077. case <-r.done:
  19078. // If closed already ignore the error
  19079. return
  19080. default:
  19081. }
  19082. r.errVal.Store(err)
  19083. return
  19084. }
  19085. select {
  19086. case r.stream <- event.(SelectObjectContentEventStreamEvent):
  19087. case <-r.done:
  19088. return
  19089. }
  19090. }
  19091. }
  19092. func (r *readSelectObjectContentEventStream) unmarshalerForEventType(
  19093. eventType string,
  19094. ) (eventstreamapi.Unmarshaler, error) {
  19095. switch eventType {
  19096. case "Cont":
  19097. return &ContinuationEvent{}, nil
  19098. case "End":
  19099. return &EndEvent{}, nil
  19100. case "Progress":
  19101. return &ProgressEvent{}, nil
  19102. case "Records":
  19103. return &RecordsEvent{}, nil
  19104. case "Stats":
  19105. return &StatsEvent{}, nil
  19106. default:
  19107. return nil, awserr.New(
  19108. request.ErrCodeSerialization,
  19109. fmt.Sprintf("unknown event type name, %s, for SelectObjectContentEventStream", eventType),
  19110. nil,
  19111. )
  19112. }
  19113. }
  19114. // Request to filter the contents of an Amazon S3 object based on a simple Structured
  19115. // Query Language (SQL) statement. In the request, along with the SQL expression,
  19116. // you must specify a data serialization format (JSON or CSV) of the object.
  19117. // Amazon S3 uses this to parse object data into records. It returns only records
  19118. // that match the specified SQL expression. You must also specify the data serialization
  19119. // format for the response. For more information, see S3Select API Documentation
  19120. // (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
  19121. type SelectObjectContentInput struct {
  19122. _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  19123. // The S3 bucket.
  19124. //
  19125. // Bucket is a required field
  19126. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19127. // The expression that is used to query the object.
  19128. //
  19129. // Expression is a required field
  19130. Expression *string `type:"string" required:"true"`
  19131. // The type of the provided expression (for example., SQL).
  19132. //
  19133. // ExpressionType is a required field
  19134. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  19135. // Describes the format of the data in the object that is being queried.
  19136. //
  19137. // InputSerialization is a required field
  19138. InputSerialization *InputSerialization `type:"structure" required:"true"`
  19139. // The object key.
  19140. //
  19141. // Key is a required field
  19142. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19143. // Describes the format of the data that you want Amazon S3 to return in response.
  19144. //
  19145. // OutputSerialization is a required field
  19146. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  19147. // Specifies if periodic request progress information should be enabled.
  19148. RequestProgress *RequestProgress `type:"structure"`
  19149. // The SSE Algorithm used to encrypt the object. For more information, see
  19150. // Server-Side Encryption (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19151. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  19152. // The SSE Customer Key. For more information, see Server-Side Encryption (Using
  19153. // Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19154. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19155. // The SSE Customer Key MD5. For more information, see Server-Side Encryption
  19156. // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19157. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  19158. }
  19159. // String returns the string representation
  19160. func (s SelectObjectContentInput) String() string {
  19161. return awsutil.Prettify(s)
  19162. }
  19163. // GoString returns the string representation
  19164. func (s SelectObjectContentInput) GoString() string {
  19165. return s.String()
  19166. }
  19167. // Validate inspects the fields of the type to determine if they are valid.
  19168. func (s *SelectObjectContentInput) Validate() error {
  19169. invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"}
  19170. if s.Bucket == nil {
  19171. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  19172. }
  19173. if s.Bucket != nil && len(*s.Bucket) < 1 {
  19174. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  19175. }
  19176. if s.Expression == nil {
  19177. invalidParams.Add(request.NewErrParamRequired("Expression"))
  19178. }
  19179. if s.ExpressionType == nil {
  19180. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  19181. }
  19182. if s.InputSerialization == nil {
  19183. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  19184. }
  19185. if s.Key == nil {
  19186. invalidParams.Add(request.NewErrParamRequired("Key"))
  19187. }
  19188. if s.Key != nil && len(*s.Key) < 1 {
  19189. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19190. }
  19191. if s.OutputSerialization == nil {
  19192. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  19193. }
  19194. if invalidParams.Len() > 0 {
  19195. return invalidParams
  19196. }
  19197. return nil
  19198. }
  19199. // SetBucket sets the Bucket field's value.
  19200. func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput {
  19201. s.Bucket = &v
  19202. return s
  19203. }
  19204. func (s *SelectObjectContentInput) getBucket() (v string) {
  19205. if s.Bucket == nil {
  19206. return v
  19207. }
  19208. return *s.Bucket
  19209. }
  19210. // SetExpression sets the Expression field's value.
  19211. func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput {
  19212. s.Expression = &v
  19213. return s
  19214. }
  19215. // SetExpressionType sets the ExpressionType field's value.
  19216. func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput {
  19217. s.ExpressionType = &v
  19218. return s
  19219. }
  19220. // SetInputSerialization sets the InputSerialization field's value.
  19221. func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput {
  19222. s.InputSerialization = v
  19223. return s
  19224. }
  19225. // SetKey sets the Key field's value.
  19226. func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput {
  19227. s.Key = &v
  19228. return s
  19229. }
  19230. // SetOutputSerialization sets the OutputSerialization field's value.
  19231. func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput {
  19232. s.OutputSerialization = v
  19233. return s
  19234. }
  19235. // SetRequestProgress sets the RequestProgress field's value.
  19236. func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput {
  19237. s.RequestProgress = v
  19238. return s
  19239. }
  19240. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  19241. func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput {
  19242. s.SSECustomerAlgorithm = &v
  19243. return s
  19244. }
  19245. // SetSSECustomerKey sets the SSECustomerKey field's value.
  19246. func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput {
  19247. s.SSECustomerKey = &v
  19248. return s
  19249. }
  19250. func (s *SelectObjectContentInput) getSSECustomerKey() (v string) {
  19251. if s.SSECustomerKey == nil {
  19252. return v
  19253. }
  19254. return *s.SSECustomerKey
  19255. }
  19256. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  19257. func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput {
  19258. s.SSECustomerKeyMD5 = &v
  19259. return s
  19260. }
  19261. type SelectObjectContentOutput struct {
  19262. _ struct{} `type:"structure" payload:"Payload"`
  19263. // Use EventStream to use the API's stream.
  19264. EventStream *SelectObjectContentEventStream `type:"structure"`
  19265. }
  19266. // String returns the string representation
  19267. func (s SelectObjectContentOutput) String() string {
  19268. return awsutil.Prettify(s)
  19269. }
  19270. // GoString returns the string representation
  19271. func (s SelectObjectContentOutput) GoString() string {
  19272. return s.String()
  19273. }
  19274. // SetEventStream sets the EventStream field's value.
  19275. func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
  19276. s.EventStream = v
  19277. return s
  19278. }
  19279. func (s *SelectObjectContentOutput) runEventStreamLoop(r *request.Request) {
  19280. if r.Error != nil {
  19281. return
  19282. }
  19283. reader := newReadSelectObjectContentEventStream(
  19284. r.HTTPResponse.Body,
  19285. r.Handlers.UnmarshalStream,
  19286. r.Config.Logger,
  19287. r.Config.LogLevel.Value(),
  19288. )
  19289. go reader.readEventStream()
  19290. eventStream := &SelectObjectContentEventStream{
  19291. StreamCloser: r.HTTPResponse.Body,
  19292. Reader: reader,
  19293. }
  19294. s.EventStream = eventStream
  19295. }
  19296. // Describes the parameters for Select job types.
  19297. type SelectParameters struct {
  19298. _ struct{} `type:"structure"`
  19299. // The expression that is used to query the object.
  19300. //
  19301. // Expression is a required field
  19302. Expression *string `type:"string" required:"true"`
  19303. // The type of the provided expression (e.g., SQL).
  19304. //
  19305. // ExpressionType is a required field
  19306. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  19307. // Describes the serialization format of the object.
  19308. //
  19309. // InputSerialization is a required field
  19310. InputSerialization *InputSerialization `type:"structure" required:"true"`
  19311. // Describes how the results of the Select job are serialized.
  19312. //
  19313. // OutputSerialization is a required field
  19314. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  19315. }
  19316. // String returns the string representation
  19317. func (s SelectParameters) String() string {
  19318. return awsutil.Prettify(s)
  19319. }
  19320. // GoString returns the string representation
  19321. func (s SelectParameters) GoString() string {
  19322. return s.String()
  19323. }
  19324. // Validate inspects the fields of the type to determine if they are valid.
  19325. func (s *SelectParameters) Validate() error {
  19326. invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
  19327. if s.Expression == nil {
  19328. invalidParams.Add(request.NewErrParamRequired("Expression"))
  19329. }
  19330. if s.ExpressionType == nil {
  19331. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  19332. }
  19333. if s.InputSerialization == nil {
  19334. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  19335. }
  19336. if s.OutputSerialization == nil {
  19337. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  19338. }
  19339. if invalidParams.Len() > 0 {
  19340. return invalidParams
  19341. }
  19342. return nil
  19343. }
  19344. // SetExpression sets the Expression field's value.
  19345. func (s *SelectParameters) SetExpression(v string) *SelectParameters {
  19346. s.Expression = &v
  19347. return s
  19348. }
  19349. // SetExpressionType sets the ExpressionType field's value.
  19350. func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
  19351. s.ExpressionType = &v
  19352. return s
  19353. }
  19354. // SetInputSerialization sets the InputSerialization field's value.
  19355. func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
  19356. s.InputSerialization = v
  19357. return s
  19358. }
  19359. // SetOutputSerialization sets the OutputSerialization field's value.
  19360. func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
  19361. s.OutputSerialization = v
  19362. return s
  19363. }
  19364. // Describes the default server-side encryption to apply to new objects in the
  19365. // bucket. If Put Object request does not specify any server-side encryption,
  19366. // this default encryption will be applied.
  19367. type ServerSideEncryptionByDefault struct {
  19368. _ struct{} `type:"structure"`
  19369. // KMS master key ID to use for the default encryption. This parameter is allowed
  19370. // if SSEAlgorithm is aws:kms.
  19371. KMSMasterKeyID *string `type:"string" sensitive:"true"`
  19372. // Server-side encryption algorithm to use for the default encryption.
  19373. //
  19374. // SSEAlgorithm is a required field
  19375. SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  19376. }
  19377. // String returns the string representation
  19378. func (s ServerSideEncryptionByDefault) String() string {
  19379. return awsutil.Prettify(s)
  19380. }
  19381. // GoString returns the string representation
  19382. func (s ServerSideEncryptionByDefault) GoString() string {
  19383. return s.String()
  19384. }
  19385. // Validate inspects the fields of the type to determine if they are valid.
  19386. func (s *ServerSideEncryptionByDefault) Validate() error {
  19387. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
  19388. if s.SSEAlgorithm == nil {
  19389. invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
  19390. }
  19391. if invalidParams.Len() > 0 {
  19392. return invalidParams
  19393. }
  19394. return nil
  19395. }
  19396. // SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
  19397. func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
  19398. s.KMSMasterKeyID = &v
  19399. return s
  19400. }
  19401. // SetSSEAlgorithm sets the SSEAlgorithm field's value.
  19402. func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
  19403. s.SSEAlgorithm = &v
  19404. return s
  19405. }
  19406. // Container for server-side encryption configuration rules. Currently S3 supports
  19407. // one rule only.
  19408. type ServerSideEncryptionConfiguration struct {
  19409. _ struct{} `type:"structure"`
  19410. // Container for information about a particular server-side encryption configuration
  19411. // rule.
  19412. //
  19413. // Rules is a required field
  19414. Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  19415. }
  19416. // String returns the string representation
  19417. func (s ServerSideEncryptionConfiguration) String() string {
  19418. return awsutil.Prettify(s)
  19419. }
  19420. // GoString returns the string representation
  19421. func (s ServerSideEncryptionConfiguration) GoString() string {
  19422. return s.String()
  19423. }
  19424. // Validate inspects the fields of the type to determine if they are valid.
  19425. func (s *ServerSideEncryptionConfiguration) Validate() error {
  19426. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
  19427. if s.Rules == nil {
  19428. invalidParams.Add(request.NewErrParamRequired("Rules"))
  19429. }
  19430. if s.Rules != nil {
  19431. for i, v := range s.Rules {
  19432. if v == nil {
  19433. continue
  19434. }
  19435. if err := v.Validate(); err != nil {
  19436. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  19437. }
  19438. }
  19439. }
  19440. if invalidParams.Len() > 0 {
  19441. return invalidParams
  19442. }
  19443. return nil
  19444. }
  19445. // SetRules sets the Rules field's value.
  19446. func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
  19447. s.Rules = v
  19448. return s
  19449. }
  19450. // Container for information about a particular server-side encryption configuration
  19451. // rule.
  19452. type ServerSideEncryptionRule struct {
  19453. _ struct{} `type:"structure"`
  19454. // Describes the default server-side encryption to apply to new objects in the
  19455. // bucket. If Put Object request does not specify any server-side encryption,
  19456. // this default encryption will be applied.
  19457. ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
  19458. }
  19459. // String returns the string representation
  19460. func (s ServerSideEncryptionRule) String() string {
  19461. return awsutil.Prettify(s)
  19462. }
  19463. // GoString returns the string representation
  19464. func (s ServerSideEncryptionRule) GoString() string {
  19465. return s.String()
  19466. }
  19467. // Validate inspects the fields of the type to determine if they are valid.
  19468. func (s *ServerSideEncryptionRule) Validate() error {
  19469. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
  19470. if s.ApplyServerSideEncryptionByDefault != nil {
  19471. if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
  19472. invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
  19473. }
  19474. }
  19475. if invalidParams.Len() > 0 {
  19476. return invalidParams
  19477. }
  19478. return nil
  19479. }
  19480. // SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
  19481. func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
  19482. s.ApplyServerSideEncryptionByDefault = v
  19483. return s
  19484. }
  19485. // A container for filters that define which source objects should be replicated.
  19486. type SourceSelectionCriteria struct {
  19487. _ struct{} `type:"structure"`
  19488. // A container for filter information for the selection of S3 objects encrypted
  19489. // with AWS KMS. If you include SourceSelectionCriteria in the replication configuration,
  19490. // this element is required.
  19491. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
  19492. }
  19493. // String returns the string representation
  19494. func (s SourceSelectionCriteria) String() string {
  19495. return awsutil.Prettify(s)
  19496. }
  19497. // GoString returns the string representation
  19498. func (s SourceSelectionCriteria) GoString() string {
  19499. return s.String()
  19500. }
  19501. // Validate inspects the fields of the type to determine if they are valid.
  19502. func (s *SourceSelectionCriteria) Validate() error {
  19503. invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
  19504. if s.SseKmsEncryptedObjects != nil {
  19505. if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
  19506. invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
  19507. }
  19508. }
  19509. if invalidParams.Len() > 0 {
  19510. return invalidParams
  19511. }
  19512. return nil
  19513. }
  19514. // SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
  19515. func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
  19516. s.SseKmsEncryptedObjects = v
  19517. return s
  19518. }
  19519. // A container for filter information for the selection of S3 objects encrypted
  19520. // with AWS KMS.
  19521. type SseKmsEncryptedObjects struct {
  19522. _ struct{} `type:"structure"`
  19523. // If the status is not Enabled, replication for S3 objects encrypted with AWS
  19524. // KMS is disabled.
  19525. //
  19526. // Status is a required field
  19527. Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
  19528. }
  19529. // String returns the string representation
  19530. func (s SseKmsEncryptedObjects) String() string {
  19531. return awsutil.Prettify(s)
  19532. }
  19533. // GoString returns the string representation
  19534. func (s SseKmsEncryptedObjects) GoString() string {
  19535. return s.String()
  19536. }
  19537. // Validate inspects the fields of the type to determine if they are valid.
  19538. func (s *SseKmsEncryptedObjects) Validate() error {
  19539. invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
  19540. if s.Status == nil {
  19541. invalidParams.Add(request.NewErrParamRequired("Status"))
  19542. }
  19543. if invalidParams.Len() > 0 {
  19544. return invalidParams
  19545. }
  19546. return nil
  19547. }
  19548. // SetStatus sets the Status field's value.
  19549. func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
  19550. s.Status = &v
  19551. return s
  19552. }
  19553. type Stats struct {
  19554. _ struct{} `type:"structure"`
  19555. // The total number of uncompressed object bytes processed.
  19556. BytesProcessed *int64 `type:"long"`
  19557. // The total number of bytes of records payload data returned.
  19558. BytesReturned *int64 `type:"long"`
  19559. // The total number of object bytes scanned.
  19560. BytesScanned *int64 `type:"long"`
  19561. }
  19562. // String returns the string representation
  19563. func (s Stats) String() string {
  19564. return awsutil.Prettify(s)
  19565. }
  19566. // GoString returns the string representation
  19567. func (s Stats) GoString() string {
  19568. return s.String()
  19569. }
  19570. // SetBytesProcessed sets the BytesProcessed field's value.
  19571. func (s *Stats) SetBytesProcessed(v int64) *Stats {
  19572. s.BytesProcessed = &v
  19573. return s
  19574. }
  19575. // SetBytesReturned sets the BytesReturned field's value.
  19576. func (s *Stats) SetBytesReturned(v int64) *Stats {
  19577. s.BytesReturned = &v
  19578. return s
  19579. }
  19580. // SetBytesScanned sets the BytesScanned field's value.
  19581. func (s *Stats) SetBytesScanned(v int64) *Stats {
  19582. s.BytesScanned = &v
  19583. return s
  19584. }
  19585. type StatsEvent struct {
  19586. _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"`
  19587. // The Stats event details.
  19588. Details *Stats `locationName:"Details" type:"structure"`
  19589. }
  19590. // String returns the string representation
  19591. func (s StatsEvent) String() string {
  19592. return awsutil.Prettify(s)
  19593. }
  19594. // GoString returns the string representation
  19595. func (s StatsEvent) GoString() string {
  19596. return s.String()
  19597. }
  19598. // SetDetails sets the Details field's value.
  19599. func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent {
  19600. s.Details = v
  19601. return s
  19602. }
  19603. // The StatsEvent is and event in the SelectObjectContentEventStream group of events.
  19604. func (s *StatsEvent) eventSelectObjectContentEventStream() {}
  19605. // UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value.
  19606. // This method is only used internally within the SDK's EventStream handling.
  19607. func (s *StatsEvent) UnmarshalEvent(
  19608. payloadUnmarshaler protocol.PayloadUnmarshaler,
  19609. msg eventstream.Message,
  19610. ) error {
  19611. if err := payloadUnmarshaler.UnmarshalPayload(
  19612. bytes.NewReader(msg.Payload), s,
  19613. ); err != nil {
  19614. return err
  19615. }
  19616. return nil
  19617. }
  19618. type StorageClassAnalysis struct {
  19619. _ struct{} `type:"structure"`
  19620. // A container used to describe how data related to the storage class analysis
  19621. // should be exported.
  19622. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  19623. }
  19624. // String returns the string representation
  19625. func (s StorageClassAnalysis) String() string {
  19626. return awsutil.Prettify(s)
  19627. }
  19628. // GoString returns the string representation
  19629. func (s StorageClassAnalysis) GoString() string {
  19630. return s.String()
  19631. }
  19632. // Validate inspects the fields of the type to determine if they are valid.
  19633. func (s *StorageClassAnalysis) Validate() error {
  19634. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  19635. if s.DataExport != nil {
  19636. if err := s.DataExport.Validate(); err != nil {
  19637. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  19638. }
  19639. }
  19640. if invalidParams.Len() > 0 {
  19641. return invalidParams
  19642. }
  19643. return nil
  19644. }
  19645. // SetDataExport sets the DataExport field's value.
  19646. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  19647. s.DataExport = v
  19648. return s
  19649. }
  19650. type StorageClassAnalysisDataExport struct {
  19651. _ struct{} `type:"structure"`
  19652. // The place to store the data for an analysis.
  19653. //
  19654. // Destination is a required field
  19655. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  19656. // The version of the output schema to use when exporting data. Must be V_1.
  19657. //
  19658. // OutputSchemaVersion is a required field
  19659. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  19660. }
  19661. // String returns the string representation
  19662. func (s StorageClassAnalysisDataExport) String() string {
  19663. return awsutil.Prettify(s)
  19664. }
  19665. // GoString returns the string representation
  19666. func (s StorageClassAnalysisDataExport) GoString() string {
  19667. return s.String()
  19668. }
  19669. // Validate inspects the fields of the type to determine if they are valid.
  19670. func (s *StorageClassAnalysisDataExport) Validate() error {
  19671. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  19672. if s.Destination == nil {
  19673. invalidParams.Add(request.NewErrParamRequired("Destination"))
  19674. }
  19675. if s.OutputSchemaVersion == nil {
  19676. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  19677. }
  19678. if s.Destination != nil {
  19679. if err := s.Destination.Validate(); err != nil {
  19680. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  19681. }
  19682. }
  19683. if invalidParams.Len() > 0 {
  19684. return invalidParams
  19685. }
  19686. return nil
  19687. }
  19688. // SetDestination sets the Destination field's value.
  19689. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  19690. s.Destination = v
  19691. return s
  19692. }
  19693. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  19694. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  19695. s.OutputSchemaVersion = &v
  19696. return s
  19697. }
  19698. type Tag struct {
  19699. _ struct{} `type:"structure"`
  19700. // Name of the tag.
  19701. //
  19702. // Key is a required field
  19703. Key *string `min:"1" type:"string" required:"true"`
  19704. // Value of the tag.
  19705. //
  19706. // Value is a required field
  19707. Value *string `type:"string" required:"true"`
  19708. }
  19709. // String returns the string representation
  19710. func (s Tag) String() string {
  19711. return awsutil.Prettify(s)
  19712. }
  19713. // GoString returns the string representation
  19714. func (s Tag) GoString() string {
  19715. return s.String()
  19716. }
  19717. // Validate inspects the fields of the type to determine if they are valid.
  19718. func (s *Tag) Validate() error {
  19719. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  19720. if s.Key == nil {
  19721. invalidParams.Add(request.NewErrParamRequired("Key"))
  19722. }
  19723. if s.Key != nil && len(*s.Key) < 1 {
  19724. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19725. }
  19726. if s.Value == nil {
  19727. invalidParams.Add(request.NewErrParamRequired("Value"))
  19728. }
  19729. if invalidParams.Len() > 0 {
  19730. return invalidParams
  19731. }
  19732. return nil
  19733. }
  19734. // SetKey sets the Key field's value.
  19735. func (s *Tag) SetKey(v string) *Tag {
  19736. s.Key = &v
  19737. return s
  19738. }
  19739. // SetValue sets the Value field's value.
  19740. func (s *Tag) SetValue(v string) *Tag {
  19741. s.Value = &v
  19742. return s
  19743. }
  19744. type Tagging struct {
  19745. _ struct{} `type:"structure"`
  19746. // TagSet is a required field
  19747. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  19748. }
  19749. // String returns the string representation
  19750. func (s Tagging) String() string {
  19751. return awsutil.Prettify(s)
  19752. }
  19753. // GoString returns the string representation
  19754. func (s Tagging) GoString() string {
  19755. return s.String()
  19756. }
  19757. // Validate inspects the fields of the type to determine if they are valid.
  19758. func (s *Tagging) Validate() error {
  19759. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  19760. if s.TagSet == nil {
  19761. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  19762. }
  19763. if s.TagSet != nil {
  19764. for i, v := range s.TagSet {
  19765. if v == nil {
  19766. continue
  19767. }
  19768. if err := v.Validate(); err != nil {
  19769. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  19770. }
  19771. }
  19772. }
  19773. if invalidParams.Len() > 0 {
  19774. return invalidParams
  19775. }
  19776. return nil
  19777. }
  19778. // SetTagSet sets the TagSet field's value.
  19779. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  19780. s.TagSet = v
  19781. return s
  19782. }
  19783. type TargetGrant struct {
  19784. _ struct{} `type:"structure"`
  19785. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  19786. // Logging permissions assigned to the Grantee for the bucket.
  19787. Permission *string `type:"string" enum:"BucketLogsPermission"`
  19788. }
  19789. // String returns the string representation
  19790. func (s TargetGrant) String() string {
  19791. return awsutil.Prettify(s)
  19792. }
  19793. // GoString returns the string representation
  19794. func (s TargetGrant) GoString() string {
  19795. return s.String()
  19796. }
  19797. // Validate inspects the fields of the type to determine if they are valid.
  19798. func (s *TargetGrant) Validate() error {
  19799. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  19800. if s.Grantee != nil {
  19801. if err := s.Grantee.Validate(); err != nil {
  19802. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  19803. }
  19804. }
  19805. if invalidParams.Len() > 0 {
  19806. return invalidParams
  19807. }
  19808. return nil
  19809. }
  19810. // SetGrantee sets the Grantee field's value.
  19811. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  19812. s.Grantee = v
  19813. return s
  19814. }
  19815. // SetPermission sets the Permission field's value.
  19816. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  19817. s.Permission = &v
  19818. return s
  19819. }
  19820. // A container for specifying the configuration for publication of messages
  19821. // to an Amazon Simple Notification Service (Amazon SNS) topic.when Amazon S3
  19822. // detects specified events.
  19823. type TopicConfiguration struct {
  19824. _ struct{} `type:"structure"`
  19825. // Events is a required field
  19826. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  19827. // A container for object key name filtering rules. For information about key
  19828. // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  19829. // in the Amazon Simple Storage Service Developer Guide.
  19830. Filter *NotificationConfigurationFilter `type:"structure"`
  19831. // An optional unique identifier for configurations in a notification configuration.
  19832. // If you don't provide one, Amazon S3 will assign an ID.
  19833. Id *string `type:"string"`
  19834. // The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3
  19835. // will publish a message when it detects events of the specified type.
  19836. //
  19837. // TopicArn is a required field
  19838. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  19839. }
  19840. // String returns the string representation
  19841. func (s TopicConfiguration) String() string {
  19842. return awsutil.Prettify(s)
  19843. }
  19844. // GoString returns the string representation
  19845. func (s TopicConfiguration) GoString() string {
  19846. return s.String()
  19847. }
  19848. // Validate inspects the fields of the type to determine if they are valid.
  19849. func (s *TopicConfiguration) Validate() error {
  19850. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  19851. if s.Events == nil {
  19852. invalidParams.Add(request.NewErrParamRequired("Events"))
  19853. }
  19854. if s.TopicArn == nil {
  19855. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  19856. }
  19857. if invalidParams.Len() > 0 {
  19858. return invalidParams
  19859. }
  19860. return nil
  19861. }
  19862. // SetEvents sets the Events field's value.
  19863. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  19864. s.Events = v
  19865. return s
  19866. }
  19867. // SetFilter sets the Filter field's value.
  19868. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  19869. s.Filter = v
  19870. return s
  19871. }
  19872. // SetId sets the Id field's value.
  19873. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  19874. s.Id = &v
  19875. return s
  19876. }
  19877. // SetTopicArn sets the TopicArn field's value.
  19878. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  19879. s.TopicArn = &v
  19880. return s
  19881. }
  19882. type TopicConfigurationDeprecated struct {
  19883. _ struct{} `type:"structure"`
  19884. // Bucket event for which to send notifications.
  19885. //
  19886. // Deprecated: Event has been deprecated
  19887. Event *string `deprecated:"true" type:"string" enum:"Event"`
  19888. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  19889. // An optional unique identifier for configurations in a notification configuration.
  19890. // If you don't provide one, Amazon S3 will assign an ID.
  19891. Id *string `type:"string"`
  19892. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  19893. // specified events for the bucket.
  19894. Topic *string `type:"string"`
  19895. }
  19896. // String returns the string representation
  19897. func (s TopicConfigurationDeprecated) String() string {
  19898. return awsutil.Prettify(s)
  19899. }
  19900. // GoString returns the string representation
  19901. func (s TopicConfigurationDeprecated) GoString() string {
  19902. return s.String()
  19903. }
  19904. // SetEvent sets the Event field's value.
  19905. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  19906. s.Event = &v
  19907. return s
  19908. }
  19909. // SetEvents sets the Events field's value.
  19910. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  19911. s.Events = v
  19912. return s
  19913. }
  19914. // SetId sets the Id field's value.
  19915. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  19916. s.Id = &v
  19917. return s
  19918. }
  19919. // SetTopic sets the Topic field's value.
  19920. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  19921. s.Topic = &v
  19922. return s
  19923. }
  19924. type Transition struct {
  19925. _ struct{} `type:"structure"`
  19926. // Indicates at what date the object is to be moved or deleted. Should be in
  19927. // GMT ISO 8601 Format.
  19928. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  19929. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  19930. // The value must be a non-zero positive integer.
  19931. Days *int64 `type:"integer"`
  19932. // The class of storage used to store the object.
  19933. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  19934. }
  19935. // String returns the string representation
  19936. func (s Transition) String() string {
  19937. return awsutil.Prettify(s)
  19938. }
  19939. // GoString returns the string representation
  19940. func (s Transition) GoString() string {
  19941. return s.String()
  19942. }
  19943. // SetDate sets the Date field's value.
  19944. func (s *Transition) SetDate(v time.Time) *Transition {
  19945. s.Date = &v
  19946. return s
  19947. }
  19948. // SetDays sets the Days field's value.
  19949. func (s *Transition) SetDays(v int64) *Transition {
  19950. s.Days = &v
  19951. return s
  19952. }
  19953. // SetStorageClass sets the StorageClass field's value.
  19954. func (s *Transition) SetStorageClass(v string) *Transition {
  19955. s.StorageClass = &v
  19956. return s
  19957. }
  19958. type UploadPartCopyInput struct {
  19959. _ struct{} `type:"structure"`
  19960. // Bucket is a required field
  19961. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19962. // The name of the source bucket and key name of the source object, separated
  19963. // by a slash (/). Must be URL-encoded.
  19964. //
  19965. // CopySource is a required field
  19966. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  19967. // Copies the object if its entity tag (ETag) matches the specified tag.
  19968. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  19969. // Copies the object if it has been modified since the specified time.
  19970. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  19971. // Copies the object if its entity tag (ETag) is different than the specified
  19972. // ETag.
  19973. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  19974. // Copies the object if it hasn't been modified since the specified time.
  19975. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  19976. // The range of bytes to copy from the source object. The range value must use
  19977. // the form bytes=first-last, where the first and last are the zero-based byte
  19978. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  19979. // first ten bytes of the source. You can copy a range only if the source object
  19980. // is greater than 5 GB.
  19981. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  19982. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  19983. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  19984. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  19985. // the source object. The encryption key provided in this header must be one
  19986. // that was used when the source object was created.
  19987. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19988. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  19989. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  19990. // key was transmitted without error.
  19991. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  19992. // Key is a required field
  19993. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19994. // Part number of part being copied. This is a positive integer between 1 and
  19995. // 10,000.
  19996. //
  19997. // PartNumber is a required field
  19998. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  19999. // Confirms that the requester knows that she or he will be charged for the
  20000. // request. Bucket owners need not specify this parameter in their requests.
  20001. // Documentation on downloading objects from requester pays buckets can be found
  20002. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  20003. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  20004. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  20005. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20006. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  20007. // data. This value is used to store the object and then it is discarded; Amazon
  20008. // does not store the encryption key. The key must be appropriate for use with
  20009. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  20010. // header. This must be the same encryption key specified in the initiate multipart
  20011. // upload request.
  20012. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  20013. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  20014. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  20015. // key was transmitted without error.
  20016. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20017. // Upload ID identifying the multipart upload whose part is being copied.
  20018. //
  20019. // UploadId is a required field
  20020. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  20021. }
  20022. // String returns the string representation
  20023. func (s UploadPartCopyInput) String() string {
  20024. return awsutil.Prettify(s)
  20025. }
  20026. // GoString returns the string representation
  20027. func (s UploadPartCopyInput) GoString() string {
  20028. return s.String()
  20029. }
  20030. // Validate inspects the fields of the type to determine if they are valid.
  20031. func (s *UploadPartCopyInput) Validate() error {
  20032. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  20033. if s.Bucket == nil {
  20034. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20035. }
  20036. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20037. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20038. }
  20039. if s.CopySource == nil {
  20040. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  20041. }
  20042. if s.Key == nil {
  20043. invalidParams.Add(request.NewErrParamRequired("Key"))
  20044. }
  20045. if s.Key != nil && len(*s.Key) < 1 {
  20046. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20047. }
  20048. if s.PartNumber == nil {
  20049. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  20050. }
  20051. if s.UploadId == nil {
  20052. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  20053. }
  20054. if invalidParams.Len() > 0 {
  20055. return invalidParams
  20056. }
  20057. return nil
  20058. }
  20059. // SetBucket sets the Bucket field's value.
  20060. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  20061. s.Bucket = &v
  20062. return s
  20063. }
  20064. func (s *UploadPartCopyInput) getBucket() (v string) {
  20065. if s.Bucket == nil {
  20066. return v
  20067. }
  20068. return *s.Bucket
  20069. }
  20070. // SetCopySource sets the CopySource field's value.
  20071. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  20072. s.CopySource = &v
  20073. return s
  20074. }
  20075. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  20076. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  20077. s.CopySourceIfMatch = &v
  20078. return s
  20079. }
  20080. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  20081. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  20082. s.CopySourceIfModifiedSince = &v
  20083. return s
  20084. }
  20085. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  20086. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  20087. s.CopySourceIfNoneMatch = &v
  20088. return s
  20089. }
  20090. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  20091. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  20092. s.CopySourceIfUnmodifiedSince = &v
  20093. return s
  20094. }
  20095. // SetCopySourceRange sets the CopySourceRange field's value.
  20096. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  20097. s.CopySourceRange = &v
  20098. return s
  20099. }
  20100. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  20101. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  20102. s.CopySourceSSECustomerAlgorithm = &v
  20103. return s
  20104. }
  20105. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  20106. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  20107. s.CopySourceSSECustomerKey = &v
  20108. return s
  20109. }
  20110. func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
  20111. if s.CopySourceSSECustomerKey == nil {
  20112. return v
  20113. }
  20114. return *s.CopySourceSSECustomerKey
  20115. }
  20116. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  20117. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  20118. s.CopySourceSSECustomerKeyMD5 = &v
  20119. return s
  20120. }
  20121. // SetKey sets the Key field's value.
  20122. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  20123. s.Key = &v
  20124. return s
  20125. }
  20126. // SetPartNumber sets the PartNumber field's value.
  20127. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  20128. s.PartNumber = &v
  20129. return s
  20130. }
  20131. // SetRequestPayer sets the RequestPayer field's value.
  20132. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  20133. s.RequestPayer = &v
  20134. return s
  20135. }
  20136. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20137. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  20138. s.SSECustomerAlgorithm = &v
  20139. return s
  20140. }
  20141. // SetSSECustomerKey sets the SSECustomerKey field's value.
  20142. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  20143. s.SSECustomerKey = &v
  20144. return s
  20145. }
  20146. func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
  20147. if s.SSECustomerKey == nil {
  20148. return v
  20149. }
  20150. return *s.SSECustomerKey
  20151. }
  20152. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20153. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  20154. s.SSECustomerKeyMD5 = &v
  20155. return s
  20156. }
  20157. // SetUploadId sets the UploadId field's value.
  20158. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  20159. s.UploadId = &v
  20160. return s
  20161. }
  20162. type UploadPartCopyOutput struct {
  20163. _ struct{} `type:"structure" payload:"CopyPartResult"`
  20164. CopyPartResult *CopyPartResult `type:"structure"`
  20165. // The version of the source object that was copied, if you have enabled versioning
  20166. // on the source bucket.
  20167. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  20168. // If present, indicates that the requester was successfully charged for the
  20169. // request.
  20170. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  20171. // If server-side encryption with a customer-provided encryption key was requested,
  20172. // the response will include this header confirming the encryption algorithm
  20173. // used.
  20174. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20175. // If server-side encryption with a customer-provided encryption key was requested,
  20176. // the response will include this header to provide round trip message integrity
  20177. // verification of the customer-provided encryption key.
  20178. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20179. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  20180. // encryption key that was used for the object.
  20181. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  20182. // The Server-side encryption algorithm used when storing this object in S3
  20183. // (e.g., AES256, aws:kms).
  20184. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  20185. }
  20186. // String returns the string representation
  20187. func (s UploadPartCopyOutput) String() string {
  20188. return awsutil.Prettify(s)
  20189. }
  20190. // GoString returns the string representation
  20191. func (s UploadPartCopyOutput) GoString() string {
  20192. return s.String()
  20193. }
  20194. // SetCopyPartResult sets the CopyPartResult field's value.
  20195. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  20196. s.CopyPartResult = v
  20197. return s
  20198. }
  20199. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  20200. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  20201. s.CopySourceVersionId = &v
  20202. return s
  20203. }
  20204. // SetRequestCharged sets the RequestCharged field's value.
  20205. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  20206. s.RequestCharged = &v
  20207. return s
  20208. }
  20209. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20210. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  20211. s.SSECustomerAlgorithm = &v
  20212. return s
  20213. }
  20214. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20215. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  20216. s.SSECustomerKeyMD5 = &v
  20217. return s
  20218. }
  20219. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  20220. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  20221. s.SSEKMSKeyId = &v
  20222. return s
  20223. }
  20224. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  20225. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  20226. s.ServerSideEncryption = &v
  20227. return s
  20228. }
  20229. type UploadPartInput struct {
  20230. _ struct{} `type:"structure" payload:"Body"`
  20231. // Object data.
  20232. Body io.ReadSeeker `type:"blob"`
  20233. // Name of the bucket to which the multipart upload was initiated.
  20234. //
  20235. // Bucket is a required field
  20236. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  20237. // Size of the body in bytes. This parameter is useful when the size of the
  20238. // body cannot be determined automatically.
  20239. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  20240. // The base64-encoded 128-bit MD5 digest of the part data.
  20241. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  20242. // Object key for which the multipart upload was initiated.
  20243. //
  20244. // Key is a required field
  20245. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  20246. // Part number of part being uploaded. This is a positive integer between 1
  20247. // and 10,000.
  20248. //
  20249. // PartNumber is a required field
  20250. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  20251. // Confirms that the requester knows that she or he will be charged for the
  20252. // request. Bucket owners need not specify this parameter in their requests.
  20253. // Documentation on downloading objects from requester pays buckets can be found
  20254. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  20255. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  20256. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  20257. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20258. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  20259. // data. This value is used to store the object and then it is discarded; Amazon
  20260. // does not store the encryption key. The key must be appropriate for use with
  20261. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  20262. // header. This must be the same encryption key specified in the initiate multipart
  20263. // upload request.
  20264. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  20265. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  20266. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  20267. // key was transmitted without error.
  20268. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20269. // Upload ID identifying the multipart upload whose part is being uploaded.
  20270. //
  20271. // UploadId is a required field
  20272. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  20273. }
  20274. // String returns the string representation
  20275. func (s UploadPartInput) String() string {
  20276. return awsutil.Prettify(s)
  20277. }
  20278. // GoString returns the string representation
  20279. func (s UploadPartInput) GoString() string {
  20280. return s.String()
  20281. }
  20282. // Validate inspects the fields of the type to determine if they are valid.
  20283. func (s *UploadPartInput) Validate() error {
  20284. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  20285. if s.Bucket == nil {
  20286. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20287. }
  20288. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20289. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20290. }
  20291. if s.Key == nil {
  20292. invalidParams.Add(request.NewErrParamRequired("Key"))
  20293. }
  20294. if s.Key != nil && len(*s.Key) < 1 {
  20295. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20296. }
  20297. if s.PartNumber == nil {
  20298. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  20299. }
  20300. if s.UploadId == nil {
  20301. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  20302. }
  20303. if invalidParams.Len() > 0 {
  20304. return invalidParams
  20305. }
  20306. return nil
  20307. }
  20308. // SetBody sets the Body field's value.
  20309. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  20310. s.Body = v
  20311. return s
  20312. }
  20313. // SetBucket sets the Bucket field's value.
  20314. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  20315. s.Bucket = &v
  20316. return s
  20317. }
  20318. func (s *UploadPartInput) getBucket() (v string) {
  20319. if s.Bucket == nil {
  20320. return v
  20321. }
  20322. return *s.Bucket
  20323. }
  20324. // SetContentLength sets the ContentLength field's value.
  20325. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  20326. s.ContentLength = &v
  20327. return s
  20328. }
  20329. // SetContentMD5 sets the ContentMD5 field's value.
  20330. func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
  20331. s.ContentMD5 = &v
  20332. return s
  20333. }
  20334. // SetKey sets the Key field's value.
  20335. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  20336. s.Key = &v
  20337. return s
  20338. }
  20339. // SetPartNumber sets the PartNumber field's value.
  20340. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  20341. s.PartNumber = &v
  20342. return s
  20343. }
  20344. // SetRequestPayer sets the RequestPayer field's value.
  20345. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  20346. s.RequestPayer = &v
  20347. return s
  20348. }
  20349. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20350. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  20351. s.SSECustomerAlgorithm = &v
  20352. return s
  20353. }
  20354. // SetSSECustomerKey sets the SSECustomerKey field's value.
  20355. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  20356. s.SSECustomerKey = &v
  20357. return s
  20358. }
  20359. func (s *UploadPartInput) getSSECustomerKey() (v string) {
  20360. if s.SSECustomerKey == nil {
  20361. return v
  20362. }
  20363. return *s.SSECustomerKey
  20364. }
  20365. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20366. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  20367. s.SSECustomerKeyMD5 = &v
  20368. return s
  20369. }
  20370. // SetUploadId sets the UploadId field's value.
  20371. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  20372. s.UploadId = &v
  20373. return s
  20374. }
  20375. type UploadPartOutput struct {
  20376. _ struct{} `type:"structure"`
  20377. // Entity tag for the uploaded object.
  20378. ETag *string `location:"header" locationName:"ETag" type:"string"`
  20379. // If present, indicates that the requester was successfully charged for the
  20380. // request.
  20381. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  20382. // If server-side encryption with a customer-provided encryption key was requested,
  20383. // the response will include this header confirming the encryption algorithm
  20384. // used.
  20385. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20386. // If server-side encryption with a customer-provided encryption key was requested,
  20387. // the response will include this header to provide round trip message integrity
  20388. // verification of the customer-provided encryption key.
  20389. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20390. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  20391. // encryption key that was used for the object.
  20392. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  20393. // The Server-side encryption algorithm used when storing this object in S3
  20394. // (e.g., AES256, aws:kms).
  20395. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  20396. }
  20397. // String returns the string representation
  20398. func (s UploadPartOutput) String() string {
  20399. return awsutil.Prettify(s)
  20400. }
  20401. // GoString returns the string representation
  20402. func (s UploadPartOutput) GoString() string {
  20403. return s.String()
  20404. }
  20405. // SetETag sets the ETag field's value.
  20406. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  20407. s.ETag = &v
  20408. return s
  20409. }
  20410. // SetRequestCharged sets the RequestCharged field's value.
  20411. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  20412. s.RequestCharged = &v
  20413. return s
  20414. }
  20415. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20416. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  20417. s.SSECustomerAlgorithm = &v
  20418. return s
  20419. }
  20420. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20421. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  20422. s.SSECustomerKeyMD5 = &v
  20423. return s
  20424. }
  20425. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  20426. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  20427. s.SSEKMSKeyId = &v
  20428. return s
  20429. }
  20430. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  20431. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  20432. s.ServerSideEncryption = &v
  20433. return s
  20434. }
  20435. type VersioningConfiguration struct {
  20436. _ struct{} `type:"structure"`
  20437. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  20438. // This element is only returned if the bucket has been configured with MFA
  20439. // delete. If the bucket has never been so configured, this element is not returned.
  20440. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  20441. // The versioning state of the bucket.
  20442. Status *string `type:"string" enum:"BucketVersioningStatus"`
  20443. }
  20444. // String returns the string representation
  20445. func (s VersioningConfiguration) String() string {
  20446. return awsutil.Prettify(s)
  20447. }
  20448. // GoString returns the string representation
  20449. func (s VersioningConfiguration) GoString() string {
  20450. return s.String()
  20451. }
  20452. // SetMFADelete sets the MFADelete field's value.
  20453. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  20454. s.MFADelete = &v
  20455. return s
  20456. }
  20457. // SetStatus sets the Status field's value.
  20458. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  20459. s.Status = &v
  20460. return s
  20461. }
  20462. type WebsiteConfiguration struct {
  20463. _ struct{} `type:"structure"`
  20464. ErrorDocument *ErrorDocument `type:"structure"`
  20465. IndexDocument *IndexDocument `type:"structure"`
  20466. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  20467. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  20468. }
  20469. // String returns the string representation
  20470. func (s WebsiteConfiguration) String() string {
  20471. return awsutil.Prettify(s)
  20472. }
  20473. // GoString returns the string representation
  20474. func (s WebsiteConfiguration) GoString() string {
  20475. return s.String()
  20476. }
  20477. // Validate inspects the fields of the type to determine if they are valid.
  20478. func (s *WebsiteConfiguration) Validate() error {
  20479. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  20480. if s.ErrorDocument != nil {
  20481. if err := s.ErrorDocument.Validate(); err != nil {
  20482. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  20483. }
  20484. }
  20485. if s.IndexDocument != nil {
  20486. if err := s.IndexDocument.Validate(); err != nil {
  20487. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  20488. }
  20489. }
  20490. if s.RedirectAllRequestsTo != nil {
  20491. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  20492. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  20493. }
  20494. }
  20495. if s.RoutingRules != nil {
  20496. for i, v := range s.RoutingRules {
  20497. if v == nil {
  20498. continue
  20499. }
  20500. if err := v.Validate(); err != nil {
  20501. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  20502. }
  20503. }
  20504. }
  20505. if invalidParams.Len() > 0 {
  20506. return invalidParams
  20507. }
  20508. return nil
  20509. }
  20510. // SetErrorDocument sets the ErrorDocument field's value.
  20511. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  20512. s.ErrorDocument = v
  20513. return s
  20514. }
  20515. // SetIndexDocument sets the IndexDocument field's value.
  20516. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  20517. s.IndexDocument = v
  20518. return s
  20519. }
  20520. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  20521. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  20522. s.RedirectAllRequestsTo = v
  20523. return s
  20524. }
  20525. // SetRoutingRules sets the RoutingRules field's value.
  20526. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  20527. s.RoutingRules = v
  20528. return s
  20529. }
  20530. const (
  20531. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  20532. AnalyticsS3ExportFileFormatCsv = "CSV"
  20533. )
  20534. const (
  20535. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  20536. BucketAccelerateStatusEnabled = "Enabled"
  20537. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  20538. BucketAccelerateStatusSuspended = "Suspended"
  20539. )
  20540. const (
  20541. // BucketCannedACLPrivate is a BucketCannedACL enum value
  20542. BucketCannedACLPrivate = "private"
  20543. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  20544. BucketCannedACLPublicRead = "public-read"
  20545. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  20546. BucketCannedACLPublicReadWrite = "public-read-write"
  20547. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  20548. BucketCannedACLAuthenticatedRead = "authenticated-read"
  20549. )
  20550. const (
  20551. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  20552. BucketLocationConstraintEu = "EU"
  20553. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  20554. BucketLocationConstraintEuWest1 = "eu-west-1"
  20555. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  20556. BucketLocationConstraintUsWest1 = "us-west-1"
  20557. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  20558. BucketLocationConstraintUsWest2 = "us-west-2"
  20559. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  20560. BucketLocationConstraintApSouth1 = "ap-south-1"
  20561. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  20562. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  20563. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  20564. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  20565. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  20566. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  20567. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  20568. BucketLocationConstraintSaEast1 = "sa-east-1"
  20569. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  20570. BucketLocationConstraintCnNorth1 = "cn-north-1"
  20571. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  20572. BucketLocationConstraintEuCentral1 = "eu-central-1"
  20573. )
  20574. const (
  20575. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  20576. BucketLogsPermissionFullControl = "FULL_CONTROL"
  20577. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  20578. BucketLogsPermissionRead = "READ"
  20579. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  20580. BucketLogsPermissionWrite = "WRITE"
  20581. )
  20582. const (
  20583. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  20584. BucketVersioningStatusEnabled = "Enabled"
  20585. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  20586. BucketVersioningStatusSuspended = "Suspended"
  20587. )
  20588. const (
  20589. // CompressionTypeNone is a CompressionType enum value
  20590. CompressionTypeNone = "NONE"
  20591. // CompressionTypeGzip is a CompressionType enum value
  20592. CompressionTypeGzip = "GZIP"
  20593. // CompressionTypeBzip2 is a CompressionType enum value
  20594. CompressionTypeBzip2 = "BZIP2"
  20595. )
  20596. const (
  20597. // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value
  20598. DeleteMarkerReplicationStatusEnabled = "Enabled"
  20599. // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value
  20600. DeleteMarkerReplicationStatusDisabled = "Disabled"
  20601. )
  20602. // Requests Amazon S3 to encode the object keys in the response and specifies
  20603. // the encoding method to use. An object key may contain any Unicode character;
  20604. // however, XML 1.0 parser cannot parse some characters, such as characters
  20605. // with an ASCII value from 0 to 10. For characters that are not supported in
  20606. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  20607. // keys in the response.
  20608. const (
  20609. // EncodingTypeUrl is a EncodingType enum value
  20610. EncodingTypeUrl = "url"
  20611. )
  20612. // The bucket event for which to send notifications.
  20613. const (
  20614. // EventS3ReducedRedundancyLostObject is a Event enum value
  20615. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  20616. // EventS3ObjectCreated is a Event enum value
  20617. EventS3ObjectCreated = "s3:ObjectCreated:*"
  20618. // EventS3ObjectCreatedPut is a Event enum value
  20619. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  20620. // EventS3ObjectCreatedPost is a Event enum value
  20621. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  20622. // EventS3ObjectCreatedCopy is a Event enum value
  20623. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  20624. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  20625. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  20626. // EventS3ObjectRemoved is a Event enum value
  20627. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  20628. // EventS3ObjectRemovedDelete is a Event enum value
  20629. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  20630. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  20631. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  20632. // EventS3ObjectRestorePost is a Event enum value
  20633. EventS3ObjectRestorePost = "s3:ObjectRestore:Post"
  20634. // EventS3ObjectRestoreCompleted is a Event enum value
  20635. EventS3ObjectRestoreCompleted = "s3:ObjectRestore:Completed"
  20636. )
  20637. const (
  20638. // ExpirationStatusEnabled is a ExpirationStatus enum value
  20639. ExpirationStatusEnabled = "Enabled"
  20640. // ExpirationStatusDisabled is a ExpirationStatus enum value
  20641. ExpirationStatusDisabled = "Disabled"
  20642. )
  20643. const (
  20644. // ExpressionTypeSql is a ExpressionType enum value
  20645. ExpressionTypeSql = "SQL"
  20646. )
  20647. const (
  20648. // FileHeaderInfoUse is a FileHeaderInfo enum value
  20649. FileHeaderInfoUse = "USE"
  20650. // FileHeaderInfoIgnore is a FileHeaderInfo enum value
  20651. FileHeaderInfoIgnore = "IGNORE"
  20652. // FileHeaderInfoNone is a FileHeaderInfo enum value
  20653. FileHeaderInfoNone = "NONE"
  20654. )
  20655. const (
  20656. // FilterRuleNamePrefix is a FilterRuleName enum value
  20657. FilterRuleNamePrefix = "prefix"
  20658. // FilterRuleNameSuffix is a FilterRuleName enum value
  20659. FilterRuleNameSuffix = "suffix"
  20660. )
  20661. const (
  20662. // InventoryFormatCsv is a InventoryFormat enum value
  20663. InventoryFormatCsv = "CSV"
  20664. // InventoryFormatOrc is a InventoryFormat enum value
  20665. InventoryFormatOrc = "ORC"
  20666. // InventoryFormatParquet is a InventoryFormat enum value
  20667. InventoryFormatParquet = "Parquet"
  20668. )
  20669. const (
  20670. // InventoryFrequencyDaily is a InventoryFrequency enum value
  20671. InventoryFrequencyDaily = "Daily"
  20672. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  20673. InventoryFrequencyWeekly = "Weekly"
  20674. )
  20675. const (
  20676. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  20677. InventoryIncludedObjectVersionsAll = "All"
  20678. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  20679. InventoryIncludedObjectVersionsCurrent = "Current"
  20680. )
  20681. const (
  20682. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  20683. InventoryOptionalFieldSize = "Size"
  20684. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  20685. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  20686. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  20687. InventoryOptionalFieldStorageClass = "StorageClass"
  20688. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  20689. InventoryOptionalFieldEtag = "ETag"
  20690. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  20691. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  20692. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  20693. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  20694. // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
  20695. InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
  20696. // InventoryOptionalFieldObjectLockRetainUntilDate is a InventoryOptionalField enum value
  20697. InventoryOptionalFieldObjectLockRetainUntilDate = "ObjectLockRetainUntilDate"
  20698. // InventoryOptionalFieldObjectLockMode is a InventoryOptionalField enum value
  20699. InventoryOptionalFieldObjectLockMode = "ObjectLockMode"
  20700. // InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value
  20701. InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus"
  20702. )
  20703. const (
  20704. // JSONTypeDocument is a JSONType enum value
  20705. JSONTypeDocument = "DOCUMENT"
  20706. // JSONTypeLines is a JSONType enum value
  20707. JSONTypeLines = "LINES"
  20708. )
  20709. const (
  20710. // MFADeleteEnabled is a MFADelete enum value
  20711. MFADeleteEnabled = "Enabled"
  20712. // MFADeleteDisabled is a MFADelete enum value
  20713. MFADeleteDisabled = "Disabled"
  20714. )
  20715. const (
  20716. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  20717. MFADeleteStatusEnabled = "Enabled"
  20718. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  20719. MFADeleteStatusDisabled = "Disabled"
  20720. )
  20721. const (
  20722. // MetadataDirectiveCopy is a MetadataDirective enum value
  20723. MetadataDirectiveCopy = "COPY"
  20724. // MetadataDirectiveReplace is a MetadataDirective enum value
  20725. MetadataDirectiveReplace = "REPLACE"
  20726. )
  20727. const (
  20728. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  20729. ObjectCannedACLPrivate = "private"
  20730. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  20731. ObjectCannedACLPublicRead = "public-read"
  20732. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  20733. ObjectCannedACLPublicReadWrite = "public-read-write"
  20734. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  20735. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  20736. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  20737. ObjectCannedACLAwsExecRead = "aws-exec-read"
  20738. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  20739. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  20740. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  20741. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  20742. )
  20743. const (
  20744. // ObjectLockEnabledEnabled is a ObjectLockEnabled enum value
  20745. ObjectLockEnabledEnabled = "Enabled"
  20746. )
  20747. const (
  20748. // ObjectLockLegalHoldStatusOn is a ObjectLockLegalHoldStatus enum value
  20749. ObjectLockLegalHoldStatusOn = "ON"
  20750. // ObjectLockLegalHoldStatusOff is a ObjectLockLegalHoldStatus enum value
  20751. ObjectLockLegalHoldStatusOff = "OFF"
  20752. )
  20753. const (
  20754. // ObjectLockModeGovernance is a ObjectLockMode enum value
  20755. ObjectLockModeGovernance = "GOVERNANCE"
  20756. // ObjectLockModeCompliance is a ObjectLockMode enum value
  20757. ObjectLockModeCompliance = "COMPLIANCE"
  20758. )
  20759. const (
  20760. // ObjectLockRetentionModeGovernance is a ObjectLockRetentionMode enum value
  20761. ObjectLockRetentionModeGovernance = "GOVERNANCE"
  20762. // ObjectLockRetentionModeCompliance is a ObjectLockRetentionMode enum value
  20763. ObjectLockRetentionModeCompliance = "COMPLIANCE"
  20764. )
  20765. const (
  20766. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  20767. ObjectStorageClassStandard = "STANDARD"
  20768. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  20769. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  20770. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  20771. ObjectStorageClassGlacier = "GLACIER"
  20772. // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
  20773. ObjectStorageClassStandardIa = "STANDARD_IA"
  20774. // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
  20775. ObjectStorageClassOnezoneIa = "ONEZONE_IA"
  20776. // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
  20777. ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20778. )
  20779. const (
  20780. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  20781. ObjectVersionStorageClassStandard = "STANDARD"
  20782. )
  20783. const (
  20784. // OwnerOverrideDestination is a OwnerOverride enum value
  20785. OwnerOverrideDestination = "Destination"
  20786. )
  20787. const (
  20788. // PayerRequester is a Payer enum value
  20789. PayerRequester = "Requester"
  20790. // PayerBucketOwner is a Payer enum value
  20791. PayerBucketOwner = "BucketOwner"
  20792. )
  20793. const (
  20794. // PermissionFullControl is a Permission enum value
  20795. PermissionFullControl = "FULL_CONTROL"
  20796. // PermissionWrite is a Permission enum value
  20797. PermissionWrite = "WRITE"
  20798. // PermissionWriteAcp is a Permission enum value
  20799. PermissionWriteAcp = "WRITE_ACP"
  20800. // PermissionRead is a Permission enum value
  20801. PermissionRead = "READ"
  20802. // PermissionReadAcp is a Permission enum value
  20803. PermissionReadAcp = "READ_ACP"
  20804. )
  20805. const (
  20806. // ProtocolHttp is a Protocol enum value
  20807. ProtocolHttp = "http"
  20808. // ProtocolHttps is a Protocol enum value
  20809. ProtocolHttps = "https"
  20810. )
  20811. const (
  20812. // QuoteFieldsAlways is a QuoteFields enum value
  20813. QuoteFieldsAlways = "ALWAYS"
  20814. // QuoteFieldsAsneeded is a QuoteFields enum value
  20815. QuoteFieldsAsneeded = "ASNEEDED"
  20816. )
  20817. const (
  20818. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  20819. ReplicationRuleStatusEnabled = "Enabled"
  20820. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  20821. ReplicationRuleStatusDisabled = "Disabled"
  20822. )
  20823. const (
  20824. // ReplicationStatusComplete is a ReplicationStatus enum value
  20825. ReplicationStatusComplete = "COMPLETE"
  20826. // ReplicationStatusPending is a ReplicationStatus enum value
  20827. ReplicationStatusPending = "PENDING"
  20828. // ReplicationStatusFailed is a ReplicationStatus enum value
  20829. ReplicationStatusFailed = "FAILED"
  20830. // ReplicationStatusReplica is a ReplicationStatus enum value
  20831. ReplicationStatusReplica = "REPLICA"
  20832. )
  20833. // If present, indicates that the requester was successfully charged for the
  20834. // request.
  20835. const (
  20836. // RequestChargedRequester is a RequestCharged enum value
  20837. RequestChargedRequester = "requester"
  20838. )
  20839. // Confirms that the requester knows that she or he will be charged for the
  20840. // request. Bucket owners need not specify this parameter in their requests.
  20841. // Documentation on downloading objects from requester pays buckets can be found
  20842. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  20843. const (
  20844. // RequestPayerRequester is a RequestPayer enum value
  20845. RequestPayerRequester = "requester"
  20846. )
  20847. const (
  20848. // RestoreRequestTypeSelect is a RestoreRequestType enum value
  20849. RestoreRequestTypeSelect = "SELECT"
  20850. )
  20851. const (
  20852. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  20853. ServerSideEncryptionAes256 = "AES256"
  20854. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  20855. ServerSideEncryptionAwsKms = "aws:kms"
  20856. )
  20857. const (
  20858. // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
  20859. SseKmsEncryptedObjectsStatusEnabled = "Enabled"
  20860. // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
  20861. SseKmsEncryptedObjectsStatusDisabled = "Disabled"
  20862. )
  20863. const (
  20864. // StorageClassStandard is a StorageClass enum value
  20865. StorageClassStandard = "STANDARD"
  20866. // StorageClassReducedRedundancy is a StorageClass enum value
  20867. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  20868. // StorageClassStandardIa is a StorageClass enum value
  20869. StorageClassStandardIa = "STANDARD_IA"
  20870. // StorageClassOnezoneIa is a StorageClass enum value
  20871. StorageClassOnezoneIa = "ONEZONE_IA"
  20872. // StorageClassIntelligentTiering is a StorageClass enum value
  20873. StorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20874. // StorageClassGlacier is a StorageClass enum value
  20875. StorageClassGlacier = "GLACIER"
  20876. )
  20877. const (
  20878. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  20879. StorageClassAnalysisSchemaVersionV1 = "V_1"
  20880. )
  20881. const (
  20882. // TaggingDirectiveCopy is a TaggingDirective enum value
  20883. TaggingDirectiveCopy = "COPY"
  20884. // TaggingDirectiveReplace is a TaggingDirective enum value
  20885. TaggingDirectiveReplace = "REPLACE"
  20886. )
  20887. const (
  20888. // TierStandard is a Tier enum value
  20889. TierStandard = "Standard"
  20890. // TierBulk is a Tier enum value
  20891. TierBulk = "Bulk"
  20892. // TierExpedited is a Tier enum value
  20893. TierExpedited = "Expedited"
  20894. )
  20895. const (
  20896. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  20897. TransitionStorageClassGlacier = "GLACIER"
  20898. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  20899. TransitionStorageClassStandardIa = "STANDARD_IA"
  20900. // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
  20901. TransitionStorageClassOnezoneIa = "ONEZONE_IA"
  20902. // TransitionStorageClassIntelligentTiering is a TransitionStorageClass enum value
  20903. TransitionStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20904. )
  20905. const (
  20906. // TypeCanonicalUser is a Type enum value
  20907. TypeCanonicalUser = "CanonicalUser"
  20908. // TypeAmazonCustomerByEmail is a Type enum value
  20909. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  20910. // TypeGroup is a Type enum value
  20911. TypeGroup = "Group"
  20912. )