api.go 814 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727
  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.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  427. return
  428. }
  429. // DeleteBucket API operation for Amazon Simple Storage Service.
  430. //
  431. // Deletes the bucket. All objects (including all object versions and Delete
  432. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  433. //
  434. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  435. // with awserr.Error's Code and Message methods to get detailed information about
  436. // the error.
  437. //
  438. // See the AWS API reference guide for Amazon Simple Storage Service's
  439. // API operation DeleteBucket for usage and error information.
  440. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  441. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  442. req, out := c.DeleteBucketRequest(input)
  443. return out, req.Send()
  444. }
  445. // DeleteBucketWithContext is the same as DeleteBucket with the addition of
  446. // the ability to pass a context and additional request options.
  447. //
  448. // See DeleteBucket for details on how to use this API operation.
  449. //
  450. // The context must be non-nil and will be used for request cancellation. If
  451. // the context is nil a panic will occur. In the future the SDK may create
  452. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  453. // for more information on using Contexts.
  454. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
  455. req, out := c.DeleteBucketRequest(input)
  456. req.SetContext(ctx)
  457. req.ApplyOptions(opts...)
  458. return out, req.Send()
  459. }
  460. const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
  461. // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  462. // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
  463. // value will be populated with the request's response once the request completes
  464. // successfully.
  465. //
  466. // Use "Send" method on the returned Request to send the API call to the service.
  467. // the "output" return value is not valid until after Send returns without error.
  468. //
  469. // See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
  470. // API call, and error handling.
  471. //
  472. // This method is useful when you want to inject custom logic or configuration
  473. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  474. //
  475. //
  476. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  477. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  478. //
  479. // err := req.Send()
  480. // if err == nil { // resp is now filled
  481. // fmt.Println(resp)
  482. // }
  483. //
  484. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  485. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  486. op := &request.Operation{
  487. Name: opDeleteBucketAnalyticsConfiguration,
  488. HTTPMethod: "DELETE",
  489. HTTPPath: "/{Bucket}?analytics",
  490. }
  491. if input == nil {
  492. input = &DeleteBucketAnalyticsConfigurationInput{}
  493. }
  494. output = &DeleteBucketAnalyticsConfigurationOutput{}
  495. req = c.newRequest(op, input, output)
  496. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  497. return
  498. }
  499. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  500. //
  501. // Deletes an analytics configuration for the bucket (specified by the analytics
  502. // configuration ID).
  503. //
  504. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  505. // with awserr.Error's Code and Message methods to get detailed information about
  506. // the error.
  507. //
  508. // See the AWS API reference guide for Amazon Simple Storage Service's
  509. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  510. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  511. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  512. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  513. return out, req.Send()
  514. }
  515. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  516. // the ability to pass a context and additional request options.
  517. //
  518. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  519. //
  520. // The context must be non-nil and will be used for request cancellation. If
  521. // the context is nil a panic will occur. In the future the SDK may create
  522. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  523. // for more information on using Contexts.
  524. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  525. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  526. req.SetContext(ctx)
  527. req.ApplyOptions(opts...)
  528. return out, req.Send()
  529. }
  530. const opDeleteBucketCors = "DeleteBucketCors"
  531. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  532. // client's request for the DeleteBucketCors operation. The "output" return
  533. // value will be populated with the request's response once the request completes
  534. // successfully.
  535. //
  536. // Use "Send" method on the returned Request to send the API call to the service.
  537. // the "output" return value is not valid until after Send returns without error.
  538. //
  539. // See DeleteBucketCors for more information on using the DeleteBucketCors
  540. // API call, and error handling.
  541. //
  542. // This method is useful when you want to inject custom logic or configuration
  543. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  544. //
  545. //
  546. // // Example sending a request using the DeleteBucketCorsRequest method.
  547. // req, resp := client.DeleteBucketCorsRequest(params)
  548. //
  549. // err := req.Send()
  550. // if err == nil { // resp is now filled
  551. // fmt.Println(resp)
  552. // }
  553. //
  554. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  555. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  556. op := &request.Operation{
  557. Name: opDeleteBucketCors,
  558. HTTPMethod: "DELETE",
  559. HTTPPath: "/{Bucket}?cors",
  560. }
  561. if input == nil {
  562. input = &DeleteBucketCorsInput{}
  563. }
  564. output = &DeleteBucketCorsOutput{}
  565. req = c.newRequest(op, input, output)
  566. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  567. return
  568. }
  569. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  570. //
  571. // Deletes the CORS configuration information set for the bucket.
  572. //
  573. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  574. // with awserr.Error's Code and Message methods to get detailed information about
  575. // the error.
  576. //
  577. // See the AWS API reference guide for Amazon Simple Storage Service's
  578. // API operation DeleteBucketCors for usage and error information.
  579. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  580. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  581. req, out := c.DeleteBucketCorsRequest(input)
  582. return out, req.Send()
  583. }
  584. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  585. // the ability to pass a context and additional request options.
  586. //
  587. // See DeleteBucketCors for details on how to use this API operation.
  588. //
  589. // The context must be non-nil and will be used for request cancellation. If
  590. // the context is nil a panic will occur. In the future the SDK may create
  591. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  592. // for more information on using Contexts.
  593. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  594. req, out := c.DeleteBucketCorsRequest(input)
  595. req.SetContext(ctx)
  596. req.ApplyOptions(opts...)
  597. return out, req.Send()
  598. }
  599. const opDeleteBucketEncryption = "DeleteBucketEncryption"
  600. // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
  601. // client's request for the DeleteBucketEncryption operation. The "output" return
  602. // value will be populated with the request's response once the request completes
  603. // successfully.
  604. //
  605. // Use "Send" method on the returned Request to send the API call to the service.
  606. // the "output" return value is not valid until after Send returns without error.
  607. //
  608. // See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
  609. // API call, and error handling.
  610. //
  611. // This method is useful when you want to inject custom logic or configuration
  612. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  613. //
  614. //
  615. // // Example sending a request using the DeleteBucketEncryptionRequest method.
  616. // req, resp := client.DeleteBucketEncryptionRequest(params)
  617. //
  618. // err := req.Send()
  619. // if err == nil { // resp is now filled
  620. // fmt.Println(resp)
  621. // }
  622. //
  623. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  624. func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
  625. op := &request.Operation{
  626. Name: opDeleteBucketEncryption,
  627. HTTPMethod: "DELETE",
  628. HTTPPath: "/{Bucket}?encryption",
  629. }
  630. if input == nil {
  631. input = &DeleteBucketEncryptionInput{}
  632. }
  633. output = &DeleteBucketEncryptionOutput{}
  634. req = c.newRequest(op, input, output)
  635. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  636. return
  637. }
  638. // DeleteBucketEncryption API operation for Amazon Simple Storage Service.
  639. //
  640. // Deletes the server-side encryption configuration from the bucket.
  641. //
  642. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  643. // with awserr.Error's Code and Message methods to get detailed information about
  644. // the error.
  645. //
  646. // See the AWS API reference guide for Amazon Simple Storage Service's
  647. // API operation DeleteBucketEncryption for usage and error information.
  648. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  649. func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
  650. req, out := c.DeleteBucketEncryptionRequest(input)
  651. return out, req.Send()
  652. }
  653. // DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
  654. // the ability to pass a context and additional request options.
  655. //
  656. // See DeleteBucketEncryption for details on how to use this API operation.
  657. //
  658. // The context must be non-nil and will be used for request cancellation. If
  659. // the context is nil a panic will occur. In the future the SDK may create
  660. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  661. // for more information on using Contexts.
  662. func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
  663. req, out := c.DeleteBucketEncryptionRequest(input)
  664. req.SetContext(ctx)
  665. req.ApplyOptions(opts...)
  666. return out, req.Send()
  667. }
  668. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  669. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  670. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  671. // value will be populated with the request's response once the request completes
  672. // successfully.
  673. //
  674. // Use "Send" method on the returned Request to send the API call to the service.
  675. // the "output" return value is not valid until after Send returns without error.
  676. //
  677. // See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
  678. // API call, and error handling.
  679. //
  680. // This method is useful when you want to inject custom logic or configuration
  681. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  682. //
  683. //
  684. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  685. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  686. //
  687. // err := req.Send()
  688. // if err == nil { // resp is now filled
  689. // fmt.Println(resp)
  690. // }
  691. //
  692. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  693. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  694. op := &request.Operation{
  695. Name: opDeleteBucketInventoryConfiguration,
  696. HTTPMethod: "DELETE",
  697. HTTPPath: "/{Bucket}?inventory",
  698. }
  699. if input == nil {
  700. input = &DeleteBucketInventoryConfigurationInput{}
  701. }
  702. output = &DeleteBucketInventoryConfigurationOutput{}
  703. req = c.newRequest(op, input, output)
  704. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  705. return
  706. }
  707. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  708. //
  709. // Deletes an inventory configuration (identified by the inventory ID) from
  710. // the bucket.
  711. //
  712. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  713. // with awserr.Error's Code and Message methods to get detailed information about
  714. // the error.
  715. //
  716. // See the AWS API reference guide for Amazon Simple Storage Service's
  717. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  718. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  719. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  720. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  721. return out, req.Send()
  722. }
  723. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  724. // the ability to pass a context and additional request options.
  725. //
  726. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  727. //
  728. // The context must be non-nil and will be used for request cancellation. If
  729. // the context is nil a panic will occur. In the future the SDK may create
  730. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  731. // for more information on using Contexts.
  732. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  733. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  734. req.SetContext(ctx)
  735. req.ApplyOptions(opts...)
  736. return out, req.Send()
  737. }
  738. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  739. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  740. // client's request for the DeleteBucketLifecycle operation. The "output" return
  741. // value will be populated with the request's response once the request completes
  742. // successfully.
  743. //
  744. // Use "Send" method on the returned Request to send the API call to the service.
  745. // the "output" return value is not valid until after Send returns without error.
  746. //
  747. // See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
  748. // API call, and error handling.
  749. //
  750. // This method is useful when you want to inject custom logic or configuration
  751. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  752. //
  753. //
  754. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  755. // req, resp := client.DeleteBucketLifecycleRequest(params)
  756. //
  757. // err := req.Send()
  758. // if err == nil { // resp is now filled
  759. // fmt.Println(resp)
  760. // }
  761. //
  762. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  763. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  764. op := &request.Operation{
  765. Name: opDeleteBucketLifecycle,
  766. HTTPMethod: "DELETE",
  767. HTTPPath: "/{Bucket}?lifecycle",
  768. }
  769. if input == nil {
  770. input = &DeleteBucketLifecycleInput{}
  771. }
  772. output = &DeleteBucketLifecycleOutput{}
  773. req = c.newRequest(op, input, output)
  774. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  775. return
  776. }
  777. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  778. //
  779. // Deletes the lifecycle configuration from the bucket.
  780. //
  781. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  782. // with awserr.Error's Code and Message methods to get detailed information about
  783. // the error.
  784. //
  785. // See the AWS API reference guide for Amazon Simple Storage Service's
  786. // API operation DeleteBucketLifecycle for usage and error information.
  787. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  788. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  789. req, out := c.DeleteBucketLifecycleRequest(input)
  790. return out, req.Send()
  791. }
  792. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  793. // the ability to pass a context and additional request options.
  794. //
  795. // See DeleteBucketLifecycle for details on how to use this API operation.
  796. //
  797. // The context must be non-nil and will be used for request cancellation. If
  798. // the context is nil a panic will occur. In the future the SDK may create
  799. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  800. // for more information on using Contexts.
  801. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  802. req, out := c.DeleteBucketLifecycleRequest(input)
  803. req.SetContext(ctx)
  804. req.ApplyOptions(opts...)
  805. return out, req.Send()
  806. }
  807. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  808. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  809. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  810. // value will be populated with the request's response once the request completes
  811. // successfully.
  812. //
  813. // Use "Send" method on the returned Request to send the API call to the service.
  814. // the "output" return value is not valid until after Send returns without error.
  815. //
  816. // See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
  817. // API call, and error handling.
  818. //
  819. // This method is useful when you want to inject custom logic or configuration
  820. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  821. //
  822. //
  823. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  824. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  825. //
  826. // err := req.Send()
  827. // if err == nil { // resp is now filled
  828. // fmt.Println(resp)
  829. // }
  830. //
  831. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  832. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  833. op := &request.Operation{
  834. Name: opDeleteBucketMetricsConfiguration,
  835. HTTPMethod: "DELETE",
  836. HTTPPath: "/{Bucket}?metrics",
  837. }
  838. if input == nil {
  839. input = &DeleteBucketMetricsConfigurationInput{}
  840. }
  841. output = &DeleteBucketMetricsConfigurationOutput{}
  842. req = c.newRequest(op, input, output)
  843. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  844. return
  845. }
  846. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  847. //
  848. // Deletes a metrics configuration (specified by the metrics configuration ID)
  849. // from the bucket.
  850. //
  851. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  852. // with awserr.Error's Code and Message methods to get detailed information about
  853. // the error.
  854. //
  855. // See the AWS API reference guide for Amazon Simple Storage Service's
  856. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  857. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  858. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  859. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  860. return out, req.Send()
  861. }
  862. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  863. // the ability to pass a context and additional request options.
  864. //
  865. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  866. //
  867. // The context must be non-nil and will be used for request cancellation. If
  868. // the context is nil a panic will occur. In the future the SDK may create
  869. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  870. // for more information on using Contexts.
  871. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  872. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  873. req.SetContext(ctx)
  874. req.ApplyOptions(opts...)
  875. return out, req.Send()
  876. }
  877. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  878. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  879. // client's request for the DeleteBucketPolicy operation. The "output" return
  880. // value will be populated with the request's response once the request completes
  881. // successfully.
  882. //
  883. // Use "Send" method on the returned Request to send the API call to the service.
  884. // the "output" return value is not valid until after Send returns without error.
  885. //
  886. // See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
  887. // API call, and error handling.
  888. //
  889. // This method is useful when you want to inject custom logic or configuration
  890. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  891. //
  892. //
  893. // // Example sending a request using the DeleteBucketPolicyRequest method.
  894. // req, resp := client.DeleteBucketPolicyRequest(params)
  895. //
  896. // err := req.Send()
  897. // if err == nil { // resp is now filled
  898. // fmt.Println(resp)
  899. // }
  900. //
  901. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  902. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  903. op := &request.Operation{
  904. Name: opDeleteBucketPolicy,
  905. HTTPMethod: "DELETE",
  906. HTTPPath: "/{Bucket}?policy",
  907. }
  908. if input == nil {
  909. input = &DeleteBucketPolicyInput{}
  910. }
  911. output = &DeleteBucketPolicyOutput{}
  912. req = c.newRequest(op, input, output)
  913. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  914. return
  915. }
  916. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  917. //
  918. // Deletes the policy from the bucket.
  919. //
  920. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  921. // with awserr.Error's Code and Message methods to get detailed information about
  922. // the error.
  923. //
  924. // See the AWS API reference guide for Amazon Simple Storage Service's
  925. // API operation DeleteBucketPolicy for usage and error information.
  926. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  927. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  928. req, out := c.DeleteBucketPolicyRequest(input)
  929. return out, req.Send()
  930. }
  931. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  932. // the ability to pass a context and additional request options.
  933. //
  934. // See DeleteBucketPolicy for details on how to use this API operation.
  935. //
  936. // The context must be non-nil and will be used for request cancellation. If
  937. // the context is nil a panic will occur. In the future the SDK may create
  938. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  939. // for more information on using Contexts.
  940. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  941. req, out := c.DeleteBucketPolicyRequest(input)
  942. req.SetContext(ctx)
  943. req.ApplyOptions(opts...)
  944. return out, req.Send()
  945. }
  946. const opDeleteBucketReplication = "DeleteBucketReplication"
  947. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  948. // client's request for the DeleteBucketReplication operation. The "output" return
  949. // value will be populated with the request's response once the request completes
  950. // successfully.
  951. //
  952. // Use "Send" method on the returned Request to send the API call to the service.
  953. // the "output" return value is not valid until after Send returns without error.
  954. //
  955. // See DeleteBucketReplication for more information on using the DeleteBucketReplication
  956. // API call, and error handling.
  957. //
  958. // This method is useful when you want to inject custom logic or configuration
  959. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  960. //
  961. //
  962. // // Example sending a request using the DeleteBucketReplicationRequest method.
  963. // req, resp := client.DeleteBucketReplicationRequest(params)
  964. //
  965. // err := req.Send()
  966. // if err == nil { // resp is now filled
  967. // fmt.Println(resp)
  968. // }
  969. //
  970. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  971. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  972. op := &request.Operation{
  973. Name: opDeleteBucketReplication,
  974. HTTPMethod: "DELETE",
  975. HTTPPath: "/{Bucket}?replication",
  976. }
  977. if input == nil {
  978. input = &DeleteBucketReplicationInput{}
  979. }
  980. output = &DeleteBucketReplicationOutput{}
  981. req = c.newRequest(op, input, output)
  982. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  983. return
  984. }
  985. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  986. //
  987. // Deletes the replication configuration from the bucket. For information about
  988. // replication configuration, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  989. // in the Amazon S3 Developer Guide.
  990. //
  991. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  992. // with awserr.Error's Code and Message methods to get detailed information about
  993. // the error.
  994. //
  995. // See the AWS API reference guide for Amazon Simple Storage Service's
  996. // API operation DeleteBucketReplication for usage and error information.
  997. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  998. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  999. req, out := c.DeleteBucketReplicationRequest(input)
  1000. return out, req.Send()
  1001. }
  1002. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  1003. // the ability to pass a context and additional request options.
  1004. //
  1005. // See DeleteBucketReplication for details on how to use this API operation.
  1006. //
  1007. // The context must be non-nil and will be used for request cancellation. If
  1008. // the context is nil a panic will occur. In the future the SDK may create
  1009. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1010. // for more information on using Contexts.
  1011. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  1012. req, out := c.DeleteBucketReplicationRequest(input)
  1013. req.SetContext(ctx)
  1014. req.ApplyOptions(opts...)
  1015. return out, req.Send()
  1016. }
  1017. const opDeleteBucketTagging = "DeleteBucketTagging"
  1018. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  1019. // client's request for the DeleteBucketTagging operation. The "output" return
  1020. // value will be populated with the request's response once the request completes
  1021. // successfully.
  1022. //
  1023. // Use "Send" method on the returned Request to send the API call to the service.
  1024. // the "output" return value is not valid until after Send returns without error.
  1025. //
  1026. // See DeleteBucketTagging for more information on using the DeleteBucketTagging
  1027. // API call, and error handling.
  1028. //
  1029. // This method is useful when you want to inject custom logic or configuration
  1030. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1031. //
  1032. //
  1033. // // Example sending a request using the DeleteBucketTaggingRequest method.
  1034. // req, resp := client.DeleteBucketTaggingRequest(params)
  1035. //
  1036. // err := req.Send()
  1037. // if err == nil { // resp is now filled
  1038. // fmt.Println(resp)
  1039. // }
  1040. //
  1041. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1042. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  1043. op := &request.Operation{
  1044. Name: opDeleteBucketTagging,
  1045. HTTPMethod: "DELETE",
  1046. HTTPPath: "/{Bucket}?tagging",
  1047. }
  1048. if input == nil {
  1049. input = &DeleteBucketTaggingInput{}
  1050. }
  1051. output = &DeleteBucketTaggingOutput{}
  1052. req = c.newRequest(op, input, output)
  1053. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1054. return
  1055. }
  1056. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1057. //
  1058. // Deletes the tags from the bucket.
  1059. //
  1060. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1061. // with awserr.Error's Code and Message methods to get detailed information about
  1062. // the error.
  1063. //
  1064. // See the AWS API reference guide for Amazon Simple Storage Service's
  1065. // API operation DeleteBucketTagging for usage and error information.
  1066. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1067. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1068. req, out := c.DeleteBucketTaggingRequest(input)
  1069. return out, req.Send()
  1070. }
  1071. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1072. // the ability to pass a context and additional request options.
  1073. //
  1074. // See DeleteBucketTagging for details on how to use this API operation.
  1075. //
  1076. // The context must be non-nil and will be used for request cancellation. If
  1077. // the context is nil a panic will occur. In the future the SDK may create
  1078. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1079. // for more information on using Contexts.
  1080. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1081. req, out := c.DeleteBucketTaggingRequest(input)
  1082. req.SetContext(ctx)
  1083. req.ApplyOptions(opts...)
  1084. return out, req.Send()
  1085. }
  1086. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1087. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1088. // client's request for the DeleteBucketWebsite operation. The "output" return
  1089. // value will be populated with the request's response once the request completes
  1090. // successfully.
  1091. //
  1092. // Use "Send" method on the returned Request to send the API call to the service.
  1093. // the "output" return value is not valid until after Send returns without error.
  1094. //
  1095. // See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
  1096. // API call, and error handling.
  1097. //
  1098. // This method is useful when you want to inject custom logic or configuration
  1099. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1100. //
  1101. //
  1102. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1103. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1104. //
  1105. // err := req.Send()
  1106. // if err == nil { // resp is now filled
  1107. // fmt.Println(resp)
  1108. // }
  1109. //
  1110. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1111. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1112. op := &request.Operation{
  1113. Name: opDeleteBucketWebsite,
  1114. HTTPMethod: "DELETE",
  1115. HTTPPath: "/{Bucket}?website",
  1116. }
  1117. if input == nil {
  1118. input = &DeleteBucketWebsiteInput{}
  1119. }
  1120. output = &DeleteBucketWebsiteOutput{}
  1121. req = c.newRequest(op, input, output)
  1122. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1123. return
  1124. }
  1125. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1126. //
  1127. // This operation removes the website configuration from the bucket.
  1128. //
  1129. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1130. // with awserr.Error's Code and Message methods to get detailed information about
  1131. // the error.
  1132. //
  1133. // See the AWS API reference guide for Amazon Simple Storage Service's
  1134. // API operation DeleteBucketWebsite for usage and error information.
  1135. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1136. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1137. req, out := c.DeleteBucketWebsiteRequest(input)
  1138. return out, req.Send()
  1139. }
  1140. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1141. // the ability to pass a context and additional request options.
  1142. //
  1143. // See DeleteBucketWebsite for details on how to use this API operation.
  1144. //
  1145. // The context must be non-nil and will be used for request cancellation. If
  1146. // the context is nil a panic will occur. In the future the SDK may create
  1147. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1148. // for more information on using Contexts.
  1149. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1150. req, out := c.DeleteBucketWebsiteRequest(input)
  1151. req.SetContext(ctx)
  1152. req.ApplyOptions(opts...)
  1153. return out, req.Send()
  1154. }
  1155. const opDeleteObject = "DeleteObject"
  1156. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1157. // client's request for the DeleteObject operation. The "output" return
  1158. // value will be populated with the request's response once the request completes
  1159. // successfully.
  1160. //
  1161. // Use "Send" method on the returned Request to send the API call to the service.
  1162. // the "output" return value is not valid until after Send returns without error.
  1163. //
  1164. // See DeleteObject for more information on using the DeleteObject
  1165. // API call, and error handling.
  1166. //
  1167. // This method is useful when you want to inject custom logic or configuration
  1168. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1169. //
  1170. //
  1171. // // Example sending a request using the DeleteObjectRequest method.
  1172. // req, resp := client.DeleteObjectRequest(params)
  1173. //
  1174. // err := req.Send()
  1175. // if err == nil { // resp is now filled
  1176. // fmt.Println(resp)
  1177. // }
  1178. //
  1179. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1180. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  1181. op := &request.Operation{
  1182. Name: opDeleteObject,
  1183. HTTPMethod: "DELETE",
  1184. HTTPPath: "/{Bucket}/{Key+}",
  1185. }
  1186. if input == nil {
  1187. input = &DeleteObjectInput{}
  1188. }
  1189. output = &DeleteObjectOutput{}
  1190. req = c.newRequest(op, input, output)
  1191. return
  1192. }
  1193. // DeleteObject API operation for Amazon Simple Storage Service.
  1194. //
  1195. // Removes the null version (if there is one) of an object and inserts a delete
  1196. // marker, which becomes the latest version of the object. If there isn't a
  1197. // null version, Amazon S3 does not remove any objects.
  1198. //
  1199. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1200. // with awserr.Error's Code and Message methods to get detailed information about
  1201. // the error.
  1202. //
  1203. // See the AWS API reference guide for Amazon Simple Storage Service's
  1204. // API operation DeleteObject for usage and error information.
  1205. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1206. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  1207. req, out := c.DeleteObjectRequest(input)
  1208. return out, req.Send()
  1209. }
  1210. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  1211. // the ability to pass a context and additional request options.
  1212. //
  1213. // See DeleteObject for details on how to use this API operation.
  1214. //
  1215. // The context must be non-nil and will be used for request cancellation. If
  1216. // the context is nil a panic will occur. In the future the SDK may create
  1217. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1218. // for more information on using Contexts.
  1219. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  1220. req, out := c.DeleteObjectRequest(input)
  1221. req.SetContext(ctx)
  1222. req.ApplyOptions(opts...)
  1223. return out, req.Send()
  1224. }
  1225. const opDeleteObjectTagging = "DeleteObjectTagging"
  1226. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  1227. // client's request for the DeleteObjectTagging operation. The "output" return
  1228. // value will be populated with the request's response once the request completes
  1229. // successfully.
  1230. //
  1231. // Use "Send" method on the returned Request to send the API call to the service.
  1232. // the "output" return value is not valid until after Send returns without error.
  1233. //
  1234. // See DeleteObjectTagging for more information on using the DeleteObjectTagging
  1235. // API call, and error handling.
  1236. //
  1237. // This method is useful when you want to inject custom logic or configuration
  1238. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1239. //
  1240. //
  1241. // // Example sending a request using the DeleteObjectTaggingRequest method.
  1242. // req, resp := client.DeleteObjectTaggingRequest(params)
  1243. //
  1244. // err := req.Send()
  1245. // if err == nil { // resp is now filled
  1246. // fmt.Println(resp)
  1247. // }
  1248. //
  1249. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1250. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  1251. op := &request.Operation{
  1252. Name: opDeleteObjectTagging,
  1253. HTTPMethod: "DELETE",
  1254. HTTPPath: "/{Bucket}/{Key+}?tagging",
  1255. }
  1256. if input == nil {
  1257. input = &DeleteObjectTaggingInput{}
  1258. }
  1259. output = &DeleteObjectTaggingOutput{}
  1260. req = c.newRequest(op, input, output)
  1261. return
  1262. }
  1263. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  1264. //
  1265. // Removes the tag-set from an existing object.
  1266. //
  1267. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1268. // with awserr.Error's Code and Message methods to get detailed information about
  1269. // the error.
  1270. //
  1271. // See the AWS API reference guide for Amazon Simple Storage Service's
  1272. // API operation DeleteObjectTagging for usage and error information.
  1273. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1274. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  1275. req, out := c.DeleteObjectTaggingRequest(input)
  1276. return out, req.Send()
  1277. }
  1278. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  1279. // the ability to pass a context and additional request options.
  1280. //
  1281. // See DeleteObjectTagging for details on how to use this API operation.
  1282. //
  1283. // The context must be non-nil and will be used for request cancellation. If
  1284. // the context is nil a panic will occur. In the future the SDK may create
  1285. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1286. // for more information on using Contexts.
  1287. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  1288. req, out := c.DeleteObjectTaggingRequest(input)
  1289. req.SetContext(ctx)
  1290. req.ApplyOptions(opts...)
  1291. return out, req.Send()
  1292. }
  1293. const opDeleteObjects = "DeleteObjects"
  1294. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  1295. // client's request for the DeleteObjects operation. The "output" return
  1296. // value will be populated with the request's response once the request completes
  1297. // successfully.
  1298. //
  1299. // Use "Send" method on the returned Request to send the API call to the service.
  1300. // the "output" return value is not valid until after Send returns without error.
  1301. //
  1302. // See DeleteObjects for more information on using the DeleteObjects
  1303. // API call, and error handling.
  1304. //
  1305. // This method is useful when you want to inject custom logic or configuration
  1306. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1307. //
  1308. //
  1309. // // Example sending a request using the DeleteObjectsRequest method.
  1310. // req, resp := client.DeleteObjectsRequest(params)
  1311. //
  1312. // err := req.Send()
  1313. // if err == nil { // resp is now filled
  1314. // fmt.Println(resp)
  1315. // }
  1316. //
  1317. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1318. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  1319. op := &request.Operation{
  1320. Name: opDeleteObjects,
  1321. HTTPMethod: "POST",
  1322. HTTPPath: "/{Bucket}?delete",
  1323. }
  1324. if input == nil {
  1325. input = &DeleteObjectsInput{}
  1326. }
  1327. output = &DeleteObjectsOutput{}
  1328. req = c.newRequest(op, input, output)
  1329. return
  1330. }
  1331. // DeleteObjects API operation for Amazon Simple Storage Service.
  1332. //
  1333. // This operation enables you to delete multiple objects from a bucket using
  1334. // a single HTTP request. You may specify up to 1000 keys.
  1335. //
  1336. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1337. // with awserr.Error's Code and Message methods to get detailed information about
  1338. // the error.
  1339. //
  1340. // See the AWS API reference guide for Amazon Simple Storage Service's
  1341. // API operation DeleteObjects for usage and error information.
  1342. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1343. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  1344. req, out := c.DeleteObjectsRequest(input)
  1345. return out, req.Send()
  1346. }
  1347. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  1348. // the ability to pass a context and additional request options.
  1349. //
  1350. // See DeleteObjects for details on how to use this API operation.
  1351. //
  1352. // The context must be non-nil and will be used for request cancellation. If
  1353. // the context is nil a panic will occur. In the future the SDK may create
  1354. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1355. // for more information on using Contexts.
  1356. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  1357. req, out := c.DeleteObjectsRequest(input)
  1358. req.SetContext(ctx)
  1359. req.ApplyOptions(opts...)
  1360. return out, req.Send()
  1361. }
  1362. const opDeletePublicAccessBlock = "DeletePublicAccessBlock"
  1363. // DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the
  1364. // client's request for the DeletePublicAccessBlock operation. The "output" return
  1365. // value will be populated with the request's response once the request completes
  1366. // successfully.
  1367. //
  1368. // Use "Send" method on the returned Request to send the API call to the service.
  1369. // the "output" return value is not valid until after Send returns without error.
  1370. //
  1371. // See DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock
  1372. // API call, and error handling.
  1373. //
  1374. // This method is useful when you want to inject custom logic or configuration
  1375. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1376. //
  1377. //
  1378. // // Example sending a request using the DeletePublicAccessBlockRequest method.
  1379. // req, resp := client.DeletePublicAccessBlockRequest(params)
  1380. //
  1381. // err := req.Send()
  1382. // if err == nil { // resp is now filled
  1383. // fmt.Println(resp)
  1384. // }
  1385. //
  1386. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
  1387. func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) {
  1388. op := &request.Operation{
  1389. Name: opDeletePublicAccessBlock,
  1390. HTTPMethod: "DELETE",
  1391. HTTPPath: "/{Bucket}?publicAccessBlock",
  1392. }
  1393. if input == nil {
  1394. input = &DeletePublicAccessBlockInput{}
  1395. }
  1396. output = &DeletePublicAccessBlockOutput{}
  1397. req = c.newRequest(op, input, output)
  1398. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1399. return
  1400. }
  1401. // DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
  1402. //
  1403. // Removes the PublicAccessBlock configuration from an Amazon S3 bucket.
  1404. //
  1405. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1406. // with awserr.Error's Code and Message methods to get detailed information about
  1407. // the error.
  1408. //
  1409. // See the AWS API reference guide for Amazon Simple Storage Service's
  1410. // API operation DeletePublicAccessBlock for usage and error information.
  1411. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
  1412. func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) {
  1413. req, out := c.DeletePublicAccessBlockRequest(input)
  1414. return out, req.Send()
  1415. }
  1416. // DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of
  1417. // the ability to pass a context and additional request options.
  1418. //
  1419. // See DeletePublicAccessBlock for details on how to use this API operation.
  1420. //
  1421. // The context must be non-nil and will be used for request cancellation. If
  1422. // the context is nil a panic will occur. In the future the SDK may create
  1423. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1424. // for more information on using Contexts.
  1425. func (c *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) {
  1426. req, out := c.DeletePublicAccessBlockRequest(input)
  1427. req.SetContext(ctx)
  1428. req.ApplyOptions(opts...)
  1429. return out, req.Send()
  1430. }
  1431. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  1432. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  1433. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  1434. // value will be populated with the request's response once the request completes
  1435. // successfully.
  1436. //
  1437. // Use "Send" method on the returned Request to send the API call to the service.
  1438. // the "output" return value is not valid until after Send returns without error.
  1439. //
  1440. // See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
  1441. // API call, and error handling.
  1442. //
  1443. // This method is useful when you want to inject custom logic or configuration
  1444. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1445. //
  1446. //
  1447. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  1448. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  1449. //
  1450. // err := req.Send()
  1451. // if err == nil { // resp is now filled
  1452. // fmt.Println(resp)
  1453. // }
  1454. //
  1455. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1456. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  1457. op := &request.Operation{
  1458. Name: opGetBucketAccelerateConfiguration,
  1459. HTTPMethod: "GET",
  1460. HTTPPath: "/{Bucket}?accelerate",
  1461. }
  1462. if input == nil {
  1463. input = &GetBucketAccelerateConfigurationInput{}
  1464. }
  1465. output = &GetBucketAccelerateConfigurationOutput{}
  1466. req = c.newRequest(op, input, output)
  1467. return
  1468. }
  1469. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  1470. //
  1471. // Returns the accelerate configuration of a bucket.
  1472. //
  1473. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1474. // with awserr.Error's Code and Message methods to get detailed information about
  1475. // the error.
  1476. //
  1477. // See the AWS API reference guide for Amazon Simple Storage Service's
  1478. // API operation GetBucketAccelerateConfiguration for usage and error information.
  1479. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1480. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  1481. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1482. return out, req.Send()
  1483. }
  1484. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  1485. // the ability to pass a context and additional request options.
  1486. //
  1487. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  1488. //
  1489. // The context must be non-nil and will be used for request cancellation. If
  1490. // the context is nil a panic will occur. In the future the SDK may create
  1491. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1492. // for more information on using Contexts.
  1493. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  1494. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1495. req.SetContext(ctx)
  1496. req.ApplyOptions(opts...)
  1497. return out, req.Send()
  1498. }
  1499. const opGetBucketAcl = "GetBucketAcl"
  1500. // GetBucketAclRequest generates a "aws/request.Request" representing the
  1501. // client's request for the GetBucketAcl operation. The "output" return
  1502. // value will be populated with the request's response once the request completes
  1503. // successfully.
  1504. //
  1505. // Use "Send" method on the returned Request to send the API call to the service.
  1506. // the "output" return value is not valid until after Send returns without error.
  1507. //
  1508. // See GetBucketAcl for more information on using the GetBucketAcl
  1509. // API call, and error handling.
  1510. //
  1511. // This method is useful when you want to inject custom logic or configuration
  1512. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1513. //
  1514. //
  1515. // // Example sending a request using the GetBucketAclRequest method.
  1516. // req, resp := client.GetBucketAclRequest(params)
  1517. //
  1518. // err := req.Send()
  1519. // if err == nil { // resp is now filled
  1520. // fmt.Println(resp)
  1521. // }
  1522. //
  1523. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1524. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  1525. op := &request.Operation{
  1526. Name: opGetBucketAcl,
  1527. HTTPMethod: "GET",
  1528. HTTPPath: "/{Bucket}?acl",
  1529. }
  1530. if input == nil {
  1531. input = &GetBucketAclInput{}
  1532. }
  1533. output = &GetBucketAclOutput{}
  1534. req = c.newRequest(op, input, output)
  1535. return
  1536. }
  1537. // GetBucketAcl API operation for Amazon Simple Storage Service.
  1538. //
  1539. // Gets the access control policy for the bucket.
  1540. //
  1541. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1542. // with awserr.Error's Code and Message methods to get detailed information about
  1543. // the error.
  1544. //
  1545. // See the AWS API reference guide for Amazon Simple Storage Service's
  1546. // API operation GetBucketAcl for usage and error information.
  1547. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1548. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  1549. req, out := c.GetBucketAclRequest(input)
  1550. return out, req.Send()
  1551. }
  1552. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  1553. // the ability to pass a context and additional request options.
  1554. //
  1555. // See GetBucketAcl for details on how to use this API operation.
  1556. //
  1557. // The context must be non-nil and will be used for request cancellation. If
  1558. // the context is nil a panic will occur. In the future the SDK may create
  1559. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1560. // for more information on using Contexts.
  1561. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  1562. req, out := c.GetBucketAclRequest(input)
  1563. req.SetContext(ctx)
  1564. req.ApplyOptions(opts...)
  1565. return out, req.Send()
  1566. }
  1567. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  1568. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  1569. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  1570. // value will be populated with the request's response once the request completes
  1571. // successfully.
  1572. //
  1573. // Use "Send" method on the returned Request to send the API call to the service.
  1574. // the "output" return value is not valid until after Send returns without error.
  1575. //
  1576. // See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
  1577. // API call, and error handling.
  1578. //
  1579. // This method is useful when you want to inject custom logic or configuration
  1580. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1581. //
  1582. //
  1583. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  1584. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  1585. //
  1586. // err := req.Send()
  1587. // if err == nil { // resp is now filled
  1588. // fmt.Println(resp)
  1589. // }
  1590. //
  1591. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1592. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  1593. op := &request.Operation{
  1594. Name: opGetBucketAnalyticsConfiguration,
  1595. HTTPMethod: "GET",
  1596. HTTPPath: "/{Bucket}?analytics",
  1597. }
  1598. if input == nil {
  1599. input = &GetBucketAnalyticsConfigurationInput{}
  1600. }
  1601. output = &GetBucketAnalyticsConfigurationOutput{}
  1602. req = c.newRequest(op, input, output)
  1603. return
  1604. }
  1605. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  1606. //
  1607. // Gets an analytics configuration for the bucket (specified by the analytics
  1608. // configuration ID).
  1609. //
  1610. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1611. // with awserr.Error's Code and Message methods to get detailed information about
  1612. // the error.
  1613. //
  1614. // See the AWS API reference guide for Amazon Simple Storage Service's
  1615. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  1616. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1617. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  1618. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1619. return out, req.Send()
  1620. }
  1621. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  1622. // the ability to pass a context and additional request options.
  1623. //
  1624. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  1625. //
  1626. // The context must be non-nil and will be used for request cancellation. If
  1627. // the context is nil a panic will occur. In the future the SDK may create
  1628. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1629. // for more information on using Contexts.
  1630. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  1631. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1632. req.SetContext(ctx)
  1633. req.ApplyOptions(opts...)
  1634. return out, req.Send()
  1635. }
  1636. const opGetBucketCors = "GetBucketCors"
  1637. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  1638. // client's request for the GetBucketCors operation. The "output" return
  1639. // value will be populated with the request's response once the request completes
  1640. // successfully.
  1641. //
  1642. // Use "Send" method on the returned Request to send the API call to the service.
  1643. // the "output" return value is not valid until after Send returns without error.
  1644. //
  1645. // See GetBucketCors for more information on using the GetBucketCors
  1646. // API call, and error handling.
  1647. //
  1648. // This method is useful when you want to inject custom logic or configuration
  1649. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1650. //
  1651. //
  1652. // // Example sending a request using the GetBucketCorsRequest method.
  1653. // req, resp := client.GetBucketCorsRequest(params)
  1654. //
  1655. // err := req.Send()
  1656. // if err == nil { // resp is now filled
  1657. // fmt.Println(resp)
  1658. // }
  1659. //
  1660. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1661. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  1662. op := &request.Operation{
  1663. Name: opGetBucketCors,
  1664. HTTPMethod: "GET",
  1665. HTTPPath: "/{Bucket}?cors",
  1666. }
  1667. if input == nil {
  1668. input = &GetBucketCorsInput{}
  1669. }
  1670. output = &GetBucketCorsOutput{}
  1671. req = c.newRequest(op, input, output)
  1672. return
  1673. }
  1674. // GetBucketCors API operation for Amazon Simple Storage Service.
  1675. //
  1676. // Returns the CORS configuration for the bucket.
  1677. //
  1678. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1679. // with awserr.Error's Code and Message methods to get detailed information about
  1680. // the error.
  1681. //
  1682. // See the AWS API reference guide for Amazon Simple Storage Service's
  1683. // API operation GetBucketCors for usage and error information.
  1684. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1685. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  1686. req, out := c.GetBucketCorsRequest(input)
  1687. return out, req.Send()
  1688. }
  1689. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  1690. // the ability to pass a context and additional request options.
  1691. //
  1692. // See GetBucketCors for details on how to use this API operation.
  1693. //
  1694. // The context must be non-nil and will be used for request cancellation. If
  1695. // the context is nil a panic will occur. In the future the SDK may create
  1696. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1697. // for more information on using Contexts.
  1698. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  1699. req, out := c.GetBucketCorsRequest(input)
  1700. req.SetContext(ctx)
  1701. req.ApplyOptions(opts...)
  1702. return out, req.Send()
  1703. }
  1704. const opGetBucketEncryption = "GetBucketEncryption"
  1705. // GetBucketEncryptionRequest generates a "aws/request.Request" representing the
  1706. // client's request for the GetBucketEncryption operation. The "output" return
  1707. // value will be populated with the request's response once the request completes
  1708. // successfully.
  1709. //
  1710. // Use "Send" method on the returned Request to send the API call to the service.
  1711. // the "output" return value is not valid until after Send returns without error.
  1712. //
  1713. // See GetBucketEncryption for more information on using the GetBucketEncryption
  1714. // API call, and error handling.
  1715. //
  1716. // This method is useful when you want to inject custom logic or configuration
  1717. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1718. //
  1719. //
  1720. // // Example sending a request using the GetBucketEncryptionRequest method.
  1721. // req, resp := client.GetBucketEncryptionRequest(params)
  1722. //
  1723. // err := req.Send()
  1724. // if err == nil { // resp is now filled
  1725. // fmt.Println(resp)
  1726. // }
  1727. //
  1728. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1729. func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
  1730. op := &request.Operation{
  1731. Name: opGetBucketEncryption,
  1732. HTTPMethod: "GET",
  1733. HTTPPath: "/{Bucket}?encryption",
  1734. }
  1735. if input == nil {
  1736. input = &GetBucketEncryptionInput{}
  1737. }
  1738. output = &GetBucketEncryptionOutput{}
  1739. req = c.newRequest(op, input, output)
  1740. return
  1741. }
  1742. // GetBucketEncryption API operation for Amazon Simple Storage Service.
  1743. //
  1744. // Returns the server-side encryption configuration of a bucket.
  1745. //
  1746. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1747. // with awserr.Error's Code and Message methods to get detailed information about
  1748. // the error.
  1749. //
  1750. // See the AWS API reference guide for Amazon Simple Storage Service's
  1751. // API operation GetBucketEncryption for usage and error information.
  1752. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1753. func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
  1754. req, out := c.GetBucketEncryptionRequest(input)
  1755. return out, req.Send()
  1756. }
  1757. // GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
  1758. // the ability to pass a context and additional request options.
  1759. //
  1760. // See GetBucketEncryption for details on how to use this API operation.
  1761. //
  1762. // The context must be non-nil and will be used for request cancellation. If
  1763. // the context is nil a panic will occur. In the future the SDK may create
  1764. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1765. // for more information on using Contexts.
  1766. func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
  1767. req, out := c.GetBucketEncryptionRequest(input)
  1768. req.SetContext(ctx)
  1769. req.ApplyOptions(opts...)
  1770. return out, req.Send()
  1771. }
  1772. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  1773. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1774. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  1775. // value will be populated with the request's response once the request completes
  1776. // successfully.
  1777. //
  1778. // Use "Send" method on the returned Request to send the API call to the service.
  1779. // the "output" return value is not valid until after Send returns without error.
  1780. //
  1781. // See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
  1782. // API call, and error handling.
  1783. //
  1784. // This method is useful when you want to inject custom logic or configuration
  1785. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1786. //
  1787. //
  1788. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  1789. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  1790. //
  1791. // err := req.Send()
  1792. // if err == nil { // resp is now filled
  1793. // fmt.Println(resp)
  1794. // }
  1795. //
  1796. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1797. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  1798. op := &request.Operation{
  1799. Name: opGetBucketInventoryConfiguration,
  1800. HTTPMethod: "GET",
  1801. HTTPPath: "/{Bucket}?inventory",
  1802. }
  1803. if input == nil {
  1804. input = &GetBucketInventoryConfigurationInput{}
  1805. }
  1806. output = &GetBucketInventoryConfigurationOutput{}
  1807. req = c.newRequest(op, input, output)
  1808. return
  1809. }
  1810. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1811. //
  1812. // Returns an inventory configuration (identified by the inventory ID) from
  1813. // the bucket.
  1814. //
  1815. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1816. // with awserr.Error's Code and Message methods to get detailed information about
  1817. // the error.
  1818. //
  1819. // See the AWS API reference guide for Amazon Simple Storage Service's
  1820. // API operation GetBucketInventoryConfiguration for usage and error information.
  1821. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1822. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  1823. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1824. return out, req.Send()
  1825. }
  1826. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  1827. // the ability to pass a context and additional request options.
  1828. //
  1829. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  1830. //
  1831. // The context must be non-nil and will be used for request cancellation. If
  1832. // the context is nil a panic will occur. In the future the SDK may create
  1833. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1834. // for more information on using Contexts.
  1835. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  1836. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1837. req.SetContext(ctx)
  1838. req.ApplyOptions(opts...)
  1839. return out, req.Send()
  1840. }
  1841. const opGetBucketLifecycle = "GetBucketLifecycle"
  1842. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  1843. // client's request for the GetBucketLifecycle operation. The "output" return
  1844. // value will be populated with the request's response once the request completes
  1845. // successfully.
  1846. //
  1847. // Use "Send" method on the returned Request to send the API call to the service.
  1848. // the "output" return value is not valid until after Send returns without error.
  1849. //
  1850. // See GetBucketLifecycle for more information on using the GetBucketLifecycle
  1851. // API call, and error handling.
  1852. //
  1853. // This method is useful when you want to inject custom logic or configuration
  1854. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1855. //
  1856. //
  1857. // // Example sending a request using the GetBucketLifecycleRequest method.
  1858. // req, resp := client.GetBucketLifecycleRequest(params)
  1859. //
  1860. // err := req.Send()
  1861. // if err == nil { // resp is now filled
  1862. // fmt.Println(resp)
  1863. // }
  1864. //
  1865. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1866. //
  1867. // Deprecated: GetBucketLifecycle has been deprecated
  1868. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1869. if c.Client.Config.Logger != nil {
  1870. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1871. }
  1872. op := &request.Operation{
  1873. Name: opGetBucketLifecycle,
  1874. HTTPMethod: "GET",
  1875. HTTPPath: "/{Bucket}?lifecycle",
  1876. }
  1877. if input == nil {
  1878. input = &GetBucketLifecycleInput{}
  1879. }
  1880. output = &GetBucketLifecycleOutput{}
  1881. req = c.newRequest(op, input, output)
  1882. return
  1883. }
  1884. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1885. //
  1886. // No longer used, see the GetBucketLifecycleConfiguration operation.
  1887. //
  1888. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1889. // with awserr.Error's Code and Message methods to get detailed information about
  1890. // the error.
  1891. //
  1892. // See the AWS API reference guide for Amazon Simple Storage Service's
  1893. // API operation GetBucketLifecycle for usage and error information.
  1894. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1895. //
  1896. // Deprecated: GetBucketLifecycle has been deprecated
  1897. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1898. req, out := c.GetBucketLifecycleRequest(input)
  1899. return out, req.Send()
  1900. }
  1901. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  1902. // the ability to pass a context and additional request options.
  1903. //
  1904. // See GetBucketLifecycle for details on how to use this API operation.
  1905. //
  1906. // The context must be non-nil and will be used for request cancellation. If
  1907. // the context is nil a panic will occur. In the future the SDK may create
  1908. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1909. // for more information on using Contexts.
  1910. //
  1911. // Deprecated: GetBucketLifecycleWithContext has been deprecated
  1912. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  1913. req, out := c.GetBucketLifecycleRequest(input)
  1914. req.SetContext(ctx)
  1915. req.ApplyOptions(opts...)
  1916. return out, req.Send()
  1917. }
  1918. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1919. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1920. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1921. // value will be populated with the request's response once the request completes
  1922. // successfully.
  1923. //
  1924. // Use "Send" method on the returned Request to send the API call to the service.
  1925. // the "output" return value is not valid until after Send returns without error.
  1926. //
  1927. // See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
  1928. // API call, and error handling.
  1929. //
  1930. // This method is useful when you want to inject custom logic or configuration
  1931. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1932. //
  1933. //
  1934. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1935. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1936. //
  1937. // err := req.Send()
  1938. // if err == nil { // resp is now filled
  1939. // fmt.Println(resp)
  1940. // }
  1941. //
  1942. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1943. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1944. op := &request.Operation{
  1945. Name: opGetBucketLifecycleConfiguration,
  1946. HTTPMethod: "GET",
  1947. HTTPPath: "/{Bucket}?lifecycle",
  1948. }
  1949. if input == nil {
  1950. input = &GetBucketLifecycleConfigurationInput{}
  1951. }
  1952. output = &GetBucketLifecycleConfigurationOutput{}
  1953. req = c.newRequest(op, input, output)
  1954. return
  1955. }
  1956. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1957. //
  1958. // Returns the lifecycle configuration information set on the bucket.
  1959. //
  1960. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1961. // with awserr.Error's Code and Message methods to get detailed information about
  1962. // the error.
  1963. //
  1964. // See the AWS API reference guide for Amazon Simple Storage Service's
  1965. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1966. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1967. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1968. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1969. return out, req.Send()
  1970. }
  1971. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  1972. // the ability to pass a context and additional request options.
  1973. //
  1974. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  1975. //
  1976. // The context must be non-nil and will be used for request cancellation. If
  1977. // the context is nil a panic will occur. In the future the SDK may create
  1978. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1979. // for more information on using Contexts.
  1980. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  1981. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1982. req.SetContext(ctx)
  1983. req.ApplyOptions(opts...)
  1984. return out, req.Send()
  1985. }
  1986. const opGetBucketLocation = "GetBucketLocation"
  1987. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1988. // client's request for the GetBucketLocation operation. The "output" return
  1989. // value will be populated with the request's response once the request completes
  1990. // successfully.
  1991. //
  1992. // Use "Send" method on the returned Request to send the API call to the service.
  1993. // the "output" return value is not valid until after Send returns without error.
  1994. //
  1995. // See GetBucketLocation for more information on using the GetBucketLocation
  1996. // API call, and error handling.
  1997. //
  1998. // This method is useful when you want to inject custom logic or configuration
  1999. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2000. //
  2001. //
  2002. // // Example sending a request using the GetBucketLocationRequest method.
  2003. // req, resp := client.GetBucketLocationRequest(params)
  2004. //
  2005. // err := req.Send()
  2006. // if err == nil { // resp is now filled
  2007. // fmt.Println(resp)
  2008. // }
  2009. //
  2010. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  2011. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  2012. op := &request.Operation{
  2013. Name: opGetBucketLocation,
  2014. HTTPMethod: "GET",
  2015. HTTPPath: "/{Bucket}?location",
  2016. }
  2017. if input == nil {
  2018. input = &GetBucketLocationInput{}
  2019. }
  2020. output = &GetBucketLocationOutput{}
  2021. req = c.newRequest(op, input, output)
  2022. return
  2023. }
  2024. // GetBucketLocation API operation for Amazon Simple Storage Service.
  2025. //
  2026. // Returns the region the bucket resides in.
  2027. //
  2028. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2029. // with awserr.Error's Code and Message methods to get detailed information about
  2030. // the error.
  2031. //
  2032. // See the AWS API reference guide for Amazon Simple Storage Service's
  2033. // API operation GetBucketLocation for usage and error information.
  2034. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  2035. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  2036. req, out := c.GetBucketLocationRequest(input)
  2037. return out, req.Send()
  2038. }
  2039. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  2040. // the ability to pass a context and additional request options.
  2041. //
  2042. // See GetBucketLocation for details on how to use this API operation.
  2043. //
  2044. // The context must be non-nil and will be used for request cancellation. If
  2045. // the context is nil a panic will occur. In the future the SDK may create
  2046. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2047. // for more information on using Contexts.
  2048. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  2049. req, out := c.GetBucketLocationRequest(input)
  2050. req.SetContext(ctx)
  2051. req.ApplyOptions(opts...)
  2052. return out, req.Send()
  2053. }
  2054. const opGetBucketLogging = "GetBucketLogging"
  2055. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  2056. // client's request for the GetBucketLogging operation. The "output" return
  2057. // value will be populated with the request's response once the request completes
  2058. // successfully.
  2059. //
  2060. // Use "Send" method on the returned Request to send the API call to the service.
  2061. // the "output" return value is not valid until after Send returns without error.
  2062. //
  2063. // See GetBucketLogging for more information on using the GetBucketLogging
  2064. // API call, and error handling.
  2065. //
  2066. // This method is useful when you want to inject custom logic or configuration
  2067. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2068. //
  2069. //
  2070. // // Example sending a request using the GetBucketLoggingRequest method.
  2071. // req, resp := client.GetBucketLoggingRequest(params)
  2072. //
  2073. // err := req.Send()
  2074. // if err == nil { // resp is now filled
  2075. // fmt.Println(resp)
  2076. // }
  2077. //
  2078. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2079. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  2080. op := &request.Operation{
  2081. Name: opGetBucketLogging,
  2082. HTTPMethod: "GET",
  2083. HTTPPath: "/{Bucket}?logging",
  2084. }
  2085. if input == nil {
  2086. input = &GetBucketLoggingInput{}
  2087. }
  2088. output = &GetBucketLoggingOutput{}
  2089. req = c.newRequest(op, input, output)
  2090. return
  2091. }
  2092. // GetBucketLogging API operation for Amazon Simple Storage Service.
  2093. //
  2094. // Returns the logging status of a bucket and the permissions users have to
  2095. // view and modify that status. To use GET, you must be the bucket owner.
  2096. //
  2097. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2098. // with awserr.Error's Code and Message methods to get detailed information about
  2099. // the error.
  2100. //
  2101. // See the AWS API reference guide for Amazon Simple Storage Service's
  2102. // API operation GetBucketLogging for usage and error information.
  2103. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2104. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  2105. req, out := c.GetBucketLoggingRequest(input)
  2106. return out, req.Send()
  2107. }
  2108. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  2109. // the ability to pass a context and additional request options.
  2110. //
  2111. // See GetBucketLogging for details on how to use this API operation.
  2112. //
  2113. // The context must be non-nil and will be used for request cancellation. If
  2114. // the context is nil a panic will occur. In the future the SDK may create
  2115. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2116. // for more information on using Contexts.
  2117. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  2118. req, out := c.GetBucketLoggingRequest(input)
  2119. req.SetContext(ctx)
  2120. req.ApplyOptions(opts...)
  2121. return out, req.Send()
  2122. }
  2123. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  2124. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  2125. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  2126. // value will be populated with the request's response once the request completes
  2127. // successfully.
  2128. //
  2129. // Use "Send" method on the returned Request to send the API call to the service.
  2130. // the "output" return value is not valid until after Send returns without error.
  2131. //
  2132. // See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
  2133. // API call, and error handling.
  2134. //
  2135. // This method is useful when you want to inject custom logic or configuration
  2136. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2137. //
  2138. //
  2139. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  2140. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  2141. //
  2142. // err := req.Send()
  2143. // if err == nil { // resp is now filled
  2144. // fmt.Println(resp)
  2145. // }
  2146. //
  2147. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2148. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  2149. op := &request.Operation{
  2150. Name: opGetBucketMetricsConfiguration,
  2151. HTTPMethod: "GET",
  2152. HTTPPath: "/{Bucket}?metrics",
  2153. }
  2154. if input == nil {
  2155. input = &GetBucketMetricsConfigurationInput{}
  2156. }
  2157. output = &GetBucketMetricsConfigurationOutput{}
  2158. req = c.newRequest(op, input, output)
  2159. return
  2160. }
  2161. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  2162. //
  2163. // Gets a metrics configuration (specified by the metrics configuration ID)
  2164. // from the bucket.
  2165. //
  2166. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2167. // with awserr.Error's Code and Message methods to get detailed information about
  2168. // the error.
  2169. //
  2170. // See the AWS API reference guide for Amazon Simple Storage Service's
  2171. // API operation GetBucketMetricsConfiguration for usage and error information.
  2172. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2173. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  2174. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2175. return out, req.Send()
  2176. }
  2177. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  2178. // the ability to pass a context and additional request options.
  2179. //
  2180. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  2181. //
  2182. // The context must be non-nil and will be used for request cancellation. If
  2183. // the context is nil a panic will occur. In the future the SDK may create
  2184. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2185. // for more information on using Contexts.
  2186. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  2187. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2188. req.SetContext(ctx)
  2189. req.ApplyOptions(opts...)
  2190. return out, req.Send()
  2191. }
  2192. const opGetBucketNotification = "GetBucketNotification"
  2193. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  2194. // client's request for the GetBucketNotification operation. The "output" return
  2195. // value will be populated with the request's response once the request completes
  2196. // successfully.
  2197. //
  2198. // Use "Send" method on the returned Request to send the API call to the service.
  2199. // the "output" return value is not valid until after Send returns without error.
  2200. //
  2201. // See GetBucketNotification for more information on using the GetBucketNotification
  2202. // API call, and error handling.
  2203. //
  2204. // This method is useful when you want to inject custom logic or configuration
  2205. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2206. //
  2207. //
  2208. // // Example sending a request using the GetBucketNotificationRequest method.
  2209. // req, resp := client.GetBucketNotificationRequest(params)
  2210. //
  2211. // err := req.Send()
  2212. // if err == nil { // resp is now filled
  2213. // fmt.Println(resp)
  2214. // }
  2215. //
  2216. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2217. //
  2218. // Deprecated: GetBucketNotification has been deprecated
  2219. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  2220. if c.Client.Config.Logger != nil {
  2221. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  2222. }
  2223. op := &request.Operation{
  2224. Name: opGetBucketNotification,
  2225. HTTPMethod: "GET",
  2226. HTTPPath: "/{Bucket}?notification",
  2227. }
  2228. if input == nil {
  2229. input = &GetBucketNotificationConfigurationRequest{}
  2230. }
  2231. output = &NotificationConfigurationDeprecated{}
  2232. req = c.newRequest(op, input, output)
  2233. return
  2234. }
  2235. // GetBucketNotification API operation for Amazon Simple Storage Service.
  2236. //
  2237. // No longer used, see the GetBucketNotificationConfiguration operation.
  2238. //
  2239. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2240. // with awserr.Error's Code and Message methods to get detailed information about
  2241. // the error.
  2242. //
  2243. // See the AWS API reference guide for Amazon Simple Storage Service's
  2244. // API operation GetBucketNotification for usage and error information.
  2245. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2246. //
  2247. // Deprecated: GetBucketNotification has been deprecated
  2248. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  2249. req, out := c.GetBucketNotificationRequest(input)
  2250. return out, req.Send()
  2251. }
  2252. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  2253. // the ability to pass a context and additional request options.
  2254. //
  2255. // See GetBucketNotification for details on how to use this API operation.
  2256. //
  2257. // The context must be non-nil and will be used for request cancellation. If
  2258. // the context is nil a panic will occur. In the future the SDK may create
  2259. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2260. // for more information on using Contexts.
  2261. //
  2262. // Deprecated: GetBucketNotificationWithContext has been deprecated
  2263. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  2264. req, out := c.GetBucketNotificationRequest(input)
  2265. req.SetContext(ctx)
  2266. req.ApplyOptions(opts...)
  2267. return out, req.Send()
  2268. }
  2269. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  2270. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2271. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  2272. // value will be populated with the request's response once the request completes
  2273. // successfully.
  2274. //
  2275. // Use "Send" method on the returned Request to send the API call to the service.
  2276. // the "output" return value is not valid until after Send returns without error.
  2277. //
  2278. // See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
  2279. // API call, and error handling.
  2280. //
  2281. // This method is useful when you want to inject custom logic or configuration
  2282. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2283. //
  2284. //
  2285. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  2286. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  2287. //
  2288. // err := req.Send()
  2289. // if err == nil { // resp is now filled
  2290. // fmt.Println(resp)
  2291. // }
  2292. //
  2293. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2294. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  2295. op := &request.Operation{
  2296. Name: opGetBucketNotificationConfiguration,
  2297. HTTPMethod: "GET",
  2298. HTTPPath: "/{Bucket}?notification",
  2299. }
  2300. if input == nil {
  2301. input = &GetBucketNotificationConfigurationRequest{}
  2302. }
  2303. output = &NotificationConfiguration{}
  2304. req = c.newRequest(op, input, output)
  2305. return
  2306. }
  2307. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2308. //
  2309. // Returns the notification configuration of a bucket.
  2310. //
  2311. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2312. // with awserr.Error's Code and Message methods to get detailed information about
  2313. // the error.
  2314. //
  2315. // See the AWS API reference guide for Amazon Simple Storage Service's
  2316. // API operation GetBucketNotificationConfiguration for usage and error information.
  2317. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2318. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  2319. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2320. return out, req.Send()
  2321. }
  2322. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  2323. // the ability to pass a context and additional request options.
  2324. //
  2325. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  2326. //
  2327. // The context must be non-nil and will be used for request cancellation. If
  2328. // the context is nil a panic will occur. In the future the SDK may create
  2329. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2330. // for more information on using Contexts.
  2331. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  2332. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2333. req.SetContext(ctx)
  2334. req.ApplyOptions(opts...)
  2335. return out, req.Send()
  2336. }
  2337. const opGetBucketPolicy = "GetBucketPolicy"
  2338. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  2339. // client's request for the GetBucketPolicy operation. The "output" return
  2340. // value will be populated with the request's response once the request completes
  2341. // successfully.
  2342. //
  2343. // Use "Send" method on the returned Request to send the API call to the service.
  2344. // the "output" return value is not valid until after Send returns without error.
  2345. //
  2346. // See GetBucketPolicy for more information on using the GetBucketPolicy
  2347. // API call, and error handling.
  2348. //
  2349. // This method is useful when you want to inject custom logic or configuration
  2350. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2351. //
  2352. //
  2353. // // Example sending a request using the GetBucketPolicyRequest method.
  2354. // req, resp := client.GetBucketPolicyRequest(params)
  2355. //
  2356. // err := req.Send()
  2357. // if err == nil { // resp is now filled
  2358. // fmt.Println(resp)
  2359. // }
  2360. //
  2361. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2362. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  2363. op := &request.Operation{
  2364. Name: opGetBucketPolicy,
  2365. HTTPMethod: "GET",
  2366. HTTPPath: "/{Bucket}?policy",
  2367. }
  2368. if input == nil {
  2369. input = &GetBucketPolicyInput{}
  2370. }
  2371. output = &GetBucketPolicyOutput{}
  2372. req = c.newRequest(op, input, output)
  2373. return
  2374. }
  2375. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  2376. //
  2377. // Returns the policy of a specified bucket.
  2378. //
  2379. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2380. // with awserr.Error's Code and Message methods to get detailed information about
  2381. // the error.
  2382. //
  2383. // See the AWS API reference guide for Amazon Simple Storage Service's
  2384. // API operation GetBucketPolicy for usage and error information.
  2385. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2386. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  2387. req, out := c.GetBucketPolicyRequest(input)
  2388. return out, req.Send()
  2389. }
  2390. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  2391. // the ability to pass a context and additional request options.
  2392. //
  2393. // See GetBucketPolicy for details on how to use this API operation.
  2394. //
  2395. // The context must be non-nil and will be used for request cancellation. If
  2396. // the context is nil a panic will occur. In the future the SDK may create
  2397. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2398. // for more information on using Contexts.
  2399. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  2400. req, out := c.GetBucketPolicyRequest(input)
  2401. req.SetContext(ctx)
  2402. req.ApplyOptions(opts...)
  2403. return out, req.Send()
  2404. }
  2405. const opGetBucketPolicyStatus = "GetBucketPolicyStatus"
  2406. // GetBucketPolicyStatusRequest generates a "aws/request.Request" representing the
  2407. // client's request for the GetBucketPolicyStatus operation. The "output" return
  2408. // value will be populated with the request's response once the request completes
  2409. // successfully.
  2410. //
  2411. // Use "Send" method on the returned Request to send the API call to the service.
  2412. // the "output" return value is not valid until after Send returns without error.
  2413. //
  2414. // See GetBucketPolicyStatus for more information on using the GetBucketPolicyStatus
  2415. // API call, and error handling.
  2416. //
  2417. // This method is useful when you want to inject custom logic or configuration
  2418. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2419. //
  2420. //
  2421. // // Example sending a request using the GetBucketPolicyStatusRequest method.
  2422. // req, resp := client.GetBucketPolicyStatusRequest(params)
  2423. //
  2424. // err := req.Send()
  2425. // if err == nil { // resp is now filled
  2426. // fmt.Println(resp)
  2427. // }
  2428. //
  2429. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
  2430. func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (req *request.Request, output *GetBucketPolicyStatusOutput) {
  2431. op := &request.Operation{
  2432. Name: opGetBucketPolicyStatus,
  2433. HTTPMethod: "GET",
  2434. HTTPPath: "/{Bucket}?policyStatus",
  2435. }
  2436. if input == nil {
  2437. input = &GetBucketPolicyStatusInput{}
  2438. }
  2439. output = &GetBucketPolicyStatusOutput{}
  2440. req = c.newRequest(op, input, output)
  2441. return
  2442. }
  2443. // GetBucketPolicyStatus API operation for Amazon Simple Storage Service.
  2444. //
  2445. // Retrieves the policy status for an Amazon S3 bucket, indicating whether the
  2446. // bucket is public.
  2447. //
  2448. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2449. // with awserr.Error's Code and Message methods to get detailed information about
  2450. // the error.
  2451. //
  2452. // See the AWS API reference guide for Amazon Simple Storage Service's
  2453. // API operation GetBucketPolicyStatus for usage and error information.
  2454. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
  2455. func (c *S3) GetBucketPolicyStatus(input *GetBucketPolicyStatusInput) (*GetBucketPolicyStatusOutput, error) {
  2456. req, out := c.GetBucketPolicyStatusRequest(input)
  2457. return out, req.Send()
  2458. }
  2459. // GetBucketPolicyStatusWithContext is the same as GetBucketPolicyStatus with the addition of
  2460. // the ability to pass a context and additional request options.
  2461. //
  2462. // See GetBucketPolicyStatus for details on how to use this API operation.
  2463. //
  2464. // The context must be non-nil and will be used for request cancellation. If
  2465. // the context is nil a panic will occur. In the future the SDK may create
  2466. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2467. // for more information on using Contexts.
  2468. func (c *S3) GetBucketPolicyStatusWithContext(ctx aws.Context, input *GetBucketPolicyStatusInput, opts ...request.Option) (*GetBucketPolicyStatusOutput, error) {
  2469. req, out := c.GetBucketPolicyStatusRequest(input)
  2470. req.SetContext(ctx)
  2471. req.ApplyOptions(opts...)
  2472. return out, req.Send()
  2473. }
  2474. const opGetBucketReplication = "GetBucketReplication"
  2475. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  2476. // client's request for the GetBucketReplication operation. The "output" return
  2477. // value will be populated with the request's response once the request completes
  2478. // successfully.
  2479. //
  2480. // Use "Send" method on the returned Request to send the API call to the service.
  2481. // the "output" return value is not valid until after Send returns without error.
  2482. //
  2483. // See GetBucketReplication for more information on using the GetBucketReplication
  2484. // API call, and error handling.
  2485. //
  2486. // This method is useful when you want to inject custom logic or configuration
  2487. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2488. //
  2489. //
  2490. // // Example sending a request using the GetBucketReplicationRequest method.
  2491. // req, resp := client.GetBucketReplicationRequest(params)
  2492. //
  2493. // err := req.Send()
  2494. // if err == nil { // resp is now filled
  2495. // fmt.Println(resp)
  2496. // }
  2497. //
  2498. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2499. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  2500. op := &request.Operation{
  2501. Name: opGetBucketReplication,
  2502. HTTPMethod: "GET",
  2503. HTTPPath: "/{Bucket}?replication",
  2504. }
  2505. if input == nil {
  2506. input = &GetBucketReplicationInput{}
  2507. }
  2508. output = &GetBucketReplicationOutput{}
  2509. req = c.newRequest(op, input, output)
  2510. return
  2511. }
  2512. // GetBucketReplication API operation for Amazon Simple Storage Service.
  2513. //
  2514. // Returns the replication configuration of a bucket.
  2515. //
  2516. // It can take a while to propagate the put or delete a replication configuration
  2517. // to all Amazon S3 systems. Therefore, a get request soon after put or delete
  2518. // can return a wrong result.
  2519. //
  2520. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2521. // with awserr.Error's Code and Message methods to get detailed information about
  2522. // the error.
  2523. //
  2524. // See the AWS API reference guide for Amazon Simple Storage Service's
  2525. // API operation GetBucketReplication for usage and error information.
  2526. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2527. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  2528. req, out := c.GetBucketReplicationRequest(input)
  2529. return out, req.Send()
  2530. }
  2531. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  2532. // the ability to pass a context and additional request options.
  2533. //
  2534. // See GetBucketReplication for details on how to use this API operation.
  2535. //
  2536. // The context must be non-nil and will be used for request cancellation. If
  2537. // the context is nil a panic will occur. In the future the SDK may create
  2538. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2539. // for more information on using Contexts.
  2540. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  2541. req, out := c.GetBucketReplicationRequest(input)
  2542. req.SetContext(ctx)
  2543. req.ApplyOptions(opts...)
  2544. return out, req.Send()
  2545. }
  2546. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  2547. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2548. // client's request for the GetBucketRequestPayment operation. The "output" return
  2549. // value will be populated with the request's response once the request completes
  2550. // successfully.
  2551. //
  2552. // Use "Send" method on the returned Request to send the API call to the service.
  2553. // the "output" return value is not valid until after Send returns without error.
  2554. //
  2555. // See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
  2556. // API call, and error handling.
  2557. //
  2558. // This method is useful when you want to inject custom logic or configuration
  2559. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2560. //
  2561. //
  2562. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  2563. // req, resp := client.GetBucketRequestPaymentRequest(params)
  2564. //
  2565. // err := req.Send()
  2566. // if err == nil { // resp is now filled
  2567. // fmt.Println(resp)
  2568. // }
  2569. //
  2570. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2571. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  2572. op := &request.Operation{
  2573. Name: opGetBucketRequestPayment,
  2574. HTTPMethod: "GET",
  2575. HTTPPath: "/{Bucket}?requestPayment",
  2576. }
  2577. if input == nil {
  2578. input = &GetBucketRequestPaymentInput{}
  2579. }
  2580. output = &GetBucketRequestPaymentOutput{}
  2581. req = c.newRequest(op, input, output)
  2582. return
  2583. }
  2584. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  2585. //
  2586. // Returns the request payment configuration of a bucket.
  2587. //
  2588. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2589. // with awserr.Error's Code and Message methods to get detailed information about
  2590. // the error.
  2591. //
  2592. // See the AWS API reference guide for Amazon Simple Storage Service's
  2593. // API operation GetBucketRequestPayment for usage and error information.
  2594. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2595. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  2596. req, out := c.GetBucketRequestPaymentRequest(input)
  2597. return out, req.Send()
  2598. }
  2599. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  2600. // the ability to pass a context and additional request options.
  2601. //
  2602. // See GetBucketRequestPayment for details on how to use this API operation.
  2603. //
  2604. // The context must be non-nil and will be used for request cancellation. If
  2605. // the context is nil a panic will occur. In the future the SDK may create
  2606. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2607. // for more information on using Contexts.
  2608. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  2609. req, out := c.GetBucketRequestPaymentRequest(input)
  2610. req.SetContext(ctx)
  2611. req.ApplyOptions(opts...)
  2612. return out, req.Send()
  2613. }
  2614. const opGetBucketTagging = "GetBucketTagging"
  2615. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  2616. // client's request for the GetBucketTagging operation. The "output" return
  2617. // value will be populated with the request's response once the request completes
  2618. // successfully.
  2619. //
  2620. // Use "Send" method on the returned Request to send the API call to the service.
  2621. // the "output" return value is not valid until after Send returns without error.
  2622. //
  2623. // See GetBucketTagging for more information on using the GetBucketTagging
  2624. // API call, and error handling.
  2625. //
  2626. // This method is useful when you want to inject custom logic or configuration
  2627. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2628. //
  2629. //
  2630. // // Example sending a request using the GetBucketTaggingRequest method.
  2631. // req, resp := client.GetBucketTaggingRequest(params)
  2632. //
  2633. // err := req.Send()
  2634. // if err == nil { // resp is now filled
  2635. // fmt.Println(resp)
  2636. // }
  2637. //
  2638. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2639. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  2640. op := &request.Operation{
  2641. Name: opGetBucketTagging,
  2642. HTTPMethod: "GET",
  2643. HTTPPath: "/{Bucket}?tagging",
  2644. }
  2645. if input == nil {
  2646. input = &GetBucketTaggingInput{}
  2647. }
  2648. output = &GetBucketTaggingOutput{}
  2649. req = c.newRequest(op, input, output)
  2650. return
  2651. }
  2652. // GetBucketTagging API operation for Amazon Simple Storage Service.
  2653. //
  2654. // Returns the tag set associated with the bucket.
  2655. //
  2656. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2657. // with awserr.Error's Code and Message methods to get detailed information about
  2658. // the error.
  2659. //
  2660. // See the AWS API reference guide for Amazon Simple Storage Service's
  2661. // API operation GetBucketTagging for usage and error information.
  2662. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2663. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  2664. req, out := c.GetBucketTaggingRequest(input)
  2665. return out, req.Send()
  2666. }
  2667. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  2668. // the ability to pass a context and additional request options.
  2669. //
  2670. // See GetBucketTagging for details on how to use this API operation.
  2671. //
  2672. // The context must be non-nil and will be used for request cancellation. If
  2673. // the context is nil a panic will occur. In the future the SDK may create
  2674. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2675. // for more information on using Contexts.
  2676. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  2677. req, out := c.GetBucketTaggingRequest(input)
  2678. req.SetContext(ctx)
  2679. req.ApplyOptions(opts...)
  2680. return out, req.Send()
  2681. }
  2682. const opGetBucketVersioning = "GetBucketVersioning"
  2683. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  2684. // client's request for the GetBucketVersioning operation. The "output" return
  2685. // value will be populated with the request's response once the request completes
  2686. // successfully.
  2687. //
  2688. // Use "Send" method on the returned Request to send the API call to the service.
  2689. // the "output" return value is not valid until after Send returns without error.
  2690. //
  2691. // See GetBucketVersioning for more information on using the GetBucketVersioning
  2692. // API call, and error handling.
  2693. //
  2694. // This method is useful when you want to inject custom logic or configuration
  2695. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2696. //
  2697. //
  2698. // // Example sending a request using the GetBucketVersioningRequest method.
  2699. // req, resp := client.GetBucketVersioningRequest(params)
  2700. //
  2701. // err := req.Send()
  2702. // if err == nil { // resp is now filled
  2703. // fmt.Println(resp)
  2704. // }
  2705. //
  2706. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2707. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  2708. op := &request.Operation{
  2709. Name: opGetBucketVersioning,
  2710. HTTPMethod: "GET",
  2711. HTTPPath: "/{Bucket}?versioning",
  2712. }
  2713. if input == nil {
  2714. input = &GetBucketVersioningInput{}
  2715. }
  2716. output = &GetBucketVersioningOutput{}
  2717. req = c.newRequest(op, input, output)
  2718. return
  2719. }
  2720. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  2721. //
  2722. // Returns the versioning state of a bucket.
  2723. //
  2724. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2725. // with awserr.Error's Code and Message methods to get detailed information about
  2726. // the error.
  2727. //
  2728. // See the AWS API reference guide for Amazon Simple Storage Service's
  2729. // API operation GetBucketVersioning for usage and error information.
  2730. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2731. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  2732. req, out := c.GetBucketVersioningRequest(input)
  2733. return out, req.Send()
  2734. }
  2735. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  2736. // the ability to pass a context and additional request options.
  2737. //
  2738. // See GetBucketVersioning for details on how to use this API operation.
  2739. //
  2740. // The context must be non-nil and will be used for request cancellation. If
  2741. // the context is nil a panic will occur. In the future the SDK may create
  2742. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2743. // for more information on using Contexts.
  2744. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  2745. req, out := c.GetBucketVersioningRequest(input)
  2746. req.SetContext(ctx)
  2747. req.ApplyOptions(opts...)
  2748. return out, req.Send()
  2749. }
  2750. const opGetBucketWebsite = "GetBucketWebsite"
  2751. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  2752. // client's request for the GetBucketWebsite operation. The "output" return
  2753. // value will be populated with the request's response once the request completes
  2754. // successfully.
  2755. //
  2756. // Use "Send" method on the returned Request to send the API call to the service.
  2757. // the "output" return value is not valid until after Send returns without error.
  2758. //
  2759. // See GetBucketWebsite for more information on using the GetBucketWebsite
  2760. // API call, and error handling.
  2761. //
  2762. // This method is useful when you want to inject custom logic or configuration
  2763. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2764. //
  2765. //
  2766. // // Example sending a request using the GetBucketWebsiteRequest method.
  2767. // req, resp := client.GetBucketWebsiteRequest(params)
  2768. //
  2769. // err := req.Send()
  2770. // if err == nil { // resp is now filled
  2771. // fmt.Println(resp)
  2772. // }
  2773. //
  2774. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2775. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  2776. op := &request.Operation{
  2777. Name: opGetBucketWebsite,
  2778. HTTPMethod: "GET",
  2779. HTTPPath: "/{Bucket}?website",
  2780. }
  2781. if input == nil {
  2782. input = &GetBucketWebsiteInput{}
  2783. }
  2784. output = &GetBucketWebsiteOutput{}
  2785. req = c.newRequest(op, input, output)
  2786. return
  2787. }
  2788. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  2789. //
  2790. // Returns the website configuration for a bucket.
  2791. //
  2792. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2793. // with awserr.Error's Code and Message methods to get detailed information about
  2794. // the error.
  2795. //
  2796. // See the AWS API reference guide for Amazon Simple Storage Service's
  2797. // API operation GetBucketWebsite for usage and error information.
  2798. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2799. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  2800. req, out := c.GetBucketWebsiteRequest(input)
  2801. return out, req.Send()
  2802. }
  2803. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  2804. // the ability to pass a context and additional request options.
  2805. //
  2806. // See GetBucketWebsite for details on how to use this API operation.
  2807. //
  2808. // The context must be non-nil and will be used for request cancellation. If
  2809. // the context is nil a panic will occur. In the future the SDK may create
  2810. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2811. // for more information on using Contexts.
  2812. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  2813. req, out := c.GetBucketWebsiteRequest(input)
  2814. req.SetContext(ctx)
  2815. req.ApplyOptions(opts...)
  2816. return out, req.Send()
  2817. }
  2818. const opGetObject = "GetObject"
  2819. // GetObjectRequest generates a "aws/request.Request" representing the
  2820. // client's request for the GetObject operation. The "output" return
  2821. // value will be populated with the request's response once the request completes
  2822. // successfully.
  2823. //
  2824. // Use "Send" method on the returned Request to send the API call to the service.
  2825. // the "output" return value is not valid until after Send returns without error.
  2826. //
  2827. // See GetObject for more information on using the GetObject
  2828. // API call, and error handling.
  2829. //
  2830. // This method is useful when you want to inject custom logic or configuration
  2831. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2832. //
  2833. //
  2834. // // Example sending a request using the GetObjectRequest method.
  2835. // req, resp := client.GetObjectRequest(params)
  2836. //
  2837. // err := req.Send()
  2838. // if err == nil { // resp is now filled
  2839. // fmt.Println(resp)
  2840. // }
  2841. //
  2842. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2843. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  2844. op := &request.Operation{
  2845. Name: opGetObject,
  2846. HTTPMethod: "GET",
  2847. HTTPPath: "/{Bucket}/{Key+}",
  2848. }
  2849. if input == nil {
  2850. input = &GetObjectInput{}
  2851. }
  2852. output = &GetObjectOutput{}
  2853. req = c.newRequest(op, input, output)
  2854. return
  2855. }
  2856. // GetObject API operation for Amazon Simple Storage Service.
  2857. //
  2858. // Retrieves objects from Amazon S3.
  2859. //
  2860. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2861. // with awserr.Error's Code and Message methods to get detailed information about
  2862. // the error.
  2863. //
  2864. // See the AWS API reference guide for Amazon Simple Storage Service's
  2865. // API operation GetObject for usage and error information.
  2866. //
  2867. // Returned Error Codes:
  2868. // * ErrCodeNoSuchKey "NoSuchKey"
  2869. // The specified key does not exist.
  2870. //
  2871. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2872. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  2873. req, out := c.GetObjectRequest(input)
  2874. return out, req.Send()
  2875. }
  2876. // GetObjectWithContext is the same as GetObject with the addition of
  2877. // the ability to pass a context and additional request options.
  2878. //
  2879. // See GetObject for details on how to use this API operation.
  2880. //
  2881. // The context must be non-nil and will be used for request cancellation. If
  2882. // the context is nil a panic will occur. In the future the SDK may create
  2883. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2884. // for more information on using Contexts.
  2885. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  2886. req, out := c.GetObjectRequest(input)
  2887. req.SetContext(ctx)
  2888. req.ApplyOptions(opts...)
  2889. return out, req.Send()
  2890. }
  2891. const opGetObjectAcl = "GetObjectAcl"
  2892. // GetObjectAclRequest generates a "aws/request.Request" representing the
  2893. // client's request for the GetObjectAcl operation. The "output" return
  2894. // value will be populated with the request's response once the request completes
  2895. // successfully.
  2896. //
  2897. // Use "Send" method on the returned Request to send the API call to the service.
  2898. // the "output" return value is not valid until after Send returns without error.
  2899. //
  2900. // See GetObjectAcl for more information on using the GetObjectAcl
  2901. // API call, and error handling.
  2902. //
  2903. // This method is useful when you want to inject custom logic or configuration
  2904. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2905. //
  2906. //
  2907. // // Example sending a request using the GetObjectAclRequest method.
  2908. // req, resp := client.GetObjectAclRequest(params)
  2909. //
  2910. // err := req.Send()
  2911. // if err == nil { // resp is now filled
  2912. // fmt.Println(resp)
  2913. // }
  2914. //
  2915. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2916. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  2917. op := &request.Operation{
  2918. Name: opGetObjectAcl,
  2919. HTTPMethod: "GET",
  2920. HTTPPath: "/{Bucket}/{Key+}?acl",
  2921. }
  2922. if input == nil {
  2923. input = &GetObjectAclInput{}
  2924. }
  2925. output = &GetObjectAclOutput{}
  2926. req = c.newRequest(op, input, output)
  2927. return
  2928. }
  2929. // GetObjectAcl API operation for Amazon Simple Storage Service.
  2930. //
  2931. // Returns the access control list (ACL) of an object.
  2932. //
  2933. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2934. // with awserr.Error's Code and Message methods to get detailed information about
  2935. // the error.
  2936. //
  2937. // See the AWS API reference guide for Amazon Simple Storage Service's
  2938. // API operation GetObjectAcl for usage and error information.
  2939. //
  2940. // Returned Error Codes:
  2941. // * ErrCodeNoSuchKey "NoSuchKey"
  2942. // The specified key does not exist.
  2943. //
  2944. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2945. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  2946. req, out := c.GetObjectAclRequest(input)
  2947. return out, req.Send()
  2948. }
  2949. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  2950. // the ability to pass a context and additional request options.
  2951. //
  2952. // See GetObjectAcl for details on how to use this API operation.
  2953. //
  2954. // The context must be non-nil and will be used for request cancellation. If
  2955. // the context is nil a panic will occur. In the future the SDK may create
  2956. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2957. // for more information on using Contexts.
  2958. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  2959. req, out := c.GetObjectAclRequest(input)
  2960. req.SetContext(ctx)
  2961. req.ApplyOptions(opts...)
  2962. return out, req.Send()
  2963. }
  2964. const opGetObjectLegalHold = "GetObjectLegalHold"
  2965. // GetObjectLegalHoldRequest generates a "aws/request.Request" representing the
  2966. // client's request for the GetObjectLegalHold operation. The "output" return
  2967. // value will be populated with the request's response once the request completes
  2968. // successfully.
  2969. //
  2970. // Use "Send" method on the returned Request to send the API call to the service.
  2971. // the "output" return value is not valid until after Send returns without error.
  2972. //
  2973. // See GetObjectLegalHold for more information on using the GetObjectLegalHold
  2974. // API call, and error handling.
  2975. //
  2976. // This method is useful when you want to inject custom logic or configuration
  2977. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2978. //
  2979. //
  2980. // // Example sending a request using the GetObjectLegalHoldRequest method.
  2981. // req, resp := client.GetObjectLegalHoldRequest(params)
  2982. //
  2983. // err := req.Send()
  2984. // if err == nil { // resp is now filled
  2985. // fmt.Println(resp)
  2986. // }
  2987. //
  2988. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
  2989. func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) {
  2990. op := &request.Operation{
  2991. Name: opGetObjectLegalHold,
  2992. HTTPMethod: "GET",
  2993. HTTPPath: "/{Bucket}/{Key+}?legal-hold",
  2994. }
  2995. if input == nil {
  2996. input = &GetObjectLegalHoldInput{}
  2997. }
  2998. output = &GetObjectLegalHoldOutput{}
  2999. req = c.newRequest(op, input, output)
  3000. return
  3001. }
  3002. // GetObjectLegalHold API operation for Amazon Simple Storage Service.
  3003. //
  3004. // Gets an object's current Legal Hold status.
  3005. //
  3006. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3007. // with awserr.Error's Code and Message methods to get detailed information about
  3008. // the error.
  3009. //
  3010. // See the AWS API reference guide for Amazon Simple Storage Service's
  3011. // API operation GetObjectLegalHold for usage and error information.
  3012. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
  3013. func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error) {
  3014. req, out := c.GetObjectLegalHoldRequest(input)
  3015. return out, req.Send()
  3016. }
  3017. // GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of
  3018. // the ability to pass a context and additional request options.
  3019. //
  3020. // See GetObjectLegalHold for details on how to use this API operation.
  3021. //
  3022. // The context must be non-nil and will be used for request cancellation. If
  3023. // the context is nil a panic will occur. In the future the SDK may create
  3024. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3025. // for more information on using Contexts.
  3026. func (c *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error) {
  3027. req, out := c.GetObjectLegalHoldRequest(input)
  3028. req.SetContext(ctx)
  3029. req.ApplyOptions(opts...)
  3030. return out, req.Send()
  3031. }
  3032. const opGetObjectLockConfiguration = "GetObjectLockConfiguration"
  3033. // GetObjectLockConfigurationRequest generates a "aws/request.Request" representing the
  3034. // client's request for the GetObjectLockConfiguration operation. The "output" return
  3035. // value will be populated with the request's response once the request completes
  3036. // successfully.
  3037. //
  3038. // Use "Send" method on the returned Request to send the API call to the service.
  3039. // the "output" return value is not valid until after Send returns without error.
  3040. //
  3041. // See GetObjectLockConfiguration for more information on using the GetObjectLockConfiguration
  3042. // API call, and error handling.
  3043. //
  3044. // This method is useful when you want to inject custom logic or configuration
  3045. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3046. //
  3047. //
  3048. // // Example sending a request using the GetObjectLockConfigurationRequest method.
  3049. // req, resp := client.GetObjectLockConfigurationRequest(params)
  3050. //
  3051. // err := req.Send()
  3052. // if err == nil { // resp is now filled
  3053. // fmt.Println(resp)
  3054. // }
  3055. //
  3056. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
  3057. func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) {
  3058. op := &request.Operation{
  3059. Name: opGetObjectLockConfiguration,
  3060. HTTPMethod: "GET",
  3061. HTTPPath: "/{Bucket}?object-lock",
  3062. }
  3063. if input == nil {
  3064. input = &GetObjectLockConfigurationInput{}
  3065. }
  3066. output = &GetObjectLockConfigurationOutput{}
  3067. req = c.newRequest(op, input, output)
  3068. return
  3069. }
  3070. // GetObjectLockConfiguration API operation for Amazon Simple Storage Service.
  3071. //
  3072. // Gets the Object Lock configuration for a bucket. The rule specified in the
  3073. // Object Lock configuration will be applied by default to every new object
  3074. // placed in the specified bucket.
  3075. //
  3076. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3077. // with awserr.Error's Code and Message methods to get detailed information about
  3078. // the error.
  3079. //
  3080. // See the AWS API reference guide for Amazon Simple Storage Service's
  3081. // API operation GetObjectLockConfiguration for usage and error information.
  3082. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
  3083. func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error) {
  3084. req, out := c.GetObjectLockConfigurationRequest(input)
  3085. return out, req.Send()
  3086. }
  3087. // GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of
  3088. // the ability to pass a context and additional request options.
  3089. //
  3090. // See GetObjectLockConfiguration for details on how to use this API operation.
  3091. //
  3092. // The context must be non-nil and will be used for request cancellation. If
  3093. // the context is nil a panic will occur. In the future the SDK may create
  3094. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3095. // for more information on using Contexts.
  3096. func (c *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error) {
  3097. req, out := c.GetObjectLockConfigurationRequest(input)
  3098. req.SetContext(ctx)
  3099. req.ApplyOptions(opts...)
  3100. return out, req.Send()
  3101. }
  3102. const opGetObjectRetention = "GetObjectRetention"
  3103. // GetObjectRetentionRequest generates a "aws/request.Request" representing the
  3104. // client's request for the GetObjectRetention operation. The "output" return
  3105. // value will be populated with the request's response once the request completes
  3106. // successfully.
  3107. //
  3108. // Use "Send" method on the returned Request to send the API call to the service.
  3109. // the "output" return value is not valid until after Send returns without error.
  3110. //
  3111. // See GetObjectRetention for more information on using the GetObjectRetention
  3112. // API call, and error handling.
  3113. //
  3114. // This method is useful when you want to inject custom logic or configuration
  3115. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3116. //
  3117. //
  3118. // // Example sending a request using the GetObjectRetentionRequest method.
  3119. // req, resp := client.GetObjectRetentionRequest(params)
  3120. //
  3121. // err := req.Send()
  3122. // if err == nil { // resp is now filled
  3123. // fmt.Println(resp)
  3124. // }
  3125. //
  3126. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
  3127. func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) {
  3128. op := &request.Operation{
  3129. Name: opGetObjectRetention,
  3130. HTTPMethod: "GET",
  3131. HTTPPath: "/{Bucket}/{Key+}?retention",
  3132. }
  3133. if input == nil {
  3134. input = &GetObjectRetentionInput{}
  3135. }
  3136. output = &GetObjectRetentionOutput{}
  3137. req = c.newRequest(op, input, output)
  3138. return
  3139. }
  3140. // GetObjectRetention API operation for Amazon Simple Storage Service.
  3141. //
  3142. // Retrieves an object's retention settings.
  3143. //
  3144. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3145. // with awserr.Error's Code and Message methods to get detailed information about
  3146. // the error.
  3147. //
  3148. // See the AWS API reference guide for Amazon Simple Storage Service's
  3149. // API operation GetObjectRetention for usage and error information.
  3150. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
  3151. func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error) {
  3152. req, out := c.GetObjectRetentionRequest(input)
  3153. return out, req.Send()
  3154. }
  3155. // GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of
  3156. // the ability to pass a context and additional request options.
  3157. //
  3158. // See GetObjectRetention for details on how to use this API operation.
  3159. //
  3160. // The context must be non-nil and will be used for request cancellation. If
  3161. // the context is nil a panic will occur. In the future the SDK may create
  3162. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3163. // for more information on using Contexts.
  3164. func (c *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error) {
  3165. req, out := c.GetObjectRetentionRequest(input)
  3166. req.SetContext(ctx)
  3167. req.ApplyOptions(opts...)
  3168. return out, req.Send()
  3169. }
  3170. const opGetObjectTagging = "GetObjectTagging"
  3171. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  3172. // client's request for the GetObjectTagging operation. The "output" return
  3173. // value will be populated with the request's response once the request completes
  3174. // successfully.
  3175. //
  3176. // Use "Send" method on the returned Request to send the API call to the service.
  3177. // the "output" return value is not valid until after Send returns without error.
  3178. //
  3179. // See GetObjectTagging for more information on using the GetObjectTagging
  3180. // API call, and error handling.
  3181. //
  3182. // This method is useful when you want to inject custom logic or configuration
  3183. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3184. //
  3185. //
  3186. // // Example sending a request using the GetObjectTaggingRequest method.
  3187. // req, resp := client.GetObjectTaggingRequest(params)
  3188. //
  3189. // err := req.Send()
  3190. // if err == nil { // resp is now filled
  3191. // fmt.Println(resp)
  3192. // }
  3193. //
  3194. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  3195. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  3196. op := &request.Operation{
  3197. Name: opGetObjectTagging,
  3198. HTTPMethod: "GET",
  3199. HTTPPath: "/{Bucket}/{Key+}?tagging",
  3200. }
  3201. if input == nil {
  3202. input = &GetObjectTaggingInput{}
  3203. }
  3204. output = &GetObjectTaggingOutput{}
  3205. req = c.newRequest(op, input, output)
  3206. return
  3207. }
  3208. // GetObjectTagging API operation for Amazon Simple Storage Service.
  3209. //
  3210. // Returns the tag-set of an object.
  3211. //
  3212. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3213. // with awserr.Error's Code and Message methods to get detailed information about
  3214. // the error.
  3215. //
  3216. // See the AWS API reference guide for Amazon Simple Storage Service's
  3217. // API operation GetObjectTagging for usage and error information.
  3218. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  3219. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  3220. req, out := c.GetObjectTaggingRequest(input)
  3221. return out, req.Send()
  3222. }
  3223. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  3224. // the ability to pass a context and additional request options.
  3225. //
  3226. // See GetObjectTagging for details on how to use this API operation.
  3227. //
  3228. // The context must be non-nil and will be used for request cancellation. If
  3229. // the context is nil a panic will occur. In the future the SDK may create
  3230. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3231. // for more information on using Contexts.
  3232. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  3233. req, out := c.GetObjectTaggingRequest(input)
  3234. req.SetContext(ctx)
  3235. req.ApplyOptions(opts...)
  3236. return out, req.Send()
  3237. }
  3238. const opGetObjectTorrent = "GetObjectTorrent"
  3239. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  3240. // client's request for the GetObjectTorrent operation. The "output" return
  3241. // value will be populated with the request's response once the request completes
  3242. // successfully.
  3243. //
  3244. // Use "Send" method on the returned Request to send the API call to the service.
  3245. // the "output" return value is not valid until after Send returns without error.
  3246. //
  3247. // See GetObjectTorrent for more information on using the GetObjectTorrent
  3248. // API call, and error handling.
  3249. //
  3250. // This method is useful when you want to inject custom logic or configuration
  3251. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3252. //
  3253. //
  3254. // // Example sending a request using the GetObjectTorrentRequest method.
  3255. // req, resp := client.GetObjectTorrentRequest(params)
  3256. //
  3257. // err := req.Send()
  3258. // if err == nil { // resp is now filled
  3259. // fmt.Println(resp)
  3260. // }
  3261. //
  3262. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  3263. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  3264. op := &request.Operation{
  3265. Name: opGetObjectTorrent,
  3266. HTTPMethod: "GET",
  3267. HTTPPath: "/{Bucket}/{Key+}?torrent",
  3268. }
  3269. if input == nil {
  3270. input = &GetObjectTorrentInput{}
  3271. }
  3272. output = &GetObjectTorrentOutput{}
  3273. req = c.newRequest(op, input, output)
  3274. return
  3275. }
  3276. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  3277. //
  3278. // Return torrent files from a bucket.
  3279. //
  3280. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3281. // with awserr.Error's Code and Message methods to get detailed information about
  3282. // the error.
  3283. //
  3284. // See the AWS API reference guide for Amazon Simple Storage Service's
  3285. // API operation GetObjectTorrent for usage and error information.
  3286. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  3287. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  3288. req, out := c.GetObjectTorrentRequest(input)
  3289. return out, req.Send()
  3290. }
  3291. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  3292. // the ability to pass a context and additional request options.
  3293. //
  3294. // See GetObjectTorrent for details on how to use this API operation.
  3295. //
  3296. // The context must be non-nil and will be used for request cancellation. If
  3297. // the context is nil a panic will occur. In the future the SDK may create
  3298. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3299. // for more information on using Contexts.
  3300. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  3301. req, out := c.GetObjectTorrentRequest(input)
  3302. req.SetContext(ctx)
  3303. req.ApplyOptions(opts...)
  3304. return out, req.Send()
  3305. }
  3306. const opGetPublicAccessBlock = "GetPublicAccessBlock"
  3307. // GetPublicAccessBlockRequest generates a "aws/request.Request" representing the
  3308. // client's request for the GetPublicAccessBlock operation. The "output" return
  3309. // value will be populated with the request's response once the request completes
  3310. // successfully.
  3311. //
  3312. // Use "Send" method on the returned Request to send the API call to the service.
  3313. // the "output" return value is not valid until after Send returns without error.
  3314. //
  3315. // See GetPublicAccessBlock for more information on using the GetPublicAccessBlock
  3316. // API call, and error handling.
  3317. //
  3318. // This method is useful when you want to inject custom logic or configuration
  3319. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3320. //
  3321. //
  3322. // // Example sending a request using the GetPublicAccessBlockRequest method.
  3323. // req, resp := client.GetPublicAccessBlockRequest(params)
  3324. //
  3325. // err := req.Send()
  3326. // if err == nil { // resp is now filled
  3327. // fmt.Println(resp)
  3328. // }
  3329. //
  3330. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
  3331. func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) {
  3332. op := &request.Operation{
  3333. Name: opGetPublicAccessBlock,
  3334. HTTPMethod: "GET",
  3335. HTTPPath: "/{Bucket}?publicAccessBlock",
  3336. }
  3337. if input == nil {
  3338. input = &GetPublicAccessBlockInput{}
  3339. }
  3340. output = &GetPublicAccessBlockOutput{}
  3341. req = c.newRequest(op, input, output)
  3342. return
  3343. }
  3344. // GetPublicAccessBlock API operation for Amazon Simple Storage Service.
  3345. //
  3346. // Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket.
  3347. //
  3348. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3349. // with awserr.Error's Code and Message methods to get detailed information about
  3350. // the error.
  3351. //
  3352. // See the AWS API reference guide for Amazon Simple Storage Service's
  3353. // API operation GetPublicAccessBlock for usage and error information.
  3354. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
  3355. func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) {
  3356. req, out := c.GetPublicAccessBlockRequest(input)
  3357. return out, req.Send()
  3358. }
  3359. // GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of
  3360. // the ability to pass a context and additional request options.
  3361. //
  3362. // See GetPublicAccessBlock for details on how to use this API operation.
  3363. //
  3364. // The context must be non-nil and will be used for request cancellation. If
  3365. // the context is nil a panic will occur. In the future the SDK may create
  3366. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3367. // for more information on using Contexts.
  3368. func (c *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) {
  3369. req, out := c.GetPublicAccessBlockRequest(input)
  3370. req.SetContext(ctx)
  3371. req.ApplyOptions(opts...)
  3372. return out, req.Send()
  3373. }
  3374. const opHeadBucket = "HeadBucket"
  3375. // HeadBucketRequest generates a "aws/request.Request" representing the
  3376. // client's request for the HeadBucket operation. The "output" return
  3377. // value will be populated with the request's response once the request completes
  3378. // successfully.
  3379. //
  3380. // Use "Send" method on the returned Request to send the API call to the service.
  3381. // the "output" return value is not valid until after Send returns without error.
  3382. //
  3383. // See HeadBucket for more information on using the HeadBucket
  3384. // API call, and error handling.
  3385. //
  3386. // This method is useful when you want to inject custom logic or configuration
  3387. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3388. //
  3389. //
  3390. // // Example sending a request using the HeadBucketRequest method.
  3391. // req, resp := client.HeadBucketRequest(params)
  3392. //
  3393. // err := req.Send()
  3394. // if err == nil { // resp is now filled
  3395. // fmt.Println(resp)
  3396. // }
  3397. //
  3398. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3399. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  3400. op := &request.Operation{
  3401. Name: opHeadBucket,
  3402. HTTPMethod: "HEAD",
  3403. HTTPPath: "/{Bucket}",
  3404. }
  3405. if input == nil {
  3406. input = &HeadBucketInput{}
  3407. }
  3408. output = &HeadBucketOutput{}
  3409. req = c.newRequest(op, input, output)
  3410. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3411. return
  3412. }
  3413. // HeadBucket API operation for Amazon Simple Storage Service.
  3414. //
  3415. // This operation is useful to determine if a bucket exists and you have permission
  3416. // to access it.
  3417. //
  3418. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3419. // with awserr.Error's Code and Message methods to get detailed information about
  3420. // the error.
  3421. //
  3422. // See the AWS API reference guide for Amazon Simple Storage Service's
  3423. // API operation HeadBucket for usage and error information.
  3424. //
  3425. // Returned Error Codes:
  3426. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3427. // The specified bucket does not exist.
  3428. //
  3429. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3430. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  3431. req, out := c.HeadBucketRequest(input)
  3432. return out, req.Send()
  3433. }
  3434. // HeadBucketWithContext is the same as HeadBucket with the addition of
  3435. // the ability to pass a context and additional request options.
  3436. //
  3437. // See HeadBucket for details on how to use this API operation.
  3438. //
  3439. // The context must be non-nil and will be used for request cancellation. If
  3440. // the context is nil a panic will occur. In the future the SDK may create
  3441. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3442. // for more information on using Contexts.
  3443. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  3444. req, out := c.HeadBucketRequest(input)
  3445. req.SetContext(ctx)
  3446. req.ApplyOptions(opts...)
  3447. return out, req.Send()
  3448. }
  3449. const opHeadObject = "HeadObject"
  3450. // HeadObjectRequest generates a "aws/request.Request" representing the
  3451. // client's request for the HeadObject operation. The "output" return
  3452. // value will be populated with the request's response once the request completes
  3453. // successfully.
  3454. //
  3455. // Use "Send" method on the returned Request to send the API call to the service.
  3456. // the "output" return value is not valid until after Send returns without error.
  3457. //
  3458. // See HeadObject for more information on using the HeadObject
  3459. // API call, and error handling.
  3460. //
  3461. // This method is useful when you want to inject custom logic or configuration
  3462. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3463. //
  3464. //
  3465. // // Example sending a request using the HeadObjectRequest method.
  3466. // req, resp := client.HeadObjectRequest(params)
  3467. //
  3468. // err := req.Send()
  3469. // if err == nil { // resp is now filled
  3470. // fmt.Println(resp)
  3471. // }
  3472. //
  3473. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3474. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  3475. op := &request.Operation{
  3476. Name: opHeadObject,
  3477. HTTPMethod: "HEAD",
  3478. HTTPPath: "/{Bucket}/{Key+}",
  3479. }
  3480. if input == nil {
  3481. input = &HeadObjectInput{}
  3482. }
  3483. output = &HeadObjectOutput{}
  3484. req = c.newRequest(op, input, output)
  3485. return
  3486. }
  3487. // HeadObject API operation for Amazon Simple Storage Service.
  3488. //
  3489. // The HEAD operation retrieves metadata from an object without returning the
  3490. // object itself. This operation is useful if you're only interested in an object's
  3491. // metadata. To use HEAD, you must have READ access to the object.
  3492. //
  3493. // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
  3494. // for more information on returned errors.
  3495. //
  3496. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3497. // with awserr.Error's Code and Message methods to get detailed information about
  3498. // the error.
  3499. //
  3500. // See the AWS API reference guide for Amazon Simple Storage Service's
  3501. // API operation HeadObject for usage and error information.
  3502. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3503. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  3504. req, out := c.HeadObjectRequest(input)
  3505. return out, req.Send()
  3506. }
  3507. // HeadObjectWithContext is the same as HeadObject with the addition of
  3508. // the ability to pass a context and additional request options.
  3509. //
  3510. // See HeadObject for details on how to use this API operation.
  3511. //
  3512. // The context must be non-nil and will be used for request cancellation. If
  3513. // the context is nil a panic will occur. In the future the SDK may create
  3514. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3515. // for more information on using Contexts.
  3516. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  3517. req, out := c.HeadObjectRequest(input)
  3518. req.SetContext(ctx)
  3519. req.ApplyOptions(opts...)
  3520. return out, req.Send()
  3521. }
  3522. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  3523. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  3524. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  3525. // value will be populated with the request's response once the request completes
  3526. // successfully.
  3527. //
  3528. // Use "Send" method on the returned Request to send the API call to the service.
  3529. // the "output" return value is not valid until after Send returns without error.
  3530. //
  3531. // See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
  3532. // API call, and error handling.
  3533. //
  3534. // This method is useful when you want to inject custom logic or configuration
  3535. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3536. //
  3537. //
  3538. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  3539. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  3540. //
  3541. // err := req.Send()
  3542. // if err == nil { // resp is now filled
  3543. // fmt.Println(resp)
  3544. // }
  3545. //
  3546. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3547. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  3548. op := &request.Operation{
  3549. Name: opListBucketAnalyticsConfigurations,
  3550. HTTPMethod: "GET",
  3551. HTTPPath: "/{Bucket}?analytics",
  3552. }
  3553. if input == nil {
  3554. input = &ListBucketAnalyticsConfigurationsInput{}
  3555. }
  3556. output = &ListBucketAnalyticsConfigurationsOutput{}
  3557. req = c.newRequest(op, input, output)
  3558. return
  3559. }
  3560. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  3561. //
  3562. // Lists the analytics configurations for the bucket.
  3563. //
  3564. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3565. // with awserr.Error's Code and Message methods to get detailed information about
  3566. // the error.
  3567. //
  3568. // See the AWS API reference guide for Amazon Simple Storage Service's
  3569. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  3570. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3571. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3572. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3573. return out, req.Send()
  3574. }
  3575. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  3576. // the ability to pass a context and additional request options.
  3577. //
  3578. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  3579. //
  3580. // The context must be non-nil and will be used for request cancellation. If
  3581. // the context is nil a panic will occur. In the future the SDK may create
  3582. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3583. // for more information on using Contexts.
  3584. func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3585. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3586. req.SetContext(ctx)
  3587. req.ApplyOptions(opts...)
  3588. return out, req.Send()
  3589. }
  3590. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  3591. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  3592. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  3593. // value will be populated with the request's response once the request completes
  3594. // successfully.
  3595. //
  3596. // Use "Send" method on the returned Request to send the API call to the service.
  3597. // the "output" return value is not valid until after Send returns without error.
  3598. //
  3599. // See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
  3600. // API call, and error handling.
  3601. //
  3602. // This method is useful when you want to inject custom logic or configuration
  3603. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3604. //
  3605. //
  3606. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  3607. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  3608. //
  3609. // err := req.Send()
  3610. // if err == nil { // resp is now filled
  3611. // fmt.Println(resp)
  3612. // }
  3613. //
  3614. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3615. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  3616. op := &request.Operation{
  3617. Name: opListBucketInventoryConfigurations,
  3618. HTTPMethod: "GET",
  3619. HTTPPath: "/{Bucket}?inventory",
  3620. }
  3621. if input == nil {
  3622. input = &ListBucketInventoryConfigurationsInput{}
  3623. }
  3624. output = &ListBucketInventoryConfigurationsOutput{}
  3625. req = c.newRequest(op, input, output)
  3626. return
  3627. }
  3628. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  3629. //
  3630. // Returns a list of inventory configurations for the bucket.
  3631. //
  3632. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3633. // with awserr.Error's Code and Message methods to get detailed information about
  3634. // the error.
  3635. //
  3636. // See the AWS API reference guide for Amazon Simple Storage Service's
  3637. // API operation ListBucketInventoryConfigurations for usage and error information.
  3638. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3639. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  3640. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3641. return out, req.Send()
  3642. }
  3643. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  3644. // the ability to pass a context and additional request options.
  3645. //
  3646. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  3647. //
  3648. // The context must be non-nil and will be used for request cancellation. If
  3649. // the context is nil a panic will occur. In the future the SDK may create
  3650. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3651. // for more information on using Contexts.
  3652. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  3653. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3654. req.SetContext(ctx)
  3655. req.ApplyOptions(opts...)
  3656. return out, req.Send()
  3657. }
  3658. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  3659. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  3660. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  3661. // value will be populated with the request's response once the request completes
  3662. // successfully.
  3663. //
  3664. // Use "Send" method on the returned Request to send the API call to the service.
  3665. // the "output" return value is not valid until after Send returns without error.
  3666. //
  3667. // See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
  3668. // API call, and error handling.
  3669. //
  3670. // This method is useful when you want to inject custom logic or configuration
  3671. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3672. //
  3673. //
  3674. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  3675. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  3676. //
  3677. // err := req.Send()
  3678. // if err == nil { // resp is now filled
  3679. // fmt.Println(resp)
  3680. // }
  3681. //
  3682. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3683. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  3684. op := &request.Operation{
  3685. Name: opListBucketMetricsConfigurations,
  3686. HTTPMethod: "GET",
  3687. HTTPPath: "/{Bucket}?metrics",
  3688. }
  3689. if input == nil {
  3690. input = &ListBucketMetricsConfigurationsInput{}
  3691. }
  3692. output = &ListBucketMetricsConfigurationsOutput{}
  3693. req = c.newRequest(op, input, output)
  3694. return
  3695. }
  3696. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  3697. //
  3698. // Lists the metrics configurations for the bucket.
  3699. //
  3700. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3701. // with awserr.Error's Code and Message methods to get detailed information about
  3702. // the error.
  3703. //
  3704. // See the AWS API reference guide for Amazon Simple Storage Service's
  3705. // API operation ListBucketMetricsConfigurations for usage and error information.
  3706. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3707. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  3708. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3709. return out, req.Send()
  3710. }
  3711. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  3712. // the ability to pass a context and additional request options.
  3713. //
  3714. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  3715. //
  3716. // The context must be non-nil and will be used for request cancellation. If
  3717. // the context is nil a panic will occur. In the future the SDK may create
  3718. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3719. // for more information on using Contexts.
  3720. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  3721. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3722. req.SetContext(ctx)
  3723. req.ApplyOptions(opts...)
  3724. return out, req.Send()
  3725. }
  3726. const opListBuckets = "ListBuckets"
  3727. // ListBucketsRequest generates a "aws/request.Request" representing the
  3728. // client's request for the ListBuckets operation. The "output" return
  3729. // value will be populated with the request's response once the request completes
  3730. // successfully.
  3731. //
  3732. // Use "Send" method on the returned Request to send the API call to the service.
  3733. // the "output" return value is not valid until after Send returns without error.
  3734. //
  3735. // See ListBuckets for more information on using the ListBuckets
  3736. // API call, and error handling.
  3737. //
  3738. // This method is useful when you want to inject custom logic or configuration
  3739. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3740. //
  3741. //
  3742. // // Example sending a request using the ListBucketsRequest method.
  3743. // req, resp := client.ListBucketsRequest(params)
  3744. //
  3745. // err := req.Send()
  3746. // if err == nil { // resp is now filled
  3747. // fmt.Println(resp)
  3748. // }
  3749. //
  3750. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3751. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  3752. op := &request.Operation{
  3753. Name: opListBuckets,
  3754. HTTPMethod: "GET",
  3755. HTTPPath: "/",
  3756. }
  3757. if input == nil {
  3758. input = &ListBucketsInput{}
  3759. }
  3760. output = &ListBucketsOutput{}
  3761. req = c.newRequest(op, input, output)
  3762. return
  3763. }
  3764. // ListBuckets API operation for Amazon Simple Storage Service.
  3765. //
  3766. // Returns a list of all buckets owned by the authenticated sender of the request.
  3767. //
  3768. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3769. // with awserr.Error's Code and Message methods to get detailed information about
  3770. // the error.
  3771. //
  3772. // See the AWS API reference guide for Amazon Simple Storage Service's
  3773. // API operation ListBuckets for usage and error information.
  3774. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3775. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  3776. req, out := c.ListBucketsRequest(input)
  3777. return out, req.Send()
  3778. }
  3779. // ListBucketsWithContext is the same as ListBuckets with the addition of
  3780. // the ability to pass a context and additional request options.
  3781. //
  3782. // See ListBuckets for details on how to use this API operation.
  3783. //
  3784. // The context must be non-nil and will be used for request cancellation. If
  3785. // the context is nil a panic will occur. In the future the SDK may create
  3786. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3787. // for more information on using Contexts.
  3788. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  3789. req, out := c.ListBucketsRequest(input)
  3790. req.SetContext(ctx)
  3791. req.ApplyOptions(opts...)
  3792. return out, req.Send()
  3793. }
  3794. const opListMultipartUploads = "ListMultipartUploads"
  3795. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  3796. // client's request for the ListMultipartUploads operation. The "output" return
  3797. // value will be populated with the request's response once the request completes
  3798. // successfully.
  3799. //
  3800. // Use "Send" method on the returned Request to send the API call to the service.
  3801. // the "output" return value is not valid until after Send returns without error.
  3802. //
  3803. // See ListMultipartUploads for more information on using the ListMultipartUploads
  3804. // API call, and error handling.
  3805. //
  3806. // This method is useful when you want to inject custom logic or configuration
  3807. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3808. //
  3809. //
  3810. // // Example sending a request using the ListMultipartUploadsRequest method.
  3811. // req, resp := client.ListMultipartUploadsRequest(params)
  3812. //
  3813. // err := req.Send()
  3814. // if err == nil { // resp is now filled
  3815. // fmt.Println(resp)
  3816. // }
  3817. //
  3818. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3819. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  3820. op := &request.Operation{
  3821. Name: opListMultipartUploads,
  3822. HTTPMethod: "GET",
  3823. HTTPPath: "/{Bucket}?uploads",
  3824. Paginator: &request.Paginator{
  3825. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  3826. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  3827. LimitToken: "MaxUploads",
  3828. TruncationToken: "IsTruncated",
  3829. },
  3830. }
  3831. if input == nil {
  3832. input = &ListMultipartUploadsInput{}
  3833. }
  3834. output = &ListMultipartUploadsOutput{}
  3835. req = c.newRequest(op, input, output)
  3836. return
  3837. }
  3838. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  3839. //
  3840. // This operation lists in-progress multipart uploads.
  3841. //
  3842. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3843. // with awserr.Error's Code and Message methods to get detailed information about
  3844. // the error.
  3845. //
  3846. // See the AWS API reference guide for Amazon Simple Storage Service's
  3847. // API operation ListMultipartUploads for usage and error information.
  3848. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3849. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  3850. req, out := c.ListMultipartUploadsRequest(input)
  3851. return out, req.Send()
  3852. }
  3853. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  3854. // the ability to pass a context and additional request options.
  3855. //
  3856. // See ListMultipartUploads for details on how to use this API operation.
  3857. //
  3858. // The context must be non-nil and will be used for request cancellation. If
  3859. // the context is nil a panic will occur. In the future the SDK may create
  3860. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3861. // for more information on using Contexts.
  3862. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  3863. req, out := c.ListMultipartUploadsRequest(input)
  3864. req.SetContext(ctx)
  3865. req.ApplyOptions(opts...)
  3866. return out, req.Send()
  3867. }
  3868. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  3869. // calling the "fn" function with the response data for each page. To stop
  3870. // iterating, return false from the fn function.
  3871. //
  3872. // See ListMultipartUploads method for more information on how to use this operation.
  3873. //
  3874. // Note: This operation can generate multiple requests to a service.
  3875. //
  3876. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  3877. // pageNum := 0
  3878. // err := client.ListMultipartUploadsPages(params,
  3879. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  3880. // pageNum++
  3881. // fmt.Println(page)
  3882. // return pageNum <= 3
  3883. // })
  3884. //
  3885. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  3886. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  3887. }
  3888. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  3889. // it takes a Context and allows setting request options on the pages.
  3890. //
  3891. // The context must be non-nil and will be used for request cancellation. If
  3892. // the context is nil a panic will occur. In the future the SDK may create
  3893. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3894. // for more information on using Contexts.
  3895. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  3896. p := request.Pagination{
  3897. NewRequest: func() (*request.Request, error) {
  3898. var inCpy *ListMultipartUploadsInput
  3899. if input != nil {
  3900. tmp := *input
  3901. inCpy = &tmp
  3902. }
  3903. req, _ := c.ListMultipartUploadsRequest(inCpy)
  3904. req.SetContext(ctx)
  3905. req.ApplyOptions(opts...)
  3906. return req, nil
  3907. },
  3908. }
  3909. cont := true
  3910. for p.Next() && cont {
  3911. cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
  3912. }
  3913. return p.Err()
  3914. }
  3915. const opListObjectVersions = "ListObjectVersions"
  3916. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  3917. // client's request for the ListObjectVersions operation. The "output" return
  3918. // value will be populated with the request's response once the request completes
  3919. // successfully.
  3920. //
  3921. // Use "Send" method on the returned Request to send the API call to the service.
  3922. // the "output" return value is not valid until after Send returns without error.
  3923. //
  3924. // See ListObjectVersions for more information on using the ListObjectVersions
  3925. // API call, and error handling.
  3926. //
  3927. // This method is useful when you want to inject custom logic or configuration
  3928. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3929. //
  3930. //
  3931. // // Example sending a request using the ListObjectVersionsRequest method.
  3932. // req, resp := client.ListObjectVersionsRequest(params)
  3933. //
  3934. // err := req.Send()
  3935. // if err == nil { // resp is now filled
  3936. // fmt.Println(resp)
  3937. // }
  3938. //
  3939. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3940. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  3941. op := &request.Operation{
  3942. Name: opListObjectVersions,
  3943. HTTPMethod: "GET",
  3944. HTTPPath: "/{Bucket}?versions",
  3945. Paginator: &request.Paginator{
  3946. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  3947. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  3948. LimitToken: "MaxKeys",
  3949. TruncationToken: "IsTruncated",
  3950. },
  3951. }
  3952. if input == nil {
  3953. input = &ListObjectVersionsInput{}
  3954. }
  3955. output = &ListObjectVersionsOutput{}
  3956. req = c.newRequest(op, input, output)
  3957. return
  3958. }
  3959. // ListObjectVersions API operation for Amazon Simple Storage Service.
  3960. //
  3961. // Returns metadata about all of the versions of objects in a bucket.
  3962. //
  3963. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3964. // with awserr.Error's Code and Message methods to get detailed information about
  3965. // the error.
  3966. //
  3967. // See the AWS API reference guide for Amazon Simple Storage Service's
  3968. // API operation ListObjectVersions for usage and error information.
  3969. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3970. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  3971. req, out := c.ListObjectVersionsRequest(input)
  3972. return out, req.Send()
  3973. }
  3974. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  3975. // the ability to pass a context and additional request options.
  3976. //
  3977. // See ListObjectVersions for details on how to use this API operation.
  3978. //
  3979. // The context must be non-nil and will be used for request cancellation. If
  3980. // the context is nil a panic will occur. In the future the SDK may create
  3981. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3982. // for more information on using Contexts.
  3983. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  3984. req, out := c.ListObjectVersionsRequest(input)
  3985. req.SetContext(ctx)
  3986. req.ApplyOptions(opts...)
  3987. return out, req.Send()
  3988. }
  3989. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  3990. // calling the "fn" function with the response data for each page. To stop
  3991. // iterating, return false from the fn function.
  3992. //
  3993. // See ListObjectVersions method for more information on how to use this operation.
  3994. //
  3995. // Note: This operation can generate multiple requests to a service.
  3996. //
  3997. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  3998. // pageNum := 0
  3999. // err := client.ListObjectVersionsPages(params,
  4000. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  4001. // pageNum++
  4002. // fmt.Println(page)
  4003. // return pageNum <= 3
  4004. // })
  4005. //
  4006. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  4007. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  4008. }
  4009. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  4010. // it takes a Context and allows setting request options on the pages.
  4011. //
  4012. // The context must be non-nil and will be used for request cancellation. If
  4013. // the context is nil a panic will occur. In the future the SDK may create
  4014. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4015. // for more information on using Contexts.
  4016. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  4017. p := request.Pagination{
  4018. NewRequest: func() (*request.Request, error) {
  4019. var inCpy *ListObjectVersionsInput
  4020. if input != nil {
  4021. tmp := *input
  4022. inCpy = &tmp
  4023. }
  4024. req, _ := c.ListObjectVersionsRequest(inCpy)
  4025. req.SetContext(ctx)
  4026. req.ApplyOptions(opts...)
  4027. return req, nil
  4028. },
  4029. }
  4030. cont := true
  4031. for p.Next() && cont {
  4032. cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
  4033. }
  4034. return p.Err()
  4035. }
  4036. const opListObjects = "ListObjects"
  4037. // ListObjectsRequest generates a "aws/request.Request" representing the
  4038. // client's request for the ListObjects operation. The "output" return
  4039. // value will be populated with the request's response once the request completes
  4040. // successfully.
  4041. //
  4042. // Use "Send" method on the returned Request to send the API call to the service.
  4043. // the "output" return value is not valid until after Send returns without error.
  4044. //
  4045. // See ListObjects for more information on using the ListObjects
  4046. // API call, and error handling.
  4047. //
  4048. // This method is useful when you want to inject custom logic or configuration
  4049. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4050. //
  4051. //
  4052. // // Example sending a request using the ListObjectsRequest method.
  4053. // req, resp := client.ListObjectsRequest(params)
  4054. //
  4055. // err := req.Send()
  4056. // if err == nil { // resp is now filled
  4057. // fmt.Println(resp)
  4058. // }
  4059. //
  4060. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  4061. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  4062. op := &request.Operation{
  4063. Name: opListObjects,
  4064. HTTPMethod: "GET",
  4065. HTTPPath: "/{Bucket}",
  4066. Paginator: &request.Paginator{
  4067. InputTokens: []string{"Marker"},
  4068. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  4069. LimitToken: "MaxKeys",
  4070. TruncationToken: "IsTruncated",
  4071. },
  4072. }
  4073. if input == nil {
  4074. input = &ListObjectsInput{}
  4075. }
  4076. output = &ListObjectsOutput{}
  4077. req = c.newRequest(op, input, output)
  4078. return
  4079. }
  4080. // ListObjects API operation for Amazon Simple Storage Service.
  4081. //
  4082. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  4083. // the request parameters as selection criteria to return a subset of the objects
  4084. // in a bucket.
  4085. //
  4086. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4087. // with awserr.Error's Code and Message methods to get detailed information about
  4088. // the error.
  4089. //
  4090. // See the AWS API reference guide for Amazon Simple Storage Service's
  4091. // API operation ListObjects for usage and error information.
  4092. //
  4093. // Returned Error Codes:
  4094. // * ErrCodeNoSuchBucket "NoSuchBucket"
  4095. // The specified bucket does not exist.
  4096. //
  4097. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  4098. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  4099. req, out := c.ListObjectsRequest(input)
  4100. return out, req.Send()
  4101. }
  4102. // ListObjectsWithContext is the same as ListObjects with the addition of
  4103. // the ability to pass a context and additional request options.
  4104. //
  4105. // See ListObjects for details on how to use this API operation.
  4106. //
  4107. // The context must be non-nil and will be used for request cancellation. If
  4108. // the context is nil a panic will occur. In the future the SDK may create
  4109. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4110. // for more information on using Contexts.
  4111. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  4112. req, out := c.ListObjectsRequest(input)
  4113. req.SetContext(ctx)
  4114. req.ApplyOptions(opts...)
  4115. return out, req.Send()
  4116. }
  4117. // ListObjectsPages iterates over the pages of a ListObjects operation,
  4118. // calling the "fn" function with the response data for each page. To stop
  4119. // iterating, return false from the fn function.
  4120. //
  4121. // See ListObjects method for more information on how to use this operation.
  4122. //
  4123. // Note: This operation can generate multiple requests to a service.
  4124. //
  4125. // // Example iterating over at most 3 pages of a ListObjects operation.
  4126. // pageNum := 0
  4127. // err := client.ListObjectsPages(params,
  4128. // func(page *ListObjectsOutput, lastPage bool) bool {
  4129. // pageNum++
  4130. // fmt.Println(page)
  4131. // return pageNum <= 3
  4132. // })
  4133. //
  4134. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  4135. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  4136. }
  4137. // ListObjectsPagesWithContext same as ListObjectsPages except
  4138. // it takes a Context and allows setting request options on the pages.
  4139. //
  4140. // The context must be non-nil and will be used for request cancellation. If
  4141. // the context is nil a panic will occur. In the future the SDK may create
  4142. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4143. // for more information on using Contexts.
  4144. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  4145. p := request.Pagination{
  4146. NewRequest: func() (*request.Request, error) {
  4147. var inCpy *ListObjectsInput
  4148. if input != nil {
  4149. tmp := *input
  4150. inCpy = &tmp
  4151. }
  4152. req, _ := c.ListObjectsRequest(inCpy)
  4153. req.SetContext(ctx)
  4154. req.ApplyOptions(opts...)
  4155. return req, nil
  4156. },
  4157. }
  4158. cont := true
  4159. for p.Next() && cont {
  4160. cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
  4161. }
  4162. return p.Err()
  4163. }
  4164. const opListObjectsV2 = "ListObjectsV2"
  4165. // ListObjectsV2Request generates a "aws/request.Request" representing the
  4166. // client's request for the ListObjectsV2 operation. The "output" return
  4167. // value will be populated with the request's response once the request completes
  4168. // successfully.
  4169. //
  4170. // Use "Send" method on the returned Request to send the API call to the service.
  4171. // the "output" return value is not valid until after Send returns without error.
  4172. //
  4173. // See ListObjectsV2 for more information on using the ListObjectsV2
  4174. // API call, and error handling.
  4175. //
  4176. // This method is useful when you want to inject custom logic or configuration
  4177. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4178. //
  4179. //
  4180. // // Example sending a request using the ListObjectsV2Request method.
  4181. // req, resp := client.ListObjectsV2Request(params)
  4182. //
  4183. // err := req.Send()
  4184. // if err == nil { // resp is now filled
  4185. // fmt.Println(resp)
  4186. // }
  4187. //
  4188. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  4189. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  4190. op := &request.Operation{
  4191. Name: opListObjectsV2,
  4192. HTTPMethod: "GET",
  4193. HTTPPath: "/{Bucket}?list-type=2",
  4194. Paginator: &request.Paginator{
  4195. InputTokens: []string{"ContinuationToken"},
  4196. OutputTokens: []string{"NextContinuationToken"},
  4197. LimitToken: "MaxKeys",
  4198. TruncationToken: "",
  4199. },
  4200. }
  4201. if input == nil {
  4202. input = &ListObjectsV2Input{}
  4203. }
  4204. output = &ListObjectsV2Output{}
  4205. req = c.newRequest(op, input, output)
  4206. return
  4207. }
  4208. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  4209. //
  4210. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  4211. // the request parameters as selection criteria to return a subset of the objects
  4212. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  4213. // you use this revised API for new application development.
  4214. //
  4215. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4216. // with awserr.Error's Code and Message methods to get detailed information about
  4217. // the error.
  4218. //
  4219. // See the AWS API reference guide for Amazon Simple Storage Service's
  4220. // API operation ListObjectsV2 for usage and error information.
  4221. //
  4222. // Returned Error Codes:
  4223. // * ErrCodeNoSuchBucket "NoSuchBucket"
  4224. // The specified bucket does not exist.
  4225. //
  4226. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  4227. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  4228. req, out := c.ListObjectsV2Request(input)
  4229. return out, req.Send()
  4230. }
  4231. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  4232. // the ability to pass a context and additional request options.
  4233. //
  4234. // See ListObjectsV2 for details on how to use this API operation.
  4235. //
  4236. // The context must be non-nil and will be used for request cancellation. If
  4237. // the context is nil a panic will occur. In the future the SDK may create
  4238. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4239. // for more information on using Contexts.
  4240. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  4241. req, out := c.ListObjectsV2Request(input)
  4242. req.SetContext(ctx)
  4243. req.ApplyOptions(opts...)
  4244. return out, req.Send()
  4245. }
  4246. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  4247. // calling the "fn" function with the response data for each page. To stop
  4248. // iterating, return false from the fn function.
  4249. //
  4250. // See ListObjectsV2 method for more information on how to use this operation.
  4251. //
  4252. // Note: This operation can generate multiple requests to a service.
  4253. //
  4254. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  4255. // pageNum := 0
  4256. // err := client.ListObjectsV2Pages(params,
  4257. // func(page *ListObjectsV2Output, lastPage bool) bool {
  4258. // pageNum++
  4259. // fmt.Println(page)
  4260. // return pageNum <= 3
  4261. // })
  4262. //
  4263. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  4264. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  4265. }
  4266. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  4267. // it takes a Context and allows setting request options on the pages.
  4268. //
  4269. // The context must be non-nil and will be used for request cancellation. If
  4270. // the context is nil a panic will occur. In the future the SDK may create
  4271. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4272. // for more information on using Contexts.
  4273. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  4274. p := request.Pagination{
  4275. NewRequest: func() (*request.Request, error) {
  4276. var inCpy *ListObjectsV2Input
  4277. if input != nil {
  4278. tmp := *input
  4279. inCpy = &tmp
  4280. }
  4281. req, _ := c.ListObjectsV2Request(inCpy)
  4282. req.SetContext(ctx)
  4283. req.ApplyOptions(opts...)
  4284. return req, nil
  4285. },
  4286. }
  4287. cont := true
  4288. for p.Next() && cont {
  4289. cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
  4290. }
  4291. return p.Err()
  4292. }
  4293. const opListParts = "ListParts"
  4294. // ListPartsRequest generates a "aws/request.Request" representing the
  4295. // client's request for the ListParts operation. The "output" return
  4296. // value will be populated with the request's response once the request completes
  4297. // successfully.
  4298. //
  4299. // Use "Send" method on the returned Request to send the API call to the service.
  4300. // the "output" return value is not valid until after Send returns without error.
  4301. //
  4302. // See ListParts for more information on using the ListParts
  4303. // API call, and error handling.
  4304. //
  4305. // This method is useful when you want to inject custom logic or configuration
  4306. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4307. //
  4308. //
  4309. // // Example sending a request using the ListPartsRequest method.
  4310. // req, resp := client.ListPartsRequest(params)
  4311. //
  4312. // err := req.Send()
  4313. // if err == nil { // resp is now filled
  4314. // fmt.Println(resp)
  4315. // }
  4316. //
  4317. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  4318. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  4319. op := &request.Operation{
  4320. Name: opListParts,
  4321. HTTPMethod: "GET",
  4322. HTTPPath: "/{Bucket}/{Key+}",
  4323. Paginator: &request.Paginator{
  4324. InputTokens: []string{"PartNumberMarker"},
  4325. OutputTokens: []string{"NextPartNumberMarker"},
  4326. LimitToken: "MaxParts",
  4327. TruncationToken: "IsTruncated",
  4328. },
  4329. }
  4330. if input == nil {
  4331. input = &ListPartsInput{}
  4332. }
  4333. output = &ListPartsOutput{}
  4334. req = c.newRequest(op, input, output)
  4335. return
  4336. }
  4337. // ListParts API operation for Amazon Simple Storage Service.
  4338. //
  4339. // Lists the parts that have been uploaded for a specific multipart upload.
  4340. //
  4341. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4342. // with awserr.Error's Code and Message methods to get detailed information about
  4343. // the error.
  4344. //
  4345. // See the AWS API reference guide for Amazon Simple Storage Service's
  4346. // API operation ListParts for usage and error information.
  4347. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  4348. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  4349. req, out := c.ListPartsRequest(input)
  4350. return out, req.Send()
  4351. }
  4352. // ListPartsWithContext is the same as ListParts with the addition of
  4353. // the ability to pass a context and additional request options.
  4354. //
  4355. // See ListParts for details on how to use this API operation.
  4356. //
  4357. // The context must be non-nil and will be used for request cancellation. If
  4358. // the context is nil a panic will occur. In the future the SDK may create
  4359. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4360. // for more information on using Contexts.
  4361. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  4362. req, out := c.ListPartsRequest(input)
  4363. req.SetContext(ctx)
  4364. req.ApplyOptions(opts...)
  4365. return out, req.Send()
  4366. }
  4367. // ListPartsPages iterates over the pages of a ListParts operation,
  4368. // calling the "fn" function with the response data for each page. To stop
  4369. // iterating, return false from the fn function.
  4370. //
  4371. // See ListParts method for more information on how to use this operation.
  4372. //
  4373. // Note: This operation can generate multiple requests to a service.
  4374. //
  4375. // // Example iterating over at most 3 pages of a ListParts operation.
  4376. // pageNum := 0
  4377. // err := client.ListPartsPages(params,
  4378. // func(page *ListPartsOutput, lastPage bool) bool {
  4379. // pageNum++
  4380. // fmt.Println(page)
  4381. // return pageNum <= 3
  4382. // })
  4383. //
  4384. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  4385. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  4386. }
  4387. // ListPartsPagesWithContext same as ListPartsPages except
  4388. // it takes a Context and allows setting request options on the pages.
  4389. //
  4390. // The context must be non-nil and will be used for request cancellation. If
  4391. // the context is nil a panic will occur. In the future the SDK may create
  4392. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4393. // for more information on using Contexts.
  4394. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  4395. p := request.Pagination{
  4396. NewRequest: func() (*request.Request, error) {
  4397. var inCpy *ListPartsInput
  4398. if input != nil {
  4399. tmp := *input
  4400. inCpy = &tmp
  4401. }
  4402. req, _ := c.ListPartsRequest(inCpy)
  4403. req.SetContext(ctx)
  4404. req.ApplyOptions(opts...)
  4405. return req, nil
  4406. },
  4407. }
  4408. cont := true
  4409. for p.Next() && cont {
  4410. cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
  4411. }
  4412. return p.Err()
  4413. }
  4414. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  4415. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  4416. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  4417. // value will be populated with the request's response once the request completes
  4418. // successfully.
  4419. //
  4420. // Use "Send" method on the returned Request to send the API call to the service.
  4421. // the "output" return value is not valid until after Send returns without error.
  4422. //
  4423. // See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
  4424. // API call, and error handling.
  4425. //
  4426. // This method is useful when you want to inject custom logic or configuration
  4427. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4428. //
  4429. //
  4430. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  4431. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  4432. //
  4433. // err := req.Send()
  4434. // if err == nil { // resp is now filled
  4435. // fmt.Println(resp)
  4436. // }
  4437. //
  4438. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4439. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  4440. op := &request.Operation{
  4441. Name: opPutBucketAccelerateConfiguration,
  4442. HTTPMethod: "PUT",
  4443. HTTPPath: "/{Bucket}?accelerate",
  4444. }
  4445. if input == nil {
  4446. input = &PutBucketAccelerateConfigurationInput{}
  4447. }
  4448. output = &PutBucketAccelerateConfigurationOutput{}
  4449. req = c.newRequest(op, input, output)
  4450. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4451. return
  4452. }
  4453. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  4454. //
  4455. // Sets the accelerate configuration of an existing bucket.
  4456. //
  4457. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4458. // with awserr.Error's Code and Message methods to get detailed information about
  4459. // the error.
  4460. //
  4461. // See the AWS API reference guide for Amazon Simple Storage Service's
  4462. // API operation PutBucketAccelerateConfiguration for usage and error information.
  4463. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4464. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  4465. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4466. return out, req.Send()
  4467. }
  4468. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  4469. // the ability to pass a context and additional request options.
  4470. //
  4471. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  4472. //
  4473. // The context must be non-nil and will be used for request cancellation. If
  4474. // the context is nil a panic will occur. In the future the SDK may create
  4475. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4476. // for more information on using Contexts.
  4477. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  4478. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4479. req.SetContext(ctx)
  4480. req.ApplyOptions(opts...)
  4481. return out, req.Send()
  4482. }
  4483. const opPutBucketAcl = "PutBucketAcl"
  4484. // PutBucketAclRequest generates a "aws/request.Request" representing the
  4485. // client's request for the PutBucketAcl operation. The "output" return
  4486. // value will be populated with the request's response once the request completes
  4487. // successfully.
  4488. //
  4489. // Use "Send" method on the returned Request to send the API call to the service.
  4490. // the "output" return value is not valid until after Send returns without error.
  4491. //
  4492. // See PutBucketAcl for more information on using the PutBucketAcl
  4493. // API call, and error handling.
  4494. //
  4495. // This method is useful when you want to inject custom logic or configuration
  4496. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4497. //
  4498. //
  4499. // // Example sending a request using the PutBucketAclRequest method.
  4500. // req, resp := client.PutBucketAclRequest(params)
  4501. //
  4502. // err := req.Send()
  4503. // if err == nil { // resp is now filled
  4504. // fmt.Println(resp)
  4505. // }
  4506. //
  4507. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4508. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  4509. op := &request.Operation{
  4510. Name: opPutBucketAcl,
  4511. HTTPMethod: "PUT",
  4512. HTTPPath: "/{Bucket}?acl",
  4513. }
  4514. if input == nil {
  4515. input = &PutBucketAclInput{}
  4516. }
  4517. output = &PutBucketAclOutput{}
  4518. req = c.newRequest(op, input, output)
  4519. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4520. return
  4521. }
  4522. // PutBucketAcl API operation for Amazon Simple Storage Service.
  4523. //
  4524. // Sets the permissions on a bucket using access control lists (ACL).
  4525. //
  4526. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4527. // with awserr.Error's Code and Message methods to get detailed information about
  4528. // the error.
  4529. //
  4530. // See the AWS API reference guide for Amazon Simple Storage Service's
  4531. // API operation PutBucketAcl for usage and error information.
  4532. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4533. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  4534. req, out := c.PutBucketAclRequest(input)
  4535. return out, req.Send()
  4536. }
  4537. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  4538. // the ability to pass a context and additional request options.
  4539. //
  4540. // See PutBucketAcl for details on how to use this API operation.
  4541. //
  4542. // The context must be non-nil and will be used for request cancellation. If
  4543. // the context is nil a panic will occur. In the future the SDK may create
  4544. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4545. // for more information on using Contexts.
  4546. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  4547. req, out := c.PutBucketAclRequest(input)
  4548. req.SetContext(ctx)
  4549. req.ApplyOptions(opts...)
  4550. return out, req.Send()
  4551. }
  4552. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  4553. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  4554. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  4555. // value will be populated with the request's response once the request completes
  4556. // successfully.
  4557. //
  4558. // Use "Send" method on the returned Request to send the API call to the service.
  4559. // the "output" return value is not valid until after Send returns without error.
  4560. //
  4561. // See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
  4562. // API call, and error handling.
  4563. //
  4564. // This method is useful when you want to inject custom logic or configuration
  4565. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4566. //
  4567. //
  4568. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  4569. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  4570. //
  4571. // err := req.Send()
  4572. // if err == nil { // resp is now filled
  4573. // fmt.Println(resp)
  4574. // }
  4575. //
  4576. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4577. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  4578. op := &request.Operation{
  4579. Name: opPutBucketAnalyticsConfiguration,
  4580. HTTPMethod: "PUT",
  4581. HTTPPath: "/{Bucket}?analytics",
  4582. }
  4583. if input == nil {
  4584. input = &PutBucketAnalyticsConfigurationInput{}
  4585. }
  4586. output = &PutBucketAnalyticsConfigurationOutput{}
  4587. req = c.newRequest(op, input, output)
  4588. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4589. return
  4590. }
  4591. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  4592. //
  4593. // Sets an analytics configuration for the bucket (specified by the analytics
  4594. // configuration ID).
  4595. //
  4596. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4597. // with awserr.Error's Code and Message methods to get detailed information about
  4598. // the error.
  4599. //
  4600. // See the AWS API reference guide for Amazon Simple Storage Service's
  4601. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  4602. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4603. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  4604. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4605. return out, req.Send()
  4606. }
  4607. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  4608. // the ability to pass a context and additional request options.
  4609. //
  4610. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  4611. //
  4612. // The context must be non-nil and will be used for request cancellation. If
  4613. // the context is nil a panic will occur. In the future the SDK may create
  4614. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4615. // for more information on using Contexts.
  4616. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  4617. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4618. req.SetContext(ctx)
  4619. req.ApplyOptions(opts...)
  4620. return out, req.Send()
  4621. }
  4622. const opPutBucketCors = "PutBucketCors"
  4623. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  4624. // client's request for the PutBucketCors operation. The "output" return
  4625. // value will be populated with the request's response once the request completes
  4626. // successfully.
  4627. //
  4628. // Use "Send" method on the returned Request to send the API call to the service.
  4629. // the "output" return value is not valid until after Send returns without error.
  4630. //
  4631. // See PutBucketCors for more information on using the PutBucketCors
  4632. // API call, and error handling.
  4633. //
  4634. // This method is useful when you want to inject custom logic or configuration
  4635. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4636. //
  4637. //
  4638. // // Example sending a request using the PutBucketCorsRequest method.
  4639. // req, resp := client.PutBucketCorsRequest(params)
  4640. //
  4641. // err := req.Send()
  4642. // if err == nil { // resp is now filled
  4643. // fmt.Println(resp)
  4644. // }
  4645. //
  4646. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4647. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  4648. op := &request.Operation{
  4649. Name: opPutBucketCors,
  4650. HTTPMethod: "PUT",
  4651. HTTPPath: "/{Bucket}?cors",
  4652. }
  4653. if input == nil {
  4654. input = &PutBucketCorsInput{}
  4655. }
  4656. output = &PutBucketCorsOutput{}
  4657. req = c.newRequest(op, input, output)
  4658. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4659. return
  4660. }
  4661. // PutBucketCors API operation for Amazon Simple Storage Service.
  4662. //
  4663. // Sets the CORS configuration for a bucket.
  4664. //
  4665. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4666. // with awserr.Error's Code and Message methods to get detailed information about
  4667. // the error.
  4668. //
  4669. // See the AWS API reference guide for Amazon Simple Storage Service's
  4670. // API operation PutBucketCors for usage and error information.
  4671. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4672. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  4673. req, out := c.PutBucketCorsRequest(input)
  4674. return out, req.Send()
  4675. }
  4676. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  4677. // the ability to pass a context and additional request options.
  4678. //
  4679. // See PutBucketCors for details on how to use this API operation.
  4680. //
  4681. // The context must be non-nil and will be used for request cancellation. If
  4682. // the context is nil a panic will occur. In the future the SDK may create
  4683. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4684. // for more information on using Contexts.
  4685. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  4686. req, out := c.PutBucketCorsRequest(input)
  4687. req.SetContext(ctx)
  4688. req.ApplyOptions(opts...)
  4689. return out, req.Send()
  4690. }
  4691. const opPutBucketEncryption = "PutBucketEncryption"
  4692. // PutBucketEncryptionRequest generates a "aws/request.Request" representing the
  4693. // client's request for the PutBucketEncryption operation. The "output" return
  4694. // value will be populated with the request's response once the request completes
  4695. // successfully.
  4696. //
  4697. // Use "Send" method on the returned Request to send the API call to the service.
  4698. // the "output" return value is not valid until after Send returns without error.
  4699. //
  4700. // See PutBucketEncryption for more information on using the PutBucketEncryption
  4701. // API call, and error handling.
  4702. //
  4703. // This method is useful when you want to inject custom logic or configuration
  4704. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4705. //
  4706. //
  4707. // // Example sending a request using the PutBucketEncryptionRequest method.
  4708. // req, resp := client.PutBucketEncryptionRequest(params)
  4709. //
  4710. // err := req.Send()
  4711. // if err == nil { // resp is now filled
  4712. // fmt.Println(resp)
  4713. // }
  4714. //
  4715. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4716. func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
  4717. op := &request.Operation{
  4718. Name: opPutBucketEncryption,
  4719. HTTPMethod: "PUT",
  4720. HTTPPath: "/{Bucket}?encryption",
  4721. }
  4722. if input == nil {
  4723. input = &PutBucketEncryptionInput{}
  4724. }
  4725. output = &PutBucketEncryptionOutput{}
  4726. req = c.newRequest(op, input, output)
  4727. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4728. return
  4729. }
  4730. // PutBucketEncryption API operation for Amazon Simple Storage Service.
  4731. //
  4732. // Creates a new server-side encryption configuration (or replaces an existing
  4733. // one, if present).
  4734. //
  4735. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4736. // with awserr.Error's Code and Message methods to get detailed information about
  4737. // the error.
  4738. //
  4739. // See the AWS API reference guide for Amazon Simple Storage Service's
  4740. // API operation PutBucketEncryption for usage and error information.
  4741. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4742. func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
  4743. req, out := c.PutBucketEncryptionRequest(input)
  4744. return out, req.Send()
  4745. }
  4746. // PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
  4747. // the ability to pass a context and additional request options.
  4748. //
  4749. // See PutBucketEncryption for details on how to use this API operation.
  4750. //
  4751. // The context must be non-nil and will be used for request cancellation. If
  4752. // the context is nil a panic will occur. In the future the SDK may create
  4753. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4754. // for more information on using Contexts.
  4755. func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
  4756. req, out := c.PutBucketEncryptionRequest(input)
  4757. req.SetContext(ctx)
  4758. req.ApplyOptions(opts...)
  4759. return out, req.Send()
  4760. }
  4761. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  4762. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  4763. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  4764. // value will be populated with the request's response once the request completes
  4765. // successfully.
  4766. //
  4767. // Use "Send" method on the returned Request to send the API call to the service.
  4768. // the "output" return value is not valid until after Send returns without error.
  4769. //
  4770. // See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
  4771. // API call, and error handling.
  4772. //
  4773. // This method is useful when you want to inject custom logic or configuration
  4774. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4775. //
  4776. //
  4777. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  4778. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  4779. //
  4780. // err := req.Send()
  4781. // if err == nil { // resp is now filled
  4782. // fmt.Println(resp)
  4783. // }
  4784. //
  4785. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4786. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  4787. op := &request.Operation{
  4788. Name: opPutBucketInventoryConfiguration,
  4789. HTTPMethod: "PUT",
  4790. HTTPPath: "/{Bucket}?inventory",
  4791. }
  4792. if input == nil {
  4793. input = &PutBucketInventoryConfigurationInput{}
  4794. }
  4795. output = &PutBucketInventoryConfigurationOutput{}
  4796. req = c.newRequest(op, input, output)
  4797. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4798. return
  4799. }
  4800. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  4801. //
  4802. // Adds an inventory configuration (identified by the inventory ID) from the
  4803. // bucket.
  4804. //
  4805. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4806. // with awserr.Error's Code and Message methods to get detailed information about
  4807. // the error.
  4808. //
  4809. // See the AWS API reference guide for Amazon Simple Storage Service's
  4810. // API operation PutBucketInventoryConfiguration for usage and error information.
  4811. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4812. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  4813. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4814. return out, req.Send()
  4815. }
  4816. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  4817. // the ability to pass a context and additional request options.
  4818. //
  4819. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  4820. //
  4821. // The context must be non-nil and will be used for request cancellation. If
  4822. // the context is nil a panic will occur. In the future the SDK may create
  4823. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4824. // for more information on using Contexts.
  4825. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  4826. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4827. req.SetContext(ctx)
  4828. req.ApplyOptions(opts...)
  4829. return out, req.Send()
  4830. }
  4831. const opPutBucketLifecycle = "PutBucketLifecycle"
  4832. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  4833. // client's request for the PutBucketLifecycle operation. The "output" return
  4834. // value will be populated with the request's response once the request completes
  4835. // successfully.
  4836. //
  4837. // Use "Send" method on the returned Request to send the API call to the service.
  4838. // the "output" return value is not valid until after Send returns without error.
  4839. //
  4840. // See PutBucketLifecycle for more information on using the PutBucketLifecycle
  4841. // API call, and error handling.
  4842. //
  4843. // This method is useful when you want to inject custom logic or configuration
  4844. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4845. //
  4846. //
  4847. // // Example sending a request using the PutBucketLifecycleRequest method.
  4848. // req, resp := client.PutBucketLifecycleRequest(params)
  4849. //
  4850. // err := req.Send()
  4851. // if err == nil { // resp is now filled
  4852. // fmt.Println(resp)
  4853. // }
  4854. //
  4855. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4856. //
  4857. // Deprecated: PutBucketLifecycle has been deprecated
  4858. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  4859. if c.Client.Config.Logger != nil {
  4860. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  4861. }
  4862. op := &request.Operation{
  4863. Name: opPutBucketLifecycle,
  4864. HTTPMethod: "PUT",
  4865. HTTPPath: "/{Bucket}?lifecycle",
  4866. }
  4867. if input == nil {
  4868. input = &PutBucketLifecycleInput{}
  4869. }
  4870. output = &PutBucketLifecycleOutput{}
  4871. req = c.newRequest(op, input, output)
  4872. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4873. return
  4874. }
  4875. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  4876. //
  4877. // No longer used, see the PutBucketLifecycleConfiguration operation.
  4878. //
  4879. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4880. // with awserr.Error's Code and Message methods to get detailed information about
  4881. // the error.
  4882. //
  4883. // See the AWS API reference guide for Amazon Simple Storage Service's
  4884. // API operation PutBucketLifecycle for usage and error information.
  4885. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4886. //
  4887. // Deprecated: PutBucketLifecycle has been deprecated
  4888. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  4889. req, out := c.PutBucketLifecycleRequest(input)
  4890. return out, req.Send()
  4891. }
  4892. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  4893. // the ability to pass a context and additional request options.
  4894. //
  4895. // See PutBucketLifecycle for details on how to use this API operation.
  4896. //
  4897. // The context must be non-nil and will be used for request cancellation. If
  4898. // the context is nil a panic will occur. In the future the SDK may create
  4899. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4900. // for more information on using Contexts.
  4901. //
  4902. // Deprecated: PutBucketLifecycleWithContext has been deprecated
  4903. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  4904. req, out := c.PutBucketLifecycleRequest(input)
  4905. req.SetContext(ctx)
  4906. req.ApplyOptions(opts...)
  4907. return out, req.Send()
  4908. }
  4909. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  4910. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  4911. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  4912. // value will be populated with the request's response once the request completes
  4913. // successfully.
  4914. //
  4915. // Use "Send" method on the returned Request to send the API call to the service.
  4916. // the "output" return value is not valid until after Send returns without error.
  4917. //
  4918. // See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
  4919. // API call, and error handling.
  4920. //
  4921. // This method is useful when you want to inject custom logic or configuration
  4922. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4923. //
  4924. //
  4925. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  4926. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  4927. //
  4928. // err := req.Send()
  4929. // if err == nil { // resp is now filled
  4930. // fmt.Println(resp)
  4931. // }
  4932. //
  4933. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4934. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  4935. op := &request.Operation{
  4936. Name: opPutBucketLifecycleConfiguration,
  4937. HTTPMethod: "PUT",
  4938. HTTPPath: "/{Bucket}?lifecycle",
  4939. }
  4940. if input == nil {
  4941. input = &PutBucketLifecycleConfigurationInput{}
  4942. }
  4943. output = &PutBucketLifecycleConfigurationOutput{}
  4944. req = c.newRequest(op, input, output)
  4945. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4946. return
  4947. }
  4948. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  4949. //
  4950. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  4951. // exists, it replaces it.
  4952. //
  4953. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4954. // with awserr.Error's Code and Message methods to get detailed information about
  4955. // the error.
  4956. //
  4957. // See the AWS API reference guide for Amazon Simple Storage Service's
  4958. // API operation PutBucketLifecycleConfiguration for usage and error information.
  4959. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4960. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  4961. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4962. return out, req.Send()
  4963. }
  4964. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  4965. // the ability to pass a context and additional request options.
  4966. //
  4967. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  4968. //
  4969. // The context must be non-nil and will be used for request cancellation. If
  4970. // the context is nil a panic will occur. In the future the SDK may create
  4971. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4972. // for more information on using Contexts.
  4973. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  4974. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4975. req.SetContext(ctx)
  4976. req.ApplyOptions(opts...)
  4977. return out, req.Send()
  4978. }
  4979. const opPutBucketLogging = "PutBucketLogging"
  4980. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  4981. // client's request for the PutBucketLogging operation. The "output" return
  4982. // value will be populated with the request's response once the request completes
  4983. // successfully.
  4984. //
  4985. // Use "Send" method on the returned Request to send the API call to the service.
  4986. // the "output" return value is not valid until after Send returns without error.
  4987. //
  4988. // See PutBucketLogging for more information on using the PutBucketLogging
  4989. // API call, and error handling.
  4990. //
  4991. // This method is useful when you want to inject custom logic or configuration
  4992. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4993. //
  4994. //
  4995. // // Example sending a request using the PutBucketLoggingRequest method.
  4996. // req, resp := client.PutBucketLoggingRequest(params)
  4997. //
  4998. // err := req.Send()
  4999. // if err == nil { // resp is now filled
  5000. // fmt.Println(resp)
  5001. // }
  5002. //
  5003. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  5004. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  5005. op := &request.Operation{
  5006. Name: opPutBucketLogging,
  5007. HTTPMethod: "PUT",
  5008. HTTPPath: "/{Bucket}?logging",
  5009. }
  5010. if input == nil {
  5011. input = &PutBucketLoggingInput{}
  5012. }
  5013. output = &PutBucketLoggingOutput{}
  5014. req = c.newRequest(op, input, output)
  5015. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5016. return
  5017. }
  5018. // PutBucketLogging API operation for Amazon Simple Storage Service.
  5019. //
  5020. // Set the logging parameters for a bucket and to specify permissions for who
  5021. // can view and modify the logging parameters. To set the logging status of
  5022. // a bucket, you must be the bucket owner.
  5023. //
  5024. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5025. // with awserr.Error's Code and Message methods to get detailed information about
  5026. // the error.
  5027. //
  5028. // See the AWS API reference guide for Amazon Simple Storage Service's
  5029. // API operation PutBucketLogging for usage and error information.
  5030. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  5031. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  5032. req, out := c.PutBucketLoggingRequest(input)
  5033. return out, req.Send()
  5034. }
  5035. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  5036. // the ability to pass a context and additional request options.
  5037. //
  5038. // See PutBucketLogging for details on how to use this API operation.
  5039. //
  5040. // The context must be non-nil and will be used for request cancellation. If
  5041. // the context is nil a panic will occur. In the future the SDK may create
  5042. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5043. // for more information on using Contexts.
  5044. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  5045. req, out := c.PutBucketLoggingRequest(input)
  5046. req.SetContext(ctx)
  5047. req.ApplyOptions(opts...)
  5048. return out, req.Send()
  5049. }
  5050. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  5051. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  5052. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  5053. // value will be populated with the request's response once the request completes
  5054. // successfully.
  5055. //
  5056. // Use "Send" method on the returned Request to send the API call to the service.
  5057. // the "output" return value is not valid until after Send returns without error.
  5058. //
  5059. // See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
  5060. // API call, and error handling.
  5061. //
  5062. // This method is useful when you want to inject custom logic or configuration
  5063. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5064. //
  5065. //
  5066. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  5067. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  5068. //
  5069. // err := req.Send()
  5070. // if err == nil { // resp is now filled
  5071. // fmt.Println(resp)
  5072. // }
  5073. //
  5074. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  5075. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  5076. op := &request.Operation{
  5077. Name: opPutBucketMetricsConfiguration,
  5078. HTTPMethod: "PUT",
  5079. HTTPPath: "/{Bucket}?metrics",
  5080. }
  5081. if input == nil {
  5082. input = &PutBucketMetricsConfigurationInput{}
  5083. }
  5084. output = &PutBucketMetricsConfigurationOutput{}
  5085. req = c.newRequest(op, input, output)
  5086. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5087. return
  5088. }
  5089. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  5090. //
  5091. // Sets a metrics configuration (specified by the metrics configuration ID)
  5092. // for the bucket.
  5093. //
  5094. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5095. // with awserr.Error's Code and Message methods to get detailed information about
  5096. // the error.
  5097. //
  5098. // See the AWS API reference guide for Amazon Simple Storage Service's
  5099. // API operation PutBucketMetricsConfiguration for usage and error information.
  5100. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  5101. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  5102. req, out := c.PutBucketMetricsConfigurationRequest(input)
  5103. return out, req.Send()
  5104. }
  5105. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  5106. // the ability to pass a context and additional request options.
  5107. //
  5108. // See PutBucketMetricsConfiguration for details on how to use this API operation.
  5109. //
  5110. // The context must be non-nil and will be used for request cancellation. If
  5111. // the context is nil a panic will occur. In the future the SDK may create
  5112. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5113. // for more information on using Contexts.
  5114. func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  5115. req, out := c.PutBucketMetricsConfigurationRequest(input)
  5116. req.SetContext(ctx)
  5117. req.ApplyOptions(opts...)
  5118. return out, req.Send()
  5119. }
  5120. const opPutBucketNotification = "PutBucketNotification"
  5121. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  5122. // client's request for the PutBucketNotification operation. The "output" return
  5123. // value will be populated with the request's response once the request completes
  5124. // successfully.
  5125. //
  5126. // Use "Send" method on the returned Request to send the API call to the service.
  5127. // the "output" return value is not valid until after Send returns without error.
  5128. //
  5129. // See PutBucketNotification for more information on using the PutBucketNotification
  5130. // API call, and error handling.
  5131. //
  5132. // This method is useful when you want to inject custom logic or configuration
  5133. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5134. //
  5135. //
  5136. // // Example sending a request using the PutBucketNotificationRequest method.
  5137. // req, resp := client.PutBucketNotificationRequest(params)
  5138. //
  5139. // err := req.Send()
  5140. // if err == nil { // resp is now filled
  5141. // fmt.Println(resp)
  5142. // }
  5143. //
  5144. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  5145. //
  5146. // Deprecated: PutBucketNotification has been deprecated
  5147. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  5148. if c.Client.Config.Logger != nil {
  5149. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  5150. }
  5151. op := &request.Operation{
  5152. Name: opPutBucketNotification,
  5153. HTTPMethod: "PUT",
  5154. HTTPPath: "/{Bucket}?notification",
  5155. }
  5156. if input == nil {
  5157. input = &PutBucketNotificationInput{}
  5158. }
  5159. output = &PutBucketNotificationOutput{}
  5160. req = c.newRequest(op, input, output)
  5161. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5162. return
  5163. }
  5164. // PutBucketNotification API operation for Amazon Simple Storage Service.
  5165. //
  5166. // No longer used, see the PutBucketNotificationConfiguration operation.
  5167. //
  5168. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5169. // with awserr.Error's Code and Message methods to get detailed information about
  5170. // the error.
  5171. //
  5172. // See the AWS API reference guide for Amazon Simple Storage Service's
  5173. // API operation PutBucketNotification for usage and error information.
  5174. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  5175. //
  5176. // Deprecated: PutBucketNotification has been deprecated
  5177. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  5178. req, out := c.PutBucketNotificationRequest(input)
  5179. return out, req.Send()
  5180. }
  5181. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  5182. // the ability to pass a context and additional request options.
  5183. //
  5184. // See PutBucketNotification for details on how to use this API operation.
  5185. //
  5186. // The context must be non-nil and will be used for request cancellation. If
  5187. // the context is nil a panic will occur. In the future the SDK may create
  5188. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5189. // for more information on using Contexts.
  5190. //
  5191. // Deprecated: PutBucketNotificationWithContext has been deprecated
  5192. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  5193. req, out := c.PutBucketNotificationRequest(input)
  5194. req.SetContext(ctx)
  5195. req.ApplyOptions(opts...)
  5196. return out, req.Send()
  5197. }
  5198. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  5199. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  5200. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  5201. // value will be populated with the request's response once the request completes
  5202. // successfully.
  5203. //
  5204. // Use "Send" method on the returned Request to send the API call to the service.
  5205. // the "output" return value is not valid until after Send returns without error.
  5206. //
  5207. // See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
  5208. // API call, and error handling.
  5209. //
  5210. // This method is useful when you want to inject custom logic or configuration
  5211. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5212. //
  5213. //
  5214. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  5215. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  5216. //
  5217. // err := req.Send()
  5218. // if err == nil { // resp is now filled
  5219. // fmt.Println(resp)
  5220. // }
  5221. //
  5222. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  5223. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  5224. op := &request.Operation{
  5225. Name: opPutBucketNotificationConfiguration,
  5226. HTTPMethod: "PUT",
  5227. HTTPPath: "/{Bucket}?notification",
  5228. }
  5229. if input == nil {
  5230. input = &PutBucketNotificationConfigurationInput{}
  5231. }
  5232. output = &PutBucketNotificationConfigurationOutput{}
  5233. req = c.newRequest(op, input, output)
  5234. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5235. return
  5236. }
  5237. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  5238. //
  5239. // Enables notifications of specified events for a bucket.
  5240. //
  5241. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5242. // with awserr.Error's Code and Message methods to get detailed information about
  5243. // the error.
  5244. //
  5245. // See the AWS API reference guide for Amazon Simple Storage Service's
  5246. // API operation PutBucketNotificationConfiguration for usage and error information.
  5247. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  5248. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  5249. req, out := c.PutBucketNotificationConfigurationRequest(input)
  5250. return out, req.Send()
  5251. }
  5252. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  5253. // the ability to pass a context and additional request options.
  5254. //
  5255. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  5256. //
  5257. // The context must be non-nil and will be used for request cancellation. If
  5258. // the context is nil a panic will occur. In the future the SDK may create
  5259. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5260. // for more information on using Contexts.
  5261. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  5262. req, out := c.PutBucketNotificationConfigurationRequest(input)
  5263. req.SetContext(ctx)
  5264. req.ApplyOptions(opts...)
  5265. return out, req.Send()
  5266. }
  5267. const opPutBucketPolicy = "PutBucketPolicy"
  5268. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  5269. // client's request for the PutBucketPolicy operation. The "output" return
  5270. // value will be populated with the request's response once the request completes
  5271. // successfully.
  5272. //
  5273. // Use "Send" method on the returned Request to send the API call to the service.
  5274. // the "output" return value is not valid until after Send returns without error.
  5275. //
  5276. // See PutBucketPolicy for more information on using the PutBucketPolicy
  5277. // API call, and error handling.
  5278. //
  5279. // This method is useful when you want to inject custom logic or configuration
  5280. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5281. //
  5282. //
  5283. // // Example sending a request using the PutBucketPolicyRequest method.
  5284. // req, resp := client.PutBucketPolicyRequest(params)
  5285. //
  5286. // err := req.Send()
  5287. // if err == nil { // resp is now filled
  5288. // fmt.Println(resp)
  5289. // }
  5290. //
  5291. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  5292. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  5293. op := &request.Operation{
  5294. Name: opPutBucketPolicy,
  5295. HTTPMethod: "PUT",
  5296. HTTPPath: "/{Bucket}?policy",
  5297. }
  5298. if input == nil {
  5299. input = &PutBucketPolicyInput{}
  5300. }
  5301. output = &PutBucketPolicyOutput{}
  5302. req = c.newRequest(op, input, output)
  5303. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5304. return
  5305. }
  5306. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  5307. //
  5308. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  5309. // in this request completely replaces it.
  5310. //
  5311. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5312. // with awserr.Error's Code and Message methods to get detailed information about
  5313. // the error.
  5314. //
  5315. // See the AWS API reference guide for Amazon Simple Storage Service's
  5316. // API operation PutBucketPolicy for usage and error information.
  5317. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  5318. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  5319. req, out := c.PutBucketPolicyRequest(input)
  5320. return out, req.Send()
  5321. }
  5322. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  5323. // the ability to pass a context and additional request options.
  5324. //
  5325. // See PutBucketPolicy for details on how to use this API operation.
  5326. //
  5327. // The context must be non-nil and will be used for request cancellation. If
  5328. // the context is nil a panic will occur. In the future the SDK may create
  5329. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5330. // for more information on using Contexts.
  5331. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  5332. req, out := c.PutBucketPolicyRequest(input)
  5333. req.SetContext(ctx)
  5334. req.ApplyOptions(opts...)
  5335. return out, req.Send()
  5336. }
  5337. const opPutBucketReplication = "PutBucketReplication"
  5338. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  5339. // client's request for the PutBucketReplication operation. The "output" return
  5340. // value will be populated with the request's response once the request completes
  5341. // successfully.
  5342. //
  5343. // Use "Send" method on the returned Request to send the API call to the service.
  5344. // the "output" return value is not valid until after Send returns without error.
  5345. //
  5346. // See PutBucketReplication for more information on using the PutBucketReplication
  5347. // API call, and error handling.
  5348. //
  5349. // This method is useful when you want to inject custom logic or configuration
  5350. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5351. //
  5352. //
  5353. // // Example sending a request using the PutBucketReplicationRequest method.
  5354. // req, resp := client.PutBucketReplicationRequest(params)
  5355. //
  5356. // err := req.Send()
  5357. // if err == nil { // resp is now filled
  5358. // fmt.Println(resp)
  5359. // }
  5360. //
  5361. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  5362. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  5363. op := &request.Operation{
  5364. Name: opPutBucketReplication,
  5365. HTTPMethod: "PUT",
  5366. HTTPPath: "/{Bucket}?replication",
  5367. }
  5368. if input == nil {
  5369. input = &PutBucketReplicationInput{}
  5370. }
  5371. output = &PutBucketReplicationOutput{}
  5372. req = c.newRequest(op, input, output)
  5373. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5374. return
  5375. }
  5376. // PutBucketReplication API operation for Amazon Simple Storage Service.
  5377. //
  5378. // Creates a replication configuration or replaces an existing one. For more
  5379. // information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  5380. // in the Amazon S3 Developer Guide.
  5381. //
  5382. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5383. // with awserr.Error's Code and Message methods to get detailed information about
  5384. // the error.
  5385. //
  5386. // See the AWS API reference guide for Amazon Simple Storage Service's
  5387. // API operation PutBucketReplication for usage and error information.
  5388. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  5389. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  5390. req, out := c.PutBucketReplicationRequest(input)
  5391. return out, req.Send()
  5392. }
  5393. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  5394. // the ability to pass a context and additional request options.
  5395. //
  5396. // See PutBucketReplication for details on how to use this API operation.
  5397. //
  5398. // The context must be non-nil and will be used for request cancellation. If
  5399. // the context is nil a panic will occur. In the future the SDK may create
  5400. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5401. // for more information on using Contexts.
  5402. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  5403. req, out := c.PutBucketReplicationRequest(input)
  5404. req.SetContext(ctx)
  5405. req.ApplyOptions(opts...)
  5406. return out, req.Send()
  5407. }
  5408. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  5409. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  5410. // client's request for the PutBucketRequestPayment operation. The "output" return
  5411. // value will be populated with the request's response once the request completes
  5412. // successfully.
  5413. //
  5414. // Use "Send" method on the returned Request to send the API call to the service.
  5415. // the "output" return value is not valid until after Send returns without error.
  5416. //
  5417. // See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
  5418. // API call, and error handling.
  5419. //
  5420. // This method is useful when you want to inject custom logic or configuration
  5421. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5422. //
  5423. //
  5424. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  5425. // req, resp := client.PutBucketRequestPaymentRequest(params)
  5426. //
  5427. // err := req.Send()
  5428. // if err == nil { // resp is now filled
  5429. // fmt.Println(resp)
  5430. // }
  5431. //
  5432. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5433. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  5434. op := &request.Operation{
  5435. Name: opPutBucketRequestPayment,
  5436. HTTPMethod: "PUT",
  5437. HTTPPath: "/{Bucket}?requestPayment",
  5438. }
  5439. if input == nil {
  5440. input = &PutBucketRequestPaymentInput{}
  5441. }
  5442. output = &PutBucketRequestPaymentOutput{}
  5443. req = c.newRequest(op, input, output)
  5444. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5445. return
  5446. }
  5447. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  5448. //
  5449. // Sets the request payment configuration for a bucket. By default, the bucket
  5450. // owner pays for downloads from the bucket. This configuration parameter enables
  5451. // the bucket owner (only) to specify that the person requesting the download
  5452. // will be charged for the download. Documentation on requester pays buckets
  5453. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  5454. //
  5455. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5456. // with awserr.Error's Code and Message methods to get detailed information about
  5457. // the error.
  5458. //
  5459. // See the AWS API reference guide for Amazon Simple Storage Service's
  5460. // API operation PutBucketRequestPayment for usage and error information.
  5461. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5462. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  5463. req, out := c.PutBucketRequestPaymentRequest(input)
  5464. return out, req.Send()
  5465. }
  5466. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  5467. // the ability to pass a context and additional request options.
  5468. //
  5469. // See PutBucketRequestPayment for details on how to use this API operation.
  5470. //
  5471. // The context must be non-nil and will be used for request cancellation. If
  5472. // the context is nil a panic will occur. In the future the SDK may create
  5473. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5474. // for more information on using Contexts.
  5475. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  5476. req, out := c.PutBucketRequestPaymentRequest(input)
  5477. req.SetContext(ctx)
  5478. req.ApplyOptions(opts...)
  5479. return out, req.Send()
  5480. }
  5481. const opPutBucketTagging = "PutBucketTagging"
  5482. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  5483. // client's request for the PutBucketTagging operation. The "output" return
  5484. // value will be populated with the request's response once the request completes
  5485. // successfully.
  5486. //
  5487. // Use "Send" method on the returned Request to send the API call to the service.
  5488. // the "output" return value is not valid until after Send returns without error.
  5489. //
  5490. // See PutBucketTagging for more information on using the PutBucketTagging
  5491. // API call, and error handling.
  5492. //
  5493. // This method is useful when you want to inject custom logic or configuration
  5494. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5495. //
  5496. //
  5497. // // Example sending a request using the PutBucketTaggingRequest method.
  5498. // req, resp := client.PutBucketTaggingRequest(params)
  5499. //
  5500. // err := req.Send()
  5501. // if err == nil { // resp is now filled
  5502. // fmt.Println(resp)
  5503. // }
  5504. //
  5505. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5506. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  5507. op := &request.Operation{
  5508. Name: opPutBucketTagging,
  5509. HTTPMethod: "PUT",
  5510. HTTPPath: "/{Bucket}?tagging",
  5511. }
  5512. if input == nil {
  5513. input = &PutBucketTaggingInput{}
  5514. }
  5515. output = &PutBucketTaggingOutput{}
  5516. req = c.newRequest(op, input, output)
  5517. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5518. return
  5519. }
  5520. // PutBucketTagging API operation for Amazon Simple Storage Service.
  5521. //
  5522. // Sets the tags for a bucket.
  5523. //
  5524. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5525. // with awserr.Error's Code and Message methods to get detailed information about
  5526. // the error.
  5527. //
  5528. // See the AWS API reference guide for Amazon Simple Storage Service's
  5529. // API operation PutBucketTagging for usage and error information.
  5530. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5531. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  5532. req, out := c.PutBucketTaggingRequest(input)
  5533. return out, req.Send()
  5534. }
  5535. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  5536. // the ability to pass a context and additional request options.
  5537. //
  5538. // See PutBucketTagging for details on how to use this API operation.
  5539. //
  5540. // The context must be non-nil and will be used for request cancellation. If
  5541. // the context is nil a panic will occur. In the future the SDK may create
  5542. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5543. // for more information on using Contexts.
  5544. func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  5545. req, out := c.PutBucketTaggingRequest(input)
  5546. req.SetContext(ctx)
  5547. req.ApplyOptions(opts...)
  5548. return out, req.Send()
  5549. }
  5550. const opPutBucketVersioning = "PutBucketVersioning"
  5551. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  5552. // client's request for the PutBucketVersioning operation. The "output" return
  5553. // value will be populated with the request's response once the request completes
  5554. // successfully.
  5555. //
  5556. // Use "Send" method on the returned Request to send the API call to the service.
  5557. // the "output" return value is not valid until after Send returns without error.
  5558. //
  5559. // See PutBucketVersioning for more information on using the PutBucketVersioning
  5560. // API call, and error handling.
  5561. //
  5562. // This method is useful when you want to inject custom logic or configuration
  5563. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5564. //
  5565. //
  5566. // // Example sending a request using the PutBucketVersioningRequest method.
  5567. // req, resp := client.PutBucketVersioningRequest(params)
  5568. //
  5569. // err := req.Send()
  5570. // if err == nil { // resp is now filled
  5571. // fmt.Println(resp)
  5572. // }
  5573. //
  5574. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5575. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  5576. op := &request.Operation{
  5577. Name: opPutBucketVersioning,
  5578. HTTPMethod: "PUT",
  5579. HTTPPath: "/{Bucket}?versioning",
  5580. }
  5581. if input == nil {
  5582. input = &PutBucketVersioningInput{}
  5583. }
  5584. output = &PutBucketVersioningOutput{}
  5585. req = c.newRequest(op, input, output)
  5586. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5587. return
  5588. }
  5589. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  5590. //
  5591. // Sets the versioning state of an existing bucket. To set the versioning state,
  5592. // you must be the bucket owner.
  5593. //
  5594. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5595. // with awserr.Error's Code and Message methods to get detailed information about
  5596. // the error.
  5597. //
  5598. // See the AWS API reference guide for Amazon Simple Storage Service's
  5599. // API operation PutBucketVersioning for usage and error information.
  5600. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5601. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  5602. req, out := c.PutBucketVersioningRequest(input)
  5603. return out, req.Send()
  5604. }
  5605. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  5606. // the ability to pass a context and additional request options.
  5607. //
  5608. // See PutBucketVersioning for details on how to use this API operation.
  5609. //
  5610. // The context must be non-nil and will be used for request cancellation. If
  5611. // the context is nil a panic will occur. In the future the SDK may create
  5612. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5613. // for more information on using Contexts.
  5614. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  5615. req, out := c.PutBucketVersioningRequest(input)
  5616. req.SetContext(ctx)
  5617. req.ApplyOptions(opts...)
  5618. return out, req.Send()
  5619. }
  5620. const opPutBucketWebsite = "PutBucketWebsite"
  5621. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  5622. // client's request for the PutBucketWebsite operation. The "output" return
  5623. // value will be populated with the request's response once the request completes
  5624. // successfully.
  5625. //
  5626. // Use "Send" method on the returned Request to send the API call to the service.
  5627. // the "output" return value is not valid until after Send returns without error.
  5628. //
  5629. // See PutBucketWebsite for more information on using the PutBucketWebsite
  5630. // API call, and error handling.
  5631. //
  5632. // This method is useful when you want to inject custom logic or configuration
  5633. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5634. //
  5635. //
  5636. // // Example sending a request using the PutBucketWebsiteRequest method.
  5637. // req, resp := client.PutBucketWebsiteRequest(params)
  5638. //
  5639. // err := req.Send()
  5640. // if err == nil { // resp is now filled
  5641. // fmt.Println(resp)
  5642. // }
  5643. //
  5644. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5645. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  5646. op := &request.Operation{
  5647. Name: opPutBucketWebsite,
  5648. HTTPMethod: "PUT",
  5649. HTTPPath: "/{Bucket}?website",
  5650. }
  5651. if input == nil {
  5652. input = &PutBucketWebsiteInput{}
  5653. }
  5654. output = &PutBucketWebsiteOutput{}
  5655. req = c.newRequest(op, input, output)
  5656. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5657. return
  5658. }
  5659. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  5660. //
  5661. // Set the website configuration for a bucket.
  5662. //
  5663. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5664. // with awserr.Error's Code and Message methods to get detailed information about
  5665. // the error.
  5666. //
  5667. // See the AWS API reference guide for Amazon Simple Storage Service's
  5668. // API operation PutBucketWebsite for usage and error information.
  5669. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5670. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  5671. req, out := c.PutBucketWebsiteRequest(input)
  5672. return out, req.Send()
  5673. }
  5674. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  5675. // the ability to pass a context and additional request options.
  5676. //
  5677. // See PutBucketWebsite for details on how to use this API operation.
  5678. //
  5679. // The context must be non-nil and will be used for request cancellation. If
  5680. // the context is nil a panic will occur. In the future the SDK may create
  5681. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5682. // for more information on using Contexts.
  5683. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  5684. req, out := c.PutBucketWebsiteRequest(input)
  5685. req.SetContext(ctx)
  5686. req.ApplyOptions(opts...)
  5687. return out, req.Send()
  5688. }
  5689. const opPutObject = "PutObject"
  5690. // PutObjectRequest generates a "aws/request.Request" representing the
  5691. // client's request for the PutObject operation. The "output" return
  5692. // value will be populated with the request's response once the request completes
  5693. // successfully.
  5694. //
  5695. // Use "Send" method on the returned Request to send the API call to the service.
  5696. // the "output" return value is not valid until after Send returns without error.
  5697. //
  5698. // See PutObject for more information on using the PutObject
  5699. // API call, and error handling.
  5700. //
  5701. // This method is useful when you want to inject custom logic or configuration
  5702. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5703. //
  5704. //
  5705. // // Example sending a request using the PutObjectRequest method.
  5706. // req, resp := client.PutObjectRequest(params)
  5707. //
  5708. // err := req.Send()
  5709. // if err == nil { // resp is now filled
  5710. // fmt.Println(resp)
  5711. // }
  5712. //
  5713. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5714. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  5715. op := &request.Operation{
  5716. Name: opPutObject,
  5717. HTTPMethod: "PUT",
  5718. HTTPPath: "/{Bucket}/{Key+}",
  5719. }
  5720. if input == nil {
  5721. input = &PutObjectInput{}
  5722. }
  5723. output = &PutObjectOutput{}
  5724. req = c.newRequest(op, input, output)
  5725. return
  5726. }
  5727. // PutObject API operation for Amazon Simple Storage Service.
  5728. //
  5729. // Adds an object to a bucket.
  5730. //
  5731. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5732. // with awserr.Error's Code and Message methods to get detailed information about
  5733. // the error.
  5734. //
  5735. // See the AWS API reference guide for Amazon Simple Storage Service's
  5736. // API operation PutObject for usage and error information.
  5737. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5738. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  5739. req, out := c.PutObjectRequest(input)
  5740. return out, req.Send()
  5741. }
  5742. // PutObjectWithContext is the same as PutObject with the addition of
  5743. // the ability to pass a context and additional request options.
  5744. //
  5745. // See PutObject for details on how to use this API operation.
  5746. //
  5747. // The context must be non-nil and will be used for request cancellation. If
  5748. // the context is nil a panic will occur. In the future the SDK may create
  5749. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5750. // for more information on using Contexts.
  5751. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  5752. req, out := c.PutObjectRequest(input)
  5753. req.SetContext(ctx)
  5754. req.ApplyOptions(opts...)
  5755. return out, req.Send()
  5756. }
  5757. const opPutObjectAcl = "PutObjectAcl"
  5758. // PutObjectAclRequest generates a "aws/request.Request" representing the
  5759. // client's request for the PutObjectAcl operation. The "output" return
  5760. // value will be populated with the request's response once the request completes
  5761. // successfully.
  5762. //
  5763. // Use "Send" method on the returned Request to send the API call to the service.
  5764. // the "output" return value is not valid until after Send returns without error.
  5765. //
  5766. // See PutObjectAcl for more information on using the PutObjectAcl
  5767. // API call, and error handling.
  5768. //
  5769. // This method is useful when you want to inject custom logic or configuration
  5770. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5771. //
  5772. //
  5773. // // Example sending a request using the PutObjectAclRequest method.
  5774. // req, resp := client.PutObjectAclRequest(params)
  5775. //
  5776. // err := req.Send()
  5777. // if err == nil { // resp is now filled
  5778. // fmt.Println(resp)
  5779. // }
  5780. //
  5781. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5782. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  5783. op := &request.Operation{
  5784. Name: opPutObjectAcl,
  5785. HTTPMethod: "PUT",
  5786. HTTPPath: "/{Bucket}/{Key+}?acl",
  5787. }
  5788. if input == nil {
  5789. input = &PutObjectAclInput{}
  5790. }
  5791. output = &PutObjectAclOutput{}
  5792. req = c.newRequest(op, input, output)
  5793. return
  5794. }
  5795. // PutObjectAcl API operation for Amazon Simple Storage Service.
  5796. //
  5797. // uses the acl subresource to set the access control list (ACL) permissions
  5798. // for an object that already exists in a bucket
  5799. //
  5800. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5801. // with awserr.Error's Code and Message methods to get detailed information about
  5802. // the error.
  5803. //
  5804. // See the AWS API reference guide for Amazon Simple Storage Service's
  5805. // API operation PutObjectAcl for usage and error information.
  5806. //
  5807. // Returned Error Codes:
  5808. // * ErrCodeNoSuchKey "NoSuchKey"
  5809. // The specified key does not exist.
  5810. //
  5811. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5812. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  5813. req, out := c.PutObjectAclRequest(input)
  5814. return out, req.Send()
  5815. }
  5816. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  5817. // the ability to pass a context and additional request options.
  5818. //
  5819. // See PutObjectAcl for details on how to use this API operation.
  5820. //
  5821. // The context must be non-nil and will be used for request cancellation. If
  5822. // the context is nil a panic will occur. In the future the SDK may create
  5823. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5824. // for more information on using Contexts.
  5825. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  5826. req, out := c.PutObjectAclRequest(input)
  5827. req.SetContext(ctx)
  5828. req.ApplyOptions(opts...)
  5829. return out, req.Send()
  5830. }
  5831. const opPutObjectLegalHold = "PutObjectLegalHold"
  5832. // PutObjectLegalHoldRequest generates a "aws/request.Request" representing the
  5833. // client's request for the PutObjectLegalHold operation. The "output" return
  5834. // value will be populated with the request's response once the request completes
  5835. // successfully.
  5836. //
  5837. // Use "Send" method on the returned Request to send the API call to the service.
  5838. // the "output" return value is not valid until after Send returns without error.
  5839. //
  5840. // See PutObjectLegalHold for more information on using the PutObjectLegalHold
  5841. // API call, and error handling.
  5842. //
  5843. // This method is useful when you want to inject custom logic or configuration
  5844. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5845. //
  5846. //
  5847. // // Example sending a request using the PutObjectLegalHoldRequest method.
  5848. // req, resp := client.PutObjectLegalHoldRequest(params)
  5849. //
  5850. // err := req.Send()
  5851. // if err == nil { // resp is now filled
  5852. // fmt.Println(resp)
  5853. // }
  5854. //
  5855. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
  5856. func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput) {
  5857. op := &request.Operation{
  5858. Name: opPutObjectLegalHold,
  5859. HTTPMethod: "PUT",
  5860. HTTPPath: "/{Bucket}/{Key+}?legal-hold",
  5861. }
  5862. if input == nil {
  5863. input = &PutObjectLegalHoldInput{}
  5864. }
  5865. output = &PutObjectLegalHoldOutput{}
  5866. req = c.newRequest(op, input, output)
  5867. return
  5868. }
  5869. // PutObjectLegalHold API operation for Amazon Simple Storage Service.
  5870. //
  5871. // Applies a Legal Hold configuration to the specified object.
  5872. //
  5873. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5874. // with awserr.Error's Code and Message methods to get detailed information about
  5875. // the error.
  5876. //
  5877. // See the AWS API reference guide for Amazon Simple Storage Service's
  5878. // API operation PutObjectLegalHold for usage and error information.
  5879. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
  5880. func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error) {
  5881. req, out := c.PutObjectLegalHoldRequest(input)
  5882. return out, req.Send()
  5883. }
  5884. // PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of
  5885. // the ability to pass a context and additional request options.
  5886. //
  5887. // See PutObjectLegalHold for details on how to use this API operation.
  5888. //
  5889. // The context must be non-nil and will be used for request cancellation. If
  5890. // the context is nil a panic will occur. In the future the SDK may create
  5891. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5892. // for more information on using Contexts.
  5893. func (c *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error) {
  5894. req, out := c.PutObjectLegalHoldRequest(input)
  5895. req.SetContext(ctx)
  5896. req.ApplyOptions(opts...)
  5897. return out, req.Send()
  5898. }
  5899. const opPutObjectLockConfiguration = "PutObjectLockConfiguration"
  5900. // PutObjectLockConfigurationRequest generates a "aws/request.Request" representing the
  5901. // client's request for the PutObjectLockConfiguration operation. The "output" return
  5902. // value will be populated with the request's response once the request completes
  5903. // successfully.
  5904. //
  5905. // Use "Send" method on the returned Request to send the API call to the service.
  5906. // the "output" return value is not valid until after Send returns without error.
  5907. //
  5908. // See PutObjectLockConfiguration for more information on using the PutObjectLockConfiguration
  5909. // API call, and error handling.
  5910. //
  5911. // This method is useful when you want to inject custom logic or configuration
  5912. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5913. //
  5914. //
  5915. // // Example sending a request using the PutObjectLockConfigurationRequest method.
  5916. // req, resp := client.PutObjectLockConfigurationRequest(params)
  5917. //
  5918. // err := req.Send()
  5919. // if err == nil { // resp is now filled
  5920. // fmt.Println(resp)
  5921. // }
  5922. //
  5923. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
  5924. func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput) {
  5925. op := &request.Operation{
  5926. Name: opPutObjectLockConfiguration,
  5927. HTTPMethod: "PUT",
  5928. HTTPPath: "/{Bucket}?object-lock",
  5929. }
  5930. if input == nil {
  5931. input = &PutObjectLockConfigurationInput{}
  5932. }
  5933. output = &PutObjectLockConfigurationOutput{}
  5934. req = c.newRequest(op, input, output)
  5935. return
  5936. }
  5937. // PutObjectLockConfiguration API operation for Amazon Simple Storage Service.
  5938. //
  5939. // Places an Object Lock configuration on the specified bucket. The rule specified
  5940. // in the Object Lock configuration will be applied by default to every new
  5941. // object placed in the specified bucket.
  5942. //
  5943. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5944. // with awserr.Error's Code and Message methods to get detailed information about
  5945. // the error.
  5946. //
  5947. // See the AWS API reference guide for Amazon Simple Storage Service's
  5948. // API operation PutObjectLockConfiguration for usage and error information.
  5949. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
  5950. func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error) {
  5951. req, out := c.PutObjectLockConfigurationRequest(input)
  5952. return out, req.Send()
  5953. }
  5954. // PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of
  5955. // the ability to pass a context and additional request options.
  5956. //
  5957. // See PutObjectLockConfiguration for details on how to use this API operation.
  5958. //
  5959. // The context must be non-nil and will be used for request cancellation. If
  5960. // the context is nil a panic will occur. In the future the SDK may create
  5961. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5962. // for more information on using Contexts.
  5963. func (c *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error) {
  5964. req, out := c.PutObjectLockConfigurationRequest(input)
  5965. req.SetContext(ctx)
  5966. req.ApplyOptions(opts...)
  5967. return out, req.Send()
  5968. }
  5969. const opPutObjectRetention = "PutObjectRetention"
  5970. // PutObjectRetentionRequest generates a "aws/request.Request" representing the
  5971. // client's request for the PutObjectRetention operation. The "output" return
  5972. // value will be populated with the request's response once the request completes
  5973. // successfully.
  5974. //
  5975. // Use "Send" method on the returned Request to send the API call to the service.
  5976. // the "output" return value is not valid until after Send returns without error.
  5977. //
  5978. // See PutObjectRetention for more information on using the PutObjectRetention
  5979. // API call, and error handling.
  5980. //
  5981. // This method is useful when you want to inject custom logic or configuration
  5982. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5983. //
  5984. //
  5985. // // Example sending a request using the PutObjectRetentionRequest method.
  5986. // req, resp := client.PutObjectRetentionRequest(params)
  5987. //
  5988. // err := req.Send()
  5989. // if err == nil { // resp is now filled
  5990. // fmt.Println(resp)
  5991. // }
  5992. //
  5993. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
  5994. func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput) {
  5995. op := &request.Operation{
  5996. Name: opPutObjectRetention,
  5997. HTTPMethod: "PUT",
  5998. HTTPPath: "/{Bucket}/{Key+}?retention",
  5999. }
  6000. if input == nil {
  6001. input = &PutObjectRetentionInput{}
  6002. }
  6003. output = &PutObjectRetentionOutput{}
  6004. req = c.newRequest(op, input, output)
  6005. return
  6006. }
  6007. // PutObjectRetention API operation for Amazon Simple Storage Service.
  6008. //
  6009. // Places an Object Retention configuration on an object.
  6010. //
  6011. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6012. // with awserr.Error's Code and Message methods to get detailed information about
  6013. // the error.
  6014. //
  6015. // See the AWS API reference guide for Amazon Simple Storage Service's
  6016. // API operation PutObjectRetention for usage and error information.
  6017. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
  6018. func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error) {
  6019. req, out := c.PutObjectRetentionRequest(input)
  6020. return out, req.Send()
  6021. }
  6022. // PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of
  6023. // the ability to pass a context and additional request options.
  6024. //
  6025. // See PutObjectRetention for details on how to use this API operation.
  6026. //
  6027. // The context must be non-nil and will be used for request cancellation. If
  6028. // the context is nil a panic will occur. In the future the SDK may create
  6029. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6030. // for more information on using Contexts.
  6031. func (c *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error) {
  6032. req, out := c.PutObjectRetentionRequest(input)
  6033. req.SetContext(ctx)
  6034. req.ApplyOptions(opts...)
  6035. return out, req.Send()
  6036. }
  6037. const opPutObjectTagging = "PutObjectTagging"
  6038. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  6039. // client's request for the PutObjectTagging operation. The "output" return
  6040. // value will be populated with the request's response once the request completes
  6041. // successfully.
  6042. //
  6043. // Use "Send" method on the returned Request to send the API call to the service.
  6044. // the "output" return value is not valid until after Send returns without error.
  6045. //
  6046. // See PutObjectTagging for more information on using the PutObjectTagging
  6047. // API call, and error handling.
  6048. //
  6049. // This method is useful when you want to inject custom logic or configuration
  6050. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6051. //
  6052. //
  6053. // // Example sending a request using the PutObjectTaggingRequest method.
  6054. // req, resp := client.PutObjectTaggingRequest(params)
  6055. //
  6056. // err := req.Send()
  6057. // if err == nil { // resp is now filled
  6058. // fmt.Println(resp)
  6059. // }
  6060. //
  6061. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  6062. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  6063. op := &request.Operation{
  6064. Name: opPutObjectTagging,
  6065. HTTPMethod: "PUT",
  6066. HTTPPath: "/{Bucket}/{Key+}?tagging",
  6067. }
  6068. if input == nil {
  6069. input = &PutObjectTaggingInput{}
  6070. }
  6071. output = &PutObjectTaggingOutput{}
  6072. req = c.newRequest(op, input, output)
  6073. return
  6074. }
  6075. // PutObjectTagging API operation for Amazon Simple Storage Service.
  6076. //
  6077. // Sets the supplied tag-set to an object that already exists in a bucket
  6078. //
  6079. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6080. // with awserr.Error's Code and Message methods to get detailed information about
  6081. // the error.
  6082. //
  6083. // See the AWS API reference guide for Amazon Simple Storage Service's
  6084. // API operation PutObjectTagging for usage and error information.
  6085. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  6086. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  6087. req, out := c.PutObjectTaggingRequest(input)
  6088. return out, req.Send()
  6089. }
  6090. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  6091. // the ability to pass a context and additional request options.
  6092. //
  6093. // See PutObjectTagging for details on how to use this API operation.
  6094. //
  6095. // The context must be non-nil and will be used for request cancellation. If
  6096. // the context is nil a panic will occur. In the future the SDK may create
  6097. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6098. // for more information on using Contexts.
  6099. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  6100. req, out := c.PutObjectTaggingRequest(input)
  6101. req.SetContext(ctx)
  6102. req.ApplyOptions(opts...)
  6103. return out, req.Send()
  6104. }
  6105. const opPutPublicAccessBlock = "PutPublicAccessBlock"
  6106. // PutPublicAccessBlockRequest generates a "aws/request.Request" representing the
  6107. // client's request for the PutPublicAccessBlock operation. The "output" return
  6108. // value will be populated with the request's response once the request completes
  6109. // successfully.
  6110. //
  6111. // Use "Send" method on the returned Request to send the API call to the service.
  6112. // the "output" return value is not valid until after Send returns without error.
  6113. //
  6114. // See PutPublicAccessBlock for more information on using the PutPublicAccessBlock
  6115. // API call, and error handling.
  6116. //
  6117. // This method is useful when you want to inject custom logic or configuration
  6118. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6119. //
  6120. //
  6121. // // Example sending a request using the PutPublicAccessBlockRequest method.
  6122. // req, resp := client.PutPublicAccessBlockRequest(params)
  6123. //
  6124. // err := req.Send()
  6125. // if err == nil { // resp is now filled
  6126. // fmt.Println(resp)
  6127. // }
  6128. //
  6129. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
  6130. func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) {
  6131. op := &request.Operation{
  6132. Name: opPutPublicAccessBlock,
  6133. HTTPMethod: "PUT",
  6134. HTTPPath: "/{Bucket}?publicAccessBlock",
  6135. }
  6136. if input == nil {
  6137. input = &PutPublicAccessBlockInput{}
  6138. }
  6139. output = &PutPublicAccessBlockOutput{}
  6140. req = c.newRequest(op, input, output)
  6141. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  6142. return
  6143. }
  6144. // PutPublicAccessBlock API operation for Amazon Simple Storage Service.
  6145. //
  6146. // Creates or modifies the PublicAccessBlock configuration for an Amazon S3
  6147. // bucket.
  6148. //
  6149. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6150. // with awserr.Error's Code and Message methods to get detailed information about
  6151. // the error.
  6152. //
  6153. // See the AWS API reference guide for Amazon Simple Storage Service's
  6154. // API operation PutPublicAccessBlock for usage and error information.
  6155. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
  6156. func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) {
  6157. req, out := c.PutPublicAccessBlockRequest(input)
  6158. return out, req.Send()
  6159. }
  6160. // PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of
  6161. // the ability to pass a context and additional request options.
  6162. //
  6163. // See PutPublicAccessBlock for details on how to use this API operation.
  6164. //
  6165. // The context must be non-nil and will be used for request cancellation. If
  6166. // the context is nil a panic will occur. In the future the SDK may create
  6167. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6168. // for more information on using Contexts.
  6169. func (c *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) {
  6170. req, out := c.PutPublicAccessBlockRequest(input)
  6171. req.SetContext(ctx)
  6172. req.ApplyOptions(opts...)
  6173. return out, req.Send()
  6174. }
  6175. const opRestoreObject = "RestoreObject"
  6176. // RestoreObjectRequest generates a "aws/request.Request" representing the
  6177. // client's request for the RestoreObject operation. The "output" return
  6178. // value will be populated with the request's response once the request completes
  6179. // successfully.
  6180. //
  6181. // Use "Send" method on the returned Request to send the API call to the service.
  6182. // the "output" return value is not valid until after Send returns without error.
  6183. //
  6184. // See RestoreObject for more information on using the RestoreObject
  6185. // API call, and error handling.
  6186. //
  6187. // This method is useful when you want to inject custom logic or configuration
  6188. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6189. //
  6190. //
  6191. // // Example sending a request using the RestoreObjectRequest method.
  6192. // req, resp := client.RestoreObjectRequest(params)
  6193. //
  6194. // err := req.Send()
  6195. // if err == nil { // resp is now filled
  6196. // fmt.Println(resp)
  6197. // }
  6198. //
  6199. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  6200. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  6201. op := &request.Operation{
  6202. Name: opRestoreObject,
  6203. HTTPMethod: "POST",
  6204. HTTPPath: "/{Bucket}/{Key+}?restore",
  6205. }
  6206. if input == nil {
  6207. input = &RestoreObjectInput{}
  6208. }
  6209. output = &RestoreObjectOutput{}
  6210. req = c.newRequest(op, input, output)
  6211. return
  6212. }
  6213. // RestoreObject API operation for Amazon Simple Storage Service.
  6214. //
  6215. // Restores an archived copy of an object back into Amazon S3
  6216. //
  6217. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6218. // with awserr.Error's Code and Message methods to get detailed information about
  6219. // the error.
  6220. //
  6221. // See the AWS API reference guide for Amazon Simple Storage Service's
  6222. // API operation RestoreObject for usage and error information.
  6223. //
  6224. // Returned Error Codes:
  6225. // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  6226. // This operation is not allowed against this storage tier
  6227. //
  6228. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  6229. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  6230. req, out := c.RestoreObjectRequest(input)
  6231. return out, req.Send()
  6232. }
  6233. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  6234. // the ability to pass a context and additional request options.
  6235. //
  6236. // See RestoreObject for details on how to use this API operation.
  6237. //
  6238. // The context must be non-nil and will be used for request cancellation. If
  6239. // the context is nil a panic will occur. In the future the SDK may create
  6240. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6241. // for more information on using Contexts.
  6242. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  6243. req, out := c.RestoreObjectRequest(input)
  6244. req.SetContext(ctx)
  6245. req.ApplyOptions(opts...)
  6246. return out, req.Send()
  6247. }
  6248. const opSelectObjectContent = "SelectObjectContent"
  6249. // SelectObjectContentRequest generates a "aws/request.Request" representing the
  6250. // client's request for the SelectObjectContent operation. The "output" return
  6251. // value will be populated with the request's response once the request completes
  6252. // successfully.
  6253. //
  6254. // Use "Send" method on the returned Request to send the API call to the service.
  6255. // the "output" return value is not valid until after Send returns without error.
  6256. //
  6257. // See SelectObjectContent for more information on using the SelectObjectContent
  6258. // API call, and error handling.
  6259. //
  6260. // This method is useful when you want to inject custom logic or configuration
  6261. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6262. //
  6263. //
  6264. // // Example sending a request using the SelectObjectContentRequest method.
  6265. // req, resp := client.SelectObjectContentRequest(params)
  6266. //
  6267. // err := req.Send()
  6268. // if err == nil { // resp is now filled
  6269. // fmt.Println(resp)
  6270. // }
  6271. //
  6272. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  6273. func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) {
  6274. op := &request.Operation{
  6275. Name: opSelectObjectContent,
  6276. HTTPMethod: "POST",
  6277. HTTPPath: "/{Bucket}/{Key+}?select&select-type=2",
  6278. }
  6279. if input == nil {
  6280. input = &SelectObjectContentInput{}
  6281. }
  6282. output = &SelectObjectContentOutput{}
  6283. req = c.newRequest(op, input, output)
  6284. req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
  6285. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler)
  6286. req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop)
  6287. return
  6288. }
  6289. // SelectObjectContent API operation for Amazon Simple Storage Service.
  6290. //
  6291. // This operation filters the contents of an Amazon S3 object based on a simple
  6292. // Structured Query Language (SQL) statement. In the request, along with the
  6293. // SQL expression, you must also specify a data serialization format (JSON or
  6294. // CSV) of the object. Amazon S3 uses this to parse object data into records,
  6295. // and returns only records that match the specified SQL expression. You must
  6296. // also specify the data serialization format for the response.
  6297. //
  6298. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6299. // with awserr.Error's Code and Message methods to get detailed information about
  6300. // the error.
  6301. //
  6302. // See the AWS API reference guide for Amazon Simple Storage Service's
  6303. // API operation SelectObjectContent for usage and error information.
  6304. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  6305. func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) {
  6306. req, out := c.SelectObjectContentRequest(input)
  6307. return out, req.Send()
  6308. }
  6309. // SelectObjectContentWithContext is the same as SelectObjectContent with the addition of
  6310. // the ability to pass a context and additional request options.
  6311. //
  6312. // See SelectObjectContent for details on how to use this API operation.
  6313. //
  6314. // The context must be non-nil and will be used for request cancellation. If
  6315. // the context is nil a panic will occur. In the future the SDK may create
  6316. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6317. // for more information on using Contexts.
  6318. func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) {
  6319. req, out := c.SelectObjectContentRequest(input)
  6320. req.SetContext(ctx)
  6321. req.ApplyOptions(opts...)
  6322. return out, req.Send()
  6323. }
  6324. const opUploadPart = "UploadPart"
  6325. // UploadPartRequest generates a "aws/request.Request" representing the
  6326. // client's request for the UploadPart operation. The "output" return
  6327. // value will be populated with the request's response once the request completes
  6328. // successfully.
  6329. //
  6330. // Use "Send" method on the returned Request to send the API call to the service.
  6331. // the "output" return value is not valid until after Send returns without error.
  6332. //
  6333. // See UploadPart for more information on using the UploadPart
  6334. // API call, and error handling.
  6335. //
  6336. // This method is useful when you want to inject custom logic or configuration
  6337. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6338. //
  6339. //
  6340. // // Example sending a request using the UploadPartRequest method.
  6341. // req, resp := client.UploadPartRequest(params)
  6342. //
  6343. // err := req.Send()
  6344. // if err == nil { // resp is now filled
  6345. // fmt.Println(resp)
  6346. // }
  6347. //
  6348. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  6349. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  6350. op := &request.Operation{
  6351. Name: opUploadPart,
  6352. HTTPMethod: "PUT",
  6353. HTTPPath: "/{Bucket}/{Key+}",
  6354. }
  6355. if input == nil {
  6356. input = &UploadPartInput{}
  6357. }
  6358. output = &UploadPartOutput{}
  6359. req = c.newRequest(op, input, output)
  6360. return
  6361. }
  6362. // UploadPart API operation for Amazon Simple Storage Service.
  6363. //
  6364. // Uploads a part in a multipart upload.
  6365. //
  6366. // Note: After you initiate multipart upload and upload one or more parts, you
  6367. // must either complete or abort multipart upload in order to stop getting charged
  6368. // for storage of the uploaded parts. Only after you either complete or abort
  6369. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  6370. // you for the parts storage.
  6371. //
  6372. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6373. // with awserr.Error's Code and Message methods to get detailed information about
  6374. // the error.
  6375. //
  6376. // See the AWS API reference guide for Amazon Simple Storage Service's
  6377. // API operation UploadPart for usage and error information.
  6378. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  6379. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  6380. req, out := c.UploadPartRequest(input)
  6381. return out, req.Send()
  6382. }
  6383. // UploadPartWithContext is the same as UploadPart with the addition of
  6384. // the ability to pass a context and additional request options.
  6385. //
  6386. // See UploadPart for details on how to use this API operation.
  6387. //
  6388. // The context must be non-nil and will be used for request cancellation. If
  6389. // the context is nil a panic will occur. In the future the SDK may create
  6390. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6391. // for more information on using Contexts.
  6392. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  6393. req, out := c.UploadPartRequest(input)
  6394. req.SetContext(ctx)
  6395. req.ApplyOptions(opts...)
  6396. return out, req.Send()
  6397. }
  6398. const opUploadPartCopy = "UploadPartCopy"
  6399. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  6400. // client's request for the UploadPartCopy operation. The "output" return
  6401. // value will be populated with the request's response once the request completes
  6402. // successfully.
  6403. //
  6404. // Use "Send" method on the returned Request to send the API call to the service.
  6405. // the "output" return value is not valid until after Send returns without error.
  6406. //
  6407. // See UploadPartCopy for more information on using the UploadPartCopy
  6408. // API call, and error handling.
  6409. //
  6410. // This method is useful when you want to inject custom logic or configuration
  6411. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6412. //
  6413. //
  6414. // // Example sending a request using the UploadPartCopyRequest method.
  6415. // req, resp := client.UploadPartCopyRequest(params)
  6416. //
  6417. // err := req.Send()
  6418. // if err == nil { // resp is now filled
  6419. // fmt.Println(resp)
  6420. // }
  6421. //
  6422. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  6423. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  6424. op := &request.Operation{
  6425. Name: opUploadPartCopy,
  6426. HTTPMethod: "PUT",
  6427. HTTPPath: "/{Bucket}/{Key+}",
  6428. }
  6429. if input == nil {
  6430. input = &UploadPartCopyInput{}
  6431. }
  6432. output = &UploadPartCopyOutput{}
  6433. req = c.newRequest(op, input, output)
  6434. return
  6435. }
  6436. // UploadPartCopy API operation for Amazon Simple Storage Service.
  6437. //
  6438. // Uploads a part by copying data from an existing object as data source.
  6439. //
  6440. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6441. // with awserr.Error's Code and Message methods to get detailed information about
  6442. // the error.
  6443. //
  6444. // See the AWS API reference guide for Amazon Simple Storage Service's
  6445. // API operation UploadPartCopy for usage and error information.
  6446. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  6447. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  6448. req, out := c.UploadPartCopyRequest(input)
  6449. return out, req.Send()
  6450. }
  6451. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  6452. // the ability to pass a context and additional request options.
  6453. //
  6454. // See UploadPartCopy for details on how to use this API operation.
  6455. //
  6456. // The context must be non-nil and will be used for request cancellation. If
  6457. // the context is nil a panic will occur. In the future the SDK may create
  6458. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6459. // for more information on using Contexts.
  6460. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  6461. req, out := c.UploadPartCopyRequest(input)
  6462. req.SetContext(ctx)
  6463. req.ApplyOptions(opts...)
  6464. return out, req.Send()
  6465. }
  6466. // Specifies the days since the initiation of an Incomplete Multipart Upload
  6467. // that Lifecycle will wait before permanently removing all parts of the upload.
  6468. type AbortIncompleteMultipartUpload struct {
  6469. _ struct{} `type:"structure"`
  6470. // Indicates the number of days that must pass since initiation for Lifecycle
  6471. // to abort an Incomplete Multipart Upload.
  6472. DaysAfterInitiation *int64 `type:"integer"`
  6473. }
  6474. // String returns the string representation
  6475. func (s AbortIncompleteMultipartUpload) String() string {
  6476. return awsutil.Prettify(s)
  6477. }
  6478. // GoString returns the string representation
  6479. func (s AbortIncompleteMultipartUpload) GoString() string {
  6480. return s.String()
  6481. }
  6482. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  6483. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  6484. s.DaysAfterInitiation = &v
  6485. return s
  6486. }
  6487. type AbortMultipartUploadInput struct {
  6488. _ struct{} `type:"structure"`
  6489. // Bucket is a required field
  6490. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6491. // Key is a required field
  6492. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6493. // Confirms that the requester knows that she or he will be charged for the
  6494. // request. Bucket owners need not specify this parameter in their requests.
  6495. // Documentation on downloading objects from requester pays buckets can be found
  6496. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6497. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6498. // UploadId is a required field
  6499. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6500. }
  6501. // String returns the string representation
  6502. func (s AbortMultipartUploadInput) String() string {
  6503. return awsutil.Prettify(s)
  6504. }
  6505. // GoString returns the string representation
  6506. func (s AbortMultipartUploadInput) GoString() string {
  6507. return s.String()
  6508. }
  6509. // Validate inspects the fields of the type to determine if they are valid.
  6510. func (s *AbortMultipartUploadInput) Validate() error {
  6511. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  6512. if s.Bucket == nil {
  6513. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6514. }
  6515. if s.Bucket != nil && len(*s.Bucket) < 1 {
  6516. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  6517. }
  6518. if s.Key == nil {
  6519. invalidParams.Add(request.NewErrParamRequired("Key"))
  6520. }
  6521. if s.Key != nil && len(*s.Key) < 1 {
  6522. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6523. }
  6524. if s.UploadId == nil {
  6525. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6526. }
  6527. if invalidParams.Len() > 0 {
  6528. return invalidParams
  6529. }
  6530. return nil
  6531. }
  6532. // SetBucket sets the Bucket field's value.
  6533. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  6534. s.Bucket = &v
  6535. return s
  6536. }
  6537. func (s *AbortMultipartUploadInput) getBucket() (v string) {
  6538. if s.Bucket == nil {
  6539. return v
  6540. }
  6541. return *s.Bucket
  6542. }
  6543. // SetKey sets the Key field's value.
  6544. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  6545. s.Key = &v
  6546. return s
  6547. }
  6548. // SetRequestPayer sets the RequestPayer field's value.
  6549. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  6550. s.RequestPayer = &v
  6551. return s
  6552. }
  6553. // SetUploadId sets the UploadId field's value.
  6554. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  6555. s.UploadId = &v
  6556. return s
  6557. }
  6558. type AbortMultipartUploadOutput struct {
  6559. _ struct{} `type:"structure"`
  6560. // If present, indicates that the requester was successfully charged for the
  6561. // request.
  6562. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6563. }
  6564. // String returns the string representation
  6565. func (s AbortMultipartUploadOutput) String() string {
  6566. return awsutil.Prettify(s)
  6567. }
  6568. // GoString returns the string representation
  6569. func (s AbortMultipartUploadOutput) GoString() string {
  6570. return s.String()
  6571. }
  6572. // SetRequestCharged sets the RequestCharged field's value.
  6573. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  6574. s.RequestCharged = &v
  6575. return s
  6576. }
  6577. type AccelerateConfiguration struct {
  6578. _ struct{} `type:"structure"`
  6579. // The accelerate configuration of the bucket.
  6580. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  6581. }
  6582. // String returns the string representation
  6583. func (s AccelerateConfiguration) String() string {
  6584. return awsutil.Prettify(s)
  6585. }
  6586. // GoString returns the string representation
  6587. func (s AccelerateConfiguration) GoString() string {
  6588. return s.String()
  6589. }
  6590. // SetStatus sets the Status field's value.
  6591. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  6592. s.Status = &v
  6593. return s
  6594. }
  6595. type AccessControlPolicy struct {
  6596. _ struct{} `type:"structure"`
  6597. // A list of grants.
  6598. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  6599. Owner *Owner `type:"structure"`
  6600. }
  6601. // String returns the string representation
  6602. func (s AccessControlPolicy) String() string {
  6603. return awsutil.Prettify(s)
  6604. }
  6605. // GoString returns the string representation
  6606. func (s AccessControlPolicy) GoString() string {
  6607. return s.String()
  6608. }
  6609. // Validate inspects the fields of the type to determine if they are valid.
  6610. func (s *AccessControlPolicy) Validate() error {
  6611. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  6612. if s.Grants != nil {
  6613. for i, v := range s.Grants {
  6614. if v == nil {
  6615. continue
  6616. }
  6617. if err := v.Validate(); err != nil {
  6618. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  6619. }
  6620. }
  6621. }
  6622. if invalidParams.Len() > 0 {
  6623. return invalidParams
  6624. }
  6625. return nil
  6626. }
  6627. // SetGrants sets the Grants field's value.
  6628. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  6629. s.Grants = v
  6630. return s
  6631. }
  6632. // SetOwner sets the Owner field's value.
  6633. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  6634. s.Owner = v
  6635. return s
  6636. }
  6637. // A container for information about access control for replicas.
  6638. type AccessControlTranslation struct {
  6639. _ struct{} `type:"structure"`
  6640. // The override value for the owner of the replica object.
  6641. //
  6642. // Owner is a required field
  6643. Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
  6644. }
  6645. // String returns the string representation
  6646. func (s AccessControlTranslation) String() string {
  6647. return awsutil.Prettify(s)
  6648. }
  6649. // GoString returns the string representation
  6650. func (s AccessControlTranslation) GoString() string {
  6651. return s.String()
  6652. }
  6653. // Validate inspects the fields of the type to determine if they are valid.
  6654. func (s *AccessControlTranslation) Validate() error {
  6655. invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
  6656. if s.Owner == nil {
  6657. invalidParams.Add(request.NewErrParamRequired("Owner"))
  6658. }
  6659. if invalidParams.Len() > 0 {
  6660. return invalidParams
  6661. }
  6662. return nil
  6663. }
  6664. // SetOwner sets the Owner field's value.
  6665. func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
  6666. s.Owner = &v
  6667. return s
  6668. }
  6669. type AnalyticsAndOperator struct {
  6670. _ struct{} `type:"structure"`
  6671. // The prefix to use when evaluating an AND predicate.
  6672. Prefix *string `type:"string"`
  6673. // The list of tags to use when evaluating an AND predicate.
  6674. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  6675. }
  6676. // String returns the string representation
  6677. func (s AnalyticsAndOperator) String() string {
  6678. return awsutil.Prettify(s)
  6679. }
  6680. // GoString returns the string representation
  6681. func (s AnalyticsAndOperator) GoString() string {
  6682. return s.String()
  6683. }
  6684. // Validate inspects the fields of the type to determine if they are valid.
  6685. func (s *AnalyticsAndOperator) Validate() error {
  6686. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  6687. if s.Tags != nil {
  6688. for i, v := range s.Tags {
  6689. if v == nil {
  6690. continue
  6691. }
  6692. if err := v.Validate(); err != nil {
  6693. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6694. }
  6695. }
  6696. }
  6697. if invalidParams.Len() > 0 {
  6698. return invalidParams
  6699. }
  6700. return nil
  6701. }
  6702. // SetPrefix sets the Prefix field's value.
  6703. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  6704. s.Prefix = &v
  6705. return s
  6706. }
  6707. // SetTags sets the Tags field's value.
  6708. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  6709. s.Tags = v
  6710. return s
  6711. }
  6712. type AnalyticsConfiguration struct {
  6713. _ struct{} `type:"structure"`
  6714. // The filter used to describe a set of objects for analyses. A filter must
  6715. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  6716. // If no filter is provided, all objects will be considered in any analysis.
  6717. Filter *AnalyticsFilter `type:"structure"`
  6718. // The identifier used to represent an analytics configuration.
  6719. //
  6720. // Id is a required field
  6721. Id *string `type:"string" required:"true"`
  6722. // If present, it indicates that data related to access patterns will be collected
  6723. // and made available to analyze the tradeoffs between different storage classes.
  6724. //
  6725. // StorageClassAnalysis is a required field
  6726. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  6727. }
  6728. // String returns the string representation
  6729. func (s AnalyticsConfiguration) String() string {
  6730. return awsutil.Prettify(s)
  6731. }
  6732. // GoString returns the string representation
  6733. func (s AnalyticsConfiguration) GoString() string {
  6734. return s.String()
  6735. }
  6736. // Validate inspects the fields of the type to determine if they are valid.
  6737. func (s *AnalyticsConfiguration) Validate() error {
  6738. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  6739. if s.Id == nil {
  6740. invalidParams.Add(request.NewErrParamRequired("Id"))
  6741. }
  6742. if s.StorageClassAnalysis == nil {
  6743. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  6744. }
  6745. if s.Filter != nil {
  6746. if err := s.Filter.Validate(); err != nil {
  6747. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  6748. }
  6749. }
  6750. if s.StorageClassAnalysis != nil {
  6751. if err := s.StorageClassAnalysis.Validate(); err != nil {
  6752. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  6753. }
  6754. }
  6755. if invalidParams.Len() > 0 {
  6756. return invalidParams
  6757. }
  6758. return nil
  6759. }
  6760. // SetFilter sets the Filter field's value.
  6761. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  6762. s.Filter = v
  6763. return s
  6764. }
  6765. // SetId sets the Id field's value.
  6766. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  6767. s.Id = &v
  6768. return s
  6769. }
  6770. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  6771. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  6772. s.StorageClassAnalysis = v
  6773. return s
  6774. }
  6775. type AnalyticsExportDestination struct {
  6776. _ struct{} `type:"structure"`
  6777. // A destination signifying output to an S3 bucket.
  6778. //
  6779. // S3BucketDestination is a required field
  6780. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  6781. }
  6782. // String returns the string representation
  6783. func (s AnalyticsExportDestination) String() string {
  6784. return awsutil.Prettify(s)
  6785. }
  6786. // GoString returns the string representation
  6787. func (s AnalyticsExportDestination) GoString() string {
  6788. return s.String()
  6789. }
  6790. // Validate inspects the fields of the type to determine if they are valid.
  6791. func (s *AnalyticsExportDestination) Validate() error {
  6792. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  6793. if s.S3BucketDestination == nil {
  6794. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  6795. }
  6796. if s.S3BucketDestination != nil {
  6797. if err := s.S3BucketDestination.Validate(); err != nil {
  6798. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  6799. }
  6800. }
  6801. if invalidParams.Len() > 0 {
  6802. return invalidParams
  6803. }
  6804. return nil
  6805. }
  6806. // SetS3BucketDestination sets the S3BucketDestination field's value.
  6807. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  6808. s.S3BucketDestination = v
  6809. return s
  6810. }
  6811. type AnalyticsFilter struct {
  6812. _ struct{} `type:"structure"`
  6813. // A conjunction (logical AND) of predicates, which is used in evaluating an
  6814. // analytics filter. The operator must have at least two predicates.
  6815. And *AnalyticsAndOperator `type:"structure"`
  6816. // The prefix to use when evaluating an analytics filter.
  6817. Prefix *string `type:"string"`
  6818. // The tag to use when evaluating an analytics filter.
  6819. Tag *Tag `type:"structure"`
  6820. }
  6821. // String returns the string representation
  6822. func (s AnalyticsFilter) String() string {
  6823. return awsutil.Prettify(s)
  6824. }
  6825. // GoString returns the string representation
  6826. func (s AnalyticsFilter) GoString() string {
  6827. return s.String()
  6828. }
  6829. // Validate inspects the fields of the type to determine if they are valid.
  6830. func (s *AnalyticsFilter) Validate() error {
  6831. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  6832. if s.And != nil {
  6833. if err := s.And.Validate(); err != nil {
  6834. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  6835. }
  6836. }
  6837. if s.Tag != nil {
  6838. if err := s.Tag.Validate(); err != nil {
  6839. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  6840. }
  6841. }
  6842. if invalidParams.Len() > 0 {
  6843. return invalidParams
  6844. }
  6845. return nil
  6846. }
  6847. // SetAnd sets the And field's value.
  6848. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  6849. s.And = v
  6850. return s
  6851. }
  6852. // SetPrefix sets the Prefix field's value.
  6853. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  6854. s.Prefix = &v
  6855. return s
  6856. }
  6857. // SetTag sets the Tag field's value.
  6858. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  6859. s.Tag = v
  6860. return s
  6861. }
  6862. type AnalyticsS3BucketDestination struct {
  6863. _ struct{} `type:"structure"`
  6864. // The Amazon resource name (ARN) of the bucket to which data is exported.
  6865. //
  6866. // Bucket is a required field
  6867. Bucket *string `type:"string" required:"true"`
  6868. // The account ID that owns the destination bucket. If no account ID is provided,
  6869. // the owner will not be validated prior to exporting data.
  6870. BucketAccountId *string `type:"string"`
  6871. // The file format used when exporting data to Amazon S3.
  6872. //
  6873. // Format is a required field
  6874. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  6875. // The prefix to use when exporting data. The exported data begins with this
  6876. // prefix.
  6877. Prefix *string `type:"string"`
  6878. }
  6879. // String returns the string representation
  6880. func (s AnalyticsS3BucketDestination) String() string {
  6881. return awsutil.Prettify(s)
  6882. }
  6883. // GoString returns the string representation
  6884. func (s AnalyticsS3BucketDestination) GoString() string {
  6885. return s.String()
  6886. }
  6887. // Validate inspects the fields of the type to determine if they are valid.
  6888. func (s *AnalyticsS3BucketDestination) Validate() error {
  6889. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  6890. if s.Bucket == nil {
  6891. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6892. }
  6893. if s.Format == nil {
  6894. invalidParams.Add(request.NewErrParamRequired("Format"))
  6895. }
  6896. if invalidParams.Len() > 0 {
  6897. return invalidParams
  6898. }
  6899. return nil
  6900. }
  6901. // SetBucket sets the Bucket field's value.
  6902. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  6903. s.Bucket = &v
  6904. return s
  6905. }
  6906. func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
  6907. if s.Bucket == nil {
  6908. return v
  6909. }
  6910. return *s.Bucket
  6911. }
  6912. // SetBucketAccountId sets the BucketAccountId field's value.
  6913. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  6914. s.BucketAccountId = &v
  6915. return s
  6916. }
  6917. // SetFormat sets the Format field's value.
  6918. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  6919. s.Format = &v
  6920. return s
  6921. }
  6922. // SetPrefix sets the Prefix field's value.
  6923. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  6924. s.Prefix = &v
  6925. return s
  6926. }
  6927. type Bucket struct {
  6928. _ struct{} `type:"structure"`
  6929. // Date the bucket was created.
  6930. CreationDate *time.Time `type:"timestamp"`
  6931. // The name of the bucket.
  6932. Name *string `type:"string"`
  6933. }
  6934. // String returns the string representation
  6935. func (s Bucket) String() string {
  6936. return awsutil.Prettify(s)
  6937. }
  6938. // GoString returns the string representation
  6939. func (s Bucket) GoString() string {
  6940. return s.String()
  6941. }
  6942. // SetCreationDate sets the CreationDate field's value.
  6943. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  6944. s.CreationDate = &v
  6945. return s
  6946. }
  6947. // SetName sets the Name field's value.
  6948. func (s *Bucket) SetName(v string) *Bucket {
  6949. s.Name = &v
  6950. return s
  6951. }
  6952. type BucketLifecycleConfiguration struct {
  6953. _ struct{} `type:"structure"`
  6954. // Rules is a required field
  6955. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  6956. }
  6957. // String returns the string representation
  6958. func (s BucketLifecycleConfiguration) String() string {
  6959. return awsutil.Prettify(s)
  6960. }
  6961. // GoString returns the string representation
  6962. func (s BucketLifecycleConfiguration) GoString() string {
  6963. return s.String()
  6964. }
  6965. // Validate inspects the fields of the type to determine if they are valid.
  6966. func (s *BucketLifecycleConfiguration) Validate() error {
  6967. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  6968. if s.Rules == nil {
  6969. invalidParams.Add(request.NewErrParamRequired("Rules"))
  6970. }
  6971. if s.Rules != nil {
  6972. for i, v := range s.Rules {
  6973. if v == nil {
  6974. continue
  6975. }
  6976. if err := v.Validate(); err != nil {
  6977. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  6978. }
  6979. }
  6980. }
  6981. if invalidParams.Len() > 0 {
  6982. return invalidParams
  6983. }
  6984. return nil
  6985. }
  6986. // SetRules sets the Rules field's value.
  6987. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  6988. s.Rules = v
  6989. return s
  6990. }
  6991. type BucketLoggingStatus struct {
  6992. _ struct{} `type:"structure"`
  6993. // Container for logging information. Presence of this element indicates that
  6994. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  6995. // in this case.
  6996. LoggingEnabled *LoggingEnabled `type:"structure"`
  6997. }
  6998. // String returns the string representation
  6999. func (s BucketLoggingStatus) String() string {
  7000. return awsutil.Prettify(s)
  7001. }
  7002. // GoString returns the string representation
  7003. func (s BucketLoggingStatus) GoString() string {
  7004. return s.String()
  7005. }
  7006. // Validate inspects the fields of the type to determine if they are valid.
  7007. func (s *BucketLoggingStatus) Validate() error {
  7008. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  7009. if s.LoggingEnabled != nil {
  7010. if err := s.LoggingEnabled.Validate(); err != nil {
  7011. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  7012. }
  7013. }
  7014. if invalidParams.Len() > 0 {
  7015. return invalidParams
  7016. }
  7017. return nil
  7018. }
  7019. // SetLoggingEnabled sets the LoggingEnabled field's value.
  7020. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  7021. s.LoggingEnabled = v
  7022. return s
  7023. }
  7024. type CORSConfiguration struct {
  7025. _ struct{} `type:"structure"`
  7026. // CORSRules is a required field
  7027. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  7028. }
  7029. // String returns the string representation
  7030. func (s CORSConfiguration) String() string {
  7031. return awsutil.Prettify(s)
  7032. }
  7033. // GoString returns the string representation
  7034. func (s CORSConfiguration) GoString() string {
  7035. return s.String()
  7036. }
  7037. // Validate inspects the fields of the type to determine if they are valid.
  7038. func (s *CORSConfiguration) Validate() error {
  7039. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  7040. if s.CORSRules == nil {
  7041. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  7042. }
  7043. if s.CORSRules != nil {
  7044. for i, v := range s.CORSRules {
  7045. if v == nil {
  7046. continue
  7047. }
  7048. if err := v.Validate(); err != nil {
  7049. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  7050. }
  7051. }
  7052. }
  7053. if invalidParams.Len() > 0 {
  7054. return invalidParams
  7055. }
  7056. return nil
  7057. }
  7058. // SetCORSRules sets the CORSRules field's value.
  7059. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  7060. s.CORSRules = v
  7061. return s
  7062. }
  7063. type CORSRule struct {
  7064. _ struct{} `type:"structure"`
  7065. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  7066. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  7067. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  7068. // to execute.
  7069. //
  7070. // AllowedMethods is a required field
  7071. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  7072. // One or more origins you want customers to be able to access the bucket from.
  7073. //
  7074. // AllowedOrigins is a required field
  7075. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  7076. // One or more headers in the response that you want customers to be able to
  7077. // access from their applications (for example, from a JavaScript XMLHttpRequest
  7078. // object).
  7079. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  7080. // The time in seconds that your browser is to cache the preflight response
  7081. // for the specified resource.
  7082. MaxAgeSeconds *int64 `type:"integer"`
  7083. }
  7084. // String returns the string representation
  7085. func (s CORSRule) String() string {
  7086. return awsutil.Prettify(s)
  7087. }
  7088. // GoString returns the string representation
  7089. func (s CORSRule) GoString() string {
  7090. return s.String()
  7091. }
  7092. // Validate inspects the fields of the type to determine if they are valid.
  7093. func (s *CORSRule) Validate() error {
  7094. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  7095. if s.AllowedMethods == nil {
  7096. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  7097. }
  7098. if s.AllowedOrigins == nil {
  7099. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  7100. }
  7101. if invalidParams.Len() > 0 {
  7102. return invalidParams
  7103. }
  7104. return nil
  7105. }
  7106. // SetAllowedHeaders sets the AllowedHeaders field's value.
  7107. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  7108. s.AllowedHeaders = v
  7109. return s
  7110. }
  7111. // SetAllowedMethods sets the AllowedMethods field's value.
  7112. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  7113. s.AllowedMethods = v
  7114. return s
  7115. }
  7116. // SetAllowedOrigins sets the AllowedOrigins field's value.
  7117. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  7118. s.AllowedOrigins = v
  7119. return s
  7120. }
  7121. // SetExposeHeaders sets the ExposeHeaders field's value.
  7122. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  7123. s.ExposeHeaders = v
  7124. return s
  7125. }
  7126. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  7127. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  7128. s.MaxAgeSeconds = &v
  7129. return s
  7130. }
  7131. // Describes how a CSV-formatted input object is formatted.
  7132. type CSVInput struct {
  7133. _ struct{} `type:"structure"`
  7134. // Specifies that CSV field values may contain quoted record delimiters and
  7135. // such records should be allowed. Default value is FALSE. Setting this value
  7136. // to TRUE may lower performance.
  7137. AllowQuotedRecordDelimiter *bool `type:"boolean"`
  7138. // The single character used to indicate a row should be ignored when present
  7139. // at the start of a row.
  7140. Comments *string `type:"string"`
  7141. // The value used to separate individual fields in a record.
  7142. FieldDelimiter *string `type:"string"`
  7143. // Describes the first line of input. Valid values: None, Ignore, Use.
  7144. FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
  7145. // Value used for escaping where the field delimiter is part of the value.
  7146. QuoteCharacter *string `type:"string"`
  7147. // The single character used for escaping the quote character inside an already
  7148. // escaped value.
  7149. QuoteEscapeCharacter *string `type:"string"`
  7150. // The value used to separate individual records.
  7151. RecordDelimiter *string `type:"string"`
  7152. }
  7153. // String returns the string representation
  7154. func (s CSVInput) String() string {
  7155. return awsutil.Prettify(s)
  7156. }
  7157. // GoString returns the string representation
  7158. func (s CSVInput) GoString() string {
  7159. return s.String()
  7160. }
  7161. // SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value.
  7162. func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
  7163. s.AllowQuotedRecordDelimiter = &v
  7164. return s
  7165. }
  7166. // SetComments sets the Comments field's value.
  7167. func (s *CSVInput) SetComments(v string) *CSVInput {
  7168. s.Comments = &v
  7169. return s
  7170. }
  7171. // SetFieldDelimiter sets the FieldDelimiter field's value.
  7172. func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
  7173. s.FieldDelimiter = &v
  7174. return s
  7175. }
  7176. // SetFileHeaderInfo sets the FileHeaderInfo field's value.
  7177. func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
  7178. s.FileHeaderInfo = &v
  7179. return s
  7180. }
  7181. // SetQuoteCharacter sets the QuoteCharacter field's value.
  7182. func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
  7183. s.QuoteCharacter = &v
  7184. return s
  7185. }
  7186. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  7187. func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
  7188. s.QuoteEscapeCharacter = &v
  7189. return s
  7190. }
  7191. // SetRecordDelimiter sets the RecordDelimiter field's value.
  7192. func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
  7193. s.RecordDelimiter = &v
  7194. return s
  7195. }
  7196. // Describes how CSV-formatted results are formatted.
  7197. type CSVOutput struct {
  7198. _ struct{} `type:"structure"`
  7199. // The value used to separate individual fields in a record.
  7200. FieldDelimiter *string `type:"string"`
  7201. // The value used for escaping where the field delimiter is part of the value.
  7202. QuoteCharacter *string `type:"string"`
  7203. // Th single character used for escaping the quote character inside an already
  7204. // escaped value.
  7205. QuoteEscapeCharacter *string `type:"string"`
  7206. // Indicates whether or not all output fields should be quoted.
  7207. QuoteFields *string `type:"string" enum:"QuoteFields"`
  7208. // The value used to separate individual records.
  7209. RecordDelimiter *string `type:"string"`
  7210. }
  7211. // String returns the string representation
  7212. func (s CSVOutput) String() string {
  7213. return awsutil.Prettify(s)
  7214. }
  7215. // GoString returns the string representation
  7216. func (s CSVOutput) GoString() string {
  7217. return s.String()
  7218. }
  7219. // SetFieldDelimiter sets the FieldDelimiter field's value.
  7220. func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
  7221. s.FieldDelimiter = &v
  7222. return s
  7223. }
  7224. // SetQuoteCharacter sets the QuoteCharacter field's value.
  7225. func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
  7226. s.QuoteCharacter = &v
  7227. return s
  7228. }
  7229. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  7230. func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
  7231. s.QuoteEscapeCharacter = &v
  7232. return s
  7233. }
  7234. // SetQuoteFields sets the QuoteFields field's value.
  7235. func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
  7236. s.QuoteFields = &v
  7237. return s
  7238. }
  7239. // SetRecordDelimiter sets the RecordDelimiter field's value.
  7240. func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
  7241. s.RecordDelimiter = &v
  7242. return s
  7243. }
  7244. type CloudFunctionConfiguration struct {
  7245. _ struct{} `type:"structure"`
  7246. CloudFunction *string `type:"string"`
  7247. // The bucket event for which to send notifications.
  7248. //
  7249. // Deprecated: Event has been deprecated
  7250. Event *string `deprecated:"true" type:"string" enum:"Event"`
  7251. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  7252. // An optional unique identifier for configurations in a notification configuration.
  7253. // If you don't provide one, Amazon S3 will assign an ID.
  7254. Id *string `type:"string"`
  7255. InvocationRole *string `type:"string"`
  7256. }
  7257. // String returns the string representation
  7258. func (s CloudFunctionConfiguration) String() string {
  7259. return awsutil.Prettify(s)
  7260. }
  7261. // GoString returns the string representation
  7262. func (s CloudFunctionConfiguration) GoString() string {
  7263. return s.String()
  7264. }
  7265. // SetCloudFunction sets the CloudFunction field's value.
  7266. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  7267. s.CloudFunction = &v
  7268. return s
  7269. }
  7270. // SetEvent sets the Event field's value.
  7271. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  7272. s.Event = &v
  7273. return s
  7274. }
  7275. // SetEvents sets the Events field's value.
  7276. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  7277. s.Events = v
  7278. return s
  7279. }
  7280. // SetId sets the Id field's value.
  7281. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  7282. s.Id = &v
  7283. return s
  7284. }
  7285. // SetInvocationRole sets the InvocationRole field's value.
  7286. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  7287. s.InvocationRole = &v
  7288. return s
  7289. }
  7290. type CommonPrefix struct {
  7291. _ struct{} `type:"structure"`
  7292. Prefix *string `type:"string"`
  7293. }
  7294. // String returns the string representation
  7295. func (s CommonPrefix) String() string {
  7296. return awsutil.Prettify(s)
  7297. }
  7298. // GoString returns the string representation
  7299. func (s CommonPrefix) GoString() string {
  7300. return s.String()
  7301. }
  7302. // SetPrefix sets the Prefix field's value.
  7303. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  7304. s.Prefix = &v
  7305. return s
  7306. }
  7307. type CompleteMultipartUploadInput struct {
  7308. _ struct{} `type:"structure" payload:"MultipartUpload"`
  7309. // Bucket is a required field
  7310. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7311. // Key is a required field
  7312. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7313. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  7314. // Confirms that the requester knows that she or he will be charged for the
  7315. // request. Bucket owners need not specify this parameter in their requests.
  7316. // Documentation on downloading objects from requester pays buckets can be found
  7317. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7318. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7319. // UploadId is a required field
  7320. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  7321. }
  7322. // String returns the string representation
  7323. func (s CompleteMultipartUploadInput) String() string {
  7324. return awsutil.Prettify(s)
  7325. }
  7326. // GoString returns the string representation
  7327. func (s CompleteMultipartUploadInput) GoString() string {
  7328. return s.String()
  7329. }
  7330. // Validate inspects the fields of the type to determine if they are valid.
  7331. func (s *CompleteMultipartUploadInput) Validate() error {
  7332. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  7333. if s.Bucket == nil {
  7334. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7335. }
  7336. if s.Bucket != nil && len(*s.Bucket) < 1 {
  7337. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  7338. }
  7339. if s.Key == nil {
  7340. invalidParams.Add(request.NewErrParamRequired("Key"))
  7341. }
  7342. if s.Key != nil && len(*s.Key) < 1 {
  7343. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7344. }
  7345. if s.UploadId == nil {
  7346. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  7347. }
  7348. if invalidParams.Len() > 0 {
  7349. return invalidParams
  7350. }
  7351. return nil
  7352. }
  7353. // SetBucket sets the Bucket field's value.
  7354. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  7355. s.Bucket = &v
  7356. return s
  7357. }
  7358. func (s *CompleteMultipartUploadInput) getBucket() (v string) {
  7359. if s.Bucket == nil {
  7360. return v
  7361. }
  7362. return *s.Bucket
  7363. }
  7364. // SetKey sets the Key field's value.
  7365. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  7366. s.Key = &v
  7367. return s
  7368. }
  7369. // SetMultipartUpload sets the MultipartUpload field's value.
  7370. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  7371. s.MultipartUpload = v
  7372. return s
  7373. }
  7374. // SetRequestPayer sets the RequestPayer field's value.
  7375. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  7376. s.RequestPayer = &v
  7377. return s
  7378. }
  7379. // SetUploadId sets the UploadId field's value.
  7380. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  7381. s.UploadId = &v
  7382. return s
  7383. }
  7384. type CompleteMultipartUploadOutput struct {
  7385. _ struct{} `type:"structure"`
  7386. Bucket *string `type:"string"`
  7387. // Entity tag of the object.
  7388. ETag *string `type:"string"`
  7389. // If the object expiration is configured, this will contain the expiration
  7390. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  7391. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7392. Key *string `min:"1" type:"string"`
  7393. Location *string `type:"string"`
  7394. // If present, indicates that the requester was successfully charged for the
  7395. // request.
  7396. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7397. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7398. // encryption key that was used for the object.
  7399. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7400. // The Server-side encryption algorithm used when storing this object in S3
  7401. // (e.g., AES256, aws:kms).
  7402. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7403. // Version of the object.
  7404. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7405. }
  7406. // String returns the string representation
  7407. func (s CompleteMultipartUploadOutput) String() string {
  7408. return awsutil.Prettify(s)
  7409. }
  7410. // GoString returns the string representation
  7411. func (s CompleteMultipartUploadOutput) GoString() string {
  7412. return s.String()
  7413. }
  7414. // SetBucket sets the Bucket field's value.
  7415. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  7416. s.Bucket = &v
  7417. return s
  7418. }
  7419. func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
  7420. if s.Bucket == nil {
  7421. return v
  7422. }
  7423. return *s.Bucket
  7424. }
  7425. // SetETag sets the ETag field's value.
  7426. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  7427. s.ETag = &v
  7428. return s
  7429. }
  7430. // SetExpiration sets the Expiration field's value.
  7431. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  7432. s.Expiration = &v
  7433. return s
  7434. }
  7435. // SetKey sets the Key field's value.
  7436. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  7437. s.Key = &v
  7438. return s
  7439. }
  7440. // SetLocation sets the Location field's value.
  7441. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  7442. s.Location = &v
  7443. return s
  7444. }
  7445. // SetRequestCharged sets the RequestCharged field's value.
  7446. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  7447. s.RequestCharged = &v
  7448. return s
  7449. }
  7450. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7451. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  7452. s.SSEKMSKeyId = &v
  7453. return s
  7454. }
  7455. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7456. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  7457. s.ServerSideEncryption = &v
  7458. return s
  7459. }
  7460. // SetVersionId sets the VersionId field's value.
  7461. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  7462. s.VersionId = &v
  7463. return s
  7464. }
  7465. type CompletedMultipartUpload struct {
  7466. _ struct{} `type:"structure"`
  7467. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  7468. }
  7469. // String returns the string representation
  7470. func (s CompletedMultipartUpload) String() string {
  7471. return awsutil.Prettify(s)
  7472. }
  7473. // GoString returns the string representation
  7474. func (s CompletedMultipartUpload) GoString() string {
  7475. return s.String()
  7476. }
  7477. // SetParts sets the Parts field's value.
  7478. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  7479. s.Parts = v
  7480. return s
  7481. }
  7482. type CompletedPart struct {
  7483. _ struct{} `type:"structure"`
  7484. // Entity tag returned when the part was uploaded.
  7485. ETag *string `type:"string"`
  7486. // Part number that identifies the part. This is a positive integer between
  7487. // 1 and 10,000.
  7488. PartNumber *int64 `type:"integer"`
  7489. }
  7490. // String returns the string representation
  7491. func (s CompletedPart) String() string {
  7492. return awsutil.Prettify(s)
  7493. }
  7494. // GoString returns the string representation
  7495. func (s CompletedPart) GoString() string {
  7496. return s.String()
  7497. }
  7498. // SetETag sets the ETag field's value.
  7499. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  7500. s.ETag = &v
  7501. return s
  7502. }
  7503. // SetPartNumber sets the PartNumber field's value.
  7504. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  7505. s.PartNumber = &v
  7506. return s
  7507. }
  7508. type Condition struct {
  7509. _ struct{} `type:"structure"`
  7510. // The HTTP error code when the redirect is applied. In the event of an error,
  7511. // if the error code equals this value, then the specified redirect is applied.
  7512. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  7513. // is not specified. If both are specified, then both must be true for the redirect
  7514. // to be applied.
  7515. HttpErrorCodeReturnedEquals *string `type:"string"`
  7516. // The object key name prefix when the redirect is applied. For example, to
  7517. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  7518. // To redirect request for all pages with the prefix docs/, the key prefix will
  7519. // be /docs, which identifies all objects in the docs/ folder. Required when
  7520. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  7521. // is not specified. If both conditions are specified, both must be true for
  7522. // the redirect to be applied.
  7523. KeyPrefixEquals *string `type:"string"`
  7524. }
  7525. // String returns the string representation
  7526. func (s Condition) String() string {
  7527. return awsutil.Prettify(s)
  7528. }
  7529. // GoString returns the string representation
  7530. func (s Condition) GoString() string {
  7531. return s.String()
  7532. }
  7533. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  7534. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  7535. s.HttpErrorCodeReturnedEquals = &v
  7536. return s
  7537. }
  7538. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  7539. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  7540. s.KeyPrefixEquals = &v
  7541. return s
  7542. }
  7543. type ContinuationEvent struct {
  7544. _ struct{} `locationName:"ContinuationEvent" type:"structure"`
  7545. }
  7546. // String returns the string representation
  7547. func (s ContinuationEvent) String() string {
  7548. return awsutil.Prettify(s)
  7549. }
  7550. // GoString returns the string representation
  7551. func (s ContinuationEvent) GoString() string {
  7552. return s.String()
  7553. }
  7554. // The ContinuationEvent is and event in the SelectObjectContentEventStream group of events.
  7555. func (s *ContinuationEvent) eventSelectObjectContentEventStream() {}
  7556. // UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value.
  7557. // This method is only used internally within the SDK's EventStream handling.
  7558. func (s *ContinuationEvent) UnmarshalEvent(
  7559. payloadUnmarshaler protocol.PayloadUnmarshaler,
  7560. msg eventstream.Message,
  7561. ) error {
  7562. return nil
  7563. }
  7564. type CopyObjectInput struct {
  7565. _ struct{} `type:"structure"`
  7566. // The canned ACL to apply to the object.
  7567. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7568. // Bucket is a required field
  7569. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7570. // Specifies caching behavior along the request/reply chain.
  7571. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7572. // Specifies presentational information for the object.
  7573. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7574. // Specifies what content encodings have been applied to the object and thus
  7575. // what decoding mechanisms must be applied to obtain the media-type referenced
  7576. // by the Content-Type header field.
  7577. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7578. // The language the content is in.
  7579. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7580. // A standard MIME type describing the format of the object data.
  7581. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7582. // The name of the source bucket and key name of the source object, separated
  7583. // by a slash (/). Must be URL-encoded.
  7584. //
  7585. // CopySource is a required field
  7586. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  7587. // Copies the object if its entity tag (ETag) matches the specified tag.
  7588. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  7589. // Copies the object if it has been modified since the specified time.
  7590. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  7591. // Copies the object if its entity tag (ETag) is different than the specified
  7592. // ETag.
  7593. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  7594. // Copies the object if it hasn't been modified since the specified time.
  7595. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  7596. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  7597. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  7598. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  7599. // the source object. The encryption key provided in this header must be one
  7600. // that was used when the source object was created.
  7601. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  7602. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7603. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7604. // key was transmitted without error.
  7605. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  7606. // The date and time at which the object is no longer cacheable.
  7607. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  7608. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7609. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7610. // Allows grantee to read the object data and its metadata.
  7611. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7612. // Allows grantee to read the object ACL.
  7613. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7614. // Allows grantee to write the ACL for the applicable object.
  7615. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7616. // Key is a required field
  7617. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7618. // A map of metadata to store with the object in S3.
  7619. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7620. // Specifies whether the metadata is copied from the source object or replaced
  7621. // with metadata provided in the request.
  7622. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  7623. // Specifies whether you want to apply a Legal Hold to the copied object.
  7624. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  7625. // The Object Lock mode that you want to apply to the copied object.
  7626. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  7627. // The date and time when you want the copied object's Object Lock to expire.
  7628. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  7629. // Confirms that the requester knows that she or he will be charged for the
  7630. // request. Bucket owners need not specify this parameter in their requests.
  7631. // Documentation on downloading objects from requester pays buckets can be found
  7632. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7633. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7634. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7635. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7636. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7637. // data. This value is used to store the object and then it is discarded; Amazon
  7638. // does not store the encryption key. The key must be appropriate for use with
  7639. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7640. // header.
  7641. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  7642. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7643. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7644. // key was transmitted without error.
  7645. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7646. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7647. // requests for an object protected by AWS KMS will fail if not made via SSL
  7648. // or using SigV4. Documentation on configuring any of the officially supported
  7649. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7650. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7651. // The Server-side encryption algorithm used when storing this object in S3
  7652. // (e.g., AES256, aws:kms).
  7653. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7654. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7655. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7656. // The tag-set for the object destination object this value must be used in
  7657. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  7658. // Query parameters
  7659. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  7660. // Specifies whether the object tag-set are copied from the source object or
  7661. // replaced with tag-set provided in the request.
  7662. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  7663. // If the bucket is configured as a website, redirects requests for this object
  7664. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7665. // the value of this header in the object metadata.
  7666. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7667. }
  7668. // String returns the string representation
  7669. func (s CopyObjectInput) String() string {
  7670. return awsutil.Prettify(s)
  7671. }
  7672. // GoString returns the string representation
  7673. func (s CopyObjectInput) GoString() string {
  7674. return s.String()
  7675. }
  7676. // Validate inspects the fields of the type to determine if they are valid.
  7677. func (s *CopyObjectInput) Validate() error {
  7678. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  7679. if s.Bucket == nil {
  7680. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7681. }
  7682. if s.Bucket != nil && len(*s.Bucket) < 1 {
  7683. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  7684. }
  7685. if s.CopySource == nil {
  7686. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  7687. }
  7688. if s.Key == nil {
  7689. invalidParams.Add(request.NewErrParamRequired("Key"))
  7690. }
  7691. if s.Key != nil && len(*s.Key) < 1 {
  7692. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7693. }
  7694. if invalidParams.Len() > 0 {
  7695. return invalidParams
  7696. }
  7697. return nil
  7698. }
  7699. // SetACL sets the ACL field's value.
  7700. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  7701. s.ACL = &v
  7702. return s
  7703. }
  7704. // SetBucket sets the Bucket field's value.
  7705. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  7706. s.Bucket = &v
  7707. return s
  7708. }
  7709. func (s *CopyObjectInput) getBucket() (v string) {
  7710. if s.Bucket == nil {
  7711. return v
  7712. }
  7713. return *s.Bucket
  7714. }
  7715. // SetCacheControl sets the CacheControl field's value.
  7716. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  7717. s.CacheControl = &v
  7718. return s
  7719. }
  7720. // SetContentDisposition sets the ContentDisposition field's value.
  7721. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  7722. s.ContentDisposition = &v
  7723. return s
  7724. }
  7725. // SetContentEncoding sets the ContentEncoding field's value.
  7726. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  7727. s.ContentEncoding = &v
  7728. return s
  7729. }
  7730. // SetContentLanguage sets the ContentLanguage field's value.
  7731. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  7732. s.ContentLanguage = &v
  7733. return s
  7734. }
  7735. // SetContentType sets the ContentType field's value.
  7736. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  7737. s.ContentType = &v
  7738. return s
  7739. }
  7740. // SetCopySource sets the CopySource field's value.
  7741. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  7742. s.CopySource = &v
  7743. return s
  7744. }
  7745. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  7746. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  7747. s.CopySourceIfMatch = &v
  7748. return s
  7749. }
  7750. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  7751. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  7752. s.CopySourceIfModifiedSince = &v
  7753. return s
  7754. }
  7755. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  7756. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  7757. s.CopySourceIfNoneMatch = &v
  7758. return s
  7759. }
  7760. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  7761. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  7762. s.CopySourceIfUnmodifiedSince = &v
  7763. return s
  7764. }
  7765. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  7766. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  7767. s.CopySourceSSECustomerAlgorithm = &v
  7768. return s
  7769. }
  7770. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  7771. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  7772. s.CopySourceSSECustomerKey = &v
  7773. return s
  7774. }
  7775. func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
  7776. if s.CopySourceSSECustomerKey == nil {
  7777. return v
  7778. }
  7779. return *s.CopySourceSSECustomerKey
  7780. }
  7781. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  7782. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  7783. s.CopySourceSSECustomerKeyMD5 = &v
  7784. return s
  7785. }
  7786. // SetExpires sets the Expires field's value.
  7787. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  7788. s.Expires = &v
  7789. return s
  7790. }
  7791. // SetGrantFullControl sets the GrantFullControl field's value.
  7792. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  7793. s.GrantFullControl = &v
  7794. return s
  7795. }
  7796. // SetGrantRead sets the GrantRead field's value.
  7797. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  7798. s.GrantRead = &v
  7799. return s
  7800. }
  7801. // SetGrantReadACP sets the GrantReadACP field's value.
  7802. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  7803. s.GrantReadACP = &v
  7804. return s
  7805. }
  7806. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7807. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  7808. s.GrantWriteACP = &v
  7809. return s
  7810. }
  7811. // SetKey sets the Key field's value.
  7812. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  7813. s.Key = &v
  7814. return s
  7815. }
  7816. // SetMetadata sets the Metadata field's value.
  7817. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  7818. s.Metadata = v
  7819. return s
  7820. }
  7821. // SetMetadataDirective sets the MetadataDirective field's value.
  7822. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  7823. s.MetadataDirective = &v
  7824. return s
  7825. }
  7826. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  7827. func (s *CopyObjectInput) SetObjectLockLegalHoldStatus(v string) *CopyObjectInput {
  7828. s.ObjectLockLegalHoldStatus = &v
  7829. return s
  7830. }
  7831. // SetObjectLockMode sets the ObjectLockMode field's value.
  7832. func (s *CopyObjectInput) SetObjectLockMode(v string) *CopyObjectInput {
  7833. s.ObjectLockMode = &v
  7834. return s
  7835. }
  7836. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  7837. func (s *CopyObjectInput) SetObjectLockRetainUntilDate(v time.Time) *CopyObjectInput {
  7838. s.ObjectLockRetainUntilDate = &v
  7839. return s
  7840. }
  7841. // SetRequestPayer sets the RequestPayer field's value.
  7842. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  7843. s.RequestPayer = &v
  7844. return s
  7845. }
  7846. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7847. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  7848. s.SSECustomerAlgorithm = &v
  7849. return s
  7850. }
  7851. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7852. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  7853. s.SSECustomerKey = &v
  7854. return s
  7855. }
  7856. func (s *CopyObjectInput) getSSECustomerKey() (v string) {
  7857. if s.SSECustomerKey == nil {
  7858. return v
  7859. }
  7860. return *s.SSECustomerKey
  7861. }
  7862. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7863. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  7864. s.SSECustomerKeyMD5 = &v
  7865. return s
  7866. }
  7867. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7868. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  7869. s.SSEKMSKeyId = &v
  7870. return s
  7871. }
  7872. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7873. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  7874. s.ServerSideEncryption = &v
  7875. return s
  7876. }
  7877. // SetStorageClass sets the StorageClass field's value.
  7878. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  7879. s.StorageClass = &v
  7880. return s
  7881. }
  7882. // SetTagging sets the Tagging field's value.
  7883. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  7884. s.Tagging = &v
  7885. return s
  7886. }
  7887. // SetTaggingDirective sets the TaggingDirective field's value.
  7888. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  7889. s.TaggingDirective = &v
  7890. return s
  7891. }
  7892. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7893. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  7894. s.WebsiteRedirectLocation = &v
  7895. return s
  7896. }
  7897. type CopyObjectOutput struct {
  7898. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  7899. CopyObjectResult *CopyObjectResult `type:"structure"`
  7900. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  7901. // If the object expiration is configured, the response includes this header.
  7902. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7903. // If present, indicates that the requester was successfully charged for the
  7904. // request.
  7905. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7906. // If server-side encryption with a customer-provided encryption key was requested,
  7907. // the response will include this header confirming the encryption algorithm
  7908. // used.
  7909. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7910. // If server-side encryption with a customer-provided encryption key was requested,
  7911. // the response will include this header to provide round trip message integrity
  7912. // verification of the customer-provided encryption key.
  7913. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7914. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7915. // encryption key that was used for the object.
  7916. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7917. // The Server-side encryption algorithm used when storing this object in S3
  7918. // (e.g., AES256, aws:kms).
  7919. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7920. // Version ID of the newly created copy.
  7921. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7922. }
  7923. // String returns the string representation
  7924. func (s CopyObjectOutput) String() string {
  7925. return awsutil.Prettify(s)
  7926. }
  7927. // GoString returns the string representation
  7928. func (s CopyObjectOutput) GoString() string {
  7929. return s.String()
  7930. }
  7931. // SetCopyObjectResult sets the CopyObjectResult field's value.
  7932. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  7933. s.CopyObjectResult = v
  7934. return s
  7935. }
  7936. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  7937. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  7938. s.CopySourceVersionId = &v
  7939. return s
  7940. }
  7941. // SetExpiration sets the Expiration field's value.
  7942. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  7943. s.Expiration = &v
  7944. return s
  7945. }
  7946. // SetRequestCharged sets the RequestCharged field's value.
  7947. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  7948. s.RequestCharged = &v
  7949. return s
  7950. }
  7951. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7952. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  7953. s.SSECustomerAlgorithm = &v
  7954. return s
  7955. }
  7956. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7957. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  7958. s.SSECustomerKeyMD5 = &v
  7959. return s
  7960. }
  7961. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7962. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  7963. s.SSEKMSKeyId = &v
  7964. return s
  7965. }
  7966. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7967. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  7968. s.ServerSideEncryption = &v
  7969. return s
  7970. }
  7971. // SetVersionId sets the VersionId field's value.
  7972. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  7973. s.VersionId = &v
  7974. return s
  7975. }
  7976. type CopyObjectResult struct {
  7977. _ struct{} `type:"structure"`
  7978. ETag *string `type:"string"`
  7979. LastModified *time.Time `type:"timestamp"`
  7980. }
  7981. // String returns the string representation
  7982. func (s CopyObjectResult) String() string {
  7983. return awsutil.Prettify(s)
  7984. }
  7985. // GoString returns the string representation
  7986. func (s CopyObjectResult) GoString() string {
  7987. return s.String()
  7988. }
  7989. // SetETag sets the ETag field's value.
  7990. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  7991. s.ETag = &v
  7992. return s
  7993. }
  7994. // SetLastModified sets the LastModified field's value.
  7995. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  7996. s.LastModified = &v
  7997. return s
  7998. }
  7999. type CopyPartResult struct {
  8000. _ struct{} `type:"structure"`
  8001. // Entity tag of the object.
  8002. ETag *string `type:"string"`
  8003. // Date and time at which the object was uploaded.
  8004. LastModified *time.Time `type:"timestamp"`
  8005. }
  8006. // String returns the string representation
  8007. func (s CopyPartResult) String() string {
  8008. return awsutil.Prettify(s)
  8009. }
  8010. // GoString returns the string representation
  8011. func (s CopyPartResult) GoString() string {
  8012. return s.String()
  8013. }
  8014. // SetETag sets the ETag field's value.
  8015. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  8016. s.ETag = &v
  8017. return s
  8018. }
  8019. // SetLastModified sets the LastModified field's value.
  8020. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  8021. s.LastModified = &v
  8022. return s
  8023. }
  8024. type CreateBucketConfiguration struct {
  8025. _ struct{} `type:"structure"`
  8026. // Specifies the region where the bucket will be created. If you don't specify
  8027. // a region, the bucket is created in US East (N. Virginia) Region (us-east-1).
  8028. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  8029. }
  8030. // String returns the string representation
  8031. func (s CreateBucketConfiguration) String() string {
  8032. return awsutil.Prettify(s)
  8033. }
  8034. // GoString returns the string representation
  8035. func (s CreateBucketConfiguration) GoString() string {
  8036. return s.String()
  8037. }
  8038. // SetLocationConstraint sets the LocationConstraint field's value.
  8039. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  8040. s.LocationConstraint = &v
  8041. return s
  8042. }
  8043. type CreateBucketInput struct {
  8044. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  8045. // The canned ACL to apply to the bucket.
  8046. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  8047. // Bucket is a required field
  8048. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8049. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  8050. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  8051. // bucket.
  8052. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  8053. // Allows grantee to list the objects in the bucket.
  8054. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  8055. // Allows grantee to read the bucket ACL.
  8056. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  8057. // Allows grantee to create, overwrite, and delete any object in the bucket.
  8058. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  8059. // Allows grantee to write the ACL for the applicable bucket.
  8060. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  8061. // Specifies whether you want S3 Object Lock to be enabled for the new bucket.
  8062. ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`
  8063. }
  8064. // String returns the string representation
  8065. func (s CreateBucketInput) String() string {
  8066. return awsutil.Prettify(s)
  8067. }
  8068. // GoString returns the string representation
  8069. func (s CreateBucketInput) GoString() string {
  8070. return s.String()
  8071. }
  8072. // Validate inspects the fields of the type to determine if they are valid.
  8073. func (s *CreateBucketInput) Validate() error {
  8074. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  8075. if s.Bucket == nil {
  8076. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8077. }
  8078. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8079. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8080. }
  8081. if invalidParams.Len() > 0 {
  8082. return invalidParams
  8083. }
  8084. return nil
  8085. }
  8086. // SetACL sets the ACL field's value.
  8087. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  8088. s.ACL = &v
  8089. return s
  8090. }
  8091. // SetBucket sets the Bucket field's value.
  8092. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  8093. s.Bucket = &v
  8094. return s
  8095. }
  8096. func (s *CreateBucketInput) getBucket() (v string) {
  8097. if s.Bucket == nil {
  8098. return v
  8099. }
  8100. return *s.Bucket
  8101. }
  8102. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  8103. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  8104. s.CreateBucketConfiguration = v
  8105. return s
  8106. }
  8107. // SetGrantFullControl sets the GrantFullControl field's value.
  8108. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  8109. s.GrantFullControl = &v
  8110. return s
  8111. }
  8112. // SetGrantRead sets the GrantRead field's value.
  8113. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  8114. s.GrantRead = &v
  8115. return s
  8116. }
  8117. // SetGrantReadACP sets the GrantReadACP field's value.
  8118. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  8119. s.GrantReadACP = &v
  8120. return s
  8121. }
  8122. // SetGrantWrite sets the GrantWrite field's value.
  8123. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  8124. s.GrantWrite = &v
  8125. return s
  8126. }
  8127. // SetGrantWriteACP sets the GrantWriteACP field's value.
  8128. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  8129. s.GrantWriteACP = &v
  8130. return s
  8131. }
  8132. // SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value.
  8133. func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput {
  8134. s.ObjectLockEnabledForBucket = &v
  8135. return s
  8136. }
  8137. type CreateBucketOutput struct {
  8138. _ struct{} `type:"structure"`
  8139. Location *string `location:"header" locationName:"Location" type:"string"`
  8140. }
  8141. // String returns the string representation
  8142. func (s CreateBucketOutput) String() string {
  8143. return awsutil.Prettify(s)
  8144. }
  8145. // GoString returns the string representation
  8146. func (s CreateBucketOutput) GoString() string {
  8147. return s.String()
  8148. }
  8149. // SetLocation sets the Location field's value.
  8150. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  8151. s.Location = &v
  8152. return s
  8153. }
  8154. type CreateMultipartUploadInput struct {
  8155. _ struct{} `type:"structure"`
  8156. // The canned ACL to apply to the object.
  8157. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  8158. // Bucket is a required field
  8159. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8160. // Specifies caching behavior along the request/reply chain.
  8161. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  8162. // Specifies presentational information for the object.
  8163. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  8164. // Specifies what content encodings have been applied to the object and thus
  8165. // what decoding mechanisms must be applied to obtain the media-type referenced
  8166. // by the Content-Type header field.
  8167. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  8168. // The language the content is in.
  8169. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  8170. // A standard MIME type describing the format of the object data.
  8171. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  8172. // The date and time at which the object is no longer cacheable.
  8173. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  8174. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  8175. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  8176. // Allows grantee to read the object data and its metadata.
  8177. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  8178. // Allows grantee to read the object ACL.
  8179. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  8180. // Allows grantee to write the ACL for the applicable object.
  8181. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  8182. // Key is a required field
  8183. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8184. // A map of metadata to store with the object in S3.
  8185. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  8186. // Specifies whether you want to apply a Legal Hold to the uploaded object.
  8187. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  8188. // Specifies the Object Lock mode that you want to apply to the uploaded object.
  8189. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  8190. // Specifies the date and time when you want the Object Lock to expire.
  8191. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  8192. // Confirms that the requester knows that she or he will be charged for the
  8193. // request. Bucket owners need not specify this parameter in their requests.
  8194. // Documentation on downloading objects from requester pays buckets can be found
  8195. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8196. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8197. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  8198. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8199. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  8200. // data. This value is used to store the object and then it is discarded; Amazon
  8201. // does not store the encryption key. The key must be appropriate for use with
  8202. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  8203. // header.
  8204. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  8205. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  8206. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  8207. // key was transmitted without error.
  8208. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8209. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  8210. // requests for an object protected by AWS KMS will fail if not made via SSL
  8211. // or using SigV4. Documentation on configuring any of the officially supported
  8212. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  8213. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  8214. // The Server-side encryption algorithm used when storing this object in S3
  8215. // (e.g., AES256, aws:kms).
  8216. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  8217. // The type of storage to use for the object. Defaults to 'STANDARD'.
  8218. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  8219. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  8220. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  8221. // If the bucket is configured as a website, redirects requests for this object
  8222. // to another object in the same bucket or to an external URL. Amazon S3 stores
  8223. // the value of this header in the object metadata.
  8224. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  8225. }
  8226. // String returns the string representation
  8227. func (s CreateMultipartUploadInput) String() string {
  8228. return awsutil.Prettify(s)
  8229. }
  8230. // GoString returns the string representation
  8231. func (s CreateMultipartUploadInput) GoString() string {
  8232. return s.String()
  8233. }
  8234. // Validate inspects the fields of the type to determine if they are valid.
  8235. func (s *CreateMultipartUploadInput) Validate() error {
  8236. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  8237. if s.Bucket == nil {
  8238. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8239. }
  8240. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8241. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8242. }
  8243. if s.Key == nil {
  8244. invalidParams.Add(request.NewErrParamRequired("Key"))
  8245. }
  8246. if s.Key != nil && len(*s.Key) < 1 {
  8247. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8248. }
  8249. if invalidParams.Len() > 0 {
  8250. return invalidParams
  8251. }
  8252. return nil
  8253. }
  8254. // SetACL sets the ACL field's value.
  8255. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  8256. s.ACL = &v
  8257. return s
  8258. }
  8259. // SetBucket sets the Bucket field's value.
  8260. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  8261. s.Bucket = &v
  8262. return s
  8263. }
  8264. func (s *CreateMultipartUploadInput) getBucket() (v string) {
  8265. if s.Bucket == nil {
  8266. return v
  8267. }
  8268. return *s.Bucket
  8269. }
  8270. // SetCacheControl sets the CacheControl field's value.
  8271. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  8272. s.CacheControl = &v
  8273. return s
  8274. }
  8275. // SetContentDisposition sets the ContentDisposition field's value.
  8276. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  8277. s.ContentDisposition = &v
  8278. return s
  8279. }
  8280. // SetContentEncoding sets the ContentEncoding field's value.
  8281. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  8282. s.ContentEncoding = &v
  8283. return s
  8284. }
  8285. // SetContentLanguage sets the ContentLanguage field's value.
  8286. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  8287. s.ContentLanguage = &v
  8288. return s
  8289. }
  8290. // SetContentType sets the ContentType field's value.
  8291. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  8292. s.ContentType = &v
  8293. return s
  8294. }
  8295. // SetExpires sets the Expires field's value.
  8296. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  8297. s.Expires = &v
  8298. return s
  8299. }
  8300. // SetGrantFullControl sets the GrantFullControl field's value.
  8301. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  8302. s.GrantFullControl = &v
  8303. return s
  8304. }
  8305. // SetGrantRead sets the GrantRead field's value.
  8306. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  8307. s.GrantRead = &v
  8308. return s
  8309. }
  8310. // SetGrantReadACP sets the GrantReadACP field's value.
  8311. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  8312. s.GrantReadACP = &v
  8313. return s
  8314. }
  8315. // SetGrantWriteACP sets the GrantWriteACP field's value.
  8316. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  8317. s.GrantWriteACP = &v
  8318. return s
  8319. }
  8320. // SetKey sets the Key field's value.
  8321. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  8322. s.Key = &v
  8323. return s
  8324. }
  8325. // SetMetadata sets the Metadata field's value.
  8326. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  8327. s.Metadata = v
  8328. return s
  8329. }
  8330. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  8331. func (s *CreateMultipartUploadInput) SetObjectLockLegalHoldStatus(v string) *CreateMultipartUploadInput {
  8332. s.ObjectLockLegalHoldStatus = &v
  8333. return s
  8334. }
  8335. // SetObjectLockMode sets the ObjectLockMode field's value.
  8336. func (s *CreateMultipartUploadInput) SetObjectLockMode(v string) *CreateMultipartUploadInput {
  8337. s.ObjectLockMode = &v
  8338. return s
  8339. }
  8340. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  8341. func (s *CreateMultipartUploadInput) SetObjectLockRetainUntilDate(v time.Time) *CreateMultipartUploadInput {
  8342. s.ObjectLockRetainUntilDate = &v
  8343. return s
  8344. }
  8345. // SetRequestPayer sets the RequestPayer field's value.
  8346. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  8347. s.RequestPayer = &v
  8348. return s
  8349. }
  8350. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  8351. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  8352. s.SSECustomerAlgorithm = &v
  8353. return s
  8354. }
  8355. // SetSSECustomerKey sets the SSECustomerKey field's value.
  8356. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  8357. s.SSECustomerKey = &v
  8358. return s
  8359. }
  8360. func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
  8361. if s.SSECustomerKey == nil {
  8362. return v
  8363. }
  8364. return *s.SSECustomerKey
  8365. }
  8366. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  8367. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  8368. s.SSECustomerKeyMD5 = &v
  8369. return s
  8370. }
  8371. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  8372. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  8373. s.SSEKMSKeyId = &v
  8374. return s
  8375. }
  8376. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  8377. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  8378. s.ServerSideEncryption = &v
  8379. return s
  8380. }
  8381. // SetStorageClass sets the StorageClass field's value.
  8382. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  8383. s.StorageClass = &v
  8384. return s
  8385. }
  8386. // SetTagging sets the Tagging field's value.
  8387. func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
  8388. s.Tagging = &v
  8389. return s
  8390. }
  8391. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  8392. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  8393. s.WebsiteRedirectLocation = &v
  8394. return s
  8395. }
  8396. type CreateMultipartUploadOutput struct {
  8397. _ struct{} `type:"structure"`
  8398. // Date when multipart upload will become eligible for abort operation by lifecycle.
  8399. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  8400. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  8401. // operation.
  8402. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  8403. // Name of the bucket to which the multipart upload was initiated.
  8404. Bucket *string `locationName:"Bucket" type:"string"`
  8405. // Object key for which the multipart upload was initiated.
  8406. Key *string `min:"1" type:"string"`
  8407. // If present, indicates that the requester was successfully charged for the
  8408. // request.
  8409. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8410. // If server-side encryption with a customer-provided encryption key was requested,
  8411. // the response will include this header confirming the encryption algorithm
  8412. // used.
  8413. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8414. // If server-side encryption with a customer-provided encryption key was requested,
  8415. // the response will include this header to provide round trip message integrity
  8416. // verification of the customer-provided encryption key.
  8417. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8418. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  8419. // encryption key that was used for the object.
  8420. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  8421. // The Server-side encryption algorithm used when storing this object in S3
  8422. // (e.g., AES256, aws:kms).
  8423. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  8424. // ID for the initiated multipart upload.
  8425. UploadId *string `type:"string"`
  8426. }
  8427. // String returns the string representation
  8428. func (s CreateMultipartUploadOutput) String() string {
  8429. return awsutil.Prettify(s)
  8430. }
  8431. // GoString returns the string representation
  8432. func (s CreateMultipartUploadOutput) GoString() string {
  8433. return s.String()
  8434. }
  8435. // SetAbortDate sets the AbortDate field's value.
  8436. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  8437. s.AbortDate = &v
  8438. return s
  8439. }
  8440. // SetAbortRuleId sets the AbortRuleId field's value.
  8441. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  8442. s.AbortRuleId = &v
  8443. return s
  8444. }
  8445. // SetBucket sets the Bucket field's value.
  8446. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  8447. s.Bucket = &v
  8448. return s
  8449. }
  8450. func (s *CreateMultipartUploadOutput) getBucket() (v string) {
  8451. if s.Bucket == nil {
  8452. return v
  8453. }
  8454. return *s.Bucket
  8455. }
  8456. // SetKey sets the Key field's value.
  8457. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  8458. s.Key = &v
  8459. return s
  8460. }
  8461. // SetRequestCharged sets the RequestCharged field's value.
  8462. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  8463. s.RequestCharged = &v
  8464. return s
  8465. }
  8466. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  8467. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  8468. s.SSECustomerAlgorithm = &v
  8469. return s
  8470. }
  8471. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  8472. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  8473. s.SSECustomerKeyMD5 = &v
  8474. return s
  8475. }
  8476. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  8477. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  8478. s.SSEKMSKeyId = &v
  8479. return s
  8480. }
  8481. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  8482. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  8483. s.ServerSideEncryption = &v
  8484. return s
  8485. }
  8486. // SetUploadId sets the UploadId field's value.
  8487. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  8488. s.UploadId = &v
  8489. return s
  8490. }
  8491. // The container element for specifying the default Object Lock retention settings
  8492. // for new objects placed in the specified bucket.
  8493. type DefaultRetention struct {
  8494. _ struct{} `type:"structure"`
  8495. // The number of days that you want to specify for the default retention period.
  8496. Days *int64 `type:"integer"`
  8497. // The default Object Lock retention mode you want to apply to new objects placed
  8498. // in the specified bucket.
  8499. Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
  8500. // The number of years that you want to specify for the default retention period.
  8501. Years *int64 `type:"integer"`
  8502. }
  8503. // String returns the string representation
  8504. func (s DefaultRetention) String() string {
  8505. return awsutil.Prettify(s)
  8506. }
  8507. // GoString returns the string representation
  8508. func (s DefaultRetention) GoString() string {
  8509. return s.String()
  8510. }
  8511. // SetDays sets the Days field's value.
  8512. func (s *DefaultRetention) SetDays(v int64) *DefaultRetention {
  8513. s.Days = &v
  8514. return s
  8515. }
  8516. // SetMode sets the Mode field's value.
  8517. func (s *DefaultRetention) SetMode(v string) *DefaultRetention {
  8518. s.Mode = &v
  8519. return s
  8520. }
  8521. // SetYears sets the Years field's value.
  8522. func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
  8523. s.Years = &v
  8524. return s
  8525. }
  8526. type Delete struct {
  8527. _ struct{} `type:"structure"`
  8528. // Objects is a required field
  8529. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  8530. // Element to enable quiet mode for the request. When you add this element,
  8531. // you must set its value to true.
  8532. Quiet *bool `type:"boolean"`
  8533. }
  8534. // String returns the string representation
  8535. func (s Delete) String() string {
  8536. return awsutil.Prettify(s)
  8537. }
  8538. // GoString returns the string representation
  8539. func (s Delete) GoString() string {
  8540. return s.String()
  8541. }
  8542. // Validate inspects the fields of the type to determine if they are valid.
  8543. func (s *Delete) Validate() error {
  8544. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  8545. if s.Objects == nil {
  8546. invalidParams.Add(request.NewErrParamRequired("Objects"))
  8547. }
  8548. if s.Objects != nil {
  8549. for i, v := range s.Objects {
  8550. if v == nil {
  8551. continue
  8552. }
  8553. if err := v.Validate(); err != nil {
  8554. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  8555. }
  8556. }
  8557. }
  8558. if invalidParams.Len() > 0 {
  8559. return invalidParams
  8560. }
  8561. return nil
  8562. }
  8563. // SetObjects sets the Objects field's value.
  8564. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  8565. s.Objects = v
  8566. return s
  8567. }
  8568. // SetQuiet sets the Quiet field's value.
  8569. func (s *Delete) SetQuiet(v bool) *Delete {
  8570. s.Quiet = &v
  8571. return s
  8572. }
  8573. type DeleteBucketAnalyticsConfigurationInput struct {
  8574. _ struct{} `type:"structure"`
  8575. // The name of the bucket from which an analytics configuration is deleted.
  8576. //
  8577. // Bucket is a required field
  8578. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8579. // The identifier used to represent an analytics configuration.
  8580. //
  8581. // Id is a required field
  8582. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8583. }
  8584. // String returns the string representation
  8585. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  8586. return awsutil.Prettify(s)
  8587. }
  8588. // GoString returns the string representation
  8589. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  8590. return s.String()
  8591. }
  8592. // Validate inspects the fields of the type to determine if they are valid.
  8593. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  8594. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  8595. if s.Bucket == nil {
  8596. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8597. }
  8598. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8599. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8600. }
  8601. if s.Id == nil {
  8602. invalidParams.Add(request.NewErrParamRequired("Id"))
  8603. }
  8604. if invalidParams.Len() > 0 {
  8605. return invalidParams
  8606. }
  8607. return nil
  8608. }
  8609. // SetBucket sets the Bucket field's value.
  8610. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  8611. s.Bucket = &v
  8612. return s
  8613. }
  8614. func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
  8615. if s.Bucket == nil {
  8616. return v
  8617. }
  8618. return *s.Bucket
  8619. }
  8620. // SetId sets the Id field's value.
  8621. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  8622. s.Id = &v
  8623. return s
  8624. }
  8625. type DeleteBucketAnalyticsConfigurationOutput struct {
  8626. _ struct{} `type:"structure"`
  8627. }
  8628. // String returns the string representation
  8629. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  8630. return awsutil.Prettify(s)
  8631. }
  8632. // GoString returns the string representation
  8633. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  8634. return s.String()
  8635. }
  8636. type DeleteBucketCorsInput struct {
  8637. _ struct{} `type:"structure"`
  8638. // Bucket is a required field
  8639. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8640. }
  8641. // String returns the string representation
  8642. func (s DeleteBucketCorsInput) String() string {
  8643. return awsutil.Prettify(s)
  8644. }
  8645. // GoString returns the string representation
  8646. func (s DeleteBucketCorsInput) GoString() string {
  8647. return s.String()
  8648. }
  8649. // Validate inspects the fields of the type to determine if they are valid.
  8650. func (s *DeleteBucketCorsInput) Validate() error {
  8651. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  8652. if s.Bucket == nil {
  8653. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8654. }
  8655. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8656. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8657. }
  8658. if invalidParams.Len() > 0 {
  8659. return invalidParams
  8660. }
  8661. return nil
  8662. }
  8663. // SetBucket sets the Bucket field's value.
  8664. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  8665. s.Bucket = &v
  8666. return s
  8667. }
  8668. func (s *DeleteBucketCorsInput) getBucket() (v string) {
  8669. if s.Bucket == nil {
  8670. return v
  8671. }
  8672. return *s.Bucket
  8673. }
  8674. type DeleteBucketCorsOutput struct {
  8675. _ struct{} `type:"structure"`
  8676. }
  8677. // String returns the string representation
  8678. func (s DeleteBucketCorsOutput) String() string {
  8679. return awsutil.Prettify(s)
  8680. }
  8681. // GoString returns the string representation
  8682. func (s DeleteBucketCorsOutput) GoString() string {
  8683. return s.String()
  8684. }
  8685. type DeleteBucketEncryptionInput struct {
  8686. _ struct{} `type:"structure"`
  8687. // The name of the bucket containing the server-side encryption configuration
  8688. // to delete.
  8689. //
  8690. // Bucket is a required field
  8691. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8692. }
  8693. // String returns the string representation
  8694. func (s DeleteBucketEncryptionInput) String() string {
  8695. return awsutil.Prettify(s)
  8696. }
  8697. // GoString returns the string representation
  8698. func (s DeleteBucketEncryptionInput) GoString() string {
  8699. return s.String()
  8700. }
  8701. // Validate inspects the fields of the type to determine if they are valid.
  8702. func (s *DeleteBucketEncryptionInput) Validate() error {
  8703. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
  8704. if s.Bucket == nil {
  8705. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8706. }
  8707. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8708. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8709. }
  8710. if invalidParams.Len() > 0 {
  8711. return invalidParams
  8712. }
  8713. return nil
  8714. }
  8715. // SetBucket sets the Bucket field's value.
  8716. func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
  8717. s.Bucket = &v
  8718. return s
  8719. }
  8720. func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
  8721. if s.Bucket == nil {
  8722. return v
  8723. }
  8724. return *s.Bucket
  8725. }
  8726. type DeleteBucketEncryptionOutput struct {
  8727. _ struct{} `type:"structure"`
  8728. }
  8729. // String returns the string representation
  8730. func (s DeleteBucketEncryptionOutput) String() string {
  8731. return awsutil.Prettify(s)
  8732. }
  8733. // GoString returns the string representation
  8734. func (s DeleteBucketEncryptionOutput) GoString() string {
  8735. return s.String()
  8736. }
  8737. type DeleteBucketInput struct {
  8738. _ struct{} `type:"structure"`
  8739. // Bucket is a required field
  8740. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8741. }
  8742. // String returns the string representation
  8743. func (s DeleteBucketInput) String() string {
  8744. return awsutil.Prettify(s)
  8745. }
  8746. // GoString returns the string representation
  8747. func (s DeleteBucketInput) GoString() string {
  8748. return s.String()
  8749. }
  8750. // Validate inspects the fields of the type to determine if they are valid.
  8751. func (s *DeleteBucketInput) Validate() error {
  8752. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  8753. if s.Bucket == nil {
  8754. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8755. }
  8756. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8757. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8758. }
  8759. if invalidParams.Len() > 0 {
  8760. return invalidParams
  8761. }
  8762. return nil
  8763. }
  8764. // SetBucket sets the Bucket field's value.
  8765. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  8766. s.Bucket = &v
  8767. return s
  8768. }
  8769. func (s *DeleteBucketInput) getBucket() (v string) {
  8770. if s.Bucket == nil {
  8771. return v
  8772. }
  8773. return *s.Bucket
  8774. }
  8775. type DeleteBucketInventoryConfigurationInput struct {
  8776. _ struct{} `type:"structure"`
  8777. // The name of the bucket containing the inventory configuration to delete.
  8778. //
  8779. // Bucket is a required field
  8780. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8781. // The ID used to identify the inventory configuration.
  8782. //
  8783. // Id is a required field
  8784. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8785. }
  8786. // String returns the string representation
  8787. func (s DeleteBucketInventoryConfigurationInput) String() string {
  8788. return awsutil.Prettify(s)
  8789. }
  8790. // GoString returns the string representation
  8791. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  8792. return s.String()
  8793. }
  8794. // Validate inspects the fields of the type to determine if they are valid.
  8795. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  8796. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  8797. if s.Bucket == nil {
  8798. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8799. }
  8800. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8801. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8802. }
  8803. if s.Id == nil {
  8804. invalidParams.Add(request.NewErrParamRequired("Id"))
  8805. }
  8806. if invalidParams.Len() > 0 {
  8807. return invalidParams
  8808. }
  8809. return nil
  8810. }
  8811. // SetBucket sets the Bucket field's value.
  8812. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  8813. s.Bucket = &v
  8814. return s
  8815. }
  8816. func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
  8817. if s.Bucket == nil {
  8818. return v
  8819. }
  8820. return *s.Bucket
  8821. }
  8822. // SetId sets the Id field's value.
  8823. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  8824. s.Id = &v
  8825. return s
  8826. }
  8827. type DeleteBucketInventoryConfigurationOutput struct {
  8828. _ struct{} `type:"structure"`
  8829. }
  8830. // String returns the string representation
  8831. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  8832. return awsutil.Prettify(s)
  8833. }
  8834. // GoString returns the string representation
  8835. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  8836. return s.String()
  8837. }
  8838. type DeleteBucketLifecycleInput struct {
  8839. _ struct{} `type:"structure"`
  8840. // Bucket is a required field
  8841. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8842. }
  8843. // String returns the string representation
  8844. func (s DeleteBucketLifecycleInput) String() string {
  8845. return awsutil.Prettify(s)
  8846. }
  8847. // GoString returns the string representation
  8848. func (s DeleteBucketLifecycleInput) GoString() string {
  8849. return s.String()
  8850. }
  8851. // Validate inspects the fields of the type to determine if they are valid.
  8852. func (s *DeleteBucketLifecycleInput) Validate() error {
  8853. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  8854. if s.Bucket == nil {
  8855. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8856. }
  8857. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8858. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8859. }
  8860. if invalidParams.Len() > 0 {
  8861. return invalidParams
  8862. }
  8863. return nil
  8864. }
  8865. // SetBucket sets the Bucket field's value.
  8866. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  8867. s.Bucket = &v
  8868. return s
  8869. }
  8870. func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
  8871. if s.Bucket == nil {
  8872. return v
  8873. }
  8874. return *s.Bucket
  8875. }
  8876. type DeleteBucketLifecycleOutput struct {
  8877. _ struct{} `type:"structure"`
  8878. }
  8879. // String returns the string representation
  8880. func (s DeleteBucketLifecycleOutput) String() string {
  8881. return awsutil.Prettify(s)
  8882. }
  8883. // GoString returns the string representation
  8884. func (s DeleteBucketLifecycleOutput) GoString() string {
  8885. return s.String()
  8886. }
  8887. type DeleteBucketMetricsConfigurationInput struct {
  8888. _ struct{} `type:"structure"`
  8889. // The name of the bucket containing the metrics configuration to delete.
  8890. //
  8891. // Bucket is a required field
  8892. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8893. // The ID used to identify the metrics configuration.
  8894. //
  8895. // Id is a required field
  8896. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8897. }
  8898. // String returns the string representation
  8899. func (s DeleteBucketMetricsConfigurationInput) String() string {
  8900. return awsutil.Prettify(s)
  8901. }
  8902. // GoString returns the string representation
  8903. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  8904. return s.String()
  8905. }
  8906. // Validate inspects the fields of the type to determine if they are valid.
  8907. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  8908. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  8909. if s.Bucket == nil {
  8910. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8911. }
  8912. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8913. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8914. }
  8915. if s.Id == nil {
  8916. invalidParams.Add(request.NewErrParamRequired("Id"))
  8917. }
  8918. if invalidParams.Len() > 0 {
  8919. return invalidParams
  8920. }
  8921. return nil
  8922. }
  8923. // SetBucket sets the Bucket field's value.
  8924. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  8925. s.Bucket = &v
  8926. return s
  8927. }
  8928. func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
  8929. if s.Bucket == nil {
  8930. return v
  8931. }
  8932. return *s.Bucket
  8933. }
  8934. // SetId sets the Id field's value.
  8935. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  8936. s.Id = &v
  8937. return s
  8938. }
  8939. type DeleteBucketMetricsConfigurationOutput struct {
  8940. _ struct{} `type:"structure"`
  8941. }
  8942. // String returns the string representation
  8943. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  8944. return awsutil.Prettify(s)
  8945. }
  8946. // GoString returns the string representation
  8947. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  8948. return s.String()
  8949. }
  8950. type DeleteBucketOutput struct {
  8951. _ struct{} `type:"structure"`
  8952. }
  8953. // String returns the string representation
  8954. func (s DeleteBucketOutput) String() string {
  8955. return awsutil.Prettify(s)
  8956. }
  8957. // GoString returns the string representation
  8958. func (s DeleteBucketOutput) GoString() string {
  8959. return s.String()
  8960. }
  8961. type DeleteBucketPolicyInput struct {
  8962. _ struct{} `type:"structure"`
  8963. // Bucket is a required field
  8964. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8965. }
  8966. // String returns the string representation
  8967. func (s DeleteBucketPolicyInput) String() string {
  8968. return awsutil.Prettify(s)
  8969. }
  8970. // GoString returns the string representation
  8971. func (s DeleteBucketPolicyInput) GoString() string {
  8972. return s.String()
  8973. }
  8974. // Validate inspects the fields of the type to determine if they are valid.
  8975. func (s *DeleteBucketPolicyInput) Validate() error {
  8976. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  8977. if s.Bucket == nil {
  8978. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8979. }
  8980. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8981. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8982. }
  8983. if invalidParams.Len() > 0 {
  8984. return invalidParams
  8985. }
  8986. return nil
  8987. }
  8988. // SetBucket sets the Bucket field's value.
  8989. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  8990. s.Bucket = &v
  8991. return s
  8992. }
  8993. func (s *DeleteBucketPolicyInput) getBucket() (v string) {
  8994. if s.Bucket == nil {
  8995. return v
  8996. }
  8997. return *s.Bucket
  8998. }
  8999. type DeleteBucketPolicyOutput struct {
  9000. _ struct{} `type:"structure"`
  9001. }
  9002. // String returns the string representation
  9003. func (s DeleteBucketPolicyOutput) String() string {
  9004. return awsutil.Prettify(s)
  9005. }
  9006. // GoString returns the string representation
  9007. func (s DeleteBucketPolicyOutput) GoString() string {
  9008. return s.String()
  9009. }
  9010. type DeleteBucketReplicationInput struct {
  9011. _ struct{} `type:"structure"`
  9012. // The bucket name.
  9013. //
  9014. // It can take a while to propagate the deletion of a replication configuration
  9015. // to all Amazon S3 systems.
  9016. //
  9017. // Bucket is a required field
  9018. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9019. }
  9020. // String returns the string representation
  9021. func (s DeleteBucketReplicationInput) String() string {
  9022. return awsutil.Prettify(s)
  9023. }
  9024. // GoString returns the string representation
  9025. func (s DeleteBucketReplicationInput) GoString() string {
  9026. return s.String()
  9027. }
  9028. // Validate inspects the fields of the type to determine if they are valid.
  9029. func (s *DeleteBucketReplicationInput) Validate() error {
  9030. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  9031. if s.Bucket == nil {
  9032. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9033. }
  9034. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9035. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9036. }
  9037. if invalidParams.Len() > 0 {
  9038. return invalidParams
  9039. }
  9040. return nil
  9041. }
  9042. // SetBucket sets the Bucket field's value.
  9043. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  9044. s.Bucket = &v
  9045. return s
  9046. }
  9047. func (s *DeleteBucketReplicationInput) getBucket() (v string) {
  9048. if s.Bucket == nil {
  9049. return v
  9050. }
  9051. return *s.Bucket
  9052. }
  9053. type DeleteBucketReplicationOutput struct {
  9054. _ struct{} `type:"structure"`
  9055. }
  9056. // String returns the string representation
  9057. func (s DeleteBucketReplicationOutput) String() string {
  9058. return awsutil.Prettify(s)
  9059. }
  9060. // GoString returns the string representation
  9061. func (s DeleteBucketReplicationOutput) GoString() string {
  9062. return s.String()
  9063. }
  9064. type DeleteBucketTaggingInput struct {
  9065. _ struct{} `type:"structure"`
  9066. // Bucket is a required field
  9067. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9068. }
  9069. // String returns the string representation
  9070. func (s DeleteBucketTaggingInput) String() string {
  9071. return awsutil.Prettify(s)
  9072. }
  9073. // GoString returns the string representation
  9074. func (s DeleteBucketTaggingInput) GoString() string {
  9075. return s.String()
  9076. }
  9077. // Validate inspects the fields of the type to determine if they are valid.
  9078. func (s *DeleteBucketTaggingInput) Validate() error {
  9079. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  9080. if s.Bucket == nil {
  9081. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9082. }
  9083. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9084. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9085. }
  9086. if invalidParams.Len() > 0 {
  9087. return invalidParams
  9088. }
  9089. return nil
  9090. }
  9091. // SetBucket sets the Bucket field's value.
  9092. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  9093. s.Bucket = &v
  9094. return s
  9095. }
  9096. func (s *DeleteBucketTaggingInput) getBucket() (v string) {
  9097. if s.Bucket == nil {
  9098. return v
  9099. }
  9100. return *s.Bucket
  9101. }
  9102. type DeleteBucketTaggingOutput struct {
  9103. _ struct{} `type:"structure"`
  9104. }
  9105. // String returns the string representation
  9106. func (s DeleteBucketTaggingOutput) String() string {
  9107. return awsutil.Prettify(s)
  9108. }
  9109. // GoString returns the string representation
  9110. func (s DeleteBucketTaggingOutput) GoString() string {
  9111. return s.String()
  9112. }
  9113. type DeleteBucketWebsiteInput struct {
  9114. _ struct{} `type:"structure"`
  9115. // Bucket is a required field
  9116. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9117. }
  9118. // String returns the string representation
  9119. func (s DeleteBucketWebsiteInput) String() string {
  9120. return awsutil.Prettify(s)
  9121. }
  9122. // GoString returns the string representation
  9123. func (s DeleteBucketWebsiteInput) GoString() string {
  9124. return s.String()
  9125. }
  9126. // Validate inspects the fields of the type to determine if they are valid.
  9127. func (s *DeleteBucketWebsiteInput) Validate() error {
  9128. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  9129. if s.Bucket == nil {
  9130. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9131. }
  9132. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9133. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9134. }
  9135. if invalidParams.Len() > 0 {
  9136. return invalidParams
  9137. }
  9138. return nil
  9139. }
  9140. // SetBucket sets the Bucket field's value.
  9141. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  9142. s.Bucket = &v
  9143. return s
  9144. }
  9145. func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
  9146. if s.Bucket == nil {
  9147. return v
  9148. }
  9149. return *s.Bucket
  9150. }
  9151. type DeleteBucketWebsiteOutput struct {
  9152. _ struct{} `type:"structure"`
  9153. }
  9154. // String returns the string representation
  9155. func (s DeleteBucketWebsiteOutput) String() string {
  9156. return awsutil.Prettify(s)
  9157. }
  9158. // GoString returns the string representation
  9159. func (s DeleteBucketWebsiteOutput) GoString() string {
  9160. return s.String()
  9161. }
  9162. type DeleteMarkerEntry struct {
  9163. _ struct{} `type:"structure"`
  9164. // Specifies whether the object is (true) or is not (false) the latest version
  9165. // of an object.
  9166. IsLatest *bool `type:"boolean"`
  9167. // The object key.
  9168. Key *string `min:"1" type:"string"`
  9169. // Date and time the object was last modified.
  9170. LastModified *time.Time `type:"timestamp"`
  9171. Owner *Owner `type:"structure"`
  9172. // Version ID of an object.
  9173. VersionId *string `type:"string"`
  9174. }
  9175. // String returns the string representation
  9176. func (s DeleteMarkerEntry) String() string {
  9177. return awsutil.Prettify(s)
  9178. }
  9179. // GoString returns the string representation
  9180. func (s DeleteMarkerEntry) GoString() string {
  9181. return s.String()
  9182. }
  9183. // SetIsLatest sets the IsLatest field's value.
  9184. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  9185. s.IsLatest = &v
  9186. return s
  9187. }
  9188. // SetKey sets the Key field's value.
  9189. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  9190. s.Key = &v
  9191. return s
  9192. }
  9193. // SetLastModified sets the LastModified field's value.
  9194. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  9195. s.LastModified = &v
  9196. return s
  9197. }
  9198. // SetOwner sets the Owner field's value.
  9199. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  9200. s.Owner = v
  9201. return s
  9202. }
  9203. // SetVersionId sets the VersionId field's value.
  9204. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  9205. s.VersionId = &v
  9206. return s
  9207. }
  9208. // Specifies whether Amazon S3 should replicate delete makers.
  9209. type DeleteMarkerReplication struct {
  9210. _ struct{} `type:"structure"`
  9211. // The status of the delete marker replication.
  9212. //
  9213. // In the current implementation, Amazon S3 doesn't replicate the delete markers.
  9214. // The status must be Disabled.
  9215. Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"`
  9216. }
  9217. // String returns the string representation
  9218. func (s DeleteMarkerReplication) String() string {
  9219. return awsutil.Prettify(s)
  9220. }
  9221. // GoString returns the string representation
  9222. func (s DeleteMarkerReplication) GoString() string {
  9223. return s.String()
  9224. }
  9225. // SetStatus sets the Status field's value.
  9226. func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication {
  9227. s.Status = &v
  9228. return s
  9229. }
  9230. type DeleteObjectInput struct {
  9231. _ struct{} `type:"structure"`
  9232. // Bucket is a required field
  9233. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9234. // Indicates whether S3 Object Lock should bypass Governance-mode restrictions
  9235. // to process this operation.
  9236. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  9237. // Key is a required field
  9238. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9239. // The concatenation of the authentication device's serial number, a space,
  9240. // and the value that is displayed on your authentication device.
  9241. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  9242. // Confirms that the requester knows that she or he will be charged for the
  9243. // request. Bucket owners need not specify this parameter in their requests.
  9244. // Documentation on downloading objects from requester pays buckets can be found
  9245. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9246. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9247. // VersionId used to reference a specific version of the object.
  9248. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9249. }
  9250. // String returns the string representation
  9251. func (s DeleteObjectInput) String() string {
  9252. return awsutil.Prettify(s)
  9253. }
  9254. // GoString returns the string representation
  9255. func (s DeleteObjectInput) GoString() string {
  9256. return s.String()
  9257. }
  9258. // Validate inspects the fields of the type to determine if they are valid.
  9259. func (s *DeleteObjectInput) Validate() error {
  9260. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  9261. if s.Bucket == nil {
  9262. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9263. }
  9264. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9265. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9266. }
  9267. if s.Key == nil {
  9268. invalidParams.Add(request.NewErrParamRequired("Key"))
  9269. }
  9270. if s.Key != nil && len(*s.Key) < 1 {
  9271. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9272. }
  9273. if invalidParams.Len() > 0 {
  9274. return invalidParams
  9275. }
  9276. return nil
  9277. }
  9278. // SetBucket sets the Bucket field's value.
  9279. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  9280. s.Bucket = &v
  9281. return s
  9282. }
  9283. func (s *DeleteObjectInput) getBucket() (v string) {
  9284. if s.Bucket == nil {
  9285. return v
  9286. }
  9287. return *s.Bucket
  9288. }
  9289. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  9290. func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput {
  9291. s.BypassGovernanceRetention = &v
  9292. return s
  9293. }
  9294. // SetKey sets the Key field's value.
  9295. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  9296. s.Key = &v
  9297. return s
  9298. }
  9299. // SetMFA sets the MFA field's value.
  9300. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  9301. s.MFA = &v
  9302. return s
  9303. }
  9304. // SetRequestPayer sets the RequestPayer field's value.
  9305. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  9306. s.RequestPayer = &v
  9307. return s
  9308. }
  9309. // SetVersionId sets the VersionId field's value.
  9310. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  9311. s.VersionId = &v
  9312. return s
  9313. }
  9314. type DeleteObjectOutput struct {
  9315. _ struct{} `type:"structure"`
  9316. // Specifies whether the versioned object that was permanently deleted was (true)
  9317. // or was not (false) a delete marker.
  9318. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  9319. // If present, indicates that the requester was successfully charged for the
  9320. // request.
  9321. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9322. // Returns the version ID of the delete marker created as a result of the DELETE
  9323. // operation.
  9324. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9325. }
  9326. // String returns the string representation
  9327. func (s DeleteObjectOutput) String() string {
  9328. return awsutil.Prettify(s)
  9329. }
  9330. // GoString returns the string representation
  9331. func (s DeleteObjectOutput) GoString() string {
  9332. return s.String()
  9333. }
  9334. // SetDeleteMarker sets the DeleteMarker field's value.
  9335. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  9336. s.DeleteMarker = &v
  9337. return s
  9338. }
  9339. // SetRequestCharged sets the RequestCharged field's value.
  9340. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  9341. s.RequestCharged = &v
  9342. return s
  9343. }
  9344. // SetVersionId sets the VersionId field's value.
  9345. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  9346. s.VersionId = &v
  9347. return s
  9348. }
  9349. type DeleteObjectTaggingInput struct {
  9350. _ struct{} `type:"structure"`
  9351. // Bucket is a required field
  9352. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9353. // Key is a required field
  9354. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9355. // The versionId of the object that the tag-set will be removed from.
  9356. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9357. }
  9358. // String returns the string representation
  9359. func (s DeleteObjectTaggingInput) String() string {
  9360. return awsutil.Prettify(s)
  9361. }
  9362. // GoString returns the string representation
  9363. func (s DeleteObjectTaggingInput) GoString() string {
  9364. return s.String()
  9365. }
  9366. // Validate inspects the fields of the type to determine if they are valid.
  9367. func (s *DeleteObjectTaggingInput) Validate() error {
  9368. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  9369. if s.Bucket == nil {
  9370. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9371. }
  9372. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9373. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9374. }
  9375. if s.Key == nil {
  9376. invalidParams.Add(request.NewErrParamRequired("Key"))
  9377. }
  9378. if s.Key != nil && len(*s.Key) < 1 {
  9379. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9380. }
  9381. if invalidParams.Len() > 0 {
  9382. return invalidParams
  9383. }
  9384. return nil
  9385. }
  9386. // SetBucket sets the Bucket field's value.
  9387. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  9388. s.Bucket = &v
  9389. return s
  9390. }
  9391. func (s *DeleteObjectTaggingInput) getBucket() (v string) {
  9392. if s.Bucket == nil {
  9393. return v
  9394. }
  9395. return *s.Bucket
  9396. }
  9397. // SetKey sets the Key field's value.
  9398. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  9399. s.Key = &v
  9400. return s
  9401. }
  9402. // SetVersionId sets the VersionId field's value.
  9403. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  9404. s.VersionId = &v
  9405. return s
  9406. }
  9407. type DeleteObjectTaggingOutput struct {
  9408. _ struct{} `type:"structure"`
  9409. // The versionId of the object the tag-set was removed from.
  9410. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9411. }
  9412. // String returns the string representation
  9413. func (s DeleteObjectTaggingOutput) String() string {
  9414. return awsutil.Prettify(s)
  9415. }
  9416. // GoString returns the string representation
  9417. func (s DeleteObjectTaggingOutput) GoString() string {
  9418. return s.String()
  9419. }
  9420. // SetVersionId sets the VersionId field's value.
  9421. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  9422. s.VersionId = &v
  9423. return s
  9424. }
  9425. type DeleteObjectsInput struct {
  9426. _ struct{} `type:"structure" payload:"Delete"`
  9427. // Bucket is a required field
  9428. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9429. // Specifies whether you want to delete this object even if it has a Governance-type
  9430. // Object Lock in place. You must have sufficient permissions to perform this
  9431. // operation.
  9432. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  9433. // Delete is a required field
  9434. Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  9435. // The concatenation of the authentication device's serial number, a space,
  9436. // and the value that is displayed on your authentication device.
  9437. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  9438. // Confirms that the requester knows that she or he will be charged for the
  9439. // request. Bucket owners need not specify this parameter in their requests.
  9440. // Documentation on downloading objects from requester pays buckets can be found
  9441. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9442. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9443. }
  9444. // String returns the string representation
  9445. func (s DeleteObjectsInput) String() string {
  9446. return awsutil.Prettify(s)
  9447. }
  9448. // GoString returns the string representation
  9449. func (s DeleteObjectsInput) GoString() string {
  9450. return s.String()
  9451. }
  9452. // Validate inspects the fields of the type to determine if they are valid.
  9453. func (s *DeleteObjectsInput) Validate() error {
  9454. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  9455. if s.Bucket == nil {
  9456. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9457. }
  9458. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9459. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9460. }
  9461. if s.Delete == nil {
  9462. invalidParams.Add(request.NewErrParamRequired("Delete"))
  9463. }
  9464. if s.Delete != nil {
  9465. if err := s.Delete.Validate(); err != nil {
  9466. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  9467. }
  9468. }
  9469. if invalidParams.Len() > 0 {
  9470. return invalidParams
  9471. }
  9472. return nil
  9473. }
  9474. // SetBucket sets the Bucket field's value.
  9475. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  9476. s.Bucket = &v
  9477. return s
  9478. }
  9479. func (s *DeleteObjectsInput) getBucket() (v string) {
  9480. if s.Bucket == nil {
  9481. return v
  9482. }
  9483. return *s.Bucket
  9484. }
  9485. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  9486. func (s *DeleteObjectsInput) SetBypassGovernanceRetention(v bool) *DeleteObjectsInput {
  9487. s.BypassGovernanceRetention = &v
  9488. return s
  9489. }
  9490. // SetDelete sets the Delete field's value.
  9491. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  9492. s.Delete = v
  9493. return s
  9494. }
  9495. // SetMFA sets the MFA field's value.
  9496. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  9497. s.MFA = &v
  9498. return s
  9499. }
  9500. // SetRequestPayer sets the RequestPayer field's value.
  9501. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  9502. s.RequestPayer = &v
  9503. return s
  9504. }
  9505. type DeleteObjectsOutput struct {
  9506. _ struct{} `type:"structure"`
  9507. Deleted []*DeletedObject `type:"list" flattened:"true"`
  9508. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  9509. // If present, indicates that the requester was successfully charged for the
  9510. // request.
  9511. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9512. }
  9513. // String returns the string representation
  9514. func (s DeleteObjectsOutput) String() string {
  9515. return awsutil.Prettify(s)
  9516. }
  9517. // GoString returns the string representation
  9518. func (s DeleteObjectsOutput) GoString() string {
  9519. return s.String()
  9520. }
  9521. // SetDeleted sets the Deleted field's value.
  9522. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  9523. s.Deleted = v
  9524. return s
  9525. }
  9526. // SetErrors sets the Errors field's value.
  9527. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  9528. s.Errors = v
  9529. return s
  9530. }
  9531. // SetRequestCharged sets the RequestCharged field's value.
  9532. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  9533. s.RequestCharged = &v
  9534. return s
  9535. }
  9536. type DeletePublicAccessBlockInput struct {
  9537. _ struct{} `type:"structure"`
  9538. // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.
  9539. //
  9540. // Bucket is a required field
  9541. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9542. }
  9543. // String returns the string representation
  9544. func (s DeletePublicAccessBlockInput) String() string {
  9545. return awsutil.Prettify(s)
  9546. }
  9547. // GoString returns the string representation
  9548. func (s DeletePublicAccessBlockInput) GoString() string {
  9549. return s.String()
  9550. }
  9551. // Validate inspects the fields of the type to determine if they are valid.
  9552. func (s *DeletePublicAccessBlockInput) Validate() error {
  9553. invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"}
  9554. if s.Bucket == nil {
  9555. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9556. }
  9557. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9558. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9559. }
  9560. if invalidParams.Len() > 0 {
  9561. return invalidParams
  9562. }
  9563. return nil
  9564. }
  9565. // SetBucket sets the Bucket field's value.
  9566. func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput {
  9567. s.Bucket = &v
  9568. return s
  9569. }
  9570. func (s *DeletePublicAccessBlockInput) getBucket() (v string) {
  9571. if s.Bucket == nil {
  9572. return v
  9573. }
  9574. return *s.Bucket
  9575. }
  9576. type DeletePublicAccessBlockOutput struct {
  9577. _ struct{} `type:"structure"`
  9578. }
  9579. // String returns the string representation
  9580. func (s DeletePublicAccessBlockOutput) String() string {
  9581. return awsutil.Prettify(s)
  9582. }
  9583. // GoString returns the string representation
  9584. func (s DeletePublicAccessBlockOutput) GoString() string {
  9585. return s.String()
  9586. }
  9587. type DeletedObject struct {
  9588. _ struct{} `type:"structure"`
  9589. DeleteMarker *bool `type:"boolean"`
  9590. DeleteMarkerVersionId *string `type:"string"`
  9591. Key *string `min:"1" type:"string"`
  9592. VersionId *string `type:"string"`
  9593. }
  9594. // String returns the string representation
  9595. func (s DeletedObject) String() string {
  9596. return awsutil.Prettify(s)
  9597. }
  9598. // GoString returns the string representation
  9599. func (s DeletedObject) GoString() string {
  9600. return s.String()
  9601. }
  9602. // SetDeleteMarker sets the DeleteMarker field's value.
  9603. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  9604. s.DeleteMarker = &v
  9605. return s
  9606. }
  9607. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  9608. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  9609. s.DeleteMarkerVersionId = &v
  9610. return s
  9611. }
  9612. // SetKey sets the Key field's value.
  9613. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  9614. s.Key = &v
  9615. return s
  9616. }
  9617. // SetVersionId sets the VersionId field's value.
  9618. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  9619. s.VersionId = &v
  9620. return s
  9621. }
  9622. // A container for information about the replication destination.
  9623. type Destination struct {
  9624. _ struct{} `type:"structure"`
  9625. // A container for information about access control for replicas.
  9626. //
  9627. // Use this element only in a cross-account scenario where source and destination
  9628. // bucket owners are not the same to change replica ownership to the AWS account
  9629. // that owns the destination bucket. If you don't add this element to the replication
  9630. // configuration, the replicas are owned by same AWS account that owns the source
  9631. // object.
  9632. AccessControlTranslation *AccessControlTranslation `type:"structure"`
  9633. // The account ID of the destination bucket. Currently, Amazon S3 verifies this
  9634. // value only if Access Control Translation is enabled.
  9635. //
  9636. // In a cross-account scenario, if you change replica ownership to the AWS account
  9637. // that owns the destination bucket by adding the AccessControlTranslation element,
  9638. // this is the account ID of the owner of the destination bucket.
  9639. Account *string `type:"string"`
  9640. // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
  9641. // store replicas of the object identified by the rule.
  9642. //
  9643. // If there are multiple rules in your replication configuration, all rules
  9644. // must specify the same bucket as the destination. A replication configuration
  9645. // can replicate objects to only one destination bucket.
  9646. //
  9647. // Bucket is a required field
  9648. Bucket *string `type:"string" required:"true"`
  9649. // A container that provides information about encryption. If SourceSelectionCriteria
  9650. // is specified, you must specify this element.
  9651. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  9652. // The class of storage used to store the object. By default Amazon S3 uses
  9653. // storage class of the source object when creating a replica.
  9654. StorageClass *string `type:"string" enum:"StorageClass"`
  9655. }
  9656. // String returns the string representation
  9657. func (s Destination) String() string {
  9658. return awsutil.Prettify(s)
  9659. }
  9660. // GoString returns the string representation
  9661. func (s Destination) GoString() string {
  9662. return s.String()
  9663. }
  9664. // Validate inspects the fields of the type to determine if they are valid.
  9665. func (s *Destination) Validate() error {
  9666. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  9667. if s.Bucket == nil {
  9668. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9669. }
  9670. if s.AccessControlTranslation != nil {
  9671. if err := s.AccessControlTranslation.Validate(); err != nil {
  9672. invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
  9673. }
  9674. }
  9675. if invalidParams.Len() > 0 {
  9676. return invalidParams
  9677. }
  9678. return nil
  9679. }
  9680. // SetAccessControlTranslation sets the AccessControlTranslation field's value.
  9681. func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
  9682. s.AccessControlTranslation = v
  9683. return s
  9684. }
  9685. // SetAccount sets the Account field's value.
  9686. func (s *Destination) SetAccount(v string) *Destination {
  9687. s.Account = &v
  9688. return s
  9689. }
  9690. // SetBucket sets the Bucket field's value.
  9691. func (s *Destination) SetBucket(v string) *Destination {
  9692. s.Bucket = &v
  9693. return s
  9694. }
  9695. func (s *Destination) getBucket() (v string) {
  9696. if s.Bucket == nil {
  9697. return v
  9698. }
  9699. return *s.Bucket
  9700. }
  9701. // SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
  9702. func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
  9703. s.EncryptionConfiguration = v
  9704. return s
  9705. }
  9706. // SetStorageClass sets the StorageClass field's value.
  9707. func (s *Destination) SetStorageClass(v string) *Destination {
  9708. s.StorageClass = &v
  9709. return s
  9710. }
  9711. // Describes the server-side encryption that will be applied to the restore
  9712. // results.
  9713. type Encryption struct {
  9714. _ struct{} `type:"structure"`
  9715. // The server-side encryption algorithm used when storing job results in Amazon
  9716. // S3 (e.g., AES256, aws:kms).
  9717. //
  9718. // EncryptionType is a required field
  9719. EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  9720. // If the encryption type is aws:kms, this optional value can be used to specify
  9721. // the encryption context for the restore results.
  9722. KMSContext *string `type:"string"`
  9723. // If the encryption type is aws:kms, this optional value specifies the AWS
  9724. // KMS key ID to use for encryption of job results.
  9725. KMSKeyId *string `type:"string" sensitive:"true"`
  9726. }
  9727. // String returns the string representation
  9728. func (s Encryption) String() string {
  9729. return awsutil.Prettify(s)
  9730. }
  9731. // GoString returns the string representation
  9732. func (s Encryption) GoString() string {
  9733. return s.String()
  9734. }
  9735. // Validate inspects the fields of the type to determine if they are valid.
  9736. func (s *Encryption) Validate() error {
  9737. invalidParams := request.ErrInvalidParams{Context: "Encryption"}
  9738. if s.EncryptionType == nil {
  9739. invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  9740. }
  9741. if invalidParams.Len() > 0 {
  9742. return invalidParams
  9743. }
  9744. return nil
  9745. }
  9746. // SetEncryptionType sets the EncryptionType field's value.
  9747. func (s *Encryption) SetEncryptionType(v string) *Encryption {
  9748. s.EncryptionType = &v
  9749. return s
  9750. }
  9751. // SetKMSContext sets the KMSContext field's value.
  9752. func (s *Encryption) SetKMSContext(v string) *Encryption {
  9753. s.KMSContext = &v
  9754. return s
  9755. }
  9756. // SetKMSKeyId sets the KMSKeyId field's value.
  9757. func (s *Encryption) SetKMSKeyId(v string) *Encryption {
  9758. s.KMSKeyId = &v
  9759. return s
  9760. }
  9761. // A container for information about the encryption-based configuration for
  9762. // replicas.
  9763. type EncryptionConfiguration struct {
  9764. _ struct{} `type:"structure"`
  9765. // The ID of the AWS KMS key for the AWS Region where the destination bucket
  9766. // resides. Amazon S3 uses this key to encrypt the replica object.
  9767. ReplicaKmsKeyID *string `type:"string"`
  9768. }
  9769. // String returns the string representation
  9770. func (s EncryptionConfiguration) String() string {
  9771. return awsutil.Prettify(s)
  9772. }
  9773. // GoString returns the string representation
  9774. func (s EncryptionConfiguration) GoString() string {
  9775. return s.String()
  9776. }
  9777. // SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
  9778. func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
  9779. s.ReplicaKmsKeyID = &v
  9780. return s
  9781. }
  9782. type EndEvent struct {
  9783. _ struct{} `locationName:"EndEvent" type:"structure"`
  9784. }
  9785. // String returns the string representation
  9786. func (s EndEvent) String() string {
  9787. return awsutil.Prettify(s)
  9788. }
  9789. // GoString returns the string representation
  9790. func (s EndEvent) GoString() string {
  9791. return s.String()
  9792. }
  9793. // The EndEvent is and event in the SelectObjectContentEventStream group of events.
  9794. func (s *EndEvent) eventSelectObjectContentEventStream() {}
  9795. // UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
  9796. // This method is only used internally within the SDK's EventStream handling.
  9797. func (s *EndEvent) UnmarshalEvent(
  9798. payloadUnmarshaler protocol.PayloadUnmarshaler,
  9799. msg eventstream.Message,
  9800. ) error {
  9801. return nil
  9802. }
  9803. type Error struct {
  9804. _ struct{} `type:"structure"`
  9805. Code *string `type:"string"`
  9806. Key *string `min:"1" type:"string"`
  9807. Message *string `type:"string"`
  9808. VersionId *string `type:"string"`
  9809. }
  9810. // String returns the string representation
  9811. func (s Error) String() string {
  9812. return awsutil.Prettify(s)
  9813. }
  9814. // GoString returns the string representation
  9815. func (s Error) GoString() string {
  9816. return s.String()
  9817. }
  9818. // SetCode sets the Code field's value.
  9819. func (s *Error) SetCode(v string) *Error {
  9820. s.Code = &v
  9821. return s
  9822. }
  9823. // SetKey sets the Key field's value.
  9824. func (s *Error) SetKey(v string) *Error {
  9825. s.Key = &v
  9826. return s
  9827. }
  9828. // SetMessage sets the Message field's value.
  9829. func (s *Error) SetMessage(v string) *Error {
  9830. s.Message = &v
  9831. return s
  9832. }
  9833. // SetVersionId sets the VersionId field's value.
  9834. func (s *Error) SetVersionId(v string) *Error {
  9835. s.VersionId = &v
  9836. return s
  9837. }
  9838. type ErrorDocument struct {
  9839. _ struct{} `type:"structure"`
  9840. // The object key name to use when a 4XX class error occurs.
  9841. //
  9842. // Key is a required field
  9843. Key *string `min:"1" type:"string" required:"true"`
  9844. }
  9845. // String returns the string representation
  9846. func (s ErrorDocument) String() string {
  9847. return awsutil.Prettify(s)
  9848. }
  9849. // GoString returns the string representation
  9850. func (s ErrorDocument) GoString() string {
  9851. return s.String()
  9852. }
  9853. // Validate inspects the fields of the type to determine if they are valid.
  9854. func (s *ErrorDocument) Validate() error {
  9855. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  9856. if s.Key == nil {
  9857. invalidParams.Add(request.NewErrParamRequired("Key"))
  9858. }
  9859. if s.Key != nil && len(*s.Key) < 1 {
  9860. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9861. }
  9862. if invalidParams.Len() > 0 {
  9863. return invalidParams
  9864. }
  9865. return nil
  9866. }
  9867. // SetKey sets the Key field's value.
  9868. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  9869. s.Key = &v
  9870. return s
  9871. }
  9872. // A container for a key value pair that defines the criteria for the filter
  9873. // rule.
  9874. type FilterRule struct {
  9875. _ struct{} `type:"structure"`
  9876. // The object key name prefix or suffix identifying one or more objects to which
  9877. // the filtering rule applies. The maximum prefix length is 1,024 characters.
  9878. // Overlapping prefixes and suffixes are not supported. For more information,
  9879. // see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  9880. // in the Amazon Simple Storage Service Developer Guide.
  9881. Name *string `type:"string" enum:"FilterRuleName"`
  9882. Value *string `type:"string"`
  9883. }
  9884. // String returns the string representation
  9885. func (s FilterRule) String() string {
  9886. return awsutil.Prettify(s)
  9887. }
  9888. // GoString returns the string representation
  9889. func (s FilterRule) GoString() string {
  9890. return s.String()
  9891. }
  9892. // SetName sets the Name field's value.
  9893. func (s *FilterRule) SetName(v string) *FilterRule {
  9894. s.Name = &v
  9895. return s
  9896. }
  9897. // SetValue sets the Value field's value.
  9898. func (s *FilterRule) SetValue(v string) *FilterRule {
  9899. s.Value = &v
  9900. return s
  9901. }
  9902. type GetBucketAccelerateConfigurationInput struct {
  9903. _ struct{} `type:"structure"`
  9904. // Name of the bucket for which the accelerate configuration is retrieved.
  9905. //
  9906. // Bucket is a required field
  9907. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9908. }
  9909. // String returns the string representation
  9910. func (s GetBucketAccelerateConfigurationInput) String() string {
  9911. return awsutil.Prettify(s)
  9912. }
  9913. // GoString returns the string representation
  9914. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  9915. return s.String()
  9916. }
  9917. // Validate inspects the fields of the type to determine if they are valid.
  9918. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  9919. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  9920. if s.Bucket == nil {
  9921. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9922. }
  9923. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9924. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9925. }
  9926. if invalidParams.Len() > 0 {
  9927. return invalidParams
  9928. }
  9929. return nil
  9930. }
  9931. // SetBucket sets the Bucket field's value.
  9932. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  9933. s.Bucket = &v
  9934. return s
  9935. }
  9936. func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
  9937. if s.Bucket == nil {
  9938. return v
  9939. }
  9940. return *s.Bucket
  9941. }
  9942. type GetBucketAccelerateConfigurationOutput struct {
  9943. _ struct{} `type:"structure"`
  9944. // The accelerate configuration of the bucket.
  9945. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  9946. }
  9947. // String returns the string representation
  9948. func (s GetBucketAccelerateConfigurationOutput) String() string {
  9949. return awsutil.Prettify(s)
  9950. }
  9951. // GoString returns the string representation
  9952. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  9953. return s.String()
  9954. }
  9955. // SetStatus sets the Status field's value.
  9956. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  9957. s.Status = &v
  9958. return s
  9959. }
  9960. type GetBucketAclInput struct {
  9961. _ struct{} `type:"structure"`
  9962. // Bucket is a required field
  9963. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9964. }
  9965. // String returns the string representation
  9966. func (s GetBucketAclInput) String() string {
  9967. return awsutil.Prettify(s)
  9968. }
  9969. // GoString returns the string representation
  9970. func (s GetBucketAclInput) GoString() string {
  9971. return s.String()
  9972. }
  9973. // Validate inspects the fields of the type to determine if they are valid.
  9974. func (s *GetBucketAclInput) Validate() error {
  9975. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  9976. if s.Bucket == nil {
  9977. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9978. }
  9979. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9980. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9981. }
  9982. if invalidParams.Len() > 0 {
  9983. return invalidParams
  9984. }
  9985. return nil
  9986. }
  9987. // SetBucket sets the Bucket field's value.
  9988. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  9989. s.Bucket = &v
  9990. return s
  9991. }
  9992. func (s *GetBucketAclInput) getBucket() (v string) {
  9993. if s.Bucket == nil {
  9994. return v
  9995. }
  9996. return *s.Bucket
  9997. }
  9998. type GetBucketAclOutput struct {
  9999. _ struct{} `type:"structure"`
  10000. // A list of grants.
  10001. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  10002. Owner *Owner `type:"structure"`
  10003. }
  10004. // String returns the string representation
  10005. func (s GetBucketAclOutput) String() string {
  10006. return awsutil.Prettify(s)
  10007. }
  10008. // GoString returns the string representation
  10009. func (s GetBucketAclOutput) GoString() string {
  10010. return s.String()
  10011. }
  10012. // SetGrants sets the Grants field's value.
  10013. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  10014. s.Grants = v
  10015. return s
  10016. }
  10017. // SetOwner sets the Owner field's value.
  10018. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  10019. s.Owner = v
  10020. return s
  10021. }
  10022. type GetBucketAnalyticsConfigurationInput struct {
  10023. _ struct{} `type:"structure"`
  10024. // The name of the bucket from which an analytics configuration is retrieved.
  10025. //
  10026. // Bucket is a required field
  10027. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10028. // The identifier used to represent an analytics configuration.
  10029. //
  10030. // Id is a required field
  10031. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10032. }
  10033. // String returns the string representation
  10034. func (s GetBucketAnalyticsConfigurationInput) String() string {
  10035. return awsutil.Prettify(s)
  10036. }
  10037. // GoString returns the string representation
  10038. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  10039. return s.String()
  10040. }
  10041. // Validate inspects the fields of the type to determine if they are valid.
  10042. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  10043. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  10044. if s.Bucket == nil {
  10045. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10046. }
  10047. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10048. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10049. }
  10050. if s.Id == nil {
  10051. invalidParams.Add(request.NewErrParamRequired("Id"))
  10052. }
  10053. if invalidParams.Len() > 0 {
  10054. return invalidParams
  10055. }
  10056. return nil
  10057. }
  10058. // SetBucket sets the Bucket field's value.
  10059. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  10060. s.Bucket = &v
  10061. return s
  10062. }
  10063. func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
  10064. if s.Bucket == nil {
  10065. return v
  10066. }
  10067. return *s.Bucket
  10068. }
  10069. // SetId sets the Id field's value.
  10070. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  10071. s.Id = &v
  10072. return s
  10073. }
  10074. type GetBucketAnalyticsConfigurationOutput struct {
  10075. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  10076. // The configuration and any analyses for the analytics filter.
  10077. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  10078. }
  10079. // String returns the string representation
  10080. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  10081. return awsutil.Prettify(s)
  10082. }
  10083. // GoString returns the string representation
  10084. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  10085. return s.String()
  10086. }
  10087. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  10088. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  10089. s.AnalyticsConfiguration = v
  10090. return s
  10091. }
  10092. type GetBucketCorsInput struct {
  10093. _ struct{} `type:"structure"`
  10094. // Bucket is a required field
  10095. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10096. }
  10097. // String returns the string representation
  10098. func (s GetBucketCorsInput) String() string {
  10099. return awsutil.Prettify(s)
  10100. }
  10101. // GoString returns the string representation
  10102. func (s GetBucketCorsInput) GoString() string {
  10103. return s.String()
  10104. }
  10105. // Validate inspects the fields of the type to determine if they are valid.
  10106. func (s *GetBucketCorsInput) Validate() error {
  10107. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  10108. if s.Bucket == nil {
  10109. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10110. }
  10111. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10112. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10113. }
  10114. if invalidParams.Len() > 0 {
  10115. return invalidParams
  10116. }
  10117. return nil
  10118. }
  10119. // SetBucket sets the Bucket field's value.
  10120. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  10121. s.Bucket = &v
  10122. return s
  10123. }
  10124. func (s *GetBucketCorsInput) getBucket() (v string) {
  10125. if s.Bucket == nil {
  10126. return v
  10127. }
  10128. return *s.Bucket
  10129. }
  10130. type GetBucketCorsOutput struct {
  10131. _ struct{} `type:"structure"`
  10132. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  10133. }
  10134. // String returns the string representation
  10135. func (s GetBucketCorsOutput) String() string {
  10136. return awsutil.Prettify(s)
  10137. }
  10138. // GoString returns the string representation
  10139. func (s GetBucketCorsOutput) GoString() string {
  10140. return s.String()
  10141. }
  10142. // SetCORSRules sets the CORSRules field's value.
  10143. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  10144. s.CORSRules = v
  10145. return s
  10146. }
  10147. type GetBucketEncryptionInput struct {
  10148. _ struct{} `type:"structure"`
  10149. // The name of the bucket from which the server-side encryption configuration
  10150. // is retrieved.
  10151. //
  10152. // Bucket is a required field
  10153. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10154. }
  10155. // String returns the string representation
  10156. func (s GetBucketEncryptionInput) String() string {
  10157. return awsutil.Prettify(s)
  10158. }
  10159. // GoString returns the string representation
  10160. func (s GetBucketEncryptionInput) GoString() string {
  10161. return s.String()
  10162. }
  10163. // Validate inspects the fields of the type to determine if they are valid.
  10164. func (s *GetBucketEncryptionInput) Validate() error {
  10165. invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
  10166. if s.Bucket == nil {
  10167. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10168. }
  10169. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10170. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10171. }
  10172. if invalidParams.Len() > 0 {
  10173. return invalidParams
  10174. }
  10175. return nil
  10176. }
  10177. // SetBucket sets the Bucket field's value.
  10178. func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
  10179. s.Bucket = &v
  10180. return s
  10181. }
  10182. func (s *GetBucketEncryptionInput) getBucket() (v string) {
  10183. if s.Bucket == nil {
  10184. return v
  10185. }
  10186. return *s.Bucket
  10187. }
  10188. type GetBucketEncryptionOutput struct {
  10189. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  10190. // Container for server-side encryption configuration rules. Currently S3 supports
  10191. // one rule only.
  10192. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
  10193. }
  10194. // String returns the string representation
  10195. func (s GetBucketEncryptionOutput) String() string {
  10196. return awsutil.Prettify(s)
  10197. }
  10198. // GoString returns the string representation
  10199. func (s GetBucketEncryptionOutput) GoString() string {
  10200. return s.String()
  10201. }
  10202. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  10203. func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
  10204. s.ServerSideEncryptionConfiguration = v
  10205. return s
  10206. }
  10207. type GetBucketInventoryConfigurationInput struct {
  10208. _ struct{} `type:"structure"`
  10209. // The name of the bucket containing the inventory configuration to retrieve.
  10210. //
  10211. // Bucket is a required field
  10212. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10213. // The ID used to identify the inventory configuration.
  10214. //
  10215. // Id is a required field
  10216. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10217. }
  10218. // String returns the string representation
  10219. func (s GetBucketInventoryConfigurationInput) String() string {
  10220. return awsutil.Prettify(s)
  10221. }
  10222. // GoString returns the string representation
  10223. func (s GetBucketInventoryConfigurationInput) GoString() string {
  10224. return s.String()
  10225. }
  10226. // Validate inspects the fields of the type to determine if they are valid.
  10227. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  10228. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  10229. if s.Bucket == nil {
  10230. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10231. }
  10232. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10233. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10234. }
  10235. if s.Id == nil {
  10236. invalidParams.Add(request.NewErrParamRequired("Id"))
  10237. }
  10238. if invalidParams.Len() > 0 {
  10239. return invalidParams
  10240. }
  10241. return nil
  10242. }
  10243. // SetBucket sets the Bucket field's value.
  10244. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  10245. s.Bucket = &v
  10246. return s
  10247. }
  10248. func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
  10249. if s.Bucket == nil {
  10250. return v
  10251. }
  10252. return *s.Bucket
  10253. }
  10254. // SetId sets the Id field's value.
  10255. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  10256. s.Id = &v
  10257. return s
  10258. }
  10259. type GetBucketInventoryConfigurationOutput struct {
  10260. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  10261. // Specifies the inventory configuration.
  10262. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  10263. }
  10264. // String returns the string representation
  10265. func (s GetBucketInventoryConfigurationOutput) String() string {
  10266. return awsutil.Prettify(s)
  10267. }
  10268. // GoString returns the string representation
  10269. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  10270. return s.String()
  10271. }
  10272. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  10273. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  10274. s.InventoryConfiguration = v
  10275. return s
  10276. }
  10277. type GetBucketLifecycleConfigurationInput struct {
  10278. _ struct{} `type:"structure"`
  10279. // Bucket is a required field
  10280. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10281. }
  10282. // String returns the string representation
  10283. func (s GetBucketLifecycleConfigurationInput) String() string {
  10284. return awsutil.Prettify(s)
  10285. }
  10286. // GoString returns the string representation
  10287. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  10288. return s.String()
  10289. }
  10290. // Validate inspects the fields of the type to determine if they are valid.
  10291. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  10292. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  10293. if s.Bucket == nil {
  10294. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10295. }
  10296. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10297. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10298. }
  10299. if invalidParams.Len() > 0 {
  10300. return invalidParams
  10301. }
  10302. return nil
  10303. }
  10304. // SetBucket sets the Bucket field's value.
  10305. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  10306. s.Bucket = &v
  10307. return s
  10308. }
  10309. func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
  10310. if s.Bucket == nil {
  10311. return v
  10312. }
  10313. return *s.Bucket
  10314. }
  10315. type GetBucketLifecycleConfigurationOutput struct {
  10316. _ struct{} `type:"structure"`
  10317. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  10318. }
  10319. // String returns the string representation
  10320. func (s GetBucketLifecycleConfigurationOutput) String() string {
  10321. return awsutil.Prettify(s)
  10322. }
  10323. // GoString returns the string representation
  10324. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  10325. return s.String()
  10326. }
  10327. // SetRules sets the Rules field's value.
  10328. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  10329. s.Rules = v
  10330. return s
  10331. }
  10332. type GetBucketLifecycleInput struct {
  10333. _ struct{} `type:"structure"`
  10334. // Bucket is a required field
  10335. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10336. }
  10337. // String returns the string representation
  10338. func (s GetBucketLifecycleInput) String() string {
  10339. return awsutil.Prettify(s)
  10340. }
  10341. // GoString returns the string representation
  10342. func (s GetBucketLifecycleInput) GoString() string {
  10343. return s.String()
  10344. }
  10345. // Validate inspects the fields of the type to determine if they are valid.
  10346. func (s *GetBucketLifecycleInput) Validate() error {
  10347. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  10348. if s.Bucket == nil {
  10349. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10350. }
  10351. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10352. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10353. }
  10354. if invalidParams.Len() > 0 {
  10355. return invalidParams
  10356. }
  10357. return nil
  10358. }
  10359. // SetBucket sets the Bucket field's value.
  10360. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  10361. s.Bucket = &v
  10362. return s
  10363. }
  10364. func (s *GetBucketLifecycleInput) getBucket() (v string) {
  10365. if s.Bucket == nil {
  10366. return v
  10367. }
  10368. return *s.Bucket
  10369. }
  10370. type GetBucketLifecycleOutput struct {
  10371. _ struct{} `type:"structure"`
  10372. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  10373. }
  10374. // String returns the string representation
  10375. func (s GetBucketLifecycleOutput) String() string {
  10376. return awsutil.Prettify(s)
  10377. }
  10378. // GoString returns the string representation
  10379. func (s GetBucketLifecycleOutput) GoString() string {
  10380. return s.String()
  10381. }
  10382. // SetRules sets the Rules field's value.
  10383. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  10384. s.Rules = v
  10385. return s
  10386. }
  10387. type GetBucketLocationInput struct {
  10388. _ struct{} `type:"structure"`
  10389. // Bucket is a required field
  10390. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10391. }
  10392. // String returns the string representation
  10393. func (s GetBucketLocationInput) String() string {
  10394. return awsutil.Prettify(s)
  10395. }
  10396. // GoString returns the string representation
  10397. func (s GetBucketLocationInput) GoString() string {
  10398. return s.String()
  10399. }
  10400. // Validate inspects the fields of the type to determine if they are valid.
  10401. func (s *GetBucketLocationInput) Validate() error {
  10402. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  10403. if s.Bucket == nil {
  10404. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10405. }
  10406. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10407. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10408. }
  10409. if invalidParams.Len() > 0 {
  10410. return invalidParams
  10411. }
  10412. return nil
  10413. }
  10414. // SetBucket sets the Bucket field's value.
  10415. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  10416. s.Bucket = &v
  10417. return s
  10418. }
  10419. func (s *GetBucketLocationInput) getBucket() (v string) {
  10420. if s.Bucket == nil {
  10421. return v
  10422. }
  10423. return *s.Bucket
  10424. }
  10425. type GetBucketLocationOutput struct {
  10426. _ struct{} `type:"structure"`
  10427. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  10428. }
  10429. // String returns the string representation
  10430. func (s GetBucketLocationOutput) String() string {
  10431. return awsutil.Prettify(s)
  10432. }
  10433. // GoString returns the string representation
  10434. func (s GetBucketLocationOutput) GoString() string {
  10435. return s.String()
  10436. }
  10437. // SetLocationConstraint sets the LocationConstraint field's value.
  10438. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  10439. s.LocationConstraint = &v
  10440. return s
  10441. }
  10442. type GetBucketLoggingInput struct {
  10443. _ struct{} `type:"structure"`
  10444. // Bucket is a required field
  10445. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10446. }
  10447. // String returns the string representation
  10448. func (s GetBucketLoggingInput) String() string {
  10449. return awsutil.Prettify(s)
  10450. }
  10451. // GoString returns the string representation
  10452. func (s GetBucketLoggingInput) GoString() string {
  10453. return s.String()
  10454. }
  10455. // Validate inspects the fields of the type to determine if they are valid.
  10456. func (s *GetBucketLoggingInput) Validate() error {
  10457. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  10458. if s.Bucket == nil {
  10459. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10460. }
  10461. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10462. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10463. }
  10464. if invalidParams.Len() > 0 {
  10465. return invalidParams
  10466. }
  10467. return nil
  10468. }
  10469. // SetBucket sets the Bucket field's value.
  10470. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  10471. s.Bucket = &v
  10472. return s
  10473. }
  10474. func (s *GetBucketLoggingInput) getBucket() (v string) {
  10475. if s.Bucket == nil {
  10476. return v
  10477. }
  10478. return *s.Bucket
  10479. }
  10480. type GetBucketLoggingOutput struct {
  10481. _ struct{} `type:"structure"`
  10482. // Container for logging information. Presence of this element indicates that
  10483. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  10484. // in this case.
  10485. LoggingEnabled *LoggingEnabled `type:"structure"`
  10486. }
  10487. // String returns the string representation
  10488. func (s GetBucketLoggingOutput) String() string {
  10489. return awsutil.Prettify(s)
  10490. }
  10491. // GoString returns the string representation
  10492. func (s GetBucketLoggingOutput) GoString() string {
  10493. return s.String()
  10494. }
  10495. // SetLoggingEnabled sets the LoggingEnabled field's value.
  10496. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  10497. s.LoggingEnabled = v
  10498. return s
  10499. }
  10500. type GetBucketMetricsConfigurationInput struct {
  10501. _ struct{} `type:"structure"`
  10502. // The name of the bucket containing the metrics configuration to retrieve.
  10503. //
  10504. // Bucket is a required field
  10505. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10506. // The ID used to identify the metrics configuration.
  10507. //
  10508. // Id is a required field
  10509. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10510. }
  10511. // String returns the string representation
  10512. func (s GetBucketMetricsConfigurationInput) String() string {
  10513. return awsutil.Prettify(s)
  10514. }
  10515. // GoString returns the string representation
  10516. func (s GetBucketMetricsConfigurationInput) GoString() string {
  10517. return s.String()
  10518. }
  10519. // Validate inspects the fields of the type to determine if they are valid.
  10520. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  10521. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  10522. if s.Bucket == nil {
  10523. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10524. }
  10525. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10526. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10527. }
  10528. if s.Id == nil {
  10529. invalidParams.Add(request.NewErrParamRequired("Id"))
  10530. }
  10531. if invalidParams.Len() > 0 {
  10532. return invalidParams
  10533. }
  10534. return nil
  10535. }
  10536. // SetBucket sets the Bucket field's value.
  10537. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  10538. s.Bucket = &v
  10539. return s
  10540. }
  10541. func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
  10542. if s.Bucket == nil {
  10543. return v
  10544. }
  10545. return *s.Bucket
  10546. }
  10547. // SetId sets the Id field's value.
  10548. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  10549. s.Id = &v
  10550. return s
  10551. }
  10552. type GetBucketMetricsConfigurationOutput struct {
  10553. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  10554. // Specifies the metrics configuration.
  10555. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  10556. }
  10557. // String returns the string representation
  10558. func (s GetBucketMetricsConfigurationOutput) String() string {
  10559. return awsutil.Prettify(s)
  10560. }
  10561. // GoString returns the string representation
  10562. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  10563. return s.String()
  10564. }
  10565. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  10566. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  10567. s.MetricsConfiguration = v
  10568. return s
  10569. }
  10570. type GetBucketNotificationConfigurationRequest struct {
  10571. _ struct{} `type:"structure"`
  10572. // Name of the bucket to get the notification configuration for.
  10573. //
  10574. // Bucket is a required field
  10575. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10576. }
  10577. // String returns the string representation
  10578. func (s GetBucketNotificationConfigurationRequest) String() string {
  10579. return awsutil.Prettify(s)
  10580. }
  10581. // GoString returns the string representation
  10582. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  10583. return s.String()
  10584. }
  10585. // Validate inspects the fields of the type to determine if they are valid.
  10586. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  10587. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  10588. if s.Bucket == nil {
  10589. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10590. }
  10591. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10592. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10593. }
  10594. if invalidParams.Len() > 0 {
  10595. return invalidParams
  10596. }
  10597. return nil
  10598. }
  10599. // SetBucket sets the Bucket field's value.
  10600. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  10601. s.Bucket = &v
  10602. return s
  10603. }
  10604. func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
  10605. if s.Bucket == nil {
  10606. return v
  10607. }
  10608. return *s.Bucket
  10609. }
  10610. type GetBucketPolicyInput struct {
  10611. _ struct{} `type:"structure"`
  10612. // Bucket is a required field
  10613. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10614. }
  10615. // String returns the string representation
  10616. func (s GetBucketPolicyInput) String() string {
  10617. return awsutil.Prettify(s)
  10618. }
  10619. // GoString returns the string representation
  10620. func (s GetBucketPolicyInput) GoString() string {
  10621. return s.String()
  10622. }
  10623. // Validate inspects the fields of the type to determine if they are valid.
  10624. func (s *GetBucketPolicyInput) Validate() error {
  10625. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  10626. if s.Bucket == nil {
  10627. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10628. }
  10629. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10630. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10631. }
  10632. if invalidParams.Len() > 0 {
  10633. return invalidParams
  10634. }
  10635. return nil
  10636. }
  10637. // SetBucket sets the Bucket field's value.
  10638. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  10639. s.Bucket = &v
  10640. return s
  10641. }
  10642. func (s *GetBucketPolicyInput) getBucket() (v string) {
  10643. if s.Bucket == nil {
  10644. return v
  10645. }
  10646. return *s.Bucket
  10647. }
  10648. type GetBucketPolicyOutput struct {
  10649. _ struct{} `type:"structure" payload:"Policy"`
  10650. // The bucket policy as a JSON document.
  10651. Policy *string `type:"string"`
  10652. }
  10653. // String returns the string representation
  10654. func (s GetBucketPolicyOutput) String() string {
  10655. return awsutil.Prettify(s)
  10656. }
  10657. // GoString returns the string representation
  10658. func (s GetBucketPolicyOutput) GoString() string {
  10659. return s.String()
  10660. }
  10661. // SetPolicy sets the Policy field's value.
  10662. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  10663. s.Policy = &v
  10664. return s
  10665. }
  10666. type GetBucketPolicyStatusInput struct {
  10667. _ struct{} `type:"structure"`
  10668. // The name of the Amazon S3 bucket whose policy status you want to retrieve.
  10669. //
  10670. // Bucket is a required field
  10671. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10672. }
  10673. // String returns the string representation
  10674. func (s GetBucketPolicyStatusInput) String() string {
  10675. return awsutil.Prettify(s)
  10676. }
  10677. // GoString returns the string representation
  10678. func (s GetBucketPolicyStatusInput) GoString() string {
  10679. return s.String()
  10680. }
  10681. // Validate inspects the fields of the type to determine if they are valid.
  10682. func (s *GetBucketPolicyStatusInput) Validate() error {
  10683. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyStatusInput"}
  10684. if s.Bucket == nil {
  10685. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10686. }
  10687. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10688. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10689. }
  10690. if invalidParams.Len() > 0 {
  10691. return invalidParams
  10692. }
  10693. return nil
  10694. }
  10695. // SetBucket sets the Bucket field's value.
  10696. func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput {
  10697. s.Bucket = &v
  10698. return s
  10699. }
  10700. func (s *GetBucketPolicyStatusInput) getBucket() (v string) {
  10701. if s.Bucket == nil {
  10702. return v
  10703. }
  10704. return *s.Bucket
  10705. }
  10706. type GetBucketPolicyStatusOutput struct {
  10707. _ struct{} `type:"structure" payload:"PolicyStatus"`
  10708. // The policy status for the specified bucket.
  10709. PolicyStatus *PolicyStatus `type:"structure"`
  10710. }
  10711. // String returns the string representation
  10712. func (s GetBucketPolicyStatusOutput) String() string {
  10713. return awsutil.Prettify(s)
  10714. }
  10715. // GoString returns the string representation
  10716. func (s GetBucketPolicyStatusOutput) GoString() string {
  10717. return s.String()
  10718. }
  10719. // SetPolicyStatus sets the PolicyStatus field's value.
  10720. func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput {
  10721. s.PolicyStatus = v
  10722. return s
  10723. }
  10724. type GetBucketReplicationInput struct {
  10725. _ struct{} `type:"structure"`
  10726. // Bucket is a required field
  10727. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10728. }
  10729. // String returns the string representation
  10730. func (s GetBucketReplicationInput) String() string {
  10731. return awsutil.Prettify(s)
  10732. }
  10733. // GoString returns the string representation
  10734. func (s GetBucketReplicationInput) GoString() string {
  10735. return s.String()
  10736. }
  10737. // Validate inspects the fields of the type to determine if they are valid.
  10738. func (s *GetBucketReplicationInput) Validate() error {
  10739. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  10740. if s.Bucket == nil {
  10741. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10742. }
  10743. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10744. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10745. }
  10746. if invalidParams.Len() > 0 {
  10747. return invalidParams
  10748. }
  10749. return nil
  10750. }
  10751. // SetBucket sets the Bucket field's value.
  10752. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  10753. s.Bucket = &v
  10754. return s
  10755. }
  10756. func (s *GetBucketReplicationInput) getBucket() (v string) {
  10757. if s.Bucket == nil {
  10758. return v
  10759. }
  10760. return *s.Bucket
  10761. }
  10762. type GetBucketReplicationOutput struct {
  10763. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  10764. // A container for replication rules. You can add up to 1,000 rules. The maximum
  10765. // size of a replication configuration is 2 MB.
  10766. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  10767. }
  10768. // String returns the string representation
  10769. func (s GetBucketReplicationOutput) String() string {
  10770. return awsutil.Prettify(s)
  10771. }
  10772. // GoString returns the string representation
  10773. func (s GetBucketReplicationOutput) GoString() string {
  10774. return s.String()
  10775. }
  10776. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  10777. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  10778. s.ReplicationConfiguration = v
  10779. return s
  10780. }
  10781. type GetBucketRequestPaymentInput struct {
  10782. _ struct{} `type:"structure"`
  10783. // Bucket is a required field
  10784. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10785. }
  10786. // String returns the string representation
  10787. func (s GetBucketRequestPaymentInput) String() string {
  10788. return awsutil.Prettify(s)
  10789. }
  10790. // GoString returns the string representation
  10791. func (s GetBucketRequestPaymentInput) GoString() string {
  10792. return s.String()
  10793. }
  10794. // Validate inspects the fields of the type to determine if they are valid.
  10795. func (s *GetBucketRequestPaymentInput) Validate() error {
  10796. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  10797. if s.Bucket == nil {
  10798. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10799. }
  10800. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10801. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10802. }
  10803. if invalidParams.Len() > 0 {
  10804. return invalidParams
  10805. }
  10806. return nil
  10807. }
  10808. // SetBucket sets the Bucket field's value.
  10809. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  10810. s.Bucket = &v
  10811. return s
  10812. }
  10813. func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
  10814. if s.Bucket == nil {
  10815. return v
  10816. }
  10817. return *s.Bucket
  10818. }
  10819. type GetBucketRequestPaymentOutput struct {
  10820. _ struct{} `type:"structure"`
  10821. // Specifies who pays for the download and request fees.
  10822. Payer *string `type:"string" enum:"Payer"`
  10823. }
  10824. // String returns the string representation
  10825. func (s GetBucketRequestPaymentOutput) String() string {
  10826. return awsutil.Prettify(s)
  10827. }
  10828. // GoString returns the string representation
  10829. func (s GetBucketRequestPaymentOutput) GoString() string {
  10830. return s.String()
  10831. }
  10832. // SetPayer sets the Payer field's value.
  10833. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  10834. s.Payer = &v
  10835. return s
  10836. }
  10837. type GetBucketTaggingInput struct {
  10838. _ struct{} `type:"structure"`
  10839. // Bucket is a required field
  10840. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10841. }
  10842. // String returns the string representation
  10843. func (s GetBucketTaggingInput) String() string {
  10844. return awsutil.Prettify(s)
  10845. }
  10846. // GoString returns the string representation
  10847. func (s GetBucketTaggingInput) GoString() string {
  10848. return s.String()
  10849. }
  10850. // Validate inspects the fields of the type to determine if they are valid.
  10851. func (s *GetBucketTaggingInput) Validate() error {
  10852. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  10853. if s.Bucket == nil {
  10854. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10855. }
  10856. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10857. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10858. }
  10859. if invalidParams.Len() > 0 {
  10860. return invalidParams
  10861. }
  10862. return nil
  10863. }
  10864. // SetBucket sets the Bucket field's value.
  10865. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  10866. s.Bucket = &v
  10867. return s
  10868. }
  10869. func (s *GetBucketTaggingInput) getBucket() (v string) {
  10870. if s.Bucket == nil {
  10871. return v
  10872. }
  10873. return *s.Bucket
  10874. }
  10875. type GetBucketTaggingOutput struct {
  10876. _ struct{} `type:"structure"`
  10877. // TagSet is a required field
  10878. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  10879. }
  10880. // String returns the string representation
  10881. func (s GetBucketTaggingOutput) String() string {
  10882. return awsutil.Prettify(s)
  10883. }
  10884. // GoString returns the string representation
  10885. func (s GetBucketTaggingOutput) GoString() string {
  10886. return s.String()
  10887. }
  10888. // SetTagSet sets the TagSet field's value.
  10889. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  10890. s.TagSet = v
  10891. return s
  10892. }
  10893. type GetBucketVersioningInput struct {
  10894. _ struct{} `type:"structure"`
  10895. // Bucket is a required field
  10896. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10897. }
  10898. // String returns the string representation
  10899. func (s GetBucketVersioningInput) String() string {
  10900. return awsutil.Prettify(s)
  10901. }
  10902. // GoString returns the string representation
  10903. func (s GetBucketVersioningInput) GoString() string {
  10904. return s.String()
  10905. }
  10906. // Validate inspects the fields of the type to determine if they are valid.
  10907. func (s *GetBucketVersioningInput) Validate() error {
  10908. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  10909. if s.Bucket == nil {
  10910. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10911. }
  10912. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10913. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10914. }
  10915. if invalidParams.Len() > 0 {
  10916. return invalidParams
  10917. }
  10918. return nil
  10919. }
  10920. // SetBucket sets the Bucket field's value.
  10921. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  10922. s.Bucket = &v
  10923. return s
  10924. }
  10925. func (s *GetBucketVersioningInput) getBucket() (v string) {
  10926. if s.Bucket == nil {
  10927. return v
  10928. }
  10929. return *s.Bucket
  10930. }
  10931. type GetBucketVersioningOutput struct {
  10932. _ struct{} `type:"structure"`
  10933. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  10934. // This element is only returned if the bucket has been configured with MFA
  10935. // delete. If the bucket has never been so configured, this element is not returned.
  10936. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  10937. // The versioning state of the bucket.
  10938. Status *string `type:"string" enum:"BucketVersioningStatus"`
  10939. }
  10940. // String returns the string representation
  10941. func (s GetBucketVersioningOutput) String() string {
  10942. return awsutil.Prettify(s)
  10943. }
  10944. // GoString returns the string representation
  10945. func (s GetBucketVersioningOutput) GoString() string {
  10946. return s.String()
  10947. }
  10948. // SetMFADelete sets the MFADelete field's value.
  10949. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  10950. s.MFADelete = &v
  10951. return s
  10952. }
  10953. // SetStatus sets the Status field's value.
  10954. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  10955. s.Status = &v
  10956. return s
  10957. }
  10958. type GetBucketWebsiteInput struct {
  10959. _ struct{} `type:"structure"`
  10960. // Bucket is a required field
  10961. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10962. }
  10963. // String returns the string representation
  10964. func (s GetBucketWebsiteInput) String() string {
  10965. return awsutil.Prettify(s)
  10966. }
  10967. // GoString returns the string representation
  10968. func (s GetBucketWebsiteInput) GoString() string {
  10969. return s.String()
  10970. }
  10971. // Validate inspects the fields of the type to determine if they are valid.
  10972. func (s *GetBucketWebsiteInput) Validate() error {
  10973. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  10974. if s.Bucket == nil {
  10975. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10976. }
  10977. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10978. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10979. }
  10980. if invalidParams.Len() > 0 {
  10981. return invalidParams
  10982. }
  10983. return nil
  10984. }
  10985. // SetBucket sets the Bucket field's value.
  10986. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  10987. s.Bucket = &v
  10988. return s
  10989. }
  10990. func (s *GetBucketWebsiteInput) getBucket() (v string) {
  10991. if s.Bucket == nil {
  10992. return v
  10993. }
  10994. return *s.Bucket
  10995. }
  10996. type GetBucketWebsiteOutput struct {
  10997. _ struct{} `type:"structure"`
  10998. ErrorDocument *ErrorDocument `type:"structure"`
  10999. IndexDocument *IndexDocument `type:"structure"`
  11000. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  11001. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  11002. }
  11003. // String returns the string representation
  11004. func (s GetBucketWebsiteOutput) String() string {
  11005. return awsutil.Prettify(s)
  11006. }
  11007. // GoString returns the string representation
  11008. func (s GetBucketWebsiteOutput) GoString() string {
  11009. return s.String()
  11010. }
  11011. // SetErrorDocument sets the ErrorDocument field's value.
  11012. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  11013. s.ErrorDocument = v
  11014. return s
  11015. }
  11016. // SetIndexDocument sets the IndexDocument field's value.
  11017. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  11018. s.IndexDocument = v
  11019. return s
  11020. }
  11021. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  11022. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  11023. s.RedirectAllRequestsTo = v
  11024. return s
  11025. }
  11026. // SetRoutingRules sets the RoutingRules field's value.
  11027. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  11028. s.RoutingRules = v
  11029. return s
  11030. }
  11031. type GetObjectAclInput struct {
  11032. _ struct{} `type:"structure"`
  11033. // Bucket is a required field
  11034. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11035. // Key is a required field
  11036. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11037. // Confirms that the requester knows that she or he will be charged for the
  11038. // request. Bucket owners need not specify this parameter in their requests.
  11039. // Documentation on downloading objects from requester pays buckets can be found
  11040. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11041. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11042. // VersionId used to reference a specific version of the object.
  11043. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11044. }
  11045. // String returns the string representation
  11046. func (s GetObjectAclInput) String() string {
  11047. return awsutil.Prettify(s)
  11048. }
  11049. // GoString returns the string representation
  11050. func (s GetObjectAclInput) GoString() string {
  11051. return s.String()
  11052. }
  11053. // Validate inspects the fields of the type to determine if they are valid.
  11054. func (s *GetObjectAclInput) Validate() error {
  11055. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  11056. if s.Bucket == nil {
  11057. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11058. }
  11059. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11060. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11061. }
  11062. if s.Key == nil {
  11063. invalidParams.Add(request.NewErrParamRequired("Key"))
  11064. }
  11065. if s.Key != nil && len(*s.Key) < 1 {
  11066. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11067. }
  11068. if invalidParams.Len() > 0 {
  11069. return invalidParams
  11070. }
  11071. return nil
  11072. }
  11073. // SetBucket sets the Bucket field's value.
  11074. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  11075. s.Bucket = &v
  11076. return s
  11077. }
  11078. func (s *GetObjectAclInput) getBucket() (v string) {
  11079. if s.Bucket == nil {
  11080. return v
  11081. }
  11082. return *s.Bucket
  11083. }
  11084. // SetKey sets the Key field's value.
  11085. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  11086. s.Key = &v
  11087. return s
  11088. }
  11089. // SetRequestPayer sets the RequestPayer field's value.
  11090. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  11091. s.RequestPayer = &v
  11092. return s
  11093. }
  11094. // SetVersionId sets the VersionId field's value.
  11095. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  11096. s.VersionId = &v
  11097. return s
  11098. }
  11099. type GetObjectAclOutput struct {
  11100. _ struct{} `type:"structure"`
  11101. // A list of grants.
  11102. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  11103. Owner *Owner `type:"structure"`
  11104. // If present, indicates that the requester was successfully charged for the
  11105. // request.
  11106. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11107. }
  11108. // String returns the string representation
  11109. func (s GetObjectAclOutput) String() string {
  11110. return awsutil.Prettify(s)
  11111. }
  11112. // GoString returns the string representation
  11113. func (s GetObjectAclOutput) GoString() string {
  11114. return s.String()
  11115. }
  11116. // SetGrants sets the Grants field's value.
  11117. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  11118. s.Grants = v
  11119. return s
  11120. }
  11121. // SetOwner sets the Owner field's value.
  11122. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  11123. s.Owner = v
  11124. return s
  11125. }
  11126. // SetRequestCharged sets the RequestCharged field's value.
  11127. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  11128. s.RequestCharged = &v
  11129. return s
  11130. }
  11131. type GetObjectInput struct {
  11132. _ struct{} `type:"structure"`
  11133. // Bucket is a required field
  11134. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11135. // Return the object only if its entity tag (ETag) is the same as the one specified,
  11136. // otherwise return a 412 (precondition failed).
  11137. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  11138. // Return the object only if it has been modified since the specified time,
  11139. // otherwise return a 304 (not modified).
  11140. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  11141. // Return the object only if its entity tag (ETag) is different from the one
  11142. // specified, otherwise return a 304 (not modified).
  11143. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  11144. // Return the object only if it has not been modified since the specified time,
  11145. // otherwise return a 412 (precondition failed).
  11146. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  11147. // Key is a required field
  11148. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11149. // Part number of the object being read. This is a positive integer between
  11150. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  11151. // Useful for downloading just a part of an object.
  11152. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  11153. // Downloads the specified range bytes of an object. For more information about
  11154. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  11155. Range *string `location:"header" locationName:"Range" type:"string"`
  11156. // Confirms that the requester knows that she or he will be charged for the
  11157. // request. Bucket owners need not specify this parameter in their requests.
  11158. // Documentation on downloading objects from requester pays buckets can be found
  11159. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11160. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11161. // Sets the Cache-Control header of the response.
  11162. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  11163. // Sets the Content-Disposition header of the response
  11164. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  11165. // Sets the Content-Encoding header of the response.
  11166. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  11167. // Sets the Content-Language header of the response.
  11168. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  11169. // Sets the Content-Type header of the response.
  11170. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  11171. // Sets the Expires header of the response.
  11172. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"`
  11173. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  11174. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11175. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  11176. // data. This value is used to store the object and then it is discarded; Amazon
  11177. // does not store the encryption key. The key must be appropriate for use with
  11178. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  11179. // header.
  11180. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  11181. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  11182. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  11183. // key was transmitted without error.
  11184. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11185. // VersionId used to reference a specific version of the object.
  11186. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11187. }
  11188. // String returns the string representation
  11189. func (s GetObjectInput) String() string {
  11190. return awsutil.Prettify(s)
  11191. }
  11192. // GoString returns the string representation
  11193. func (s GetObjectInput) GoString() string {
  11194. return s.String()
  11195. }
  11196. // Validate inspects the fields of the type to determine if they are valid.
  11197. func (s *GetObjectInput) Validate() error {
  11198. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  11199. if s.Bucket == nil {
  11200. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11201. }
  11202. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11203. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11204. }
  11205. if s.Key == nil {
  11206. invalidParams.Add(request.NewErrParamRequired("Key"))
  11207. }
  11208. if s.Key != nil && len(*s.Key) < 1 {
  11209. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11210. }
  11211. if invalidParams.Len() > 0 {
  11212. return invalidParams
  11213. }
  11214. return nil
  11215. }
  11216. // SetBucket sets the Bucket field's value.
  11217. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  11218. s.Bucket = &v
  11219. return s
  11220. }
  11221. func (s *GetObjectInput) getBucket() (v string) {
  11222. if s.Bucket == nil {
  11223. return v
  11224. }
  11225. return *s.Bucket
  11226. }
  11227. // SetIfMatch sets the IfMatch field's value.
  11228. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  11229. s.IfMatch = &v
  11230. return s
  11231. }
  11232. // SetIfModifiedSince sets the IfModifiedSince field's value.
  11233. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  11234. s.IfModifiedSince = &v
  11235. return s
  11236. }
  11237. // SetIfNoneMatch sets the IfNoneMatch field's value.
  11238. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  11239. s.IfNoneMatch = &v
  11240. return s
  11241. }
  11242. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  11243. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  11244. s.IfUnmodifiedSince = &v
  11245. return s
  11246. }
  11247. // SetKey sets the Key field's value.
  11248. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  11249. s.Key = &v
  11250. return s
  11251. }
  11252. // SetPartNumber sets the PartNumber field's value.
  11253. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  11254. s.PartNumber = &v
  11255. return s
  11256. }
  11257. // SetRange sets the Range field's value.
  11258. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  11259. s.Range = &v
  11260. return s
  11261. }
  11262. // SetRequestPayer sets the RequestPayer field's value.
  11263. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  11264. s.RequestPayer = &v
  11265. return s
  11266. }
  11267. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  11268. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  11269. s.ResponseCacheControl = &v
  11270. return s
  11271. }
  11272. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  11273. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  11274. s.ResponseContentDisposition = &v
  11275. return s
  11276. }
  11277. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  11278. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  11279. s.ResponseContentEncoding = &v
  11280. return s
  11281. }
  11282. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  11283. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  11284. s.ResponseContentLanguage = &v
  11285. return s
  11286. }
  11287. // SetResponseContentType sets the ResponseContentType field's value.
  11288. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  11289. s.ResponseContentType = &v
  11290. return s
  11291. }
  11292. // SetResponseExpires sets the ResponseExpires field's value.
  11293. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  11294. s.ResponseExpires = &v
  11295. return s
  11296. }
  11297. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11298. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  11299. s.SSECustomerAlgorithm = &v
  11300. return s
  11301. }
  11302. // SetSSECustomerKey sets the SSECustomerKey field's value.
  11303. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  11304. s.SSECustomerKey = &v
  11305. return s
  11306. }
  11307. func (s *GetObjectInput) getSSECustomerKey() (v string) {
  11308. if s.SSECustomerKey == nil {
  11309. return v
  11310. }
  11311. return *s.SSECustomerKey
  11312. }
  11313. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11314. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  11315. s.SSECustomerKeyMD5 = &v
  11316. return s
  11317. }
  11318. // SetVersionId sets the VersionId field's value.
  11319. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  11320. s.VersionId = &v
  11321. return s
  11322. }
  11323. type GetObjectLegalHoldInput struct {
  11324. _ struct{} `type:"structure"`
  11325. // The bucket containing the object whose Legal Hold status you want to retrieve.
  11326. //
  11327. // Bucket is a required field
  11328. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11329. // The key name for the object whose Legal Hold status you want to retrieve.
  11330. //
  11331. // Key is a required field
  11332. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11333. // Confirms that the requester knows that she or he will be charged for the
  11334. // request. Bucket owners need not specify this parameter in their requests.
  11335. // Documentation on downloading objects from requester pays buckets can be found
  11336. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11337. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11338. // The version ID of the object whose Legal Hold status you want to retrieve.
  11339. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11340. }
  11341. // String returns the string representation
  11342. func (s GetObjectLegalHoldInput) String() string {
  11343. return awsutil.Prettify(s)
  11344. }
  11345. // GoString returns the string representation
  11346. func (s GetObjectLegalHoldInput) GoString() string {
  11347. return s.String()
  11348. }
  11349. // Validate inspects the fields of the type to determine if they are valid.
  11350. func (s *GetObjectLegalHoldInput) Validate() error {
  11351. invalidParams := request.ErrInvalidParams{Context: "GetObjectLegalHoldInput"}
  11352. if s.Bucket == nil {
  11353. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11354. }
  11355. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11356. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11357. }
  11358. if s.Key == nil {
  11359. invalidParams.Add(request.NewErrParamRequired("Key"))
  11360. }
  11361. if s.Key != nil && len(*s.Key) < 1 {
  11362. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11363. }
  11364. if invalidParams.Len() > 0 {
  11365. return invalidParams
  11366. }
  11367. return nil
  11368. }
  11369. // SetBucket sets the Bucket field's value.
  11370. func (s *GetObjectLegalHoldInput) SetBucket(v string) *GetObjectLegalHoldInput {
  11371. s.Bucket = &v
  11372. return s
  11373. }
  11374. func (s *GetObjectLegalHoldInput) getBucket() (v string) {
  11375. if s.Bucket == nil {
  11376. return v
  11377. }
  11378. return *s.Bucket
  11379. }
  11380. // SetKey sets the Key field's value.
  11381. func (s *GetObjectLegalHoldInput) SetKey(v string) *GetObjectLegalHoldInput {
  11382. s.Key = &v
  11383. return s
  11384. }
  11385. // SetRequestPayer sets the RequestPayer field's value.
  11386. func (s *GetObjectLegalHoldInput) SetRequestPayer(v string) *GetObjectLegalHoldInput {
  11387. s.RequestPayer = &v
  11388. return s
  11389. }
  11390. // SetVersionId sets the VersionId field's value.
  11391. func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInput {
  11392. s.VersionId = &v
  11393. return s
  11394. }
  11395. type GetObjectLegalHoldOutput struct {
  11396. _ struct{} `type:"structure" payload:"LegalHold"`
  11397. // The current Legal Hold status for the specified object.
  11398. LegalHold *ObjectLockLegalHold `type:"structure"`
  11399. }
  11400. // String returns the string representation
  11401. func (s GetObjectLegalHoldOutput) String() string {
  11402. return awsutil.Prettify(s)
  11403. }
  11404. // GoString returns the string representation
  11405. func (s GetObjectLegalHoldOutput) GoString() string {
  11406. return s.String()
  11407. }
  11408. // SetLegalHold sets the LegalHold field's value.
  11409. func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObjectLegalHoldOutput {
  11410. s.LegalHold = v
  11411. return s
  11412. }
  11413. type GetObjectLockConfigurationInput struct {
  11414. _ struct{} `type:"structure"`
  11415. // The bucket whose Object Lock configuration you want to retrieve.
  11416. //
  11417. // Bucket is a required field
  11418. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11419. }
  11420. // String returns the string representation
  11421. func (s GetObjectLockConfigurationInput) String() string {
  11422. return awsutil.Prettify(s)
  11423. }
  11424. // GoString returns the string representation
  11425. func (s GetObjectLockConfigurationInput) GoString() string {
  11426. return s.String()
  11427. }
  11428. // Validate inspects the fields of the type to determine if they are valid.
  11429. func (s *GetObjectLockConfigurationInput) Validate() error {
  11430. invalidParams := request.ErrInvalidParams{Context: "GetObjectLockConfigurationInput"}
  11431. if s.Bucket == nil {
  11432. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11433. }
  11434. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11435. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11436. }
  11437. if invalidParams.Len() > 0 {
  11438. return invalidParams
  11439. }
  11440. return nil
  11441. }
  11442. // SetBucket sets the Bucket field's value.
  11443. func (s *GetObjectLockConfigurationInput) SetBucket(v string) *GetObjectLockConfigurationInput {
  11444. s.Bucket = &v
  11445. return s
  11446. }
  11447. func (s *GetObjectLockConfigurationInput) getBucket() (v string) {
  11448. if s.Bucket == nil {
  11449. return v
  11450. }
  11451. return *s.Bucket
  11452. }
  11453. type GetObjectLockConfigurationOutput struct {
  11454. _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
  11455. // The specified bucket's Object Lock configuration.
  11456. ObjectLockConfiguration *ObjectLockConfiguration `type:"structure"`
  11457. }
  11458. // String returns the string representation
  11459. func (s GetObjectLockConfigurationOutput) String() string {
  11460. return awsutil.Prettify(s)
  11461. }
  11462. // GoString returns the string representation
  11463. func (s GetObjectLockConfigurationOutput) GoString() string {
  11464. return s.String()
  11465. }
  11466. // SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
  11467. func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *GetObjectLockConfigurationOutput {
  11468. s.ObjectLockConfiguration = v
  11469. return s
  11470. }
  11471. type GetObjectOutput struct {
  11472. _ struct{} `type:"structure" payload:"Body"`
  11473. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  11474. // Object data.
  11475. Body io.ReadCloser `type:"blob"`
  11476. // Specifies caching behavior along the request/reply chain.
  11477. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  11478. // Specifies presentational information for the object.
  11479. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  11480. // Specifies what content encodings have been applied to the object and thus
  11481. // what decoding mechanisms must be applied to obtain the media-type referenced
  11482. // by the Content-Type header field.
  11483. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  11484. // The language the content is in.
  11485. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  11486. // Size of the body in bytes.
  11487. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  11488. // The portion of the object returned in the response.
  11489. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  11490. // A standard MIME type describing the format of the object data.
  11491. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  11492. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  11493. // Marker. If false, this response header does not appear in the response.
  11494. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  11495. // An ETag is an opaque identifier assigned by a web server to a specific version
  11496. // of a resource found at a URL
  11497. ETag *string `location:"header" locationName:"ETag" type:"string"`
  11498. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  11499. // includes this header. It includes the expiry-date and rule-id key value pairs
  11500. // providing object expiration information. The value of the rule-id is URL
  11501. // encoded.
  11502. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  11503. // The date and time at which the object is no longer cacheable.
  11504. Expires *string `location:"header" locationName:"Expires" type:"string"`
  11505. // Last modified date of the object
  11506. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  11507. // A map of metadata to store with the object in S3.
  11508. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  11509. // This is set to the number of metadata entries not returned in x-amz-meta
  11510. // headers. This can happen if you create metadata using an API like SOAP that
  11511. // supports more flexible metadata than the REST API. For example, using SOAP,
  11512. // you can create metadata whose values are not legal HTTP headers.
  11513. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  11514. // Indicates whether this object has an active legal hold. This field is only
  11515. // returned if you have permission to view an object's legal hold status.
  11516. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  11517. // The Object Lock mode currently in place for this object.
  11518. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  11519. // The date and time when this object's Object Lock will expire.
  11520. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  11521. // The count of parts this object has.
  11522. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  11523. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  11524. // If present, indicates that the requester was successfully charged for the
  11525. // request.
  11526. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11527. // Provides information about object restoration operation and expiration time
  11528. // of the restored object copy.
  11529. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  11530. // If server-side encryption with a customer-provided encryption key was requested,
  11531. // the response will include this header confirming the encryption algorithm
  11532. // used.
  11533. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11534. // If server-side encryption with a customer-provided encryption key was requested,
  11535. // the response will include this header to provide round trip message integrity
  11536. // verification of the customer-provided encryption key.
  11537. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11538. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  11539. // encryption key that was used for the object.
  11540. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  11541. // The Server-side encryption algorithm used when storing this object in S3
  11542. // (e.g., AES256, aws:kms).
  11543. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  11544. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  11545. // The number of tags, if any, on the object.
  11546. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  11547. // Version of the object.
  11548. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  11549. // If the bucket is configured as a website, redirects requests for this object
  11550. // to another object in the same bucket or to an external URL. Amazon S3 stores
  11551. // the value of this header in the object metadata.
  11552. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  11553. }
  11554. // String returns the string representation
  11555. func (s GetObjectOutput) String() string {
  11556. return awsutil.Prettify(s)
  11557. }
  11558. // GoString returns the string representation
  11559. func (s GetObjectOutput) GoString() string {
  11560. return s.String()
  11561. }
  11562. // SetAcceptRanges sets the AcceptRanges field's value.
  11563. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  11564. s.AcceptRanges = &v
  11565. return s
  11566. }
  11567. // SetBody sets the Body field's value.
  11568. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  11569. s.Body = v
  11570. return s
  11571. }
  11572. // SetCacheControl sets the CacheControl field's value.
  11573. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  11574. s.CacheControl = &v
  11575. return s
  11576. }
  11577. // SetContentDisposition sets the ContentDisposition field's value.
  11578. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  11579. s.ContentDisposition = &v
  11580. return s
  11581. }
  11582. // SetContentEncoding sets the ContentEncoding field's value.
  11583. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  11584. s.ContentEncoding = &v
  11585. return s
  11586. }
  11587. // SetContentLanguage sets the ContentLanguage field's value.
  11588. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  11589. s.ContentLanguage = &v
  11590. return s
  11591. }
  11592. // SetContentLength sets the ContentLength field's value.
  11593. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  11594. s.ContentLength = &v
  11595. return s
  11596. }
  11597. // SetContentRange sets the ContentRange field's value.
  11598. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  11599. s.ContentRange = &v
  11600. return s
  11601. }
  11602. // SetContentType sets the ContentType field's value.
  11603. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  11604. s.ContentType = &v
  11605. return s
  11606. }
  11607. // SetDeleteMarker sets the DeleteMarker field's value.
  11608. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  11609. s.DeleteMarker = &v
  11610. return s
  11611. }
  11612. // SetETag sets the ETag field's value.
  11613. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  11614. s.ETag = &v
  11615. return s
  11616. }
  11617. // SetExpiration sets the Expiration field's value.
  11618. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  11619. s.Expiration = &v
  11620. return s
  11621. }
  11622. // SetExpires sets the Expires field's value.
  11623. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  11624. s.Expires = &v
  11625. return s
  11626. }
  11627. // SetLastModified sets the LastModified field's value.
  11628. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  11629. s.LastModified = &v
  11630. return s
  11631. }
  11632. // SetMetadata sets the Metadata field's value.
  11633. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  11634. s.Metadata = v
  11635. return s
  11636. }
  11637. // SetMissingMeta sets the MissingMeta field's value.
  11638. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  11639. s.MissingMeta = &v
  11640. return s
  11641. }
  11642. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  11643. func (s *GetObjectOutput) SetObjectLockLegalHoldStatus(v string) *GetObjectOutput {
  11644. s.ObjectLockLegalHoldStatus = &v
  11645. return s
  11646. }
  11647. // SetObjectLockMode sets the ObjectLockMode field's value.
  11648. func (s *GetObjectOutput) SetObjectLockMode(v string) *GetObjectOutput {
  11649. s.ObjectLockMode = &v
  11650. return s
  11651. }
  11652. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  11653. func (s *GetObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *GetObjectOutput {
  11654. s.ObjectLockRetainUntilDate = &v
  11655. return s
  11656. }
  11657. // SetPartsCount sets the PartsCount field's value.
  11658. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  11659. s.PartsCount = &v
  11660. return s
  11661. }
  11662. // SetReplicationStatus sets the ReplicationStatus field's value.
  11663. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  11664. s.ReplicationStatus = &v
  11665. return s
  11666. }
  11667. // SetRequestCharged sets the RequestCharged field's value.
  11668. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  11669. s.RequestCharged = &v
  11670. return s
  11671. }
  11672. // SetRestore sets the Restore field's value.
  11673. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  11674. s.Restore = &v
  11675. return s
  11676. }
  11677. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11678. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  11679. s.SSECustomerAlgorithm = &v
  11680. return s
  11681. }
  11682. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11683. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  11684. s.SSECustomerKeyMD5 = &v
  11685. return s
  11686. }
  11687. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  11688. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  11689. s.SSEKMSKeyId = &v
  11690. return s
  11691. }
  11692. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  11693. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  11694. s.ServerSideEncryption = &v
  11695. return s
  11696. }
  11697. // SetStorageClass sets the StorageClass field's value.
  11698. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  11699. s.StorageClass = &v
  11700. return s
  11701. }
  11702. // SetTagCount sets the TagCount field's value.
  11703. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  11704. s.TagCount = &v
  11705. return s
  11706. }
  11707. // SetVersionId sets the VersionId field's value.
  11708. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  11709. s.VersionId = &v
  11710. return s
  11711. }
  11712. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  11713. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  11714. s.WebsiteRedirectLocation = &v
  11715. return s
  11716. }
  11717. type GetObjectRetentionInput struct {
  11718. _ struct{} `type:"structure"`
  11719. // The bucket containing the object whose retention settings you want to retrieve.
  11720. //
  11721. // Bucket is a required field
  11722. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11723. // The key name for the object whose retention settings you want to retrieve.
  11724. //
  11725. // Key is a required field
  11726. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11727. // Confirms that the requester knows that she or he will be charged for the
  11728. // request. Bucket owners need not specify this parameter in their requests.
  11729. // Documentation on downloading objects from requester pays buckets can be found
  11730. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11731. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11732. // The version ID for the object whose retention settings you want to retrieve.
  11733. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11734. }
  11735. // String returns the string representation
  11736. func (s GetObjectRetentionInput) String() string {
  11737. return awsutil.Prettify(s)
  11738. }
  11739. // GoString returns the string representation
  11740. func (s GetObjectRetentionInput) GoString() string {
  11741. return s.String()
  11742. }
  11743. // Validate inspects the fields of the type to determine if they are valid.
  11744. func (s *GetObjectRetentionInput) Validate() error {
  11745. invalidParams := request.ErrInvalidParams{Context: "GetObjectRetentionInput"}
  11746. if s.Bucket == nil {
  11747. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11748. }
  11749. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11750. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11751. }
  11752. if s.Key == nil {
  11753. invalidParams.Add(request.NewErrParamRequired("Key"))
  11754. }
  11755. if s.Key != nil && len(*s.Key) < 1 {
  11756. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11757. }
  11758. if invalidParams.Len() > 0 {
  11759. return invalidParams
  11760. }
  11761. return nil
  11762. }
  11763. // SetBucket sets the Bucket field's value.
  11764. func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput {
  11765. s.Bucket = &v
  11766. return s
  11767. }
  11768. func (s *GetObjectRetentionInput) getBucket() (v string) {
  11769. if s.Bucket == nil {
  11770. return v
  11771. }
  11772. return *s.Bucket
  11773. }
  11774. // SetKey sets the Key field's value.
  11775. func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput {
  11776. s.Key = &v
  11777. return s
  11778. }
  11779. // SetRequestPayer sets the RequestPayer field's value.
  11780. func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionInput {
  11781. s.RequestPayer = &v
  11782. return s
  11783. }
  11784. // SetVersionId sets the VersionId field's value.
  11785. func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput {
  11786. s.VersionId = &v
  11787. return s
  11788. }
  11789. type GetObjectRetentionOutput struct {
  11790. _ struct{} `type:"structure" payload:"Retention"`
  11791. // The container element for an object's retention settings.
  11792. Retention *ObjectLockRetention `type:"structure"`
  11793. }
  11794. // String returns the string representation
  11795. func (s GetObjectRetentionOutput) String() string {
  11796. return awsutil.Prettify(s)
  11797. }
  11798. // GoString returns the string representation
  11799. func (s GetObjectRetentionOutput) GoString() string {
  11800. return s.String()
  11801. }
  11802. // SetRetention sets the Retention field's value.
  11803. func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput {
  11804. s.Retention = v
  11805. return s
  11806. }
  11807. type GetObjectTaggingInput struct {
  11808. _ struct{} `type:"structure"`
  11809. // Bucket is a required field
  11810. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11811. // Key is a required field
  11812. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11813. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11814. }
  11815. // String returns the string representation
  11816. func (s GetObjectTaggingInput) String() string {
  11817. return awsutil.Prettify(s)
  11818. }
  11819. // GoString returns the string representation
  11820. func (s GetObjectTaggingInput) GoString() string {
  11821. return s.String()
  11822. }
  11823. // Validate inspects the fields of the type to determine if they are valid.
  11824. func (s *GetObjectTaggingInput) Validate() error {
  11825. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  11826. if s.Bucket == nil {
  11827. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11828. }
  11829. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11830. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11831. }
  11832. if s.Key == nil {
  11833. invalidParams.Add(request.NewErrParamRequired("Key"))
  11834. }
  11835. if s.Key != nil && len(*s.Key) < 1 {
  11836. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11837. }
  11838. if invalidParams.Len() > 0 {
  11839. return invalidParams
  11840. }
  11841. return nil
  11842. }
  11843. // SetBucket sets the Bucket field's value.
  11844. func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  11845. s.Bucket = &v
  11846. return s
  11847. }
  11848. func (s *GetObjectTaggingInput) getBucket() (v string) {
  11849. if s.Bucket == nil {
  11850. return v
  11851. }
  11852. return *s.Bucket
  11853. }
  11854. // SetKey sets the Key field's value.
  11855. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  11856. s.Key = &v
  11857. return s
  11858. }
  11859. // SetVersionId sets the VersionId field's value.
  11860. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  11861. s.VersionId = &v
  11862. return s
  11863. }
  11864. type GetObjectTaggingOutput struct {
  11865. _ struct{} `type:"structure"`
  11866. // TagSet is a required field
  11867. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  11868. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  11869. }
  11870. // String returns the string representation
  11871. func (s GetObjectTaggingOutput) String() string {
  11872. return awsutil.Prettify(s)
  11873. }
  11874. // GoString returns the string representation
  11875. func (s GetObjectTaggingOutput) GoString() string {
  11876. return s.String()
  11877. }
  11878. // SetTagSet sets the TagSet field's value.
  11879. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  11880. s.TagSet = v
  11881. return s
  11882. }
  11883. // SetVersionId sets the VersionId field's value.
  11884. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  11885. s.VersionId = &v
  11886. return s
  11887. }
  11888. type GetObjectTorrentInput struct {
  11889. _ struct{} `type:"structure"`
  11890. // Bucket is a required field
  11891. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11892. // Key is a required field
  11893. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11894. // Confirms that the requester knows that she or he will be charged for the
  11895. // request. Bucket owners need not specify this parameter in their requests.
  11896. // Documentation on downloading objects from requester pays buckets can be found
  11897. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11898. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11899. }
  11900. // String returns the string representation
  11901. func (s GetObjectTorrentInput) String() string {
  11902. return awsutil.Prettify(s)
  11903. }
  11904. // GoString returns the string representation
  11905. func (s GetObjectTorrentInput) GoString() string {
  11906. return s.String()
  11907. }
  11908. // Validate inspects the fields of the type to determine if they are valid.
  11909. func (s *GetObjectTorrentInput) Validate() error {
  11910. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  11911. if s.Bucket == nil {
  11912. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11913. }
  11914. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11915. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11916. }
  11917. if s.Key == nil {
  11918. invalidParams.Add(request.NewErrParamRequired("Key"))
  11919. }
  11920. if s.Key != nil && len(*s.Key) < 1 {
  11921. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11922. }
  11923. if invalidParams.Len() > 0 {
  11924. return invalidParams
  11925. }
  11926. return nil
  11927. }
  11928. // SetBucket sets the Bucket field's value.
  11929. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  11930. s.Bucket = &v
  11931. return s
  11932. }
  11933. func (s *GetObjectTorrentInput) getBucket() (v string) {
  11934. if s.Bucket == nil {
  11935. return v
  11936. }
  11937. return *s.Bucket
  11938. }
  11939. // SetKey sets the Key field's value.
  11940. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  11941. s.Key = &v
  11942. return s
  11943. }
  11944. // SetRequestPayer sets the RequestPayer field's value.
  11945. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  11946. s.RequestPayer = &v
  11947. return s
  11948. }
  11949. type GetObjectTorrentOutput struct {
  11950. _ struct{} `type:"structure" payload:"Body"`
  11951. Body io.ReadCloser `type:"blob"`
  11952. // If present, indicates that the requester was successfully charged for the
  11953. // request.
  11954. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11955. }
  11956. // String returns the string representation
  11957. func (s GetObjectTorrentOutput) String() string {
  11958. return awsutil.Prettify(s)
  11959. }
  11960. // GoString returns the string representation
  11961. func (s GetObjectTorrentOutput) GoString() string {
  11962. return s.String()
  11963. }
  11964. // SetBody sets the Body field's value.
  11965. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  11966. s.Body = v
  11967. return s
  11968. }
  11969. // SetRequestCharged sets the RequestCharged field's value.
  11970. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  11971. s.RequestCharged = &v
  11972. return s
  11973. }
  11974. type GetPublicAccessBlockInput struct {
  11975. _ struct{} `type:"structure"`
  11976. // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
  11977. // want to retrieve.
  11978. //
  11979. // Bucket is a required field
  11980. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11981. }
  11982. // String returns the string representation
  11983. func (s GetPublicAccessBlockInput) String() string {
  11984. return awsutil.Prettify(s)
  11985. }
  11986. // GoString returns the string representation
  11987. func (s GetPublicAccessBlockInput) GoString() string {
  11988. return s.String()
  11989. }
  11990. // Validate inspects the fields of the type to determine if they are valid.
  11991. func (s *GetPublicAccessBlockInput) Validate() error {
  11992. invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"}
  11993. if s.Bucket == nil {
  11994. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11995. }
  11996. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11997. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11998. }
  11999. if invalidParams.Len() > 0 {
  12000. return invalidParams
  12001. }
  12002. return nil
  12003. }
  12004. // SetBucket sets the Bucket field's value.
  12005. func (s *GetPublicAccessBlockInput) SetBucket(v string) *GetPublicAccessBlockInput {
  12006. s.Bucket = &v
  12007. return s
  12008. }
  12009. func (s *GetPublicAccessBlockInput) getBucket() (v string) {
  12010. if s.Bucket == nil {
  12011. return v
  12012. }
  12013. return *s.Bucket
  12014. }
  12015. type GetPublicAccessBlockOutput struct {
  12016. _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
  12017. // The PublicAccessBlock configuration currently in effect for this Amazon S3
  12018. // bucket.
  12019. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"`
  12020. }
  12021. // String returns the string representation
  12022. func (s GetPublicAccessBlockOutput) String() string {
  12023. return awsutil.Prettify(s)
  12024. }
  12025. // GoString returns the string representation
  12026. func (s GetPublicAccessBlockOutput) GoString() string {
  12027. return s.String()
  12028. }
  12029. // SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
  12030. func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput {
  12031. s.PublicAccessBlockConfiguration = v
  12032. return s
  12033. }
  12034. type GlacierJobParameters struct {
  12035. _ struct{} `type:"structure"`
  12036. // Glacier retrieval tier at which the restore will be processed.
  12037. //
  12038. // Tier is a required field
  12039. Tier *string `type:"string" required:"true" enum:"Tier"`
  12040. }
  12041. // String returns the string representation
  12042. func (s GlacierJobParameters) String() string {
  12043. return awsutil.Prettify(s)
  12044. }
  12045. // GoString returns the string representation
  12046. func (s GlacierJobParameters) GoString() string {
  12047. return s.String()
  12048. }
  12049. // Validate inspects the fields of the type to determine if they are valid.
  12050. func (s *GlacierJobParameters) Validate() error {
  12051. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  12052. if s.Tier == nil {
  12053. invalidParams.Add(request.NewErrParamRequired("Tier"))
  12054. }
  12055. if invalidParams.Len() > 0 {
  12056. return invalidParams
  12057. }
  12058. return nil
  12059. }
  12060. // SetTier sets the Tier field's value.
  12061. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  12062. s.Tier = &v
  12063. return s
  12064. }
  12065. type Grant struct {
  12066. _ struct{} `type:"structure"`
  12067. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  12068. // Specifies the permission given to the grantee.
  12069. Permission *string `type:"string" enum:"Permission"`
  12070. }
  12071. // String returns the string representation
  12072. func (s Grant) String() string {
  12073. return awsutil.Prettify(s)
  12074. }
  12075. // GoString returns the string representation
  12076. func (s Grant) GoString() string {
  12077. return s.String()
  12078. }
  12079. // Validate inspects the fields of the type to determine if they are valid.
  12080. func (s *Grant) Validate() error {
  12081. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  12082. if s.Grantee != nil {
  12083. if err := s.Grantee.Validate(); err != nil {
  12084. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  12085. }
  12086. }
  12087. if invalidParams.Len() > 0 {
  12088. return invalidParams
  12089. }
  12090. return nil
  12091. }
  12092. // SetGrantee sets the Grantee field's value.
  12093. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  12094. s.Grantee = v
  12095. return s
  12096. }
  12097. // SetPermission sets the Permission field's value.
  12098. func (s *Grant) SetPermission(v string) *Grant {
  12099. s.Permission = &v
  12100. return s
  12101. }
  12102. type Grantee struct {
  12103. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  12104. // Screen name of the grantee.
  12105. DisplayName *string `type:"string"`
  12106. // Email address of the grantee.
  12107. EmailAddress *string `type:"string"`
  12108. // The canonical user ID of the grantee.
  12109. ID *string `type:"string"`
  12110. // Type of grantee
  12111. //
  12112. // Type is a required field
  12113. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  12114. // URI of the grantee group.
  12115. URI *string `type:"string"`
  12116. }
  12117. // String returns the string representation
  12118. func (s Grantee) String() string {
  12119. return awsutil.Prettify(s)
  12120. }
  12121. // GoString returns the string representation
  12122. func (s Grantee) GoString() string {
  12123. return s.String()
  12124. }
  12125. // Validate inspects the fields of the type to determine if they are valid.
  12126. func (s *Grantee) Validate() error {
  12127. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  12128. if s.Type == nil {
  12129. invalidParams.Add(request.NewErrParamRequired("Type"))
  12130. }
  12131. if invalidParams.Len() > 0 {
  12132. return invalidParams
  12133. }
  12134. return nil
  12135. }
  12136. // SetDisplayName sets the DisplayName field's value.
  12137. func (s *Grantee) SetDisplayName(v string) *Grantee {
  12138. s.DisplayName = &v
  12139. return s
  12140. }
  12141. // SetEmailAddress sets the EmailAddress field's value.
  12142. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  12143. s.EmailAddress = &v
  12144. return s
  12145. }
  12146. // SetID sets the ID field's value.
  12147. func (s *Grantee) SetID(v string) *Grantee {
  12148. s.ID = &v
  12149. return s
  12150. }
  12151. // SetType sets the Type field's value.
  12152. func (s *Grantee) SetType(v string) *Grantee {
  12153. s.Type = &v
  12154. return s
  12155. }
  12156. // SetURI sets the URI field's value.
  12157. func (s *Grantee) SetURI(v string) *Grantee {
  12158. s.URI = &v
  12159. return s
  12160. }
  12161. type HeadBucketInput struct {
  12162. _ struct{} `type:"structure"`
  12163. // Bucket is a required field
  12164. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12165. }
  12166. // String returns the string representation
  12167. func (s HeadBucketInput) String() string {
  12168. return awsutil.Prettify(s)
  12169. }
  12170. // GoString returns the string representation
  12171. func (s HeadBucketInput) GoString() string {
  12172. return s.String()
  12173. }
  12174. // Validate inspects the fields of the type to determine if they are valid.
  12175. func (s *HeadBucketInput) Validate() error {
  12176. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  12177. if s.Bucket == nil {
  12178. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12179. }
  12180. if s.Bucket != nil && len(*s.Bucket) < 1 {
  12181. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  12182. }
  12183. if invalidParams.Len() > 0 {
  12184. return invalidParams
  12185. }
  12186. return nil
  12187. }
  12188. // SetBucket sets the Bucket field's value.
  12189. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  12190. s.Bucket = &v
  12191. return s
  12192. }
  12193. func (s *HeadBucketInput) getBucket() (v string) {
  12194. if s.Bucket == nil {
  12195. return v
  12196. }
  12197. return *s.Bucket
  12198. }
  12199. type HeadBucketOutput struct {
  12200. _ struct{} `type:"structure"`
  12201. }
  12202. // String returns the string representation
  12203. func (s HeadBucketOutput) String() string {
  12204. return awsutil.Prettify(s)
  12205. }
  12206. // GoString returns the string representation
  12207. func (s HeadBucketOutput) GoString() string {
  12208. return s.String()
  12209. }
  12210. type HeadObjectInput struct {
  12211. _ struct{} `type:"structure"`
  12212. // Bucket is a required field
  12213. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12214. // Return the object only if its entity tag (ETag) is the same as the one specified,
  12215. // otherwise return a 412 (precondition failed).
  12216. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  12217. // Return the object only if it has been modified since the specified time,
  12218. // otherwise return a 304 (not modified).
  12219. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  12220. // Return the object only if its entity tag (ETag) is different from the one
  12221. // specified, otherwise return a 304 (not modified).
  12222. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  12223. // Return the object only if it has not been modified since the specified time,
  12224. // otherwise return a 412 (precondition failed).
  12225. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  12226. // Key is a required field
  12227. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  12228. // Part number of the object being read. This is a positive integer between
  12229. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  12230. // Useful querying about the size of the part and the number of parts in this
  12231. // object.
  12232. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  12233. // Downloads the specified range bytes of an object. For more information about
  12234. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  12235. Range *string `location:"header" locationName:"Range" type:"string"`
  12236. // Confirms that the requester knows that she or he will be charged for the
  12237. // request. Bucket owners need not specify this parameter in their requests.
  12238. // Documentation on downloading objects from requester pays buckets can be found
  12239. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  12240. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12241. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  12242. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  12243. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  12244. // data. This value is used to store the object and then it is discarded; Amazon
  12245. // does not store the encryption key. The key must be appropriate for use with
  12246. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  12247. // header.
  12248. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  12249. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  12250. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  12251. // key was transmitted without error.
  12252. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  12253. // VersionId used to reference a specific version of the object.
  12254. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  12255. }
  12256. // String returns the string representation
  12257. func (s HeadObjectInput) String() string {
  12258. return awsutil.Prettify(s)
  12259. }
  12260. // GoString returns the string representation
  12261. func (s HeadObjectInput) GoString() string {
  12262. return s.String()
  12263. }
  12264. // Validate inspects the fields of the type to determine if they are valid.
  12265. func (s *HeadObjectInput) Validate() error {
  12266. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  12267. if s.Bucket == nil {
  12268. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12269. }
  12270. if s.Bucket != nil && len(*s.Bucket) < 1 {
  12271. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  12272. }
  12273. if s.Key == nil {
  12274. invalidParams.Add(request.NewErrParamRequired("Key"))
  12275. }
  12276. if s.Key != nil && len(*s.Key) < 1 {
  12277. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12278. }
  12279. if invalidParams.Len() > 0 {
  12280. return invalidParams
  12281. }
  12282. return nil
  12283. }
  12284. // SetBucket sets the Bucket field's value.
  12285. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  12286. s.Bucket = &v
  12287. return s
  12288. }
  12289. func (s *HeadObjectInput) getBucket() (v string) {
  12290. if s.Bucket == nil {
  12291. return v
  12292. }
  12293. return *s.Bucket
  12294. }
  12295. // SetIfMatch sets the IfMatch field's value.
  12296. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  12297. s.IfMatch = &v
  12298. return s
  12299. }
  12300. // SetIfModifiedSince sets the IfModifiedSince field's value.
  12301. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  12302. s.IfModifiedSince = &v
  12303. return s
  12304. }
  12305. // SetIfNoneMatch sets the IfNoneMatch field's value.
  12306. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  12307. s.IfNoneMatch = &v
  12308. return s
  12309. }
  12310. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  12311. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  12312. s.IfUnmodifiedSince = &v
  12313. return s
  12314. }
  12315. // SetKey sets the Key field's value.
  12316. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  12317. s.Key = &v
  12318. return s
  12319. }
  12320. // SetPartNumber sets the PartNumber field's value.
  12321. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  12322. s.PartNumber = &v
  12323. return s
  12324. }
  12325. // SetRange sets the Range field's value.
  12326. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  12327. s.Range = &v
  12328. return s
  12329. }
  12330. // SetRequestPayer sets the RequestPayer field's value.
  12331. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  12332. s.RequestPayer = &v
  12333. return s
  12334. }
  12335. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  12336. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  12337. s.SSECustomerAlgorithm = &v
  12338. return s
  12339. }
  12340. // SetSSECustomerKey sets the SSECustomerKey field's value.
  12341. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  12342. s.SSECustomerKey = &v
  12343. return s
  12344. }
  12345. func (s *HeadObjectInput) getSSECustomerKey() (v string) {
  12346. if s.SSECustomerKey == nil {
  12347. return v
  12348. }
  12349. return *s.SSECustomerKey
  12350. }
  12351. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  12352. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  12353. s.SSECustomerKeyMD5 = &v
  12354. return s
  12355. }
  12356. // SetVersionId sets the VersionId field's value.
  12357. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  12358. s.VersionId = &v
  12359. return s
  12360. }
  12361. type HeadObjectOutput struct {
  12362. _ struct{} `type:"structure"`
  12363. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  12364. // Specifies caching behavior along the request/reply chain.
  12365. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  12366. // Specifies presentational information for the object.
  12367. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  12368. // Specifies what content encodings have been applied to the object and thus
  12369. // what decoding mechanisms must be applied to obtain the media-type referenced
  12370. // by the Content-Type header field.
  12371. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  12372. // The language the content is in.
  12373. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  12374. // Size of the body in bytes.
  12375. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  12376. // A standard MIME type describing the format of the object data.
  12377. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  12378. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  12379. // Marker. If false, this response header does not appear in the response.
  12380. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  12381. // An ETag is an opaque identifier assigned by a web server to a specific version
  12382. // of a resource found at a URL
  12383. ETag *string `location:"header" locationName:"ETag" type:"string"`
  12384. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  12385. // includes this header. It includes the expiry-date and rule-id key value pairs
  12386. // providing object expiration information. The value of the rule-id is URL
  12387. // encoded.
  12388. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  12389. // The date and time at which the object is no longer cacheable.
  12390. Expires *string `location:"header" locationName:"Expires" type:"string"`
  12391. // Last modified date of the object
  12392. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  12393. // A map of metadata to store with the object in S3.
  12394. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  12395. // This is set to the number of metadata entries not returned in x-amz-meta
  12396. // headers. This can happen if you create metadata using an API like SOAP that
  12397. // supports more flexible metadata than the REST API. For example, using SOAP,
  12398. // you can create metadata whose values are not legal HTTP headers.
  12399. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  12400. // The Legal Hold status for the specified object.
  12401. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  12402. // The Object Lock mode currently in place for this object.
  12403. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  12404. // The date and time when this object's Object Lock will expire.
  12405. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  12406. // The count of parts this object has.
  12407. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  12408. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  12409. // If present, indicates that the requester was successfully charged for the
  12410. // request.
  12411. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  12412. // Provides information about object restoration operation and expiration time
  12413. // of the restored object copy.
  12414. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  12415. // If server-side encryption with a customer-provided encryption key was requested,
  12416. // the response will include this header confirming the encryption algorithm
  12417. // used.
  12418. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  12419. // If server-side encryption with a customer-provided encryption key was requested,
  12420. // the response will include this header to provide round trip message integrity
  12421. // verification of the customer-provided encryption key.
  12422. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  12423. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  12424. // encryption key that was used for the object.
  12425. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  12426. // The Server-side encryption algorithm used when storing this object in S3
  12427. // (e.g., AES256, aws:kms).
  12428. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  12429. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  12430. // Version of the object.
  12431. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  12432. // If the bucket is configured as a website, redirects requests for this object
  12433. // to another object in the same bucket or to an external URL. Amazon S3 stores
  12434. // the value of this header in the object metadata.
  12435. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  12436. }
  12437. // String returns the string representation
  12438. func (s HeadObjectOutput) String() string {
  12439. return awsutil.Prettify(s)
  12440. }
  12441. // GoString returns the string representation
  12442. func (s HeadObjectOutput) GoString() string {
  12443. return s.String()
  12444. }
  12445. // SetAcceptRanges sets the AcceptRanges field's value.
  12446. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  12447. s.AcceptRanges = &v
  12448. return s
  12449. }
  12450. // SetCacheControl sets the CacheControl field's value.
  12451. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  12452. s.CacheControl = &v
  12453. return s
  12454. }
  12455. // SetContentDisposition sets the ContentDisposition field's value.
  12456. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  12457. s.ContentDisposition = &v
  12458. return s
  12459. }
  12460. // SetContentEncoding sets the ContentEncoding field's value.
  12461. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  12462. s.ContentEncoding = &v
  12463. return s
  12464. }
  12465. // SetContentLanguage sets the ContentLanguage field's value.
  12466. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  12467. s.ContentLanguage = &v
  12468. return s
  12469. }
  12470. // SetContentLength sets the ContentLength field's value.
  12471. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  12472. s.ContentLength = &v
  12473. return s
  12474. }
  12475. // SetContentType sets the ContentType field's value.
  12476. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  12477. s.ContentType = &v
  12478. return s
  12479. }
  12480. // SetDeleteMarker sets the DeleteMarker field's value.
  12481. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  12482. s.DeleteMarker = &v
  12483. return s
  12484. }
  12485. // SetETag sets the ETag field's value.
  12486. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  12487. s.ETag = &v
  12488. return s
  12489. }
  12490. // SetExpiration sets the Expiration field's value.
  12491. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  12492. s.Expiration = &v
  12493. return s
  12494. }
  12495. // SetExpires sets the Expires field's value.
  12496. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  12497. s.Expires = &v
  12498. return s
  12499. }
  12500. // SetLastModified sets the LastModified field's value.
  12501. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  12502. s.LastModified = &v
  12503. return s
  12504. }
  12505. // SetMetadata sets the Metadata field's value.
  12506. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  12507. s.Metadata = v
  12508. return s
  12509. }
  12510. // SetMissingMeta sets the MissingMeta field's value.
  12511. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  12512. s.MissingMeta = &v
  12513. return s
  12514. }
  12515. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  12516. func (s *HeadObjectOutput) SetObjectLockLegalHoldStatus(v string) *HeadObjectOutput {
  12517. s.ObjectLockLegalHoldStatus = &v
  12518. return s
  12519. }
  12520. // SetObjectLockMode sets the ObjectLockMode field's value.
  12521. func (s *HeadObjectOutput) SetObjectLockMode(v string) *HeadObjectOutput {
  12522. s.ObjectLockMode = &v
  12523. return s
  12524. }
  12525. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  12526. func (s *HeadObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *HeadObjectOutput {
  12527. s.ObjectLockRetainUntilDate = &v
  12528. return s
  12529. }
  12530. // SetPartsCount sets the PartsCount field's value.
  12531. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  12532. s.PartsCount = &v
  12533. return s
  12534. }
  12535. // SetReplicationStatus sets the ReplicationStatus field's value.
  12536. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  12537. s.ReplicationStatus = &v
  12538. return s
  12539. }
  12540. // SetRequestCharged sets the RequestCharged field's value.
  12541. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  12542. s.RequestCharged = &v
  12543. return s
  12544. }
  12545. // SetRestore sets the Restore field's value.
  12546. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  12547. s.Restore = &v
  12548. return s
  12549. }
  12550. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  12551. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  12552. s.SSECustomerAlgorithm = &v
  12553. return s
  12554. }
  12555. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  12556. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  12557. s.SSECustomerKeyMD5 = &v
  12558. return s
  12559. }
  12560. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  12561. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  12562. s.SSEKMSKeyId = &v
  12563. return s
  12564. }
  12565. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  12566. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  12567. s.ServerSideEncryption = &v
  12568. return s
  12569. }
  12570. // SetStorageClass sets the StorageClass field's value.
  12571. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  12572. s.StorageClass = &v
  12573. return s
  12574. }
  12575. // SetVersionId sets the VersionId field's value.
  12576. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  12577. s.VersionId = &v
  12578. return s
  12579. }
  12580. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  12581. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  12582. s.WebsiteRedirectLocation = &v
  12583. return s
  12584. }
  12585. type IndexDocument struct {
  12586. _ struct{} `type:"structure"`
  12587. // A suffix that is appended to a request that is for a directory on the website
  12588. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  12589. // the data that is returned will be for the object with the key name images/index.html)
  12590. // The suffix must not be empty and must not include a slash character.
  12591. //
  12592. // Suffix is a required field
  12593. Suffix *string `type:"string" required:"true"`
  12594. }
  12595. // String returns the string representation
  12596. func (s IndexDocument) String() string {
  12597. return awsutil.Prettify(s)
  12598. }
  12599. // GoString returns the string representation
  12600. func (s IndexDocument) GoString() string {
  12601. return s.String()
  12602. }
  12603. // Validate inspects the fields of the type to determine if they are valid.
  12604. func (s *IndexDocument) Validate() error {
  12605. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  12606. if s.Suffix == nil {
  12607. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  12608. }
  12609. if invalidParams.Len() > 0 {
  12610. return invalidParams
  12611. }
  12612. return nil
  12613. }
  12614. // SetSuffix sets the Suffix field's value.
  12615. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  12616. s.Suffix = &v
  12617. return s
  12618. }
  12619. type Initiator struct {
  12620. _ struct{} `type:"structure"`
  12621. // Name of the Principal.
  12622. DisplayName *string `type:"string"`
  12623. // If the principal is an AWS account, it provides the Canonical User ID. If
  12624. // the principal is an IAM User, it provides a user ARN value.
  12625. ID *string `type:"string"`
  12626. }
  12627. // String returns the string representation
  12628. func (s Initiator) String() string {
  12629. return awsutil.Prettify(s)
  12630. }
  12631. // GoString returns the string representation
  12632. func (s Initiator) GoString() string {
  12633. return s.String()
  12634. }
  12635. // SetDisplayName sets the DisplayName field's value.
  12636. func (s *Initiator) SetDisplayName(v string) *Initiator {
  12637. s.DisplayName = &v
  12638. return s
  12639. }
  12640. // SetID sets the ID field's value.
  12641. func (s *Initiator) SetID(v string) *Initiator {
  12642. s.ID = &v
  12643. return s
  12644. }
  12645. // Describes the serialization format of the object.
  12646. type InputSerialization struct {
  12647. _ struct{} `type:"structure"`
  12648. // Describes the serialization of a CSV-encoded object.
  12649. CSV *CSVInput `type:"structure"`
  12650. // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default
  12651. // Value: NONE.
  12652. CompressionType *string `type:"string" enum:"CompressionType"`
  12653. // Specifies JSON as object's input serialization format.
  12654. JSON *JSONInput `type:"structure"`
  12655. // Specifies Parquet as object's input serialization format.
  12656. Parquet *ParquetInput `type:"structure"`
  12657. }
  12658. // String returns the string representation
  12659. func (s InputSerialization) String() string {
  12660. return awsutil.Prettify(s)
  12661. }
  12662. // GoString returns the string representation
  12663. func (s InputSerialization) GoString() string {
  12664. return s.String()
  12665. }
  12666. // SetCSV sets the CSV field's value.
  12667. func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
  12668. s.CSV = v
  12669. return s
  12670. }
  12671. // SetCompressionType sets the CompressionType field's value.
  12672. func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
  12673. s.CompressionType = &v
  12674. return s
  12675. }
  12676. // SetJSON sets the JSON field's value.
  12677. func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
  12678. s.JSON = v
  12679. return s
  12680. }
  12681. // SetParquet sets the Parquet field's value.
  12682. func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
  12683. s.Parquet = v
  12684. return s
  12685. }
  12686. type InventoryConfiguration struct {
  12687. _ struct{} `type:"structure"`
  12688. // Contains information about where to publish the inventory results.
  12689. //
  12690. // Destination is a required field
  12691. Destination *InventoryDestination `type:"structure" required:"true"`
  12692. // Specifies an inventory filter. The inventory only includes objects that meet
  12693. // the filter's criteria.
  12694. Filter *InventoryFilter `type:"structure"`
  12695. // The ID used to identify the inventory configuration.
  12696. //
  12697. // Id is a required field
  12698. Id *string `type:"string" required:"true"`
  12699. // Specifies which object version(s) to included in the inventory results.
  12700. //
  12701. // IncludedObjectVersions is a required field
  12702. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  12703. // Specifies whether the inventory is enabled or disabled.
  12704. //
  12705. // IsEnabled is a required field
  12706. IsEnabled *bool `type:"boolean" required:"true"`
  12707. // Contains the optional fields that are included in the inventory results.
  12708. OptionalFields []*string `locationNameList:"Field" type:"list"`
  12709. // Specifies the schedule for generating inventory results.
  12710. //
  12711. // Schedule is a required field
  12712. Schedule *InventorySchedule `type:"structure" required:"true"`
  12713. }
  12714. // String returns the string representation
  12715. func (s InventoryConfiguration) String() string {
  12716. return awsutil.Prettify(s)
  12717. }
  12718. // GoString returns the string representation
  12719. func (s InventoryConfiguration) GoString() string {
  12720. return s.String()
  12721. }
  12722. // Validate inspects the fields of the type to determine if they are valid.
  12723. func (s *InventoryConfiguration) Validate() error {
  12724. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  12725. if s.Destination == nil {
  12726. invalidParams.Add(request.NewErrParamRequired("Destination"))
  12727. }
  12728. if s.Id == nil {
  12729. invalidParams.Add(request.NewErrParamRequired("Id"))
  12730. }
  12731. if s.IncludedObjectVersions == nil {
  12732. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  12733. }
  12734. if s.IsEnabled == nil {
  12735. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  12736. }
  12737. if s.Schedule == nil {
  12738. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  12739. }
  12740. if s.Destination != nil {
  12741. if err := s.Destination.Validate(); err != nil {
  12742. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  12743. }
  12744. }
  12745. if s.Filter != nil {
  12746. if err := s.Filter.Validate(); err != nil {
  12747. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  12748. }
  12749. }
  12750. if s.Schedule != nil {
  12751. if err := s.Schedule.Validate(); err != nil {
  12752. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  12753. }
  12754. }
  12755. if invalidParams.Len() > 0 {
  12756. return invalidParams
  12757. }
  12758. return nil
  12759. }
  12760. // SetDestination sets the Destination field's value.
  12761. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  12762. s.Destination = v
  12763. return s
  12764. }
  12765. // SetFilter sets the Filter field's value.
  12766. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  12767. s.Filter = v
  12768. return s
  12769. }
  12770. // SetId sets the Id field's value.
  12771. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  12772. s.Id = &v
  12773. return s
  12774. }
  12775. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  12776. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  12777. s.IncludedObjectVersions = &v
  12778. return s
  12779. }
  12780. // SetIsEnabled sets the IsEnabled field's value.
  12781. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  12782. s.IsEnabled = &v
  12783. return s
  12784. }
  12785. // SetOptionalFields sets the OptionalFields field's value.
  12786. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  12787. s.OptionalFields = v
  12788. return s
  12789. }
  12790. // SetSchedule sets the Schedule field's value.
  12791. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  12792. s.Schedule = v
  12793. return s
  12794. }
  12795. type InventoryDestination struct {
  12796. _ struct{} `type:"structure"`
  12797. // Contains the bucket name, file format, bucket owner (optional), and prefix
  12798. // (optional) where inventory results are published.
  12799. //
  12800. // S3BucketDestination is a required field
  12801. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  12802. }
  12803. // String returns the string representation
  12804. func (s InventoryDestination) String() string {
  12805. return awsutil.Prettify(s)
  12806. }
  12807. // GoString returns the string representation
  12808. func (s InventoryDestination) GoString() string {
  12809. return s.String()
  12810. }
  12811. // Validate inspects the fields of the type to determine if they are valid.
  12812. func (s *InventoryDestination) Validate() error {
  12813. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  12814. if s.S3BucketDestination == nil {
  12815. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  12816. }
  12817. if s.S3BucketDestination != nil {
  12818. if err := s.S3BucketDestination.Validate(); err != nil {
  12819. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  12820. }
  12821. }
  12822. if invalidParams.Len() > 0 {
  12823. return invalidParams
  12824. }
  12825. return nil
  12826. }
  12827. // SetS3BucketDestination sets the S3BucketDestination field's value.
  12828. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  12829. s.S3BucketDestination = v
  12830. return s
  12831. }
  12832. // Contains the type of server-side encryption used to encrypt the inventory
  12833. // results.
  12834. type InventoryEncryption struct {
  12835. _ struct{} `type:"structure"`
  12836. // Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
  12837. SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
  12838. // Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
  12839. SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
  12840. }
  12841. // String returns the string representation
  12842. func (s InventoryEncryption) String() string {
  12843. return awsutil.Prettify(s)
  12844. }
  12845. // GoString returns the string representation
  12846. func (s InventoryEncryption) GoString() string {
  12847. return s.String()
  12848. }
  12849. // Validate inspects the fields of the type to determine if they are valid.
  12850. func (s *InventoryEncryption) Validate() error {
  12851. invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
  12852. if s.SSEKMS != nil {
  12853. if err := s.SSEKMS.Validate(); err != nil {
  12854. invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
  12855. }
  12856. }
  12857. if invalidParams.Len() > 0 {
  12858. return invalidParams
  12859. }
  12860. return nil
  12861. }
  12862. // SetSSEKMS sets the SSEKMS field's value.
  12863. func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
  12864. s.SSEKMS = v
  12865. return s
  12866. }
  12867. // SetSSES3 sets the SSES3 field's value.
  12868. func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
  12869. s.SSES3 = v
  12870. return s
  12871. }
  12872. type InventoryFilter struct {
  12873. _ struct{} `type:"structure"`
  12874. // The prefix that an object must have to be included in the inventory results.
  12875. //
  12876. // Prefix is a required field
  12877. Prefix *string `type:"string" required:"true"`
  12878. }
  12879. // String returns the string representation
  12880. func (s InventoryFilter) String() string {
  12881. return awsutil.Prettify(s)
  12882. }
  12883. // GoString returns the string representation
  12884. func (s InventoryFilter) GoString() string {
  12885. return s.String()
  12886. }
  12887. // Validate inspects the fields of the type to determine if they are valid.
  12888. func (s *InventoryFilter) Validate() error {
  12889. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  12890. if s.Prefix == nil {
  12891. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  12892. }
  12893. if invalidParams.Len() > 0 {
  12894. return invalidParams
  12895. }
  12896. return nil
  12897. }
  12898. // SetPrefix sets the Prefix field's value.
  12899. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  12900. s.Prefix = &v
  12901. return s
  12902. }
  12903. type InventoryS3BucketDestination struct {
  12904. _ struct{} `type:"structure"`
  12905. // The ID of the account that owns the destination bucket.
  12906. AccountId *string `type:"string"`
  12907. // The Amazon resource name (ARN) of the bucket where inventory results will
  12908. // be published.
  12909. //
  12910. // Bucket is a required field
  12911. Bucket *string `type:"string" required:"true"`
  12912. // Contains the type of server-side encryption used to encrypt the inventory
  12913. // results.
  12914. Encryption *InventoryEncryption `type:"structure"`
  12915. // Specifies the output format of the inventory results.
  12916. //
  12917. // Format is a required field
  12918. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  12919. // The prefix that is prepended to all inventory results.
  12920. Prefix *string `type:"string"`
  12921. }
  12922. // String returns the string representation
  12923. func (s InventoryS3BucketDestination) String() string {
  12924. return awsutil.Prettify(s)
  12925. }
  12926. // GoString returns the string representation
  12927. func (s InventoryS3BucketDestination) GoString() string {
  12928. return s.String()
  12929. }
  12930. // Validate inspects the fields of the type to determine if they are valid.
  12931. func (s *InventoryS3BucketDestination) Validate() error {
  12932. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  12933. if s.Bucket == nil {
  12934. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12935. }
  12936. if s.Format == nil {
  12937. invalidParams.Add(request.NewErrParamRequired("Format"))
  12938. }
  12939. if s.Encryption != nil {
  12940. if err := s.Encryption.Validate(); err != nil {
  12941. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  12942. }
  12943. }
  12944. if invalidParams.Len() > 0 {
  12945. return invalidParams
  12946. }
  12947. return nil
  12948. }
  12949. // SetAccountId sets the AccountId field's value.
  12950. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  12951. s.AccountId = &v
  12952. return s
  12953. }
  12954. // SetBucket sets the Bucket field's value.
  12955. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  12956. s.Bucket = &v
  12957. return s
  12958. }
  12959. func (s *InventoryS3BucketDestination) getBucket() (v string) {
  12960. if s.Bucket == nil {
  12961. return v
  12962. }
  12963. return *s.Bucket
  12964. }
  12965. // SetEncryption sets the Encryption field's value.
  12966. func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
  12967. s.Encryption = v
  12968. return s
  12969. }
  12970. // SetFormat sets the Format field's value.
  12971. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  12972. s.Format = &v
  12973. return s
  12974. }
  12975. // SetPrefix sets the Prefix field's value.
  12976. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  12977. s.Prefix = &v
  12978. return s
  12979. }
  12980. type InventorySchedule struct {
  12981. _ struct{} `type:"structure"`
  12982. // Specifies how frequently inventory results are produced.
  12983. //
  12984. // Frequency is a required field
  12985. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  12986. }
  12987. // String returns the string representation
  12988. func (s InventorySchedule) String() string {
  12989. return awsutil.Prettify(s)
  12990. }
  12991. // GoString returns the string representation
  12992. func (s InventorySchedule) GoString() string {
  12993. return s.String()
  12994. }
  12995. // Validate inspects the fields of the type to determine if they are valid.
  12996. func (s *InventorySchedule) Validate() error {
  12997. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  12998. if s.Frequency == nil {
  12999. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  13000. }
  13001. if invalidParams.Len() > 0 {
  13002. return invalidParams
  13003. }
  13004. return nil
  13005. }
  13006. // SetFrequency sets the Frequency field's value.
  13007. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  13008. s.Frequency = &v
  13009. return s
  13010. }
  13011. type JSONInput struct {
  13012. _ struct{} `type:"structure"`
  13013. // The type of JSON. Valid values: Document, Lines.
  13014. Type *string `type:"string" enum:"JSONType"`
  13015. }
  13016. // String returns the string representation
  13017. func (s JSONInput) String() string {
  13018. return awsutil.Prettify(s)
  13019. }
  13020. // GoString returns the string representation
  13021. func (s JSONInput) GoString() string {
  13022. return s.String()
  13023. }
  13024. // SetType sets the Type field's value.
  13025. func (s *JSONInput) SetType(v string) *JSONInput {
  13026. s.Type = &v
  13027. return s
  13028. }
  13029. type JSONOutput struct {
  13030. _ struct{} `type:"structure"`
  13031. // The value used to separate individual records in the output.
  13032. RecordDelimiter *string `type:"string"`
  13033. }
  13034. // String returns the string representation
  13035. func (s JSONOutput) String() string {
  13036. return awsutil.Prettify(s)
  13037. }
  13038. // GoString returns the string representation
  13039. func (s JSONOutput) GoString() string {
  13040. return s.String()
  13041. }
  13042. // SetRecordDelimiter sets the RecordDelimiter field's value.
  13043. func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
  13044. s.RecordDelimiter = &v
  13045. return s
  13046. }
  13047. // A container for object key name prefix and suffix filtering rules.
  13048. type KeyFilter struct {
  13049. _ struct{} `type:"structure"`
  13050. // A list of containers for the key value pair that defines the criteria for
  13051. // the filter rule.
  13052. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  13053. }
  13054. // String returns the string representation
  13055. func (s KeyFilter) String() string {
  13056. return awsutil.Prettify(s)
  13057. }
  13058. // GoString returns the string representation
  13059. func (s KeyFilter) GoString() string {
  13060. return s.String()
  13061. }
  13062. // SetFilterRules sets the FilterRules field's value.
  13063. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  13064. s.FilterRules = v
  13065. return s
  13066. }
  13067. // A container for specifying the configuration for AWS Lambda notifications.
  13068. type LambdaFunctionConfiguration struct {
  13069. _ struct{} `type:"structure"`
  13070. // Events is a required field
  13071. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  13072. // A container for object key name filtering rules. For information about key
  13073. // name filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  13074. // in the Amazon Simple Storage Service Developer Guide.
  13075. Filter *NotificationConfigurationFilter `type:"structure"`
  13076. // An optional unique identifier for configurations in a notification configuration.
  13077. // If you don't provide one, Amazon S3 will assign an ID.
  13078. Id *string `type:"string"`
  13079. // The Amazon Resource Name (ARN) of the Lambda cloud function that Amazon S3
  13080. // can invoke when it detects events of the specified type.
  13081. //
  13082. // LambdaFunctionArn is a required field
  13083. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  13084. }
  13085. // String returns the string representation
  13086. func (s LambdaFunctionConfiguration) String() string {
  13087. return awsutil.Prettify(s)
  13088. }
  13089. // GoString returns the string representation
  13090. func (s LambdaFunctionConfiguration) GoString() string {
  13091. return s.String()
  13092. }
  13093. // Validate inspects the fields of the type to determine if they are valid.
  13094. func (s *LambdaFunctionConfiguration) Validate() error {
  13095. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  13096. if s.Events == nil {
  13097. invalidParams.Add(request.NewErrParamRequired("Events"))
  13098. }
  13099. if s.LambdaFunctionArn == nil {
  13100. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  13101. }
  13102. if invalidParams.Len() > 0 {
  13103. return invalidParams
  13104. }
  13105. return nil
  13106. }
  13107. // SetEvents sets the Events field's value.
  13108. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  13109. s.Events = v
  13110. return s
  13111. }
  13112. // SetFilter sets the Filter field's value.
  13113. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  13114. s.Filter = v
  13115. return s
  13116. }
  13117. // SetId sets the Id field's value.
  13118. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  13119. s.Id = &v
  13120. return s
  13121. }
  13122. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  13123. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  13124. s.LambdaFunctionArn = &v
  13125. return s
  13126. }
  13127. type LifecycleConfiguration struct {
  13128. _ struct{} `type:"structure"`
  13129. // Rules is a required field
  13130. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  13131. }
  13132. // String returns the string representation
  13133. func (s LifecycleConfiguration) String() string {
  13134. return awsutil.Prettify(s)
  13135. }
  13136. // GoString returns the string representation
  13137. func (s LifecycleConfiguration) GoString() string {
  13138. return s.String()
  13139. }
  13140. // Validate inspects the fields of the type to determine if they are valid.
  13141. func (s *LifecycleConfiguration) Validate() error {
  13142. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  13143. if s.Rules == nil {
  13144. invalidParams.Add(request.NewErrParamRequired("Rules"))
  13145. }
  13146. if s.Rules != nil {
  13147. for i, v := range s.Rules {
  13148. if v == nil {
  13149. continue
  13150. }
  13151. if err := v.Validate(); err != nil {
  13152. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  13153. }
  13154. }
  13155. }
  13156. if invalidParams.Len() > 0 {
  13157. return invalidParams
  13158. }
  13159. return nil
  13160. }
  13161. // SetRules sets the Rules field's value.
  13162. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  13163. s.Rules = v
  13164. return s
  13165. }
  13166. type LifecycleExpiration struct {
  13167. _ struct{} `type:"structure"`
  13168. // Indicates at what date the object is to be moved or deleted. Should be in
  13169. // GMT ISO 8601 Format.
  13170. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13171. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  13172. // The value must be a non-zero positive integer.
  13173. Days *int64 `type:"integer"`
  13174. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  13175. // versions. If set to true, the delete marker will be expired; if set to false
  13176. // the policy takes no action. This cannot be specified with Days or Date in
  13177. // a Lifecycle Expiration Policy.
  13178. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  13179. }
  13180. // String returns the string representation
  13181. func (s LifecycleExpiration) String() string {
  13182. return awsutil.Prettify(s)
  13183. }
  13184. // GoString returns the string representation
  13185. func (s LifecycleExpiration) GoString() string {
  13186. return s.String()
  13187. }
  13188. // SetDate sets the Date field's value.
  13189. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  13190. s.Date = &v
  13191. return s
  13192. }
  13193. // SetDays sets the Days field's value.
  13194. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  13195. s.Days = &v
  13196. return s
  13197. }
  13198. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  13199. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  13200. s.ExpiredObjectDeleteMarker = &v
  13201. return s
  13202. }
  13203. type LifecycleRule struct {
  13204. _ struct{} `type:"structure"`
  13205. // Specifies the days since the initiation of an Incomplete Multipart Upload
  13206. // that Lifecycle will wait before permanently removing all parts of the upload.
  13207. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  13208. Expiration *LifecycleExpiration `type:"structure"`
  13209. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  13210. // A Filter must have exactly one of Prefix, Tag, or And specified.
  13211. Filter *LifecycleRuleFilter `type:"structure"`
  13212. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  13213. ID *string `type:"string"`
  13214. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  13215. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  13216. // configuration action on a bucket that has versioning enabled (or suspended)
  13217. // to request that Amazon S3 delete noncurrent object versions at a specific
  13218. // period in the object's lifetime.
  13219. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  13220. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  13221. // Prefix identifying one or more objects to which the rule applies. This is
  13222. // No longer used; use Filter instead.
  13223. //
  13224. // Deprecated: Prefix has been deprecated
  13225. Prefix *string `deprecated:"true" type:"string"`
  13226. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  13227. // is not currently being applied.
  13228. //
  13229. // Status is a required field
  13230. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  13231. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  13232. }
  13233. // String returns the string representation
  13234. func (s LifecycleRule) String() string {
  13235. return awsutil.Prettify(s)
  13236. }
  13237. // GoString returns the string representation
  13238. func (s LifecycleRule) GoString() string {
  13239. return s.String()
  13240. }
  13241. // Validate inspects the fields of the type to determine if they are valid.
  13242. func (s *LifecycleRule) Validate() error {
  13243. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  13244. if s.Status == nil {
  13245. invalidParams.Add(request.NewErrParamRequired("Status"))
  13246. }
  13247. if s.Filter != nil {
  13248. if err := s.Filter.Validate(); err != nil {
  13249. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  13250. }
  13251. }
  13252. if invalidParams.Len() > 0 {
  13253. return invalidParams
  13254. }
  13255. return nil
  13256. }
  13257. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  13258. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  13259. s.AbortIncompleteMultipartUpload = v
  13260. return s
  13261. }
  13262. // SetExpiration sets the Expiration field's value.
  13263. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  13264. s.Expiration = v
  13265. return s
  13266. }
  13267. // SetFilter sets the Filter field's value.
  13268. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  13269. s.Filter = v
  13270. return s
  13271. }
  13272. // SetID sets the ID field's value.
  13273. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  13274. s.ID = &v
  13275. return s
  13276. }
  13277. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  13278. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  13279. s.NoncurrentVersionExpiration = v
  13280. return s
  13281. }
  13282. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  13283. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  13284. s.NoncurrentVersionTransitions = v
  13285. return s
  13286. }
  13287. // SetPrefix sets the Prefix field's value.
  13288. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  13289. s.Prefix = &v
  13290. return s
  13291. }
  13292. // SetStatus sets the Status field's value.
  13293. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  13294. s.Status = &v
  13295. return s
  13296. }
  13297. // SetTransitions sets the Transitions field's value.
  13298. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  13299. s.Transitions = v
  13300. return s
  13301. }
  13302. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  13303. // more predicates. The Lifecycle Rule will apply to any object matching all
  13304. // of the predicates configured inside the And operator.
  13305. type LifecycleRuleAndOperator struct {
  13306. _ struct{} `type:"structure"`
  13307. Prefix *string `type:"string"`
  13308. // All of these tags must exist in the object's tag set in order for the rule
  13309. // to apply.
  13310. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  13311. }
  13312. // String returns the string representation
  13313. func (s LifecycleRuleAndOperator) String() string {
  13314. return awsutil.Prettify(s)
  13315. }
  13316. // GoString returns the string representation
  13317. func (s LifecycleRuleAndOperator) GoString() string {
  13318. return s.String()
  13319. }
  13320. // Validate inspects the fields of the type to determine if they are valid.
  13321. func (s *LifecycleRuleAndOperator) Validate() error {
  13322. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  13323. if s.Tags != nil {
  13324. for i, v := range s.Tags {
  13325. if v == nil {
  13326. continue
  13327. }
  13328. if err := v.Validate(); err != nil {
  13329. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  13330. }
  13331. }
  13332. }
  13333. if invalidParams.Len() > 0 {
  13334. return invalidParams
  13335. }
  13336. return nil
  13337. }
  13338. // SetPrefix sets the Prefix field's value.
  13339. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  13340. s.Prefix = &v
  13341. return s
  13342. }
  13343. // SetTags sets the Tags field's value.
  13344. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  13345. s.Tags = v
  13346. return s
  13347. }
  13348. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  13349. // A Filter must have exactly one of Prefix, Tag, or And specified.
  13350. type LifecycleRuleFilter struct {
  13351. _ struct{} `type:"structure"`
  13352. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  13353. // more predicates. The Lifecycle Rule will apply to any object matching all
  13354. // of the predicates configured inside the And operator.
  13355. And *LifecycleRuleAndOperator `type:"structure"`
  13356. // Prefix identifying one or more objects to which the rule applies.
  13357. Prefix *string `type:"string"`
  13358. // This tag must exist in the object's tag set in order for the rule to apply.
  13359. Tag *Tag `type:"structure"`
  13360. }
  13361. // String returns the string representation
  13362. func (s LifecycleRuleFilter) String() string {
  13363. return awsutil.Prettify(s)
  13364. }
  13365. // GoString returns the string representation
  13366. func (s LifecycleRuleFilter) GoString() string {
  13367. return s.String()
  13368. }
  13369. // Validate inspects the fields of the type to determine if they are valid.
  13370. func (s *LifecycleRuleFilter) Validate() error {
  13371. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  13372. if s.And != nil {
  13373. if err := s.And.Validate(); err != nil {
  13374. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  13375. }
  13376. }
  13377. if s.Tag != nil {
  13378. if err := s.Tag.Validate(); err != nil {
  13379. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  13380. }
  13381. }
  13382. if invalidParams.Len() > 0 {
  13383. return invalidParams
  13384. }
  13385. return nil
  13386. }
  13387. // SetAnd sets the And field's value.
  13388. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  13389. s.And = v
  13390. return s
  13391. }
  13392. // SetPrefix sets the Prefix field's value.
  13393. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  13394. s.Prefix = &v
  13395. return s
  13396. }
  13397. // SetTag sets the Tag field's value.
  13398. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  13399. s.Tag = v
  13400. return s
  13401. }
  13402. type ListBucketAnalyticsConfigurationsInput struct {
  13403. _ struct{} `type:"structure"`
  13404. // The name of the bucket from which analytics configurations are retrieved.
  13405. //
  13406. // Bucket is a required field
  13407. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13408. // The ContinuationToken that represents a placeholder from where this request
  13409. // should begin.
  13410. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13411. }
  13412. // String returns the string representation
  13413. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  13414. return awsutil.Prettify(s)
  13415. }
  13416. // GoString returns the string representation
  13417. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  13418. return s.String()
  13419. }
  13420. // Validate inspects the fields of the type to determine if they are valid.
  13421. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  13422. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  13423. if s.Bucket == nil {
  13424. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13425. }
  13426. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13427. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13428. }
  13429. if invalidParams.Len() > 0 {
  13430. return invalidParams
  13431. }
  13432. return nil
  13433. }
  13434. // SetBucket sets the Bucket field's value.
  13435. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  13436. s.Bucket = &v
  13437. return s
  13438. }
  13439. func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
  13440. if s.Bucket == nil {
  13441. return v
  13442. }
  13443. return *s.Bucket
  13444. }
  13445. // SetContinuationToken sets the ContinuationToken field's value.
  13446. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  13447. s.ContinuationToken = &v
  13448. return s
  13449. }
  13450. type ListBucketAnalyticsConfigurationsOutput struct {
  13451. _ struct{} `type:"structure"`
  13452. // The list of analytics configurations for a bucket.
  13453. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  13454. // The ContinuationToken that represents where this request began.
  13455. ContinuationToken *string `type:"string"`
  13456. // Indicates whether the returned list of analytics configurations is complete.
  13457. // A value of true indicates that the list is not complete and the NextContinuationToken
  13458. // will be provided for a subsequent request.
  13459. IsTruncated *bool `type:"boolean"`
  13460. // NextContinuationToken is sent when isTruncated is true, which indicates that
  13461. // there are more analytics configurations to list. The next request must include
  13462. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  13463. NextContinuationToken *string `type:"string"`
  13464. }
  13465. // String returns the string representation
  13466. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  13467. return awsutil.Prettify(s)
  13468. }
  13469. // GoString returns the string representation
  13470. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  13471. return s.String()
  13472. }
  13473. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  13474. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  13475. s.AnalyticsConfigurationList = v
  13476. return s
  13477. }
  13478. // SetContinuationToken sets the ContinuationToken field's value.
  13479. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  13480. s.ContinuationToken = &v
  13481. return s
  13482. }
  13483. // SetIsTruncated sets the IsTruncated field's value.
  13484. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  13485. s.IsTruncated = &v
  13486. return s
  13487. }
  13488. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13489. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  13490. s.NextContinuationToken = &v
  13491. return s
  13492. }
  13493. type ListBucketInventoryConfigurationsInput struct {
  13494. _ struct{} `type:"structure"`
  13495. // The name of the bucket containing the inventory configurations to retrieve.
  13496. //
  13497. // Bucket is a required field
  13498. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13499. // The marker used to continue an inventory configuration listing that has been
  13500. // truncated. Use the NextContinuationToken from a previously truncated list
  13501. // response to continue the listing. The continuation token is an opaque value
  13502. // that Amazon S3 understands.
  13503. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13504. }
  13505. // String returns the string representation
  13506. func (s ListBucketInventoryConfigurationsInput) String() string {
  13507. return awsutil.Prettify(s)
  13508. }
  13509. // GoString returns the string representation
  13510. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  13511. return s.String()
  13512. }
  13513. // Validate inspects the fields of the type to determine if they are valid.
  13514. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  13515. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  13516. if s.Bucket == nil {
  13517. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13518. }
  13519. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13520. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13521. }
  13522. if invalidParams.Len() > 0 {
  13523. return invalidParams
  13524. }
  13525. return nil
  13526. }
  13527. // SetBucket sets the Bucket field's value.
  13528. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  13529. s.Bucket = &v
  13530. return s
  13531. }
  13532. func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
  13533. if s.Bucket == nil {
  13534. return v
  13535. }
  13536. return *s.Bucket
  13537. }
  13538. // SetContinuationToken sets the ContinuationToken field's value.
  13539. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  13540. s.ContinuationToken = &v
  13541. return s
  13542. }
  13543. type ListBucketInventoryConfigurationsOutput struct {
  13544. _ struct{} `type:"structure"`
  13545. // If sent in the request, the marker that is used as a starting point for this
  13546. // inventory configuration list response.
  13547. ContinuationToken *string `type:"string"`
  13548. // The list of inventory configurations for a bucket.
  13549. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  13550. // Indicates whether the returned list of inventory configurations is truncated
  13551. // in this response. A value of true indicates that the list is truncated.
  13552. IsTruncated *bool `type:"boolean"`
  13553. // The marker used to continue this inventory configuration listing. Use the
  13554. // NextContinuationToken from this response to continue the listing in a subsequent
  13555. // request. The continuation token is an opaque value that Amazon S3 understands.
  13556. NextContinuationToken *string `type:"string"`
  13557. }
  13558. // String returns the string representation
  13559. func (s ListBucketInventoryConfigurationsOutput) String() string {
  13560. return awsutil.Prettify(s)
  13561. }
  13562. // GoString returns the string representation
  13563. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  13564. return s.String()
  13565. }
  13566. // SetContinuationToken sets the ContinuationToken field's value.
  13567. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  13568. s.ContinuationToken = &v
  13569. return s
  13570. }
  13571. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  13572. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  13573. s.InventoryConfigurationList = v
  13574. return s
  13575. }
  13576. // SetIsTruncated sets the IsTruncated field's value.
  13577. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  13578. s.IsTruncated = &v
  13579. return s
  13580. }
  13581. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13582. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  13583. s.NextContinuationToken = &v
  13584. return s
  13585. }
  13586. type ListBucketMetricsConfigurationsInput struct {
  13587. _ struct{} `type:"structure"`
  13588. // The name of the bucket containing the metrics configurations to retrieve.
  13589. //
  13590. // Bucket is a required field
  13591. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13592. // The marker that is used to continue a metrics configuration listing that
  13593. // has been truncated. Use the NextContinuationToken from a previously truncated
  13594. // list response to continue the listing. The continuation token is an opaque
  13595. // value that Amazon S3 understands.
  13596. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13597. }
  13598. // String returns the string representation
  13599. func (s ListBucketMetricsConfigurationsInput) String() string {
  13600. return awsutil.Prettify(s)
  13601. }
  13602. // GoString returns the string representation
  13603. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  13604. return s.String()
  13605. }
  13606. // Validate inspects the fields of the type to determine if they are valid.
  13607. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  13608. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  13609. if s.Bucket == nil {
  13610. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13611. }
  13612. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13613. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13614. }
  13615. if invalidParams.Len() > 0 {
  13616. return invalidParams
  13617. }
  13618. return nil
  13619. }
  13620. // SetBucket sets the Bucket field's value.
  13621. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  13622. s.Bucket = &v
  13623. return s
  13624. }
  13625. func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
  13626. if s.Bucket == nil {
  13627. return v
  13628. }
  13629. return *s.Bucket
  13630. }
  13631. // SetContinuationToken sets the ContinuationToken field's value.
  13632. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  13633. s.ContinuationToken = &v
  13634. return s
  13635. }
  13636. type ListBucketMetricsConfigurationsOutput struct {
  13637. _ struct{} `type:"structure"`
  13638. // The marker that is used as a starting point for this metrics configuration
  13639. // list response. This value is present if it was sent in the request.
  13640. ContinuationToken *string `type:"string"`
  13641. // Indicates whether the returned list of metrics configurations is complete.
  13642. // A value of true indicates that the list is not complete and the NextContinuationToken
  13643. // will be provided for a subsequent request.
  13644. IsTruncated *bool `type:"boolean"`
  13645. // The list of metrics configurations for a bucket.
  13646. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  13647. // The marker used to continue a metrics configuration listing that has been
  13648. // truncated. Use the NextContinuationToken from a previously truncated list
  13649. // response to continue the listing. The continuation token is an opaque value
  13650. // that Amazon S3 understands.
  13651. NextContinuationToken *string `type:"string"`
  13652. }
  13653. // String returns the string representation
  13654. func (s ListBucketMetricsConfigurationsOutput) String() string {
  13655. return awsutil.Prettify(s)
  13656. }
  13657. // GoString returns the string representation
  13658. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  13659. return s.String()
  13660. }
  13661. // SetContinuationToken sets the ContinuationToken field's value.
  13662. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  13663. s.ContinuationToken = &v
  13664. return s
  13665. }
  13666. // SetIsTruncated sets the IsTruncated field's value.
  13667. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  13668. s.IsTruncated = &v
  13669. return s
  13670. }
  13671. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  13672. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  13673. s.MetricsConfigurationList = v
  13674. return s
  13675. }
  13676. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13677. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  13678. s.NextContinuationToken = &v
  13679. return s
  13680. }
  13681. type ListBucketsInput struct {
  13682. _ struct{} `type:"structure"`
  13683. }
  13684. // String returns the string representation
  13685. func (s ListBucketsInput) String() string {
  13686. return awsutil.Prettify(s)
  13687. }
  13688. // GoString returns the string representation
  13689. func (s ListBucketsInput) GoString() string {
  13690. return s.String()
  13691. }
  13692. type ListBucketsOutput struct {
  13693. _ struct{} `type:"structure"`
  13694. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  13695. Owner *Owner `type:"structure"`
  13696. }
  13697. // String returns the string representation
  13698. func (s ListBucketsOutput) String() string {
  13699. return awsutil.Prettify(s)
  13700. }
  13701. // GoString returns the string representation
  13702. func (s ListBucketsOutput) GoString() string {
  13703. return s.String()
  13704. }
  13705. // SetBuckets sets the Buckets field's value.
  13706. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  13707. s.Buckets = v
  13708. return s
  13709. }
  13710. // SetOwner sets the Owner field's value.
  13711. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  13712. s.Owner = v
  13713. return s
  13714. }
  13715. type ListMultipartUploadsInput struct {
  13716. _ struct{} `type:"structure"`
  13717. // Bucket is a required field
  13718. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13719. // Character you use to group keys.
  13720. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  13721. // Requests Amazon S3 to encode the object keys in the response and specifies
  13722. // the encoding method to use. An object key may contain any Unicode character;
  13723. // however, XML 1.0 parser cannot parse some characters, such as characters
  13724. // with an ASCII value from 0 to 10. For characters that are not supported in
  13725. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  13726. // keys in the response.
  13727. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  13728. // Together with upload-id-marker, this parameter specifies the multipart upload
  13729. // after which listing should begin.
  13730. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  13731. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  13732. // in the response body. 1,000 is the maximum number of uploads that can be
  13733. // returned in a response.
  13734. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  13735. // Lists in-progress uploads only for those keys that begin with the specified
  13736. // prefix.
  13737. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  13738. // Together with key-marker, specifies the multipart upload after which listing
  13739. // should begin. If key-marker is not specified, the upload-id-marker parameter
  13740. // is ignored.
  13741. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  13742. }
  13743. // String returns the string representation
  13744. func (s ListMultipartUploadsInput) String() string {
  13745. return awsutil.Prettify(s)
  13746. }
  13747. // GoString returns the string representation
  13748. func (s ListMultipartUploadsInput) GoString() string {
  13749. return s.String()
  13750. }
  13751. // Validate inspects the fields of the type to determine if they are valid.
  13752. func (s *ListMultipartUploadsInput) Validate() error {
  13753. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  13754. if s.Bucket == nil {
  13755. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13756. }
  13757. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13758. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13759. }
  13760. if invalidParams.Len() > 0 {
  13761. return invalidParams
  13762. }
  13763. return nil
  13764. }
  13765. // SetBucket sets the Bucket field's value.
  13766. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  13767. s.Bucket = &v
  13768. return s
  13769. }
  13770. func (s *ListMultipartUploadsInput) getBucket() (v string) {
  13771. if s.Bucket == nil {
  13772. return v
  13773. }
  13774. return *s.Bucket
  13775. }
  13776. // SetDelimiter sets the Delimiter field's value.
  13777. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  13778. s.Delimiter = &v
  13779. return s
  13780. }
  13781. // SetEncodingType sets the EncodingType field's value.
  13782. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  13783. s.EncodingType = &v
  13784. return s
  13785. }
  13786. // SetKeyMarker sets the KeyMarker field's value.
  13787. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  13788. s.KeyMarker = &v
  13789. return s
  13790. }
  13791. // SetMaxUploads sets the MaxUploads field's value.
  13792. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  13793. s.MaxUploads = &v
  13794. return s
  13795. }
  13796. // SetPrefix sets the Prefix field's value.
  13797. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  13798. s.Prefix = &v
  13799. return s
  13800. }
  13801. // SetUploadIdMarker sets the UploadIdMarker field's value.
  13802. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  13803. s.UploadIdMarker = &v
  13804. return s
  13805. }
  13806. type ListMultipartUploadsOutput struct {
  13807. _ struct{} `type:"structure"`
  13808. // Name of the bucket to which the multipart upload was initiated.
  13809. Bucket *string `type:"string"`
  13810. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  13811. Delimiter *string `type:"string"`
  13812. // Encoding type used by Amazon S3 to encode object keys in the response.
  13813. EncodingType *string `type:"string" enum:"EncodingType"`
  13814. // Indicates whether the returned list of multipart uploads is truncated. A
  13815. // value of true indicates that the list was truncated. The list can be truncated
  13816. // if the number of multipart uploads exceeds the limit allowed or specified
  13817. // by max uploads.
  13818. IsTruncated *bool `type:"boolean"`
  13819. // The key at or after which the listing began.
  13820. KeyMarker *string `type:"string"`
  13821. // Maximum number of multipart uploads that could have been included in the
  13822. // response.
  13823. MaxUploads *int64 `type:"integer"`
  13824. // When a list is truncated, this element specifies the value that should be
  13825. // used for the key-marker request parameter in a subsequent request.
  13826. NextKeyMarker *string `type:"string"`
  13827. // When a list is truncated, this element specifies the value that should be
  13828. // used for the upload-id-marker request parameter in a subsequent request.
  13829. NextUploadIdMarker *string `type:"string"`
  13830. // When a prefix is provided in the request, this field contains the specified
  13831. // prefix. The result contains only keys starting with the specified prefix.
  13832. Prefix *string `type:"string"`
  13833. // Upload ID after which listing began.
  13834. UploadIdMarker *string `type:"string"`
  13835. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  13836. }
  13837. // String returns the string representation
  13838. func (s ListMultipartUploadsOutput) String() string {
  13839. return awsutil.Prettify(s)
  13840. }
  13841. // GoString returns the string representation
  13842. func (s ListMultipartUploadsOutput) GoString() string {
  13843. return s.String()
  13844. }
  13845. // SetBucket sets the Bucket field's value.
  13846. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  13847. s.Bucket = &v
  13848. return s
  13849. }
  13850. func (s *ListMultipartUploadsOutput) getBucket() (v string) {
  13851. if s.Bucket == nil {
  13852. return v
  13853. }
  13854. return *s.Bucket
  13855. }
  13856. // SetCommonPrefixes sets the CommonPrefixes field's value.
  13857. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  13858. s.CommonPrefixes = v
  13859. return s
  13860. }
  13861. // SetDelimiter sets the Delimiter field's value.
  13862. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  13863. s.Delimiter = &v
  13864. return s
  13865. }
  13866. // SetEncodingType sets the EncodingType field's value.
  13867. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  13868. s.EncodingType = &v
  13869. return s
  13870. }
  13871. // SetIsTruncated sets the IsTruncated field's value.
  13872. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  13873. s.IsTruncated = &v
  13874. return s
  13875. }
  13876. // SetKeyMarker sets the KeyMarker field's value.
  13877. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  13878. s.KeyMarker = &v
  13879. return s
  13880. }
  13881. // SetMaxUploads sets the MaxUploads field's value.
  13882. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  13883. s.MaxUploads = &v
  13884. return s
  13885. }
  13886. // SetNextKeyMarker sets the NextKeyMarker field's value.
  13887. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  13888. s.NextKeyMarker = &v
  13889. return s
  13890. }
  13891. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  13892. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  13893. s.NextUploadIdMarker = &v
  13894. return s
  13895. }
  13896. // SetPrefix sets the Prefix field's value.
  13897. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  13898. s.Prefix = &v
  13899. return s
  13900. }
  13901. // SetUploadIdMarker sets the UploadIdMarker field's value.
  13902. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  13903. s.UploadIdMarker = &v
  13904. return s
  13905. }
  13906. // SetUploads sets the Uploads field's value.
  13907. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  13908. s.Uploads = v
  13909. return s
  13910. }
  13911. type ListObjectVersionsInput struct {
  13912. _ struct{} `type:"structure"`
  13913. // Bucket is a required field
  13914. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13915. // A delimiter is a character you use to group keys.
  13916. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  13917. // Requests Amazon S3 to encode the object keys in the response and specifies
  13918. // the encoding method to use. An object key may contain any Unicode character;
  13919. // however, XML 1.0 parser cannot parse some characters, such as characters
  13920. // with an ASCII value from 0 to 10. For characters that are not supported in
  13921. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  13922. // keys in the response.
  13923. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  13924. // Specifies the key to start with when listing objects in a bucket.
  13925. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  13926. // Sets the maximum number of keys returned in the response. The response might
  13927. // contain fewer keys but will never contain more.
  13928. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  13929. // Limits the response to keys that begin with the specified prefix.
  13930. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  13931. // Specifies the object version you want to start listing from.
  13932. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  13933. }
  13934. // String returns the string representation
  13935. func (s ListObjectVersionsInput) String() string {
  13936. return awsutil.Prettify(s)
  13937. }
  13938. // GoString returns the string representation
  13939. func (s ListObjectVersionsInput) GoString() string {
  13940. return s.String()
  13941. }
  13942. // Validate inspects the fields of the type to determine if they are valid.
  13943. func (s *ListObjectVersionsInput) Validate() error {
  13944. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  13945. if s.Bucket == nil {
  13946. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13947. }
  13948. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13949. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13950. }
  13951. if invalidParams.Len() > 0 {
  13952. return invalidParams
  13953. }
  13954. return nil
  13955. }
  13956. // SetBucket sets the Bucket field's value.
  13957. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  13958. s.Bucket = &v
  13959. return s
  13960. }
  13961. func (s *ListObjectVersionsInput) getBucket() (v string) {
  13962. if s.Bucket == nil {
  13963. return v
  13964. }
  13965. return *s.Bucket
  13966. }
  13967. // SetDelimiter sets the Delimiter field's value.
  13968. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  13969. s.Delimiter = &v
  13970. return s
  13971. }
  13972. // SetEncodingType sets the EncodingType field's value.
  13973. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  13974. s.EncodingType = &v
  13975. return s
  13976. }
  13977. // SetKeyMarker sets the KeyMarker field's value.
  13978. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  13979. s.KeyMarker = &v
  13980. return s
  13981. }
  13982. // SetMaxKeys sets the MaxKeys field's value.
  13983. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  13984. s.MaxKeys = &v
  13985. return s
  13986. }
  13987. // SetPrefix sets the Prefix field's value.
  13988. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  13989. s.Prefix = &v
  13990. return s
  13991. }
  13992. // SetVersionIdMarker sets the VersionIdMarker field's value.
  13993. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  13994. s.VersionIdMarker = &v
  13995. return s
  13996. }
  13997. type ListObjectVersionsOutput struct {
  13998. _ struct{} `type:"structure"`
  13999. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14000. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  14001. Delimiter *string `type:"string"`
  14002. // Encoding type used by Amazon S3 to encode object keys in the response.
  14003. EncodingType *string `type:"string" enum:"EncodingType"`
  14004. // A flag that indicates whether or not Amazon S3 returned all of the results
  14005. // that satisfied the search criteria. If your results were truncated, you can
  14006. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  14007. // response parameters as a starting place in another request to return the
  14008. // rest of the results.
  14009. IsTruncated *bool `type:"boolean"`
  14010. // Marks the last Key returned in a truncated response.
  14011. KeyMarker *string `type:"string"`
  14012. MaxKeys *int64 `type:"integer"`
  14013. Name *string `type:"string"`
  14014. // Use this value for the key marker request parameter in a subsequent request.
  14015. NextKeyMarker *string `type:"string"`
  14016. // Use this value for the next version id marker parameter in a subsequent request.
  14017. NextVersionIdMarker *string `type:"string"`
  14018. Prefix *string `type:"string"`
  14019. VersionIdMarker *string `type:"string"`
  14020. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  14021. }
  14022. // String returns the string representation
  14023. func (s ListObjectVersionsOutput) String() string {
  14024. return awsutil.Prettify(s)
  14025. }
  14026. // GoString returns the string representation
  14027. func (s ListObjectVersionsOutput) GoString() string {
  14028. return s.String()
  14029. }
  14030. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14031. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  14032. s.CommonPrefixes = v
  14033. return s
  14034. }
  14035. // SetDeleteMarkers sets the DeleteMarkers field's value.
  14036. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  14037. s.DeleteMarkers = v
  14038. return s
  14039. }
  14040. // SetDelimiter sets the Delimiter field's value.
  14041. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  14042. s.Delimiter = &v
  14043. return s
  14044. }
  14045. // SetEncodingType sets the EncodingType field's value.
  14046. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  14047. s.EncodingType = &v
  14048. return s
  14049. }
  14050. // SetIsTruncated sets the IsTruncated field's value.
  14051. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  14052. s.IsTruncated = &v
  14053. return s
  14054. }
  14055. // SetKeyMarker sets the KeyMarker field's value.
  14056. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  14057. s.KeyMarker = &v
  14058. return s
  14059. }
  14060. // SetMaxKeys sets the MaxKeys field's value.
  14061. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  14062. s.MaxKeys = &v
  14063. return s
  14064. }
  14065. // SetName sets the Name field's value.
  14066. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  14067. s.Name = &v
  14068. return s
  14069. }
  14070. // SetNextKeyMarker sets the NextKeyMarker field's value.
  14071. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  14072. s.NextKeyMarker = &v
  14073. return s
  14074. }
  14075. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  14076. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  14077. s.NextVersionIdMarker = &v
  14078. return s
  14079. }
  14080. // SetPrefix sets the Prefix field's value.
  14081. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  14082. s.Prefix = &v
  14083. return s
  14084. }
  14085. // SetVersionIdMarker sets the VersionIdMarker field's value.
  14086. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  14087. s.VersionIdMarker = &v
  14088. return s
  14089. }
  14090. // SetVersions sets the Versions field's value.
  14091. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  14092. s.Versions = v
  14093. return s
  14094. }
  14095. type ListObjectsInput struct {
  14096. _ struct{} `type:"structure"`
  14097. // Bucket is a required field
  14098. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14099. // A delimiter is a character you use to group keys.
  14100. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  14101. // Requests Amazon S3 to encode the object keys in the response and specifies
  14102. // the encoding method to use. An object key may contain any Unicode character;
  14103. // however, XML 1.0 parser cannot parse some characters, such as characters
  14104. // with an ASCII value from 0 to 10. For characters that are not supported in
  14105. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  14106. // keys in the response.
  14107. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  14108. // Specifies the key to start with when listing objects in a bucket.
  14109. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  14110. // Sets the maximum number of keys returned in the response. The response might
  14111. // contain fewer keys but will never contain more.
  14112. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  14113. // Limits the response to keys that begin with the specified prefix.
  14114. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  14115. // Confirms that the requester knows that she or he will be charged for the
  14116. // list objects request. Bucket owners need not specify this parameter in their
  14117. // requests.
  14118. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14119. }
  14120. // String returns the string representation
  14121. func (s ListObjectsInput) String() string {
  14122. return awsutil.Prettify(s)
  14123. }
  14124. // GoString returns the string representation
  14125. func (s ListObjectsInput) GoString() string {
  14126. return s.String()
  14127. }
  14128. // Validate inspects the fields of the type to determine if they are valid.
  14129. func (s *ListObjectsInput) Validate() error {
  14130. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  14131. if s.Bucket == nil {
  14132. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14133. }
  14134. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14135. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14136. }
  14137. if invalidParams.Len() > 0 {
  14138. return invalidParams
  14139. }
  14140. return nil
  14141. }
  14142. // SetBucket sets the Bucket field's value.
  14143. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  14144. s.Bucket = &v
  14145. return s
  14146. }
  14147. func (s *ListObjectsInput) getBucket() (v string) {
  14148. if s.Bucket == nil {
  14149. return v
  14150. }
  14151. return *s.Bucket
  14152. }
  14153. // SetDelimiter sets the Delimiter field's value.
  14154. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  14155. s.Delimiter = &v
  14156. return s
  14157. }
  14158. // SetEncodingType sets the EncodingType field's value.
  14159. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  14160. s.EncodingType = &v
  14161. return s
  14162. }
  14163. // SetMarker sets the Marker field's value.
  14164. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  14165. s.Marker = &v
  14166. return s
  14167. }
  14168. // SetMaxKeys sets the MaxKeys field's value.
  14169. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  14170. s.MaxKeys = &v
  14171. return s
  14172. }
  14173. // SetPrefix sets the Prefix field's value.
  14174. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  14175. s.Prefix = &v
  14176. return s
  14177. }
  14178. // SetRequestPayer sets the RequestPayer field's value.
  14179. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  14180. s.RequestPayer = &v
  14181. return s
  14182. }
  14183. type ListObjectsOutput struct {
  14184. _ struct{} `type:"structure"`
  14185. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14186. Contents []*Object `type:"list" flattened:"true"`
  14187. Delimiter *string `type:"string"`
  14188. // Encoding type used by Amazon S3 to encode object keys in the response.
  14189. EncodingType *string `type:"string" enum:"EncodingType"`
  14190. // A flag that indicates whether or not Amazon S3 returned all of the results
  14191. // that satisfied the search criteria.
  14192. IsTruncated *bool `type:"boolean"`
  14193. Marker *string `type:"string"`
  14194. MaxKeys *int64 `type:"integer"`
  14195. Name *string `type:"string"`
  14196. // When response is truncated (the IsTruncated element value in the response
  14197. // is true), you can use the key name in this field as marker in the subsequent
  14198. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  14199. // order Note: This element is returned only if you have delimiter request parameter
  14200. // specified. If response does not include the NextMaker and it is truncated,
  14201. // you can use the value of the last Key in the response as the marker in the
  14202. // subsequent request to get the next set of object keys.
  14203. NextMarker *string `type:"string"`
  14204. Prefix *string `type:"string"`
  14205. }
  14206. // String returns the string representation
  14207. func (s ListObjectsOutput) String() string {
  14208. return awsutil.Prettify(s)
  14209. }
  14210. // GoString returns the string representation
  14211. func (s ListObjectsOutput) GoString() string {
  14212. return s.String()
  14213. }
  14214. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14215. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  14216. s.CommonPrefixes = v
  14217. return s
  14218. }
  14219. // SetContents sets the Contents field's value.
  14220. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  14221. s.Contents = v
  14222. return s
  14223. }
  14224. // SetDelimiter sets the Delimiter field's value.
  14225. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  14226. s.Delimiter = &v
  14227. return s
  14228. }
  14229. // SetEncodingType sets the EncodingType field's value.
  14230. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  14231. s.EncodingType = &v
  14232. return s
  14233. }
  14234. // SetIsTruncated sets the IsTruncated field's value.
  14235. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  14236. s.IsTruncated = &v
  14237. return s
  14238. }
  14239. // SetMarker sets the Marker field's value.
  14240. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  14241. s.Marker = &v
  14242. return s
  14243. }
  14244. // SetMaxKeys sets the MaxKeys field's value.
  14245. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  14246. s.MaxKeys = &v
  14247. return s
  14248. }
  14249. // SetName sets the Name field's value.
  14250. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  14251. s.Name = &v
  14252. return s
  14253. }
  14254. // SetNextMarker sets the NextMarker field's value.
  14255. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  14256. s.NextMarker = &v
  14257. return s
  14258. }
  14259. // SetPrefix sets the Prefix field's value.
  14260. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  14261. s.Prefix = &v
  14262. return s
  14263. }
  14264. type ListObjectsV2Input struct {
  14265. _ struct{} `type:"structure"`
  14266. // Name of the bucket to list.
  14267. //
  14268. // Bucket is a required field
  14269. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14270. // ContinuationToken indicates Amazon S3 that the list is being continued on
  14271. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  14272. // key
  14273. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  14274. // A delimiter is a character you use to group keys.
  14275. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  14276. // Encoding type used by Amazon S3 to encode object keys in the response.
  14277. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  14278. // The owner field is not present in listV2 by default, if you want to return
  14279. // owner field with each key in the result then set the fetch owner field to
  14280. // true
  14281. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  14282. // Sets the maximum number of keys returned in the response. The response might
  14283. // contain fewer keys but will never contain more.
  14284. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  14285. // Limits the response to keys that begin with the specified prefix.
  14286. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  14287. // Confirms that the requester knows that she or he will be charged for the
  14288. // list objects request in V2 style. Bucket owners need not specify this parameter
  14289. // in their requests.
  14290. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14291. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  14292. // listing after this specified key. StartAfter can be any key in the bucket
  14293. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  14294. }
  14295. // String returns the string representation
  14296. func (s ListObjectsV2Input) String() string {
  14297. return awsutil.Prettify(s)
  14298. }
  14299. // GoString returns the string representation
  14300. func (s ListObjectsV2Input) GoString() string {
  14301. return s.String()
  14302. }
  14303. // Validate inspects the fields of the type to determine if they are valid.
  14304. func (s *ListObjectsV2Input) Validate() error {
  14305. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  14306. if s.Bucket == nil {
  14307. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14308. }
  14309. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14310. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14311. }
  14312. if invalidParams.Len() > 0 {
  14313. return invalidParams
  14314. }
  14315. return nil
  14316. }
  14317. // SetBucket sets the Bucket field's value.
  14318. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  14319. s.Bucket = &v
  14320. return s
  14321. }
  14322. func (s *ListObjectsV2Input) getBucket() (v string) {
  14323. if s.Bucket == nil {
  14324. return v
  14325. }
  14326. return *s.Bucket
  14327. }
  14328. // SetContinuationToken sets the ContinuationToken field's value.
  14329. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  14330. s.ContinuationToken = &v
  14331. return s
  14332. }
  14333. // SetDelimiter sets the Delimiter field's value.
  14334. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  14335. s.Delimiter = &v
  14336. return s
  14337. }
  14338. // SetEncodingType sets the EncodingType field's value.
  14339. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  14340. s.EncodingType = &v
  14341. return s
  14342. }
  14343. // SetFetchOwner sets the FetchOwner field's value.
  14344. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  14345. s.FetchOwner = &v
  14346. return s
  14347. }
  14348. // SetMaxKeys sets the MaxKeys field's value.
  14349. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  14350. s.MaxKeys = &v
  14351. return s
  14352. }
  14353. // SetPrefix sets the Prefix field's value.
  14354. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  14355. s.Prefix = &v
  14356. return s
  14357. }
  14358. // SetRequestPayer sets the RequestPayer field's value.
  14359. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  14360. s.RequestPayer = &v
  14361. return s
  14362. }
  14363. // SetStartAfter sets the StartAfter field's value.
  14364. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  14365. s.StartAfter = &v
  14366. return s
  14367. }
  14368. type ListObjectsV2Output struct {
  14369. _ struct{} `type:"structure"`
  14370. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  14371. // next occurrence of the string specified by delimiter
  14372. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14373. // Metadata about each object returned.
  14374. Contents []*Object `type:"list" flattened:"true"`
  14375. // ContinuationToken indicates Amazon S3 that the list is being continued on
  14376. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  14377. // key
  14378. ContinuationToken *string `type:"string"`
  14379. // A delimiter is a character you use to group keys.
  14380. Delimiter *string `type:"string"`
  14381. // Encoding type used by Amazon S3 to encode object keys in the response.
  14382. EncodingType *string `type:"string" enum:"EncodingType"`
  14383. // A flag that indicates whether or not Amazon S3 returned all of the results
  14384. // that satisfied the search criteria.
  14385. IsTruncated *bool `type:"boolean"`
  14386. // KeyCount is the number of keys returned with this request. KeyCount will
  14387. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  14388. // result will include less than equals 50 keys
  14389. KeyCount *int64 `type:"integer"`
  14390. // Sets the maximum number of keys returned in the response. The response might
  14391. // contain fewer keys but will never contain more.
  14392. MaxKeys *int64 `type:"integer"`
  14393. // Name of the bucket to list.
  14394. Name *string `type:"string"`
  14395. // NextContinuationToken is sent when isTruncated is true which means there
  14396. // are more keys in the bucket that can be listed. The next list requests to
  14397. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  14398. // is obfuscated and is not a real key
  14399. NextContinuationToken *string `type:"string"`
  14400. // Limits the response to keys that begin with the specified prefix.
  14401. Prefix *string `type:"string"`
  14402. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  14403. // listing after this specified key. StartAfter can be any key in the bucket
  14404. StartAfter *string `type:"string"`
  14405. }
  14406. // String returns the string representation
  14407. func (s ListObjectsV2Output) String() string {
  14408. return awsutil.Prettify(s)
  14409. }
  14410. // GoString returns the string representation
  14411. func (s ListObjectsV2Output) GoString() string {
  14412. return s.String()
  14413. }
  14414. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14415. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  14416. s.CommonPrefixes = v
  14417. return s
  14418. }
  14419. // SetContents sets the Contents field's value.
  14420. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  14421. s.Contents = v
  14422. return s
  14423. }
  14424. // SetContinuationToken sets the ContinuationToken field's value.
  14425. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  14426. s.ContinuationToken = &v
  14427. return s
  14428. }
  14429. // SetDelimiter sets the Delimiter field's value.
  14430. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  14431. s.Delimiter = &v
  14432. return s
  14433. }
  14434. // SetEncodingType sets the EncodingType field's value.
  14435. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  14436. s.EncodingType = &v
  14437. return s
  14438. }
  14439. // SetIsTruncated sets the IsTruncated field's value.
  14440. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  14441. s.IsTruncated = &v
  14442. return s
  14443. }
  14444. // SetKeyCount sets the KeyCount field's value.
  14445. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  14446. s.KeyCount = &v
  14447. return s
  14448. }
  14449. // SetMaxKeys sets the MaxKeys field's value.
  14450. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  14451. s.MaxKeys = &v
  14452. return s
  14453. }
  14454. // SetName sets the Name field's value.
  14455. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  14456. s.Name = &v
  14457. return s
  14458. }
  14459. // SetNextContinuationToken sets the NextContinuationToken field's value.
  14460. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  14461. s.NextContinuationToken = &v
  14462. return s
  14463. }
  14464. // SetPrefix sets the Prefix field's value.
  14465. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  14466. s.Prefix = &v
  14467. return s
  14468. }
  14469. // SetStartAfter sets the StartAfter field's value.
  14470. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  14471. s.StartAfter = &v
  14472. return s
  14473. }
  14474. type ListPartsInput struct {
  14475. _ struct{} `type:"structure"`
  14476. // Bucket is a required field
  14477. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14478. // Key is a required field
  14479. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14480. // Sets the maximum number of parts to return.
  14481. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  14482. // Specifies the part after which listing should begin. Only parts with higher
  14483. // part numbers will be listed.
  14484. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  14485. // Confirms that the requester knows that she or he will be charged for the
  14486. // request. Bucket owners need not specify this parameter in their requests.
  14487. // Documentation on downloading objects from requester pays buckets can be found
  14488. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  14489. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14490. // Upload ID identifying the multipart upload whose parts are being listed.
  14491. //
  14492. // UploadId is a required field
  14493. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  14494. }
  14495. // String returns the string representation
  14496. func (s ListPartsInput) String() string {
  14497. return awsutil.Prettify(s)
  14498. }
  14499. // GoString returns the string representation
  14500. func (s ListPartsInput) GoString() string {
  14501. return s.String()
  14502. }
  14503. // Validate inspects the fields of the type to determine if they are valid.
  14504. func (s *ListPartsInput) Validate() error {
  14505. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  14506. if s.Bucket == nil {
  14507. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14508. }
  14509. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14510. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14511. }
  14512. if s.Key == nil {
  14513. invalidParams.Add(request.NewErrParamRequired("Key"))
  14514. }
  14515. if s.Key != nil && len(*s.Key) < 1 {
  14516. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14517. }
  14518. if s.UploadId == nil {
  14519. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  14520. }
  14521. if invalidParams.Len() > 0 {
  14522. return invalidParams
  14523. }
  14524. return nil
  14525. }
  14526. // SetBucket sets the Bucket field's value.
  14527. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  14528. s.Bucket = &v
  14529. return s
  14530. }
  14531. func (s *ListPartsInput) getBucket() (v string) {
  14532. if s.Bucket == nil {
  14533. return v
  14534. }
  14535. return *s.Bucket
  14536. }
  14537. // SetKey sets the Key field's value.
  14538. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  14539. s.Key = &v
  14540. return s
  14541. }
  14542. // SetMaxParts sets the MaxParts field's value.
  14543. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  14544. s.MaxParts = &v
  14545. return s
  14546. }
  14547. // SetPartNumberMarker sets the PartNumberMarker field's value.
  14548. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  14549. s.PartNumberMarker = &v
  14550. return s
  14551. }
  14552. // SetRequestPayer sets the RequestPayer field's value.
  14553. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  14554. s.RequestPayer = &v
  14555. return s
  14556. }
  14557. // SetUploadId sets the UploadId field's value.
  14558. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  14559. s.UploadId = &v
  14560. return s
  14561. }
  14562. type ListPartsOutput struct {
  14563. _ struct{} `type:"structure"`
  14564. // Date when multipart upload will become eligible for abort operation by lifecycle.
  14565. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  14566. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  14567. // operation.
  14568. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  14569. // Name of the bucket to which the multipart upload was initiated.
  14570. Bucket *string `type:"string"`
  14571. // Identifies who initiated the multipart upload.
  14572. Initiator *Initiator `type:"structure"`
  14573. // Indicates whether the returned list of parts is truncated.
  14574. IsTruncated *bool `type:"boolean"`
  14575. // Object key for which the multipart upload was initiated.
  14576. Key *string `min:"1" type:"string"`
  14577. // Maximum number of parts that were allowed in the response.
  14578. MaxParts *int64 `type:"integer"`
  14579. // When a list is truncated, this element specifies the last part in the list,
  14580. // as well as the value to use for the part-number-marker request parameter
  14581. // in a subsequent request.
  14582. NextPartNumberMarker *int64 `type:"integer"`
  14583. Owner *Owner `type:"structure"`
  14584. // Part number after which listing begins.
  14585. PartNumberMarker *int64 `type:"integer"`
  14586. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  14587. // If present, indicates that the requester was successfully charged for the
  14588. // request.
  14589. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  14590. // The class of storage used to store the object.
  14591. StorageClass *string `type:"string" enum:"StorageClass"`
  14592. // Upload ID identifying the multipart upload whose parts are being listed.
  14593. UploadId *string `type:"string"`
  14594. }
  14595. // String returns the string representation
  14596. func (s ListPartsOutput) String() string {
  14597. return awsutil.Prettify(s)
  14598. }
  14599. // GoString returns the string representation
  14600. func (s ListPartsOutput) GoString() string {
  14601. return s.String()
  14602. }
  14603. // SetAbortDate sets the AbortDate field's value.
  14604. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  14605. s.AbortDate = &v
  14606. return s
  14607. }
  14608. // SetAbortRuleId sets the AbortRuleId field's value.
  14609. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  14610. s.AbortRuleId = &v
  14611. return s
  14612. }
  14613. // SetBucket sets the Bucket field's value.
  14614. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  14615. s.Bucket = &v
  14616. return s
  14617. }
  14618. func (s *ListPartsOutput) getBucket() (v string) {
  14619. if s.Bucket == nil {
  14620. return v
  14621. }
  14622. return *s.Bucket
  14623. }
  14624. // SetInitiator sets the Initiator field's value.
  14625. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  14626. s.Initiator = v
  14627. return s
  14628. }
  14629. // SetIsTruncated sets the IsTruncated field's value.
  14630. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  14631. s.IsTruncated = &v
  14632. return s
  14633. }
  14634. // SetKey sets the Key field's value.
  14635. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  14636. s.Key = &v
  14637. return s
  14638. }
  14639. // SetMaxParts sets the MaxParts field's value.
  14640. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  14641. s.MaxParts = &v
  14642. return s
  14643. }
  14644. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  14645. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  14646. s.NextPartNumberMarker = &v
  14647. return s
  14648. }
  14649. // SetOwner sets the Owner field's value.
  14650. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  14651. s.Owner = v
  14652. return s
  14653. }
  14654. // SetPartNumberMarker sets the PartNumberMarker field's value.
  14655. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  14656. s.PartNumberMarker = &v
  14657. return s
  14658. }
  14659. // SetParts sets the Parts field's value.
  14660. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  14661. s.Parts = v
  14662. return s
  14663. }
  14664. // SetRequestCharged sets the RequestCharged field's value.
  14665. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  14666. s.RequestCharged = &v
  14667. return s
  14668. }
  14669. // SetStorageClass sets the StorageClass field's value.
  14670. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  14671. s.StorageClass = &v
  14672. return s
  14673. }
  14674. // SetUploadId sets the UploadId field's value.
  14675. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  14676. s.UploadId = &v
  14677. return s
  14678. }
  14679. // Describes an S3 location that will receive the results of the restore request.
  14680. type Location struct {
  14681. _ struct{} `type:"structure"`
  14682. // A list of grants that control access to the staged results.
  14683. AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
  14684. // The name of the bucket where the restore results will be placed.
  14685. //
  14686. // BucketName is a required field
  14687. BucketName *string `type:"string" required:"true"`
  14688. // The canned ACL to apply to the restore results.
  14689. CannedACL *string `type:"string" enum:"ObjectCannedACL"`
  14690. // Describes the server-side encryption that will be applied to the restore
  14691. // results.
  14692. Encryption *Encryption `type:"structure"`
  14693. // The prefix that is prepended to the restore results for this request.
  14694. //
  14695. // Prefix is a required field
  14696. Prefix *string `type:"string" required:"true"`
  14697. // The class of storage used to store the restore results.
  14698. StorageClass *string `type:"string" enum:"StorageClass"`
  14699. // The tag-set that is applied to the restore results.
  14700. Tagging *Tagging `type:"structure"`
  14701. // A list of metadata to store with the restore results in S3.
  14702. UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
  14703. }
  14704. // String returns the string representation
  14705. func (s Location) String() string {
  14706. return awsutil.Prettify(s)
  14707. }
  14708. // GoString returns the string representation
  14709. func (s Location) GoString() string {
  14710. return s.String()
  14711. }
  14712. // Validate inspects the fields of the type to determine if they are valid.
  14713. func (s *Location) Validate() error {
  14714. invalidParams := request.ErrInvalidParams{Context: "Location"}
  14715. if s.BucketName == nil {
  14716. invalidParams.Add(request.NewErrParamRequired("BucketName"))
  14717. }
  14718. if s.Prefix == nil {
  14719. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  14720. }
  14721. if s.AccessControlList != nil {
  14722. for i, v := range s.AccessControlList {
  14723. if v == nil {
  14724. continue
  14725. }
  14726. if err := v.Validate(); err != nil {
  14727. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
  14728. }
  14729. }
  14730. }
  14731. if s.Encryption != nil {
  14732. if err := s.Encryption.Validate(); err != nil {
  14733. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  14734. }
  14735. }
  14736. if s.Tagging != nil {
  14737. if err := s.Tagging.Validate(); err != nil {
  14738. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  14739. }
  14740. }
  14741. if invalidParams.Len() > 0 {
  14742. return invalidParams
  14743. }
  14744. return nil
  14745. }
  14746. // SetAccessControlList sets the AccessControlList field's value.
  14747. func (s *Location) SetAccessControlList(v []*Grant) *Location {
  14748. s.AccessControlList = v
  14749. return s
  14750. }
  14751. // SetBucketName sets the BucketName field's value.
  14752. func (s *Location) SetBucketName(v string) *Location {
  14753. s.BucketName = &v
  14754. return s
  14755. }
  14756. // SetCannedACL sets the CannedACL field's value.
  14757. func (s *Location) SetCannedACL(v string) *Location {
  14758. s.CannedACL = &v
  14759. return s
  14760. }
  14761. // SetEncryption sets the Encryption field's value.
  14762. func (s *Location) SetEncryption(v *Encryption) *Location {
  14763. s.Encryption = v
  14764. return s
  14765. }
  14766. // SetPrefix sets the Prefix field's value.
  14767. func (s *Location) SetPrefix(v string) *Location {
  14768. s.Prefix = &v
  14769. return s
  14770. }
  14771. // SetStorageClass sets the StorageClass field's value.
  14772. func (s *Location) SetStorageClass(v string) *Location {
  14773. s.StorageClass = &v
  14774. return s
  14775. }
  14776. // SetTagging sets the Tagging field's value.
  14777. func (s *Location) SetTagging(v *Tagging) *Location {
  14778. s.Tagging = v
  14779. return s
  14780. }
  14781. // SetUserMetadata sets the UserMetadata field's value.
  14782. func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
  14783. s.UserMetadata = v
  14784. return s
  14785. }
  14786. // Container for logging information. Presence of this element indicates that
  14787. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  14788. // in this case.
  14789. type LoggingEnabled struct {
  14790. _ struct{} `type:"structure"`
  14791. // Specifies the bucket where you want Amazon S3 to store server access logs.
  14792. // You can have your logs delivered to any bucket that you own, including the
  14793. // same bucket that is being logged. You can also configure multiple buckets
  14794. // to deliver their logs to the same target bucket. In this case you should
  14795. // choose a different TargetPrefix for each source bucket so that the delivered
  14796. // log files can be distinguished by key.
  14797. //
  14798. // TargetBucket is a required field
  14799. TargetBucket *string `type:"string" required:"true"`
  14800. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  14801. // This element lets you specify a prefix for the keys that the log files will
  14802. // be stored under.
  14803. //
  14804. // TargetPrefix is a required field
  14805. TargetPrefix *string `type:"string" required:"true"`
  14806. }
  14807. // String returns the string representation
  14808. func (s LoggingEnabled) String() string {
  14809. return awsutil.Prettify(s)
  14810. }
  14811. // GoString returns the string representation
  14812. func (s LoggingEnabled) GoString() string {
  14813. return s.String()
  14814. }
  14815. // Validate inspects the fields of the type to determine if they are valid.
  14816. func (s *LoggingEnabled) Validate() error {
  14817. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  14818. if s.TargetBucket == nil {
  14819. invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
  14820. }
  14821. if s.TargetPrefix == nil {
  14822. invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
  14823. }
  14824. if s.TargetGrants != nil {
  14825. for i, v := range s.TargetGrants {
  14826. if v == nil {
  14827. continue
  14828. }
  14829. if err := v.Validate(); err != nil {
  14830. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  14831. }
  14832. }
  14833. }
  14834. if invalidParams.Len() > 0 {
  14835. return invalidParams
  14836. }
  14837. return nil
  14838. }
  14839. // SetTargetBucket sets the TargetBucket field's value.
  14840. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  14841. s.TargetBucket = &v
  14842. return s
  14843. }
  14844. // SetTargetGrants sets the TargetGrants field's value.
  14845. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  14846. s.TargetGrants = v
  14847. return s
  14848. }
  14849. // SetTargetPrefix sets the TargetPrefix field's value.
  14850. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  14851. s.TargetPrefix = &v
  14852. return s
  14853. }
  14854. // A metadata key-value pair to store with an object.
  14855. type MetadataEntry struct {
  14856. _ struct{} `type:"structure"`
  14857. Name *string `type:"string"`
  14858. Value *string `type:"string"`
  14859. }
  14860. // String returns the string representation
  14861. func (s MetadataEntry) String() string {
  14862. return awsutil.Prettify(s)
  14863. }
  14864. // GoString returns the string representation
  14865. func (s MetadataEntry) GoString() string {
  14866. return s.String()
  14867. }
  14868. // SetName sets the Name field's value.
  14869. func (s *MetadataEntry) SetName(v string) *MetadataEntry {
  14870. s.Name = &v
  14871. return s
  14872. }
  14873. // SetValue sets the Value field's value.
  14874. func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
  14875. s.Value = &v
  14876. return s
  14877. }
  14878. type MetricsAndOperator struct {
  14879. _ struct{} `type:"structure"`
  14880. // The prefix used when evaluating an AND predicate.
  14881. Prefix *string `type:"string"`
  14882. // The list of tags used when evaluating an AND predicate.
  14883. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  14884. }
  14885. // String returns the string representation
  14886. func (s MetricsAndOperator) String() string {
  14887. return awsutil.Prettify(s)
  14888. }
  14889. // GoString returns the string representation
  14890. func (s MetricsAndOperator) GoString() string {
  14891. return s.String()
  14892. }
  14893. // Validate inspects the fields of the type to determine if they are valid.
  14894. func (s *MetricsAndOperator) Validate() error {
  14895. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  14896. if s.Tags != nil {
  14897. for i, v := range s.Tags {
  14898. if v == nil {
  14899. continue
  14900. }
  14901. if err := v.Validate(); err != nil {
  14902. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  14903. }
  14904. }
  14905. }
  14906. if invalidParams.Len() > 0 {
  14907. return invalidParams
  14908. }
  14909. return nil
  14910. }
  14911. // SetPrefix sets the Prefix field's value.
  14912. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  14913. s.Prefix = &v
  14914. return s
  14915. }
  14916. // SetTags sets the Tags field's value.
  14917. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  14918. s.Tags = v
  14919. return s
  14920. }
  14921. type MetricsConfiguration struct {
  14922. _ struct{} `type:"structure"`
  14923. // Specifies a metrics configuration filter. The metrics configuration will
  14924. // only include objects that meet the filter's criteria. A filter must be a
  14925. // prefix, a tag, or a conjunction (MetricsAndOperator).
  14926. Filter *MetricsFilter `type:"structure"`
  14927. // The ID used to identify the metrics configuration.
  14928. //
  14929. // Id is a required field
  14930. Id *string `type:"string" required:"true"`
  14931. }
  14932. // String returns the string representation
  14933. func (s MetricsConfiguration) String() string {
  14934. return awsutil.Prettify(s)
  14935. }
  14936. // GoString returns the string representation
  14937. func (s MetricsConfiguration) GoString() string {
  14938. return s.String()
  14939. }
  14940. // Validate inspects the fields of the type to determine if they are valid.
  14941. func (s *MetricsConfiguration) Validate() error {
  14942. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  14943. if s.Id == nil {
  14944. invalidParams.Add(request.NewErrParamRequired("Id"))
  14945. }
  14946. if s.Filter != nil {
  14947. if err := s.Filter.Validate(); err != nil {
  14948. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  14949. }
  14950. }
  14951. if invalidParams.Len() > 0 {
  14952. return invalidParams
  14953. }
  14954. return nil
  14955. }
  14956. // SetFilter sets the Filter field's value.
  14957. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  14958. s.Filter = v
  14959. return s
  14960. }
  14961. // SetId sets the Id field's value.
  14962. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  14963. s.Id = &v
  14964. return s
  14965. }
  14966. type MetricsFilter struct {
  14967. _ struct{} `type:"structure"`
  14968. // A conjunction (logical AND) of predicates, which is used in evaluating a
  14969. // metrics filter. The operator must have at least two predicates, and an object
  14970. // must match all of the predicates in order for the filter to apply.
  14971. And *MetricsAndOperator `type:"structure"`
  14972. // The prefix used when evaluating a metrics filter.
  14973. Prefix *string `type:"string"`
  14974. // The tag used when evaluating a metrics filter.
  14975. Tag *Tag `type:"structure"`
  14976. }
  14977. // String returns the string representation
  14978. func (s MetricsFilter) String() string {
  14979. return awsutil.Prettify(s)
  14980. }
  14981. // GoString returns the string representation
  14982. func (s MetricsFilter) GoString() string {
  14983. return s.String()
  14984. }
  14985. // Validate inspects the fields of the type to determine if they are valid.
  14986. func (s *MetricsFilter) Validate() error {
  14987. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  14988. if s.And != nil {
  14989. if err := s.And.Validate(); err != nil {
  14990. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  14991. }
  14992. }
  14993. if s.Tag != nil {
  14994. if err := s.Tag.Validate(); err != nil {
  14995. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  14996. }
  14997. }
  14998. if invalidParams.Len() > 0 {
  14999. return invalidParams
  15000. }
  15001. return nil
  15002. }
  15003. // SetAnd sets the And field's value.
  15004. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  15005. s.And = v
  15006. return s
  15007. }
  15008. // SetPrefix sets the Prefix field's value.
  15009. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  15010. s.Prefix = &v
  15011. return s
  15012. }
  15013. // SetTag sets the Tag field's value.
  15014. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  15015. s.Tag = v
  15016. return s
  15017. }
  15018. type MultipartUpload struct {
  15019. _ struct{} `type:"structure"`
  15020. // Date and time at which the multipart upload was initiated.
  15021. Initiated *time.Time `type:"timestamp"`
  15022. // Identifies who initiated the multipart upload.
  15023. Initiator *Initiator `type:"structure"`
  15024. // Key of the object for which the multipart upload was initiated.
  15025. Key *string `min:"1" type:"string"`
  15026. Owner *Owner `type:"structure"`
  15027. // The class of storage used to store the object.
  15028. StorageClass *string `type:"string" enum:"StorageClass"`
  15029. // Upload ID that identifies the multipart upload.
  15030. UploadId *string `type:"string"`
  15031. }
  15032. // String returns the string representation
  15033. func (s MultipartUpload) String() string {
  15034. return awsutil.Prettify(s)
  15035. }
  15036. // GoString returns the string representation
  15037. func (s MultipartUpload) GoString() string {
  15038. return s.String()
  15039. }
  15040. // SetInitiated sets the Initiated field's value.
  15041. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  15042. s.Initiated = &v
  15043. return s
  15044. }
  15045. // SetInitiator sets the Initiator field's value.
  15046. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  15047. s.Initiator = v
  15048. return s
  15049. }
  15050. // SetKey sets the Key field's value.
  15051. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  15052. s.Key = &v
  15053. return s
  15054. }
  15055. // SetOwner sets the Owner field's value.
  15056. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  15057. s.Owner = v
  15058. return s
  15059. }
  15060. // SetStorageClass sets the StorageClass field's value.
  15061. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  15062. s.StorageClass = &v
  15063. return s
  15064. }
  15065. // SetUploadId sets the UploadId field's value.
  15066. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  15067. s.UploadId = &v
  15068. return s
  15069. }
  15070. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  15071. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  15072. // configuration action on a bucket that has versioning enabled (or suspended)
  15073. // to request that Amazon S3 delete noncurrent object versions at a specific
  15074. // period in the object's lifetime.
  15075. type NoncurrentVersionExpiration struct {
  15076. _ struct{} `type:"structure"`
  15077. // Specifies the number of days an object is noncurrent before Amazon S3 can
  15078. // perform the associated action. For information about the noncurrent days
  15079. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  15080. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
  15081. // in the Amazon Simple Storage Service Developer Guide.
  15082. NoncurrentDays *int64 `type:"integer"`
  15083. }
  15084. // String returns the string representation
  15085. func (s NoncurrentVersionExpiration) String() string {
  15086. return awsutil.Prettify(s)
  15087. }
  15088. // GoString returns the string representation
  15089. func (s NoncurrentVersionExpiration) GoString() string {
  15090. return s.String()
  15091. }
  15092. // SetNoncurrentDays sets the NoncurrentDays field's value.
  15093. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  15094. s.NoncurrentDays = &v
  15095. return s
  15096. }
  15097. // Container for the transition rule that describes when noncurrent objects
  15098. // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER
  15099. // storage class. If your bucket is versioning-enabled (or versioning is suspended),
  15100. // you can set this action to request that Amazon S3 transition noncurrent object
  15101. // versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER storage
  15102. // class at a specific period in the object's lifetime.
  15103. type NoncurrentVersionTransition struct {
  15104. _ struct{} `type:"structure"`
  15105. // Specifies the number of days an object is noncurrent before Amazon S3 can
  15106. // perform the associated action. For information about the noncurrent days
  15107. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  15108. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  15109. // in the Amazon Simple Storage Service Developer Guide.
  15110. NoncurrentDays *int64 `type:"integer"`
  15111. // The class of storage used to store the object.
  15112. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  15113. }
  15114. // String returns the string representation
  15115. func (s NoncurrentVersionTransition) String() string {
  15116. return awsutil.Prettify(s)
  15117. }
  15118. // GoString returns the string representation
  15119. func (s NoncurrentVersionTransition) GoString() string {
  15120. return s.String()
  15121. }
  15122. // SetNoncurrentDays sets the NoncurrentDays field's value.
  15123. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  15124. s.NoncurrentDays = &v
  15125. return s
  15126. }
  15127. // SetStorageClass sets the StorageClass field's value.
  15128. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  15129. s.StorageClass = &v
  15130. return s
  15131. }
  15132. // A container for specifying the notification configuration of the bucket.
  15133. // If this element is empty, notifications are turned off for the bucket.
  15134. type NotificationConfiguration struct {
  15135. _ struct{} `type:"structure"`
  15136. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  15137. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  15138. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  15139. }
  15140. // String returns the string representation
  15141. func (s NotificationConfiguration) String() string {
  15142. return awsutil.Prettify(s)
  15143. }
  15144. // GoString returns the string representation
  15145. func (s NotificationConfiguration) GoString() string {
  15146. return s.String()
  15147. }
  15148. // Validate inspects the fields of the type to determine if they are valid.
  15149. func (s *NotificationConfiguration) Validate() error {
  15150. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  15151. if s.LambdaFunctionConfigurations != nil {
  15152. for i, v := range s.LambdaFunctionConfigurations {
  15153. if v == nil {
  15154. continue
  15155. }
  15156. if err := v.Validate(); err != nil {
  15157. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  15158. }
  15159. }
  15160. }
  15161. if s.QueueConfigurations != nil {
  15162. for i, v := range s.QueueConfigurations {
  15163. if v == nil {
  15164. continue
  15165. }
  15166. if err := v.Validate(); err != nil {
  15167. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  15168. }
  15169. }
  15170. }
  15171. if s.TopicConfigurations != nil {
  15172. for i, v := range s.TopicConfigurations {
  15173. if v == nil {
  15174. continue
  15175. }
  15176. if err := v.Validate(); err != nil {
  15177. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  15178. }
  15179. }
  15180. }
  15181. if invalidParams.Len() > 0 {
  15182. return invalidParams
  15183. }
  15184. return nil
  15185. }
  15186. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  15187. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  15188. s.LambdaFunctionConfigurations = v
  15189. return s
  15190. }
  15191. // SetQueueConfigurations sets the QueueConfigurations field's value.
  15192. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  15193. s.QueueConfigurations = v
  15194. return s
  15195. }
  15196. // SetTopicConfigurations sets the TopicConfigurations field's value.
  15197. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  15198. s.TopicConfigurations = v
  15199. return s
  15200. }
  15201. type NotificationConfigurationDeprecated struct {
  15202. _ struct{} `type:"structure"`
  15203. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  15204. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  15205. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  15206. }
  15207. // String returns the string representation
  15208. func (s NotificationConfigurationDeprecated) String() string {
  15209. return awsutil.Prettify(s)
  15210. }
  15211. // GoString returns the string representation
  15212. func (s NotificationConfigurationDeprecated) GoString() string {
  15213. return s.String()
  15214. }
  15215. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  15216. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  15217. s.CloudFunctionConfiguration = v
  15218. return s
  15219. }
  15220. // SetQueueConfiguration sets the QueueConfiguration field's value.
  15221. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  15222. s.QueueConfiguration = v
  15223. return s
  15224. }
  15225. // SetTopicConfiguration sets the TopicConfiguration field's value.
  15226. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  15227. s.TopicConfiguration = v
  15228. return s
  15229. }
  15230. // A container for object key name filtering rules. For information about key
  15231. // name filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  15232. // in the Amazon Simple Storage Service Developer Guide.
  15233. type NotificationConfigurationFilter struct {
  15234. _ struct{} `type:"structure"`
  15235. // A container for object key name prefix and suffix filtering rules.
  15236. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  15237. }
  15238. // String returns the string representation
  15239. func (s NotificationConfigurationFilter) String() string {
  15240. return awsutil.Prettify(s)
  15241. }
  15242. // GoString returns the string representation
  15243. func (s NotificationConfigurationFilter) GoString() string {
  15244. return s.String()
  15245. }
  15246. // SetKey sets the Key field's value.
  15247. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  15248. s.Key = v
  15249. return s
  15250. }
  15251. type Object struct {
  15252. _ struct{} `type:"structure"`
  15253. ETag *string `type:"string"`
  15254. Key *string `min:"1" type:"string"`
  15255. LastModified *time.Time `type:"timestamp"`
  15256. Owner *Owner `type:"structure"`
  15257. Size *int64 `type:"integer"`
  15258. // The class of storage used to store the object.
  15259. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  15260. }
  15261. // String returns the string representation
  15262. func (s Object) String() string {
  15263. return awsutil.Prettify(s)
  15264. }
  15265. // GoString returns the string representation
  15266. func (s Object) GoString() string {
  15267. return s.String()
  15268. }
  15269. // SetETag sets the ETag field's value.
  15270. func (s *Object) SetETag(v string) *Object {
  15271. s.ETag = &v
  15272. return s
  15273. }
  15274. // SetKey sets the Key field's value.
  15275. func (s *Object) SetKey(v string) *Object {
  15276. s.Key = &v
  15277. return s
  15278. }
  15279. // SetLastModified sets the LastModified field's value.
  15280. func (s *Object) SetLastModified(v time.Time) *Object {
  15281. s.LastModified = &v
  15282. return s
  15283. }
  15284. // SetOwner sets the Owner field's value.
  15285. func (s *Object) SetOwner(v *Owner) *Object {
  15286. s.Owner = v
  15287. return s
  15288. }
  15289. // SetSize sets the Size field's value.
  15290. func (s *Object) SetSize(v int64) *Object {
  15291. s.Size = &v
  15292. return s
  15293. }
  15294. // SetStorageClass sets the StorageClass field's value.
  15295. func (s *Object) SetStorageClass(v string) *Object {
  15296. s.StorageClass = &v
  15297. return s
  15298. }
  15299. type ObjectIdentifier struct {
  15300. _ struct{} `type:"structure"`
  15301. // Key name of the object to delete.
  15302. //
  15303. // Key is a required field
  15304. Key *string `min:"1" type:"string" required:"true"`
  15305. // VersionId for the specific version of the object to delete.
  15306. VersionId *string `type:"string"`
  15307. }
  15308. // String returns the string representation
  15309. func (s ObjectIdentifier) String() string {
  15310. return awsutil.Prettify(s)
  15311. }
  15312. // GoString returns the string representation
  15313. func (s ObjectIdentifier) GoString() string {
  15314. return s.String()
  15315. }
  15316. // Validate inspects the fields of the type to determine if they are valid.
  15317. func (s *ObjectIdentifier) Validate() error {
  15318. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  15319. if s.Key == nil {
  15320. invalidParams.Add(request.NewErrParamRequired("Key"))
  15321. }
  15322. if s.Key != nil && len(*s.Key) < 1 {
  15323. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15324. }
  15325. if invalidParams.Len() > 0 {
  15326. return invalidParams
  15327. }
  15328. return nil
  15329. }
  15330. // SetKey sets the Key field's value.
  15331. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  15332. s.Key = &v
  15333. return s
  15334. }
  15335. // SetVersionId sets the VersionId field's value.
  15336. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  15337. s.VersionId = &v
  15338. return s
  15339. }
  15340. // The container element for Object Lock configuration parameters.
  15341. type ObjectLockConfiguration struct {
  15342. _ struct{} `type:"structure"`
  15343. // Indicates whether this bucket has an Object Lock configuration enabled.
  15344. ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"`
  15345. // The Object Lock rule in place for the specified object.
  15346. Rule *ObjectLockRule `type:"structure"`
  15347. }
  15348. // String returns the string representation
  15349. func (s ObjectLockConfiguration) String() string {
  15350. return awsutil.Prettify(s)
  15351. }
  15352. // GoString returns the string representation
  15353. func (s ObjectLockConfiguration) GoString() string {
  15354. return s.String()
  15355. }
  15356. // SetObjectLockEnabled sets the ObjectLockEnabled field's value.
  15357. func (s *ObjectLockConfiguration) SetObjectLockEnabled(v string) *ObjectLockConfiguration {
  15358. s.ObjectLockEnabled = &v
  15359. return s
  15360. }
  15361. // SetRule sets the Rule field's value.
  15362. func (s *ObjectLockConfiguration) SetRule(v *ObjectLockRule) *ObjectLockConfiguration {
  15363. s.Rule = v
  15364. return s
  15365. }
  15366. // A Legal Hold configuration for an object.
  15367. type ObjectLockLegalHold struct {
  15368. _ struct{} `type:"structure"`
  15369. // Indicates whether the specified object has a Legal Hold in place.
  15370. Status *string `type:"string" enum:"ObjectLockLegalHoldStatus"`
  15371. }
  15372. // String returns the string representation
  15373. func (s ObjectLockLegalHold) String() string {
  15374. return awsutil.Prettify(s)
  15375. }
  15376. // GoString returns the string representation
  15377. func (s ObjectLockLegalHold) GoString() string {
  15378. return s.String()
  15379. }
  15380. // SetStatus sets the Status field's value.
  15381. func (s *ObjectLockLegalHold) SetStatus(v string) *ObjectLockLegalHold {
  15382. s.Status = &v
  15383. return s
  15384. }
  15385. // A Retention configuration for an object.
  15386. type ObjectLockRetention struct {
  15387. _ struct{} `type:"structure"`
  15388. // Indicates the Retention mode for the specified object.
  15389. Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
  15390. // The date on which this Object Lock Retention will expire.
  15391. RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  15392. }
  15393. // String returns the string representation
  15394. func (s ObjectLockRetention) String() string {
  15395. return awsutil.Prettify(s)
  15396. }
  15397. // GoString returns the string representation
  15398. func (s ObjectLockRetention) GoString() string {
  15399. return s.String()
  15400. }
  15401. // SetMode sets the Mode field's value.
  15402. func (s *ObjectLockRetention) SetMode(v string) *ObjectLockRetention {
  15403. s.Mode = &v
  15404. return s
  15405. }
  15406. // SetRetainUntilDate sets the RetainUntilDate field's value.
  15407. func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetention {
  15408. s.RetainUntilDate = &v
  15409. return s
  15410. }
  15411. // The container element for an Object Lock rule.
  15412. type ObjectLockRule struct {
  15413. _ struct{} `type:"structure"`
  15414. // The default retention period that you want to apply to new objects placed
  15415. // in the specified bucket.
  15416. DefaultRetention *DefaultRetention `type:"structure"`
  15417. }
  15418. // String returns the string representation
  15419. func (s ObjectLockRule) String() string {
  15420. return awsutil.Prettify(s)
  15421. }
  15422. // GoString returns the string representation
  15423. func (s ObjectLockRule) GoString() string {
  15424. return s.String()
  15425. }
  15426. // SetDefaultRetention sets the DefaultRetention field's value.
  15427. func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRule {
  15428. s.DefaultRetention = v
  15429. return s
  15430. }
  15431. type ObjectVersion struct {
  15432. _ struct{} `type:"structure"`
  15433. ETag *string `type:"string"`
  15434. // Specifies whether the object is (true) or is not (false) the latest version
  15435. // of an object.
  15436. IsLatest *bool `type:"boolean"`
  15437. // The object key.
  15438. Key *string `min:"1" type:"string"`
  15439. // Date and time the object was last modified.
  15440. LastModified *time.Time `type:"timestamp"`
  15441. Owner *Owner `type:"structure"`
  15442. // Size in bytes of the object.
  15443. Size *int64 `type:"integer"`
  15444. // The class of storage used to store the object.
  15445. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  15446. // Version ID of an object.
  15447. VersionId *string `type:"string"`
  15448. }
  15449. // String returns the string representation
  15450. func (s ObjectVersion) String() string {
  15451. return awsutil.Prettify(s)
  15452. }
  15453. // GoString returns the string representation
  15454. func (s ObjectVersion) GoString() string {
  15455. return s.String()
  15456. }
  15457. // SetETag sets the ETag field's value.
  15458. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  15459. s.ETag = &v
  15460. return s
  15461. }
  15462. // SetIsLatest sets the IsLatest field's value.
  15463. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  15464. s.IsLatest = &v
  15465. return s
  15466. }
  15467. // SetKey sets the Key field's value.
  15468. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  15469. s.Key = &v
  15470. return s
  15471. }
  15472. // SetLastModified sets the LastModified field's value.
  15473. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  15474. s.LastModified = &v
  15475. return s
  15476. }
  15477. // SetOwner sets the Owner field's value.
  15478. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  15479. s.Owner = v
  15480. return s
  15481. }
  15482. // SetSize sets the Size field's value.
  15483. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  15484. s.Size = &v
  15485. return s
  15486. }
  15487. // SetStorageClass sets the StorageClass field's value.
  15488. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  15489. s.StorageClass = &v
  15490. return s
  15491. }
  15492. // SetVersionId sets the VersionId field's value.
  15493. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  15494. s.VersionId = &v
  15495. return s
  15496. }
  15497. // Describes the location where the restore job's output is stored.
  15498. type OutputLocation struct {
  15499. _ struct{} `type:"structure"`
  15500. // Describes an S3 location that will receive the results of the restore request.
  15501. S3 *Location `type:"structure"`
  15502. }
  15503. // String returns the string representation
  15504. func (s OutputLocation) String() string {
  15505. return awsutil.Prettify(s)
  15506. }
  15507. // GoString returns the string representation
  15508. func (s OutputLocation) GoString() string {
  15509. return s.String()
  15510. }
  15511. // Validate inspects the fields of the type to determine if they are valid.
  15512. func (s *OutputLocation) Validate() error {
  15513. invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
  15514. if s.S3 != nil {
  15515. if err := s.S3.Validate(); err != nil {
  15516. invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
  15517. }
  15518. }
  15519. if invalidParams.Len() > 0 {
  15520. return invalidParams
  15521. }
  15522. return nil
  15523. }
  15524. // SetS3 sets the S3 field's value.
  15525. func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
  15526. s.S3 = v
  15527. return s
  15528. }
  15529. // Describes how results of the Select job are serialized.
  15530. type OutputSerialization struct {
  15531. _ struct{} `type:"structure"`
  15532. // Describes the serialization of CSV-encoded Select results.
  15533. CSV *CSVOutput `type:"structure"`
  15534. // Specifies JSON as request's output serialization format.
  15535. JSON *JSONOutput `type:"structure"`
  15536. }
  15537. // String returns the string representation
  15538. func (s OutputSerialization) String() string {
  15539. return awsutil.Prettify(s)
  15540. }
  15541. // GoString returns the string representation
  15542. func (s OutputSerialization) GoString() string {
  15543. return s.String()
  15544. }
  15545. // SetCSV sets the CSV field's value.
  15546. func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
  15547. s.CSV = v
  15548. return s
  15549. }
  15550. // SetJSON sets the JSON field's value.
  15551. func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
  15552. s.JSON = v
  15553. return s
  15554. }
  15555. type Owner struct {
  15556. _ struct{} `type:"structure"`
  15557. DisplayName *string `type:"string"`
  15558. ID *string `type:"string"`
  15559. }
  15560. // String returns the string representation
  15561. func (s Owner) String() string {
  15562. return awsutil.Prettify(s)
  15563. }
  15564. // GoString returns the string representation
  15565. func (s Owner) GoString() string {
  15566. return s.String()
  15567. }
  15568. // SetDisplayName sets the DisplayName field's value.
  15569. func (s *Owner) SetDisplayName(v string) *Owner {
  15570. s.DisplayName = &v
  15571. return s
  15572. }
  15573. // SetID sets the ID field's value.
  15574. func (s *Owner) SetID(v string) *Owner {
  15575. s.ID = &v
  15576. return s
  15577. }
  15578. type ParquetInput struct {
  15579. _ struct{} `type:"structure"`
  15580. }
  15581. // String returns the string representation
  15582. func (s ParquetInput) String() string {
  15583. return awsutil.Prettify(s)
  15584. }
  15585. // GoString returns the string representation
  15586. func (s ParquetInput) GoString() string {
  15587. return s.String()
  15588. }
  15589. type Part struct {
  15590. _ struct{} `type:"structure"`
  15591. // Entity tag returned when the part was uploaded.
  15592. ETag *string `type:"string"`
  15593. // Date and time at which the part was uploaded.
  15594. LastModified *time.Time `type:"timestamp"`
  15595. // Part number identifying the part. This is a positive integer between 1 and
  15596. // 10,000.
  15597. PartNumber *int64 `type:"integer"`
  15598. // Size in bytes of the uploaded part data.
  15599. Size *int64 `type:"integer"`
  15600. }
  15601. // String returns the string representation
  15602. func (s Part) String() string {
  15603. return awsutil.Prettify(s)
  15604. }
  15605. // GoString returns the string representation
  15606. func (s Part) GoString() string {
  15607. return s.String()
  15608. }
  15609. // SetETag sets the ETag field's value.
  15610. func (s *Part) SetETag(v string) *Part {
  15611. s.ETag = &v
  15612. return s
  15613. }
  15614. // SetLastModified sets the LastModified field's value.
  15615. func (s *Part) SetLastModified(v time.Time) *Part {
  15616. s.LastModified = &v
  15617. return s
  15618. }
  15619. // SetPartNumber sets the PartNumber field's value.
  15620. func (s *Part) SetPartNumber(v int64) *Part {
  15621. s.PartNumber = &v
  15622. return s
  15623. }
  15624. // SetSize sets the Size field's value.
  15625. func (s *Part) SetSize(v int64) *Part {
  15626. s.Size = &v
  15627. return s
  15628. }
  15629. // The container element for a bucket's policy status.
  15630. type PolicyStatus struct {
  15631. _ struct{} `type:"structure"`
  15632. // The policy status for this bucket. TRUE indicates that this bucket is public.
  15633. // FALSE indicates that the bucket is not public.
  15634. IsPublic *bool `locationName:"IsPublic" type:"boolean"`
  15635. }
  15636. // String returns the string representation
  15637. func (s PolicyStatus) String() string {
  15638. return awsutil.Prettify(s)
  15639. }
  15640. // GoString returns the string representation
  15641. func (s PolicyStatus) GoString() string {
  15642. return s.String()
  15643. }
  15644. // SetIsPublic sets the IsPublic field's value.
  15645. func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus {
  15646. s.IsPublic = &v
  15647. return s
  15648. }
  15649. type Progress struct {
  15650. _ struct{} `type:"structure"`
  15651. // The current number of uncompressed object bytes processed.
  15652. BytesProcessed *int64 `type:"long"`
  15653. // The current number of bytes of records payload data returned.
  15654. BytesReturned *int64 `type:"long"`
  15655. // The current number of object bytes scanned.
  15656. BytesScanned *int64 `type:"long"`
  15657. }
  15658. // String returns the string representation
  15659. func (s Progress) String() string {
  15660. return awsutil.Prettify(s)
  15661. }
  15662. // GoString returns the string representation
  15663. func (s Progress) GoString() string {
  15664. return s.String()
  15665. }
  15666. // SetBytesProcessed sets the BytesProcessed field's value.
  15667. func (s *Progress) SetBytesProcessed(v int64) *Progress {
  15668. s.BytesProcessed = &v
  15669. return s
  15670. }
  15671. // SetBytesReturned sets the BytesReturned field's value.
  15672. func (s *Progress) SetBytesReturned(v int64) *Progress {
  15673. s.BytesReturned = &v
  15674. return s
  15675. }
  15676. // SetBytesScanned sets the BytesScanned field's value.
  15677. func (s *Progress) SetBytesScanned(v int64) *Progress {
  15678. s.BytesScanned = &v
  15679. return s
  15680. }
  15681. type ProgressEvent struct {
  15682. _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"`
  15683. // The Progress event details.
  15684. Details *Progress `locationName:"Details" type:"structure"`
  15685. }
  15686. // String returns the string representation
  15687. func (s ProgressEvent) String() string {
  15688. return awsutil.Prettify(s)
  15689. }
  15690. // GoString returns the string representation
  15691. func (s ProgressEvent) GoString() string {
  15692. return s.String()
  15693. }
  15694. // SetDetails sets the Details field's value.
  15695. func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent {
  15696. s.Details = v
  15697. return s
  15698. }
  15699. // The ProgressEvent is and event in the SelectObjectContentEventStream group of events.
  15700. func (s *ProgressEvent) eventSelectObjectContentEventStream() {}
  15701. // UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value.
  15702. // This method is only used internally within the SDK's EventStream handling.
  15703. func (s *ProgressEvent) UnmarshalEvent(
  15704. payloadUnmarshaler protocol.PayloadUnmarshaler,
  15705. msg eventstream.Message,
  15706. ) error {
  15707. if err := payloadUnmarshaler.UnmarshalPayload(
  15708. bytes.NewReader(msg.Payload), s,
  15709. ); err != nil {
  15710. return err
  15711. }
  15712. return nil
  15713. }
  15714. type PublicAccessBlockConfiguration struct {
  15715. _ struct{} `type:"structure"`
  15716. // Specifies whether Amazon S3 should block public access control lists (ACLs)
  15717. // for this bucket and objects in this bucket. Setting this element to TRUE
  15718. // causes the following behavior:
  15719. //
  15720. // * PUT Bucket acl and PUT Object acl calls fail if the specified ACL is
  15721. // public.
  15722. //
  15723. // * PUT Object calls fail if the request includes a public ACL.
  15724. //
  15725. // Enabling this setting doesn't affect existing policies or ACLs.
  15726. BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"`
  15727. // Specifies whether Amazon S3 should block public bucket policies for this
  15728. // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to
  15729. // PUT Bucket policy if the specified bucket policy allows public access.
  15730. //
  15731. // Enabling this setting doesn't affect existing bucket policies.
  15732. BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"`
  15733. // Specifies whether Amazon S3 should ignore public ACLs for this bucket and
  15734. // objects in this bucket. Setting this element to TRUE causes Amazon S3 to
  15735. // ignore all public ACLs on this bucket and objects in this bucket.
  15736. //
  15737. // Enabling this setting doesn't affect the persistence of any existing ACLs
  15738. // and doesn't prevent new public ACLs from being set.
  15739. IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"`
  15740. // Specifies whether Amazon S3 should restrict public bucket policies for this
  15741. // bucket. Setting this element to TRUE restricts access to this bucket to only
  15742. // AWS services and authorized users within this account if the bucket has a
  15743. // public policy.
  15744. //
  15745. // Enabling this setting doesn't affect previously stored bucket policies, except
  15746. // that public and cross-account access within any public bucket policy, including
  15747. // non-public delegation to specific accounts, is blocked.
  15748. RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"`
  15749. }
  15750. // String returns the string representation
  15751. func (s PublicAccessBlockConfiguration) String() string {
  15752. return awsutil.Prettify(s)
  15753. }
  15754. // GoString returns the string representation
  15755. func (s PublicAccessBlockConfiguration) GoString() string {
  15756. return s.String()
  15757. }
  15758. // SetBlockPublicAcls sets the BlockPublicAcls field's value.
  15759. func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration {
  15760. s.BlockPublicAcls = &v
  15761. return s
  15762. }
  15763. // SetBlockPublicPolicy sets the BlockPublicPolicy field's value.
  15764. func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration {
  15765. s.BlockPublicPolicy = &v
  15766. return s
  15767. }
  15768. // SetIgnorePublicAcls sets the IgnorePublicAcls field's value.
  15769. func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration {
  15770. s.IgnorePublicAcls = &v
  15771. return s
  15772. }
  15773. // SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value.
  15774. func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration {
  15775. s.RestrictPublicBuckets = &v
  15776. return s
  15777. }
  15778. type PutBucketAccelerateConfigurationInput struct {
  15779. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  15780. // Specifies the Accelerate Configuration you want to set for the bucket.
  15781. //
  15782. // AccelerateConfiguration is a required field
  15783. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15784. // Name of the bucket for which the accelerate configuration is set.
  15785. //
  15786. // Bucket is a required field
  15787. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15788. }
  15789. // String returns the string representation
  15790. func (s PutBucketAccelerateConfigurationInput) String() string {
  15791. return awsutil.Prettify(s)
  15792. }
  15793. // GoString returns the string representation
  15794. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  15795. return s.String()
  15796. }
  15797. // Validate inspects the fields of the type to determine if they are valid.
  15798. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  15799. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  15800. if s.AccelerateConfiguration == nil {
  15801. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  15802. }
  15803. if s.Bucket == nil {
  15804. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15805. }
  15806. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15807. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15808. }
  15809. if invalidParams.Len() > 0 {
  15810. return invalidParams
  15811. }
  15812. return nil
  15813. }
  15814. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  15815. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  15816. s.AccelerateConfiguration = v
  15817. return s
  15818. }
  15819. // SetBucket sets the Bucket field's value.
  15820. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  15821. s.Bucket = &v
  15822. return s
  15823. }
  15824. func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
  15825. if s.Bucket == nil {
  15826. return v
  15827. }
  15828. return *s.Bucket
  15829. }
  15830. type PutBucketAccelerateConfigurationOutput struct {
  15831. _ struct{} `type:"structure"`
  15832. }
  15833. // String returns the string representation
  15834. func (s PutBucketAccelerateConfigurationOutput) String() string {
  15835. return awsutil.Prettify(s)
  15836. }
  15837. // GoString returns the string representation
  15838. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  15839. return s.String()
  15840. }
  15841. type PutBucketAclInput struct {
  15842. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  15843. // The canned ACL to apply to the bucket.
  15844. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  15845. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15846. // Bucket is a required field
  15847. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15848. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  15849. // bucket.
  15850. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15851. // Allows grantee to list the objects in the bucket.
  15852. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15853. // Allows grantee to read the bucket ACL.
  15854. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15855. // Allows grantee to create, overwrite, and delete any object in the bucket.
  15856. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  15857. // Allows grantee to write the ACL for the applicable bucket.
  15858. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15859. }
  15860. // String returns the string representation
  15861. func (s PutBucketAclInput) String() string {
  15862. return awsutil.Prettify(s)
  15863. }
  15864. // GoString returns the string representation
  15865. func (s PutBucketAclInput) GoString() string {
  15866. return s.String()
  15867. }
  15868. // Validate inspects the fields of the type to determine if they are valid.
  15869. func (s *PutBucketAclInput) Validate() error {
  15870. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  15871. if s.Bucket == nil {
  15872. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15873. }
  15874. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15875. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15876. }
  15877. if s.AccessControlPolicy != nil {
  15878. if err := s.AccessControlPolicy.Validate(); err != nil {
  15879. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  15880. }
  15881. }
  15882. if invalidParams.Len() > 0 {
  15883. return invalidParams
  15884. }
  15885. return nil
  15886. }
  15887. // SetACL sets the ACL field's value.
  15888. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  15889. s.ACL = &v
  15890. return s
  15891. }
  15892. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  15893. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  15894. s.AccessControlPolicy = v
  15895. return s
  15896. }
  15897. // SetBucket sets the Bucket field's value.
  15898. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  15899. s.Bucket = &v
  15900. return s
  15901. }
  15902. func (s *PutBucketAclInput) getBucket() (v string) {
  15903. if s.Bucket == nil {
  15904. return v
  15905. }
  15906. return *s.Bucket
  15907. }
  15908. // SetGrantFullControl sets the GrantFullControl field's value.
  15909. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  15910. s.GrantFullControl = &v
  15911. return s
  15912. }
  15913. // SetGrantRead sets the GrantRead field's value.
  15914. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  15915. s.GrantRead = &v
  15916. return s
  15917. }
  15918. // SetGrantReadACP sets the GrantReadACP field's value.
  15919. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  15920. s.GrantReadACP = &v
  15921. return s
  15922. }
  15923. // SetGrantWrite sets the GrantWrite field's value.
  15924. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  15925. s.GrantWrite = &v
  15926. return s
  15927. }
  15928. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15929. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  15930. s.GrantWriteACP = &v
  15931. return s
  15932. }
  15933. type PutBucketAclOutput struct {
  15934. _ struct{} `type:"structure"`
  15935. }
  15936. // String returns the string representation
  15937. func (s PutBucketAclOutput) String() string {
  15938. return awsutil.Prettify(s)
  15939. }
  15940. // GoString returns the string representation
  15941. func (s PutBucketAclOutput) GoString() string {
  15942. return s.String()
  15943. }
  15944. type PutBucketAnalyticsConfigurationInput struct {
  15945. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  15946. // The configuration and any analyses for the analytics filter.
  15947. //
  15948. // AnalyticsConfiguration is a required field
  15949. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15950. // The name of the bucket to which an analytics configuration is stored.
  15951. //
  15952. // Bucket is a required field
  15953. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15954. // The identifier used to represent an analytics configuration.
  15955. //
  15956. // Id is a required field
  15957. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  15958. }
  15959. // String returns the string representation
  15960. func (s PutBucketAnalyticsConfigurationInput) String() string {
  15961. return awsutil.Prettify(s)
  15962. }
  15963. // GoString returns the string representation
  15964. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  15965. return s.String()
  15966. }
  15967. // Validate inspects the fields of the type to determine if they are valid.
  15968. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  15969. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  15970. if s.AnalyticsConfiguration == nil {
  15971. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  15972. }
  15973. if s.Bucket == nil {
  15974. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15975. }
  15976. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15977. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15978. }
  15979. if s.Id == nil {
  15980. invalidParams.Add(request.NewErrParamRequired("Id"))
  15981. }
  15982. if s.AnalyticsConfiguration != nil {
  15983. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  15984. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  15985. }
  15986. }
  15987. if invalidParams.Len() > 0 {
  15988. return invalidParams
  15989. }
  15990. return nil
  15991. }
  15992. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  15993. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  15994. s.AnalyticsConfiguration = v
  15995. return s
  15996. }
  15997. // SetBucket sets the Bucket field's value.
  15998. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  15999. s.Bucket = &v
  16000. return s
  16001. }
  16002. func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
  16003. if s.Bucket == nil {
  16004. return v
  16005. }
  16006. return *s.Bucket
  16007. }
  16008. // SetId sets the Id field's value.
  16009. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  16010. s.Id = &v
  16011. return s
  16012. }
  16013. type PutBucketAnalyticsConfigurationOutput struct {
  16014. _ struct{} `type:"structure"`
  16015. }
  16016. // String returns the string representation
  16017. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  16018. return awsutil.Prettify(s)
  16019. }
  16020. // GoString returns the string representation
  16021. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  16022. return s.String()
  16023. }
  16024. type PutBucketCorsInput struct {
  16025. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  16026. // Bucket is a required field
  16027. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16028. // CORSConfiguration is a required field
  16029. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16030. }
  16031. // String returns the string representation
  16032. func (s PutBucketCorsInput) String() string {
  16033. return awsutil.Prettify(s)
  16034. }
  16035. // GoString returns the string representation
  16036. func (s PutBucketCorsInput) GoString() string {
  16037. return s.String()
  16038. }
  16039. // Validate inspects the fields of the type to determine if they are valid.
  16040. func (s *PutBucketCorsInput) Validate() error {
  16041. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  16042. if s.Bucket == nil {
  16043. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16044. }
  16045. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16046. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16047. }
  16048. if s.CORSConfiguration == nil {
  16049. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  16050. }
  16051. if s.CORSConfiguration != nil {
  16052. if err := s.CORSConfiguration.Validate(); err != nil {
  16053. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  16054. }
  16055. }
  16056. if invalidParams.Len() > 0 {
  16057. return invalidParams
  16058. }
  16059. return nil
  16060. }
  16061. // SetBucket sets the Bucket field's value.
  16062. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  16063. s.Bucket = &v
  16064. return s
  16065. }
  16066. func (s *PutBucketCorsInput) getBucket() (v string) {
  16067. if s.Bucket == nil {
  16068. return v
  16069. }
  16070. return *s.Bucket
  16071. }
  16072. // SetCORSConfiguration sets the CORSConfiguration field's value.
  16073. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  16074. s.CORSConfiguration = v
  16075. return s
  16076. }
  16077. type PutBucketCorsOutput struct {
  16078. _ struct{} `type:"structure"`
  16079. }
  16080. // String returns the string representation
  16081. func (s PutBucketCorsOutput) String() string {
  16082. return awsutil.Prettify(s)
  16083. }
  16084. // GoString returns the string representation
  16085. func (s PutBucketCorsOutput) GoString() string {
  16086. return s.String()
  16087. }
  16088. type PutBucketEncryptionInput struct {
  16089. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  16090. // The name of the bucket for which the server-side encryption configuration
  16091. // is set.
  16092. //
  16093. // Bucket is a required field
  16094. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16095. // Container for server-side encryption configuration rules. Currently S3 supports
  16096. // one rule only.
  16097. //
  16098. // ServerSideEncryptionConfiguration is a required field
  16099. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16100. }
  16101. // String returns the string representation
  16102. func (s PutBucketEncryptionInput) String() string {
  16103. return awsutil.Prettify(s)
  16104. }
  16105. // GoString returns the string representation
  16106. func (s PutBucketEncryptionInput) GoString() string {
  16107. return s.String()
  16108. }
  16109. // Validate inspects the fields of the type to determine if they are valid.
  16110. func (s *PutBucketEncryptionInput) Validate() error {
  16111. invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
  16112. if s.Bucket == nil {
  16113. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16114. }
  16115. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16116. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16117. }
  16118. if s.ServerSideEncryptionConfiguration == nil {
  16119. invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
  16120. }
  16121. if s.ServerSideEncryptionConfiguration != nil {
  16122. if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
  16123. invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
  16124. }
  16125. }
  16126. if invalidParams.Len() > 0 {
  16127. return invalidParams
  16128. }
  16129. return nil
  16130. }
  16131. // SetBucket sets the Bucket field's value.
  16132. func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
  16133. s.Bucket = &v
  16134. return s
  16135. }
  16136. func (s *PutBucketEncryptionInput) getBucket() (v string) {
  16137. if s.Bucket == nil {
  16138. return v
  16139. }
  16140. return *s.Bucket
  16141. }
  16142. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  16143. func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
  16144. s.ServerSideEncryptionConfiguration = v
  16145. return s
  16146. }
  16147. type PutBucketEncryptionOutput struct {
  16148. _ struct{} `type:"structure"`
  16149. }
  16150. // String returns the string representation
  16151. func (s PutBucketEncryptionOutput) String() string {
  16152. return awsutil.Prettify(s)
  16153. }
  16154. // GoString returns the string representation
  16155. func (s PutBucketEncryptionOutput) GoString() string {
  16156. return s.String()
  16157. }
  16158. type PutBucketInventoryConfigurationInput struct {
  16159. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  16160. // The name of the bucket where the inventory configuration will be stored.
  16161. //
  16162. // Bucket is a required field
  16163. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16164. // The ID used to identify the inventory configuration.
  16165. //
  16166. // Id is a required field
  16167. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  16168. // Specifies the inventory configuration.
  16169. //
  16170. // InventoryConfiguration is a required field
  16171. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16172. }
  16173. // String returns the string representation
  16174. func (s PutBucketInventoryConfigurationInput) String() string {
  16175. return awsutil.Prettify(s)
  16176. }
  16177. // GoString returns the string representation
  16178. func (s PutBucketInventoryConfigurationInput) GoString() string {
  16179. return s.String()
  16180. }
  16181. // Validate inspects the fields of the type to determine if they are valid.
  16182. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  16183. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  16184. if s.Bucket == nil {
  16185. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16186. }
  16187. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16188. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16189. }
  16190. if s.Id == nil {
  16191. invalidParams.Add(request.NewErrParamRequired("Id"))
  16192. }
  16193. if s.InventoryConfiguration == nil {
  16194. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  16195. }
  16196. if s.InventoryConfiguration != nil {
  16197. if err := s.InventoryConfiguration.Validate(); err != nil {
  16198. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  16199. }
  16200. }
  16201. if invalidParams.Len() > 0 {
  16202. return invalidParams
  16203. }
  16204. return nil
  16205. }
  16206. // SetBucket sets the Bucket field's value.
  16207. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  16208. s.Bucket = &v
  16209. return s
  16210. }
  16211. func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
  16212. if s.Bucket == nil {
  16213. return v
  16214. }
  16215. return *s.Bucket
  16216. }
  16217. // SetId sets the Id field's value.
  16218. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  16219. s.Id = &v
  16220. return s
  16221. }
  16222. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  16223. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  16224. s.InventoryConfiguration = v
  16225. return s
  16226. }
  16227. type PutBucketInventoryConfigurationOutput struct {
  16228. _ struct{} `type:"structure"`
  16229. }
  16230. // String returns the string representation
  16231. func (s PutBucketInventoryConfigurationOutput) String() string {
  16232. return awsutil.Prettify(s)
  16233. }
  16234. // GoString returns the string representation
  16235. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  16236. return s.String()
  16237. }
  16238. type PutBucketLifecycleConfigurationInput struct {
  16239. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  16240. // Bucket is a required field
  16241. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16242. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16243. }
  16244. // String returns the string representation
  16245. func (s PutBucketLifecycleConfigurationInput) String() string {
  16246. return awsutil.Prettify(s)
  16247. }
  16248. // GoString returns the string representation
  16249. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  16250. return s.String()
  16251. }
  16252. // Validate inspects the fields of the type to determine if they are valid.
  16253. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  16254. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  16255. if s.Bucket == nil {
  16256. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16257. }
  16258. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16259. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16260. }
  16261. if s.LifecycleConfiguration != nil {
  16262. if err := s.LifecycleConfiguration.Validate(); err != nil {
  16263. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  16264. }
  16265. }
  16266. if invalidParams.Len() > 0 {
  16267. return invalidParams
  16268. }
  16269. return nil
  16270. }
  16271. // SetBucket sets the Bucket field's value.
  16272. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  16273. s.Bucket = &v
  16274. return s
  16275. }
  16276. func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
  16277. if s.Bucket == nil {
  16278. return v
  16279. }
  16280. return *s.Bucket
  16281. }
  16282. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  16283. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  16284. s.LifecycleConfiguration = v
  16285. return s
  16286. }
  16287. type PutBucketLifecycleConfigurationOutput struct {
  16288. _ struct{} `type:"structure"`
  16289. }
  16290. // String returns the string representation
  16291. func (s PutBucketLifecycleConfigurationOutput) String() string {
  16292. return awsutil.Prettify(s)
  16293. }
  16294. // GoString returns the string representation
  16295. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  16296. return s.String()
  16297. }
  16298. type PutBucketLifecycleInput struct {
  16299. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  16300. // Bucket is a required field
  16301. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16302. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16303. }
  16304. // String returns the string representation
  16305. func (s PutBucketLifecycleInput) String() string {
  16306. return awsutil.Prettify(s)
  16307. }
  16308. // GoString returns the string representation
  16309. func (s PutBucketLifecycleInput) GoString() string {
  16310. return s.String()
  16311. }
  16312. // Validate inspects the fields of the type to determine if they are valid.
  16313. func (s *PutBucketLifecycleInput) Validate() error {
  16314. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  16315. if s.Bucket == nil {
  16316. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16317. }
  16318. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16319. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16320. }
  16321. if s.LifecycleConfiguration != nil {
  16322. if err := s.LifecycleConfiguration.Validate(); err != nil {
  16323. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  16324. }
  16325. }
  16326. if invalidParams.Len() > 0 {
  16327. return invalidParams
  16328. }
  16329. return nil
  16330. }
  16331. // SetBucket sets the Bucket field's value.
  16332. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  16333. s.Bucket = &v
  16334. return s
  16335. }
  16336. func (s *PutBucketLifecycleInput) getBucket() (v string) {
  16337. if s.Bucket == nil {
  16338. return v
  16339. }
  16340. return *s.Bucket
  16341. }
  16342. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  16343. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  16344. s.LifecycleConfiguration = v
  16345. return s
  16346. }
  16347. type PutBucketLifecycleOutput struct {
  16348. _ struct{} `type:"structure"`
  16349. }
  16350. // String returns the string representation
  16351. func (s PutBucketLifecycleOutput) String() string {
  16352. return awsutil.Prettify(s)
  16353. }
  16354. // GoString returns the string representation
  16355. func (s PutBucketLifecycleOutput) GoString() string {
  16356. return s.String()
  16357. }
  16358. type PutBucketLoggingInput struct {
  16359. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  16360. // Bucket is a required field
  16361. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16362. // BucketLoggingStatus is a required field
  16363. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16364. }
  16365. // String returns the string representation
  16366. func (s PutBucketLoggingInput) String() string {
  16367. return awsutil.Prettify(s)
  16368. }
  16369. // GoString returns the string representation
  16370. func (s PutBucketLoggingInput) GoString() string {
  16371. return s.String()
  16372. }
  16373. // Validate inspects the fields of the type to determine if they are valid.
  16374. func (s *PutBucketLoggingInput) Validate() error {
  16375. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  16376. if s.Bucket == nil {
  16377. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16378. }
  16379. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16380. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16381. }
  16382. if s.BucketLoggingStatus == nil {
  16383. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  16384. }
  16385. if s.BucketLoggingStatus != nil {
  16386. if err := s.BucketLoggingStatus.Validate(); err != nil {
  16387. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  16388. }
  16389. }
  16390. if invalidParams.Len() > 0 {
  16391. return invalidParams
  16392. }
  16393. return nil
  16394. }
  16395. // SetBucket sets the Bucket field's value.
  16396. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  16397. s.Bucket = &v
  16398. return s
  16399. }
  16400. func (s *PutBucketLoggingInput) getBucket() (v string) {
  16401. if s.Bucket == nil {
  16402. return v
  16403. }
  16404. return *s.Bucket
  16405. }
  16406. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  16407. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  16408. s.BucketLoggingStatus = v
  16409. return s
  16410. }
  16411. type PutBucketLoggingOutput struct {
  16412. _ struct{} `type:"structure"`
  16413. }
  16414. // String returns the string representation
  16415. func (s PutBucketLoggingOutput) String() string {
  16416. return awsutil.Prettify(s)
  16417. }
  16418. // GoString returns the string representation
  16419. func (s PutBucketLoggingOutput) GoString() string {
  16420. return s.String()
  16421. }
  16422. type PutBucketMetricsConfigurationInput struct {
  16423. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  16424. // The name of the bucket for which the metrics configuration is set.
  16425. //
  16426. // Bucket is a required field
  16427. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16428. // The ID used to identify the metrics configuration.
  16429. //
  16430. // Id is a required field
  16431. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  16432. // Specifies the metrics configuration.
  16433. //
  16434. // MetricsConfiguration is a required field
  16435. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16436. }
  16437. // String returns the string representation
  16438. func (s PutBucketMetricsConfigurationInput) String() string {
  16439. return awsutil.Prettify(s)
  16440. }
  16441. // GoString returns the string representation
  16442. func (s PutBucketMetricsConfigurationInput) GoString() string {
  16443. return s.String()
  16444. }
  16445. // Validate inspects the fields of the type to determine if they are valid.
  16446. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  16447. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  16448. if s.Bucket == nil {
  16449. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16450. }
  16451. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16452. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16453. }
  16454. if s.Id == nil {
  16455. invalidParams.Add(request.NewErrParamRequired("Id"))
  16456. }
  16457. if s.MetricsConfiguration == nil {
  16458. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  16459. }
  16460. if s.MetricsConfiguration != nil {
  16461. if err := s.MetricsConfiguration.Validate(); err != nil {
  16462. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  16463. }
  16464. }
  16465. if invalidParams.Len() > 0 {
  16466. return invalidParams
  16467. }
  16468. return nil
  16469. }
  16470. // SetBucket sets the Bucket field's value.
  16471. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  16472. s.Bucket = &v
  16473. return s
  16474. }
  16475. func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
  16476. if s.Bucket == nil {
  16477. return v
  16478. }
  16479. return *s.Bucket
  16480. }
  16481. // SetId sets the Id field's value.
  16482. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  16483. s.Id = &v
  16484. return s
  16485. }
  16486. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  16487. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  16488. s.MetricsConfiguration = v
  16489. return s
  16490. }
  16491. type PutBucketMetricsConfigurationOutput struct {
  16492. _ struct{} `type:"structure"`
  16493. }
  16494. // String returns the string representation
  16495. func (s PutBucketMetricsConfigurationOutput) String() string {
  16496. return awsutil.Prettify(s)
  16497. }
  16498. // GoString returns the string representation
  16499. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  16500. return s.String()
  16501. }
  16502. type PutBucketNotificationConfigurationInput struct {
  16503. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  16504. // Bucket is a required field
  16505. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16506. // A container for specifying the notification configuration of the bucket.
  16507. // If this element is empty, notifications are turned off for the bucket.
  16508. //
  16509. // NotificationConfiguration is a required field
  16510. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16511. }
  16512. // String returns the string representation
  16513. func (s PutBucketNotificationConfigurationInput) String() string {
  16514. return awsutil.Prettify(s)
  16515. }
  16516. // GoString returns the string representation
  16517. func (s PutBucketNotificationConfigurationInput) GoString() string {
  16518. return s.String()
  16519. }
  16520. // Validate inspects the fields of the type to determine if they are valid.
  16521. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  16522. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  16523. if s.Bucket == nil {
  16524. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16525. }
  16526. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16527. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16528. }
  16529. if s.NotificationConfiguration == nil {
  16530. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  16531. }
  16532. if s.NotificationConfiguration != nil {
  16533. if err := s.NotificationConfiguration.Validate(); err != nil {
  16534. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  16535. }
  16536. }
  16537. if invalidParams.Len() > 0 {
  16538. return invalidParams
  16539. }
  16540. return nil
  16541. }
  16542. // SetBucket sets the Bucket field's value.
  16543. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  16544. s.Bucket = &v
  16545. return s
  16546. }
  16547. func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
  16548. if s.Bucket == nil {
  16549. return v
  16550. }
  16551. return *s.Bucket
  16552. }
  16553. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  16554. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  16555. s.NotificationConfiguration = v
  16556. return s
  16557. }
  16558. type PutBucketNotificationConfigurationOutput struct {
  16559. _ struct{} `type:"structure"`
  16560. }
  16561. // String returns the string representation
  16562. func (s PutBucketNotificationConfigurationOutput) String() string {
  16563. return awsutil.Prettify(s)
  16564. }
  16565. // GoString returns the string representation
  16566. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  16567. return s.String()
  16568. }
  16569. type PutBucketNotificationInput struct {
  16570. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  16571. // Bucket is a required field
  16572. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16573. // NotificationConfiguration is a required field
  16574. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16575. }
  16576. // String returns the string representation
  16577. func (s PutBucketNotificationInput) String() string {
  16578. return awsutil.Prettify(s)
  16579. }
  16580. // GoString returns the string representation
  16581. func (s PutBucketNotificationInput) GoString() string {
  16582. return s.String()
  16583. }
  16584. // Validate inspects the fields of the type to determine if they are valid.
  16585. func (s *PutBucketNotificationInput) Validate() error {
  16586. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  16587. if s.Bucket == nil {
  16588. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16589. }
  16590. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16591. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16592. }
  16593. if s.NotificationConfiguration == nil {
  16594. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  16595. }
  16596. if invalidParams.Len() > 0 {
  16597. return invalidParams
  16598. }
  16599. return nil
  16600. }
  16601. // SetBucket sets the Bucket field's value.
  16602. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  16603. s.Bucket = &v
  16604. return s
  16605. }
  16606. func (s *PutBucketNotificationInput) getBucket() (v string) {
  16607. if s.Bucket == nil {
  16608. return v
  16609. }
  16610. return *s.Bucket
  16611. }
  16612. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  16613. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  16614. s.NotificationConfiguration = v
  16615. return s
  16616. }
  16617. type PutBucketNotificationOutput struct {
  16618. _ struct{} `type:"structure"`
  16619. }
  16620. // String returns the string representation
  16621. func (s PutBucketNotificationOutput) String() string {
  16622. return awsutil.Prettify(s)
  16623. }
  16624. // GoString returns the string representation
  16625. func (s PutBucketNotificationOutput) GoString() string {
  16626. return s.String()
  16627. }
  16628. type PutBucketPolicyInput struct {
  16629. _ struct{} `type:"structure" payload:"Policy"`
  16630. // Bucket is a required field
  16631. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16632. // Set this parameter to true to confirm that you want to remove your permissions
  16633. // to change this bucket policy in the future.
  16634. ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
  16635. // The bucket policy as a JSON document.
  16636. //
  16637. // Policy is a required field
  16638. Policy *string `type:"string" required:"true"`
  16639. }
  16640. // String returns the string representation
  16641. func (s PutBucketPolicyInput) String() string {
  16642. return awsutil.Prettify(s)
  16643. }
  16644. // GoString returns the string representation
  16645. func (s PutBucketPolicyInput) GoString() string {
  16646. return s.String()
  16647. }
  16648. // Validate inspects the fields of the type to determine if they are valid.
  16649. func (s *PutBucketPolicyInput) Validate() error {
  16650. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  16651. if s.Bucket == nil {
  16652. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16653. }
  16654. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16655. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16656. }
  16657. if s.Policy == nil {
  16658. invalidParams.Add(request.NewErrParamRequired("Policy"))
  16659. }
  16660. if invalidParams.Len() > 0 {
  16661. return invalidParams
  16662. }
  16663. return nil
  16664. }
  16665. // SetBucket sets the Bucket field's value.
  16666. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  16667. s.Bucket = &v
  16668. return s
  16669. }
  16670. func (s *PutBucketPolicyInput) getBucket() (v string) {
  16671. if s.Bucket == nil {
  16672. return v
  16673. }
  16674. return *s.Bucket
  16675. }
  16676. // SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
  16677. func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
  16678. s.ConfirmRemoveSelfBucketAccess = &v
  16679. return s
  16680. }
  16681. // SetPolicy sets the Policy field's value.
  16682. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  16683. s.Policy = &v
  16684. return s
  16685. }
  16686. type PutBucketPolicyOutput struct {
  16687. _ struct{} `type:"structure"`
  16688. }
  16689. // String returns the string representation
  16690. func (s PutBucketPolicyOutput) String() string {
  16691. return awsutil.Prettify(s)
  16692. }
  16693. // GoString returns the string representation
  16694. func (s PutBucketPolicyOutput) GoString() string {
  16695. return s.String()
  16696. }
  16697. type PutBucketReplicationInput struct {
  16698. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  16699. // Bucket is a required field
  16700. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16701. // A container for replication rules. You can add up to 1,000 rules. The maximum
  16702. // size of a replication configuration is 2 MB.
  16703. //
  16704. // ReplicationConfiguration is a required field
  16705. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16706. }
  16707. // String returns the string representation
  16708. func (s PutBucketReplicationInput) String() string {
  16709. return awsutil.Prettify(s)
  16710. }
  16711. // GoString returns the string representation
  16712. func (s PutBucketReplicationInput) GoString() string {
  16713. return s.String()
  16714. }
  16715. // Validate inspects the fields of the type to determine if they are valid.
  16716. func (s *PutBucketReplicationInput) Validate() error {
  16717. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  16718. if s.Bucket == nil {
  16719. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16720. }
  16721. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16722. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16723. }
  16724. if s.ReplicationConfiguration == nil {
  16725. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  16726. }
  16727. if s.ReplicationConfiguration != nil {
  16728. if err := s.ReplicationConfiguration.Validate(); err != nil {
  16729. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  16730. }
  16731. }
  16732. if invalidParams.Len() > 0 {
  16733. return invalidParams
  16734. }
  16735. return nil
  16736. }
  16737. // SetBucket sets the Bucket field's value.
  16738. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  16739. s.Bucket = &v
  16740. return s
  16741. }
  16742. func (s *PutBucketReplicationInput) getBucket() (v string) {
  16743. if s.Bucket == nil {
  16744. return v
  16745. }
  16746. return *s.Bucket
  16747. }
  16748. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  16749. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  16750. s.ReplicationConfiguration = v
  16751. return s
  16752. }
  16753. type PutBucketReplicationOutput struct {
  16754. _ struct{} `type:"structure"`
  16755. }
  16756. // String returns the string representation
  16757. func (s PutBucketReplicationOutput) String() string {
  16758. return awsutil.Prettify(s)
  16759. }
  16760. // GoString returns the string representation
  16761. func (s PutBucketReplicationOutput) GoString() string {
  16762. return s.String()
  16763. }
  16764. type PutBucketRequestPaymentInput struct {
  16765. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  16766. // Bucket is a required field
  16767. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16768. // RequestPaymentConfiguration is a required field
  16769. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16770. }
  16771. // String returns the string representation
  16772. func (s PutBucketRequestPaymentInput) String() string {
  16773. return awsutil.Prettify(s)
  16774. }
  16775. // GoString returns the string representation
  16776. func (s PutBucketRequestPaymentInput) GoString() string {
  16777. return s.String()
  16778. }
  16779. // Validate inspects the fields of the type to determine if they are valid.
  16780. func (s *PutBucketRequestPaymentInput) Validate() error {
  16781. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  16782. if s.Bucket == nil {
  16783. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16784. }
  16785. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16786. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16787. }
  16788. if s.RequestPaymentConfiguration == nil {
  16789. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  16790. }
  16791. if s.RequestPaymentConfiguration != nil {
  16792. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  16793. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  16794. }
  16795. }
  16796. if invalidParams.Len() > 0 {
  16797. return invalidParams
  16798. }
  16799. return nil
  16800. }
  16801. // SetBucket sets the Bucket field's value.
  16802. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  16803. s.Bucket = &v
  16804. return s
  16805. }
  16806. func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
  16807. if s.Bucket == nil {
  16808. return v
  16809. }
  16810. return *s.Bucket
  16811. }
  16812. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  16813. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  16814. s.RequestPaymentConfiguration = v
  16815. return s
  16816. }
  16817. type PutBucketRequestPaymentOutput struct {
  16818. _ struct{} `type:"structure"`
  16819. }
  16820. // String returns the string representation
  16821. func (s PutBucketRequestPaymentOutput) String() string {
  16822. return awsutil.Prettify(s)
  16823. }
  16824. // GoString returns the string representation
  16825. func (s PutBucketRequestPaymentOutput) GoString() string {
  16826. return s.String()
  16827. }
  16828. type PutBucketTaggingInput struct {
  16829. _ struct{} `type:"structure" payload:"Tagging"`
  16830. // Bucket is a required field
  16831. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16832. // Tagging is a required field
  16833. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16834. }
  16835. // String returns the string representation
  16836. func (s PutBucketTaggingInput) String() string {
  16837. return awsutil.Prettify(s)
  16838. }
  16839. // GoString returns the string representation
  16840. func (s PutBucketTaggingInput) GoString() string {
  16841. return s.String()
  16842. }
  16843. // Validate inspects the fields of the type to determine if they are valid.
  16844. func (s *PutBucketTaggingInput) Validate() error {
  16845. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  16846. if s.Bucket == nil {
  16847. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16848. }
  16849. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16850. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16851. }
  16852. if s.Tagging == nil {
  16853. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  16854. }
  16855. if s.Tagging != nil {
  16856. if err := s.Tagging.Validate(); err != nil {
  16857. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  16858. }
  16859. }
  16860. if invalidParams.Len() > 0 {
  16861. return invalidParams
  16862. }
  16863. return nil
  16864. }
  16865. // SetBucket sets the Bucket field's value.
  16866. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  16867. s.Bucket = &v
  16868. return s
  16869. }
  16870. func (s *PutBucketTaggingInput) getBucket() (v string) {
  16871. if s.Bucket == nil {
  16872. return v
  16873. }
  16874. return *s.Bucket
  16875. }
  16876. // SetTagging sets the Tagging field's value.
  16877. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  16878. s.Tagging = v
  16879. return s
  16880. }
  16881. type PutBucketTaggingOutput struct {
  16882. _ struct{} `type:"structure"`
  16883. }
  16884. // String returns the string representation
  16885. func (s PutBucketTaggingOutput) String() string {
  16886. return awsutil.Prettify(s)
  16887. }
  16888. // GoString returns the string representation
  16889. func (s PutBucketTaggingOutput) GoString() string {
  16890. return s.String()
  16891. }
  16892. type PutBucketVersioningInput struct {
  16893. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  16894. // Bucket is a required field
  16895. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16896. // The concatenation of the authentication device's serial number, a space,
  16897. // and the value that is displayed on your authentication device.
  16898. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  16899. // VersioningConfiguration is a required field
  16900. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16901. }
  16902. // String returns the string representation
  16903. func (s PutBucketVersioningInput) String() string {
  16904. return awsutil.Prettify(s)
  16905. }
  16906. // GoString returns the string representation
  16907. func (s PutBucketVersioningInput) GoString() string {
  16908. return s.String()
  16909. }
  16910. // Validate inspects the fields of the type to determine if they are valid.
  16911. func (s *PutBucketVersioningInput) Validate() error {
  16912. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  16913. if s.Bucket == nil {
  16914. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16915. }
  16916. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16917. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16918. }
  16919. if s.VersioningConfiguration == nil {
  16920. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  16921. }
  16922. if invalidParams.Len() > 0 {
  16923. return invalidParams
  16924. }
  16925. return nil
  16926. }
  16927. // SetBucket sets the Bucket field's value.
  16928. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  16929. s.Bucket = &v
  16930. return s
  16931. }
  16932. func (s *PutBucketVersioningInput) getBucket() (v string) {
  16933. if s.Bucket == nil {
  16934. return v
  16935. }
  16936. return *s.Bucket
  16937. }
  16938. // SetMFA sets the MFA field's value.
  16939. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  16940. s.MFA = &v
  16941. return s
  16942. }
  16943. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  16944. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  16945. s.VersioningConfiguration = v
  16946. return s
  16947. }
  16948. type PutBucketVersioningOutput struct {
  16949. _ struct{} `type:"structure"`
  16950. }
  16951. // String returns the string representation
  16952. func (s PutBucketVersioningOutput) String() string {
  16953. return awsutil.Prettify(s)
  16954. }
  16955. // GoString returns the string representation
  16956. func (s PutBucketVersioningOutput) GoString() string {
  16957. return s.String()
  16958. }
  16959. type PutBucketWebsiteInput struct {
  16960. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  16961. // Bucket is a required field
  16962. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16963. // WebsiteConfiguration is a required field
  16964. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16965. }
  16966. // String returns the string representation
  16967. func (s PutBucketWebsiteInput) String() string {
  16968. return awsutil.Prettify(s)
  16969. }
  16970. // GoString returns the string representation
  16971. func (s PutBucketWebsiteInput) GoString() string {
  16972. return s.String()
  16973. }
  16974. // Validate inspects the fields of the type to determine if they are valid.
  16975. func (s *PutBucketWebsiteInput) Validate() error {
  16976. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  16977. if s.Bucket == nil {
  16978. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16979. }
  16980. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16981. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16982. }
  16983. if s.WebsiteConfiguration == nil {
  16984. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  16985. }
  16986. if s.WebsiteConfiguration != nil {
  16987. if err := s.WebsiteConfiguration.Validate(); err != nil {
  16988. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  16989. }
  16990. }
  16991. if invalidParams.Len() > 0 {
  16992. return invalidParams
  16993. }
  16994. return nil
  16995. }
  16996. // SetBucket sets the Bucket field's value.
  16997. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  16998. s.Bucket = &v
  16999. return s
  17000. }
  17001. func (s *PutBucketWebsiteInput) getBucket() (v string) {
  17002. if s.Bucket == nil {
  17003. return v
  17004. }
  17005. return *s.Bucket
  17006. }
  17007. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  17008. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  17009. s.WebsiteConfiguration = v
  17010. return s
  17011. }
  17012. type PutBucketWebsiteOutput struct {
  17013. _ struct{} `type:"structure"`
  17014. }
  17015. // String returns the string representation
  17016. func (s PutBucketWebsiteOutput) String() string {
  17017. return awsutil.Prettify(s)
  17018. }
  17019. // GoString returns the string representation
  17020. func (s PutBucketWebsiteOutput) GoString() string {
  17021. return s.String()
  17022. }
  17023. type PutObjectAclInput struct {
  17024. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  17025. // The canned ACL to apply to the object.
  17026. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  17027. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17028. // Bucket is a required field
  17029. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17030. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  17031. // bucket.
  17032. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  17033. // Allows grantee to list the objects in the bucket.
  17034. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  17035. // Allows grantee to read the bucket ACL.
  17036. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  17037. // Allows grantee to create, overwrite, and delete any object in the bucket.
  17038. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  17039. // Allows grantee to write the ACL for the applicable bucket.
  17040. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  17041. // Key is a required field
  17042. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17043. // Confirms that the requester knows that she or he will be charged for the
  17044. // request. Bucket owners need not specify this parameter in their requests.
  17045. // Documentation on downloading objects from requester pays buckets can be found
  17046. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17047. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17048. // VersionId used to reference a specific version of the object.
  17049. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17050. }
  17051. // String returns the string representation
  17052. func (s PutObjectAclInput) String() string {
  17053. return awsutil.Prettify(s)
  17054. }
  17055. // GoString returns the string representation
  17056. func (s PutObjectAclInput) GoString() string {
  17057. return s.String()
  17058. }
  17059. // Validate inspects the fields of the type to determine if they are valid.
  17060. func (s *PutObjectAclInput) Validate() error {
  17061. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  17062. if s.Bucket == nil {
  17063. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17064. }
  17065. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17066. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17067. }
  17068. if s.Key == nil {
  17069. invalidParams.Add(request.NewErrParamRequired("Key"))
  17070. }
  17071. if s.Key != nil && len(*s.Key) < 1 {
  17072. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17073. }
  17074. if s.AccessControlPolicy != nil {
  17075. if err := s.AccessControlPolicy.Validate(); err != nil {
  17076. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  17077. }
  17078. }
  17079. if invalidParams.Len() > 0 {
  17080. return invalidParams
  17081. }
  17082. return nil
  17083. }
  17084. // SetACL sets the ACL field's value.
  17085. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  17086. s.ACL = &v
  17087. return s
  17088. }
  17089. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  17090. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  17091. s.AccessControlPolicy = v
  17092. return s
  17093. }
  17094. // SetBucket sets the Bucket field's value.
  17095. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  17096. s.Bucket = &v
  17097. return s
  17098. }
  17099. func (s *PutObjectAclInput) getBucket() (v string) {
  17100. if s.Bucket == nil {
  17101. return v
  17102. }
  17103. return *s.Bucket
  17104. }
  17105. // SetGrantFullControl sets the GrantFullControl field's value.
  17106. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  17107. s.GrantFullControl = &v
  17108. return s
  17109. }
  17110. // SetGrantRead sets the GrantRead field's value.
  17111. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  17112. s.GrantRead = &v
  17113. return s
  17114. }
  17115. // SetGrantReadACP sets the GrantReadACP field's value.
  17116. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  17117. s.GrantReadACP = &v
  17118. return s
  17119. }
  17120. // SetGrantWrite sets the GrantWrite field's value.
  17121. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  17122. s.GrantWrite = &v
  17123. return s
  17124. }
  17125. // SetGrantWriteACP sets the GrantWriteACP field's value.
  17126. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  17127. s.GrantWriteACP = &v
  17128. return s
  17129. }
  17130. // SetKey sets the Key field's value.
  17131. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  17132. s.Key = &v
  17133. return s
  17134. }
  17135. // SetRequestPayer sets the RequestPayer field's value.
  17136. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  17137. s.RequestPayer = &v
  17138. return s
  17139. }
  17140. // SetVersionId sets the VersionId field's value.
  17141. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  17142. s.VersionId = &v
  17143. return s
  17144. }
  17145. type PutObjectAclOutput struct {
  17146. _ struct{} `type:"structure"`
  17147. // If present, indicates that the requester was successfully charged for the
  17148. // request.
  17149. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17150. }
  17151. // String returns the string representation
  17152. func (s PutObjectAclOutput) String() string {
  17153. return awsutil.Prettify(s)
  17154. }
  17155. // GoString returns the string representation
  17156. func (s PutObjectAclOutput) GoString() string {
  17157. return s.String()
  17158. }
  17159. // SetRequestCharged sets the RequestCharged field's value.
  17160. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  17161. s.RequestCharged = &v
  17162. return s
  17163. }
  17164. type PutObjectInput struct {
  17165. _ struct{} `type:"structure" payload:"Body"`
  17166. // The canned ACL to apply to the object.
  17167. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  17168. // Object data.
  17169. Body io.ReadSeeker `type:"blob"`
  17170. // Name of the bucket to which the PUT operation was initiated.
  17171. //
  17172. // Bucket is a required field
  17173. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17174. // Specifies caching behavior along the request/reply chain.
  17175. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  17176. // Specifies presentational information for the object.
  17177. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  17178. // Specifies what content encodings have been applied to the object and thus
  17179. // what decoding mechanisms must be applied to obtain the media-type referenced
  17180. // by the Content-Type header field.
  17181. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  17182. // The language the content is in.
  17183. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  17184. // Size of the body in bytes. This parameter is useful when the size of the
  17185. // body cannot be determined automatically.
  17186. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  17187. // The base64-encoded 128-bit MD5 digest of the part data. This parameter is
  17188. // auto-populated when using the command from the CLI
  17189. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  17190. // A standard MIME type describing the format of the object data.
  17191. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  17192. // The date and time at which the object is no longer cacheable.
  17193. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  17194. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  17195. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  17196. // Allows grantee to read the object data and its metadata.
  17197. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  17198. // Allows grantee to read the object ACL.
  17199. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  17200. // Allows grantee to write the ACL for the applicable object.
  17201. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  17202. // Object key for which the PUT operation was initiated.
  17203. //
  17204. // Key is a required field
  17205. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17206. // A map of metadata to store with the object in S3.
  17207. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  17208. // The Legal Hold status that you want to apply to the specified object.
  17209. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  17210. // The Object Lock mode that you want to apply to this object.
  17211. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  17212. // The date and time when you want this object's Object Lock to expire.
  17213. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  17214. // Confirms that the requester knows that she or he will be charged for the
  17215. // request. Bucket owners need not specify this parameter in their requests.
  17216. // Documentation on downloading objects from requester pays buckets can be found
  17217. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17218. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17219. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  17220. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17221. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  17222. // data. This value is used to store the object and then it is discarded; Amazon
  17223. // does not store the encryption key. The key must be appropriate for use with
  17224. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  17225. // header.
  17226. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  17227. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17228. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17229. // key was transmitted without error.
  17230. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17231. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  17232. // requests for an object protected by AWS KMS will fail if not made via SSL
  17233. // or using SigV4. Documentation on configuring any of the officially supported
  17234. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  17235. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  17236. // The Server-side encryption algorithm used when storing this object in S3
  17237. // (e.g., AES256, aws:kms).
  17238. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17239. // The type of storage to use for the object. Defaults to 'STANDARD'.
  17240. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  17241. // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
  17242. // (For example, "Key1=Value1")
  17243. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  17244. // If the bucket is configured as a website, redirects requests for this object
  17245. // to another object in the same bucket or to an external URL. Amazon S3 stores
  17246. // the value of this header in the object metadata.
  17247. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  17248. }
  17249. // String returns the string representation
  17250. func (s PutObjectInput) String() string {
  17251. return awsutil.Prettify(s)
  17252. }
  17253. // GoString returns the string representation
  17254. func (s PutObjectInput) GoString() string {
  17255. return s.String()
  17256. }
  17257. // Validate inspects the fields of the type to determine if they are valid.
  17258. func (s *PutObjectInput) Validate() error {
  17259. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  17260. if s.Bucket == nil {
  17261. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17262. }
  17263. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17264. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17265. }
  17266. if s.Key == nil {
  17267. invalidParams.Add(request.NewErrParamRequired("Key"))
  17268. }
  17269. if s.Key != nil && len(*s.Key) < 1 {
  17270. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17271. }
  17272. if invalidParams.Len() > 0 {
  17273. return invalidParams
  17274. }
  17275. return nil
  17276. }
  17277. // SetACL sets the ACL field's value.
  17278. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  17279. s.ACL = &v
  17280. return s
  17281. }
  17282. // SetBody sets the Body field's value.
  17283. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  17284. s.Body = v
  17285. return s
  17286. }
  17287. // SetBucket sets the Bucket field's value.
  17288. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  17289. s.Bucket = &v
  17290. return s
  17291. }
  17292. func (s *PutObjectInput) getBucket() (v string) {
  17293. if s.Bucket == nil {
  17294. return v
  17295. }
  17296. return *s.Bucket
  17297. }
  17298. // SetCacheControl sets the CacheControl field's value.
  17299. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  17300. s.CacheControl = &v
  17301. return s
  17302. }
  17303. // SetContentDisposition sets the ContentDisposition field's value.
  17304. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  17305. s.ContentDisposition = &v
  17306. return s
  17307. }
  17308. // SetContentEncoding sets the ContentEncoding field's value.
  17309. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  17310. s.ContentEncoding = &v
  17311. return s
  17312. }
  17313. // SetContentLanguage sets the ContentLanguage field's value.
  17314. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  17315. s.ContentLanguage = &v
  17316. return s
  17317. }
  17318. // SetContentLength sets the ContentLength field's value.
  17319. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  17320. s.ContentLength = &v
  17321. return s
  17322. }
  17323. // SetContentMD5 sets the ContentMD5 field's value.
  17324. func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
  17325. s.ContentMD5 = &v
  17326. return s
  17327. }
  17328. // SetContentType sets the ContentType field's value.
  17329. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  17330. s.ContentType = &v
  17331. return s
  17332. }
  17333. // SetExpires sets the Expires field's value.
  17334. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  17335. s.Expires = &v
  17336. return s
  17337. }
  17338. // SetGrantFullControl sets the GrantFullControl field's value.
  17339. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  17340. s.GrantFullControl = &v
  17341. return s
  17342. }
  17343. // SetGrantRead sets the GrantRead field's value.
  17344. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  17345. s.GrantRead = &v
  17346. return s
  17347. }
  17348. // SetGrantReadACP sets the GrantReadACP field's value.
  17349. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  17350. s.GrantReadACP = &v
  17351. return s
  17352. }
  17353. // SetGrantWriteACP sets the GrantWriteACP field's value.
  17354. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  17355. s.GrantWriteACP = &v
  17356. return s
  17357. }
  17358. // SetKey sets the Key field's value.
  17359. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  17360. s.Key = &v
  17361. return s
  17362. }
  17363. // SetMetadata sets the Metadata field's value.
  17364. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  17365. s.Metadata = v
  17366. return s
  17367. }
  17368. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  17369. func (s *PutObjectInput) SetObjectLockLegalHoldStatus(v string) *PutObjectInput {
  17370. s.ObjectLockLegalHoldStatus = &v
  17371. return s
  17372. }
  17373. // SetObjectLockMode sets the ObjectLockMode field's value.
  17374. func (s *PutObjectInput) SetObjectLockMode(v string) *PutObjectInput {
  17375. s.ObjectLockMode = &v
  17376. return s
  17377. }
  17378. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  17379. func (s *PutObjectInput) SetObjectLockRetainUntilDate(v time.Time) *PutObjectInput {
  17380. s.ObjectLockRetainUntilDate = &v
  17381. return s
  17382. }
  17383. // SetRequestPayer sets the RequestPayer field's value.
  17384. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  17385. s.RequestPayer = &v
  17386. return s
  17387. }
  17388. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17389. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  17390. s.SSECustomerAlgorithm = &v
  17391. return s
  17392. }
  17393. // SetSSECustomerKey sets the SSECustomerKey field's value.
  17394. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  17395. s.SSECustomerKey = &v
  17396. return s
  17397. }
  17398. func (s *PutObjectInput) getSSECustomerKey() (v string) {
  17399. if s.SSECustomerKey == nil {
  17400. return v
  17401. }
  17402. return *s.SSECustomerKey
  17403. }
  17404. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17405. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  17406. s.SSECustomerKeyMD5 = &v
  17407. return s
  17408. }
  17409. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17410. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  17411. s.SSEKMSKeyId = &v
  17412. return s
  17413. }
  17414. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17415. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  17416. s.ServerSideEncryption = &v
  17417. return s
  17418. }
  17419. // SetStorageClass sets the StorageClass field's value.
  17420. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  17421. s.StorageClass = &v
  17422. return s
  17423. }
  17424. // SetTagging sets the Tagging field's value.
  17425. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  17426. s.Tagging = &v
  17427. return s
  17428. }
  17429. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  17430. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  17431. s.WebsiteRedirectLocation = &v
  17432. return s
  17433. }
  17434. type PutObjectLegalHoldInput struct {
  17435. _ struct{} `type:"structure" payload:"LegalHold"`
  17436. // The bucket containing the object that you want to place a Legal Hold on.
  17437. //
  17438. // Bucket is a required field
  17439. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17440. // The key name for the object that you want to place a Legal Hold on.
  17441. //
  17442. // Key is a required field
  17443. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17444. // Container element for the Legal Hold configuration you want to apply to the
  17445. // specified object.
  17446. LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17447. // Confirms that the requester knows that she or he will be charged for the
  17448. // request. Bucket owners need not specify this parameter in their requests.
  17449. // Documentation on downloading objects from requester pays buckets can be found
  17450. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17451. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17452. // The version ID of the object that you want to place a Legal Hold on.
  17453. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17454. }
  17455. // String returns the string representation
  17456. func (s PutObjectLegalHoldInput) String() string {
  17457. return awsutil.Prettify(s)
  17458. }
  17459. // GoString returns the string representation
  17460. func (s PutObjectLegalHoldInput) GoString() string {
  17461. return s.String()
  17462. }
  17463. // Validate inspects the fields of the type to determine if they are valid.
  17464. func (s *PutObjectLegalHoldInput) Validate() error {
  17465. invalidParams := request.ErrInvalidParams{Context: "PutObjectLegalHoldInput"}
  17466. if s.Bucket == nil {
  17467. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17468. }
  17469. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17470. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17471. }
  17472. if s.Key == nil {
  17473. invalidParams.Add(request.NewErrParamRequired("Key"))
  17474. }
  17475. if s.Key != nil && len(*s.Key) < 1 {
  17476. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17477. }
  17478. if invalidParams.Len() > 0 {
  17479. return invalidParams
  17480. }
  17481. return nil
  17482. }
  17483. // SetBucket sets the Bucket field's value.
  17484. func (s *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput {
  17485. s.Bucket = &v
  17486. return s
  17487. }
  17488. func (s *PutObjectLegalHoldInput) getBucket() (v string) {
  17489. if s.Bucket == nil {
  17490. return v
  17491. }
  17492. return *s.Bucket
  17493. }
  17494. // SetKey sets the Key field's value.
  17495. func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput {
  17496. s.Key = &v
  17497. return s
  17498. }
  17499. // SetLegalHold sets the LegalHold field's value.
  17500. func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput {
  17501. s.LegalHold = v
  17502. return s
  17503. }
  17504. // SetRequestPayer sets the RequestPayer field's value.
  17505. func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput {
  17506. s.RequestPayer = &v
  17507. return s
  17508. }
  17509. // SetVersionId sets the VersionId field's value.
  17510. func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput {
  17511. s.VersionId = &v
  17512. return s
  17513. }
  17514. type PutObjectLegalHoldOutput struct {
  17515. _ struct{} `type:"structure"`
  17516. // If present, indicates that the requester was successfully charged for the
  17517. // request.
  17518. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17519. }
  17520. // String returns the string representation
  17521. func (s PutObjectLegalHoldOutput) String() string {
  17522. return awsutil.Prettify(s)
  17523. }
  17524. // GoString returns the string representation
  17525. func (s PutObjectLegalHoldOutput) GoString() string {
  17526. return s.String()
  17527. }
  17528. // SetRequestCharged sets the RequestCharged field's value.
  17529. func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput {
  17530. s.RequestCharged = &v
  17531. return s
  17532. }
  17533. type PutObjectLockConfigurationInput struct {
  17534. _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
  17535. // The bucket whose Object Lock configuration you want to create or replace.
  17536. //
  17537. // Bucket is a required field
  17538. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17539. // The Object Lock configuration that you want to apply to the specified bucket.
  17540. ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17541. // Confirms that the requester knows that she or he will be charged for the
  17542. // request. Bucket owners need not specify this parameter in their requests.
  17543. // Documentation on downloading objects from requester pays buckets can be found
  17544. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17545. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17546. // A token to allow Object Lock to be enabled for an existing bucket.
  17547. Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
  17548. }
  17549. // String returns the string representation
  17550. func (s PutObjectLockConfigurationInput) String() string {
  17551. return awsutil.Prettify(s)
  17552. }
  17553. // GoString returns the string representation
  17554. func (s PutObjectLockConfigurationInput) GoString() string {
  17555. return s.String()
  17556. }
  17557. // Validate inspects the fields of the type to determine if they are valid.
  17558. func (s *PutObjectLockConfigurationInput) Validate() error {
  17559. invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"}
  17560. if s.Bucket == nil {
  17561. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17562. }
  17563. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17564. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17565. }
  17566. if invalidParams.Len() > 0 {
  17567. return invalidParams
  17568. }
  17569. return nil
  17570. }
  17571. // SetBucket sets the Bucket field's value.
  17572. func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput {
  17573. s.Bucket = &v
  17574. return s
  17575. }
  17576. func (s *PutObjectLockConfigurationInput) getBucket() (v string) {
  17577. if s.Bucket == nil {
  17578. return v
  17579. }
  17580. return *s.Bucket
  17581. }
  17582. // SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
  17583. func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput {
  17584. s.ObjectLockConfiguration = v
  17585. return s
  17586. }
  17587. // SetRequestPayer sets the RequestPayer field's value.
  17588. func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput {
  17589. s.RequestPayer = &v
  17590. return s
  17591. }
  17592. // SetToken sets the Token field's value.
  17593. func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput {
  17594. s.Token = &v
  17595. return s
  17596. }
  17597. type PutObjectLockConfigurationOutput struct {
  17598. _ struct{} `type:"structure"`
  17599. // If present, indicates that the requester was successfully charged for the
  17600. // request.
  17601. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17602. }
  17603. // String returns the string representation
  17604. func (s PutObjectLockConfigurationOutput) String() string {
  17605. return awsutil.Prettify(s)
  17606. }
  17607. // GoString returns the string representation
  17608. func (s PutObjectLockConfigurationOutput) GoString() string {
  17609. return s.String()
  17610. }
  17611. // SetRequestCharged sets the RequestCharged field's value.
  17612. func (s *PutObjectLockConfigurationOutput) SetRequestCharged(v string) *PutObjectLockConfigurationOutput {
  17613. s.RequestCharged = &v
  17614. return s
  17615. }
  17616. type PutObjectOutput struct {
  17617. _ struct{} `type:"structure"`
  17618. // Entity tag for the uploaded object.
  17619. ETag *string `location:"header" locationName:"ETag" type:"string"`
  17620. // If the object expiration is configured, this will contain the expiration
  17621. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  17622. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  17623. // If present, indicates that the requester was successfully charged for the
  17624. // request.
  17625. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17626. // If server-side encryption with a customer-provided encryption key was requested,
  17627. // the response will include this header confirming the encryption algorithm
  17628. // used.
  17629. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17630. // If server-side encryption with a customer-provided encryption key was requested,
  17631. // the response will include this header to provide round trip message integrity
  17632. // verification of the customer-provided encryption key.
  17633. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17634. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  17635. // encryption key that was used for the object.
  17636. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  17637. // The Server-side encryption algorithm used when storing this object in S3
  17638. // (e.g., AES256, aws:kms).
  17639. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17640. // Version of the object.
  17641. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  17642. }
  17643. // String returns the string representation
  17644. func (s PutObjectOutput) String() string {
  17645. return awsutil.Prettify(s)
  17646. }
  17647. // GoString returns the string representation
  17648. func (s PutObjectOutput) GoString() string {
  17649. return s.String()
  17650. }
  17651. // SetETag sets the ETag field's value.
  17652. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  17653. s.ETag = &v
  17654. return s
  17655. }
  17656. // SetExpiration sets the Expiration field's value.
  17657. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  17658. s.Expiration = &v
  17659. return s
  17660. }
  17661. // SetRequestCharged sets the RequestCharged field's value.
  17662. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  17663. s.RequestCharged = &v
  17664. return s
  17665. }
  17666. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17667. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  17668. s.SSECustomerAlgorithm = &v
  17669. return s
  17670. }
  17671. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17672. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  17673. s.SSECustomerKeyMD5 = &v
  17674. return s
  17675. }
  17676. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17677. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  17678. s.SSEKMSKeyId = &v
  17679. return s
  17680. }
  17681. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17682. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  17683. s.ServerSideEncryption = &v
  17684. return s
  17685. }
  17686. // SetVersionId sets the VersionId field's value.
  17687. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  17688. s.VersionId = &v
  17689. return s
  17690. }
  17691. type PutObjectRetentionInput struct {
  17692. _ struct{} `type:"structure" payload:"Retention"`
  17693. // The bucket that contains the object you want to apply this Object Retention
  17694. // configuration to.
  17695. //
  17696. // Bucket is a required field
  17697. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17698. // Indicates whether this operation should bypass Governance-mode restrictions.j
  17699. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  17700. // The key name for the object that you want to apply this Object Retention
  17701. // configuration to.
  17702. //
  17703. // Key is a required field
  17704. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17705. // Confirms that the requester knows that she or he will be charged for the
  17706. // request. Bucket owners need not specify this parameter in their requests.
  17707. // Documentation on downloading objects from requester pays buckets can be found
  17708. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17709. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17710. // The container element for the Object Retention configuration.
  17711. Retention *ObjectLockRetention `locationName:"Retention" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17712. // The version ID for the object that you want to apply this Object Retention
  17713. // configuration to.
  17714. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17715. }
  17716. // String returns the string representation
  17717. func (s PutObjectRetentionInput) String() string {
  17718. return awsutil.Prettify(s)
  17719. }
  17720. // GoString returns the string representation
  17721. func (s PutObjectRetentionInput) GoString() string {
  17722. return s.String()
  17723. }
  17724. // Validate inspects the fields of the type to determine if they are valid.
  17725. func (s *PutObjectRetentionInput) Validate() error {
  17726. invalidParams := request.ErrInvalidParams{Context: "PutObjectRetentionInput"}
  17727. if s.Bucket == nil {
  17728. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17729. }
  17730. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17731. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17732. }
  17733. if s.Key == nil {
  17734. invalidParams.Add(request.NewErrParamRequired("Key"))
  17735. }
  17736. if s.Key != nil && len(*s.Key) < 1 {
  17737. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17738. }
  17739. if invalidParams.Len() > 0 {
  17740. return invalidParams
  17741. }
  17742. return nil
  17743. }
  17744. // SetBucket sets the Bucket field's value.
  17745. func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput {
  17746. s.Bucket = &v
  17747. return s
  17748. }
  17749. func (s *PutObjectRetentionInput) getBucket() (v string) {
  17750. if s.Bucket == nil {
  17751. return v
  17752. }
  17753. return *s.Bucket
  17754. }
  17755. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  17756. func (s *PutObjectRetentionInput) SetBypassGovernanceRetention(v bool) *PutObjectRetentionInput {
  17757. s.BypassGovernanceRetention = &v
  17758. return s
  17759. }
  17760. // SetKey sets the Key field's value.
  17761. func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput {
  17762. s.Key = &v
  17763. return s
  17764. }
  17765. // SetRequestPayer sets the RequestPayer field's value.
  17766. func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput {
  17767. s.RequestPayer = &v
  17768. return s
  17769. }
  17770. // SetRetention sets the Retention field's value.
  17771. func (s *PutObjectRetentionInput) SetRetention(v *ObjectLockRetention) *PutObjectRetentionInput {
  17772. s.Retention = v
  17773. return s
  17774. }
  17775. // SetVersionId sets the VersionId field's value.
  17776. func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInput {
  17777. s.VersionId = &v
  17778. return s
  17779. }
  17780. type PutObjectRetentionOutput struct {
  17781. _ struct{} `type:"structure"`
  17782. // If present, indicates that the requester was successfully charged for the
  17783. // request.
  17784. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17785. }
  17786. // String returns the string representation
  17787. func (s PutObjectRetentionOutput) String() string {
  17788. return awsutil.Prettify(s)
  17789. }
  17790. // GoString returns the string representation
  17791. func (s PutObjectRetentionOutput) GoString() string {
  17792. return s.String()
  17793. }
  17794. // SetRequestCharged sets the RequestCharged field's value.
  17795. func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetentionOutput {
  17796. s.RequestCharged = &v
  17797. return s
  17798. }
  17799. type PutObjectTaggingInput struct {
  17800. _ struct{} `type:"structure" payload:"Tagging"`
  17801. // Bucket is a required field
  17802. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17803. // Key is a required field
  17804. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17805. // Tagging is a required field
  17806. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17807. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17808. }
  17809. // String returns the string representation
  17810. func (s PutObjectTaggingInput) String() string {
  17811. return awsutil.Prettify(s)
  17812. }
  17813. // GoString returns the string representation
  17814. func (s PutObjectTaggingInput) GoString() string {
  17815. return s.String()
  17816. }
  17817. // Validate inspects the fields of the type to determine if they are valid.
  17818. func (s *PutObjectTaggingInput) Validate() error {
  17819. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  17820. if s.Bucket == nil {
  17821. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17822. }
  17823. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17824. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17825. }
  17826. if s.Key == nil {
  17827. invalidParams.Add(request.NewErrParamRequired("Key"))
  17828. }
  17829. if s.Key != nil && len(*s.Key) < 1 {
  17830. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17831. }
  17832. if s.Tagging == nil {
  17833. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  17834. }
  17835. if s.Tagging != nil {
  17836. if err := s.Tagging.Validate(); err != nil {
  17837. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  17838. }
  17839. }
  17840. if invalidParams.Len() > 0 {
  17841. return invalidParams
  17842. }
  17843. return nil
  17844. }
  17845. // SetBucket sets the Bucket field's value.
  17846. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  17847. s.Bucket = &v
  17848. return s
  17849. }
  17850. func (s *PutObjectTaggingInput) getBucket() (v string) {
  17851. if s.Bucket == nil {
  17852. return v
  17853. }
  17854. return *s.Bucket
  17855. }
  17856. // SetKey sets the Key field's value.
  17857. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  17858. s.Key = &v
  17859. return s
  17860. }
  17861. // SetTagging sets the Tagging field's value.
  17862. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  17863. s.Tagging = v
  17864. return s
  17865. }
  17866. // SetVersionId sets the VersionId field's value.
  17867. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  17868. s.VersionId = &v
  17869. return s
  17870. }
  17871. type PutObjectTaggingOutput struct {
  17872. _ struct{} `type:"structure"`
  17873. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  17874. }
  17875. // String returns the string representation
  17876. func (s PutObjectTaggingOutput) String() string {
  17877. return awsutil.Prettify(s)
  17878. }
  17879. // GoString returns the string representation
  17880. func (s PutObjectTaggingOutput) GoString() string {
  17881. return s.String()
  17882. }
  17883. // SetVersionId sets the VersionId field's value.
  17884. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  17885. s.VersionId = &v
  17886. return s
  17887. }
  17888. type PutPublicAccessBlockInput struct {
  17889. _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
  17890. // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
  17891. // want to set.
  17892. //
  17893. // Bucket is a required field
  17894. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17895. // The PublicAccessBlock configuration that you want to apply to this Amazon
  17896. // S3 bucket. You can enable the configuration options in any combination. For
  17897. // more information about when Amazon S3 considers a bucket or object public,
  17898. // 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)
  17899. // in the Amazon Simple Storage Service Developer Guide.
  17900. //
  17901. // PublicAccessBlockConfiguration is a required field
  17902. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17903. }
  17904. // String returns the string representation
  17905. func (s PutPublicAccessBlockInput) String() string {
  17906. return awsutil.Prettify(s)
  17907. }
  17908. // GoString returns the string representation
  17909. func (s PutPublicAccessBlockInput) GoString() string {
  17910. return s.String()
  17911. }
  17912. // Validate inspects the fields of the type to determine if they are valid.
  17913. func (s *PutPublicAccessBlockInput) Validate() error {
  17914. invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"}
  17915. if s.Bucket == nil {
  17916. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17917. }
  17918. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17919. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17920. }
  17921. if s.PublicAccessBlockConfiguration == nil {
  17922. invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration"))
  17923. }
  17924. if invalidParams.Len() > 0 {
  17925. return invalidParams
  17926. }
  17927. return nil
  17928. }
  17929. // SetBucket sets the Bucket field's value.
  17930. func (s *PutPublicAccessBlockInput) SetBucket(v string) *PutPublicAccessBlockInput {
  17931. s.Bucket = &v
  17932. return s
  17933. }
  17934. func (s *PutPublicAccessBlockInput) getBucket() (v string) {
  17935. if s.Bucket == nil {
  17936. return v
  17937. }
  17938. return *s.Bucket
  17939. }
  17940. // SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
  17941. func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput {
  17942. s.PublicAccessBlockConfiguration = v
  17943. return s
  17944. }
  17945. type PutPublicAccessBlockOutput struct {
  17946. _ struct{} `type:"structure"`
  17947. }
  17948. // String returns the string representation
  17949. func (s PutPublicAccessBlockOutput) String() string {
  17950. return awsutil.Prettify(s)
  17951. }
  17952. // GoString returns the string representation
  17953. func (s PutPublicAccessBlockOutput) GoString() string {
  17954. return s.String()
  17955. }
  17956. // A container for specifying the configuration for publication of messages
  17957. // to an Amazon Simple Queue Service (Amazon SQS) queue.when Amazon S3 detects
  17958. // specified events.
  17959. type QueueConfiguration struct {
  17960. _ struct{} `type:"structure"`
  17961. // Events is a required field
  17962. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  17963. // A container for object key name filtering rules. For information about key
  17964. // name filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  17965. // in the Amazon Simple Storage Service Developer Guide.
  17966. Filter *NotificationConfigurationFilter `type:"structure"`
  17967. // An optional unique identifier for configurations in a notification configuration.
  17968. // If you don't provide one, Amazon S3 will assign an ID.
  17969. Id *string `type:"string"`
  17970. // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3
  17971. // will publish a message when it detects events of the specified type.
  17972. //
  17973. // QueueArn is a required field
  17974. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  17975. }
  17976. // String returns the string representation
  17977. func (s QueueConfiguration) String() string {
  17978. return awsutil.Prettify(s)
  17979. }
  17980. // GoString returns the string representation
  17981. func (s QueueConfiguration) GoString() string {
  17982. return s.String()
  17983. }
  17984. // Validate inspects the fields of the type to determine if they are valid.
  17985. func (s *QueueConfiguration) Validate() error {
  17986. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  17987. if s.Events == nil {
  17988. invalidParams.Add(request.NewErrParamRequired("Events"))
  17989. }
  17990. if s.QueueArn == nil {
  17991. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  17992. }
  17993. if invalidParams.Len() > 0 {
  17994. return invalidParams
  17995. }
  17996. return nil
  17997. }
  17998. // SetEvents sets the Events field's value.
  17999. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  18000. s.Events = v
  18001. return s
  18002. }
  18003. // SetFilter sets the Filter field's value.
  18004. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  18005. s.Filter = v
  18006. return s
  18007. }
  18008. // SetId sets the Id field's value.
  18009. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  18010. s.Id = &v
  18011. return s
  18012. }
  18013. // SetQueueArn sets the QueueArn field's value.
  18014. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  18015. s.QueueArn = &v
  18016. return s
  18017. }
  18018. type QueueConfigurationDeprecated struct {
  18019. _ struct{} `type:"structure"`
  18020. // The bucket event for which to send notifications.
  18021. //
  18022. // Deprecated: Event has been deprecated
  18023. Event *string `deprecated:"true" type:"string" enum:"Event"`
  18024. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  18025. // An optional unique identifier for configurations in a notification configuration.
  18026. // If you don't provide one, Amazon S3 will assign an ID.
  18027. Id *string `type:"string"`
  18028. Queue *string `type:"string"`
  18029. }
  18030. // String returns the string representation
  18031. func (s QueueConfigurationDeprecated) String() string {
  18032. return awsutil.Prettify(s)
  18033. }
  18034. // GoString returns the string representation
  18035. func (s QueueConfigurationDeprecated) GoString() string {
  18036. return s.String()
  18037. }
  18038. // SetEvent sets the Event field's value.
  18039. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  18040. s.Event = &v
  18041. return s
  18042. }
  18043. // SetEvents sets the Events field's value.
  18044. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  18045. s.Events = v
  18046. return s
  18047. }
  18048. // SetId sets the Id field's value.
  18049. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  18050. s.Id = &v
  18051. return s
  18052. }
  18053. // SetQueue sets the Queue field's value.
  18054. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  18055. s.Queue = &v
  18056. return s
  18057. }
  18058. type RecordsEvent struct {
  18059. _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"`
  18060. // The byte array of partial, one or more result records.
  18061. //
  18062. // Payload is automatically base64 encoded/decoded by the SDK.
  18063. Payload []byte `type:"blob"`
  18064. }
  18065. // String returns the string representation
  18066. func (s RecordsEvent) String() string {
  18067. return awsutil.Prettify(s)
  18068. }
  18069. // GoString returns the string representation
  18070. func (s RecordsEvent) GoString() string {
  18071. return s.String()
  18072. }
  18073. // SetPayload sets the Payload field's value.
  18074. func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent {
  18075. s.Payload = v
  18076. return s
  18077. }
  18078. // The RecordsEvent is and event in the SelectObjectContentEventStream group of events.
  18079. func (s *RecordsEvent) eventSelectObjectContentEventStream() {}
  18080. // UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value.
  18081. // This method is only used internally within the SDK's EventStream handling.
  18082. func (s *RecordsEvent) UnmarshalEvent(
  18083. payloadUnmarshaler protocol.PayloadUnmarshaler,
  18084. msg eventstream.Message,
  18085. ) error {
  18086. s.Payload = make([]byte, len(msg.Payload))
  18087. copy(s.Payload, msg.Payload)
  18088. return nil
  18089. }
  18090. type Redirect struct {
  18091. _ struct{} `type:"structure"`
  18092. // The host name to use in the redirect request.
  18093. HostName *string `type:"string"`
  18094. // The HTTP redirect code to use on the response. Not required if one of the
  18095. // siblings is present.
  18096. HttpRedirectCode *string `type:"string"`
  18097. // Protocol to use (http, https) when redirecting requests. The default is the
  18098. // protocol that is used in the original request.
  18099. Protocol *string `type:"string" enum:"Protocol"`
  18100. // The object key prefix to use in the redirect request. For example, to redirect
  18101. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  18102. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  18103. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  18104. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  18105. // is not provided.
  18106. ReplaceKeyPrefixWith *string `type:"string"`
  18107. // The specific object key to use in the redirect request. For example, redirect
  18108. // request to error.html. Not required if one of the sibling is present. Can
  18109. // be present only if ReplaceKeyPrefixWith is not provided.
  18110. ReplaceKeyWith *string `type:"string"`
  18111. }
  18112. // String returns the string representation
  18113. func (s Redirect) String() string {
  18114. return awsutil.Prettify(s)
  18115. }
  18116. // GoString returns the string representation
  18117. func (s Redirect) GoString() string {
  18118. return s.String()
  18119. }
  18120. // SetHostName sets the HostName field's value.
  18121. func (s *Redirect) SetHostName(v string) *Redirect {
  18122. s.HostName = &v
  18123. return s
  18124. }
  18125. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  18126. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  18127. s.HttpRedirectCode = &v
  18128. return s
  18129. }
  18130. // SetProtocol sets the Protocol field's value.
  18131. func (s *Redirect) SetProtocol(v string) *Redirect {
  18132. s.Protocol = &v
  18133. return s
  18134. }
  18135. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  18136. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  18137. s.ReplaceKeyPrefixWith = &v
  18138. return s
  18139. }
  18140. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  18141. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  18142. s.ReplaceKeyWith = &v
  18143. return s
  18144. }
  18145. type RedirectAllRequestsTo struct {
  18146. _ struct{} `type:"structure"`
  18147. // Name of the host where requests will be redirected.
  18148. //
  18149. // HostName is a required field
  18150. HostName *string `type:"string" required:"true"`
  18151. // Protocol to use (http, https) when redirecting requests. The default is the
  18152. // protocol that is used in the original request.
  18153. Protocol *string `type:"string" enum:"Protocol"`
  18154. }
  18155. // String returns the string representation
  18156. func (s RedirectAllRequestsTo) String() string {
  18157. return awsutil.Prettify(s)
  18158. }
  18159. // GoString returns the string representation
  18160. func (s RedirectAllRequestsTo) GoString() string {
  18161. return s.String()
  18162. }
  18163. // Validate inspects the fields of the type to determine if they are valid.
  18164. func (s *RedirectAllRequestsTo) Validate() error {
  18165. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  18166. if s.HostName == nil {
  18167. invalidParams.Add(request.NewErrParamRequired("HostName"))
  18168. }
  18169. if invalidParams.Len() > 0 {
  18170. return invalidParams
  18171. }
  18172. return nil
  18173. }
  18174. // SetHostName sets the HostName field's value.
  18175. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  18176. s.HostName = &v
  18177. return s
  18178. }
  18179. // SetProtocol sets the Protocol field's value.
  18180. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  18181. s.Protocol = &v
  18182. return s
  18183. }
  18184. // A container for replication rules. You can add up to 1,000 rules. The maximum
  18185. // size of a replication configuration is 2 MB.
  18186. type ReplicationConfiguration struct {
  18187. _ struct{} `type:"structure"`
  18188. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  18189. // (IAM) role that Amazon S3 can assume when replicating the objects.
  18190. //
  18191. // Role is a required field
  18192. Role *string `type:"string" required:"true"`
  18193. // A container for one or more replication rules. A replication configuration
  18194. // must have at least one rule and can contain a maximum of 1,000 rules.
  18195. //
  18196. // Rules is a required field
  18197. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  18198. }
  18199. // String returns the string representation
  18200. func (s ReplicationConfiguration) String() string {
  18201. return awsutil.Prettify(s)
  18202. }
  18203. // GoString returns the string representation
  18204. func (s ReplicationConfiguration) GoString() string {
  18205. return s.String()
  18206. }
  18207. // Validate inspects the fields of the type to determine if they are valid.
  18208. func (s *ReplicationConfiguration) Validate() error {
  18209. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  18210. if s.Role == nil {
  18211. invalidParams.Add(request.NewErrParamRequired("Role"))
  18212. }
  18213. if s.Rules == nil {
  18214. invalidParams.Add(request.NewErrParamRequired("Rules"))
  18215. }
  18216. if s.Rules != nil {
  18217. for i, v := range s.Rules {
  18218. if v == nil {
  18219. continue
  18220. }
  18221. if err := v.Validate(); err != nil {
  18222. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  18223. }
  18224. }
  18225. }
  18226. if invalidParams.Len() > 0 {
  18227. return invalidParams
  18228. }
  18229. return nil
  18230. }
  18231. // SetRole sets the Role field's value.
  18232. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  18233. s.Role = &v
  18234. return s
  18235. }
  18236. // SetRules sets the Rules field's value.
  18237. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  18238. s.Rules = v
  18239. return s
  18240. }
  18241. // A container for information about a specific replication rule.
  18242. type ReplicationRule struct {
  18243. _ struct{} `type:"structure"`
  18244. // Specifies whether Amazon S3 should replicate delete makers.
  18245. DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"`
  18246. // A container for information about the replication destination.
  18247. //
  18248. // Destination is a required field
  18249. Destination *Destination `type:"structure" required:"true"`
  18250. // A filter that identifies the subset of objects to which the replication rule
  18251. // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
  18252. Filter *ReplicationRuleFilter `type:"structure"`
  18253. // A unique identifier for the rule. The maximum value is 255 characters.
  18254. ID *string `type:"string"`
  18255. // An object keyname prefix that identifies the object or objects to which the
  18256. // rule applies. The maximum prefix length is 1,024 characters.
  18257. //
  18258. // Deprecated: Prefix has been deprecated
  18259. Prefix *string `deprecated:"true" type:"string"`
  18260. // The priority associated with the rule. If you specify multiple rules in a
  18261. // replication configuration, Amazon S3 prioritizes the rules to prevent conflicts
  18262. // when filtering. If two or more rules identify the same object based on a
  18263. // specified filter, the rule with higher priority takes precedence. For example:
  18264. //
  18265. // * Same object quality prefix based filter criteria If prefixes you specified
  18266. // in multiple rules overlap
  18267. //
  18268. // * Same object qualify tag based filter criteria specified in multiple
  18269. // rules
  18270. //
  18271. // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  18272. // in the Amazon S3 Developer Guide.
  18273. Priority *int64 `type:"integer"`
  18274. // A container that describes additional filters for identifying the source
  18275. // objects that you want to replicate. You can choose to enable or disable the
  18276. // replication of these objects. Currently, Amazon S3 supports only the filter
  18277. // that you can specify for objects created with server-side encryption using
  18278. // an AWS KMS-Managed Key (SSE-KMS).
  18279. //
  18280. // If you want Amazon S3 to replicate objects created with server-side encryption
  18281. // using AWS KMS-Managed Keys.
  18282. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
  18283. // If status isn't enabled, the rule is ignored.
  18284. //
  18285. // Status is a required field
  18286. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  18287. }
  18288. // String returns the string representation
  18289. func (s ReplicationRule) String() string {
  18290. return awsutil.Prettify(s)
  18291. }
  18292. // GoString returns the string representation
  18293. func (s ReplicationRule) GoString() string {
  18294. return s.String()
  18295. }
  18296. // Validate inspects the fields of the type to determine if they are valid.
  18297. func (s *ReplicationRule) Validate() error {
  18298. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  18299. if s.Destination == nil {
  18300. invalidParams.Add(request.NewErrParamRequired("Destination"))
  18301. }
  18302. if s.Status == nil {
  18303. invalidParams.Add(request.NewErrParamRequired("Status"))
  18304. }
  18305. if s.Destination != nil {
  18306. if err := s.Destination.Validate(); err != nil {
  18307. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  18308. }
  18309. }
  18310. if s.Filter != nil {
  18311. if err := s.Filter.Validate(); err != nil {
  18312. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  18313. }
  18314. }
  18315. if s.SourceSelectionCriteria != nil {
  18316. if err := s.SourceSelectionCriteria.Validate(); err != nil {
  18317. invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
  18318. }
  18319. }
  18320. if invalidParams.Len() > 0 {
  18321. return invalidParams
  18322. }
  18323. return nil
  18324. }
  18325. // SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.
  18326. func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule {
  18327. s.DeleteMarkerReplication = v
  18328. return s
  18329. }
  18330. // SetDestination sets the Destination field's value.
  18331. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  18332. s.Destination = v
  18333. return s
  18334. }
  18335. // SetFilter sets the Filter field's value.
  18336. func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule {
  18337. s.Filter = v
  18338. return s
  18339. }
  18340. // SetID sets the ID field's value.
  18341. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  18342. s.ID = &v
  18343. return s
  18344. }
  18345. // SetPrefix sets the Prefix field's value.
  18346. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  18347. s.Prefix = &v
  18348. return s
  18349. }
  18350. // SetPriority sets the Priority field's value.
  18351. func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule {
  18352. s.Priority = &v
  18353. return s
  18354. }
  18355. // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
  18356. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
  18357. s.SourceSelectionCriteria = v
  18358. return s
  18359. }
  18360. // SetStatus sets the Status field's value.
  18361. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  18362. s.Status = &v
  18363. return s
  18364. }
  18365. type ReplicationRuleAndOperator struct {
  18366. _ struct{} `type:"structure"`
  18367. Prefix *string `type:"string"`
  18368. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  18369. }
  18370. // String returns the string representation
  18371. func (s ReplicationRuleAndOperator) String() string {
  18372. return awsutil.Prettify(s)
  18373. }
  18374. // GoString returns the string representation
  18375. func (s ReplicationRuleAndOperator) GoString() string {
  18376. return s.String()
  18377. }
  18378. // Validate inspects the fields of the type to determine if they are valid.
  18379. func (s *ReplicationRuleAndOperator) Validate() error {
  18380. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"}
  18381. if s.Tags != nil {
  18382. for i, v := range s.Tags {
  18383. if v == nil {
  18384. continue
  18385. }
  18386. if err := v.Validate(); err != nil {
  18387. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  18388. }
  18389. }
  18390. }
  18391. if invalidParams.Len() > 0 {
  18392. return invalidParams
  18393. }
  18394. return nil
  18395. }
  18396. // SetPrefix sets the Prefix field's value.
  18397. func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator {
  18398. s.Prefix = &v
  18399. return s
  18400. }
  18401. // SetTags sets the Tags field's value.
  18402. func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
  18403. s.Tags = v
  18404. return s
  18405. }
  18406. // A filter that identifies the subset of objects to which the replication rule
  18407. // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
  18408. type ReplicationRuleFilter struct {
  18409. _ struct{} `type:"structure"`
  18410. // A container for specifying rule filters. The filters determine the subset
  18411. // of objects to which the rule applies. This element is required only if you
  18412. // specify more than one filter. For example:
  18413. //
  18414. // * If you specify both a Prefix and a Tag filter, wrap these filters in
  18415. // an And tag.
  18416. //
  18417. // * If you specify a filter based on multiple tags, wrap the Tag elements
  18418. // in an And tag.
  18419. And *ReplicationRuleAndOperator `type:"structure"`
  18420. // An object keyname prefix that identifies the subset of objects to which the
  18421. // rule applies.
  18422. Prefix *string `type:"string"`
  18423. // A container for specifying a tag key and value.
  18424. //
  18425. // The rule applies only to objects that have the tag in their tag set.
  18426. Tag *Tag `type:"structure"`
  18427. }
  18428. // String returns the string representation
  18429. func (s ReplicationRuleFilter) String() string {
  18430. return awsutil.Prettify(s)
  18431. }
  18432. // GoString returns the string representation
  18433. func (s ReplicationRuleFilter) GoString() string {
  18434. return s.String()
  18435. }
  18436. // Validate inspects the fields of the type to determine if they are valid.
  18437. func (s *ReplicationRuleFilter) Validate() error {
  18438. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"}
  18439. if s.And != nil {
  18440. if err := s.And.Validate(); err != nil {
  18441. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  18442. }
  18443. }
  18444. if s.Tag != nil {
  18445. if err := s.Tag.Validate(); err != nil {
  18446. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  18447. }
  18448. }
  18449. if invalidParams.Len() > 0 {
  18450. return invalidParams
  18451. }
  18452. return nil
  18453. }
  18454. // SetAnd sets the And field's value.
  18455. func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter {
  18456. s.And = v
  18457. return s
  18458. }
  18459. // SetPrefix sets the Prefix field's value.
  18460. func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
  18461. s.Prefix = &v
  18462. return s
  18463. }
  18464. // SetTag sets the Tag field's value.
  18465. func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
  18466. s.Tag = v
  18467. return s
  18468. }
  18469. type RequestPaymentConfiguration struct {
  18470. _ struct{} `type:"structure"`
  18471. // Specifies who pays for the download and request fees.
  18472. //
  18473. // Payer is a required field
  18474. Payer *string `type:"string" required:"true" enum:"Payer"`
  18475. }
  18476. // String returns the string representation
  18477. func (s RequestPaymentConfiguration) String() string {
  18478. return awsutil.Prettify(s)
  18479. }
  18480. // GoString returns the string representation
  18481. func (s RequestPaymentConfiguration) GoString() string {
  18482. return s.String()
  18483. }
  18484. // Validate inspects the fields of the type to determine if they are valid.
  18485. func (s *RequestPaymentConfiguration) Validate() error {
  18486. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  18487. if s.Payer == nil {
  18488. invalidParams.Add(request.NewErrParamRequired("Payer"))
  18489. }
  18490. if invalidParams.Len() > 0 {
  18491. return invalidParams
  18492. }
  18493. return nil
  18494. }
  18495. // SetPayer sets the Payer field's value.
  18496. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  18497. s.Payer = &v
  18498. return s
  18499. }
  18500. type RequestProgress struct {
  18501. _ struct{} `type:"structure"`
  18502. // Specifies whether periodic QueryProgress frames should be sent. Valid values:
  18503. // TRUE, FALSE. Default value: FALSE.
  18504. Enabled *bool `type:"boolean"`
  18505. }
  18506. // String returns the string representation
  18507. func (s RequestProgress) String() string {
  18508. return awsutil.Prettify(s)
  18509. }
  18510. // GoString returns the string representation
  18511. func (s RequestProgress) GoString() string {
  18512. return s.String()
  18513. }
  18514. // SetEnabled sets the Enabled field's value.
  18515. func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
  18516. s.Enabled = &v
  18517. return s
  18518. }
  18519. type RestoreObjectInput struct {
  18520. _ struct{} `type:"structure" payload:"RestoreRequest"`
  18521. // Bucket is a required field
  18522. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18523. // Key is a required field
  18524. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  18525. // Confirms that the requester knows that she or he will be charged for the
  18526. // request. Bucket owners need not specify this parameter in their requests.
  18527. // Documentation on downloading objects from requester pays buckets can be found
  18528. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  18529. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  18530. // Container for restore job parameters.
  18531. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  18532. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  18533. }
  18534. // String returns the string representation
  18535. func (s RestoreObjectInput) String() string {
  18536. return awsutil.Prettify(s)
  18537. }
  18538. // GoString returns the string representation
  18539. func (s RestoreObjectInput) GoString() string {
  18540. return s.String()
  18541. }
  18542. // Validate inspects the fields of the type to determine if they are valid.
  18543. func (s *RestoreObjectInput) Validate() error {
  18544. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  18545. if s.Bucket == nil {
  18546. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18547. }
  18548. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18549. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18550. }
  18551. if s.Key == nil {
  18552. invalidParams.Add(request.NewErrParamRequired("Key"))
  18553. }
  18554. if s.Key != nil && len(*s.Key) < 1 {
  18555. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  18556. }
  18557. if s.RestoreRequest != nil {
  18558. if err := s.RestoreRequest.Validate(); err != nil {
  18559. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  18560. }
  18561. }
  18562. if invalidParams.Len() > 0 {
  18563. return invalidParams
  18564. }
  18565. return nil
  18566. }
  18567. // SetBucket sets the Bucket field's value.
  18568. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  18569. s.Bucket = &v
  18570. return s
  18571. }
  18572. func (s *RestoreObjectInput) getBucket() (v string) {
  18573. if s.Bucket == nil {
  18574. return v
  18575. }
  18576. return *s.Bucket
  18577. }
  18578. // SetKey sets the Key field's value.
  18579. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  18580. s.Key = &v
  18581. return s
  18582. }
  18583. // SetRequestPayer sets the RequestPayer field's value.
  18584. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  18585. s.RequestPayer = &v
  18586. return s
  18587. }
  18588. // SetRestoreRequest sets the RestoreRequest field's value.
  18589. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  18590. s.RestoreRequest = v
  18591. return s
  18592. }
  18593. // SetVersionId sets the VersionId field's value.
  18594. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  18595. s.VersionId = &v
  18596. return s
  18597. }
  18598. type RestoreObjectOutput struct {
  18599. _ struct{} `type:"structure"`
  18600. // If present, indicates that the requester was successfully charged for the
  18601. // request.
  18602. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  18603. // Indicates the path in the provided S3 output location where Select results
  18604. // will be restored to.
  18605. RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
  18606. }
  18607. // String returns the string representation
  18608. func (s RestoreObjectOutput) String() string {
  18609. return awsutil.Prettify(s)
  18610. }
  18611. // GoString returns the string representation
  18612. func (s RestoreObjectOutput) GoString() string {
  18613. return s.String()
  18614. }
  18615. // SetRequestCharged sets the RequestCharged field's value.
  18616. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  18617. s.RequestCharged = &v
  18618. return s
  18619. }
  18620. // SetRestoreOutputPath sets the RestoreOutputPath field's value.
  18621. func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
  18622. s.RestoreOutputPath = &v
  18623. return s
  18624. }
  18625. // Container for restore job parameters.
  18626. type RestoreRequest struct {
  18627. _ struct{} `type:"structure"`
  18628. // Lifetime of the active copy in days. Do not use with restores that specify
  18629. // OutputLocation.
  18630. Days *int64 `type:"integer"`
  18631. // The optional description for the job.
  18632. Description *string `type:"string"`
  18633. // Glacier related parameters pertaining to this job. Do not use with restores
  18634. // that specify OutputLocation.
  18635. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  18636. // Describes the location where the restore job's output is stored.
  18637. OutputLocation *OutputLocation `type:"structure"`
  18638. // Describes the parameters for Select job types.
  18639. SelectParameters *SelectParameters `type:"structure"`
  18640. // Glacier retrieval tier at which the restore will be processed.
  18641. Tier *string `type:"string" enum:"Tier"`
  18642. // Type of restore request.
  18643. Type *string `type:"string" enum:"RestoreRequestType"`
  18644. }
  18645. // String returns the string representation
  18646. func (s RestoreRequest) String() string {
  18647. return awsutil.Prettify(s)
  18648. }
  18649. // GoString returns the string representation
  18650. func (s RestoreRequest) GoString() string {
  18651. return s.String()
  18652. }
  18653. // Validate inspects the fields of the type to determine if they are valid.
  18654. func (s *RestoreRequest) Validate() error {
  18655. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  18656. if s.GlacierJobParameters != nil {
  18657. if err := s.GlacierJobParameters.Validate(); err != nil {
  18658. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  18659. }
  18660. }
  18661. if s.OutputLocation != nil {
  18662. if err := s.OutputLocation.Validate(); err != nil {
  18663. invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
  18664. }
  18665. }
  18666. if s.SelectParameters != nil {
  18667. if err := s.SelectParameters.Validate(); err != nil {
  18668. invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
  18669. }
  18670. }
  18671. if invalidParams.Len() > 0 {
  18672. return invalidParams
  18673. }
  18674. return nil
  18675. }
  18676. // SetDays sets the Days field's value.
  18677. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  18678. s.Days = &v
  18679. return s
  18680. }
  18681. // SetDescription sets the Description field's value.
  18682. func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
  18683. s.Description = &v
  18684. return s
  18685. }
  18686. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  18687. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  18688. s.GlacierJobParameters = v
  18689. return s
  18690. }
  18691. // SetOutputLocation sets the OutputLocation field's value.
  18692. func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
  18693. s.OutputLocation = v
  18694. return s
  18695. }
  18696. // SetSelectParameters sets the SelectParameters field's value.
  18697. func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
  18698. s.SelectParameters = v
  18699. return s
  18700. }
  18701. // SetTier sets the Tier field's value.
  18702. func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
  18703. s.Tier = &v
  18704. return s
  18705. }
  18706. // SetType sets the Type field's value.
  18707. func (s *RestoreRequest) SetType(v string) *RestoreRequest {
  18708. s.Type = &v
  18709. return s
  18710. }
  18711. type RoutingRule struct {
  18712. _ struct{} `type:"structure"`
  18713. // A container for describing a condition that must be met for the specified
  18714. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  18715. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  18716. // redirect request to another host where you might process the error.
  18717. Condition *Condition `type:"structure"`
  18718. // Container for redirect information. You can redirect requests to another
  18719. // host, to another page, or with another protocol. In the event of an error,
  18720. // you can specify a different error code to return.
  18721. //
  18722. // Redirect is a required field
  18723. Redirect *Redirect `type:"structure" required:"true"`
  18724. }
  18725. // String returns the string representation
  18726. func (s RoutingRule) String() string {
  18727. return awsutil.Prettify(s)
  18728. }
  18729. // GoString returns the string representation
  18730. func (s RoutingRule) GoString() string {
  18731. return s.String()
  18732. }
  18733. // Validate inspects the fields of the type to determine if they are valid.
  18734. func (s *RoutingRule) Validate() error {
  18735. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  18736. if s.Redirect == nil {
  18737. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  18738. }
  18739. if invalidParams.Len() > 0 {
  18740. return invalidParams
  18741. }
  18742. return nil
  18743. }
  18744. // SetCondition sets the Condition field's value.
  18745. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  18746. s.Condition = v
  18747. return s
  18748. }
  18749. // SetRedirect sets the Redirect field's value.
  18750. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  18751. s.Redirect = v
  18752. return s
  18753. }
  18754. type Rule struct {
  18755. _ struct{} `type:"structure"`
  18756. // Specifies the days since the initiation of an Incomplete Multipart Upload
  18757. // that Lifecycle will wait before permanently removing all parts of the upload.
  18758. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  18759. Expiration *LifecycleExpiration `type:"structure"`
  18760. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  18761. ID *string `type:"string"`
  18762. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  18763. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  18764. // configuration action on a bucket that has versioning enabled (or suspended)
  18765. // to request that Amazon S3 delete noncurrent object versions at a specific
  18766. // period in the object's lifetime.
  18767. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  18768. // Container for the transition rule that describes when noncurrent objects
  18769. // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER
  18770. // storage class. If your bucket is versioning-enabled (or versioning is suspended),
  18771. // you can set this action to request that Amazon S3 transition noncurrent object
  18772. // versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER storage
  18773. // class at a specific period in the object's lifetime.
  18774. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  18775. // Prefix identifying one or more objects to which the rule applies.
  18776. //
  18777. // Prefix is a required field
  18778. Prefix *string `type:"string" required:"true"`
  18779. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  18780. // is not currently being applied.
  18781. //
  18782. // Status is a required field
  18783. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  18784. Transition *Transition `type:"structure"`
  18785. }
  18786. // String returns the string representation
  18787. func (s Rule) String() string {
  18788. return awsutil.Prettify(s)
  18789. }
  18790. // GoString returns the string representation
  18791. func (s Rule) GoString() string {
  18792. return s.String()
  18793. }
  18794. // Validate inspects the fields of the type to determine if they are valid.
  18795. func (s *Rule) Validate() error {
  18796. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  18797. if s.Prefix == nil {
  18798. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  18799. }
  18800. if s.Status == nil {
  18801. invalidParams.Add(request.NewErrParamRequired("Status"))
  18802. }
  18803. if invalidParams.Len() > 0 {
  18804. return invalidParams
  18805. }
  18806. return nil
  18807. }
  18808. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  18809. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  18810. s.AbortIncompleteMultipartUpload = v
  18811. return s
  18812. }
  18813. // SetExpiration sets the Expiration field's value.
  18814. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  18815. s.Expiration = v
  18816. return s
  18817. }
  18818. // SetID sets the ID field's value.
  18819. func (s *Rule) SetID(v string) *Rule {
  18820. s.ID = &v
  18821. return s
  18822. }
  18823. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  18824. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  18825. s.NoncurrentVersionExpiration = v
  18826. return s
  18827. }
  18828. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  18829. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  18830. s.NoncurrentVersionTransition = v
  18831. return s
  18832. }
  18833. // SetPrefix sets the Prefix field's value.
  18834. func (s *Rule) SetPrefix(v string) *Rule {
  18835. s.Prefix = &v
  18836. return s
  18837. }
  18838. // SetStatus sets the Status field's value.
  18839. func (s *Rule) SetStatus(v string) *Rule {
  18840. s.Status = &v
  18841. return s
  18842. }
  18843. // SetTransition sets the Transition field's value.
  18844. func (s *Rule) SetTransition(v *Transition) *Rule {
  18845. s.Transition = v
  18846. return s
  18847. }
  18848. // Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
  18849. type SSEKMS struct {
  18850. _ struct{} `locationName:"SSE-KMS" type:"structure"`
  18851. // Specifies the ID of the AWS Key Management Service (KMS) master encryption
  18852. // key to use for encrypting Inventory reports.
  18853. //
  18854. // KeyId is a required field
  18855. KeyId *string `type:"string" required:"true" sensitive:"true"`
  18856. }
  18857. // String returns the string representation
  18858. func (s SSEKMS) String() string {
  18859. return awsutil.Prettify(s)
  18860. }
  18861. // GoString returns the string representation
  18862. func (s SSEKMS) GoString() string {
  18863. return s.String()
  18864. }
  18865. // Validate inspects the fields of the type to determine if they are valid.
  18866. func (s *SSEKMS) Validate() error {
  18867. invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
  18868. if s.KeyId == nil {
  18869. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  18870. }
  18871. if invalidParams.Len() > 0 {
  18872. return invalidParams
  18873. }
  18874. return nil
  18875. }
  18876. // SetKeyId sets the KeyId field's value.
  18877. func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
  18878. s.KeyId = &v
  18879. return s
  18880. }
  18881. // Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
  18882. type SSES3 struct {
  18883. _ struct{} `locationName:"SSE-S3" type:"structure"`
  18884. }
  18885. // String returns the string representation
  18886. func (s SSES3) String() string {
  18887. return awsutil.Prettify(s)
  18888. }
  18889. // GoString returns the string representation
  18890. func (s SSES3) GoString() string {
  18891. return s.String()
  18892. }
  18893. // SelectObjectContentEventStream provides handling of EventStreams for
  18894. // the SelectObjectContent API.
  18895. //
  18896. // Use this type to receive SelectObjectContentEventStream events. The events
  18897. // can be read from the Events channel member.
  18898. //
  18899. // The events that can be received are:
  18900. //
  18901. // * ContinuationEvent
  18902. // * EndEvent
  18903. // * ProgressEvent
  18904. // * RecordsEvent
  18905. // * StatsEvent
  18906. type SelectObjectContentEventStream struct {
  18907. // Reader is the EventStream reader for the SelectObjectContentEventStream
  18908. // events. This value is automatically set by the SDK when the API call is made
  18909. // Use this member when unit testing your code with the SDK to mock out the
  18910. // EventStream Reader.
  18911. //
  18912. // Must not be nil.
  18913. Reader SelectObjectContentEventStreamReader
  18914. // StreamCloser is the io.Closer for the EventStream connection. For HTTP
  18915. // EventStream this is the response Body. The stream will be closed when
  18916. // the Close method of the EventStream is called.
  18917. StreamCloser io.Closer
  18918. }
  18919. // Close closes the EventStream. This will also cause the Events channel to be
  18920. // closed. You can use the closing of the Events channel to terminate your
  18921. // application's read from the API's EventStream.
  18922. //
  18923. // Will close the underlying EventStream reader. For EventStream over HTTP
  18924. // connection this will also close the HTTP connection.
  18925. //
  18926. // Close must be called when done using the EventStream API. Not calling Close
  18927. // may result in resource leaks.
  18928. func (es *SelectObjectContentEventStream) Close() (err error) {
  18929. es.Reader.Close()
  18930. return es.Err()
  18931. }
  18932. // Err returns any error that occurred while reading EventStream Events from
  18933. // the service API's response. Returns nil if there were no errors.
  18934. func (es *SelectObjectContentEventStream) Err() error {
  18935. if err := es.Reader.Err(); err != nil {
  18936. return err
  18937. }
  18938. es.StreamCloser.Close()
  18939. return nil
  18940. }
  18941. // Events returns a channel to read EventStream Events from the
  18942. // SelectObjectContent API.
  18943. //
  18944. // These events are:
  18945. //
  18946. // * ContinuationEvent
  18947. // * EndEvent
  18948. // * ProgressEvent
  18949. // * RecordsEvent
  18950. // * StatsEvent
  18951. func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  18952. return es.Reader.Events()
  18953. }
  18954. // SelectObjectContentEventStreamEvent groups together all EventStream
  18955. // events read from the SelectObjectContent API.
  18956. //
  18957. // These events are:
  18958. //
  18959. // * ContinuationEvent
  18960. // * EndEvent
  18961. // * ProgressEvent
  18962. // * RecordsEvent
  18963. // * StatsEvent
  18964. type SelectObjectContentEventStreamEvent interface {
  18965. eventSelectObjectContentEventStream()
  18966. }
  18967. // SelectObjectContentEventStreamReader provides the interface for reading EventStream
  18968. // Events from the SelectObjectContent API. The
  18969. // default implementation for this interface will be SelectObjectContentEventStream.
  18970. //
  18971. // The reader's Close method must allow multiple concurrent calls.
  18972. //
  18973. // These events are:
  18974. //
  18975. // * ContinuationEvent
  18976. // * EndEvent
  18977. // * ProgressEvent
  18978. // * RecordsEvent
  18979. // * StatsEvent
  18980. type SelectObjectContentEventStreamReader interface {
  18981. // Returns a channel of events as they are read from the event stream.
  18982. Events() <-chan SelectObjectContentEventStreamEvent
  18983. // Close will close the underlying event stream reader. For event stream over
  18984. // HTTP this will also close the HTTP connection.
  18985. Close() error
  18986. // Returns any error that has occurred while reading from the event stream.
  18987. Err() error
  18988. }
  18989. type readSelectObjectContentEventStream struct {
  18990. eventReader *eventstreamapi.EventReader
  18991. stream chan SelectObjectContentEventStreamEvent
  18992. errVal atomic.Value
  18993. done chan struct{}
  18994. closeOnce sync.Once
  18995. }
  18996. func newReadSelectObjectContentEventStream(
  18997. reader io.ReadCloser,
  18998. unmarshalers request.HandlerList,
  18999. logger aws.Logger,
  19000. logLevel aws.LogLevelType,
  19001. ) *readSelectObjectContentEventStream {
  19002. r := &readSelectObjectContentEventStream{
  19003. stream: make(chan SelectObjectContentEventStreamEvent),
  19004. done: make(chan struct{}),
  19005. }
  19006. r.eventReader = eventstreamapi.NewEventReader(
  19007. reader,
  19008. protocol.HandlerPayloadUnmarshal{
  19009. Unmarshalers: unmarshalers,
  19010. },
  19011. r.unmarshalerForEventType,
  19012. )
  19013. r.eventReader.UseLogger(logger, logLevel)
  19014. return r
  19015. }
  19016. // Close will close the underlying event stream reader. For EventStream over
  19017. // HTTP this will also close the HTTP connection.
  19018. func (r *readSelectObjectContentEventStream) Close() error {
  19019. r.closeOnce.Do(r.safeClose)
  19020. return r.Err()
  19021. }
  19022. func (r *readSelectObjectContentEventStream) safeClose() {
  19023. close(r.done)
  19024. err := r.eventReader.Close()
  19025. if err != nil {
  19026. r.errVal.Store(err)
  19027. }
  19028. }
  19029. func (r *readSelectObjectContentEventStream) Err() error {
  19030. if v := r.errVal.Load(); v != nil {
  19031. return v.(error)
  19032. }
  19033. return nil
  19034. }
  19035. func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  19036. return r.stream
  19037. }
  19038. func (r *readSelectObjectContentEventStream) readEventStream() {
  19039. defer close(r.stream)
  19040. for {
  19041. event, err := r.eventReader.ReadEvent()
  19042. if err != nil {
  19043. if err == io.EOF {
  19044. return
  19045. }
  19046. select {
  19047. case <-r.done:
  19048. // If closed already ignore the error
  19049. return
  19050. default:
  19051. }
  19052. r.errVal.Store(err)
  19053. return
  19054. }
  19055. select {
  19056. case r.stream <- event.(SelectObjectContentEventStreamEvent):
  19057. case <-r.done:
  19058. return
  19059. }
  19060. }
  19061. }
  19062. func (r *readSelectObjectContentEventStream) unmarshalerForEventType(
  19063. eventType string,
  19064. ) (eventstreamapi.Unmarshaler, error) {
  19065. switch eventType {
  19066. case "Cont":
  19067. return &ContinuationEvent{}, nil
  19068. case "End":
  19069. return &EndEvent{}, nil
  19070. case "Progress":
  19071. return &ProgressEvent{}, nil
  19072. case "Records":
  19073. return &RecordsEvent{}, nil
  19074. case "Stats":
  19075. return &StatsEvent{}, nil
  19076. default:
  19077. return nil, awserr.New(
  19078. request.ErrCodeSerialization,
  19079. fmt.Sprintf("unknown event type name, %s, for SelectObjectContentEventStream", eventType),
  19080. nil,
  19081. )
  19082. }
  19083. }
  19084. // Request to filter the contents of an Amazon S3 object based on a simple Structured
  19085. // Query Language (SQL) statement. In the request, along with the SQL expression,
  19086. // you must specify a data serialization format (JSON or CSV) of the object.
  19087. // Amazon S3 uses this to parse object data into records. It returns only records
  19088. // that match the specified SQL expression. You must also specify the data serialization
  19089. // format for the response. For more information, see S3Select API Documentation
  19090. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
  19091. type SelectObjectContentInput struct {
  19092. _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  19093. // The S3 bucket.
  19094. //
  19095. // Bucket is a required field
  19096. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19097. // The expression that is used to query the object.
  19098. //
  19099. // Expression is a required field
  19100. Expression *string `type:"string" required:"true"`
  19101. // The type of the provided expression (for example., SQL).
  19102. //
  19103. // ExpressionType is a required field
  19104. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  19105. // Describes the format of the data in the object that is being queried.
  19106. //
  19107. // InputSerialization is a required field
  19108. InputSerialization *InputSerialization `type:"structure" required:"true"`
  19109. // The object key.
  19110. //
  19111. // Key is a required field
  19112. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19113. // Describes the format of the data that you want Amazon S3 to return in response.
  19114. //
  19115. // OutputSerialization is a required field
  19116. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  19117. // Specifies if periodic request progress information should be enabled.
  19118. RequestProgress *RequestProgress `type:"structure"`
  19119. // The SSE Algorithm used to encrypt the object. For more information, see
  19120. // Server-Side Encryption (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19121. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  19122. // The SSE Customer Key. For more information, see Server-Side Encryption (Using
  19123. // Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19124. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19125. // The SSE Customer Key MD5. For more information, see Server-Side Encryption
  19126. // (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19127. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  19128. }
  19129. // String returns the string representation
  19130. func (s SelectObjectContentInput) String() string {
  19131. return awsutil.Prettify(s)
  19132. }
  19133. // GoString returns the string representation
  19134. func (s SelectObjectContentInput) GoString() string {
  19135. return s.String()
  19136. }
  19137. // Validate inspects the fields of the type to determine if they are valid.
  19138. func (s *SelectObjectContentInput) Validate() error {
  19139. invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"}
  19140. if s.Bucket == nil {
  19141. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  19142. }
  19143. if s.Bucket != nil && len(*s.Bucket) < 1 {
  19144. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  19145. }
  19146. if s.Expression == nil {
  19147. invalidParams.Add(request.NewErrParamRequired("Expression"))
  19148. }
  19149. if s.ExpressionType == nil {
  19150. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  19151. }
  19152. if s.InputSerialization == nil {
  19153. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  19154. }
  19155. if s.Key == nil {
  19156. invalidParams.Add(request.NewErrParamRequired("Key"))
  19157. }
  19158. if s.Key != nil && len(*s.Key) < 1 {
  19159. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19160. }
  19161. if s.OutputSerialization == nil {
  19162. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  19163. }
  19164. if invalidParams.Len() > 0 {
  19165. return invalidParams
  19166. }
  19167. return nil
  19168. }
  19169. // SetBucket sets the Bucket field's value.
  19170. func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput {
  19171. s.Bucket = &v
  19172. return s
  19173. }
  19174. func (s *SelectObjectContentInput) getBucket() (v string) {
  19175. if s.Bucket == nil {
  19176. return v
  19177. }
  19178. return *s.Bucket
  19179. }
  19180. // SetExpression sets the Expression field's value.
  19181. func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput {
  19182. s.Expression = &v
  19183. return s
  19184. }
  19185. // SetExpressionType sets the ExpressionType field's value.
  19186. func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput {
  19187. s.ExpressionType = &v
  19188. return s
  19189. }
  19190. // SetInputSerialization sets the InputSerialization field's value.
  19191. func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput {
  19192. s.InputSerialization = v
  19193. return s
  19194. }
  19195. // SetKey sets the Key field's value.
  19196. func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput {
  19197. s.Key = &v
  19198. return s
  19199. }
  19200. // SetOutputSerialization sets the OutputSerialization field's value.
  19201. func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput {
  19202. s.OutputSerialization = v
  19203. return s
  19204. }
  19205. // SetRequestProgress sets the RequestProgress field's value.
  19206. func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput {
  19207. s.RequestProgress = v
  19208. return s
  19209. }
  19210. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  19211. func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput {
  19212. s.SSECustomerAlgorithm = &v
  19213. return s
  19214. }
  19215. // SetSSECustomerKey sets the SSECustomerKey field's value.
  19216. func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput {
  19217. s.SSECustomerKey = &v
  19218. return s
  19219. }
  19220. func (s *SelectObjectContentInput) getSSECustomerKey() (v string) {
  19221. if s.SSECustomerKey == nil {
  19222. return v
  19223. }
  19224. return *s.SSECustomerKey
  19225. }
  19226. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  19227. func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput {
  19228. s.SSECustomerKeyMD5 = &v
  19229. return s
  19230. }
  19231. type SelectObjectContentOutput struct {
  19232. _ struct{} `type:"structure" payload:"Payload"`
  19233. // Use EventStream to use the API's stream.
  19234. EventStream *SelectObjectContentEventStream `type:"structure"`
  19235. }
  19236. // String returns the string representation
  19237. func (s SelectObjectContentOutput) String() string {
  19238. return awsutil.Prettify(s)
  19239. }
  19240. // GoString returns the string representation
  19241. func (s SelectObjectContentOutput) GoString() string {
  19242. return s.String()
  19243. }
  19244. // SetEventStream sets the EventStream field's value.
  19245. func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
  19246. s.EventStream = v
  19247. return s
  19248. }
  19249. func (s *SelectObjectContentOutput) runEventStreamLoop(r *request.Request) {
  19250. if r.Error != nil {
  19251. return
  19252. }
  19253. reader := newReadSelectObjectContentEventStream(
  19254. r.HTTPResponse.Body,
  19255. r.Handlers.UnmarshalStream,
  19256. r.Config.Logger,
  19257. r.Config.LogLevel.Value(),
  19258. )
  19259. go reader.readEventStream()
  19260. eventStream := &SelectObjectContentEventStream{
  19261. StreamCloser: r.HTTPResponse.Body,
  19262. Reader: reader,
  19263. }
  19264. s.EventStream = eventStream
  19265. }
  19266. // Describes the parameters for Select job types.
  19267. type SelectParameters struct {
  19268. _ struct{} `type:"structure"`
  19269. // The expression that is used to query the object.
  19270. //
  19271. // Expression is a required field
  19272. Expression *string `type:"string" required:"true"`
  19273. // The type of the provided expression (e.g., SQL).
  19274. //
  19275. // ExpressionType is a required field
  19276. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  19277. // Describes the serialization format of the object.
  19278. //
  19279. // InputSerialization is a required field
  19280. InputSerialization *InputSerialization `type:"structure" required:"true"`
  19281. // Describes how the results of the Select job are serialized.
  19282. //
  19283. // OutputSerialization is a required field
  19284. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  19285. }
  19286. // String returns the string representation
  19287. func (s SelectParameters) String() string {
  19288. return awsutil.Prettify(s)
  19289. }
  19290. // GoString returns the string representation
  19291. func (s SelectParameters) GoString() string {
  19292. return s.String()
  19293. }
  19294. // Validate inspects the fields of the type to determine if they are valid.
  19295. func (s *SelectParameters) Validate() error {
  19296. invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
  19297. if s.Expression == nil {
  19298. invalidParams.Add(request.NewErrParamRequired("Expression"))
  19299. }
  19300. if s.ExpressionType == nil {
  19301. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  19302. }
  19303. if s.InputSerialization == nil {
  19304. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  19305. }
  19306. if s.OutputSerialization == nil {
  19307. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  19308. }
  19309. if invalidParams.Len() > 0 {
  19310. return invalidParams
  19311. }
  19312. return nil
  19313. }
  19314. // SetExpression sets the Expression field's value.
  19315. func (s *SelectParameters) SetExpression(v string) *SelectParameters {
  19316. s.Expression = &v
  19317. return s
  19318. }
  19319. // SetExpressionType sets the ExpressionType field's value.
  19320. func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
  19321. s.ExpressionType = &v
  19322. return s
  19323. }
  19324. // SetInputSerialization sets the InputSerialization field's value.
  19325. func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
  19326. s.InputSerialization = v
  19327. return s
  19328. }
  19329. // SetOutputSerialization sets the OutputSerialization field's value.
  19330. func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
  19331. s.OutputSerialization = v
  19332. return s
  19333. }
  19334. // Describes the default server-side encryption to apply to new objects in the
  19335. // bucket. If Put Object request does not specify any server-side encryption,
  19336. // this default encryption will be applied.
  19337. type ServerSideEncryptionByDefault struct {
  19338. _ struct{} `type:"structure"`
  19339. // KMS master key ID to use for the default encryption. This parameter is allowed
  19340. // if SSEAlgorithm is aws:kms.
  19341. KMSMasterKeyID *string `type:"string" sensitive:"true"`
  19342. // Server-side encryption algorithm to use for the default encryption.
  19343. //
  19344. // SSEAlgorithm is a required field
  19345. SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  19346. }
  19347. // String returns the string representation
  19348. func (s ServerSideEncryptionByDefault) String() string {
  19349. return awsutil.Prettify(s)
  19350. }
  19351. // GoString returns the string representation
  19352. func (s ServerSideEncryptionByDefault) GoString() string {
  19353. return s.String()
  19354. }
  19355. // Validate inspects the fields of the type to determine if they are valid.
  19356. func (s *ServerSideEncryptionByDefault) Validate() error {
  19357. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
  19358. if s.SSEAlgorithm == nil {
  19359. invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
  19360. }
  19361. if invalidParams.Len() > 0 {
  19362. return invalidParams
  19363. }
  19364. return nil
  19365. }
  19366. // SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
  19367. func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
  19368. s.KMSMasterKeyID = &v
  19369. return s
  19370. }
  19371. // SetSSEAlgorithm sets the SSEAlgorithm field's value.
  19372. func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
  19373. s.SSEAlgorithm = &v
  19374. return s
  19375. }
  19376. // Container for server-side encryption configuration rules. Currently S3 supports
  19377. // one rule only.
  19378. type ServerSideEncryptionConfiguration struct {
  19379. _ struct{} `type:"structure"`
  19380. // Container for information about a particular server-side encryption configuration
  19381. // rule.
  19382. //
  19383. // Rules is a required field
  19384. Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  19385. }
  19386. // String returns the string representation
  19387. func (s ServerSideEncryptionConfiguration) String() string {
  19388. return awsutil.Prettify(s)
  19389. }
  19390. // GoString returns the string representation
  19391. func (s ServerSideEncryptionConfiguration) GoString() string {
  19392. return s.String()
  19393. }
  19394. // Validate inspects the fields of the type to determine if they are valid.
  19395. func (s *ServerSideEncryptionConfiguration) Validate() error {
  19396. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
  19397. if s.Rules == nil {
  19398. invalidParams.Add(request.NewErrParamRequired("Rules"))
  19399. }
  19400. if s.Rules != nil {
  19401. for i, v := range s.Rules {
  19402. if v == nil {
  19403. continue
  19404. }
  19405. if err := v.Validate(); err != nil {
  19406. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  19407. }
  19408. }
  19409. }
  19410. if invalidParams.Len() > 0 {
  19411. return invalidParams
  19412. }
  19413. return nil
  19414. }
  19415. // SetRules sets the Rules field's value.
  19416. func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
  19417. s.Rules = v
  19418. return s
  19419. }
  19420. // Container for information about a particular server-side encryption configuration
  19421. // rule.
  19422. type ServerSideEncryptionRule struct {
  19423. _ struct{} `type:"structure"`
  19424. // Describes the default server-side encryption to apply to new objects in the
  19425. // bucket. If Put Object request does not specify any server-side encryption,
  19426. // this default encryption will be applied.
  19427. ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
  19428. }
  19429. // String returns the string representation
  19430. func (s ServerSideEncryptionRule) String() string {
  19431. return awsutil.Prettify(s)
  19432. }
  19433. // GoString returns the string representation
  19434. func (s ServerSideEncryptionRule) GoString() string {
  19435. return s.String()
  19436. }
  19437. // Validate inspects the fields of the type to determine if they are valid.
  19438. func (s *ServerSideEncryptionRule) Validate() error {
  19439. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
  19440. if s.ApplyServerSideEncryptionByDefault != nil {
  19441. if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
  19442. invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
  19443. }
  19444. }
  19445. if invalidParams.Len() > 0 {
  19446. return invalidParams
  19447. }
  19448. return nil
  19449. }
  19450. // SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
  19451. func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
  19452. s.ApplyServerSideEncryptionByDefault = v
  19453. return s
  19454. }
  19455. // A container for filters that define which source objects should be replicated.
  19456. type SourceSelectionCriteria struct {
  19457. _ struct{} `type:"structure"`
  19458. // A container for filter information for the selection of S3 objects encrypted
  19459. // with AWS KMS. If you include SourceSelectionCriteria in the replication configuration,
  19460. // this element is required.
  19461. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
  19462. }
  19463. // String returns the string representation
  19464. func (s SourceSelectionCriteria) String() string {
  19465. return awsutil.Prettify(s)
  19466. }
  19467. // GoString returns the string representation
  19468. func (s SourceSelectionCriteria) GoString() string {
  19469. return s.String()
  19470. }
  19471. // Validate inspects the fields of the type to determine if they are valid.
  19472. func (s *SourceSelectionCriteria) Validate() error {
  19473. invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
  19474. if s.SseKmsEncryptedObjects != nil {
  19475. if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
  19476. invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
  19477. }
  19478. }
  19479. if invalidParams.Len() > 0 {
  19480. return invalidParams
  19481. }
  19482. return nil
  19483. }
  19484. // SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
  19485. func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
  19486. s.SseKmsEncryptedObjects = v
  19487. return s
  19488. }
  19489. // A container for filter information for the selection of S3 objects encrypted
  19490. // with AWS KMS.
  19491. type SseKmsEncryptedObjects struct {
  19492. _ struct{} `type:"structure"`
  19493. // If the status is not Enabled, replication for S3 objects encrypted with AWS
  19494. // KMS is disabled.
  19495. //
  19496. // Status is a required field
  19497. Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
  19498. }
  19499. // String returns the string representation
  19500. func (s SseKmsEncryptedObjects) String() string {
  19501. return awsutil.Prettify(s)
  19502. }
  19503. // GoString returns the string representation
  19504. func (s SseKmsEncryptedObjects) GoString() string {
  19505. return s.String()
  19506. }
  19507. // Validate inspects the fields of the type to determine if they are valid.
  19508. func (s *SseKmsEncryptedObjects) Validate() error {
  19509. invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
  19510. if s.Status == nil {
  19511. invalidParams.Add(request.NewErrParamRequired("Status"))
  19512. }
  19513. if invalidParams.Len() > 0 {
  19514. return invalidParams
  19515. }
  19516. return nil
  19517. }
  19518. // SetStatus sets the Status field's value.
  19519. func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
  19520. s.Status = &v
  19521. return s
  19522. }
  19523. type Stats struct {
  19524. _ struct{} `type:"structure"`
  19525. // The total number of uncompressed object bytes processed.
  19526. BytesProcessed *int64 `type:"long"`
  19527. // The total number of bytes of records payload data returned.
  19528. BytesReturned *int64 `type:"long"`
  19529. // The total number of object bytes scanned.
  19530. BytesScanned *int64 `type:"long"`
  19531. }
  19532. // String returns the string representation
  19533. func (s Stats) String() string {
  19534. return awsutil.Prettify(s)
  19535. }
  19536. // GoString returns the string representation
  19537. func (s Stats) GoString() string {
  19538. return s.String()
  19539. }
  19540. // SetBytesProcessed sets the BytesProcessed field's value.
  19541. func (s *Stats) SetBytesProcessed(v int64) *Stats {
  19542. s.BytesProcessed = &v
  19543. return s
  19544. }
  19545. // SetBytesReturned sets the BytesReturned field's value.
  19546. func (s *Stats) SetBytesReturned(v int64) *Stats {
  19547. s.BytesReturned = &v
  19548. return s
  19549. }
  19550. // SetBytesScanned sets the BytesScanned field's value.
  19551. func (s *Stats) SetBytesScanned(v int64) *Stats {
  19552. s.BytesScanned = &v
  19553. return s
  19554. }
  19555. type StatsEvent struct {
  19556. _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"`
  19557. // The Stats event details.
  19558. Details *Stats `locationName:"Details" type:"structure"`
  19559. }
  19560. // String returns the string representation
  19561. func (s StatsEvent) String() string {
  19562. return awsutil.Prettify(s)
  19563. }
  19564. // GoString returns the string representation
  19565. func (s StatsEvent) GoString() string {
  19566. return s.String()
  19567. }
  19568. // SetDetails sets the Details field's value.
  19569. func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent {
  19570. s.Details = v
  19571. return s
  19572. }
  19573. // The StatsEvent is and event in the SelectObjectContentEventStream group of events.
  19574. func (s *StatsEvent) eventSelectObjectContentEventStream() {}
  19575. // UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value.
  19576. // This method is only used internally within the SDK's EventStream handling.
  19577. func (s *StatsEvent) UnmarshalEvent(
  19578. payloadUnmarshaler protocol.PayloadUnmarshaler,
  19579. msg eventstream.Message,
  19580. ) error {
  19581. if err := payloadUnmarshaler.UnmarshalPayload(
  19582. bytes.NewReader(msg.Payload), s,
  19583. ); err != nil {
  19584. return err
  19585. }
  19586. return nil
  19587. }
  19588. type StorageClassAnalysis struct {
  19589. _ struct{} `type:"structure"`
  19590. // A container used to describe how data related to the storage class analysis
  19591. // should be exported.
  19592. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  19593. }
  19594. // String returns the string representation
  19595. func (s StorageClassAnalysis) String() string {
  19596. return awsutil.Prettify(s)
  19597. }
  19598. // GoString returns the string representation
  19599. func (s StorageClassAnalysis) GoString() string {
  19600. return s.String()
  19601. }
  19602. // Validate inspects the fields of the type to determine if they are valid.
  19603. func (s *StorageClassAnalysis) Validate() error {
  19604. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  19605. if s.DataExport != nil {
  19606. if err := s.DataExport.Validate(); err != nil {
  19607. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  19608. }
  19609. }
  19610. if invalidParams.Len() > 0 {
  19611. return invalidParams
  19612. }
  19613. return nil
  19614. }
  19615. // SetDataExport sets the DataExport field's value.
  19616. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  19617. s.DataExport = v
  19618. return s
  19619. }
  19620. type StorageClassAnalysisDataExport struct {
  19621. _ struct{} `type:"structure"`
  19622. // The place to store the data for an analysis.
  19623. //
  19624. // Destination is a required field
  19625. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  19626. // The version of the output schema to use when exporting data. Must be V_1.
  19627. //
  19628. // OutputSchemaVersion is a required field
  19629. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  19630. }
  19631. // String returns the string representation
  19632. func (s StorageClassAnalysisDataExport) String() string {
  19633. return awsutil.Prettify(s)
  19634. }
  19635. // GoString returns the string representation
  19636. func (s StorageClassAnalysisDataExport) GoString() string {
  19637. return s.String()
  19638. }
  19639. // Validate inspects the fields of the type to determine if they are valid.
  19640. func (s *StorageClassAnalysisDataExport) Validate() error {
  19641. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  19642. if s.Destination == nil {
  19643. invalidParams.Add(request.NewErrParamRequired("Destination"))
  19644. }
  19645. if s.OutputSchemaVersion == nil {
  19646. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  19647. }
  19648. if s.Destination != nil {
  19649. if err := s.Destination.Validate(); err != nil {
  19650. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  19651. }
  19652. }
  19653. if invalidParams.Len() > 0 {
  19654. return invalidParams
  19655. }
  19656. return nil
  19657. }
  19658. // SetDestination sets the Destination field's value.
  19659. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  19660. s.Destination = v
  19661. return s
  19662. }
  19663. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  19664. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  19665. s.OutputSchemaVersion = &v
  19666. return s
  19667. }
  19668. type Tag struct {
  19669. _ struct{} `type:"structure"`
  19670. // Name of the tag.
  19671. //
  19672. // Key is a required field
  19673. Key *string `min:"1" type:"string" required:"true"`
  19674. // Value of the tag.
  19675. //
  19676. // Value is a required field
  19677. Value *string `type:"string" required:"true"`
  19678. }
  19679. // String returns the string representation
  19680. func (s Tag) String() string {
  19681. return awsutil.Prettify(s)
  19682. }
  19683. // GoString returns the string representation
  19684. func (s Tag) GoString() string {
  19685. return s.String()
  19686. }
  19687. // Validate inspects the fields of the type to determine if they are valid.
  19688. func (s *Tag) Validate() error {
  19689. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  19690. if s.Key == nil {
  19691. invalidParams.Add(request.NewErrParamRequired("Key"))
  19692. }
  19693. if s.Key != nil && len(*s.Key) < 1 {
  19694. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19695. }
  19696. if s.Value == nil {
  19697. invalidParams.Add(request.NewErrParamRequired("Value"))
  19698. }
  19699. if invalidParams.Len() > 0 {
  19700. return invalidParams
  19701. }
  19702. return nil
  19703. }
  19704. // SetKey sets the Key field's value.
  19705. func (s *Tag) SetKey(v string) *Tag {
  19706. s.Key = &v
  19707. return s
  19708. }
  19709. // SetValue sets the Value field's value.
  19710. func (s *Tag) SetValue(v string) *Tag {
  19711. s.Value = &v
  19712. return s
  19713. }
  19714. type Tagging struct {
  19715. _ struct{} `type:"structure"`
  19716. // TagSet is a required field
  19717. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  19718. }
  19719. // String returns the string representation
  19720. func (s Tagging) String() string {
  19721. return awsutil.Prettify(s)
  19722. }
  19723. // GoString returns the string representation
  19724. func (s Tagging) GoString() string {
  19725. return s.String()
  19726. }
  19727. // Validate inspects the fields of the type to determine if they are valid.
  19728. func (s *Tagging) Validate() error {
  19729. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  19730. if s.TagSet == nil {
  19731. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  19732. }
  19733. if s.TagSet != nil {
  19734. for i, v := range s.TagSet {
  19735. if v == nil {
  19736. continue
  19737. }
  19738. if err := v.Validate(); err != nil {
  19739. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  19740. }
  19741. }
  19742. }
  19743. if invalidParams.Len() > 0 {
  19744. return invalidParams
  19745. }
  19746. return nil
  19747. }
  19748. // SetTagSet sets the TagSet field's value.
  19749. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  19750. s.TagSet = v
  19751. return s
  19752. }
  19753. type TargetGrant struct {
  19754. _ struct{} `type:"structure"`
  19755. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  19756. // Logging permissions assigned to the Grantee for the bucket.
  19757. Permission *string `type:"string" enum:"BucketLogsPermission"`
  19758. }
  19759. // String returns the string representation
  19760. func (s TargetGrant) String() string {
  19761. return awsutil.Prettify(s)
  19762. }
  19763. // GoString returns the string representation
  19764. func (s TargetGrant) GoString() string {
  19765. return s.String()
  19766. }
  19767. // Validate inspects the fields of the type to determine if they are valid.
  19768. func (s *TargetGrant) Validate() error {
  19769. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  19770. if s.Grantee != nil {
  19771. if err := s.Grantee.Validate(); err != nil {
  19772. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  19773. }
  19774. }
  19775. if invalidParams.Len() > 0 {
  19776. return invalidParams
  19777. }
  19778. return nil
  19779. }
  19780. // SetGrantee sets the Grantee field's value.
  19781. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  19782. s.Grantee = v
  19783. return s
  19784. }
  19785. // SetPermission sets the Permission field's value.
  19786. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  19787. s.Permission = &v
  19788. return s
  19789. }
  19790. // A container for specifying the configuration for publication of messages
  19791. // to an Amazon Simple Notification Service (Amazon SNS) topic.when Amazon S3
  19792. // detects specified events.
  19793. type TopicConfiguration struct {
  19794. _ struct{} `type:"structure"`
  19795. // Events is a required field
  19796. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  19797. // A container for object key name filtering rules. For information about key
  19798. // name filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  19799. // in the Amazon Simple Storage Service Developer Guide.
  19800. Filter *NotificationConfigurationFilter `type:"structure"`
  19801. // An optional unique identifier for configurations in a notification configuration.
  19802. // If you don't provide one, Amazon S3 will assign an ID.
  19803. Id *string `type:"string"`
  19804. // The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3
  19805. // will publish a message when it detects events of the specified type.
  19806. //
  19807. // TopicArn is a required field
  19808. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  19809. }
  19810. // String returns the string representation
  19811. func (s TopicConfiguration) String() string {
  19812. return awsutil.Prettify(s)
  19813. }
  19814. // GoString returns the string representation
  19815. func (s TopicConfiguration) GoString() string {
  19816. return s.String()
  19817. }
  19818. // Validate inspects the fields of the type to determine if they are valid.
  19819. func (s *TopicConfiguration) Validate() error {
  19820. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  19821. if s.Events == nil {
  19822. invalidParams.Add(request.NewErrParamRequired("Events"))
  19823. }
  19824. if s.TopicArn == nil {
  19825. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  19826. }
  19827. if invalidParams.Len() > 0 {
  19828. return invalidParams
  19829. }
  19830. return nil
  19831. }
  19832. // SetEvents sets the Events field's value.
  19833. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  19834. s.Events = v
  19835. return s
  19836. }
  19837. // SetFilter sets the Filter field's value.
  19838. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  19839. s.Filter = v
  19840. return s
  19841. }
  19842. // SetId sets the Id field's value.
  19843. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  19844. s.Id = &v
  19845. return s
  19846. }
  19847. // SetTopicArn sets the TopicArn field's value.
  19848. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  19849. s.TopicArn = &v
  19850. return s
  19851. }
  19852. type TopicConfigurationDeprecated struct {
  19853. _ struct{} `type:"structure"`
  19854. // Bucket event for which to send notifications.
  19855. //
  19856. // Deprecated: Event has been deprecated
  19857. Event *string `deprecated:"true" type:"string" enum:"Event"`
  19858. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  19859. // An optional unique identifier for configurations in a notification configuration.
  19860. // If you don't provide one, Amazon S3 will assign an ID.
  19861. Id *string `type:"string"`
  19862. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  19863. // specified events for the bucket.
  19864. Topic *string `type:"string"`
  19865. }
  19866. // String returns the string representation
  19867. func (s TopicConfigurationDeprecated) String() string {
  19868. return awsutil.Prettify(s)
  19869. }
  19870. // GoString returns the string representation
  19871. func (s TopicConfigurationDeprecated) GoString() string {
  19872. return s.String()
  19873. }
  19874. // SetEvent sets the Event field's value.
  19875. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  19876. s.Event = &v
  19877. return s
  19878. }
  19879. // SetEvents sets the Events field's value.
  19880. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  19881. s.Events = v
  19882. return s
  19883. }
  19884. // SetId sets the Id field's value.
  19885. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  19886. s.Id = &v
  19887. return s
  19888. }
  19889. // SetTopic sets the Topic field's value.
  19890. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  19891. s.Topic = &v
  19892. return s
  19893. }
  19894. type Transition struct {
  19895. _ struct{} `type:"structure"`
  19896. // Indicates at what date the object is to be moved or deleted. Should be in
  19897. // GMT ISO 8601 Format.
  19898. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  19899. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  19900. // The value must be a non-zero positive integer.
  19901. Days *int64 `type:"integer"`
  19902. // The class of storage used to store the object.
  19903. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  19904. }
  19905. // String returns the string representation
  19906. func (s Transition) String() string {
  19907. return awsutil.Prettify(s)
  19908. }
  19909. // GoString returns the string representation
  19910. func (s Transition) GoString() string {
  19911. return s.String()
  19912. }
  19913. // SetDate sets the Date field's value.
  19914. func (s *Transition) SetDate(v time.Time) *Transition {
  19915. s.Date = &v
  19916. return s
  19917. }
  19918. // SetDays sets the Days field's value.
  19919. func (s *Transition) SetDays(v int64) *Transition {
  19920. s.Days = &v
  19921. return s
  19922. }
  19923. // SetStorageClass sets the StorageClass field's value.
  19924. func (s *Transition) SetStorageClass(v string) *Transition {
  19925. s.StorageClass = &v
  19926. return s
  19927. }
  19928. type UploadPartCopyInput struct {
  19929. _ struct{} `type:"structure"`
  19930. // Bucket is a required field
  19931. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19932. // The name of the source bucket and key name of the source object, separated
  19933. // by a slash (/). Must be URL-encoded.
  19934. //
  19935. // CopySource is a required field
  19936. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  19937. // Copies the object if its entity tag (ETag) matches the specified tag.
  19938. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  19939. // Copies the object if it has been modified since the specified time.
  19940. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  19941. // Copies the object if its entity tag (ETag) is different than the specified
  19942. // ETag.
  19943. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  19944. // Copies the object if it hasn't been modified since the specified time.
  19945. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  19946. // The range of bytes to copy from the source object. The range value must use
  19947. // the form bytes=first-last, where the first and last are the zero-based byte
  19948. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  19949. // first ten bytes of the source. You can copy a range only if the source object
  19950. // is greater than 5 MB.
  19951. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  19952. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  19953. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  19954. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  19955. // the source object. The encryption key provided in this header must be one
  19956. // that was used when the source object was created.
  19957. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19958. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  19959. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  19960. // key was transmitted without error.
  19961. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  19962. // Key is a required field
  19963. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19964. // Part number of part being copied. This is a positive integer between 1 and
  19965. // 10,000.
  19966. //
  19967. // PartNumber is a required field
  19968. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  19969. // Confirms that the requester knows that she or he will be charged for the
  19970. // request. Bucket owners need not specify this parameter in their requests.
  19971. // Documentation on downloading objects from requester pays buckets can be found
  19972. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  19973. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  19974. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  19975. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  19976. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  19977. // data. This value is used to store the object and then it is discarded; Amazon
  19978. // does not store the encryption key. The key must be appropriate for use with
  19979. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  19980. // header. This must be the same encryption key specified in the initiate multipart
  19981. // upload request.
  19982. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19983. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  19984. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  19985. // key was transmitted without error.
  19986. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  19987. // Upload ID identifying the multipart upload whose part is being copied.
  19988. //
  19989. // UploadId is a required field
  19990. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  19991. }
  19992. // String returns the string representation
  19993. func (s UploadPartCopyInput) String() string {
  19994. return awsutil.Prettify(s)
  19995. }
  19996. // GoString returns the string representation
  19997. func (s UploadPartCopyInput) GoString() string {
  19998. return s.String()
  19999. }
  20000. // Validate inspects the fields of the type to determine if they are valid.
  20001. func (s *UploadPartCopyInput) Validate() error {
  20002. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  20003. if s.Bucket == nil {
  20004. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20005. }
  20006. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20007. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20008. }
  20009. if s.CopySource == nil {
  20010. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  20011. }
  20012. if s.Key == nil {
  20013. invalidParams.Add(request.NewErrParamRequired("Key"))
  20014. }
  20015. if s.Key != nil && len(*s.Key) < 1 {
  20016. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20017. }
  20018. if s.PartNumber == nil {
  20019. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  20020. }
  20021. if s.UploadId == nil {
  20022. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  20023. }
  20024. if invalidParams.Len() > 0 {
  20025. return invalidParams
  20026. }
  20027. return nil
  20028. }
  20029. // SetBucket sets the Bucket field's value.
  20030. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  20031. s.Bucket = &v
  20032. return s
  20033. }
  20034. func (s *UploadPartCopyInput) getBucket() (v string) {
  20035. if s.Bucket == nil {
  20036. return v
  20037. }
  20038. return *s.Bucket
  20039. }
  20040. // SetCopySource sets the CopySource field's value.
  20041. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  20042. s.CopySource = &v
  20043. return s
  20044. }
  20045. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  20046. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  20047. s.CopySourceIfMatch = &v
  20048. return s
  20049. }
  20050. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  20051. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  20052. s.CopySourceIfModifiedSince = &v
  20053. return s
  20054. }
  20055. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  20056. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  20057. s.CopySourceIfNoneMatch = &v
  20058. return s
  20059. }
  20060. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  20061. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  20062. s.CopySourceIfUnmodifiedSince = &v
  20063. return s
  20064. }
  20065. // SetCopySourceRange sets the CopySourceRange field's value.
  20066. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  20067. s.CopySourceRange = &v
  20068. return s
  20069. }
  20070. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  20071. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  20072. s.CopySourceSSECustomerAlgorithm = &v
  20073. return s
  20074. }
  20075. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  20076. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  20077. s.CopySourceSSECustomerKey = &v
  20078. return s
  20079. }
  20080. func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
  20081. if s.CopySourceSSECustomerKey == nil {
  20082. return v
  20083. }
  20084. return *s.CopySourceSSECustomerKey
  20085. }
  20086. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  20087. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  20088. s.CopySourceSSECustomerKeyMD5 = &v
  20089. return s
  20090. }
  20091. // SetKey sets the Key field's value.
  20092. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  20093. s.Key = &v
  20094. return s
  20095. }
  20096. // SetPartNumber sets the PartNumber field's value.
  20097. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  20098. s.PartNumber = &v
  20099. return s
  20100. }
  20101. // SetRequestPayer sets the RequestPayer field's value.
  20102. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  20103. s.RequestPayer = &v
  20104. return s
  20105. }
  20106. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20107. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  20108. s.SSECustomerAlgorithm = &v
  20109. return s
  20110. }
  20111. // SetSSECustomerKey sets the SSECustomerKey field's value.
  20112. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  20113. s.SSECustomerKey = &v
  20114. return s
  20115. }
  20116. func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
  20117. if s.SSECustomerKey == nil {
  20118. return v
  20119. }
  20120. return *s.SSECustomerKey
  20121. }
  20122. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20123. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  20124. s.SSECustomerKeyMD5 = &v
  20125. return s
  20126. }
  20127. // SetUploadId sets the UploadId field's value.
  20128. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  20129. s.UploadId = &v
  20130. return s
  20131. }
  20132. type UploadPartCopyOutput struct {
  20133. _ struct{} `type:"structure" payload:"CopyPartResult"`
  20134. CopyPartResult *CopyPartResult `type:"structure"`
  20135. // The version of the source object that was copied, if you have enabled versioning
  20136. // on the source bucket.
  20137. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  20138. // If present, indicates that the requester was successfully charged for the
  20139. // request.
  20140. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  20141. // If server-side encryption with a customer-provided encryption key was requested,
  20142. // the response will include this header confirming the encryption algorithm
  20143. // used.
  20144. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20145. // If server-side encryption with a customer-provided encryption key was requested,
  20146. // the response will include this header to provide round trip message integrity
  20147. // verification of the customer-provided encryption key.
  20148. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20149. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  20150. // encryption key that was used for the object.
  20151. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  20152. // The Server-side encryption algorithm used when storing this object in S3
  20153. // (e.g., AES256, aws:kms).
  20154. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  20155. }
  20156. // String returns the string representation
  20157. func (s UploadPartCopyOutput) String() string {
  20158. return awsutil.Prettify(s)
  20159. }
  20160. // GoString returns the string representation
  20161. func (s UploadPartCopyOutput) GoString() string {
  20162. return s.String()
  20163. }
  20164. // SetCopyPartResult sets the CopyPartResult field's value.
  20165. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  20166. s.CopyPartResult = v
  20167. return s
  20168. }
  20169. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  20170. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  20171. s.CopySourceVersionId = &v
  20172. return s
  20173. }
  20174. // SetRequestCharged sets the RequestCharged field's value.
  20175. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  20176. s.RequestCharged = &v
  20177. return s
  20178. }
  20179. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20180. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  20181. s.SSECustomerAlgorithm = &v
  20182. return s
  20183. }
  20184. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20185. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  20186. s.SSECustomerKeyMD5 = &v
  20187. return s
  20188. }
  20189. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  20190. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  20191. s.SSEKMSKeyId = &v
  20192. return s
  20193. }
  20194. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  20195. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  20196. s.ServerSideEncryption = &v
  20197. return s
  20198. }
  20199. type UploadPartInput struct {
  20200. _ struct{} `type:"structure" payload:"Body"`
  20201. // Object data.
  20202. Body io.ReadSeeker `type:"blob"`
  20203. // Name of the bucket to which the multipart upload was initiated.
  20204. //
  20205. // Bucket is a required field
  20206. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  20207. // Size of the body in bytes. This parameter is useful when the size of the
  20208. // body cannot be determined automatically.
  20209. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  20210. // The base64-encoded 128-bit MD5 digest of the part data.
  20211. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  20212. // Object key for which the multipart upload was initiated.
  20213. //
  20214. // Key is a required field
  20215. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  20216. // Part number of part being uploaded. This is a positive integer between 1
  20217. // and 10,000.
  20218. //
  20219. // PartNumber is a required field
  20220. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  20221. // Confirms that the requester knows that she or he will be charged for the
  20222. // request. Bucket owners need not specify this parameter in their requests.
  20223. // Documentation on downloading objects from requester pays buckets can be found
  20224. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  20225. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  20226. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  20227. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20228. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  20229. // data. This value is used to store the object and then it is discarded; Amazon
  20230. // does not store the encryption key. The key must be appropriate for use with
  20231. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  20232. // header. This must be the same encryption key specified in the initiate multipart
  20233. // upload request.
  20234. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  20235. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  20236. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  20237. // key was transmitted without error.
  20238. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20239. // Upload ID identifying the multipart upload whose part is being uploaded.
  20240. //
  20241. // UploadId is a required field
  20242. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  20243. }
  20244. // String returns the string representation
  20245. func (s UploadPartInput) String() string {
  20246. return awsutil.Prettify(s)
  20247. }
  20248. // GoString returns the string representation
  20249. func (s UploadPartInput) GoString() string {
  20250. return s.String()
  20251. }
  20252. // Validate inspects the fields of the type to determine if they are valid.
  20253. func (s *UploadPartInput) Validate() error {
  20254. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  20255. if s.Bucket == nil {
  20256. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20257. }
  20258. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20259. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20260. }
  20261. if s.Key == nil {
  20262. invalidParams.Add(request.NewErrParamRequired("Key"))
  20263. }
  20264. if s.Key != nil && len(*s.Key) < 1 {
  20265. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20266. }
  20267. if s.PartNumber == nil {
  20268. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  20269. }
  20270. if s.UploadId == nil {
  20271. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  20272. }
  20273. if invalidParams.Len() > 0 {
  20274. return invalidParams
  20275. }
  20276. return nil
  20277. }
  20278. // SetBody sets the Body field's value.
  20279. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  20280. s.Body = v
  20281. return s
  20282. }
  20283. // SetBucket sets the Bucket field's value.
  20284. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  20285. s.Bucket = &v
  20286. return s
  20287. }
  20288. func (s *UploadPartInput) getBucket() (v string) {
  20289. if s.Bucket == nil {
  20290. return v
  20291. }
  20292. return *s.Bucket
  20293. }
  20294. // SetContentLength sets the ContentLength field's value.
  20295. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  20296. s.ContentLength = &v
  20297. return s
  20298. }
  20299. // SetContentMD5 sets the ContentMD5 field's value.
  20300. func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
  20301. s.ContentMD5 = &v
  20302. return s
  20303. }
  20304. // SetKey sets the Key field's value.
  20305. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  20306. s.Key = &v
  20307. return s
  20308. }
  20309. // SetPartNumber sets the PartNumber field's value.
  20310. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  20311. s.PartNumber = &v
  20312. return s
  20313. }
  20314. // SetRequestPayer sets the RequestPayer field's value.
  20315. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  20316. s.RequestPayer = &v
  20317. return s
  20318. }
  20319. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20320. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  20321. s.SSECustomerAlgorithm = &v
  20322. return s
  20323. }
  20324. // SetSSECustomerKey sets the SSECustomerKey field's value.
  20325. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  20326. s.SSECustomerKey = &v
  20327. return s
  20328. }
  20329. func (s *UploadPartInput) getSSECustomerKey() (v string) {
  20330. if s.SSECustomerKey == nil {
  20331. return v
  20332. }
  20333. return *s.SSECustomerKey
  20334. }
  20335. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20336. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  20337. s.SSECustomerKeyMD5 = &v
  20338. return s
  20339. }
  20340. // SetUploadId sets the UploadId field's value.
  20341. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  20342. s.UploadId = &v
  20343. return s
  20344. }
  20345. type UploadPartOutput struct {
  20346. _ struct{} `type:"structure"`
  20347. // Entity tag for the uploaded object.
  20348. ETag *string `location:"header" locationName:"ETag" type:"string"`
  20349. // If present, indicates that the requester was successfully charged for the
  20350. // request.
  20351. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  20352. // If server-side encryption with a customer-provided encryption key was requested,
  20353. // the response will include this header confirming the encryption algorithm
  20354. // used.
  20355. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20356. // If server-side encryption with a customer-provided encryption key was requested,
  20357. // the response will include this header to provide round trip message integrity
  20358. // verification of the customer-provided encryption key.
  20359. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20360. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  20361. // encryption key that was used for the object.
  20362. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  20363. // The Server-side encryption algorithm used when storing this object in S3
  20364. // (e.g., AES256, aws:kms).
  20365. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  20366. }
  20367. // String returns the string representation
  20368. func (s UploadPartOutput) String() string {
  20369. return awsutil.Prettify(s)
  20370. }
  20371. // GoString returns the string representation
  20372. func (s UploadPartOutput) GoString() string {
  20373. return s.String()
  20374. }
  20375. // SetETag sets the ETag field's value.
  20376. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  20377. s.ETag = &v
  20378. return s
  20379. }
  20380. // SetRequestCharged sets the RequestCharged field's value.
  20381. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  20382. s.RequestCharged = &v
  20383. return s
  20384. }
  20385. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20386. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  20387. s.SSECustomerAlgorithm = &v
  20388. return s
  20389. }
  20390. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20391. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  20392. s.SSECustomerKeyMD5 = &v
  20393. return s
  20394. }
  20395. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  20396. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  20397. s.SSEKMSKeyId = &v
  20398. return s
  20399. }
  20400. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  20401. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  20402. s.ServerSideEncryption = &v
  20403. return s
  20404. }
  20405. type VersioningConfiguration struct {
  20406. _ struct{} `type:"structure"`
  20407. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  20408. // This element is only returned if the bucket has been configured with MFA
  20409. // delete. If the bucket has never been so configured, this element is not returned.
  20410. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  20411. // The versioning state of the bucket.
  20412. Status *string `type:"string" enum:"BucketVersioningStatus"`
  20413. }
  20414. // String returns the string representation
  20415. func (s VersioningConfiguration) String() string {
  20416. return awsutil.Prettify(s)
  20417. }
  20418. // GoString returns the string representation
  20419. func (s VersioningConfiguration) GoString() string {
  20420. return s.String()
  20421. }
  20422. // SetMFADelete sets the MFADelete field's value.
  20423. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  20424. s.MFADelete = &v
  20425. return s
  20426. }
  20427. // SetStatus sets the Status field's value.
  20428. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  20429. s.Status = &v
  20430. return s
  20431. }
  20432. type WebsiteConfiguration struct {
  20433. _ struct{} `type:"structure"`
  20434. ErrorDocument *ErrorDocument `type:"structure"`
  20435. IndexDocument *IndexDocument `type:"structure"`
  20436. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  20437. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  20438. }
  20439. // String returns the string representation
  20440. func (s WebsiteConfiguration) String() string {
  20441. return awsutil.Prettify(s)
  20442. }
  20443. // GoString returns the string representation
  20444. func (s WebsiteConfiguration) GoString() string {
  20445. return s.String()
  20446. }
  20447. // Validate inspects the fields of the type to determine if they are valid.
  20448. func (s *WebsiteConfiguration) Validate() error {
  20449. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  20450. if s.ErrorDocument != nil {
  20451. if err := s.ErrorDocument.Validate(); err != nil {
  20452. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  20453. }
  20454. }
  20455. if s.IndexDocument != nil {
  20456. if err := s.IndexDocument.Validate(); err != nil {
  20457. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  20458. }
  20459. }
  20460. if s.RedirectAllRequestsTo != nil {
  20461. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  20462. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  20463. }
  20464. }
  20465. if s.RoutingRules != nil {
  20466. for i, v := range s.RoutingRules {
  20467. if v == nil {
  20468. continue
  20469. }
  20470. if err := v.Validate(); err != nil {
  20471. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  20472. }
  20473. }
  20474. }
  20475. if invalidParams.Len() > 0 {
  20476. return invalidParams
  20477. }
  20478. return nil
  20479. }
  20480. // SetErrorDocument sets the ErrorDocument field's value.
  20481. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  20482. s.ErrorDocument = v
  20483. return s
  20484. }
  20485. // SetIndexDocument sets the IndexDocument field's value.
  20486. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  20487. s.IndexDocument = v
  20488. return s
  20489. }
  20490. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  20491. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  20492. s.RedirectAllRequestsTo = v
  20493. return s
  20494. }
  20495. // SetRoutingRules sets the RoutingRules field's value.
  20496. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  20497. s.RoutingRules = v
  20498. return s
  20499. }
  20500. const (
  20501. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  20502. AnalyticsS3ExportFileFormatCsv = "CSV"
  20503. )
  20504. const (
  20505. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  20506. BucketAccelerateStatusEnabled = "Enabled"
  20507. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  20508. BucketAccelerateStatusSuspended = "Suspended"
  20509. )
  20510. const (
  20511. // BucketCannedACLPrivate is a BucketCannedACL enum value
  20512. BucketCannedACLPrivate = "private"
  20513. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  20514. BucketCannedACLPublicRead = "public-read"
  20515. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  20516. BucketCannedACLPublicReadWrite = "public-read-write"
  20517. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  20518. BucketCannedACLAuthenticatedRead = "authenticated-read"
  20519. )
  20520. const (
  20521. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  20522. BucketLocationConstraintEu = "EU"
  20523. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  20524. BucketLocationConstraintEuWest1 = "eu-west-1"
  20525. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  20526. BucketLocationConstraintUsWest1 = "us-west-1"
  20527. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  20528. BucketLocationConstraintUsWest2 = "us-west-2"
  20529. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  20530. BucketLocationConstraintApSouth1 = "ap-south-1"
  20531. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  20532. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  20533. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  20534. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  20535. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  20536. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  20537. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  20538. BucketLocationConstraintSaEast1 = "sa-east-1"
  20539. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  20540. BucketLocationConstraintCnNorth1 = "cn-north-1"
  20541. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  20542. BucketLocationConstraintEuCentral1 = "eu-central-1"
  20543. )
  20544. const (
  20545. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  20546. BucketLogsPermissionFullControl = "FULL_CONTROL"
  20547. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  20548. BucketLogsPermissionRead = "READ"
  20549. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  20550. BucketLogsPermissionWrite = "WRITE"
  20551. )
  20552. const (
  20553. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  20554. BucketVersioningStatusEnabled = "Enabled"
  20555. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  20556. BucketVersioningStatusSuspended = "Suspended"
  20557. )
  20558. const (
  20559. // CompressionTypeNone is a CompressionType enum value
  20560. CompressionTypeNone = "NONE"
  20561. // CompressionTypeGzip is a CompressionType enum value
  20562. CompressionTypeGzip = "GZIP"
  20563. // CompressionTypeBzip2 is a CompressionType enum value
  20564. CompressionTypeBzip2 = "BZIP2"
  20565. )
  20566. const (
  20567. // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value
  20568. DeleteMarkerReplicationStatusEnabled = "Enabled"
  20569. // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value
  20570. DeleteMarkerReplicationStatusDisabled = "Disabled"
  20571. )
  20572. // Requests Amazon S3 to encode the object keys in the response and specifies
  20573. // the encoding method to use. An object key may contain any Unicode character;
  20574. // however, XML 1.0 parser cannot parse some characters, such as characters
  20575. // with an ASCII value from 0 to 10. For characters that are not supported in
  20576. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  20577. // keys in the response.
  20578. const (
  20579. // EncodingTypeUrl is a EncodingType enum value
  20580. EncodingTypeUrl = "url"
  20581. )
  20582. // The bucket event for which to send notifications.
  20583. const (
  20584. // EventS3ReducedRedundancyLostObject is a Event enum value
  20585. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  20586. // EventS3ObjectCreated is a Event enum value
  20587. EventS3ObjectCreated = "s3:ObjectCreated:*"
  20588. // EventS3ObjectCreatedPut is a Event enum value
  20589. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  20590. // EventS3ObjectCreatedPost is a Event enum value
  20591. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  20592. // EventS3ObjectCreatedCopy is a Event enum value
  20593. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  20594. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  20595. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  20596. // EventS3ObjectRemoved is a Event enum value
  20597. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  20598. // EventS3ObjectRemovedDelete is a Event enum value
  20599. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  20600. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  20601. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  20602. // EventS3ObjectRestorePost is a Event enum value
  20603. EventS3ObjectRestorePost = "s3:ObjectRestore:Post"
  20604. // EventS3ObjectRestoreCompleted is a Event enum value
  20605. EventS3ObjectRestoreCompleted = "s3:ObjectRestore:Completed"
  20606. )
  20607. const (
  20608. // ExpirationStatusEnabled is a ExpirationStatus enum value
  20609. ExpirationStatusEnabled = "Enabled"
  20610. // ExpirationStatusDisabled is a ExpirationStatus enum value
  20611. ExpirationStatusDisabled = "Disabled"
  20612. )
  20613. const (
  20614. // ExpressionTypeSql is a ExpressionType enum value
  20615. ExpressionTypeSql = "SQL"
  20616. )
  20617. const (
  20618. // FileHeaderInfoUse is a FileHeaderInfo enum value
  20619. FileHeaderInfoUse = "USE"
  20620. // FileHeaderInfoIgnore is a FileHeaderInfo enum value
  20621. FileHeaderInfoIgnore = "IGNORE"
  20622. // FileHeaderInfoNone is a FileHeaderInfo enum value
  20623. FileHeaderInfoNone = "NONE"
  20624. )
  20625. const (
  20626. // FilterRuleNamePrefix is a FilterRuleName enum value
  20627. FilterRuleNamePrefix = "prefix"
  20628. // FilterRuleNameSuffix is a FilterRuleName enum value
  20629. FilterRuleNameSuffix = "suffix"
  20630. )
  20631. const (
  20632. // InventoryFormatCsv is a InventoryFormat enum value
  20633. InventoryFormatCsv = "CSV"
  20634. // InventoryFormatOrc is a InventoryFormat enum value
  20635. InventoryFormatOrc = "ORC"
  20636. // InventoryFormatParquet is a InventoryFormat enum value
  20637. InventoryFormatParquet = "Parquet"
  20638. )
  20639. const (
  20640. // InventoryFrequencyDaily is a InventoryFrequency enum value
  20641. InventoryFrequencyDaily = "Daily"
  20642. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  20643. InventoryFrequencyWeekly = "Weekly"
  20644. )
  20645. const (
  20646. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  20647. InventoryIncludedObjectVersionsAll = "All"
  20648. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  20649. InventoryIncludedObjectVersionsCurrent = "Current"
  20650. )
  20651. const (
  20652. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  20653. InventoryOptionalFieldSize = "Size"
  20654. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  20655. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  20656. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  20657. InventoryOptionalFieldStorageClass = "StorageClass"
  20658. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  20659. InventoryOptionalFieldEtag = "ETag"
  20660. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  20661. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  20662. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  20663. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  20664. // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
  20665. InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
  20666. // InventoryOptionalFieldObjectLockRetainUntilDate is a InventoryOptionalField enum value
  20667. InventoryOptionalFieldObjectLockRetainUntilDate = "ObjectLockRetainUntilDate"
  20668. // InventoryOptionalFieldObjectLockMode is a InventoryOptionalField enum value
  20669. InventoryOptionalFieldObjectLockMode = "ObjectLockMode"
  20670. // InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value
  20671. InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus"
  20672. )
  20673. const (
  20674. // JSONTypeDocument is a JSONType enum value
  20675. JSONTypeDocument = "DOCUMENT"
  20676. // JSONTypeLines is a JSONType enum value
  20677. JSONTypeLines = "LINES"
  20678. )
  20679. const (
  20680. // MFADeleteEnabled is a MFADelete enum value
  20681. MFADeleteEnabled = "Enabled"
  20682. // MFADeleteDisabled is a MFADelete enum value
  20683. MFADeleteDisabled = "Disabled"
  20684. )
  20685. const (
  20686. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  20687. MFADeleteStatusEnabled = "Enabled"
  20688. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  20689. MFADeleteStatusDisabled = "Disabled"
  20690. )
  20691. const (
  20692. // MetadataDirectiveCopy is a MetadataDirective enum value
  20693. MetadataDirectiveCopy = "COPY"
  20694. // MetadataDirectiveReplace is a MetadataDirective enum value
  20695. MetadataDirectiveReplace = "REPLACE"
  20696. )
  20697. const (
  20698. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  20699. ObjectCannedACLPrivate = "private"
  20700. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  20701. ObjectCannedACLPublicRead = "public-read"
  20702. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  20703. ObjectCannedACLPublicReadWrite = "public-read-write"
  20704. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  20705. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  20706. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  20707. ObjectCannedACLAwsExecRead = "aws-exec-read"
  20708. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  20709. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  20710. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  20711. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  20712. )
  20713. const (
  20714. // ObjectLockEnabledEnabled is a ObjectLockEnabled enum value
  20715. ObjectLockEnabledEnabled = "Enabled"
  20716. )
  20717. const (
  20718. // ObjectLockLegalHoldStatusOn is a ObjectLockLegalHoldStatus enum value
  20719. ObjectLockLegalHoldStatusOn = "ON"
  20720. // ObjectLockLegalHoldStatusOff is a ObjectLockLegalHoldStatus enum value
  20721. ObjectLockLegalHoldStatusOff = "OFF"
  20722. )
  20723. const (
  20724. // ObjectLockModeGovernance is a ObjectLockMode enum value
  20725. ObjectLockModeGovernance = "GOVERNANCE"
  20726. // ObjectLockModeCompliance is a ObjectLockMode enum value
  20727. ObjectLockModeCompliance = "COMPLIANCE"
  20728. )
  20729. const (
  20730. // ObjectLockRetentionModeGovernance is a ObjectLockRetentionMode enum value
  20731. ObjectLockRetentionModeGovernance = "GOVERNANCE"
  20732. // ObjectLockRetentionModeCompliance is a ObjectLockRetentionMode enum value
  20733. ObjectLockRetentionModeCompliance = "COMPLIANCE"
  20734. )
  20735. const (
  20736. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  20737. ObjectStorageClassStandard = "STANDARD"
  20738. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  20739. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  20740. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  20741. ObjectStorageClassGlacier = "GLACIER"
  20742. // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
  20743. ObjectStorageClassStandardIa = "STANDARD_IA"
  20744. // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
  20745. ObjectStorageClassOnezoneIa = "ONEZONE_IA"
  20746. // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
  20747. ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20748. )
  20749. const (
  20750. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  20751. ObjectVersionStorageClassStandard = "STANDARD"
  20752. )
  20753. const (
  20754. // OwnerOverrideDestination is a OwnerOverride enum value
  20755. OwnerOverrideDestination = "Destination"
  20756. )
  20757. const (
  20758. // PayerRequester is a Payer enum value
  20759. PayerRequester = "Requester"
  20760. // PayerBucketOwner is a Payer enum value
  20761. PayerBucketOwner = "BucketOwner"
  20762. )
  20763. const (
  20764. // PermissionFullControl is a Permission enum value
  20765. PermissionFullControl = "FULL_CONTROL"
  20766. // PermissionWrite is a Permission enum value
  20767. PermissionWrite = "WRITE"
  20768. // PermissionWriteAcp is a Permission enum value
  20769. PermissionWriteAcp = "WRITE_ACP"
  20770. // PermissionRead is a Permission enum value
  20771. PermissionRead = "READ"
  20772. // PermissionReadAcp is a Permission enum value
  20773. PermissionReadAcp = "READ_ACP"
  20774. )
  20775. const (
  20776. // ProtocolHttp is a Protocol enum value
  20777. ProtocolHttp = "http"
  20778. // ProtocolHttps is a Protocol enum value
  20779. ProtocolHttps = "https"
  20780. )
  20781. const (
  20782. // QuoteFieldsAlways is a QuoteFields enum value
  20783. QuoteFieldsAlways = "ALWAYS"
  20784. // QuoteFieldsAsneeded is a QuoteFields enum value
  20785. QuoteFieldsAsneeded = "ASNEEDED"
  20786. )
  20787. const (
  20788. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  20789. ReplicationRuleStatusEnabled = "Enabled"
  20790. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  20791. ReplicationRuleStatusDisabled = "Disabled"
  20792. )
  20793. const (
  20794. // ReplicationStatusComplete is a ReplicationStatus enum value
  20795. ReplicationStatusComplete = "COMPLETE"
  20796. // ReplicationStatusPending is a ReplicationStatus enum value
  20797. ReplicationStatusPending = "PENDING"
  20798. // ReplicationStatusFailed is a ReplicationStatus enum value
  20799. ReplicationStatusFailed = "FAILED"
  20800. // ReplicationStatusReplica is a ReplicationStatus enum value
  20801. ReplicationStatusReplica = "REPLICA"
  20802. )
  20803. // If present, indicates that the requester was successfully charged for the
  20804. // request.
  20805. const (
  20806. // RequestChargedRequester is a RequestCharged enum value
  20807. RequestChargedRequester = "requester"
  20808. )
  20809. // Confirms that the requester knows that she or he will be charged for the
  20810. // request. Bucket owners need not specify this parameter in their requests.
  20811. // Documentation on downloading objects from requester pays buckets can be found
  20812. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  20813. const (
  20814. // RequestPayerRequester is a RequestPayer enum value
  20815. RequestPayerRequester = "requester"
  20816. )
  20817. const (
  20818. // RestoreRequestTypeSelect is a RestoreRequestType enum value
  20819. RestoreRequestTypeSelect = "SELECT"
  20820. )
  20821. const (
  20822. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  20823. ServerSideEncryptionAes256 = "AES256"
  20824. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  20825. ServerSideEncryptionAwsKms = "aws:kms"
  20826. )
  20827. const (
  20828. // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
  20829. SseKmsEncryptedObjectsStatusEnabled = "Enabled"
  20830. // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
  20831. SseKmsEncryptedObjectsStatusDisabled = "Disabled"
  20832. )
  20833. const (
  20834. // StorageClassStandard is a StorageClass enum value
  20835. StorageClassStandard = "STANDARD"
  20836. // StorageClassReducedRedundancy is a StorageClass enum value
  20837. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  20838. // StorageClassStandardIa is a StorageClass enum value
  20839. StorageClassStandardIa = "STANDARD_IA"
  20840. // StorageClassOnezoneIa is a StorageClass enum value
  20841. StorageClassOnezoneIa = "ONEZONE_IA"
  20842. // StorageClassIntelligentTiering is a StorageClass enum value
  20843. StorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20844. // StorageClassGlacier is a StorageClass enum value
  20845. StorageClassGlacier = "GLACIER"
  20846. )
  20847. const (
  20848. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  20849. StorageClassAnalysisSchemaVersionV1 = "V_1"
  20850. )
  20851. const (
  20852. // TaggingDirectiveCopy is a TaggingDirective enum value
  20853. TaggingDirectiveCopy = "COPY"
  20854. // TaggingDirectiveReplace is a TaggingDirective enum value
  20855. TaggingDirectiveReplace = "REPLACE"
  20856. )
  20857. const (
  20858. // TierStandard is a Tier enum value
  20859. TierStandard = "Standard"
  20860. // TierBulk is a Tier enum value
  20861. TierBulk = "Bulk"
  20862. // TierExpedited is a Tier enum value
  20863. TierExpedited = "Expedited"
  20864. )
  20865. const (
  20866. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  20867. TransitionStorageClassGlacier = "GLACIER"
  20868. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  20869. TransitionStorageClassStandardIa = "STANDARD_IA"
  20870. // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
  20871. TransitionStorageClassOnezoneIa = "ONEZONE_IA"
  20872. // TransitionStorageClassIntelligentTiering is a TransitionStorageClass enum value
  20873. TransitionStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20874. )
  20875. const (
  20876. // TypeCanonicalUser is a Type enum value
  20877. TypeCanonicalUser = "CanonicalUser"
  20878. // TypeAmazonCustomerByEmail is a Type enum value
  20879. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  20880. // TypeGroup is a Type enum value
  20881. TypeGroup = "Group"
  20882. )