api.go 281 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package elastictranscoder
  3. import (
  4. "fmt"
  5. "github.com/aws/aws-sdk-go/aws"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  10. )
  11. const opCancelJob = "CancelJob"
  12. // CancelJobRequest generates a "aws/request.Request" representing the
  13. // client's request for the CancelJob operation. The "output" return
  14. // value will be populated with the request's response once the request completes
  15. // successfully.
  16. //
  17. // Use "Send" method on the returned Request to send the API call to the service.
  18. // the "output" return value is not valid until after Send returns without error.
  19. //
  20. // See CancelJob for more information on using the CancelJob
  21. // API call, and error handling.
  22. //
  23. // This method is useful when you want to inject custom logic or configuration
  24. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  25. //
  26. //
  27. // // Example sending a request using the CancelJobRequest method.
  28. // req, resp := client.CancelJobRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. func (c *ElasticTranscoder) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput) {
  35. op := &request.Operation{
  36. Name: opCancelJob,
  37. HTTPMethod: "DELETE",
  38. HTTPPath: "/2012-09-25/jobs/{Id}",
  39. }
  40. if input == nil {
  41. input = &CancelJobInput{}
  42. }
  43. output = &CancelJobOutput{}
  44. req = c.newRequest(op, input, output)
  45. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  46. return
  47. }
  48. // CancelJob API operation for Amazon Elastic Transcoder.
  49. //
  50. // The CancelJob operation cancels an unfinished job.
  51. //
  52. // You can only cancel a job that has a status of Submitted. To prevent a pipeline
  53. // from starting to process a job while you're getting the job identifier, use
  54. // UpdatePipelineStatus to temporarily pause the pipeline.
  55. //
  56. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  57. // with awserr.Error's Code and Message methods to get detailed information about
  58. // the error.
  59. //
  60. // See the AWS API reference guide for Amazon Elastic Transcoder's
  61. // API operation CancelJob for usage and error information.
  62. //
  63. // Returned Error Codes:
  64. // * ErrCodeValidationException "ValidationException"
  65. // One or more required parameter values were not provided in the request.
  66. //
  67. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  68. //
  69. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  70. // The requested resource does not exist or is not available. For example, the
  71. // pipeline to which you're trying to add a job doesn't exist or is still being
  72. // created.
  73. //
  74. // * ErrCodeResourceInUseException "ResourceInUseException"
  75. // The resource you are attempting to change is in use. For example, you are
  76. // attempting to delete a pipeline that is currently in use.
  77. //
  78. // * ErrCodeAccessDeniedException "AccessDeniedException"
  79. // General authentication failure. The request was not signed correctly.
  80. //
  81. // * ErrCodeInternalServiceException "InternalServiceException"
  82. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  83. // the request.
  84. //
  85. func (c *ElasticTranscoder) CancelJob(input *CancelJobInput) (*CancelJobOutput, error) {
  86. req, out := c.CancelJobRequest(input)
  87. return out, req.Send()
  88. }
  89. // CancelJobWithContext is the same as CancelJob with the addition of
  90. // the ability to pass a context and additional request options.
  91. //
  92. // See CancelJob for details on how to use this API operation.
  93. //
  94. // The context must be non-nil and will be used for request cancellation. If
  95. // the context is nil a panic will occur. In the future the SDK may create
  96. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  97. // for more information on using Contexts.
  98. func (c *ElasticTranscoder) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts ...request.Option) (*CancelJobOutput, error) {
  99. req, out := c.CancelJobRequest(input)
  100. req.SetContext(ctx)
  101. req.ApplyOptions(opts...)
  102. return out, req.Send()
  103. }
  104. const opCreateJob = "CreateJob"
  105. // CreateJobRequest generates a "aws/request.Request" representing the
  106. // client's request for the CreateJob operation. The "output" return
  107. // value will be populated with the request's response once the request completes
  108. // successfully.
  109. //
  110. // Use "Send" method on the returned Request to send the API call to the service.
  111. // the "output" return value is not valid until after Send returns without error.
  112. //
  113. // See CreateJob for more information on using the CreateJob
  114. // API call, and error handling.
  115. //
  116. // This method is useful when you want to inject custom logic or configuration
  117. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  118. //
  119. //
  120. // // Example sending a request using the CreateJobRequest method.
  121. // req, resp := client.CreateJobRequest(params)
  122. //
  123. // err := req.Send()
  124. // if err == nil { // resp is now filled
  125. // fmt.Println(resp)
  126. // }
  127. func (c *ElasticTranscoder) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobResponse) {
  128. op := &request.Operation{
  129. Name: opCreateJob,
  130. HTTPMethod: "POST",
  131. HTTPPath: "/2012-09-25/jobs",
  132. }
  133. if input == nil {
  134. input = &CreateJobInput{}
  135. }
  136. output = &CreateJobResponse{}
  137. req = c.newRequest(op, input, output)
  138. return
  139. }
  140. // CreateJob API operation for Amazon Elastic Transcoder.
  141. //
  142. // When you create a job, Elastic Transcoder returns JSON data that includes
  143. // the values that you specified plus information about the job that is created.
  144. //
  145. // If you have specified more than one output for your jobs (for example, one
  146. // output for the Kindle Fire and another output for the Apple iPhone 4s), you
  147. // currently must use the Elastic Transcoder API to list the jobs (as opposed
  148. // to the AWS Console).
  149. //
  150. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  151. // with awserr.Error's Code and Message methods to get detailed information about
  152. // the error.
  153. //
  154. // See the AWS API reference guide for Amazon Elastic Transcoder's
  155. // API operation CreateJob for usage and error information.
  156. //
  157. // Returned Error Codes:
  158. // * ErrCodeValidationException "ValidationException"
  159. // One or more required parameter values were not provided in the request.
  160. //
  161. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  162. //
  163. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  164. // The requested resource does not exist or is not available. For example, the
  165. // pipeline to which you're trying to add a job doesn't exist or is still being
  166. // created.
  167. //
  168. // * ErrCodeAccessDeniedException "AccessDeniedException"
  169. // General authentication failure. The request was not signed correctly.
  170. //
  171. // * ErrCodeLimitExceededException "LimitExceededException"
  172. // Too many operations for a given AWS account. For example, the number of pipelines
  173. // exceeds the maximum allowed.
  174. //
  175. // * ErrCodeInternalServiceException "InternalServiceException"
  176. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  177. // the request.
  178. //
  179. func (c *ElasticTranscoder) CreateJob(input *CreateJobInput) (*CreateJobResponse, error) {
  180. req, out := c.CreateJobRequest(input)
  181. return out, req.Send()
  182. }
  183. // CreateJobWithContext is the same as CreateJob with the addition of
  184. // the ability to pass a context and additional request options.
  185. //
  186. // See CreateJob for details on how to use this API operation.
  187. //
  188. // The context must be non-nil and will be used for request cancellation. If
  189. // the context is nil a panic will occur. In the future the SDK may create
  190. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  191. // for more information on using Contexts.
  192. func (c *ElasticTranscoder) CreateJobWithContext(ctx aws.Context, input *CreateJobInput, opts ...request.Option) (*CreateJobResponse, error) {
  193. req, out := c.CreateJobRequest(input)
  194. req.SetContext(ctx)
  195. req.ApplyOptions(opts...)
  196. return out, req.Send()
  197. }
  198. const opCreatePipeline = "CreatePipeline"
  199. // CreatePipelineRequest generates a "aws/request.Request" representing the
  200. // client's request for the CreatePipeline operation. The "output" return
  201. // value will be populated with the request's response once the request completes
  202. // successfully.
  203. //
  204. // Use "Send" method on the returned Request to send the API call to the service.
  205. // the "output" return value is not valid until after Send returns without error.
  206. //
  207. // See CreatePipeline for more information on using the CreatePipeline
  208. // API call, and error handling.
  209. //
  210. // This method is useful when you want to inject custom logic or configuration
  211. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  212. //
  213. //
  214. // // Example sending a request using the CreatePipelineRequest method.
  215. // req, resp := client.CreatePipelineRequest(params)
  216. //
  217. // err := req.Send()
  218. // if err == nil { // resp is now filled
  219. // fmt.Println(resp)
  220. // }
  221. func (c *ElasticTranscoder) CreatePipelineRequest(input *CreatePipelineInput) (req *request.Request, output *CreatePipelineOutput) {
  222. op := &request.Operation{
  223. Name: opCreatePipeline,
  224. HTTPMethod: "POST",
  225. HTTPPath: "/2012-09-25/pipelines",
  226. }
  227. if input == nil {
  228. input = &CreatePipelineInput{}
  229. }
  230. output = &CreatePipelineOutput{}
  231. req = c.newRequest(op, input, output)
  232. return
  233. }
  234. // CreatePipeline API operation for Amazon Elastic Transcoder.
  235. //
  236. // The CreatePipeline operation creates a pipeline with settings that you specify.
  237. //
  238. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  239. // with awserr.Error's Code and Message methods to get detailed information about
  240. // the error.
  241. //
  242. // See the AWS API reference guide for Amazon Elastic Transcoder's
  243. // API operation CreatePipeline for usage and error information.
  244. //
  245. // Returned Error Codes:
  246. // * ErrCodeValidationException "ValidationException"
  247. // One or more required parameter values were not provided in the request.
  248. //
  249. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  250. //
  251. // * ErrCodeAccessDeniedException "AccessDeniedException"
  252. // General authentication failure. The request was not signed correctly.
  253. //
  254. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  255. // The requested resource does not exist or is not available. For example, the
  256. // pipeline to which you're trying to add a job doesn't exist or is still being
  257. // created.
  258. //
  259. // * ErrCodeLimitExceededException "LimitExceededException"
  260. // Too many operations for a given AWS account. For example, the number of pipelines
  261. // exceeds the maximum allowed.
  262. //
  263. // * ErrCodeInternalServiceException "InternalServiceException"
  264. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  265. // the request.
  266. //
  267. func (c *ElasticTranscoder) CreatePipeline(input *CreatePipelineInput) (*CreatePipelineOutput, error) {
  268. req, out := c.CreatePipelineRequest(input)
  269. return out, req.Send()
  270. }
  271. // CreatePipelineWithContext is the same as CreatePipeline with the addition of
  272. // the ability to pass a context and additional request options.
  273. //
  274. // See CreatePipeline for details on how to use this API operation.
  275. //
  276. // The context must be non-nil and will be used for request cancellation. If
  277. // the context is nil a panic will occur. In the future the SDK may create
  278. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  279. // for more information on using Contexts.
  280. func (c *ElasticTranscoder) CreatePipelineWithContext(ctx aws.Context, input *CreatePipelineInput, opts ...request.Option) (*CreatePipelineOutput, error) {
  281. req, out := c.CreatePipelineRequest(input)
  282. req.SetContext(ctx)
  283. req.ApplyOptions(opts...)
  284. return out, req.Send()
  285. }
  286. const opCreatePreset = "CreatePreset"
  287. // CreatePresetRequest generates a "aws/request.Request" representing the
  288. // client's request for the CreatePreset operation. The "output" return
  289. // value will be populated with the request's response once the request completes
  290. // successfully.
  291. //
  292. // Use "Send" method on the returned Request to send the API call to the service.
  293. // the "output" return value is not valid until after Send returns without error.
  294. //
  295. // See CreatePreset for more information on using the CreatePreset
  296. // API call, and error handling.
  297. //
  298. // This method is useful when you want to inject custom logic or configuration
  299. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  300. //
  301. //
  302. // // Example sending a request using the CreatePresetRequest method.
  303. // req, resp := client.CreatePresetRequest(params)
  304. //
  305. // err := req.Send()
  306. // if err == nil { // resp is now filled
  307. // fmt.Println(resp)
  308. // }
  309. func (c *ElasticTranscoder) CreatePresetRequest(input *CreatePresetInput) (req *request.Request, output *CreatePresetOutput) {
  310. op := &request.Operation{
  311. Name: opCreatePreset,
  312. HTTPMethod: "POST",
  313. HTTPPath: "/2012-09-25/presets",
  314. }
  315. if input == nil {
  316. input = &CreatePresetInput{}
  317. }
  318. output = &CreatePresetOutput{}
  319. req = c.newRequest(op, input, output)
  320. return
  321. }
  322. // CreatePreset API operation for Amazon Elastic Transcoder.
  323. //
  324. // The CreatePreset operation creates a preset with settings that you specify.
  325. //
  326. // Elastic Transcoder checks the CreatePreset settings to ensure that they meet
  327. // Elastic Transcoder requirements and to determine whether they comply with
  328. // H.264 standards. If your settings are not valid for Elastic Transcoder, Elastic
  329. // Transcoder returns an HTTP 400 response (ValidationException) and does not
  330. // create the preset. If the settings are valid for Elastic Transcoder but aren't
  331. // strictly compliant with the H.264 standard, Elastic Transcoder creates the
  332. // preset and returns a warning message in the response. This helps you determine
  333. // whether your settings comply with the H.264 standard while giving you greater
  334. // flexibility with respect to the video that Elastic Transcoder produces.
  335. //
  336. // Elastic Transcoder uses the H.264 video-compression format. For more information,
  337. // see the International Telecommunication Union publication Recommendation
  338. // ITU-T H.264: Advanced video coding for generic audiovisual services.
  339. //
  340. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  341. // with awserr.Error's Code and Message methods to get detailed information about
  342. // the error.
  343. //
  344. // See the AWS API reference guide for Amazon Elastic Transcoder's
  345. // API operation CreatePreset for usage and error information.
  346. //
  347. // Returned Error Codes:
  348. // * ErrCodeValidationException "ValidationException"
  349. // One or more required parameter values were not provided in the request.
  350. //
  351. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  352. //
  353. // * ErrCodeAccessDeniedException "AccessDeniedException"
  354. // General authentication failure. The request was not signed correctly.
  355. //
  356. // * ErrCodeLimitExceededException "LimitExceededException"
  357. // Too many operations for a given AWS account. For example, the number of pipelines
  358. // exceeds the maximum allowed.
  359. //
  360. // * ErrCodeInternalServiceException "InternalServiceException"
  361. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  362. // the request.
  363. //
  364. func (c *ElasticTranscoder) CreatePreset(input *CreatePresetInput) (*CreatePresetOutput, error) {
  365. req, out := c.CreatePresetRequest(input)
  366. return out, req.Send()
  367. }
  368. // CreatePresetWithContext is the same as CreatePreset with the addition of
  369. // the ability to pass a context and additional request options.
  370. //
  371. // See CreatePreset for details on how to use this API operation.
  372. //
  373. // The context must be non-nil and will be used for request cancellation. If
  374. // the context is nil a panic will occur. In the future the SDK may create
  375. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  376. // for more information on using Contexts.
  377. func (c *ElasticTranscoder) CreatePresetWithContext(ctx aws.Context, input *CreatePresetInput, opts ...request.Option) (*CreatePresetOutput, error) {
  378. req, out := c.CreatePresetRequest(input)
  379. req.SetContext(ctx)
  380. req.ApplyOptions(opts...)
  381. return out, req.Send()
  382. }
  383. const opDeletePipeline = "DeletePipeline"
  384. // DeletePipelineRequest generates a "aws/request.Request" representing the
  385. // client's request for the DeletePipeline operation. The "output" return
  386. // value will be populated with the request's response once the request completes
  387. // successfully.
  388. //
  389. // Use "Send" method on the returned Request to send the API call to the service.
  390. // the "output" return value is not valid until after Send returns without error.
  391. //
  392. // See DeletePipeline for more information on using the DeletePipeline
  393. // API call, and error handling.
  394. //
  395. // This method is useful when you want to inject custom logic or configuration
  396. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  397. //
  398. //
  399. // // Example sending a request using the DeletePipelineRequest method.
  400. // req, resp := client.DeletePipelineRequest(params)
  401. //
  402. // err := req.Send()
  403. // if err == nil { // resp is now filled
  404. // fmt.Println(resp)
  405. // }
  406. func (c *ElasticTranscoder) DeletePipelineRequest(input *DeletePipelineInput) (req *request.Request, output *DeletePipelineOutput) {
  407. op := &request.Operation{
  408. Name: opDeletePipeline,
  409. HTTPMethod: "DELETE",
  410. HTTPPath: "/2012-09-25/pipelines/{Id}",
  411. }
  412. if input == nil {
  413. input = &DeletePipelineInput{}
  414. }
  415. output = &DeletePipelineOutput{}
  416. req = c.newRequest(op, input, output)
  417. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  418. return
  419. }
  420. // DeletePipeline API operation for Amazon Elastic Transcoder.
  421. //
  422. // The DeletePipeline operation removes a pipeline.
  423. //
  424. // You can only delete a pipeline that has never been used or that is not currently
  425. // in use (doesn't contain any active jobs). If the pipeline is currently in
  426. // use, DeletePipeline returns an error.
  427. //
  428. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  429. // with awserr.Error's Code and Message methods to get detailed information about
  430. // the error.
  431. //
  432. // See the AWS API reference guide for Amazon Elastic Transcoder's
  433. // API operation DeletePipeline for usage and error information.
  434. //
  435. // Returned Error Codes:
  436. // * ErrCodeValidationException "ValidationException"
  437. // One or more required parameter values were not provided in the request.
  438. //
  439. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  440. //
  441. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  442. // The requested resource does not exist or is not available. For example, the
  443. // pipeline to which you're trying to add a job doesn't exist or is still being
  444. // created.
  445. //
  446. // * ErrCodeResourceInUseException "ResourceInUseException"
  447. // The resource you are attempting to change is in use. For example, you are
  448. // attempting to delete a pipeline that is currently in use.
  449. //
  450. // * ErrCodeAccessDeniedException "AccessDeniedException"
  451. // General authentication failure. The request was not signed correctly.
  452. //
  453. // * ErrCodeInternalServiceException "InternalServiceException"
  454. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  455. // the request.
  456. //
  457. func (c *ElasticTranscoder) DeletePipeline(input *DeletePipelineInput) (*DeletePipelineOutput, error) {
  458. req, out := c.DeletePipelineRequest(input)
  459. return out, req.Send()
  460. }
  461. // DeletePipelineWithContext is the same as DeletePipeline with the addition of
  462. // the ability to pass a context and additional request options.
  463. //
  464. // See DeletePipeline for details on how to use this API operation.
  465. //
  466. // The context must be non-nil and will be used for request cancellation. If
  467. // the context is nil a panic will occur. In the future the SDK may create
  468. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  469. // for more information on using Contexts.
  470. func (c *ElasticTranscoder) DeletePipelineWithContext(ctx aws.Context, input *DeletePipelineInput, opts ...request.Option) (*DeletePipelineOutput, error) {
  471. req, out := c.DeletePipelineRequest(input)
  472. req.SetContext(ctx)
  473. req.ApplyOptions(opts...)
  474. return out, req.Send()
  475. }
  476. const opDeletePreset = "DeletePreset"
  477. // DeletePresetRequest generates a "aws/request.Request" representing the
  478. // client's request for the DeletePreset operation. The "output" return
  479. // value will be populated with the request's response once the request completes
  480. // successfully.
  481. //
  482. // Use "Send" method on the returned Request to send the API call to the service.
  483. // the "output" return value is not valid until after Send returns without error.
  484. //
  485. // See DeletePreset for more information on using the DeletePreset
  486. // API call, and error handling.
  487. //
  488. // This method is useful when you want to inject custom logic or configuration
  489. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  490. //
  491. //
  492. // // Example sending a request using the DeletePresetRequest method.
  493. // req, resp := client.DeletePresetRequest(params)
  494. //
  495. // err := req.Send()
  496. // if err == nil { // resp is now filled
  497. // fmt.Println(resp)
  498. // }
  499. func (c *ElasticTranscoder) DeletePresetRequest(input *DeletePresetInput) (req *request.Request, output *DeletePresetOutput) {
  500. op := &request.Operation{
  501. Name: opDeletePreset,
  502. HTTPMethod: "DELETE",
  503. HTTPPath: "/2012-09-25/presets/{Id}",
  504. }
  505. if input == nil {
  506. input = &DeletePresetInput{}
  507. }
  508. output = &DeletePresetOutput{}
  509. req = c.newRequest(op, input, output)
  510. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  511. return
  512. }
  513. // DeletePreset API operation for Amazon Elastic Transcoder.
  514. //
  515. // The DeletePreset operation removes a preset that you've added in an AWS region.
  516. //
  517. // You can't delete the default presets that are included with Elastic Transcoder.
  518. //
  519. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  520. // with awserr.Error's Code and Message methods to get detailed information about
  521. // the error.
  522. //
  523. // See the AWS API reference guide for Amazon Elastic Transcoder's
  524. // API operation DeletePreset for usage and error information.
  525. //
  526. // Returned Error Codes:
  527. // * ErrCodeValidationException "ValidationException"
  528. // One or more required parameter values were not provided in the request.
  529. //
  530. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  531. //
  532. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  533. // The requested resource does not exist or is not available. For example, the
  534. // pipeline to which you're trying to add a job doesn't exist or is still being
  535. // created.
  536. //
  537. // * ErrCodeAccessDeniedException "AccessDeniedException"
  538. // General authentication failure. The request was not signed correctly.
  539. //
  540. // * ErrCodeInternalServiceException "InternalServiceException"
  541. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  542. // the request.
  543. //
  544. func (c *ElasticTranscoder) DeletePreset(input *DeletePresetInput) (*DeletePresetOutput, error) {
  545. req, out := c.DeletePresetRequest(input)
  546. return out, req.Send()
  547. }
  548. // DeletePresetWithContext is the same as DeletePreset with the addition of
  549. // the ability to pass a context and additional request options.
  550. //
  551. // See DeletePreset for details on how to use this API operation.
  552. //
  553. // The context must be non-nil and will be used for request cancellation. If
  554. // the context is nil a panic will occur. In the future the SDK may create
  555. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  556. // for more information on using Contexts.
  557. func (c *ElasticTranscoder) DeletePresetWithContext(ctx aws.Context, input *DeletePresetInput, opts ...request.Option) (*DeletePresetOutput, error) {
  558. req, out := c.DeletePresetRequest(input)
  559. req.SetContext(ctx)
  560. req.ApplyOptions(opts...)
  561. return out, req.Send()
  562. }
  563. const opListJobsByPipeline = "ListJobsByPipeline"
  564. // ListJobsByPipelineRequest generates a "aws/request.Request" representing the
  565. // client's request for the ListJobsByPipeline operation. The "output" return
  566. // value will be populated with the request's response once the request completes
  567. // successfully.
  568. //
  569. // Use "Send" method on the returned Request to send the API call to the service.
  570. // the "output" return value is not valid until after Send returns without error.
  571. //
  572. // See ListJobsByPipeline for more information on using the ListJobsByPipeline
  573. // API call, and error handling.
  574. //
  575. // This method is useful when you want to inject custom logic or configuration
  576. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  577. //
  578. //
  579. // // Example sending a request using the ListJobsByPipelineRequest method.
  580. // req, resp := client.ListJobsByPipelineRequest(params)
  581. //
  582. // err := req.Send()
  583. // if err == nil { // resp is now filled
  584. // fmt.Println(resp)
  585. // }
  586. func (c *ElasticTranscoder) ListJobsByPipelineRequest(input *ListJobsByPipelineInput) (req *request.Request, output *ListJobsByPipelineOutput) {
  587. op := &request.Operation{
  588. Name: opListJobsByPipeline,
  589. HTTPMethod: "GET",
  590. HTTPPath: "/2012-09-25/jobsByPipeline/{PipelineId}",
  591. Paginator: &request.Paginator{
  592. InputTokens: []string{"PageToken"},
  593. OutputTokens: []string{"NextPageToken"},
  594. LimitToken: "",
  595. TruncationToken: "",
  596. },
  597. }
  598. if input == nil {
  599. input = &ListJobsByPipelineInput{}
  600. }
  601. output = &ListJobsByPipelineOutput{}
  602. req = c.newRequest(op, input, output)
  603. return
  604. }
  605. // ListJobsByPipeline API operation for Amazon Elastic Transcoder.
  606. //
  607. // The ListJobsByPipeline operation gets a list of the jobs currently in a pipeline.
  608. //
  609. // Elastic Transcoder returns all of the jobs currently in the specified pipeline.
  610. // The response body contains one element for each job that satisfies the search
  611. // criteria.
  612. //
  613. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  614. // with awserr.Error's Code and Message methods to get detailed information about
  615. // the error.
  616. //
  617. // See the AWS API reference guide for Amazon Elastic Transcoder's
  618. // API operation ListJobsByPipeline for usage and error information.
  619. //
  620. // Returned Error Codes:
  621. // * ErrCodeValidationException "ValidationException"
  622. // One or more required parameter values were not provided in the request.
  623. //
  624. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  625. //
  626. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  627. // The requested resource does not exist or is not available. For example, the
  628. // pipeline to which you're trying to add a job doesn't exist or is still being
  629. // created.
  630. //
  631. // * ErrCodeAccessDeniedException "AccessDeniedException"
  632. // General authentication failure. The request was not signed correctly.
  633. //
  634. // * ErrCodeInternalServiceException "InternalServiceException"
  635. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  636. // the request.
  637. //
  638. func (c *ElasticTranscoder) ListJobsByPipeline(input *ListJobsByPipelineInput) (*ListJobsByPipelineOutput, error) {
  639. req, out := c.ListJobsByPipelineRequest(input)
  640. return out, req.Send()
  641. }
  642. // ListJobsByPipelineWithContext is the same as ListJobsByPipeline with the addition of
  643. // the ability to pass a context and additional request options.
  644. //
  645. // See ListJobsByPipeline for details on how to use this API operation.
  646. //
  647. // The context must be non-nil and will be used for request cancellation. If
  648. // the context is nil a panic will occur. In the future the SDK may create
  649. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  650. // for more information on using Contexts.
  651. func (c *ElasticTranscoder) ListJobsByPipelineWithContext(ctx aws.Context, input *ListJobsByPipelineInput, opts ...request.Option) (*ListJobsByPipelineOutput, error) {
  652. req, out := c.ListJobsByPipelineRequest(input)
  653. req.SetContext(ctx)
  654. req.ApplyOptions(opts...)
  655. return out, req.Send()
  656. }
  657. // ListJobsByPipelinePages iterates over the pages of a ListJobsByPipeline operation,
  658. // calling the "fn" function with the response data for each page. To stop
  659. // iterating, return false from the fn function.
  660. //
  661. // See ListJobsByPipeline method for more information on how to use this operation.
  662. //
  663. // Note: This operation can generate multiple requests to a service.
  664. //
  665. // // Example iterating over at most 3 pages of a ListJobsByPipeline operation.
  666. // pageNum := 0
  667. // err := client.ListJobsByPipelinePages(params,
  668. // func(page *ListJobsByPipelineOutput, lastPage bool) bool {
  669. // pageNum++
  670. // fmt.Println(page)
  671. // return pageNum <= 3
  672. // })
  673. //
  674. func (c *ElasticTranscoder) ListJobsByPipelinePages(input *ListJobsByPipelineInput, fn func(*ListJobsByPipelineOutput, bool) bool) error {
  675. return c.ListJobsByPipelinePagesWithContext(aws.BackgroundContext(), input, fn)
  676. }
  677. // ListJobsByPipelinePagesWithContext same as ListJobsByPipelinePages except
  678. // it takes a Context and allows setting request options on the pages.
  679. //
  680. // The context must be non-nil and will be used for request cancellation. If
  681. // the context is nil a panic will occur. In the future the SDK may create
  682. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  683. // for more information on using Contexts.
  684. func (c *ElasticTranscoder) ListJobsByPipelinePagesWithContext(ctx aws.Context, input *ListJobsByPipelineInput, fn func(*ListJobsByPipelineOutput, bool) bool, opts ...request.Option) error {
  685. p := request.Pagination{
  686. NewRequest: func() (*request.Request, error) {
  687. var inCpy *ListJobsByPipelineInput
  688. if input != nil {
  689. tmp := *input
  690. inCpy = &tmp
  691. }
  692. req, _ := c.ListJobsByPipelineRequest(inCpy)
  693. req.SetContext(ctx)
  694. req.ApplyOptions(opts...)
  695. return req, nil
  696. },
  697. }
  698. cont := true
  699. for p.Next() && cont {
  700. cont = fn(p.Page().(*ListJobsByPipelineOutput), !p.HasNextPage())
  701. }
  702. return p.Err()
  703. }
  704. const opListJobsByStatus = "ListJobsByStatus"
  705. // ListJobsByStatusRequest generates a "aws/request.Request" representing the
  706. // client's request for the ListJobsByStatus operation. The "output" return
  707. // value will be populated with the request's response once the request completes
  708. // successfully.
  709. //
  710. // Use "Send" method on the returned Request to send the API call to the service.
  711. // the "output" return value is not valid until after Send returns without error.
  712. //
  713. // See ListJobsByStatus for more information on using the ListJobsByStatus
  714. // API call, and error handling.
  715. //
  716. // This method is useful when you want to inject custom logic or configuration
  717. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  718. //
  719. //
  720. // // Example sending a request using the ListJobsByStatusRequest method.
  721. // req, resp := client.ListJobsByStatusRequest(params)
  722. //
  723. // err := req.Send()
  724. // if err == nil { // resp is now filled
  725. // fmt.Println(resp)
  726. // }
  727. func (c *ElasticTranscoder) ListJobsByStatusRequest(input *ListJobsByStatusInput) (req *request.Request, output *ListJobsByStatusOutput) {
  728. op := &request.Operation{
  729. Name: opListJobsByStatus,
  730. HTTPMethod: "GET",
  731. HTTPPath: "/2012-09-25/jobsByStatus/{Status}",
  732. Paginator: &request.Paginator{
  733. InputTokens: []string{"PageToken"},
  734. OutputTokens: []string{"NextPageToken"},
  735. LimitToken: "",
  736. TruncationToken: "",
  737. },
  738. }
  739. if input == nil {
  740. input = &ListJobsByStatusInput{}
  741. }
  742. output = &ListJobsByStatusOutput{}
  743. req = c.newRequest(op, input, output)
  744. return
  745. }
  746. // ListJobsByStatus API operation for Amazon Elastic Transcoder.
  747. //
  748. // The ListJobsByStatus operation gets a list of jobs that have a specified
  749. // status. The response body contains one element for each job that satisfies
  750. // the search criteria.
  751. //
  752. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  753. // with awserr.Error's Code and Message methods to get detailed information about
  754. // the error.
  755. //
  756. // See the AWS API reference guide for Amazon Elastic Transcoder's
  757. // API operation ListJobsByStatus for usage and error information.
  758. //
  759. // Returned Error Codes:
  760. // * ErrCodeValidationException "ValidationException"
  761. // One or more required parameter values were not provided in the request.
  762. //
  763. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  764. //
  765. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  766. // The requested resource does not exist or is not available. For example, the
  767. // pipeline to which you're trying to add a job doesn't exist or is still being
  768. // created.
  769. //
  770. // * ErrCodeAccessDeniedException "AccessDeniedException"
  771. // General authentication failure. The request was not signed correctly.
  772. //
  773. // * ErrCodeInternalServiceException "InternalServiceException"
  774. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  775. // the request.
  776. //
  777. func (c *ElasticTranscoder) ListJobsByStatus(input *ListJobsByStatusInput) (*ListJobsByStatusOutput, error) {
  778. req, out := c.ListJobsByStatusRequest(input)
  779. return out, req.Send()
  780. }
  781. // ListJobsByStatusWithContext is the same as ListJobsByStatus with the addition of
  782. // the ability to pass a context and additional request options.
  783. //
  784. // See ListJobsByStatus for details on how to use this API operation.
  785. //
  786. // The context must be non-nil and will be used for request cancellation. If
  787. // the context is nil a panic will occur. In the future the SDK may create
  788. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  789. // for more information on using Contexts.
  790. func (c *ElasticTranscoder) ListJobsByStatusWithContext(ctx aws.Context, input *ListJobsByStatusInput, opts ...request.Option) (*ListJobsByStatusOutput, error) {
  791. req, out := c.ListJobsByStatusRequest(input)
  792. req.SetContext(ctx)
  793. req.ApplyOptions(opts...)
  794. return out, req.Send()
  795. }
  796. // ListJobsByStatusPages iterates over the pages of a ListJobsByStatus operation,
  797. // calling the "fn" function with the response data for each page. To stop
  798. // iterating, return false from the fn function.
  799. //
  800. // See ListJobsByStatus method for more information on how to use this operation.
  801. //
  802. // Note: This operation can generate multiple requests to a service.
  803. //
  804. // // Example iterating over at most 3 pages of a ListJobsByStatus operation.
  805. // pageNum := 0
  806. // err := client.ListJobsByStatusPages(params,
  807. // func(page *ListJobsByStatusOutput, lastPage bool) bool {
  808. // pageNum++
  809. // fmt.Println(page)
  810. // return pageNum <= 3
  811. // })
  812. //
  813. func (c *ElasticTranscoder) ListJobsByStatusPages(input *ListJobsByStatusInput, fn func(*ListJobsByStatusOutput, bool) bool) error {
  814. return c.ListJobsByStatusPagesWithContext(aws.BackgroundContext(), input, fn)
  815. }
  816. // ListJobsByStatusPagesWithContext same as ListJobsByStatusPages except
  817. // it takes a Context and allows setting request options on the pages.
  818. //
  819. // The context must be non-nil and will be used for request cancellation. If
  820. // the context is nil a panic will occur. In the future the SDK may create
  821. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  822. // for more information on using Contexts.
  823. func (c *ElasticTranscoder) ListJobsByStatusPagesWithContext(ctx aws.Context, input *ListJobsByStatusInput, fn func(*ListJobsByStatusOutput, bool) bool, opts ...request.Option) error {
  824. p := request.Pagination{
  825. NewRequest: func() (*request.Request, error) {
  826. var inCpy *ListJobsByStatusInput
  827. if input != nil {
  828. tmp := *input
  829. inCpy = &tmp
  830. }
  831. req, _ := c.ListJobsByStatusRequest(inCpy)
  832. req.SetContext(ctx)
  833. req.ApplyOptions(opts...)
  834. return req, nil
  835. },
  836. }
  837. cont := true
  838. for p.Next() && cont {
  839. cont = fn(p.Page().(*ListJobsByStatusOutput), !p.HasNextPage())
  840. }
  841. return p.Err()
  842. }
  843. const opListPipelines = "ListPipelines"
  844. // ListPipelinesRequest generates a "aws/request.Request" representing the
  845. // client's request for the ListPipelines operation. The "output" return
  846. // value will be populated with the request's response once the request completes
  847. // successfully.
  848. //
  849. // Use "Send" method on the returned Request to send the API call to the service.
  850. // the "output" return value is not valid until after Send returns without error.
  851. //
  852. // See ListPipelines for more information on using the ListPipelines
  853. // API call, and error handling.
  854. //
  855. // This method is useful when you want to inject custom logic or configuration
  856. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  857. //
  858. //
  859. // // Example sending a request using the ListPipelinesRequest method.
  860. // req, resp := client.ListPipelinesRequest(params)
  861. //
  862. // err := req.Send()
  863. // if err == nil { // resp is now filled
  864. // fmt.Println(resp)
  865. // }
  866. func (c *ElasticTranscoder) ListPipelinesRequest(input *ListPipelinesInput) (req *request.Request, output *ListPipelinesOutput) {
  867. op := &request.Operation{
  868. Name: opListPipelines,
  869. HTTPMethod: "GET",
  870. HTTPPath: "/2012-09-25/pipelines",
  871. Paginator: &request.Paginator{
  872. InputTokens: []string{"PageToken"},
  873. OutputTokens: []string{"NextPageToken"},
  874. LimitToken: "",
  875. TruncationToken: "",
  876. },
  877. }
  878. if input == nil {
  879. input = &ListPipelinesInput{}
  880. }
  881. output = &ListPipelinesOutput{}
  882. req = c.newRequest(op, input, output)
  883. return
  884. }
  885. // ListPipelines API operation for Amazon Elastic Transcoder.
  886. //
  887. // The ListPipelines operation gets a list of the pipelines associated with
  888. // the current AWS account.
  889. //
  890. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  891. // with awserr.Error's Code and Message methods to get detailed information about
  892. // the error.
  893. //
  894. // See the AWS API reference guide for Amazon Elastic Transcoder's
  895. // API operation ListPipelines for usage and error information.
  896. //
  897. // Returned Error Codes:
  898. // * ErrCodeValidationException "ValidationException"
  899. // One or more required parameter values were not provided in the request.
  900. //
  901. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  902. //
  903. // * ErrCodeAccessDeniedException "AccessDeniedException"
  904. // General authentication failure. The request was not signed correctly.
  905. //
  906. // * ErrCodeInternalServiceException "InternalServiceException"
  907. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  908. // the request.
  909. //
  910. func (c *ElasticTranscoder) ListPipelines(input *ListPipelinesInput) (*ListPipelinesOutput, error) {
  911. req, out := c.ListPipelinesRequest(input)
  912. return out, req.Send()
  913. }
  914. // ListPipelinesWithContext is the same as ListPipelines with the addition of
  915. // the ability to pass a context and additional request options.
  916. //
  917. // See ListPipelines for details on how to use this API operation.
  918. //
  919. // The context must be non-nil and will be used for request cancellation. If
  920. // the context is nil a panic will occur. In the future the SDK may create
  921. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  922. // for more information on using Contexts.
  923. func (c *ElasticTranscoder) ListPipelinesWithContext(ctx aws.Context, input *ListPipelinesInput, opts ...request.Option) (*ListPipelinesOutput, error) {
  924. req, out := c.ListPipelinesRequest(input)
  925. req.SetContext(ctx)
  926. req.ApplyOptions(opts...)
  927. return out, req.Send()
  928. }
  929. // ListPipelinesPages iterates over the pages of a ListPipelines operation,
  930. // calling the "fn" function with the response data for each page. To stop
  931. // iterating, return false from the fn function.
  932. //
  933. // See ListPipelines method for more information on how to use this operation.
  934. //
  935. // Note: This operation can generate multiple requests to a service.
  936. //
  937. // // Example iterating over at most 3 pages of a ListPipelines operation.
  938. // pageNum := 0
  939. // err := client.ListPipelinesPages(params,
  940. // func(page *ListPipelinesOutput, lastPage bool) bool {
  941. // pageNum++
  942. // fmt.Println(page)
  943. // return pageNum <= 3
  944. // })
  945. //
  946. func (c *ElasticTranscoder) ListPipelinesPages(input *ListPipelinesInput, fn func(*ListPipelinesOutput, bool) bool) error {
  947. return c.ListPipelinesPagesWithContext(aws.BackgroundContext(), input, fn)
  948. }
  949. // ListPipelinesPagesWithContext same as ListPipelinesPages except
  950. // it takes a Context and allows setting request options on the pages.
  951. //
  952. // The context must be non-nil and will be used for request cancellation. If
  953. // the context is nil a panic will occur. In the future the SDK may create
  954. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  955. // for more information on using Contexts.
  956. func (c *ElasticTranscoder) ListPipelinesPagesWithContext(ctx aws.Context, input *ListPipelinesInput, fn func(*ListPipelinesOutput, bool) bool, opts ...request.Option) error {
  957. p := request.Pagination{
  958. NewRequest: func() (*request.Request, error) {
  959. var inCpy *ListPipelinesInput
  960. if input != nil {
  961. tmp := *input
  962. inCpy = &tmp
  963. }
  964. req, _ := c.ListPipelinesRequest(inCpy)
  965. req.SetContext(ctx)
  966. req.ApplyOptions(opts...)
  967. return req, nil
  968. },
  969. }
  970. cont := true
  971. for p.Next() && cont {
  972. cont = fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage())
  973. }
  974. return p.Err()
  975. }
  976. const opListPresets = "ListPresets"
  977. // ListPresetsRequest generates a "aws/request.Request" representing the
  978. // client's request for the ListPresets operation. The "output" return
  979. // value will be populated with the request's response once the request completes
  980. // successfully.
  981. //
  982. // Use "Send" method on the returned Request to send the API call to the service.
  983. // the "output" return value is not valid until after Send returns without error.
  984. //
  985. // See ListPresets for more information on using the ListPresets
  986. // API call, and error handling.
  987. //
  988. // This method is useful when you want to inject custom logic or configuration
  989. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  990. //
  991. //
  992. // // Example sending a request using the ListPresetsRequest method.
  993. // req, resp := client.ListPresetsRequest(params)
  994. //
  995. // err := req.Send()
  996. // if err == nil { // resp is now filled
  997. // fmt.Println(resp)
  998. // }
  999. func (c *ElasticTranscoder) ListPresetsRequest(input *ListPresetsInput) (req *request.Request, output *ListPresetsOutput) {
  1000. op := &request.Operation{
  1001. Name: opListPresets,
  1002. HTTPMethod: "GET",
  1003. HTTPPath: "/2012-09-25/presets",
  1004. Paginator: &request.Paginator{
  1005. InputTokens: []string{"PageToken"},
  1006. OutputTokens: []string{"NextPageToken"},
  1007. LimitToken: "",
  1008. TruncationToken: "",
  1009. },
  1010. }
  1011. if input == nil {
  1012. input = &ListPresetsInput{}
  1013. }
  1014. output = &ListPresetsOutput{}
  1015. req = c.newRequest(op, input, output)
  1016. return
  1017. }
  1018. // ListPresets API operation for Amazon Elastic Transcoder.
  1019. //
  1020. // The ListPresets operation gets a list of the default presets included with
  1021. // Elastic Transcoder and the presets that you've added in an AWS region.
  1022. //
  1023. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1024. // with awserr.Error's Code and Message methods to get detailed information about
  1025. // the error.
  1026. //
  1027. // See the AWS API reference guide for Amazon Elastic Transcoder's
  1028. // API operation ListPresets for usage and error information.
  1029. //
  1030. // Returned Error Codes:
  1031. // * ErrCodeValidationException "ValidationException"
  1032. // One or more required parameter values were not provided in the request.
  1033. //
  1034. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  1035. //
  1036. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1037. // General authentication failure. The request was not signed correctly.
  1038. //
  1039. // * ErrCodeInternalServiceException "InternalServiceException"
  1040. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  1041. // the request.
  1042. //
  1043. func (c *ElasticTranscoder) ListPresets(input *ListPresetsInput) (*ListPresetsOutput, error) {
  1044. req, out := c.ListPresetsRequest(input)
  1045. return out, req.Send()
  1046. }
  1047. // ListPresetsWithContext is the same as ListPresets with the addition of
  1048. // the ability to pass a context and additional request options.
  1049. //
  1050. // See ListPresets for details on how to use this API operation.
  1051. //
  1052. // The context must be non-nil and will be used for request cancellation. If
  1053. // the context is nil a panic will occur. In the future the SDK may create
  1054. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1055. // for more information on using Contexts.
  1056. func (c *ElasticTranscoder) ListPresetsWithContext(ctx aws.Context, input *ListPresetsInput, opts ...request.Option) (*ListPresetsOutput, error) {
  1057. req, out := c.ListPresetsRequest(input)
  1058. req.SetContext(ctx)
  1059. req.ApplyOptions(opts...)
  1060. return out, req.Send()
  1061. }
  1062. // ListPresetsPages iterates over the pages of a ListPresets operation,
  1063. // calling the "fn" function with the response data for each page. To stop
  1064. // iterating, return false from the fn function.
  1065. //
  1066. // See ListPresets method for more information on how to use this operation.
  1067. //
  1068. // Note: This operation can generate multiple requests to a service.
  1069. //
  1070. // // Example iterating over at most 3 pages of a ListPresets operation.
  1071. // pageNum := 0
  1072. // err := client.ListPresetsPages(params,
  1073. // func(page *ListPresetsOutput, lastPage bool) bool {
  1074. // pageNum++
  1075. // fmt.Println(page)
  1076. // return pageNum <= 3
  1077. // })
  1078. //
  1079. func (c *ElasticTranscoder) ListPresetsPages(input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool) error {
  1080. return c.ListPresetsPagesWithContext(aws.BackgroundContext(), input, fn)
  1081. }
  1082. // ListPresetsPagesWithContext same as ListPresetsPages except
  1083. // it takes a Context and allows setting request options on the pages.
  1084. //
  1085. // The context must be non-nil and will be used for request cancellation. If
  1086. // the context is nil a panic will occur. In the future the SDK may create
  1087. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1088. // for more information on using Contexts.
  1089. func (c *ElasticTranscoder) ListPresetsPagesWithContext(ctx aws.Context, input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool, opts ...request.Option) error {
  1090. p := request.Pagination{
  1091. NewRequest: func() (*request.Request, error) {
  1092. var inCpy *ListPresetsInput
  1093. if input != nil {
  1094. tmp := *input
  1095. inCpy = &tmp
  1096. }
  1097. req, _ := c.ListPresetsRequest(inCpy)
  1098. req.SetContext(ctx)
  1099. req.ApplyOptions(opts...)
  1100. return req, nil
  1101. },
  1102. }
  1103. cont := true
  1104. for p.Next() && cont {
  1105. cont = fn(p.Page().(*ListPresetsOutput), !p.HasNextPage())
  1106. }
  1107. return p.Err()
  1108. }
  1109. const opReadJob = "ReadJob"
  1110. // ReadJobRequest generates a "aws/request.Request" representing the
  1111. // client's request for the ReadJob operation. The "output" return
  1112. // value will be populated with the request's response once the request completes
  1113. // successfully.
  1114. //
  1115. // Use "Send" method on the returned Request to send the API call to the service.
  1116. // the "output" return value is not valid until after Send returns without error.
  1117. //
  1118. // See ReadJob for more information on using the ReadJob
  1119. // API call, and error handling.
  1120. //
  1121. // This method is useful when you want to inject custom logic or configuration
  1122. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1123. //
  1124. //
  1125. // // Example sending a request using the ReadJobRequest method.
  1126. // req, resp := client.ReadJobRequest(params)
  1127. //
  1128. // err := req.Send()
  1129. // if err == nil { // resp is now filled
  1130. // fmt.Println(resp)
  1131. // }
  1132. func (c *ElasticTranscoder) ReadJobRequest(input *ReadJobInput) (req *request.Request, output *ReadJobOutput) {
  1133. op := &request.Operation{
  1134. Name: opReadJob,
  1135. HTTPMethod: "GET",
  1136. HTTPPath: "/2012-09-25/jobs/{Id}",
  1137. }
  1138. if input == nil {
  1139. input = &ReadJobInput{}
  1140. }
  1141. output = &ReadJobOutput{}
  1142. req = c.newRequest(op, input, output)
  1143. return
  1144. }
  1145. // ReadJob API operation for Amazon Elastic Transcoder.
  1146. //
  1147. // The ReadJob operation returns detailed information about a job.
  1148. //
  1149. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1150. // with awserr.Error's Code and Message methods to get detailed information about
  1151. // the error.
  1152. //
  1153. // See the AWS API reference guide for Amazon Elastic Transcoder's
  1154. // API operation ReadJob for usage and error information.
  1155. //
  1156. // Returned Error Codes:
  1157. // * ErrCodeValidationException "ValidationException"
  1158. // One or more required parameter values were not provided in the request.
  1159. //
  1160. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  1161. //
  1162. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1163. // The requested resource does not exist or is not available. For example, the
  1164. // pipeline to which you're trying to add a job doesn't exist or is still being
  1165. // created.
  1166. //
  1167. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1168. // General authentication failure. The request was not signed correctly.
  1169. //
  1170. // * ErrCodeInternalServiceException "InternalServiceException"
  1171. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  1172. // the request.
  1173. //
  1174. func (c *ElasticTranscoder) ReadJob(input *ReadJobInput) (*ReadJobOutput, error) {
  1175. req, out := c.ReadJobRequest(input)
  1176. return out, req.Send()
  1177. }
  1178. // ReadJobWithContext is the same as ReadJob with the addition of
  1179. // the ability to pass a context and additional request options.
  1180. //
  1181. // See ReadJob for details on how to use this API operation.
  1182. //
  1183. // The context must be non-nil and will be used for request cancellation. If
  1184. // the context is nil a panic will occur. In the future the SDK may create
  1185. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1186. // for more information on using Contexts.
  1187. func (c *ElasticTranscoder) ReadJobWithContext(ctx aws.Context, input *ReadJobInput, opts ...request.Option) (*ReadJobOutput, error) {
  1188. req, out := c.ReadJobRequest(input)
  1189. req.SetContext(ctx)
  1190. req.ApplyOptions(opts...)
  1191. return out, req.Send()
  1192. }
  1193. const opReadPipeline = "ReadPipeline"
  1194. // ReadPipelineRequest generates a "aws/request.Request" representing the
  1195. // client's request for the ReadPipeline operation. The "output" return
  1196. // value will be populated with the request's response once the request completes
  1197. // successfully.
  1198. //
  1199. // Use "Send" method on the returned Request to send the API call to the service.
  1200. // the "output" return value is not valid until after Send returns without error.
  1201. //
  1202. // See ReadPipeline for more information on using the ReadPipeline
  1203. // API call, and error handling.
  1204. //
  1205. // This method is useful when you want to inject custom logic or configuration
  1206. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1207. //
  1208. //
  1209. // // Example sending a request using the ReadPipelineRequest method.
  1210. // req, resp := client.ReadPipelineRequest(params)
  1211. //
  1212. // err := req.Send()
  1213. // if err == nil { // resp is now filled
  1214. // fmt.Println(resp)
  1215. // }
  1216. func (c *ElasticTranscoder) ReadPipelineRequest(input *ReadPipelineInput) (req *request.Request, output *ReadPipelineOutput) {
  1217. op := &request.Operation{
  1218. Name: opReadPipeline,
  1219. HTTPMethod: "GET",
  1220. HTTPPath: "/2012-09-25/pipelines/{Id}",
  1221. }
  1222. if input == nil {
  1223. input = &ReadPipelineInput{}
  1224. }
  1225. output = &ReadPipelineOutput{}
  1226. req = c.newRequest(op, input, output)
  1227. return
  1228. }
  1229. // ReadPipeline API operation for Amazon Elastic Transcoder.
  1230. //
  1231. // The ReadPipeline operation gets detailed information about a pipeline.
  1232. //
  1233. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1234. // with awserr.Error's Code and Message methods to get detailed information about
  1235. // the error.
  1236. //
  1237. // See the AWS API reference guide for Amazon Elastic Transcoder's
  1238. // API operation ReadPipeline for usage and error information.
  1239. //
  1240. // Returned Error Codes:
  1241. // * ErrCodeValidationException "ValidationException"
  1242. // One or more required parameter values were not provided in the request.
  1243. //
  1244. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  1245. //
  1246. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1247. // The requested resource does not exist or is not available. For example, the
  1248. // pipeline to which you're trying to add a job doesn't exist or is still being
  1249. // created.
  1250. //
  1251. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1252. // General authentication failure. The request was not signed correctly.
  1253. //
  1254. // * ErrCodeInternalServiceException "InternalServiceException"
  1255. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  1256. // the request.
  1257. //
  1258. func (c *ElasticTranscoder) ReadPipeline(input *ReadPipelineInput) (*ReadPipelineOutput, error) {
  1259. req, out := c.ReadPipelineRequest(input)
  1260. return out, req.Send()
  1261. }
  1262. // ReadPipelineWithContext is the same as ReadPipeline with the addition of
  1263. // the ability to pass a context and additional request options.
  1264. //
  1265. // See ReadPipeline for details on how to use this API operation.
  1266. //
  1267. // The context must be non-nil and will be used for request cancellation. If
  1268. // the context is nil a panic will occur. In the future the SDK may create
  1269. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1270. // for more information on using Contexts.
  1271. func (c *ElasticTranscoder) ReadPipelineWithContext(ctx aws.Context, input *ReadPipelineInput, opts ...request.Option) (*ReadPipelineOutput, error) {
  1272. req, out := c.ReadPipelineRequest(input)
  1273. req.SetContext(ctx)
  1274. req.ApplyOptions(opts...)
  1275. return out, req.Send()
  1276. }
  1277. const opReadPreset = "ReadPreset"
  1278. // ReadPresetRequest generates a "aws/request.Request" representing the
  1279. // client's request for the ReadPreset operation. The "output" return
  1280. // value will be populated with the request's response once the request completes
  1281. // successfully.
  1282. //
  1283. // Use "Send" method on the returned Request to send the API call to the service.
  1284. // the "output" return value is not valid until after Send returns without error.
  1285. //
  1286. // See ReadPreset for more information on using the ReadPreset
  1287. // API call, and error handling.
  1288. //
  1289. // This method is useful when you want to inject custom logic or configuration
  1290. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1291. //
  1292. //
  1293. // // Example sending a request using the ReadPresetRequest method.
  1294. // req, resp := client.ReadPresetRequest(params)
  1295. //
  1296. // err := req.Send()
  1297. // if err == nil { // resp is now filled
  1298. // fmt.Println(resp)
  1299. // }
  1300. func (c *ElasticTranscoder) ReadPresetRequest(input *ReadPresetInput) (req *request.Request, output *ReadPresetOutput) {
  1301. op := &request.Operation{
  1302. Name: opReadPreset,
  1303. HTTPMethod: "GET",
  1304. HTTPPath: "/2012-09-25/presets/{Id}",
  1305. }
  1306. if input == nil {
  1307. input = &ReadPresetInput{}
  1308. }
  1309. output = &ReadPresetOutput{}
  1310. req = c.newRequest(op, input, output)
  1311. return
  1312. }
  1313. // ReadPreset API operation for Amazon Elastic Transcoder.
  1314. //
  1315. // The ReadPreset operation gets detailed information about a preset.
  1316. //
  1317. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1318. // with awserr.Error's Code and Message methods to get detailed information about
  1319. // the error.
  1320. //
  1321. // See the AWS API reference guide for Amazon Elastic Transcoder's
  1322. // API operation ReadPreset for usage and error information.
  1323. //
  1324. // Returned Error Codes:
  1325. // * ErrCodeValidationException "ValidationException"
  1326. // One or more required parameter values were not provided in the request.
  1327. //
  1328. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  1329. //
  1330. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1331. // The requested resource does not exist or is not available. For example, the
  1332. // pipeline to which you're trying to add a job doesn't exist or is still being
  1333. // created.
  1334. //
  1335. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1336. // General authentication failure. The request was not signed correctly.
  1337. //
  1338. // * ErrCodeInternalServiceException "InternalServiceException"
  1339. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  1340. // the request.
  1341. //
  1342. func (c *ElasticTranscoder) ReadPreset(input *ReadPresetInput) (*ReadPresetOutput, error) {
  1343. req, out := c.ReadPresetRequest(input)
  1344. return out, req.Send()
  1345. }
  1346. // ReadPresetWithContext is the same as ReadPreset with the addition of
  1347. // the ability to pass a context and additional request options.
  1348. //
  1349. // See ReadPreset for details on how to use this API operation.
  1350. //
  1351. // The context must be non-nil and will be used for request cancellation. If
  1352. // the context is nil a panic will occur. In the future the SDK may create
  1353. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1354. // for more information on using Contexts.
  1355. func (c *ElasticTranscoder) ReadPresetWithContext(ctx aws.Context, input *ReadPresetInput, opts ...request.Option) (*ReadPresetOutput, error) {
  1356. req, out := c.ReadPresetRequest(input)
  1357. req.SetContext(ctx)
  1358. req.ApplyOptions(opts...)
  1359. return out, req.Send()
  1360. }
  1361. const opTestRole = "TestRole"
  1362. // TestRoleRequest generates a "aws/request.Request" representing the
  1363. // client's request for the TestRole operation. The "output" return
  1364. // value will be populated with the request's response once the request completes
  1365. // successfully.
  1366. //
  1367. // Use "Send" method on the returned Request to send the API call to the service.
  1368. // the "output" return value is not valid until after Send returns without error.
  1369. //
  1370. // See TestRole for more information on using the TestRole
  1371. // API call, and error handling.
  1372. //
  1373. // This method is useful when you want to inject custom logic or configuration
  1374. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1375. //
  1376. //
  1377. // // Example sending a request using the TestRoleRequest method.
  1378. // req, resp := client.TestRoleRequest(params)
  1379. //
  1380. // err := req.Send()
  1381. // if err == nil { // resp is now filled
  1382. // fmt.Println(resp)
  1383. // }
  1384. //
  1385. // Deprecated: TestRole has been deprecated
  1386. func (c *ElasticTranscoder) TestRoleRequest(input *TestRoleInput) (req *request.Request, output *TestRoleOutput) {
  1387. if c.Client.Config.Logger != nil {
  1388. c.Client.Config.Logger.Log("This operation, TestRole, has been deprecated")
  1389. }
  1390. op := &request.Operation{
  1391. Name: opTestRole,
  1392. HTTPMethod: "POST",
  1393. HTTPPath: "/2012-09-25/roleTests",
  1394. }
  1395. if input == nil {
  1396. input = &TestRoleInput{}
  1397. }
  1398. output = &TestRoleOutput{}
  1399. req = c.newRequest(op, input, output)
  1400. return
  1401. }
  1402. // TestRole API operation for Amazon Elastic Transcoder.
  1403. //
  1404. // The TestRole operation tests the IAM role used to create the pipeline.
  1405. //
  1406. // The TestRole action lets you determine whether the IAM role you are using
  1407. // has sufficient permissions to let Elastic Transcoder perform tasks associated
  1408. // with the transcoding process. The action attempts to assume the specified
  1409. // IAM role, checks read access to the input and output buckets, and tries to
  1410. // send a test notification to Amazon SNS topics that you specify.
  1411. //
  1412. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1413. // with awserr.Error's Code and Message methods to get detailed information about
  1414. // the error.
  1415. //
  1416. // See the AWS API reference guide for Amazon Elastic Transcoder's
  1417. // API operation TestRole for usage and error information.
  1418. //
  1419. // Returned Error Codes:
  1420. // * ErrCodeValidationException "ValidationException"
  1421. // One or more required parameter values were not provided in the request.
  1422. //
  1423. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  1424. //
  1425. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1426. // The requested resource does not exist or is not available. For example, the
  1427. // pipeline to which you're trying to add a job doesn't exist or is still being
  1428. // created.
  1429. //
  1430. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1431. // General authentication failure. The request was not signed correctly.
  1432. //
  1433. // * ErrCodeInternalServiceException "InternalServiceException"
  1434. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  1435. // the request.
  1436. //
  1437. //
  1438. // Deprecated: TestRole has been deprecated
  1439. func (c *ElasticTranscoder) TestRole(input *TestRoleInput) (*TestRoleOutput, error) {
  1440. req, out := c.TestRoleRequest(input)
  1441. return out, req.Send()
  1442. }
  1443. // TestRoleWithContext is the same as TestRole with the addition of
  1444. // the ability to pass a context and additional request options.
  1445. //
  1446. // See TestRole for details on how to use this API operation.
  1447. //
  1448. // The context must be non-nil and will be used for request cancellation. If
  1449. // the context is nil a panic will occur. In the future the SDK may create
  1450. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1451. // for more information on using Contexts.
  1452. //
  1453. // Deprecated: TestRoleWithContext has been deprecated
  1454. func (c *ElasticTranscoder) TestRoleWithContext(ctx aws.Context, input *TestRoleInput, opts ...request.Option) (*TestRoleOutput, error) {
  1455. req, out := c.TestRoleRequest(input)
  1456. req.SetContext(ctx)
  1457. req.ApplyOptions(opts...)
  1458. return out, req.Send()
  1459. }
  1460. const opUpdatePipeline = "UpdatePipeline"
  1461. // UpdatePipelineRequest generates a "aws/request.Request" representing the
  1462. // client's request for the UpdatePipeline operation. The "output" return
  1463. // value will be populated with the request's response once the request completes
  1464. // successfully.
  1465. //
  1466. // Use "Send" method on the returned Request to send the API call to the service.
  1467. // the "output" return value is not valid until after Send returns without error.
  1468. //
  1469. // See UpdatePipeline for more information on using the UpdatePipeline
  1470. // API call, and error handling.
  1471. //
  1472. // This method is useful when you want to inject custom logic or configuration
  1473. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1474. //
  1475. //
  1476. // // Example sending a request using the UpdatePipelineRequest method.
  1477. // req, resp := client.UpdatePipelineRequest(params)
  1478. //
  1479. // err := req.Send()
  1480. // if err == nil { // resp is now filled
  1481. // fmt.Println(resp)
  1482. // }
  1483. func (c *ElasticTranscoder) UpdatePipelineRequest(input *UpdatePipelineInput) (req *request.Request, output *UpdatePipelineOutput) {
  1484. op := &request.Operation{
  1485. Name: opUpdatePipeline,
  1486. HTTPMethod: "PUT",
  1487. HTTPPath: "/2012-09-25/pipelines/{Id}",
  1488. }
  1489. if input == nil {
  1490. input = &UpdatePipelineInput{}
  1491. }
  1492. output = &UpdatePipelineOutput{}
  1493. req = c.newRequest(op, input, output)
  1494. return
  1495. }
  1496. // UpdatePipeline API operation for Amazon Elastic Transcoder.
  1497. //
  1498. // Use the UpdatePipeline operation to update settings for a pipeline.
  1499. //
  1500. // When you change pipeline settings, your changes take effect immediately.
  1501. // Jobs that you have already submitted and that Elastic Transcoder has not
  1502. // started to process are affected in addition to jobs that you submit after
  1503. // you change settings.
  1504. //
  1505. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1506. // with awserr.Error's Code and Message methods to get detailed information about
  1507. // the error.
  1508. //
  1509. // See the AWS API reference guide for Amazon Elastic Transcoder's
  1510. // API operation UpdatePipeline for usage and error information.
  1511. //
  1512. // Returned Error Codes:
  1513. // * ErrCodeValidationException "ValidationException"
  1514. // One or more required parameter values were not provided in the request.
  1515. //
  1516. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  1517. //
  1518. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1519. // General authentication failure. The request was not signed correctly.
  1520. //
  1521. // * ErrCodeResourceInUseException "ResourceInUseException"
  1522. // The resource you are attempting to change is in use. For example, you are
  1523. // attempting to delete a pipeline that is currently in use.
  1524. //
  1525. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1526. // The requested resource does not exist or is not available. For example, the
  1527. // pipeline to which you're trying to add a job doesn't exist or is still being
  1528. // created.
  1529. //
  1530. // * ErrCodeInternalServiceException "InternalServiceException"
  1531. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  1532. // the request.
  1533. //
  1534. func (c *ElasticTranscoder) UpdatePipeline(input *UpdatePipelineInput) (*UpdatePipelineOutput, error) {
  1535. req, out := c.UpdatePipelineRequest(input)
  1536. return out, req.Send()
  1537. }
  1538. // UpdatePipelineWithContext is the same as UpdatePipeline with the addition of
  1539. // the ability to pass a context and additional request options.
  1540. //
  1541. // See UpdatePipeline for details on how to use this API operation.
  1542. //
  1543. // The context must be non-nil and will be used for request cancellation. If
  1544. // the context is nil a panic will occur. In the future the SDK may create
  1545. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1546. // for more information on using Contexts.
  1547. func (c *ElasticTranscoder) UpdatePipelineWithContext(ctx aws.Context, input *UpdatePipelineInput, opts ...request.Option) (*UpdatePipelineOutput, error) {
  1548. req, out := c.UpdatePipelineRequest(input)
  1549. req.SetContext(ctx)
  1550. req.ApplyOptions(opts...)
  1551. return out, req.Send()
  1552. }
  1553. const opUpdatePipelineNotifications = "UpdatePipelineNotifications"
  1554. // UpdatePipelineNotificationsRequest generates a "aws/request.Request" representing the
  1555. // client's request for the UpdatePipelineNotifications operation. The "output" return
  1556. // value will be populated with the request's response once the request completes
  1557. // successfully.
  1558. //
  1559. // Use "Send" method on the returned Request to send the API call to the service.
  1560. // the "output" return value is not valid until after Send returns without error.
  1561. //
  1562. // See UpdatePipelineNotifications for more information on using the UpdatePipelineNotifications
  1563. // API call, and error handling.
  1564. //
  1565. // This method is useful when you want to inject custom logic or configuration
  1566. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1567. //
  1568. //
  1569. // // Example sending a request using the UpdatePipelineNotificationsRequest method.
  1570. // req, resp := client.UpdatePipelineNotificationsRequest(params)
  1571. //
  1572. // err := req.Send()
  1573. // if err == nil { // resp is now filled
  1574. // fmt.Println(resp)
  1575. // }
  1576. func (c *ElasticTranscoder) UpdatePipelineNotificationsRequest(input *UpdatePipelineNotificationsInput) (req *request.Request, output *UpdatePipelineNotificationsOutput) {
  1577. op := &request.Operation{
  1578. Name: opUpdatePipelineNotifications,
  1579. HTTPMethod: "POST",
  1580. HTTPPath: "/2012-09-25/pipelines/{Id}/notifications",
  1581. }
  1582. if input == nil {
  1583. input = &UpdatePipelineNotificationsInput{}
  1584. }
  1585. output = &UpdatePipelineNotificationsOutput{}
  1586. req = c.newRequest(op, input, output)
  1587. return
  1588. }
  1589. // UpdatePipelineNotifications API operation for Amazon Elastic Transcoder.
  1590. //
  1591. // With the UpdatePipelineNotifications operation, you can update Amazon Simple
  1592. // Notification Service (Amazon SNS) notifications for a pipeline.
  1593. //
  1594. // When you update notifications for a pipeline, Elastic Transcoder returns
  1595. // the values that you specified in the request.
  1596. //
  1597. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1598. // with awserr.Error's Code and Message methods to get detailed information about
  1599. // the error.
  1600. //
  1601. // See the AWS API reference guide for Amazon Elastic Transcoder's
  1602. // API operation UpdatePipelineNotifications for usage and error information.
  1603. //
  1604. // Returned Error Codes:
  1605. // * ErrCodeValidationException "ValidationException"
  1606. // One or more required parameter values were not provided in the request.
  1607. //
  1608. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  1609. //
  1610. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1611. // The requested resource does not exist or is not available. For example, the
  1612. // pipeline to which you're trying to add a job doesn't exist or is still being
  1613. // created.
  1614. //
  1615. // * ErrCodeResourceInUseException "ResourceInUseException"
  1616. // The resource you are attempting to change is in use. For example, you are
  1617. // attempting to delete a pipeline that is currently in use.
  1618. //
  1619. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1620. // General authentication failure. The request was not signed correctly.
  1621. //
  1622. // * ErrCodeInternalServiceException "InternalServiceException"
  1623. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  1624. // the request.
  1625. //
  1626. func (c *ElasticTranscoder) UpdatePipelineNotifications(input *UpdatePipelineNotificationsInput) (*UpdatePipelineNotificationsOutput, error) {
  1627. req, out := c.UpdatePipelineNotificationsRequest(input)
  1628. return out, req.Send()
  1629. }
  1630. // UpdatePipelineNotificationsWithContext is the same as UpdatePipelineNotifications with the addition of
  1631. // the ability to pass a context and additional request options.
  1632. //
  1633. // See UpdatePipelineNotifications for details on how to use this API operation.
  1634. //
  1635. // The context must be non-nil and will be used for request cancellation. If
  1636. // the context is nil a panic will occur. In the future the SDK may create
  1637. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1638. // for more information on using Contexts.
  1639. func (c *ElasticTranscoder) UpdatePipelineNotificationsWithContext(ctx aws.Context, input *UpdatePipelineNotificationsInput, opts ...request.Option) (*UpdatePipelineNotificationsOutput, error) {
  1640. req, out := c.UpdatePipelineNotificationsRequest(input)
  1641. req.SetContext(ctx)
  1642. req.ApplyOptions(opts...)
  1643. return out, req.Send()
  1644. }
  1645. const opUpdatePipelineStatus = "UpdatePipelineStatus"
  1646. // UpdatePipelineStatusRequest generates a "aws/request.Request" representing the
  1647. // client's request for the UpdatePipelineStatus operation. The "output" return
  1648. // value will be populated with the request's response once the request completes
  1649. // successfully.
  1650. //
  1651. // Use "Send" method on the returned Request to send the API call to the service.
  1652. // the "output" return value is not valid until after Send returns without error.
  1653. //
  1654. // See UpdatePipelineStatus for more information on using the UpdatePipelineStatus
  1655. // API call, and error handling.
  1656. //
  1657. // This method is useful when you want to inject custom logic or configuration
  1658. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1659. //
  1660. //
  1661. // // Example sending a request using the UpdatePipelineStatusRequest method.
  1662. // req, resp := client.UpdatePipelineStatusRequest(params)
  1663. //
  1664. // err := req.Send()
  1665. // if err == nil { // resp is now filled
  1666. // fmt.Println(resp)
  1667. // }
  1668. func (c *ElasticTranscoder) UpdatePipelineStatusRequest(input *UpdatePipelineStatusInput) (req *request.Request, output *UpdatePipelineStatusOutput) {
  1669. op := &request.Operation{
  1670. Name: opUpdatePipelineStatus,
  1671. HTTPMethod: "POST",
  1672. HTTPPath: "/2012-09-25/pipelines/{Id}/status",
  1673. }
  1674. if input == nil {
  1675. input = &UpdatePipelineStatusInput{}
  1676. }
  1677. output = &UpdatePipelineStatusOutput{}
  1678. req = c.newRequest(op, input, output)
  1679. return
  1680. }
  1681. // UpdatePipelineStatus API operation for Amazon Elastic Transcoder.
  1682. //
  1683. // The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that
  1684. // the pipeline stops or restarts the processing of jobs.
  1685. //
  1686. // Changing the pipeline status is useful if you want to cancel one or more
  1687. // jobs. You can't cancel jobs after Elastic Transcoder has started processing
  1688. // them; if you pause the pipeline to which you submitted the jobs, you have
  1689. // more time to get the job IDs for the jobs that you want to cancel, and to
  1690. // send a CancelJob request.
  1691. //
  1692. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1693. // with awserr.Error's Code and Message methods to get detailed information about
  1694. // the error.
  1695. //
  1696. // See the AWS API reference guide for Amazon Elastic Transcoder's
  1697. // API operation UpdatePipelineStatus for usage and error information.
  1698. //
  1699. // Returned Error Codes:
  1700. // * ErrCodeValidationException "ValidationException"
  1701. // One or more required parameter values were not provided in the request.
  1702. //
  1703. // * ErrCodeIncompatibleVersionException "IncompatibleVersionException"
  1704. //
  1705. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1706. // The requested resource does not exist or is not available. For example, the
  1707. // pipeline to which you're trying to add a job doesn't exist or is still being
  1708. // created.
  1709. //
  1710. // * ErrCodeResourceInUseException "ResourceInUseException"
  1711. // The resource you are attempting to change is in use. For example, you are
  1712. // attempting to delete a pipeline that is currently in use.
  1713. //
  1714. // * ErrCodeAccessDeniedException "AccessDeniedException"
  1715. // General authentication failure. The request was not signed correctly.
  1716. //
  1717. // * ErrCodeInternalServiceException "InternalServiceException"
  1718. // Elastic Transcoder encountered an unexpected exception while trying to fulfill
  1719. // the request.
  1720. //
  1721. func (c *ElasticTranscoder) UpdatePipelineStatus(input *UpdatePipelineStatusInput) (*UpdatePipelineStatusOutput, error) {
  1722. req, out := c.UpdatePipelineStatusRequest(input)
  1723. return out, req.Send()
  1724. }
  1725. // UpdatePipelineStatusWithContext is the same as UpdatePipelineStatus with the addition of
  1726. // the ability to pass a context and additional request options.
  1727. //
  1728. // See UpdatePipelineStatus for details on how to use this API operation.
  1729. //
  1730. // The context must be non-nil and will be used for request cancellation. If
  1731. // the context is nil a panic will occur. In the future the SDK may create
  1732. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1733. // for more information on using Contexts.
  1734. func (c *ElasticTranscoder) UpdatePipelineStatusWithContext(ctx aws.Context, input *UpdatePipelineStatusInput, opts ...request.Option) (*UpdatePipelineStatusOutput, error) {
  1735. req, out := c.UpdatePipelineStatusRequest(input)
  1736. req.SetContext(ctx)
  1737. req.ApplyOptions(opts...)
  1738. return out, req.Send()
  1739. }
  1740. // The file to be used as album art. There can be multiple artworks associated
  1741. // with an audio file, to a maximum of 20.
  1742. //
  1743. // To remove artwork or leave the artwork empty, you can either set Artwork
  1744. // to null, or set the Merge Policy to "Replace" and use an empty Artwork array.
  1745. //
  1746. // To pass through existing artwork unchanged, set the Merge Policy to "Prepend",
  1747. // "Append", or "Fallback", and use an empty Artwork array.
  1748. type Artwork struct {
  1749. _ struct{} `type:"structure"`
  1750. // The format of album art, if any. Valid formats are .jpg and .png.
  1751. AlbumArtFormat *string `type:"string"`
  1752. // The encryption settings, if any, that you want Elastic Transcoder to apply
  1753. // to your artwork.
  1754. Encryption *Encryption `type:"structure"`
  1755. // The name of the file to be used as album art. To determine which Amazon S3
  1756. // bucket contains the specified file, Elastic Transcoder checks the pipeline
  1757. // specified by PipelineId; the InputBucket object in that pipeline identifies
  1758. // the bucket.
  1759. //
  1760. // If the file name includes a prefix, for example, cooking/pie.jpg, include
  1761. // the prefix in the key. If the file isn't in the specified bucket, Elastic
  1762. // Transcoder returns an error.
  1763. InputKey *string `min:"1" type:"string"`
  1764. // The maximum height of the output album art in pixels. If you specify auto,
  1765. // Elastic Transcoder uses 600 as the default value. If you specify a numeric
  1766. // value, enter an even integer between 32 and 3072, inclusive.
  1767. MaxHeight *string `type:"string"`
  1768. // The maximum width of the output album art in pixels. If you specify auto,
  1769. // Elastic Transcoder uses 600 as the default value. If you specify a numeric
  1770. // value, enter an even integer between 32 and 4096, inclusive.
  1771. MaxWidth *string `type:"string"`
  1772. // When you set PaddingPolicy to Pad, Elastic Transcoder may add white bars
  1773. // to the top and bottom and/or left and right sides of the output album art
  1774. // to make the total size of the output art match the values that you specified
  1775. // for MaxWidth and MaxHeight.
  1776. PaddingPolicy *string `type:"string"`
  1777. // Specify one of the following values to control scaling of the output album
  1778. // art:
  1779. //
  1780. // * Fit: Elastic Transcoder scales the output art so it matches the value
  1781. // that you specified in either MaxWidth or MaxHeight without exceeding the
  1782. // other value.
  1783. //
  1784. // * Fill: Elastic Transcoder scales the output art so it matches the value
  1785. // that you specified in either MaxWidth or MaxHeight and matches or exceeds
  1786. // the other value. Elastic Transcoder centers the output art and then crops
  1787. // it in the dimension (if any) that exceeds the maximum value.
  1788. //
  1789. // * Stretch: Elastic Transcoder stretches the output art to match the values
  1790. // that you specified for MaxWidth and MaxHeight. If the relative proportions
  1791. // of the input art and the output art are different, the output art will
  1792. // be distorted.
  1793. //
  1794. // * Keep: Elastic Transcoder does not scale the output art. If either dimension
  1795. // of the input art exceeds the values that you specified for MaxWidth and
  1796. // MaxHeight, Elastic Transcoder crops the output art.
  1797. //
  1798. // * ShrinkToFit: Elastic Transcoder scales the output art down so that its
  1799. // dimensions match the values that you specified for at least one of MaxWidth
  1800. // and MaxHeight without exceeding either value. If you specify this option,
  1801. // Elastic Transcoder does not scale the art up.
  1802. //
  1803. // * ShrinkToFill Elastic Transcoder scales the output art down so that its
  1804. // dimensions match the values that you specified for at least one of MaxWidth
  1805. // and MaxHeight without dropping below either value. If you specify this
  1806. // option, Elastic Transcoder does not scale the art up.
  1807. SizingPolicy *string `type:"string"`
  1808. }
  1809. // String returns the string representation
  1810. func (s Artwork) String() string {
  1811. return awsutil.Prettify(s)
  1812. }
  1813. // GoString returns the string representation
  1814. func (s Artwork) GoString() string {
  1815. return s.String()
  1816. }
  1817. // Validate inspects the fields of the type to determine if they are valid.
  1818. func (s *Artwork) Validate() error {
  1819. invalidParams := request.ErrInvalidParams{Context: "Artwork"}
  1820. if s.InputKey != nil && len(*s.InputKey) < 1 {
  1821. invalidParams.Add(request.NewErrParamMinLen("InputKey", 1))
  1822. }
  1823. if invalidParams.Len() > 0 {
  1824. return invalidParams
  1825. }
  1826. return nil
  1827. }
  1828. // SetAlbumArtFormat sets the AlbumArtFormat field's value.
  1829. func (s *Artwork) SetAlbumArtFormat(v string) *Artwork {
  1830. s.AlbumArtFormat = &v
  1831. return s
  1832. }
  1833. // SetEncryption sets the Encryption field's value.
  1834. func (s *Artwork) SetEncryption(v *Encryption) *Artwork {
  1835. s.Encryption = v
  1836. return s
  1837. }
  1838. // SetInputKey sets the InputKey field's value.
  1839. func (s *Artwork) SetInputKey(v string) *Artwork {
  1840. s.InputKey = &v
  1841. return s
  1842. }
  1843. // SetMaxHeight sets the MaxHeight field's value.
  1844. func (s *Artwork) SetMaxHeight(v string) *Artwork {
  1845. s.MaxHeight = &v
  1846. return s
  1847. }
  1848. // SetMaxWidth sets the MaxWidth field's value.
  1849. func (s *Artwork) SetMaxWidth(v string) *Artwork {
  1850. s.MaxWidth = &v
  1851. return s
  1852. }
  1853. // SetPaddingPolicy sets the PaddingPolicy field's value.
  1854. func (s *Artwork) SetPaddingPolicy(v string) *Artwork {
  1855. s.PaddingPolicy = &v
  1856. return s
  1857. }
  1858. // SetSizingPolicy sets the SizingPolicy field's value.
  1859. func (s *Artwork) SetSizingPolicy(v string) *Artwork {
  1860. s.SizingPolicy = &v
  1861. return s
  1862. }
  1863. // Options associated with your audio codec.
  1864. type AudioCodecOptions struct {
  1865. _ struct{} `type:"structure"`
  1866. // You can only choose an audio bit depth when you specify flac or pcm for the
  1867. // value of Audio:Codec.
  1868. //
  1869. // The bit depth of a sample is how many bits of information are included in
  1870. // the audio samples. The higher the bit depth, the better the audio, but the
  1871. // larger the file.
  1872. //
  1873. // Valid values are 16 and 24.
  1874. //
  1875. // The most common bit depth is 24.
  1876. BitDepth *string `type:"string"`
  1877. // You can only choose an audio bit order when you specify pcm for the value
  1878. // of Audio:Codec.
  1879. //
  1880. // The order the bits of a PCM sample are stored in.
  1881. //
  1882. // The supported value is LittleEndian.
  1883. BitOrder *string `type:"string"`
  1884. // You can only choose an audio profile when you specify AAC for the value of
  1885. // Audio:Codec.
  1886. //
  1887. // Specify the AAC profile for the output file. Elastic Transcoder supports
  1888. // the following profiles:
  1889. //
  1890. // * auto: If you specify auto, Elastic Transcoder selects the profile based
  1891. // on the bit rate selected for the output file.
  1892. //
  1893. // * AAC-LC: The most common AAC profile. Use for bit rates larger than 64
  1894. // kbps.
  1895. //
  1896. // * HE-AAC: Not supported on some older players and devices. Use for bit
  1897. // rates between 40 and 80 kbps.
  1898. //
  1899. // * HE-AACv2: Not supported on some players and devices. Use for bit rates
  1900. // less than 48 kbps.
  1901. //
  1902. // All outputs in a Smooth playlist must have the same value for Profile.
  1903. //
  1904. // If you created any presets before AAC profiles were added, Elastic Transcoder
  1905. // automatically updated your presets to use AAC-LC. You can change the value
  1906. // as required.
  1907. Profile *string `type:"string"`
  1908. // You can only choose whether an audio sample is signed when you specify pcm
  1909. // for the value of Audio:Codec.
  1910. //
  1911. // Whether audio samples are represented with negative and positive numbers
  1912. // (signed) or only positive numbers (unsigned).
  1913. //
  1914. // The supported value is Signed.
  1915. Signed *string `type:"string"`
  1916. }
  1917. // String returns the string representation
  1918. func (s AudioCodecOptions) String() string {
  1919. return awsutil.Prettify(s)
  1920. }
  1921. // GoString returns the string representation
  1922. func (s AudioCodecOptions) GoString() string {
  1923. return s.String()
  1924. }
  1925. // SetBitDepth sets the BitDepth field's value.
  1926. func (s *AudioCodecOptions) SetBitDepth(v string) *AudioCodecOptions {
  1927. s.BitDepth = &v
  1928. return s
  1929. }
  1930. // SetBitOrder sets the BitOrder field's value.
  1931. func (s *AudioCodecOptions) SetBitOrder(v string) *AudioCodecOptions {
  1932. s.BitOrder = &v
  1933. return s
  1934. }
  1935. // SetProfile sets the Profile field's value.
  1936. func (s *AudioCodecOptions) SetProfile(v string) *AudioCodecOptions {
  1937. s.Profile = &v
  1938. return s
  1939. }
  1940. // SetSigned sets the Signed field's value.
  1941. func (s *AudioCodecOptions) SetSigned(v string) *AudioCodecOptions {
  1942. s.Signed = &v
  1943. return s
  1944. }
  1945. // Parameters required for transcoding audio.
  1946. type AudioParameters struct {
  1947. _ struct{} `type:"structure"`
  1948. // The method of organizing audio channels and tracks. Use Audio:Channels to
  1949. // specify the number of channels in your output, and Audio:AudioPackingMode
  1950. // to specify the number of tracks and their relation to the channels. If you
  1951. // do not specify an Audio:AudioPackingMode, Elastic Transcoder uses SingleTrack.
  1952. //
  1953. // The following values are valid:
  1954. //
  1955. // SingleTrack, OneChannelPerTrack, and OneChannelPerTrackWithMosTo8Tracks
  1956. //
  1957. // When you specify SingleTrack, Elastic Transcoder creates a single track for
  1958. // your output. The track can have up to eight channels. Use SingleTrack for
  1959. // all non-mxf containers.
  1960. //
  1961. // The outputs of SingleTrack for a specific channel value and inputs are as
  1962. // follows:
  1963. //
  1964. // * 0 channels with any input: Audio omitted from the output
  1965. //
  1966. // * 1, 2, or auto channels with no audio input: Audio omitted from the output
  1967. //
  1968. // * 1 channel with any input with audio: One track with one channel, downmixed
  1969. // if necessary
  1970. //
  1971. // * 2 channels with one track with one channel: One track with two identical
  1972. // channels
  1973. //
  1974. // * 2 or auto channels with two tracks with one channel each: One track
  1975. // with two channels
  1976. //
  1977. // * 2 or auto channels with one track with two channels: One track with
  1978. // two channels
  1979. //
  1980. // * 2 channels with one track with multiple channels: One track with two
  1981. // channels
  1982. //
  1983. // * auto channels with one track with one channel: One track with one channel
  1984. //
  1985. // * auto channels with one track with multiple channels: One track with
  1986. // multiple channels
  1987. //
  1988. // When you specify OneChannelPerTrack, Elastic Transcoder creates a new track
  1989. // for every channel in your output. Your output can have up to eight single-channel
  1990. // tracks.
  1991. //
  1992. // The outputs of OneChannelPerTrack for a specific channel value and inputs
  1993. // are as follows:
  1994. //
  1995. // * 0 channels with any input: Audio omitted from the output
  1996. //
  1997. // * 1, 2, or auto channels with no audio input: Audio omitted from the output
  1998. //
  1999. // * 1 channel with any input with audio: One track with one channel, downmixed
  2000. // if necessary
  2001. //
  2002. // * 2 channels with one track with one channel: Two tracks with one identical
  2003. // channel each
  2004. //
  2005. // * 2 or auto channels with two tracks with one channel each: Two tracks
  2006. // with one channel each
  2007. //
  2008. // * 2 or auto channels with one track with two channels: Two tracks with
  2009. // one channel each
  2010. //
  2011. // * 2 channels with one track with multiple channels: Two tracks with one
  2012. // channel each
  2013. //
  2014. // * auto channels with one track with one channel: One track with one channel
  2015. //
  2016. // * auto channels with one track with multiple channels: Up to eight tracks
  2017. // with one channel each
  2018. //
  2019. // When you specify OneChannelPerTrackWithMosTo8Tracks, Elastic Transcoder creates
  2020. // eight single-channel tracks for your output. All tracks that do not contain
  2021. // audio data from an input channel are MOS, or Mit Out Sound, tracks.
  2022. //
  2023. // The outputs of OneChannelPerTrackWithMosTo8Tracks for a specific channel
  2024. // value and inputs are as follows:
  2025. //
  2026. // * 0 channels with any input: Audio omitted from the output
  2027. //
  2028. // * 1, 2, or auto channels with no audio input: Audio omitted from the output
  2029. //
  2030. // * 1 channel with any input with audio: One track with one channel, downmixed
  2031. // if necessary, plus six MOS tracks
  2032. //
  2033. // * 2 channels with one track with one channel: Two tracks with one identical
  2034. // channel each, plus six MOS tracks
  2035. //
  2036. // * 2 or auto channels with two tracks with one channel each: Two tracks
  2037. // with one channel each, plus six MOS tracks
  2038. //
  2039. // * 2 or auto channels with one track with two channels: Two tracks with
  2040. // one channel each, plus six MOS tracks
  2041. //
  2042. // * 2 channels with one track with multiple channels: Two tracks with one
  2043. // channel each, plus six MOS tracks
  2044. //
  2045. // * auto channels with one track with one channel: One track with one channel,
  2046. // plus seven MOS tracks
  2047. //
  2048. // * auto channels with one track with multiple channels: Up to eight tracks
  2049. // with one channel each, plus MOS tracks until there are eight tracks in
  2050. // all
  2051. AudioPackingMode *string `type:"string"`
  2052. // The bit rate of the audio stream in the output file, in kilobits/second.
  2053. // Enter an integer between 64 and 320, inclusive.
  2054. BitRate *string `type:"string"`
  2055. // The number of audio channels in the output file. The following values are
  2056. // valid:
  2057. //
  2058. // auto, 0, 1, 2
  2059. //
  2060. // One channel carries the information played by a single speaker. For example,
  2061. // a stereo track with two channels sends one channel to the left speaker, and
  2062. // the other channel to the right speaker. The output channels are organized
  2063. // into tracks. If you want Elastic Transcoder to automatically detect the number
  2064. // of audio channels in the input file and use that value for the output file,
  2065. // select auto.
  2066. //
  2067. // The output of a specific channel value and inputs are as follows:
  2068. //
  2069. // * auto channel specified, with any input: Pass through up to eight input
  2070. // channels.
  2071. //
  2072. // * 0 channels specified, with any input: Audio omitted from the output.
  2073. //
  2074. // * 1 channel specified, with at least one input channel: Mono sound.
  2075. //
  2076. // * 2 channels specified, with any input: Two identical mono channels or
  2077. // stereo. For more information about tracks, see Audio:AudioPackingMode.
  2078. //
  2079. // For more information about how Elastic Transcoder organizes channels and
  2080. // tracks, see Audio:AudioPackingMode.
  2081. Channels *string `type:"string"`
  2082. // The audio codec for the output file. Valid values include aac, flac, mp2,
  2083. // mp3, pcm, and vorbis.
  2084. Codec *string `type:"string"`
  2085. // If you specified AAC for Audio:Codec, this is the AAC compression profile
  2086. // to use. Valid values include:
  2087. //
  2088. // auto, AAC-LC, HE-AAC, HE-AACv2
  2089. //
  2090. // If you specify auto, Elastic Transcoder chooses a profile based on the bit
  2091. // rate of the output file.
  2092. CodecOptions *AudioCodecOptions `type:"structure"`
  2093. // The sample rate of the audio stream in the output file, in Hertz. Valid values
  2094. // include:
  2095. //
  2096. // auto, 22050, 32000, 44100, 48000, 96000
  2097. //
  2098. // If you specify auto, Elastic Transcoder automatically detects the sample
  2099. // rate.
  2100. SampleRate *string `type:"string"`
  2101. }
  2102. // String returns the string representation
  2103. func (s AudioParameters) String() string {
  2104. return awsutil.Prettify(s)
  2105. }
  2106. // GoString returns the string representation
  2107. func (s AudioParameters) GoString() string {
  2108. return s.String()
  2109. }
  2110. // SetAudioPackingMode sets the AudioPackingMode field's value.
  2111. func (s *AudioParameters) SetAudioPackingMode(v string) *AudioParameters {
  2112. s.AudioPackingMode = &v
  2113. return s
  2114. }
  2115. // SetBitRate sets the BitRate field's value.
  2116. func (s *AudioParameters) SetBitRate(v string) *AudioParameters {
  2117. s.BitRate = &v
  2118. return s
  2119. }
  2120. // SetChannels sets the Channels field's value.
  2121. func (s *AudioParameters) SetChannels(v string) *AudioParameters {
  2122. s.Channels = &v
  2123. return s
  2124. }
  2125. // SetCodec sets the Codec field's value.
  2126. func (s *AudioParameters) SetCodec(v string) *AudioParameters {
  2127. s.Codec = &v
  2128. return s
  2129. }
  2130. // SetCodecOptions sets the CodecOptions field's value.
  2131. func (s *AudioParameters) SetCodecOptions(v *AudioCodecOptions) *AudioParameters {
  2132. s.CodecOptions = v
  2133. return s
  2134. }
  2135. // SetSampleRate sets the SampleRate field's value.
  2136. func (s *AudioParameters) SetSampleRate(v string) *AudioParameters {
  2137. s.SampleRate = &v
  2138. return s
  2139. }
  2140. // The CancelJobRequest structure.
  2141. type CancelJobInput struct {
  2142. _ struct{} `type:"structure"`
  2143. // The identifier of the job that you want to cancel.
  2144. //
  2145. // To get a list of the jobs (including their jobId) that have a status of Submitted,
  2146. // use the ListJobsByStatus API action.
  2147. //
  2148. // Id is a required field
  2149. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2150. }
  2151. // String returns the string representation
  2152. func (s CancelJobInput) String() string {
  2153. return awsutil.Prettify(s)
  2154. }
  2155. // GoString returns the string representation
  2156. func (s CancelJobInput) GoString() string {
  2157. return s.String()
  2158. }
  2159. // Validate inspects the fields of the type to determine if they are valid.
  2160. func (s *CancelJobInput) Validate() error {
  2161. invalidParams := request.ErrInvalidParams{Context: "CancelJobInput"}
  2162. if s.Id == nil {
  2163. invalidParams.Add(request.NewErrParamRequired("Id"))
  2164. }
  2165. if s.Id != nil && len(*s.Id) < 1 {
  2166. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  2167. }
  2168. if invalidParams.Len() > 0 {
  2169. return invalidParams
  2170. }
  2171. return nil
  2172. }
  2173. // SetId sets the Id field's value.
  2174. func (s *CancelJobInput) SetId(v string) *CancelJobInput {
  2175. s.Id = &v
  2176. return s
  2177. }
  2178. // The response body contains a JSON object. If the job is successfully canceled,
  2179. // the value of Success is true.
  2180. type CancelJobOutput struct {
  2181. _ struct{} `type:"structure"`
  2182. }
  2183. // String returns the string representation
  2184. func (s CancelJobOutput) String() string {
  2185. return awsutil.Prettify(s)
  2186. }
  2187. // GoString returns the string representation
  2188. func (s CancelJobOutput) GoString() string {
  2189. return s.String()
  2190. }
  2191. // The file format of the output captions. If you leave this value blank, Elastic
  2192. // Transcoder returns an error.
  2193. type CaptionFormat struct {
  2194. _ struct{} `type:"structure"`
  2195. // The encryption settings, if any, that you want Elastic Transcoder to apply
  2196. // to your caption formats.
  2197. Encryption *Encryption `type:"structure"`
  2198. // The format you specify determines whether Elastic Transcoder generates an
  2199. // embedded or sidecar caption for this output.
  2200. //
  2201. // * Valid Embedded Caption Formats:
  2202. //
  2203. // for FLAC: None
  2204. //
  2205. // For MP3: None
  2206. //
  2207. // For MP4: mov-text
  2208. //
  2209. // For MPEG-TS: None
  2210. //
  2211. // For ogg: None
  2212. //
  2213. // For webm: None
  2214. //
  2215. // * Valid Sidecar Caption Formats: Elastic Transcoder supports dfxp (first
  2216. // div element only), scc, srt, and webvtt. If you want ttml or smpte-tt
  2217. // compatible captions, specify dfxp as your output format.
  2218. //
  2219. // For FMP4: dfxp
  2220. //
  2221. // Non-FMP4 outputs: All sidecar types
  2222. //
  2223. // fmp4 captions have an extension of .ismt
  2224. Format *string `type:"string"`
  2225. // The prefix for caption filenames, in the form description-{language}, where:
  2226. //
  2227. // * description is a description of the video.
  2228. //
  2229. // * {language} is a literal value that Elastic Transcoder replaces with
  2230. // the two- or three-letter code for the language of the caption in the output
  2231. // file names.
  2232. //
  2233. // If you don't include {language} in the file name pattern, Elastic Transcoder
  2234. // automatically appends "{language}" to the value that you specify for the
  2235. // description. In addition, Elastic Transcoder automatically appends the count
  2236. // to the end of the segment files.
  2237. //
  2238. // For example, suppose you're transcoding into srt format. When you enter "Sydney-{language}-sunrise",
  2239. // and the language of the captions is English (en), the name of the first caption
  2240. // file is be Sydney-en-sunrise00000.srt.
  2241. Pattern *string `type:"string"`
  2242. }
  2243. // String returns the string representation
  2244. func (s CaptionFormat) String() string {
  2245. return awsutil.Prettify(s)
  2246. }
  2247. // GoString returns the string representation
  2248. func (s CaptionFormat) GoString() string {
  2249. return s.String()
  2250. }
  2251. // SetEncryption sets the Encryption field's value.
  2252. func (s *CaptionFormat) SetEncryption(v *Encryption) *CaptionFormat {
  2253. s.Encryption = v
  2254. return s
  2255. }
  2256. // SetFormat sets the Format field's value.
  2257. func (s *CaptionFormat) SetFormat(v string) *CaptionFormat {
  2258. s.Format = &v
  2259. return s
  2260. }
  2261. // SetPattern sets the Pattern field's value.
  2262. func (s *CaptionFormat) SetPattern(v string) *CaptionFormat {
  2263. s.Pattern = &v
  2264. return s
  2265. }
  2266. // A source file for the input sidecar captions used during the transcoding
  2267. // process.
  2268. type CaptionSource struct {
  2269. _ struct{} `type:"structure"`
  2270. // The encryption settings, if any, that Elastic Transcoder needs to decyrpt
  2271. // your caption sources, or that you want Elastic Transcoder to apply to your
  2272. // caption sources.
  2273. Encryption *Encryption `type:"structure"`
  2274. // The name of the sidecar caption file that you want Elastic Transcoder to
  2275. // include in the output file.
  2276. Key *string `min:"1" type:"string"`
  2277. // The label of the caption shown in the player when choosing a language. We
  2278. // recommend that you put the caption language name here, in the language of
  2279. // the captions.
  2280. Label *string `min:"1" type:"string"`
  2281. // A string that specifies the language of the caption. If you specified multiple
  2282. // inputs with captions, the caption language must match in order to be included
  2283. // in the output. Specify this as one of:
  2284. //
  2285. // * 2-character ISO 639-1 code
  2286. //
  2287. // * 3-character ISO 639-2 code
  2288. //
  2289. // For more information on ISO language codes and language names, see the List
  2290. // of ISO 639-1 codes.
  2291. Language *string `min:"1" type:"string"`
  2292. // For clip generation or captions that do not start at the same time as the
  2293. // associated video file, the TimeOffset tells Elastic Transcoder how much of
  2294. // the video to encode before including captions.
  2295. //
  2296. // Specify the TimeOffset in the form [+-]SS.sss or [+-]HH:mm:SS.ss.
  2297. TimeOffset *string `type:"string"`
  2298. }
  2299. // String returns the string representation
  2300. func (s CaptionSource) String() string {
  2301. return awsutil.Prettify(s)
  2302. }
  2303. // GoString returns the string representation
  2304. func (s CaptionSource) GoString() string {
  2305. return s.String()
  2306. }
  2307. // Validate inspects the fields of the type to determine if they are valid.
  2308. func (s *CaptionSource) Validate() error {
  2309. invalidParams := request.ErrInvalidParams{Context: "CaptionSource"}
  2310. if s.Key != nil && len(*s.Key) < 1 {
  2311. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  2312. }
  2313. if s.Label != nil && len(*s.Label) < 1 {
  2314. invalidParams.Add(request.NewErrParamMinLen("Label", 1))
  2315. }
  2316. if s.Language != nil && len(*s.Language) < 1 {
  2317. invalidParams.Add(request.NewErrParamMinLen("Language", 1))
  2318. }
  2319. if invalidParams.Len() > 0 {
  2320. return invalidParams
  2321. }
  2322. return nil
  2323. }
  2324. // SetEncryption sets the Encryption field's value.
  2325. func (s *CaptionSource) SetEncryption(v *Encryption) *CaptionSource {
  2326. s.Encryption = v
  2327. return s
  2328. }
  2329. // SetKey sets the Key field's value.
  2330. func (s *CaptionSource) SetKey(v string) *CaptionSource {
  2331. s.Key = &v
  2332. return s
  2333. }
  2334. // SetLabel sets the Label field's value.
  2335. func (s *CaptionSource) SetLabel(v string) *CaptionSource {
  2336. s.Label = &v
  2337. return s
  2338. }
  2339. // SetLanguage sets the Language field's value.
  2340. func (s *CaptionSource) SetLanguage(v string) *CaptionSource {
  2341. s.Language = &v
  2342. return s
  2343. }
  2344. // SetTimeOffset sets the TimeOffset field's value.
  2345. func (s *CaptionSource) SetTimeOffset(v string) *CaptionSource {
  2346. s.TimeOffset = &v
  2347. return s
  2348. }
  2349. // The captions to be created, if any.
  2350. type Captions struct {
  2351. _ struct{} `type:"structure"`
  2352. // The array of file formats for the output captions. If you leave this value
  2353. // blank, Elastic Transcoder returns an error.
  2354. CaptionFormats []*CaptionFormat `type:"list"`
  2355. // Source files for the input sidecar captions used during the transcoding process.
  2356. // To omit all sidecar captions, leave CaptionSources blank.
  2357. //
  2358. // Deprecated: CaptionSources has been deprecated
  2359. CaptionSources []*CaptionSource `deprecated:"true" type:"list"`
  2360. // A policy that determines how Elastic Transcoder handles the existence of
  2361. // multiple captions.
  2362. //
  2363. // * MergeOverride: Elastic Transcoder transcodes both embedded and sidecar
  2364. // captions into outputs. If captions for a language are embedded in the
  2365. // input file and also appear in a sidecar file, Elastic Transcoder uses
  2366. // the sidecar captions and ignores the embedded captions for that language.
  2367. //
  2368. // * MergeRetain: Elastic Transcoder transcodes both embedded and sidecar
  2369. // captions into outputs. If captions for a language are embedded in the
  2370. // input file and also appear in a sidecar file, Elastic Transcoder uses
  2371. // the embedded captions and ignores the sidecar captions for that language.
  2372. // If CaptionSources is empty, Elastic Transcoder omits all sidecar captions
  2373. // from the output files.
  2374. //
  2375. // * Override: Elastic Transcoder transcodes only the sidecar captions that
  2376. // you specify in CaptionSources.
  2377. //
  2378. // MergePolicy cannot be null.
  2379. //
  2380. // Deprecated: MergePolicy has been deprecated
  2381. MergePolicy *string `deprecated:"true" type:"string"`
  2382. }
  2383. // String returns the string representation
  2384. func (s Captions) String() string {
  2385. return awsutil.Prettify(s)
  2386. }
  2387. // GoString returns the string representation
  2388. func (s Captions) GoString() string {
  2389. return s.String()
  2390. }
  2391. // Validate inspects the fields of the type to determine if they are valid.
  2392. func (s *Captions) Validate() error {
  2393. invalidParams := request.ErrInvalidParams{Context: "Captions"}
  2394. if s.CaptionSources != nil {
  2395. for i, v := range s.CaptionSources {
  2396. if v == nil {
  2397. continue
  2398. }
  2399. if err := v.Validate(); err != nil {
  2400. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSources", i), err.(request.ErrInvalidParams))
  2401. }
  2402. }
  2403. }
  2404. if invalidParams.Len() > 0 {
  2405. return invalidParams
  2406. }
  2407. return nil
  2408. }
  2409. // SetCaptionFormats sets the CaptionFormats field's value.
  2410. func (s *Captions) SetCaptionFormats(v []*CaptionFormat) *Captions {
  2411. s.CaptionFormats = v
  2412. return s
  2413. }
  2414. // SetCaptionSources sets the CaptionSources field's value.
  2415. func (s *Captions) SetCaptionSources(v []*CaptionSource) *Captions {
  2416. s.CaptionSources = v
  2417. return s
  2418. }
  2419. // SetMergePolicy sets the MergePolicy field's value.
  2420. func (s *Captions) SetMergePolicy(v string) *Captions {
  2421. s.MergePolicy = &v
  2422. return s
  2423. }
  2424. // Settings for one clip in a composition. All jobs in a playlist must have
  2425. // the same clip settings.
  2426. //
  2427. // Deprecated: Clip has been deprecated
  2428. type Clip struct {
  2429. _ struct{} `deprecated:"true" type:"structure"`
  2430. // Settings that determine when a clip begins and how long it lasts.
  2431. TimeSpan *TimeSpan `type:"structure"`
  2432. }
  2433. // String returns the string representation
  2434. func (s Clip) String() string {
  2435. return awsutil.Prettify(s)
  2436. }
  2437. // GoString returns the string representation
  2438. func (s Clip) GoString() string {
  2439. return s.String()
  2440. }
  2441. // SetTimeSpan sets the TimeSpan field's value.
  2442. func (s *Clip) SetTimeSpan(v *TimeSpan) *Clip {
  2443. s.TimeSpan = v
  2444. return s
  2445. }
  2446. // The CreateJobRequest structure.
  2447. type CreateJobInput struct {
  2448. _ struct{} `type:"structure"`
  2449. // A section of the request body that provides information about the file that
  2450. // is being transcoded.
  2451. Input *JobInput `type:"structure"`
  2452. // A section of the request body that provides information about the files that
  2453. // are being transcoded.
  2454. Inputs []*JobInput `type:"list"`
  2455. // A section of the request body that provides information about the transcoded
  2456. // (target) file. We strongly recommend that you use the Outputs syntax instead
  2457. // of the Output syntax.
  2458. Output *CreateJobOutput `type:"structure"`
  2459. // The value, if any, that you want Elastic Transcoder to prepend to the names
  2460. // of all files that this job creates, including output files, thumbnails, and
  2461. // playlists.
  2462. OutputKeyPrefix *string `min:"1" type:"string"`
  2463. // A section of the request body that provides information about the transcoded
  2464. // (target) files. We recommend that you use the Outputs syntax instead of the
  2465. // Output syntax.
  2466. Outputs []*CreateJobOutput `type:"list"`
  2467. // The Id of the pipeline that you want Elastic Transcoder to use for transcoding.
  2468. // The pipeline determines several settings, including the Amazon S3 bucket
  2469. // from which Elastic Transcoder gets the files to transcode and the bucket
  2470. // into which Elastic Transcoder puts the transcoded files.
  2471. //
  2472. // PipelineId is a required field
  2473. PipelineId *string `type:"string" required:"true"`
  2474. // If you specify a preset in PresetId for which the value of Container is fmp4
  2475. // (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the
  2476. // master playlists that you want Elastic Transcoder to create.
  2477. //
  2478. // The maximum number of master playlists in a job is 30.
  2479. Playlists []*CreateJobPlaylist `type:"list"`
  2480. // User-defined metadata that you want to associate with an Elastic Transcoder
  2481. // job. You specify metadata in key/value pairs, and you can add up to 10 key/value
  2482. // pairs per job. Elastic Transcoder does not guarantee that key/value pairs
  2483. // are returned in the same order in which you specify them.
  2484. UserMetadata map[string]*string `type:"map"`
  2485. }
  2486. // String returns the string representation
  2487. func (s CreateJobInput) String() string {
  2488. return awsutil.Prettify(s)
  2489. }
  2490. // GoString returns the string representation
  2491. func (s CreateJobInput) GoString() string {
  2492. return s.String()
  2493. }
  2494. // Validate inspects the fields of the type to determine if they are valid.
  2495. func (s *CreateJobInput) Validate() error {
  2496. invalidParams := request.ErrInvalidParams{Context: "CreateJobInput"}
  2497. if s.OutputKeyPrefix != nil && len(*s.OutputKeyPrefix) < 1 {
  2498. invalidParams.Add(request.NewErrParamMinLen("OutputKeyPrefix", 1))
  2499. }
  2500. if s.PipelineId == nil {
  2501. invalidParams.Add(request.NewErrParamRequired("PipelineId"))
  2502. }
  2503. if s.Input != nil {
  2504. if err := s.Input.Validate(); err != nil {
  2505. invalidParams.AddNested("Input", err.(request.ErrInvalidParams))
  2506. }
  2507. }
  2508. if s.Inputs != nil {
  2509. for i, v := range s.Inputs {
  2510. if v == nil {
  2511. continue
  2512. }
  2513. if err := v.Validate(); err != nil {
  2514. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Inputs", i), err.(request.ErrInvalidParams))
  2515. }
  2516. }
  2517. }
  2518. if s.Output != nil {
  2519. if err := s.Output.Validate(); err != nil {
  2520. invalidParams.AddNested("Output", err.(request.ErrInvalidParams))
  2521. }
  2522. }
  2523. if s.Outputs != nil {
  2524. for i, v := range s.Outputs {
  2525. if v == nil {
  2526. continue
  2527. }
  2528. if err := v.Validate(); err != nil {
  2529. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams))
  2530. }
  2531. }
  2532. }
  2533. if s.Playlists != nil {
  2534. for i, v := range s.Playlists {
  2535. if v == nil {
  2536. continue
  2537. }
  2538. if err := v.Validate(); err != nil {
  2539. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Playlists", i), err.(request.ErrInvalidParams))
  2540. }
  2541. }
  2542. }
  2543. if invalidParams.Len() > 0 {
  2544. return invalidParams
  2545. }
  2546. return nil
  2547. }
  2548. // SetInput sets the Input field's value.
  2549. func (s *CreateJobInput) SetInput(v *JobInput) *CreateJobInput {
  2550. s.Input = v
  2551. return s
  2552. }
  2553. // SetInputs sets the Inputs field's value.
  2554. func (s *CreateJobInput) SetInputs(v []*JobInput) *CreateJobInput {
  2555. s.Inputs = v
  2556. return s
  2557. }
  2558. // SetOutput sets the Output field's value.
  2559. func (s *CreateJobInput) SetOutput(v *CreateJobOutput) *CreateJobInput {
  2560. s.Output = v
  2561. return s
  2562. }
  2563. // SetOutputKeyPrefix sets the OutputKeyPrefix field's value.
  2564. func (s *CreateJobInput) SetOutputKeyPrefix(v string) *CreateJobInput {
  2565. s.OutputKeyPrefix = &v
  2566. return s
  2567. }
  2568. // SetOutputs sets the Outputs field's value.
  2569. func (s *CreateJobInput) SetOutputs(v []*CreateJobOutput) *CreateJobInput {
  2570. s.Outputs = v
  2571. return s
  2572. }
  2573. // SetPipelineId sets the PipelineId field's value.
  2574. func (s *CreateJobInput) SetPipelineId(v string) *CreateJobInput {
  2575. s.PipelineId = &v
  2576. return s
  2577. }
  2578. // SetPlaylists sets the Playlists field's value.
  2579. func (s *CreateJobInput) SetPlaylists(v []*CreateJobPlaylist) *CreateJobInput {
  2580. s.Playlists = v
  2581. return s
  2582. }
  2583. // SetUserMetadata sets the UserMetadata field's value.
  2584. func (s *CreateJobInput) SetUserMetadata(v map[string]*string) *CreateJobInput {
  2585. s.UserMetadata = v
  2586. return s
  2587. }
  2588. // The CreateJobOutput structure.
  2589. type CreateJobOutput struct {
  2590. _ struct{} `type:"structure"`
  2591. // Information about the album art that you want Elastic Transcoder to add to
  2592. // the file during transcoding. You can specify up to twenty album artworks
  2593. // for each output. Settings for each artwork must be defined in the job for
  2594. // the current output.
  2595. AlbumArt *JobAlbumArt `type:"structure"`
  2596. // You can configure Elastic Transcoder to transcode captions, or subtitles,
  2597. // from one format to another. All captions must be in UTF-8. Elastic Transcoder
  2598. // supports two types of captions:
  2599. //
  2600. // * Embedded: Embedded captions are included in the same file as the audio
  2601. // and video. Elastic Transcoder supports only one embedded caption per language,
  2602. // to a maximum of 300 embedded captions per file.
  2603. //
  2604. // Valid input values include: CEA-608 (EIA-608, first non-empty channel only),
  2605. // CEA-708 (EIA-708, first non-empty channel only), and mov-text
  2606. //
  2607. // Valid outputs include: mov-text
  2608. //
  2609. // Elastic Transcoder supports a maximum of one embedded format per output.
  2610. //
  2611. // * Sidecar: Sidecar captions are kept in a separate metadata file from
  2612. // the audio and video data. Sidecar captions require a player that is capable
  2613. // of understanding the relationship between the video file and the sidecar
  2614. // file. Elastic Transcoder supports only one sidecar caption per language,
  2615. // to a maximum of 20 sidecar captions per file.
  2616. //
  2617. // Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt,
  2618. // srt, ttml (first div element only), and webvtt
  2619. //
  2620. // Valid outputs include: dfxp (first div element only), scc, srt, and webvtt.
  2621. //
  2622. // If you want ttml or smpte-tt compatible captions, specify dfxp as your output
  2623. // format.
  2624. //
  2625. // Elastic Transcoder does not support OCR (Optical Character Recognition),
  2626. // does not accept pictures as a valid input for captions, and is not available
  2627. // for audio-only transcoding. Elastic Transcoder does not preserve text formatting
  2628. // (for example, italics) during the transcoding process.
  2629. //
  2630. // To remove captions or leave the captions empty, set Captions to null. To
  2631. // pass through existing captions unchanged, set the MergePolicy to MergeRetain,
  2632. // and pass in a null CaptionSources array.
  2633. //
  2634. // For more information on embedded files, see the Subtitles Wikipedia page.
  2635. //
  2636. // For more information on sidecar files, see the Extensible Metadata Platform
  2637. // and Sidecar file Wikipedia pages.
  2638. Captions *Captions `type:"structure"`
  2639. // You can create an output file that contains an excerpt from the input file.
  2640. // This excerpt, called a clip, can come from the beginning, middle, or end
  2641. // of the file. The Composition object contains settings for the clips that
  2642. // make up an output file. For the current release, you can only specify settings
  2643. // for a single clip per output file. The Composition object cannot be null.
  2644. //
  2645. // Deprecated: Composition has been deprecated
  2646. Composition []*Clip `deprecated:"true" type:"list"`
  2647. // You can specify encryption settings for any output files that you want to
  2648. // use for a transcoding job. This includes the output file and any watermarks,
  2649. // thumbnails, album art, or captions that you want to use. You must specify
  2650. // encryption settings for each file individually.
  2651. Encryption *Encryption `type:"structure"`
  2652. // The name to assign to the transcoded file. Elastic Transcoder saves the file
  2653. // in the Amazon S3 bucket specified by the OutputBucket object in the pipeline
  2654. // that is specified by the pipeline ID. If a file with the specified name already
  2655. // exists in the output bucket, the job fails.
  2656. Key *string `min:"1" type:"string"`
  2657. // The Id of the preset to use for this job. The preset determines the audio,
  2658. // video, and thumbnail settings that Elastic Transcoder uses for transcoding.
  2659. PresetId *string `type:"string"`
  2660. // The number of degrees clockwise by which you want Elastic Transcoder to rotate
  2661. // the output relative to the input. Enter one of the following values: auto,
  2662. // 0, 90, 180, 270. The value auto generally works only if the file that you're
  2663. // transcoding contains rotation metadata.
  2664. Rotate *string `type:"string"`
  2665. // (Outputs in Fragmented MP4 or MPEG-TS format only.
  2666. //
  2667. // If you specify a preset in PresetId for which the value of Container is fmp4
  2668. // (Fragmented MP4) or ts (MPEG-TS), SegmentDuration is the target maximum duration
  2669. // of each segment in seconds. For HLSv3 format playlists, each media segment
  2670. // is stored in a separate .ts file. For HLSv4 and Smooth playlists, all media
  2671. // segments for an output are stored in a single file. Each segment is approximately
  2672. // the length of the SegmentDuration, though individual segments might be shorter
  2673. // or longer.
  2674. //
  2675. // The range of valid values is 1 to 60 seconds. If the duration of the video
  2676. // is not evenly divisible by SegmentDuration, the duration of the last segment
  2677. // is the remainder of total length/SegmentDuration.
  2678. //
  2679. // Elastic Transcoder creates an output-specific playlist for each output HLS
  2680. // output that you specify in OutputKeys. To add an output to the master playlist
  2681. // for this job, include it in the OutputKeys of the associated playlist.
  2682. SegmentDuration *string `type:"string"`
  2683. // The encryption settings, if any, that you want Elastic Transcoder to apply
  2684. // to your thumbnail.
  2685. ThumbnailEncryption *Encryption `type:"structure"`
  2686. // Whether you want Elastic Transcoder to create thumbnails for your videos
  2687. // and, if so, how you want Elastic Transcoder to name the files.
  2688. //
  2689. // If you don't want Elastic Transcoder to create thumbnails, specify "".
  2690. //
  2691. // If you do want Elastic Transcoder to create thumbnails, specify the information
  2692. // that you want to include in the file name for each thumbnail. You can specify
  2693. // the following values in any sequence:
  2694. //
  2695. // * {count} (Required): If you want to create thumbnails, you must include
  2696. // {count} in the ThumbnailPattern object. Wherever you specify {count},
  2697. // Elastic Transcoder adds a five-digit sequence number (beginning with 00001)
  2698. // to thumbnail file names. The number indicates where a given thumbnail
  2699. // appears in the sequence of thumbnails for a transcoded file.
  2700. //
  2701. // If you specify a literal value and/or {resolution} but you omit {count},
  2702. // Elastic Transcoder returns a validation error and does not create the
  2703. // job.
  2704. //
  2705. // * Literal values (Optional): You can specify literal values anywhere in
  2706. // the ThumbnailPattern object. For example, you can include them as a file
  2707. // name prefix or as a delimiter between {resolution} and {count}.
  2708. //
  2709. // * {resolution} (Optional): If you want Elastic Transcoder to include the
  2710. // resolution in the file name, include {resolution} in the ThumbnailPattern
  2711. // object.
  2712. //
  2713. // When creating thumbnails, Elastic Transcoder automatically saves the files
  2714. // in the format (.jpg or .png) that appears in the preset that you specified
  2715. // in the PresetID value of CreateJobOutput. Elastic Transcoder also appends
  2716. // the applicable file name extension.
  2717. ThumbnailPattern *string `type:"string"`
  2718. // Information about the watermarks that you want Elastic Transcoder to add
  2719. // to the video during transcoding. You can specify up to four watermarks for
  2720. // each output. Settings for each watermark must be defined in the preset for
  2721. // the current output.
  2722. Watermarks []*JobWatermark `type:"list"`
  2723. }
  2724. // String returns the string representation
  2725. func (s CreateJobOutput) String() string {
  2726. return awsutil.Prettify(s)
  2727. }
  2728. // GoString returns the string representation
  2729. func (s CreateJobOutput) GoString() string {
  2730. return s.String()
  2731. }
  2732. // Validate inspects the fields of the type to determine if they are valid.
  2733. func (s *CreateJobOutput) Validate() error {
  2734. invalidParams := request.ErrInvalidParams{Context: "CreateJobOutput"}
  2735. if s.Key != nil && len(*s.Key) < 1 {
  2736. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  2737. }
  2738. if s.AlbumArt != nil {
  2739. if err := s.AlbumArt.Validate(); err != nil {
  2740. invalidParams.AddNested("AlbumArt", err.(request.ErrInvalidParams))
  2741. }
  2742. }
  2743. if s.Captions != nil {
  2744. if err := s.Captions.Validate(); err != nil {
  2745. invalidParams.AddNested("Captions", err.(request.ErrInvalidParams))
  2746. }
  2747. }
  2748. if s.Watermarks != nil {
  2749. for i, v := range s.Watermarks {
  2750. if v == nil {
  2751. continue
  2752. }
  2753. if err := v.Validate(); err != nil {
  2754. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Watermarks", i), err.(request.ErrInvalidParams))
  2755. }
  2756. }
  2757. }
  2758. if invalidParams.Len() > 0 {
  2759. return invalidParams
  2760. }
  2761. return nil
  2762. }
  2763. // SetAlbumArt sets the AlbumArt field's value.
  2764. func (s *CreateJobOutput) SetAlbumArt(v *JobAlbumArt) *CreateJobOutput {
  2765. s.AlbumArt = v
  2766. return s
  2767. }
  2768. // SetCaptions sets the Captions field's value.
  2769. func (s *CreateJobOutput) SetCaptions(v *Captions) *CreateJobOutput {
  2770. s.Captions = v
  2771. return s
  2772. }
  2773. // SetComposition sets the Composition field's value.
  2774. func (s *CreateJobOutput) SetComposition(v []*Clip) *CreateJobOutput {
  2775. s.Composition = v
  2776. return s
  2777. }
  2778. // SetEncryption sets the Encryption field's value.
  2779. func (s *CreateJobOutput) SetEncryption(v *Encryption) *CreateJobOutput {
  2780. s.Encryption = v
  2781. return s
  2782. }
  2783. // SetKey sets the Key field's value.
  2784. func (s *CreateJobOutput) SetKey(v string) *CreateJobOutput {
  2785. s.Key = &v
  2786. return s
  2787. }
  2788. // SetPresetId sets the PresetId field's value.
  2789. func (s *CreateJobOutput) SetPresetId(v string) *CreateJobOutput {
  2790. s.PresetId = &v
  2791. return s
  2792. }
  2793. // SetRotate sets the Rotate field's value.
  2794. func (s *CreateJobOutput) SetRotate(v string) *CreateJobOutput {
  2795. s.Rotate = &v
  2796. return s
  2797. }
  2798. // SetSegmentDuration sets the SegmentDuration field's value.
  2799. func (s *CreateJobOutput) SetSegmentDuration(v string) *CreateJobOutput {
  2800. s.SegmentDuration = &v
  2801. return s
  2802. }
  2803. // SetThumbnailEncryption sets the ThumbnailEncryption field's value.
  2804. func (s *CreateJobOutput) SetThumbnailEncryption(v *Encryption) *CreateJobOutput {
  2805. s.ThumbnailEncryption = v
  2806. return s
  2807. }
  2808. // SetThumbnailPattern sets the ThumbnailPattern field's value.
  2809. func (s *CreateJobOutput) SetThumbnailPattern(v string) *CreateJobOutput {
  2810. s.ThumbnailPattern = &v
  2811. return s
  2812. }
  2813. // SetWatermarks sets the Watermarks field's value.
  2814. func (s *CreateJobOutput) SetWatermarks(v []*JobWatermark) *CreateJobOutput {
  2815. s.Watermarks = v
  2816. return s
  2817. }
  2818. // Information about the master playlist.
  2819. type CreateJobPlaylist struct {
  2820. _ struct{} `type:"structure"`
  2821. // The format of the output playlist. Valid formats include HLSv3, HLSv4, and
  2822. // Smooth.
  2823. Format *string `type:"string"`
  2824. // The HLS content protection settings, if any, that you want Elastic Transcoder
  2825. // to apply to the output files associated with this playlist.
  2826. HlsContentProtection *HlsContentProtection `type:"structure"`
  2827. // The name that you want Elastic Transcoder to assign to the master playlist,
  2828. // for example, nyc-vacation.m3u8. If the name includes a / character, the section
  2829. // of the name before the last / must be identical for all Name objects. If
  2830. // you create more than one master playlist, the values of all Name objects
  2831. // must be unique.
  2832. //
  2833. // Elastic Transcoder automatically appends the relevant file extension to the
  2834. // file name (.m3u8 for HLSv3 and HLSv4 playlists, and .ism and .ismc for Smooth
  2835. // playlists). If you include a file extension in Name, the file name will have
  2836. // two extensions.
  2837. Name *string `min:"1" type:"string"`
  2838. // For each output in this job that you want to include in a master playlist,
  2839. // the value of the Outputs:Key object.
  2840. //
  2841. // * If your output is not HLS or does not have a segment duration set, the
  2842. // name of the output file is a concatenation of OutputKeyPrefix and Outputs:Key:
  2843. //
  2844. // OutputKeyPrefixOutputs:Key
  2845. //
  2846. // * If your output is HLSv3 and has a segment duration set, or is not included
  2847. // in a playlist, Elastic Transcoder creates an output playlist file with
  2848. // a file extension of .m3u8, and a series of .ts files that include a five-digit
  2849. // sequential counter beginning with 00000:
  2850. //
  2851. // OutputKeyPrefixOutputs:Key.m3u8
  2852. //
  2853. // OutputKeyPrefixOutputs:Key00000.ts
  2854. //
  2855. // * If your output is HLSv4, has a segment duration set, and is included
  2856. // in an HLSv4 playlist, Elastic Transcoder creates an output playlist file
  2857. // with a file extension of _v4.m3u8. If the output is video, Elastic Transcoder
  2858. // also creates an output file with an extension of _iframe.m3u8:
  2859. //
  2860. // OutputKeyPrefixOutputs:Key_v4.m3u8
  2861. //
  2862. // OutputKeyPrefixOutputs:Key_iframe.m3u8
  2863. //
  2864. // OutputKeyPrefixOutputs:Key.ts
  2865. //
  2866. // Elastic Transcoder automatically appends the relevant file extension to the
  2867. // file name. If you include a file extension in Output Key, the file name will
  2868. // have two extensions.
  2869. //
  2870. // If you include more than one output in a playlist, any segment duration settings,
  2871. // clip settings, or caption settings must be the same for all outputs in the
  2872. // playlist. For Smooth playlists, the Audio:Profile, Video:Profile, and Video:FrameRate
  2873. // to Video:KeyframesMaxDist ratio must be the same for all outputs.
  2874. OutputKeys []*string `type:"list"`
  2875. // The DRM settings, if any, that you want Elastic Transcoder to apply to the
  2876. // output files associated with this playlist.
  2877. PlayReadyDrm *PlayReadyDrm `type:"structure"`
  2878. }
  2879. // String returns the string representation
  2880. func (s CreateJobPlaylist) String() string {
  2881. return awsutil.Prettify(s)
  2882. }
  2883. // GoString returns the string representation
  2884. func (s CreateJobPlaylist) GoString() string {
  2885. return s.String()
  2886. }
  2887. // Validate inspects the fields of the type to determine if they are valid.
  2888. func (s *CreateJobPlaylist) Validate() error {
  2889. invalidParams := request.ErrInvalidParams{Context: "CreateJobPlaylist"}
  2890. if s.Name != nil && len(*s.Name) < 1 {
  2891. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2892. }
  2893. if s.PlayReadyDrm != nil {
  2894. if err := s.PlayReadyDrm.Validate(); err != nil {
  2895. invalidParams.AddNested("PlayReadyDrm", err.(request.ErrInvalidParams))
  2896. }
  2897. }
  2898. if invalidParams.Len() > 0 {
  2899. return invalidParams
  2900. }
  2901. return nil
  2902. }
  2903. // SetFormat sets the Format field's value.
  2904. func (s *CreateJobPlaylist) SetFormat(v string) *CreateJobPlaylist {
  2905. s.Format = &v
  2906. return s
  2907. }
  2908. // SetHlsContentProtection sets the HlsContentProtection field's value.
  2909. func (s *CreateJobPlaylist) SetHlsContentProtection(v *HlsContentProtection) *CreateJobPlaylist {
  2910. s.HlsContentProtection = v
  2911. return s
  2912. }
  2913. // SetName sets the Name field's value.
  2914. func (s *CreateJobPlaylist) SetName(v string) *CreateJobPlaylist {
  2915. s.Name = &v
  2916. return s
  2917. }
  2918. // SetOutputKeys sets the OutputKeys field's value.
  2919. func (s *CreateJobPlaylist) SetOutputKeys(v []*string) *CreateJobPlaylist {
  2920. s.OutputKeys = v
  2921. return s
  2922. }
  2923. // SetPlayReadyDrm sets the PlayReadyDrm field's value.
  2924. func (s *CreateJobPlaylist) SetPlayReadyDrm(v *PlayReadyDrm) *CreateJobPlaylist {
  2925. s.PlayReadyDrm = v
  2926. return s
  2927. }
  2928. // The CreateJobResponse structure.
  2929. type CreateJobResponse struct {
  2930. _ struct{} `type:"structure"`
  2931. // A section of the response body that provides information about the job that
  2932. // is created.
  2933. Job *Job `type:"structure"`
  2934. }
  2935. // String returns the string representation
  2936. func (s CreateJobResponse) String() string {
  2937. return awsutil.Prettify(s)
  2938. }
  2939. // GoString returns the string representation
  2940. func (s CreateJobResponse) GoString() string {
  2941. return s.String()
  2942. }
  2943. // SetJob sets the Job field's value.
  2944. func (s *CreateJobResponse) SetJob(v *Job) *CreateJobResponse {
  2945. s.Job = v
  2946. return s
  2947. }
  2948. // The CreatePipelineRequest structure.
  2949. type CreatePipelineInput struct {
  2950. _ struct{} `type:"structure"`
  2951. // The AWS Key Management Service (AWS KMS) key that you want to use with this
  2952. // pipeline.
  2953. //
  2954. // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need
  2955. // to provide a key with your job because a default key, known as an AWS-KMS
  2956. // key, is created for you automatically. You need to provide an AWS-KMS key
  2957. // only if you want to use a non-default AWS-KMS key, or if you are using an
  2958. // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm.
  2959. AwsKmsKeyArn *string `type:"string"`
  2960. // The optional ContentConfig object specifies information about the Amazon
  2961. // S3 bucket in which you want Elastic Transcoder to save transcoded files and
  2962. // playlists: which bucket to use, which users you want to have access to the
  2963. // files, the type of access you want users to have, and the storage class that
  2964. // you want to assign to the files.
  2965. //
  2966. // If you specify values for ContentConfig, you must also specify values for
  2967. // ThumbnailConfig.
  2968. //
  2969. // If you specify values for ContentConfig and ThumbnailConfig, omit the OutputBucket
  2970. // object.
  2971. //
  2972. // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to
  2973. // save transcoded files and playlists.
  2974. //
  2975. // * Permissions (Optional): The Permissions object specifies which users
  2976. // you want to have access to transcoded files and the type of access you
  2977. // want them to have. You can grant permissions to a maximum of 30 users
  2978. // and/or predefined Amazon S3 groups.
  2979. //
  2980. // * Grantee Type: Specify the type of value that appears in the Grantee
  2981. // object:
  2982. //
  2983. // Canonical: The value in the Grantee object is either the canonical user ID
  2984. // for an AWS account or an origin access identity for an Amazon CloudFront
  2985. // distribution. For more information about canonical user IDs, see Access
  2986. // Control List (ACL) Overview in the Amazon Simple Storage Service Developer
  2987. // Guide. For more information about using CloudFront origin access identities
  2988. // to require that users use CloudFront URLs instead of Amazon S3 URLs, see
  2989. // Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content.
  2990. //
  2991. // A canonical user ID is not the same as an AWS account number.
  2992. //
  2993. // Email: The value in the Grantee object is the registered email address of
  2994. // an AWS account.
  2995. //
  2996. // Group: The value in the Grantee object is one of the following predefined
  2997. // Amazon S3 groups: AllUsers, AuthenticatedUsers, or LogDelivery.
  2998. //
  2999. // * Grantee: The AWS user or group that you want to have access to transcoded
  3000. // files and playlists. To identify the user or group, you can specify the
  3001. // canonical user ID for an AWS account, an origin access identity for a
  3002. // CloudFront distribution, the registered email address of an AWS account,
  3003. // or a predefined Amazon S3 group
  3004. //
  3005. // * Access: The permission that you want to give to the AWS user that you
  3006. // specified in Grantee. Permissions are granted on the files that Elastic
  3007. // Transcoder adds to the bucket, including playlists and video files. Valid
  3008. // values include:
  3009. //
  3010. // READ: The grantee can read the objects and metadata for objects that Elastic
  3011. // Transcoder adds to the Amazon S3 bucket.
  3012. //
  3013. // READ_ACP: The grantee can read the object ACL for objects that Elastic Transcoder
  3014. // adds to the Amazon S3 bucket.
  3015. //
  3016. // WRITE_ACP: The grantee can write the ACL for the objects that Elastic Transcoder
  3017. // adds to the Amazon S3 bucket.
  3018. //
  3019. // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for
  3020. // the objects that Elastic Transcoder adds to the Amazon S3 bucket.
  3021. //
  3022. // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy,
  3023. // that you want Elastic Transcoder to assign to the video files and playlists
  3024. // that it stores in your Amazon S3 bucket.
  3025. ContentConfig *PipelineOutputConfig `type:"structure"`
  3026. // The Amazon S3 bucket in which you saved the media files that you want to
  3027. // transcode.
  3028. //
  3029. // InputBucket is a required field
  3030. InputBucket *string `type:"string" required:"true"`
  3031. // The name of the pipeline. We recommend that the name be unique within the
  3032. // AWS account, but uniqueness is not enforced.
  3033. //
  3034. // Constraints: Maximum 40 characters.
  3035. //
  3036. // Name is a required field
  3037. Name *string `min:"1" type:"string" required:"true"`
  3038. // The Amazon Simple Notification Service (Amazon SNS) topic that you want to
  3039. // notify to report job status.
  3040. //
  3041. // To receive notifications, you must also subscribe to the new topic in the
  3042. // Amazon SNS console.
  3043. //
  3044. // * Progressing: The topic ARN for the Amazon Simple Notification Service
  3045. // (Amazon SNS) topic that you want to notify when Elastic Transcoder has
  3046. // started to process a job in this pipeline. This is the ARN that Amazon
  3047. // SNS returned when you created the topic. For more information, see Create
  3048. // a Topic in the Amazon Simple Notification Service Developer Guide.
  3049. //
  3050. // * Complete: The topic ARN for the Amazon SNS topic that you want to notify
  3051. // when Elastic Transcoder has finished processing a job in this pipeline.
  3052. // This is the ARN that Amazon SNS returned when you created the topic.
  3053. //
  3054. // * Warning: The topic ARN for the Amazon SNS topic that you want to notify
  3055. // when Elastic Transcoder encounters a warning condition while processing
  3056. // a job in this pipeline. This is the ARN that Amazon SNS returned when
  3057. // you created the topic.
  3058. //
  3059. // * Error: The topic ARN for the Amazon SNS topic that you want to notify
  3060. // when Elastic Transcoder encounters an error condition while processing
  3061. // a job in this pipeline. This is the ARN that Amazon SNS returned when
  3062. // you created the topic.
  3063. Notifications *Notifications `type:"structure"`
  3064. // The Amazon S3 bucket in which you want Elastic Transcoder to save the transcoded
  3065. // files. (Use this, or use ContentConfig:Bucket plus ThumbnailConfig:Bucket.)
  3066. //
  3067. // Specify this value when all of the following are true:
  3068. //
  3069. // * You want to save transcoded files, thumbnails (if any), and playlists
  3070. // (if any) together in one bucket.
  3071. //
  3072. // * You do not want to specify the users or groups who have access to the
  3073. // transcoded files, thumbnails, and playlists.
  3074. //
  3075. // * You do not want to specify the permissions that Elastic Transcoder grants
  3076. // to the files.
  3077. //
  3078. // When Elastic Transcoder saves files in OutputBucket, it grants full control
  3079. // over the files only to the AWS account that owns the role that is specified
  3080. // by Role.
  3081. //
  3082. // * You want to associate the transcoded files and thumbnails with the Amazon
  3083. // S3 Standard storage class.
  3084. //
  3085. // If you want to save transcoded files and playlists in one bucket and thumbnails
  3086. // in another bucket, specify which users can access the transcoded files or
  3087. // the permissions the users have, or change the Amazon S3 storage class, omit
  3088. // OutputBucket and specify values for ContentConfig and ThumbnailConfig instead.
  3089. OutputBucket *string `type:"string"`
  3090. // The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder
  3091. // to use to create the pipeline.
  3092. //
  3093. // Role is a required field
  3094. Role *string `type:"string" required:"true"`
  3095. // The ThumbnailConfig object specifies several values, including the Amazon
  3096. // S3 bucket in which you want Elastic Transcoder to save thumbnail files, which
  3097. // users you want to have access to the files, the type of access you want users
  3098. // to have, and the storage class that you want to assign to the files.
  3099. //
  3100. // If you specify values for ContentConfig, you must also specify values for
  3101. // ThumbnailConfig even if you don't want to create thumbnails.
  3102. //
  3103. // If you specify values for ContentConfig and ThumbnailConfig, omit the OutputBucket
  3104. // object.
  3105. //
  3106. // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to
  3107. // save thumbnail files.
  3108. //
  3109. // * Permissions (Optional): The Permissions object specifies which users
  3110. // and/or predefined Amazon S3 groups you want to have access to thumbnail
  3111. // files, and the type of access you want them to have. You can grant permissions
  3112. // to a maximum of 30 users and/or predefined Amazon S3 groups.
  3113. //
  3114. // * GranteeType: Specify the type of value that appears in the Grantee object:
  3115. //
  3116. //
  3117. // Canonical: The value in the Grantee object is either the canonical user ID
  3118. // for an AWS account or an origin access identity for an Amazon CloudFront
  3119. // distribution.
  3120. //
  3121. // A canonical user ID is not the same as an AWS account number.
  3122. //
  3123. // Email: The value in the Grantee object is the registered email address of
  3124. // an AWS account.
  3125. //
  3126. // Group: The value in the Grantee object is one of the following predefined
  3127. // Amazon S3 groups: AllUsers, AuthenticatedUsers, or LogDelivery.
  3128. //
  3129. // * Grantee: The AWS user or group that you want to have access to thumbnail
  3130. // files. To identify the user or group, you can specify the canonical user
  3131. // ID for an AWS account, an origin access identity for a CloudFront distribution,
  3132. // the registered email address of an AWS account, or a predefined Amazon
  3133. // S3 group.
  3134. //
  3135. // * Access: The permission that you want to give to the AWS user that you
  3136. // specified in Grantee. Permissions are granted on the thumbnail files that
  3137. // Elastic Transcoder adds to the bucket. Valid values include:
  3138. //
  3139. // READ: The grantee can read the thumbnails and metadata for objects that Elastic
  3140. // Transcoder adds to the Amazon S3 bucket.
  3141. //
  3142. // READ_ACP: The grantee can read the object ACL for thumbnails that Elastic
  3143. // Transcoder adds to the Amazon S3 bucket.
  3144. //
  3145. // WRITE_ACP: The grantee can write the ACL for the thumbnails that Elastic
  3146. // Transcoder adds to the Amazon S3 bucket.
  3147. //
  3148. // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for
  3149. // the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.
  3150. //
  3151. // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy,
  3152. // that you want Elastic Transcoder to assign to the thumbnails that it stores
  3153. // in your Amazon S3 bucket.
  3154. ThumbnailConfig *PipelineOutputConfig `type:"structure"`
  3155. }
  3156. // String returns the string representation
  3157. func (s CreatePipelineInput) String() string {
  3158. return awsutil.Prettify(s)
  3159. }
  3160. // GoString returns the string representation
  3161. func (s CreatePipelineInput) GoString() string {
  3162. return s.String()
  3163. }
  3164. // Validate inspects the fields of the type to determine if they are valid.
  3165. func (s *CreatePipelineInput) Validate() error {
  3166. invalidParams := request.ErrInvalidParams{Context: "CreatePipelineInput"}
  3167. if s.InputBucket == nil {
  3168. invalidParams.Add(request.NewErrParamRequired("InputBucket"))
  3169. }
  3170. if s.Name == nil {
  3171. invalidParams.Add(request.NewErrParamRequired("Name"))
  3172. }
  3173. if s.Name != nil && len(*s.Name) < 1 {
  3174. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  3175. }
  3176. if s.Role == nil {
  3177. invalidParams.Add(request.NewErrParamRequired("Role"))
  3178. }
  3179. if s.ContentConfig != nil {
  3180. if err := s.ContentConfig.Validate(); err != nil {
  3181. invalidParams.AddNested("ContentConfig", err.(request.ErrInvalidParams))
  3182. }
  3183. }
  3184. if s.ThumbnailConfig != nil {
  3185. if err := s.ThumbnailConfig.Validate(); err != nil {
  3186. invalidParams.AddNested("ThumbnailConfig", err.(request.ErrInvalidParams))
  3187. }
  3188. }
  3189. if invalidParams.Len() > 0 {
  3190. return invalidParams
  3191. }
  3192. return nil
  3193. }
  3194. // SetAwsKmsKeyArn sets the AwsKmsKeyArn field's value.
  3195. func (s *CreatePipelineInput) SetAwsKmsKeyArn(v string) *CreatePipelineInput {
  3196. s.AwsKmsKeyArn = &v
  3197. return s
  3198. }
  3199. // SetContentConfig sets the ContentConfig field's value.
  3200. func (s *CreatePipelineInput) SetContentConfig(v *PipelineOutputConfig) *CreatePipelineInput {
  3201. s.ContentConfig = v
  3202. return s
  3203. }
  3204. // SetInputBucket sets the InputBucket field's value.
  3205. func (s *CreatePipelineInput) SetInputBucket(v string) *CreatePipelineInput {
  3206. s.InputBucket = &v
  3207. return s
  3208. }
  3209. // SetName sets the Name field's value.
  3210. func (s *CreatePipelineInput) SetName(v string) *CreatePipelineInput {
  3211. s.Name = &v
  3212. return s
  3213. }
  3214. // SetNotifications sets the Notifications field's value.
  3215. func (s *CreatePipelineInput) SetNotifications(v *Notifications) *CreatePipelineInput {
  3216. s.Notifications = v
  3217. return s
  3218. }
  3219. // SetOutputBucket sets the OutputBucket field's value.
  3220. func (s *CreatePipelineInput) SetOutputBucket(v string) *CreatePipelineInput {
  3221. s.OutputBucket = &v
  3222. return s
  3223. }
  3224. // SetRole sets the Role field's value.
  3225. func (s *CreatePipelineInput) SetRole(v string) *CreatePipelineInput {
  3226. s.Role = &v
  3227. return s
  3228. }
  3229. // SetThumbnailConfig sets the ThumbnailConfig field's value.
  3230. func (s *CreatePipelineInput) SetThumbnailConfig(v *PipelineOutputConfig) *CreatePipelineInput {
  3231. s.ThumbnailConfig = v
  3232. return s
  3233. }
  3234. // When you create a pipeline, Elastic Transcoder returns the values that you
  3235. // specified in the request.
  3236. type CreatePipelineOutput struct {
  3237. _ struct{} `type:"structure"`
  3238. // A section of the response body that provides information about the pipeline
  3239. // that is created.
  3240. Pipeline *Pipeline `type:"structure"`
  3241. // Elastic Transcoder returns a warning if the resources used by your pipeline
  3242. // are not in the same region as the pipeline.
  3243. //
  3244. // Using resources in the same region, such as your Amazon S3 buckets, Amazon
  3245. // SNS notification topics, and AWS KMS key, reduces processing time and prevents
  3246. // cross-regional charges.
  3247. Warnings []*Warning `type:"list"`
  3248. }
  3249. // String returns the string representation
  3250. func (s CreatePipelineOutput) String() string {
  3251. return awsutil.Prettify(s)
  3252. }
  3253. // GoString returns the string representation
  3254. func (s CreatePipelineOutput) GoString() string {
  3255. return s.String()
  3256. }
  3257. // SetPipeline sets the Pipeline field's value.
  3258. func (s *CreatePipelineOutput) SetPipeline(v *Pipeline) *CreatePipelineOutput {
  3259. s.Pipeline = v
  3260. return s
  3261. }
  3262. // SetWarnings sets the Warnings field's value.
  3263. func (s *CreatePipelineOutput) SetWarnings(v []*Warning) *CreatePipelineOutput {
  3264. s.Warnings = v
  3265. return s
  3266. }
  3267. // The CreatePresetRequest structure.
  3268. type CreatePresetInput struct {
  3269. _ struct{} `type:"structure"`
  3270. // A section of the request body that specifies the audio parameters.
  3271. Audio *AudioParameters `type:"structure"`
  3272. // The container type for the output file. Valid values include flac, flv, fmp4,
  3273. // gif, mp3, mp4, mpg, mxf, oga, ogg, ts, and webm.
  3274. //
  3275. // Container is a required field
  3276. Container *string `type:"string" required:"true"`
  3277. // A description of the preset.
  3278. Description *string `type:"string"`
  3279. // The name of the preset. We recommend that the name be unique within the AWS
  3280. // account, but uniqueness is not enforced.
  3281. //
  3282. // Name is a required field
  3283. Name *string `min:"1" type:"string" required:"true"`
  3284. // A section of the request body that specifies the thumbnail parameters, if
  3285. // any.
  3286. Thumbnails *Thumbnails `type:"structure"`
  3287. // A section of the request body that specifies the video parameters.
  3288. Video *VideoParameters `type:"structure"`
  3289. }
  3290. // String returns the string representation
  3291. func (s CreatePresetInput) String() string {
  3292. return awsutil.Prettify(s)
  3293. }
  3294. // GoString returns the string representation
  3295. func (s CreatePresetInput) GoString() string {
  3296. return s.String()
  3297. }
  3298. // Validate inspects the fields of the type to determine if they are valid.
  3299. func (s *CreatePresetInput) Validate() error {
  3300. invalidParams := request.ErrInvalidParams{Context: "CreatePresetInput"}
  3301. if s.Container == nil {
  3302. invalidParams.Add(request.NewErrParamRequired("Container"))
  3303. }
  3304. if s.Name == nil {
  3305. invalidParams.Add(request.NewErrParamRequired("Name"))
  3306. }
  3307. if s.Name != nil && len(*s.Name) < 1 {
  3308. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  3309. }
  3310. if s.Video != nil {
  3311. if err := s.Video.Validate(); err != nil {
  3312. invalidParams.AddNested("Video", err.(request.ErrInvalidParams))
  3313. }
  3314. }
  3315. if invalidParams.Len() > 0 {
  3316. return invalidParams
  3317. }
  3318. return nil
  3319. }
  3320. // SetAudio sets the Audio field's value.
  3321. func (s *CreatePresetInput) SetAudio(v *AudioParameters) *CreatePresetInput {
  3322. s.Audio = v
  3323. return s
  3324. }
  3325. // SetContainer sets the Container field's value.
  3326. func (s *CreatePresetInput) SetContainer(v string) *CreatePresetInput {
  3327. s.Container = &v
  3328. return s
  3329. }
  3330. // SetDescription sets the Description field's value.
  3331. func (s *CreatePresetInput) SetDescription(v string) *CreatePresetInput {
  3332. s.Description = &v
  3333. return s
  3334. }
  3335. // SetName sets the Name field's value.
  3336. func (s *CreatePresetInput) SetName(v string) *CreatePresetInput {
  3337. s.Name = &v
  3338. return s
  3339. }
  3340. // SetThumbnails sets the Thumbnails field's value.
  3341. func (s *CreatePresetInput) SetThumbnails(v *Thumbnails) *CreatePresetInput {
  3342. s.Thumbnails = v
  3343. return s
  3344. }
  3345. // SetVideo sets the Video field's value.
  3346. func (s *CreatePresetInput) SetVideo(v *VideoParameters) *CreatePresetInput {
  3347. s.Video = v
  3348. return s
  3349. }
  3350. // The CreatePresetResponse structure.
  3351. type CreatePresetOutput struct {
  3352. _ struct{} `type:"structure"`
  3353. // A section of the response body that provides information about the preset
  3354. // that is created.
  3355. Preset *Preset `type:"structure"`
  3356. // If the preset settings don't comply with the standards for the video codec
  3357. // but Elastic Transcoder created the preset, this message explains the reason
  3358. // the preset settings don't meet the standard. Elastic Transcoder created the
  3359. // preset because the settings might produce acceptable output.
  3360. Warning *string `type:"string"`
  3361. }
  3362. // String returns the string representation
  3363. func (s CreatePresetOutput) String() string {
  3364. return awsutil.Prettify(s)
  3365. }
  3366. // GoString returns the string representation
  3367. func (s CreatePresetOutput) GoString() string {
  3368. return s.String()
  3369. }
  3370. // SetPreset sets the Preset field's value.
  3371. func (s *CreatePresetOutput) SetPreset(v *Preset) *CreatePresetOutput {
  3372. s.Preset = v
  3373. return s
  3374. }
  3375. // SetWarning sets the Warning field's value.
  3376. func (s *CreatePresetOutput) SetWarning(v string) *CreatePresetOutput {
  3377. s.Warning = &v
  3378. return s
  3379. }
  3380. // The DeletePipelineRequest structure.
  3381. type DeletePipelineInput struct {
  3382. _ struct{} `type:"structure"`
  3383. // The identifier of the pipeline that you want to delete.
  3384. //
  3385. // Id is a required field
  3386. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  3387. }
  3388. // String returns the string representation
  3389. func (s DeletePipelineInput) String() string {
  3390. return awsutil.Prettify(s)
  3391. }
  3392. // GoString returns the string representation
  3393. func (s DeletePipelineInput) GoString() string {
  3394. return s.String()
  3395. }
  3396. // Validate inspects the fields of the type to determine if they are valid.
  3397. func (s *DeletePipelineInput) Validate() error {
  3398. invalidParams := request.ErrInvalidParams{Context: "DeletePipelineInput"}
  3399. if s.Id == nil {
  3400. invalidParams.Add(request.NewErrParamRequired("Id"))
  3401. }
  3402. if s.Id != nil && len(*s.Id) < 1 {
  3403. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  3404. }
  3405. if invalidParams.Len() > 0 {
  3406. return invalidParams
  3407. }
  3408. return nil
  3409. }
  3410. // SetId sets the Id field's value.
  3411. func (s *DeletePipelineInput) SetId(v string) *DeletePipelineInput {
  3412. s.Id = &v
  3413. return s
  3414. }
  3415. // The DeletePipelineResponse structure.
  3416. type DeletePipelineOutput struct {
  3417. _ struct{} `type:"structure"`
  3418. }
  3419. // String returns the string representation
  3420. func (s DeletePipelineOutput) String() string {
  3421. return awsutil.Prettify(s)
  3422. }
  3423. // GoString returns the string representation
  3424. func (s DeletePipelineOutput) GoString() string {
  3425. return s.String()
  3426. }
  3427. // The DeletePresetRequest structure.
  3428. type DeletePresetInput struct {
  3429. _ struct{} `type:"structure"`
  3430. // The identifier of the preset for which you want to get detailed information.
  3431. //
  3432. // Id is a required field
  3433. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  3434. }
  3435. // String returns the string representation
  3436. func (s DeletePresetInput) String() string {
  3437. return awsutil.Prettify(s)
  3438. }
  3439. // GoString returns the string representation
  3440. func (s DeletePresetInput) GoString() string {
  3441. return s.String()
  3442. }
  3443. // Validate inspects the fields of the type to determine if they are valid.
  3444. func (s *DeletePresetInput) Validate() error {
  3445. invalidParams := request.ErrInvalidParams{Context: "DeletePresetInput"}
  3446. if s.Id == nil {
  3447. invalidParams.Add(request.NewErrParamRequired("Id"))
  3448. }
  3449. if s.Id != nil && len(*s.Id) < 1 {
  3450. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  3451. }
  3452. if invalidParams.Len() > 0 {
  3453. return invalidParams
  3454. }
  3455. return nil
  3456. }
  3457. // SetId sets the Id field's value.
  3458. func (s *DeletePresetInput) SetId(v string) *DeletePresetInput {
  3459. s.Id = &v
  3460. return s
  3461. }
  3462. // The DeletePresetResponse structure.
  3463. type DeletePresetOutput struct {
  3464. _ struct{} `type:"structure"`
  3465. }
  3466. // String returns the string representation
  3467. func (s DeletePresetOutput) String() string {
  3468. return awsutil.Prettify(s)
  3469. }
  3470. // GoString returns the string representation
  3471. func (s DeletePresetOutput) GoString() string {
  3472. return s.String()
  3473. }
  3474. // The detected properties of the input file. Elastic Transcoder identifies
  3475. // these values from the input file.
  3476. type DetectedProperties struct {
  3477. _ struct{} `type:"structure"`
  3478. // The detected duration of the input file, in milliseconds.
  3479. DurationMillis *int64 `type:"long"`
  3480. // The detected file size of the input file, in bytes.
  3481. FileSize *int64 `type:"long"`
  3482. // The detected frame rate of the input file, in frames per second.
  3483. FrameRate *string `type:"string"`
  3484. // The detected height of the input file, in pixels.
  3485. Height *int64 `type:"integer"`
  3486. // The detected width of the input file, in pixels.
  3487. Width *int64 `type:"integer"`
  3488. }
  3489. // String returns the string representation
  3490. func (s DetectedProperties) String() string {
  3491. return awsutil.Prettify(s)
  3492. }
  3493. // GoString returns the string representation
  3494. func (s DetectedProperties) GoString() string {
  3495. return s.String()
  3496. }
  3497. // SetDurationMillis sets the DurationMillis field's value.
  3498. func (s *DetectedProperties) SetDurationMillis(v int64) *DetectedProperties {
  3499. s.DurationMillis = &v
  3500. return s
  3501. }
  3502. // SetFileSize sets the FileSize field's value.
  3503. func (s *DetectedProperties) SetFileSize(v int64) *DetectedProperties {
  3504. s.FileSize = &v
  3505. return s
  3506. }
  3507. // SetFrameRate sets the FrameRate field's value.
  3508. func (s *DetectedProperties) SetFrameRate(v string) *DetectedProperties {
  3509. s.FrameRate = &v
  3510. return s
  3511. }
  3512. // SetHeight sets the Height field's value.
  3513. func (s *DetectedProperties) SetHeight(v int64) *DetectedProperties {
  3514. s.Height = &v
  3515. return s
  3516. }
  3517. // SetWidth sets the Width field's value.
  3518. func (s *DetectedProperties) SetWidth(v int64) *DetectedProperties {
  3519. s.Width = &v
  3520. return s
  3521. }
  3522. // The encryption settings, if any, that are used for decrypting your input
  3523. // files or encrypting your output files. If your input file is encrypted, you
  3524. // must specify the mode that Elastic Transcoder uses to decrypt your file,
  3525. // otherwise you must specify the mode you want Elastic Transcoder to use to
  3526. // encrypt your output files.
  3527. type Encryption struct {
  3528. _ struct{} `type:"structure"`
  3529. // The series of random bits created by a random bit generator, unique for every
  3530. // encryption operation, that you used to encrypt your input files or that you
  3531. // want Elastic Transcoder to use to encrypt your output files. The initialization
  3532. // vector must be base64-encoded, and it must be exactly 16 bytes long before
  3533. // being base64-encoded.
  3534. InitializationVector *string `type:"string"`
  3535. // The data encryption key that you want Elastic Transcoder to use to encrypt
  3536. // your output file, or that was used to encrypt your input file. The key must
  3537. // be base64-encoded and it must be one of the following bit lengths before
  3538. // being base64-encoded:
  3539. //
  3540. // 128, 192, or 256.
  3541. //
  3542. // The key must also be encrypted by using the Amazon Key Management Service.
  3543. Key *string `type:"string"`
  3544. // The MD5 digest of the key that you used to encrypt your input file, or that
  3545. // you want Elastic Transcoder to use to encrypt your output file. Elastic Transcoder
  3546. // uses the key digest as a checksum to make sure your key was not corrupted
  3547. // in transit. The key MD5 must be base64-encoded, and it must be exactly 16
  3548. // bytes long before being base64-encoded.
  3549. KeyMd5 *string `type:"string"`
  3550. // The specific server-side encryption mode that you want Elastic Transcoder
  3551. // to use when decrypting your input files or encrypting your output files.
  3552. // Elastic Transcoder supports the following options:
  3553. //
  3554. // * s3: Amazon S3 creates and manages the keys used for encrypting your
  3555. // files.
  3556. //
  3557. // * s3-aws-kms: Amazon S3 calls the Amazon Key Management Service, which
  3558. // creates and manages the keys that are used for encrypting your files.
  3559. // If you specify s3-aws-kms and you don't want to use the default key, you
  3560. // must add the AWS-KMS key that you want to use to your pipeline.
  3561. //
  3562. // * aes-cbc-pkcs7: A padded cipher-block mode of operation originally used
  3563. // for HLS files.
  3564. //
  3565. // * aes-ctr: AES Counter Mode.
  3566. //
  3567. // * aes-gcm: AES Galois Counter Mode, a mode of operation that is an authenticated
  3568. // encryption format, meaning that a file, key, or initialization vector
  3569. // that has been tampered with fails the decryption process.
  3570. //
  3571. // For all three AES options, you must provide the following settings, which
  3572. // must be base64-encoded:
  3573. //
  3574. // * Key
  3575. //
  3576. // * Key MD5
  3577. //
  3578. // * Initialization Vector
  3579. //
  3580. // For the AES modes, your private encryption keys and your unencrypted data
  3581. // are never stored by AWS; therefore, it is important that you safely manage
  3582. // your encryption keys. If you lose them, you won't be able to unencrypt your
  3583. // data.
  3584. Mode *string `type:"string"`
  3585. }
  3586. // String returns the string representation
  3587. func (s Encryption) String() string {
  3588. return awsutil.Prettify(s)
  3589. }
  3590. // GoString returns the string representation
  3591. func (s Encryption) GoString() string {
  3592. return s.String()
  3593. }
  3594. // SetInitializationVector sets the InitializationVector field's value.
  3595. func (s *Encryption) SetInitializationVector(v string) *Encryption {
  3596. s.InitializationVector = &v
  3597. return s
  3598. }
  3599. // SetKey sets the Key field's value.
  3600. func (s *Encryption) SetKey(v string) *Encryption {
  3601. s.Key = &v
  3602. return s
  3603. }
  3604. // SetKeyMd5 sets the KeyMd5 field's value.
  3605. func (s *Encryption) SetKeyMd5(v string) *Encryption {
  3606. s.KeyMd5 = &v
  3607. return s
  3608. }
  3609. // SetMode sets the Mode field's value.
  3610. func (s *Encryption) SetMode(v string) *Encryption {
  3611. s.Mode = &v
  3612. return s
  3613. }
  3614. // The HLS content protection settings, if any, that you want Elastic Transcoder
  3615. // to apply to your output files.
  3616. type HlsContentProtection struct {
  3617. _ struct{} `type:"structure"`
  3618. // If Elastic Transcoder is generating your key for you, you must leave this
  3619. // field blank.
  3620. //
  3621. // The series of random bits created by a random bit generator, unique for every
  3622. // encryption operation, that you want Elastic Transcoder to use to encrypt
  3623. // your output files. The initialization vector must be base64-encoded, and
  3624. // it must be exactly 16 bytes before being base64-encoded.
  3625. InitializationVector *string `type:"string"`
  3626. // If you want Elastic Transcoder to generate a key for you, leave this field
  3627. // blank.
  3628. //
  3629. // If you choose to supply your own key, you must encrypt the key by using AWS
  3630. // KMS. The key must be base64-encoded, and it must be one of the following
  3631. // bit lengths before being base64-encoded:
  3632. //
  3633. // 128, 192, or 256.
  3634. Key *string `type:"string"`
  3635. // If Elastic Transcoder is generating your key for you, you must leave this
  3636. // field blank.
  3637. //
  3638. // The MD5 digest of the key that you want Elastic Transcoder to use to encrypt
  3639. // your output file, and that you want Elastic Transcoder to use as a checksum
  3640. // to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded,
  3641. // and it must be exactly 16 bytes before being base64- encoded.
  3642. KeyMd5 *string `type:"string"`
  3643. // Specify whether you want Elastic Transcoder to write your HLS license key
  3644. // to an Amazon S3 bucket. If you choose WithVariantPlaylists, LicenseAcquisitionUrl
  3645. // must be left blank and Elastic Transcoder writes your data key into the same
  3646. // bucket as the associated playlist.
  3647. KeyStoragePolicy *string `type:"string"`
  3648. // The location of the license key required to decrypt your HLS playlist. The
  3649. // URL must be an absolute path, and is referenced in the URI attribute of the
  3650. // EXT-X-KEY metadata tag in the playlist file.
  3651. LicenseAcquisitionUrl *string `type:"string"`
  3652. // The content protection method for your output. The only valid value is: aes-128.
  3653. //
  3654. // This value is written into the method attribute of the EXT-X-KEY metadata
  3655. // tag in the output playlist.
  3656. Method *string `type:"string"`
  3657. }
  3658. // String returns the string representation
  3659. func (s HlsContentProtection) String() string {
  3660. return awsutil.Prettify(s)
  3661. }
  3662. // GoString returns the string representation
  3663. func (s HlsContentProtection) GoString() string {
  3664. return s.String()
  3665. }
  3666. // SetInitializationVector sets the InitializationVector field's value.
  3667. func (s *HlsContentProtection) SetInitializationVector(v string) *HlsContentProtection {
  3668. s.InitializationVector = &v
  3669. return s
  3670. }
  3671. // SetKey sets the Key field's value.
  3672. func (s *HlsContentProtection) SetKey(v string) *HlsContentProtection {
  3673. s.Key = &v
  3674. return s
  3675. }
  3676. // SetKeyMd5 sets the KeyMd5 field's value.
  3677. func (s *HlsContentProtection) SetKeyMd5(v string) *HlsContentProtection {
  3678. s.KeyMd5 = &v
  3679. return s
  3680. }
  3681. // SetKeyStoragePolicy sets the KeyStoragePolicy field's value.
  3682. func (s *HlsContentProtection) SetKeyStoragePolicy(v string) *HlsContentProtection {
  3683. s.KeyStoragePolicy = &v
  3684. return s
  3685. }
  3686. // SetLicenseAcquisitionUrl sets the LicenseAcquisitionUrl field's value.
  3687. func (s *HlsContentProtection) SetLicenseAcquisitionUrl(v string) *HlsContentProtection {
  3688. s.LicenseAcquisitionUrl = &v
  3689. return s
  3690. }
  3691. // SetMethod sets the Method field's value.
  3692. func (s *HlsContentProtection) SetMethod(v string) *HlsContentProtection {
  3693. s.Method = &v
  3694. return s
  3695. }
  3696. // The captions to be created, if any.
  3697. type InputCaptions struct {
  3698. _ struct{} `type:"structure"`
  3699. // Source files for the input sidecar captions used during the transcoding process.
  3700. // To omit all sidecar captions, leave CaptionSources blank.
  3701. CaptionSources []*CaptionSource `type:"list"`
  3702. // A policy that determines how Elastic Transcoder handles the existence of
  3703. // multiple captions.
  3704. //
  3705. // * MergeOverride: Elastic Transcoder transcodes both embedded and sidecar
  3706. // captions into outputs. If captions for a language are embedded in the
  3707. // input file and also appear in a sidecar file, Elastic Transcoder uses
  3708. // the sidecar captions and ignores the embedded captions for that language.
  3709. //
  3710. // * MergeRetain: Elastic Transcoder transcodes both embedded and sidecar
  3711. // captions into outputs. If captions for a language are embedded in the
  3712. // input file and also appear in a sidecar file, Elastic Transcoder uses
  3713. // the embedded captions and ignores the sidecar captions for that language.
  3714. // If CaptionSources is empty, Elastic Transcoder omits all sidecar captions
  3715. // from the output files.
  3716. //
  3717. // * Override: Elastic Transcoder transcodes only the sidecar captions that
  3718. // you specify in CaptionSources.
  3719. //
  3720. // MergePolicy cannot be null.
  3721. MergePolicy *string `type:"string"`
  3722. }
  3723. // String returns the string representation
  3724. func (s InputCaptions) String() string {
  3725. return awsutil.Prettify(s)
  3726. }
  3727. // GoString returns the string representation
  3728. func (s InputCaptions) GoString() string {
  3729. return s.String()
  3730. }
  3731. // Validate inspects the fields of the type to determine if they are valid.
  3732. func (s *InputCaptions) Validate() error {
  3733. invalidParams := request.ErrInvalidParams{Context: "InputCaptions"}
  3734. if s.CaptionSources != nil {
  3735. for i, v := range s.CaptionSources {
  3736. if v == nil {
  3737. continue
  3738. }
  3739. if err := v.Validate(); err != nil {
  3740. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSources", i), err.(request.ErrInvalidParams))
  3741. }
  3742. }
  3743. }
  3744. if invalidParams.Len() > 0 {
  3745. return invalidParams
  3746. }
  3747. return nil
  3748. }
  3749. // SetCaptionSources sets the CaptionSources field's value.
  3750. func (s *InputCaptions) SetCaptionSources(v []*CaptionSource) *InputCaptions {
  3751. s.CaptionSources = v
  3752. return s
  3753. }
  3754. // SetMergePolicy sets the MergePolicy field's value.
  3755. func (s *InputCaptions) SetMergePolicy(v string) *InputCaptions {
  3756. s.MergePolicy = &v
  3757. return s
  3758. }
  3759. // A section of the response body that provides information about the job that
  3760. // is created.
  3761. type Job struct {
  3762. _ struct{} `type:"structure"`
  3763. // The Amazon Resource Name (ARN) for the job.
  3764. Arn *string `type:"string"`
  3765. // The identifier that Elastic Transcoder assigned to the job. You use this
  3766. // value to get settings for the job or to delete the job.
  3767. Id *string `type:"string"`
  3768. // A section of the request or response body that provides information about
  3769. // the file that is being transcoded.
  3770. Input *JobInput `type:"structure"`
  3771. // Information about the files that you're transcoding. If you specified multiple
  3772. // files for this job, Elastic Transcoder stitches the files together to make
  3773. // one output.
  3774. Inputs []*JobInput `type:"list"`
  3775. // If you specified one output for a job, information about that output. If
  3776. // you specified multiple outputs for a job, the Output object lists information
  3777. // about the first output. This duplicates the information that is listed for
  3778. // the first output in the Outputs object.
  3779. //
  3780. // Outputs recommended instead.
  3781. //
  3782. // A section of the request or response body that provides information about
  3783. // the transcoded (target) file.
  3784. Output *JobOutput `type:"structure"`
  3785. // The value, if any, that you want Elastic Transcoder to prepend to the names
  3786. // of all files that this job creates, including output files, thumbnails, and
  3787. // playlists. We recommend that you add a / or some other delimiter to the end
  3788. // of the OutputKeyPrefix.
  3789. OutputKeyPrefix *string `min:"1" type:"string"`
  3790. // Information about the output files. We recommend that you use the Outputs
  3791. // syntax for all jobs, even when you want Elastic Transcoder to transcode a
  3792. // file into only one format. Do not use both the Outputs and Output syntaxes
  3793. // in the same request. You can create a maximum of 30 outputs per job.
  3794. //
  3795. // If you specify more than one output for a job, Elastic Transcoder creates
  3796. // the files for each output in the order in which you specify them in the job.
  3797. Outputs []*JobOutput `type:"list"`
  3798. // The Id of the pipeline that you want Elastic Transcoder to use for transcoding.
  3799. // The pipeline determines several settings, including the Amazon S3 bucket
  3800. // from which Elastic Transcoder gets the files to transcode and the bucket
  3801. // into which Elastic Transcoder puts the transcoded files.
  3802. PipelineId *string `type:"string"`
  3803. // Outputs in Fragmented MP4 or MPEG-TS format only.
  3804. //
  3805. // If you specify a preset in PresetId for which the value of Container is fmp4
  3806. // (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the
  3807. // master playlists that you want Elastic Transcoder to create.
  3808. //
  3809. // The maximum number of master playlists in a job is 30.
  3810. Playlists []*Playlist `type:"list"`
  3811. // The status of the job: Submitted, Progressing, Complete, Canceled, or Error.
  3812. Status *string `type:"string"`
  3813. // Details about the timing of a job.
  3814. Timing *Timing `type:"structure"`
  3815. // User-defined metadata that you want to associate with an Elastic Transcoder
  3816. // job. You specify metadata in key/value pairs, and you can add up to 10 key/value
  3817. // pairs per job. Elastic Transcoder does not guarantee that key/value pairs
  3818. // are returned in the same order in which you specify them.
  3819. //
  3820. // Metadata keys and values must use characters from the following list:
  3821. //
  3822. // * 0-9
  3823. //
  3824. // * A-Z and a-z
  3825. //
  3826. // * Space
  3827. //
  3828. // * The following symbols: _.:/=+-%@
  3829. UserMetadata map[string]*string `type:"map"`
  3830. }
  3831. // String returns the string representation
  3832. func (s Job) String() string {
  3833. return awsutil.Prettify(s)
  3834. }
  3835. // GoString returns the string representation
  3836. func (s Job) GoString() string {
  3837. return s.String()
  3838. }
  3839. // SetArn sets the Arn field's value.
  3840. func (s *Job) SetArn(v string) *Job {
  3841. s.Arn = &v
  3842. return s
  3843. }
  3844. // SetId sets the Id field's value.
  3845. func (s *Job) SetId(v string) *Job {
  3846. s.Id = &v
  3847. return s
  3848. }
  3849. // SetInput sets the Input field's value.
  3850. func (s *Job) SetInput(v *JobInput) *Job {
  3851. s.Input = v
  3852. return s
  3853. }
  3854. // SetInputs sets the Inputs field's value.
  3855. func (s *Job) SetInputs(v []*JobInput) *Job {
  3856. s.Inputs = v
  3857. return s
  3858. }
  3859. // SetOutput sets the Output field's value.
  3860. func (s *Job) SetOutput(v *JobOutput) *Job {
  3861. s.Output = v
  3862. return s
  3863. }
  3864. // SetOutputKeyPrefix sets the OutputKeyPrefix field's value.
  3865. func (s *Job) SetOutputKeyPrefix(v string) *Job {
  3866. s.OutputKeyPrefix = &v
  3867. return s
  3868. }
  3869. // SetOutputs sets the Outputs field's value.
  3870. func (s *Job) SetOutputs(v []*JobOutput) *Job {
  3871. s.Outputs = v
  3872. return s
  3873. }
  3874. // SetPipelineId sets the PipelineId field's value.
  3875. func (s *Job) SetPipelineId(v string) *Job {
  3876. s.PipelineId = &v
  3877. return s
  3878. }
  3879. // SetPlaylists sets the Playlists field's value.
  3880. func (s *Job) SetPlaylists(v []*Playlist) *Job {
  3881. s.Playlists = v
  3882. return s
  3883. }
  3884. // SetStatus sets the Status field's value.
  3885. func (s *Job) SetStatus(v string) *Job {
  3886. s.Status = &v
  3887. return s
  3888. }
  3889. // SetTiming sets the Timing field's value.
  3890. func (s *Job) SetTiming(v *Timing) *Job {
  3891. s.Timing = v
  3892. return s
  3893. }
  3894. // SetUserMetadata sets the UserMetadata field's value.
  3895. func (s *Job) SetUserMetadata(v map[string]*string) *Job {
  3896. s.UserMetadata = v
  3897. return s
  3898. }
  3899. // The .jpg or .png file associated with an audio file.
  3900. type JobAlbumArt struct {
  3901. _ struct{} `type:"structure"`
  3902. // The file to be used as album art. There can be multiple artworks associated
  3903. // with an audio file, to a maximum of 20. Valid formats are .jpg and .png
  3904. Artwork []*Artwork `type:"list"`
  3905. // A policy that determines how Elastic Transcoder handles the existence of
  3906. // multiple album artwork files.
  3907. //
  3908. // * Replace: The specified album art replaces any existing album art.
  3909. //
  3910. // * Prepend: The specified album art is placed in front of any existing
  3911. // album art.
  3912. //
  3913. // * Append: The specified album art is placed after any existing album art.
  3914. //
  3915. // * Fallback: If the original input file contains artwork, Elastic Transcoder
  3916. // uses that artwork for the output. If the original input does not contain
  3917. // artwork, Elastic Transcoder uses the specified album art file.
  3918. MergePolicy *string `type:"string"`
  3919. }
  3920. // String returns the string representation
  3921. func (s JobAlbumArt) String() string {
  3922. return awsutil.Prettify(s)
  3923. }
  3924. // GoString returns the string representation
  3925. func (s JobAlbumArt) GoString() string {
  3926. return s.String()
  3927. }
  3928. // Validate inspects the fields of the type to determine if they are valid.
  3929. func (s *JobAlbumArt) Validate() error {
  3930. invalidParams := request.ErrInvalidParams{Context: "JobAlbumArt"}
  3931. if s.Artwork != nil {
  3932. for i, v := range s.Artwork {
  3933. if v == nil {
  3934. continue
  3935. }
  3936. if err := v.Validate(); err != nil {
  3937. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Artwork", i), err.(request.ErrInvalidParams))
  3938. }
  3939. }
  3940. }
  3941. if invalidParams.Len() > 0 {
  3942. return invalidParams
  3943. }
  3944. return nil
  3945. }
  3946. // SetArtwork sets the Artwork field's value.
  3947. func (s *JobAlbumArt) SetArtwork(v []*Artwork) *JobAlbumArt {
  3948. s.Artwork = v
  3949. return s
  3950. }
  3951. // SetMergePolicy sets the MergePolicy field's value.
  3952. func (s *JobAlbumArt) SetMergePolicy(v string) *JobAlbumArt {
  3953. s.MergePolicy = &v
  3954. return s
  3955. }
  3956. // Information about the file that you're transcoding.
  3957. type JobInput struct {
  3958. _ struct{} `type:"structure"`
  3959. // The aspect ratio of the input file. If you want Elastic Transcoder to automatically
  3960. // detect the aspect ratio of the input file, specify auto. If you want to specify
  3961. // the aspect ratio for the output file, enter one of the following values:
  3962. //
  3963. // 1:1, 4:3, 3:2, 16:9
  3964. //
  3965. // If you specify a value other than auto, Elastic Transcoder disables automatic
  3966. // detection of the aspect ratio.
  3967. AspectRatio *string `type:"string"`
  3968. // The container type for the input file. If you want Elastic Transcoder to
  3969. // automatically detect the container type of the input file, specify auto.
  3970. // If you want to specify the container type for the input file, enter one of
  3971. // the following values:
  3972. //
  3973. // 3gp, aac, asf, avi, divx, flv, m4a, mkv, mov, mp3, mp4, mpeg, mpeg-ps, mpeg-ts,
  3974. // mxf, ogg, vob, wav, webm
  3975. Container *string `type:"string"`
  3976. // The detected properties of the input file.
  3977. DetectedProperties *DetectedProperties `type:"structure"`
  3978. // The encryption settings, if any, that are used for decrypting your input
  3979. // files. If your input file is encrypted, you must specify the mode that Elastic
  3980. // Transcoder uses to decrypt your file.
  3981. Encryption *Encryption `type:"structure"`
  3982. // The frame rate of the input file. If you want Elastic Transcoder to automatically
  3983. // detect the frame rate of the input file, specify auto. If you want to specify
  3984. // the frame rate for the input file, enter one of the following values:
  3985. //
  3986. // 10, 15, 23.97, 24, 25, 29.97, 30, 60
  3987. //
  3988. // If you specify a value other than auto, Elastic Transcoder disables automatic
  3989. // detection of the frame rate.
  3990. FrameRate *string `type:"string"`
  3991. // You can configure Elastic Transcoder to transcode captions, or subtitles,
  3992. // from one format to another. All captions must be in UTF-8. Elastic Transcoder
  3993. // supports two types of captions:
  3994. //
  3995. // * Embedded: Embedded captions are included in the same file as the audio
  3996. // and video. Elastic Transcoder supports only one embedded caption per language,
  3997. // to a maximum of 300 embedded captions per file.
  3998. //
  3999. // Valid input values include: CEA-608 (EIA-608, first non-empty channel only),
  4000. // CEA-708 (EIA-708, first non-empty channel only), and mov-text
  4001. //
  4002. // Valid outputs include: mov-text
  4003. //
  4004. // Elastic Transcoder supports a maximum of one embedded format per output.
  4005. //
  4006. // * Sidecar: Sidecar captions are kept in a separate metadata file from
  4007. // the audio and video data. Sidecar captions require a player that is capable
  4008. // of understanding the relationship between the video file and the sidecar
  4009. // file. Elastic Transcoder supports only one sidecar caption per language,
  4010. // to a maximum of 20 sidecar captions per file.
  4011. //
  4012. // Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt,
  4013. // srt, ttml (first div element only), and webvtt
  4014. //
  4015. // Valid outputs include: dfxp (first div element only), scc, srt, and webvtt.
  4016. //
  4017. // If you want ttml or smpte-tt compatible captions, specify dfxp as your output
  4018. // format.
  4019. //
  4020. // Elastic Transcoder does not support OCR (Optical Character Recognition),
  4021. // does not accept pictures as a valid input for captions, and is not available
  4022. // for audio-only transcoding. Elastic Transcoder does not preserve text formatting
  4023. // (for example, italics) during the transcoding process.
  4024. //
  4025. // To remove captions or leave the captions empty, set Captions to null. To
  4026. // pass through existing captions unchanged, set the MergePolicy to MergeRetain,
  4027. // and pass in a null CaptionSources array.
  4028. //
  4029. // For more information on embedded files, see the Subtitles Wikipedia page.
  4030. //
  4031. // For more information on sidecar files, see the Extensible Metadata Platform
  4032. // and Sidecar file Wikipedia pages.
  4033. InputCaptions *InputCaptions `type:"structure"`
  4034. // Whether the input file is interlaced. If you want Elastic Transcoder to automatically
  4035. // detect whether the input file is interlaced, specify auto. If you want to
  4036. // specify whether the input file is interlaced, enter one of the following
  4037. // values:
  4038. //
  4039. // true, false
  4040. //
  4041. // If you specify a value other than auto, Elastic Transcoder disables automatic
  4042. // detection of interlacing.
  4043. Interlaced *string `type:"string"`
  4044. // The name of the file to transcode. Elsewhere in the body of the JSON block
  4045. // is the the ID of the pipeline to use for processing the job. The InputBucket
  4046. // object in that pipeline tells Elastic Transcoder which Amazon S3 bucket to
  4047. // get the file from.
  4048. //
  4049. // If the file name includes a prefix, such as cooking/lasagna.mpg, include
  4050. // the prefix in the key. If the file isn't in the specified bucket, Elastic
  4051. // Transcoder returns an error.
  4052. Key *string `min:"1" type:"string"`
  4053. // This value must be auto, which causes Elastic Transcoder to automatically
  4054. // detect the resolution of the input file.
  4055. Resolution *string `type:"string"`
  4056. // Settings for clipping an input. Each input can have different clip settings.
  4057. TimeSpan *TimeSpan `type:"structure"`
  4058. }
  4059. // String returns the string representation
  4060. func (s JobInput) String() string {
  4061. return awsutil.Prettify(s)
  4062. }
  4063. // GoString returns the string representation
  4064. func (s JobInput) GoString() string {
  4065. return s.String()
  4066. }
  4067. // Validate inspects the fields of the type to determine if they are valid.
  4068. func (s *JobInput) Validate() error {
  4069. invalidParams := request.ErrInvalidParams{Context: "JobInput"}
  4070. if s.Key != nil && len(*s.Key) < 1 {
  4071. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4072. }
  4073. if s.InputCaptions != nil {
  4074. if err := s.InputCaptions.Validate(); err != nil {
  4075. invalidParams.AddNested("InputCaptions", err.(request.ErrInvalidParams))
  4076. }
  4077. }
  4078. if invalidParams.Len() > 0 {
  4079. return invalidParams
  4080. }
  4081. return nil
  4082. }
  4083. // SetAspectRatio sets the AspectRatio field's value.
  4084. func (s *JobInput) SetAspectRatio(v string) *JobInput {
  4085. s.AspectRatio = &v
  4086. return s
  4087. }
  4088. // SetContainer sets the Container field's value.
  4089. func (s *JobInput) SetContainer(v string) *JobInput {
  4090. s.Container = &v
  4091. return s
  4092. }
  4093. // SetDetectedProperties sets the DetectedProperties field's value.
  4094. func (s *JobInput) SetDetectedProperties(v *DetectedProperties) *JobInput {
  4095. s.DetectedProperties = v
  4096. return s
  4097. }
  4098. // SetEncryption sets the Encryption field's value.
  4099. func (s *JobInput) SetEncryption(v *Encryption) *JobInput {
  4100. s.Encryption = v
  4101. return s
  4102. }
  4103. // SetFrameRate sets the FrameRate field's value.
  4104. func (s *JobInput) SetFrameRate(v string) *JobInput {
  4105. s.FrameRate = &v
  4106. return s
  4107. }
  4108. // SetInputCaptions sets the InputCaptions field's value.
  4109. func (s *JobInput) SetInputCaptions(v *InputCaptions) *JobInput {
  4110. s.InputCaptions = v
  4111. return s
  4112. }
  4113. // SetInterlaced sets the Interlaced field's value.
  4114. func (s *JobInput) SetInterlaced(v string) *JobInput {
  4115. s.Interlaced = &v
  4116. return s
  4117. }
  4118. // SetKey sets the Key field's value.
  4119. func (s *JobInput) SetKey(v string) *JobInput {
  4120. s.Key = &v
  4121. return s
  4122. }
  4123. // SetResolution sets the Resolution field's value.
  4124. func (s *JobInput) SetResolution(v string) *JobInput {
  4125. s.Resolution = &v
  4126. return s
  4127. }
  4128. // SetTimeSpan sets the TimeSpan field's value.
  4129. func (s *JobInput) SetTimeSpan(v *TimeSpan) *JobInput {
  4130. s.TimeSpan = v
  4131. return s
  4132. }
  4133. // Outputs recommended instead.
  4134. //
  4135. // If you specified one output for a job, information about that output. If
  4136. // you specified multiple outputs for a job, the Output object lists information
  4137. // about the first output. This duplicates the information that is listed for
  4138. // the first output in the Outputs object.
  4139. type JobOutput struct {
  4140. _ struct{} `type:"structure"`
  4141. // The album art to be associated with the output file, if any.
  4142. AlbumArt *JobAlbumArt `type:"structure"`
  4143. // If Elastic Transcoder used a preset with a ColorSpaceConversionMode to transcode
  4144. // the output file, the AppliedColorSpaceConversion parameter shows the conversion
  4145. // used. If no ColorSpaceConversionMode was defined in the preset, this parameter
  4146. // is not be included in the job response.
  4147. AppliedColorSpaceConversion *string `type:"string"`
  4148. // You can configure Elastic Transcoder to transcode captions, or subtitles,
  4149. // from one format to another. All captions must be in UTF-8. Elastic Transcoder
  4150. // supports two types of captions:
  4151. //
  4152. // * Embedded: Embedded captions are included in the same file as the audio
  4153. // and video. Elastic Transcoder supports only one embedded caption per language,
  4154. // to a maximum of 300 embedded captions per file.
  4155. //
  4156. // Valid input values include: CEA-608 (EIA-608, first non-empty channel only),
  4157. // CEA-708 (EIA-708, first non-empty channel only), and mov-text
  4158. //
  4159. // Valid outputs include: mov-text
  4160. //
  4161. // Elastic Transcoder supports a maximum of one embedded format per output.
  4162. //
  4163. // * Sidecar: Sidecar captions are kept in a separate metadata file from
  4164. // the audio and video data. Sidecar captions require a player that is capable
  4165. // of understanding the relationship between the video file and the sidecar
  4166. // file. Elastic Transcoder supports only one sidecar caption per language,
  4167. // to a maximum of 20 sidecar captions per file.
  4168. //
  4169. // Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt,
  4170. // srt, ttml (first div element only), and webvtt
  4171. //
  4172. // Valid outputs include: dfxp (first div element only), scc, srt, and webvtt.
  4173. //
  4174. // If you want ttml or smpte-tt compatible captions, specify dfxp as your output
  4175. // format.
  4176. //
  4177. // Elastic Transcoder does not support OCR (Optical Character Recognition),
  4178. // does not accept pictures as a valid input for captions, and is not available
  4179. // for audio-only transcoding. Elastic Transcoder does not preserve text formatting
  4180. // (for example, italics) during the transcoding process.
  4181. //
  4182. // To remove captions or leave the captions empty, set Captions to null. To
  4183. // pass through existing captions unchanged, set the MergePolicy to MergeRetain,
  4184. // and pass in a null CaptionSources array.
  4185. //
  4186. // For more information on embedded files, see the Subtitles Wikipedia page.
  4187. //
  4188. // For more information on sidecar files, see the Extensible Metadata Platform
  4189. // and Sidecar file Wikipedia pages.
  4190. Captions *Captions `type:"structure"`
  4191. // You can create an output file that contains an excerpt from the input file.
  4192. // This excerpt, called a clip, can come from the beginning, middle, or end
  4193. // of the file. The Composition object contains settings for the clips that
  4194. // make up an output file. For the current release, you can only specify settings
  4195. // for a single clip per output file. The Composition object cannot be null.
  4196. //
  4197. // Deprecated: Composition has been deprecated
  4198. Composition []*Clip `deprecated:"true" type:"list"`
  4199. // Duration of the output file, in seconds.
  4200. Duration *int64 `type:"long"`
  4201. // Duration of the output file, in milliseconds.
  4202. DurationMillis *int64 `type:"long"`
  4203. // The encryption settings, if any, that you want Elastic Transcoder to apply
  4204. // to your output files. If you choose to use encryption, you must specify a
  4205. // mode to use. If you choose not to use encryption, Elastic Transcoder writes
  4206. // an unencrypted file to your Amazon S3 bucket.
  4207. Encryption *Encryption `type:"structure"`
  4208. // File size of the output file, in bytes.
  4209. FileSize *int64 `type:"long"`
  4210. // Frame rate of the output file, in frames per second.
  4211. FrameRate *string `type:"string"`
  4212. // Height of the output file, in pixels.
  4213. Height *int64 `type:"integer"`
  4214. // A sequential counter, starting with 1, that identifies an output among the
  4215. // outputs from the current job. In the Output syntax, this value is always
  4216. // 1.
  4217. Id *string `type:"string"`
  4218. // The name to assign to the transcoded file. Elastic Transcoder saves the file
  4219. // in the Amazon S3 bucket specified by the OutputBucket object in the pipeline
  4220. // that is specified by the pipeline ID.
  4221. Key *string `min:"1" type:"string"`
  4222. // The value of the Id object for the preset that you want to use for this job.
  4223. // The preset determines the audio, video, and thumbnail settings that Elastic
  4224. // Transcoder uses for transcoding. To use a preset that you created, specify
  4225. // the preset ID that Elastic Transcoder returned in the response when you created
  4226. // the preset. You can also use the Elastic Transcoder system presets, which
  4227. // you can get with ListPresets.
  4228. PresetId *string `type:"string"`
  4229. // The number of degrees clockwise by which you want Elastic Transcoder to rotate
  4230. // the output relative to the input. Enter one of the following values:
  4231. //
  4232. // auto, 0, 90, 180, 270
  4233. //
  4234. // The value auto generally works only if the file that you're transcoding contains
  4235. // rotation metadata.
  4236. Rotate *string `type:"string"`
  4237. // (Outputs in Fragmented MP4 or MPEG-TS format only.
  4238. //
  4239. // If you specify a preset in PresetId for which the value of Container is fmp4
  4240. // (Fragmented MP4) or ts (MPEG-TS), SegmentDuration is the target maximum duration
  4241. // of each segment in seconds. For HLSv3 format playlists, each media segment
  4242. // is stored in a separate .ts file. For HLSv4, MPEG-DASH, and Smooth playlists,
  4243. // all media segments for an output are stored in a single file. Each segment
  4244. // is approximately the length of the SegmentDuration, though individual segments
  4245. // might be shorter or longer.
  4246. //
  4247. // The range of valid values is 1 to 60 seconds. If the duration of the video
  4248. // is not evenly divisible by SegmentDuration, the duration of the last segment
  4249. // is the remainder of total length/SegmentDuration.
  4250. //
  4251. // Elastic Transcoder creates an output-specific playlist for each output HLS
  4252. // output that you specify in OutputKeys. To add an output to the master playlist
  4253. // for this job, include it in the OutputKeys of the associated playlist.
  4254. SegmentDuration *string `type:"string"`
  4255. // The status of one output in a job. If you specified only one output for the
  4256. // job, Outputs:Status is always the same as Job:Status. If you specified more
  4257. // than one output:
  4258. //
  4259. // * Job:Status and Outputs:Status for all of the outputs is Submitted until
  4260. // Elastic Transcoder starts to process the first output.
  4261. //
  4262. // * When Elastic Transcoder starts to process the first output, Outputs:Status
  4263. // for that output and Job:Status both change to Progressing. For each output,
  4264. // the value of Outputs:Status remains Submitted until Elastic Transcoder
  4265. // starts to process the output.
  4266. //
  4267. // * Job:Status remains Progressing until all of the outputs reach a terminal
  4268. // status, either Complete or Error.
  4269. //
  4270. // * When all of the outputs reach a terminal status, Job:Status changes
  4271. // to Complete only if Outputs:Status for all of the outputs is Complete.
  4272. // If Outputs:Status for one or more outputs is Error, the terminal status
  4273. // for Job:Status is also Error.
  4274. //
  4275. // The value of Status is one of the following: Submitted, Progressing, Complete,
  4276. // Canceled, or Error.
  4277. Status *string `type:"string"`
  4278. // Information that further explains Status.
  4279. StatusDetail *string `type:"string"`
  4280. // The encryption settings, if any, that you want Elastic Transcoder to apply
  4281. // to your thumbnail.
  4282. ThumbnailEncryption *Encryption `type:"structure"`
  4283. // Whether you want Elastic Transcoder to create thumbnails for your videos
  4284. // and, if so, how you want Elastic Transcoder to name the files.
  4285. //
  4286. // If you don't want Elastic Transcoder to create thumbnails, specify "".
  4287. //
  4288. // If you do want Elastic Transcoder to create thumbnails, specify the information
  4289. // that you want to include in the file name for each thumbnail. You can specify
  4290. // the following values in any sequence:
  4291. //
  4292. // * {count} (Required): If you want to create thumbnails, you must include
  4293. // {count} in the ThumbnailPattern object. Wherever you specify {count},
  4294. // Elastic Transcoder adds a five-digit sequence number (beginning with 00001)
  4295. // to thumbnail file names. The number indicates where a given thumbnail
  4296. // appears in the sequence of thumbnails for a transcoded file.
  4297. //
  4298. // If you specify a literal value and/or {resolution} but you omit {count},
  4299. // Elastic Transcoder returns a validation error and does not create the
  4300. // job.
  4301. //
  4302. // * Literal values (Optional): You can specify literal values anywhere in
  4303. // the ThumbnailPattern object. For example, you can include them as a file
  4304. // name prefix or as a delimiter between {resolution} and {count}.
  4305. //
  4306. // * {resolution} (Optional): If you want Elastic Transcoder to include the
  4307. // resolution in the file name, include {resolution} in the ThumbnailPattern
  4308. // object.
  4309. //
  4310. // When creating thumbnails, Elastic Transcoder automatically saves the files
  4311. // in the format (.jpg or .png) that appears in the preset that you specified
  4312. // in the PresetID value of CreateJobOutput. Elastic Transcoder also appends
  4313. // the applicable file name extension.
  4314. ThumbnailPattern *string `type:"string"`
  4315. // Information about the watermarks that you want Elastic Transcoder to add
  4316. // to the video during transcoding. You can specify up to four watermarks for
  4317. // each output. Settings for each watermark must be defined in the preset that
  4318. // you specify in Preset for the current output.
  4319. //
  4320. // Watermarks are added to the output video in the sequence in which you list
  4321. // them in the job output—the first watermark in the list is added to the output
  4322. // video first, the second watermark in the list is added next, and so on. As
  4323. // a result, if the settings in a preset cause Elastic Transcoder to place all
  4324. // watermarks in the same location, the second watermark that you add covers
  4325. // the first one, the third one covers the second, and the fourth one covers
  4326. // the third.
  4327. Watermarks []*JobWatermark `type:"list"`
  4328. // Specifies the width of the output file in pixels.
  4329. Width *int64 `type:"integer"`
  4330. }
  4331. // String returns the string representation
  4332. func (s JobOutput) String() string {
  4333. return awsutil.Prettify(s)
  4334. }
  4335. // GoString returns the string representation
  4336. func (s JobOutput) GoString() string {
  4337. return s.String()
  4338. }
  4339. // SetAlbumArt sets the AlbumArt field's value.
  4340. func (s *JobOutput) SetAlbumArt(v *JobAlbumArt) *JobOutput {
  4341. s.AlbumArt = v
  4342. return s
  4343. }
  4344. // SetAppliedColorSpaceConversion sets the AppliedColorSpaceConversion field's value.
  4345. func (s *JobOutput) SetAppliedColorSpaceConversion(v string) *JobOutput {
  4346. s.AppliedColorSpaceConversion = &v
  4347. return s
  4348. }
  4349. // SetCaptions sets the Captions field's value.
  4350. func (s *JobOutput) SetCaptions(v *Captions) *JobOutput {
  4351. s.Captions = v
  4352. return s
  4353. }
  4354. // SetComposition sets the Composition field's value.
  4355. func (s *JobOutput) SetComposition(v []*Clip) *JobOutput {
  4356. s.Composition = v
  4357. return s
  4358. }
  4359. // SetDuration sets the Duration field's value.
  4360. func (s *JobOutput) SetDuration(v int64) *JobOutput {
  4361. s.Duration = &v
  4362. return s
  4363. }
  4364. // SetDurationMillis sets the DurationMillis field's value.
  4365. func (s *JobOutput) SetDurationMillis(v int64) *JobOutput {
  4366. s.DurationMillis = &v
  4367. return s
  4368. }
  4369. // SetEncryption sets the Encryption field's value.
  4370. func (s *JobOutput) SetEncryption(v *Encryption) *JobOutput {
  4371. s.Encryption = v
  4372. return s
  4373. }
  4374. // SetFileSize sets the FileSize field's value.
  4375. func (s *JobOutput) SetFileSize(v int64) *JobOutput {
  4376. s.FileSize = &v
  4377. return s
  4378. }
  4379. // SetFrameRate sets the FrameRate field's value.
  4380. func (s *JobOutput) SetFrameRate(v string) *JobOutput {
  4381. s.FrameRate = &v
  4382. return s
  4383. }
  4384. // SetHeight sets the Height field's value.
  4385. func (s *JobOutput) SetHeight(v int64) *JobOutput {
  4386. s.Height = &v
  4387. return s
  4388. }
  4389. // SetId sets the Id field's value.
  4390. func (s *JobOutput) SetId(v string) *JobOutput {
  4391. s.Id = &v
  4392. return s
  4393. }
  4394. // SetKey sets the Key field's value.
  4395. func (s *JobOutput) SetKey(v string) *JobOutput {
  4396. s.Key = &v
  4397. return s
  4398. }
  4399. // SetPresetId sets the PresetId field's value.
  4400. func (s *JobOutput) SetPresetId(v string) *JobOutput {
  4401. s.PresetId = &v
  4402. return s
  4403. }
  4404. // SetRotate sets the Rotate field's value.
  4405. func (s *JobOutput) SetRotate(v string) *JobOutput {
  4406. s.Rotate = &v
  4407. return s
  4408. }
  4409. // SetSegmentDuration sets the SegmentDuration field's value.
  4410. func (s *JobOutput) SetSegmentDuration(v string) *JobOutput {
  4411. s.SegmentDuration = &v
  4412. return s
  4413. }
  4414. // SetStatus sets the Status field's value.
  4415. func (s *JobOutput) SetStatus(v string) *JobOutput {
  4416. s.Status = &v
  4417. return s
  4418. }
  4419. // SetStatusDetail sets the StatusDetail field's value.
  4420. func (s *JobOutput) SetStatusDetail(v string) *JobOutput {
  4421. s.StatusDetail = &v
  4422. return s
  4423. }
  4424. // SetThumbnailEncryption sets the ThumbnailEncryption field's value.
  4425. func (s *JobOutput) SetThumbnailEncryption(v *Encryption) *JobOutput {
  4426. s.ThumbnailEncryption = v
  4427. return s
  4428. }
  4429. // SetThumbnailPattern sets the ThumbnailPattern field's value.
  4430. func (s *JobOutput) SetThumbnailPattern(v string) *JobOutput {
  4431. s.ThumbnailPattern = &v
  4432. return s
  4433. }
  4434. // SetWatermarks sets the Watermarks field's value.
  4435. func (s *JobOutput) SetWatermarks(v []*JobWatermark) *JobOutput {
  4436. s.Watermarks = v
  4437. return s
  4438. }
  4439. // SetWidth sets the Width field's value.
  4440. func (s *JobOutput) SetWidth(v int64) *JobOutput {
  4441. s.Width = &v
  4442. return s
  4443. }
  4444. // Watermarks can be in .png or .jpg format. If you want to display a watermark
  4445. // that is not rectangular, use the .png format, which supports transparency.
  4446. type JobWatermark struct {
  4447. _ struct{} `type:"structure"`
  4448. // The encryption settings, if any, that you want Elastic Transcoder to apply
  4449. // to your watermarks.
  4450. Encryption *Encryption `type:"structure"`
  4451. // The name of the .png or .jpg file that you want to use for the watermark.
  4452. // To determine which Amazon S3 bucket contains the specified file, Elastic
  4453. // Transcoder checks the pipeline specified by Pipeline; the Input Bucket object
  4454. // in that pipeline identifies the bucket.
  4455. //
  4456. // If the file name includes a prefix, for example, logos/128x64.png, include
  4457. // the prefix in the key. If the file isn't in the specified bucket, Elastic
  4458. // Transcoder returns an error.
  4459. InputKey *string `min:"1" type:"string"`
  4460. // The ID of the watermark settings that Elastic Transcoder uses to add watermarks
  4461. // to the video during transcoding. The settings are in the preset specified
  4462. // by Preset for the current output. In that preset, the value of Watermarks
  4463. // Id tells Elastic Transcoder which settings to use.
  4464. PresetWatermarkId *string `min:"1" type:"string"`
  4465. }
  4466. // String returns the string representation
  4467. func (s JobWatermark) String() string {
  4468. return awsutil.Prettify(s)
  4469. }
  4470. // GoString returns the string representation
  4471. func (s JobWatermark) GoString() string {
  4472. return s.String()
  4473. }
  4474. // Validate inspects the fields of the type to determine if they are valid.
  4475. func (s *JobWatermark) Validate() error {
  4476. invalidParams := request.ErrInvalidParams{Context: "JobWatermark"}
  4477. if s.InputKey != nil && len(*s.InputKey) < 1 {
  4478. invalidParams.Add(request.NewErrParamMinLen("InputKey", 1))
  4479. }
  4480. if s.PresetWatermarkId != nil && len(*s.PresetWatermarkId) < 1 {
  4481. invalidParams.Add(request.NewErrParamMinLen("PresetWatermarkId", 1))
  4482. }
  4483. if invalidParams.Len() > 0 {
  4484. return invalidParams
  4485. }
  4486. return nil
  4487. }
  4488. // SetEncryption sets the Encryption field's value.
  4489. func (s *JobWatermark) SetEncryption(v *Encryption) *JobWatermark {
  4490. s.Encryption = v
  4491. return s
  4492. }
  4493. // SetInputKey sets the InputKey field's value.
  4494. func (s *JobWatermark) SetInputKey(v string) *JobWatermark {
  4495. s.InputKey = &v
  4496. return s
  4497. }
  4498. // SetPresetWatermarkId sets the PresetWatermarkId field's value.
  4499. func (s *JobWatermark) SetPresetWatermarkId(v string) *JobWatermark {
  4500. s.PresetWatermarkId = &v
  4501. return s
  4502. }
  4503. // The ListJobsByPipelineRequest structure.
  4504. type ListJobsByPipelineInput struct {
  4505. _ struct{} `type:"structure"`
  4506. // To list jobs in chronological order by the date and time that they were submitted,
  4507. // enter true. To list jobs in reverse chronological order, enter false.
  4508. Ascending *string `location:"querystring" locationName:"Ascending" type:"string"`
  4509. // When Elastic Transcoder returns more than one page of results, use pageToken
  4510. // in subsequent GET requests to get each successive page of results.
  4511. PageToken *string `location:"querystring" locationName:"PageToken" type:"string"`
  4512. // The ID of the pipeline for which you want to get job information.
  4513. //
  4514. // PipelineId is a required field
  4515. PipelineId *string `location:"uri" locationName:"PipelineId" type:"string" required:"true"`
  4516. }
  4517. // String returns the string representation
  4518. func (s ListJobsByPipelineInput) String() string {
  4519. return awsutil.Prettify(s)
  4520. }
  4521. // GoString returns the string representation
  4522. func (s ListJobsByPipelineInput) GoString() string {
  4523. return s.String()
  4524. }
  4525. // Validate inspects the fields of the type to determine if they are valid.
  4526. func (s *ListJobsByPipelineInput) Validate() error {
  4527. invalidParams := request.ErrInvalidParams{Context: "ListJobsByPipelineInput"}
  4528. if s.PipelineId == nil {
  4529. invalidParams.Add(request.NewErrParamRequired("PipelineId"))
  4530. }
  4531. if s.PipelineId != nil && len(*s.PipelineId) < 1 {
  4532. invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1))
  4533. }
  4534. if invalidParams.Len() > 0 {
  4535. return invalidParams
  4536. }
  4537. return nil
  4538. }
  4539. // SetAscending sets the Ascending field's value.
  4540. func (s *ListJobsByPipelineInput) SetAscending(v string) *ListJobsByPipelineInput {
  4541. s.Ascending = &v
  4542. return s
  4543. }
  4544. // SetPageToken sets the PageToken field's value.
  4545. func (s *ListJobsByPipelineInput) SetPageToken(v string) *ListJobsByPipelineInput {
  4546. s.PageToken = &v
  4547. return s
  4548. }
  4549. // SetPipelineId sets the PipelineId field's value.
  4550. func (s *ListJobsByPipelineInput) SetPipelineId(v string) *ListJobsByPipelineInput {
  4551. s.PipelineId = &v
  4552. return s
  4553. }
  4554. // The ListJobsByPipelineResponse structure.
  4555. type ListJobsByPipelineOutput struct {
  4556. _ struct{} `type:"structure"`
  4557. // An array of Job objects that are in the specified pipeline.
  4558. Jobs []*Job `type:"list"`
  4559. // A value that you use to access the second and subsequent pages of results,
  4560. // if any. When the jobs in the specified pipeline fit on one page or when you've
  4561. // reached the last page of results, the value of NextPageToken is null.
  4562. NextPageToken *string `type:"string"`
  4563. }
  4564. // String returns the string representation
  4565. func (s ListJobsByPipelineOutput) String() string {
  4566. return awsutil.Prettify(s)
  4567. }
  4568. // GoString returns the string representation
  4569. func (s ListJobsByPipelineOutput) GoString() string {
  4570. return s.String()
  4571. }
  4572. // SetJobs sets the Jobs field's value.
  4573. func (s *ListJobsByPipelineOutput) SetJobs(v []*Job) *ListJobsByPipelineOutput {
  4574. s.Jobs = v
  4575. return s
  4576. }
  4577. // SetNextPageToken sets the NextPageToken field's value.
  4578. func (s *ListJobsByPipelineOutput) SetNextPageToken(v string) *ListJobsByPipelineOutput {
  4579. s.NextPageToken = &v
  4580. return s
  4581. }
  4582. // The ListJobsByStatusRequest structure.
  4583. type ListJobsByStatusInput struct {
  4584. _ struct{} `type:"structure"`
  4585. // To list jobs in chronological order by the date and time that they were submitted,
  4586. // enter true. To list jobs in reverse chronological order, enter false.
  4587. Ascending *string `location:"querystring" locationName:"Ascending" type:"string"`
  4588. // When Elastic Transcoder returns more than one page of results, use pageToken
  4589. // in subsequent GET requests to get each successive page of results.
  4590. PageToken *string `location:"querystring" locationName:"PageToken" type:"string"`
  4591. // To get information about all of the jobs associated with the current AWS
  4592. // account that have a given status, specify the following status: Submitted,
  4593. // Progressing, Complete, Canceled, or Error.
  4594. //
  4595. // Status is a required field
  4596. Status *string `location:"uri" locationName:"Status" type:"string" required:"true"`
  4597. }
  4598. // String returns the string representation
  4599. func (s ListJobsByStatusInput) String() string {
  4600. return awsutil.Prettify(s)
  4601. }
  4602. // GoString returns the string representation
  4603. func (s ListJobsByStatusInput) GoString() string {
  4604. return s.String()
  4605. }
  4606. // Validate inspects the fields of the type to determine if they are valid.
  4607. func (s *ListJobsByStatusInput) Validate() error {
  4608. invalidParams := request.ErrInvalidParams{Context: "ListJobsByStatusInput"}
  4609. if s.Status == nil {
  4610. invalidParams.Add(request.NewErrParamRequired("Status"))
  4611. }
  4612. if s.Status != nil && len(*s.Status) < 1 {
  4613. invalidParams.Add(request.NewErrParamMinLen("Status", 1))
  4614. }
  4615. if invalidParams.Len() > 0 {
  4616. return invalidParams
  4617. }
  4618. return nil
  4619. }
  4620. // SetAscending sets the Ascending field's value.
  4621. func (s *ListJobsByStatusInput) SetAscending(v string) *ListJobsByStatusInput {
  4622. s.Ascending = &v
  4623. return s
  4624. }
  4625. // SetPageToken sets the PageToken field's value.
  4626. func (s *ListJobsByStatusInput) SetPageToken(v string) *ListJobsByStatusInput {
  4627. s.PageToken = &v
  4628. return s
  4629. }
  4630. // SetStatus sets the Status field's value.
  4631. func (s *ListJobsByStatusInput) SetStatus(v string) *ListJobsByStatusInput {
  4632. s.Status = &v
  4633. return s
  4634. }
  4635. // The ListJobsByStatusResponse structure.
  4636. type ListJobsByStatusOutput struct {
  4637. _ struct{} `type:"structure"`
  4638. // An array of Job objects that have the specified status.
  4639. Jobs []*Job `type:"list"`
  4640. // A value that you use to access the second and subsequent pages of results,
  4641. // if any. When the jobs in the specified pipeline fit on one page or when you've
  4642. // reached the last page of results, the value of NextPageToken is null.
  4643. NextPageToken *string `type:"string"`
  4644. }
  4645. // String returns the string representation
  4646. func (s ListJobsByStatusOutput) String() string {
  4647. return awsutil.Prettify(s)
  4648. }
  4649. // GoString returns the string representation
  4650. func (s ListJobsByStatusOutput) GoString() string {
  4651. return s.String()
  4652. }
  4653. // SetJobs sets the Jobs field's value.
  4654. func (s *ListJobsByStatusOutput) SetJobs(v []*Job) *ListJobsByStatusOutput {
  4655. s.Jobs = v
  4656. return s
  4657. }
  4658. // SetNextPageToken sets the NextPageToken field's value.
  4659. func (s *ListJobsByStatusOutput) SetNextPageToken(v string) *ListJobsByStatusOutput {
  4660. s.NextPageToken = &v
  4661. return s
  4662. }
  4663. // The ListPipelineRequest structure.
  4664. type ListPipelinesInput struct {
  4665. _ struct{} `type:"structure"`
  4666. // To list pipelines in chronological order by the date and time that they were
  4667. // created, enter true. To list pipelines in reverse chronological order, enter
  4668. // false.
  4669. Ascending *string `location:"querystring" locationName:"Ascending" type:"string"`
  4670. // When Elastic Transcoder returns more than one page of results, use pageToken
  4671. // in subsequent GET requests to get each successive page of results.
  4672. PageToken *string `location:"querystring" locationName:"PageToken" type:"string"`
  4673. }
  4674. // String returns the string representation
  4675. func (s ListPipelinesInput) String() string {
  4676. return awsutil.Prettify(s)
  4677. }
  4678. // GoString returns the string representation
  4679. func (s ListPipelinesInput) GoString() string {
  4680. return s.String()
  4681. }
  4682. // SetAscending sets the Ascending field's value.
  4683. func (s *ListPipelinesInput) SetAscending(v string) *ListPipelinesInput {
  4684. s.Ascending = &v
  4685. return s
  4686. }
  4687. // SetPageToken sets the PageToken field's value.
  4688. func (s *ListPipelinesInput) SetPageToken(v string) *ListPipelinesInput {
  4689. s.PageToken = &v
  4690. return s
  4691. }
  4692. // A list of the pipelines associated with the current AWS account.
  4693. type ListPipelinesOutput struct {
  4694. _ struct{} `type:"structure"`
  4695. // A value that you use to access the second and subsequent pages of results,
  4696. // if any. When the pipelines fit on one page or when you've reached the last
  4697. // page of results, the value of NextPageToken is null.
  4698. NextPageToken *string `type:"string"`
  4699. // An array of Pipeline objects.
  4700. Pipelines []*Pipeline `type:"list"`
  4701. }
  4702. // String returns the string representation
  4703. func (s ListPipelinesOutput) String() string {
  4704. return awsutil.Prettify(s)
  4705. }
  4706. // GoString returns the string representation
  4707. func (s ListPipelinesOutput) GoString() string {
  4708. return s.String()
  4709. }
  4710. // SetNextPageToken sets the NextPageToken field's value.
  4711. func (s *ListPipelinesOutput) SetNextPageToken(v string) *ListPipelinesOutput {
  4712. s.NextPageToken = &v
  4713. return s
  4714. }
  4715. // SetPipelines sets the Pipelines field's value.
  4716. func (s *ListPipelinesOutput) SetPipelines(v []*Pipeline) *ListPipelinesOutput {
  4717. s.Pipelines = v
  4718. return s
  4719. }
  4720. // The ListPresetsRequest structure.
  4721. type ListPresetsInput struct {
  4722. _ struct{} `type:"structure"`
  4723. // To list presets in chronological order by the date and time that they were
  4724. // created, enter true. To list presets in reverse chronological order, enter
  4725. // false.
  4726. Ascending *string `location:"querystring" locationName:"Ascending" type:"string"`
  4727. // When Elastic Transcoder returns more than one page of results, use pageToken
  4728. // in subsequent GET requests to get each successive page of results.
  4729. PageToken *string `location:"querystring" locationName:"PageToken" type:"string"`
  4730. }
  4731. // String returns the string representation
  4732. func (s ListPresetsInput) String() string {
  4733. return awsutil.Prettify(s)
  4734. }
  4735. // GoString returns the string representation
  4736. func (s ListPresetsInput) GoString() string {
  4737. return s.String()
  4738. }
  4739. // SetAscending sets the Ascending field's value.
  4740. func (s *ListPresetsInput) SetAscending(v string) *ListPresetsInput {
  4741. s.Ascending = &v
  4742. return s
  4743. }
  4744. // SetPageToken sets the PageToken field's value.
  4745. func (s *ListPresetsInput) SetPageToken(v string) *ListPresetsInput {
  4746. s.PageToken = &v
  4747. return s
  4748. }
  4749. // The ListPresetsResponse structure.
  4750. type ListPresetsOutput struct {
  4751. _ struct{} `type:"structure"`
  4752. // A value that you use to access the second and subsequent pages of results,
  4753. // if any. When the presets fit on one page or when you've reached the last
  4754. // page of results, the value of NextPageToken is null.
  4755. NextPageToken *string `type:"string"`
  4756. // An array of Preset objects.
  4757. Presets []*Preset `type:"list"`
  4758. }
  4759. // String returns the string representation
  4760. func (s ListPresetsOutput) String() string {
  4761. return awsutil.Prettify(s)
  4762. }
  4763. // GoString returns the string representation
  4764. func (s ListPresetsOutput) GoString() string {
  4765. return s.String()
  4766. }
  4767. // SetNextPageToken sets the NextPageToken field's value.
  4768. func (s *ListPresetsOutput) SetNextPageToken(v string) *ListPresetsOutput {
  4769. s.NextPageToken = &v
  4770. return s
  4771. }
  4772. // SetPresets sets the Presets field's value.
  4773. func (s *ListPresetsOutput) SetPresets(v []*Preset) *ListPresetsOutput {
  4774. s.Presets = v
  4775. return s
  4776. }
  4777. // The Amazon Simple Notification Service (Amazon SNS) topic or topics to notify
  4778. // in order to report job status.
  4779. //
  4780. // To receive notifications, you must also subscribe to the new topic in the
  4781. // Amazon SNS console.
  4782. type Notifications struct {
  4783. _ struct{} `type:"structure"`
  4784. // The Amazon SNS topic that you want to notify when Elastic Transcoder has
  4785. // finished processing the job.
  4786. Completed *string `type:"string"`
  4787. // The Amazon SNS topic that you want to notify when Elastic Transcoder encounters
  4788. // an error condition.
  4789. Error *string `type:"string"`
  4790. // The Amazon Simple Notification Service (Amazon SNS) topic that you want to
  4791. // notify when Elastic Transcoder has started to process the job.
  4792. Progressing *string `type:"string"`
  4793. // The Amazon SNS topic that you want to notify when Elastic Transcoder encounters
  4794. // a warning condition.
  4795. Warning *string `type:"string"`
  4796. }
  4797. // String returns the string representation
  4798. func (s Notifications) String() string {
  4799. return awsutil.Prettify(s)
  4800. }
  4801. // GoString returns the string representation
  4802. func (s Notifications) GoString() string {
  4803. return s.String()
  4804. }
  4805. // SetCompleted sets the Completed field's value.
  4806. func (s *Notifications) SetCompleted(v string) *Notifications {
  4807. s.Completed = &v
  4808. return s
  4809. }
  4810. // SetError sets the Error field's value.
  4811. func (s *Notifications) SetError(v string) *Notifications {
  4812. s.Error = &v
  4813. return s
  4814. }
  4815. // SetProgressing sets the Progressing field's value.
  4816. func (s *Notifications) SetProgressing(v string) *Notifications {
  4817. s.Progressing = &v
  4818. return s
  4819. }
  4820. // SetWarning sets the Warning field's value.
  4821. func (s *Notifications) SetWarning(v string) *Notifications {
  4822. s.Warning = &v
  4823. return s
  4824. }
  4825. // The Permission structure.
  4826. type Permission struct {
  4827. _ struct{} `type:"structure"`
  4828. // The permission that you want to give to the AWS user that is listed in Grantee.
  4829. // Valid values include:
  4830. //
  4831. // * READ: The grantee can read the thumbnails and metadata for thumbnails
  4832. // that Elastic Transcoder adds to the Amazon S3 bucket.
  4833. //
  4834. // * READ_ACP: The grantee can read the object ACL for thumbnails that Elastic
  4835. // Transcoder adds to the Amazon S3 bucket.
  4836. //
  4837. // * WRITE_ACP: The grantee can write the ACL for the thumbnails that Elastic
  4838. // Transcoder adds to the Amazon S3 bucket.
  4839. //
  4840. // * FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions
  4841. // for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.
  4842. Access []*string `type:"list"`
  4843. // The AWS user or group that you want to have access to transcoded files and
  4844. // playlists. To identify the user or group, you can specify the canonical user
  4845. // ID for an AWS account, an origin access identity for a CloudFront distribution,
  4846. // the registered email address of an AWS account, or a predefined Amazon S3
  4847. // group.
  4848. Grantee *string `min:"1" type:"string"`
  4849. // The type of value that appears in the Grantee object:
  4850. //
  4851. // * Canonical: Either the canonical user ID for an AWS account or an origin
  4852. // access identity for an Amazon CloudFront distribution.
  4853. //
  4854. // A canonical user ID is not the same as an AWS account number.
  4855. //
  4856. // * Email: The registered email address of an AWS account.
  4857. //
  4858. // * Group: One of the following predefined Amazon S3 groups: AllUsers, AuthenticatedUsers,
  4859. // or LogDelivery.
  4860. GranteeType *string `type:"string"`
  4861. }
  4862. // String returns the string representation
  4863. func (s Permission) String() string {
  4864. return awsutil.Prettify(s)
  4865. }
  4866. // GoString returns the string representation
  4867. func (s Permission) GoString() string {
  4868. return s.String()
  4869. }
  4870. // Validate inspects the fields of the type to determine if they are valid.
  4871. func (s *Permission) Validate() error {
  4872. invalidParams := request.ErrInvalidParams{Context: "Permission"}
  4873. if s.Grantee != nil && len(*s.Grantee) < 1 {
  4874. invalidParams.Add(request.NewErrParamMinLen("Grantee", 1))
  4875. }
  4876. if invalidParams.Len() > 0 {
  4877. return invalidParams
  4878. }
  4879. return nil
  4880. }
  4881. // SetAccess sets the Access field's value.
  4882. func (s *Permission) SetAccess(v []*string) *Permission {
  4883. s.Access = v
  4884. return s
  4885. }
  4886. // SetGrantee sets the Grantee field's value.
  4887. func (s *Permission) SetGrantee(v string) *Permission {
  4888. s.Grantee = &v
  4889. return s
  4890. }
  4891. // SetGranteeType sets the GranteeType field's value.
  4892. func (s *Permission) SetGranteeType(v string) *Permission {
  4893. s.GranteeType = &v
  4894. return s
  4895. }
  4896. // The pipeline (queue) that is used to manage jobs.
  4897. type Pipeline struct {
  4898. _ struct{} `type:"structure"`
  4899. // The Amazon Resource Name (ARN) for the pipeline.
  4900. Arn *string `type:"string"`
  4901. // The AWS Key Management Service (AWS KMS) key that you want to use with this
  4902. // pipeline.
  4903. //
  4904. // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need
  4905. // to provide a key with your job because a default key, known as an AWS-KMS
  4906. // key, is created for you automatically. You need to provide an AWS-KMS key
  4907. // only if you want to use a non-default AWS-KMS key, or if you are using an
  4908. // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm.
  4909. AwsKmsKeyArn *string `type:"string"`
  4910. // Information about the Amazon S3 bucket in which you want Elastic Transcoder
  4911. // to save transcoded files and playlists. Either you specify both ContentConfig
  4912. // and ThumbnailConfig, or you specify OutputBucket.
  4913. //
  4914. // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to
  4915. // save transcoded files and playlists.
  4916. //
  4917. // * Permissions: A list of the users and/or predefined Amazon S3 groups
  4918. // you want to have access to transcoded files and playlists, and the type
  4919. // of access that you want them to have.
  4920. //
  4921. // GranteeType: The type of value that appears in the Grantee object:
  4922. //
  4923. // Canonical: Either the canonical user ID for an AWS account or an origin access
  4924. // identity for an Amazon CloudFront distribution.
  4925. //
  4926. // Email: The registered email address of an AWS account.
  4927. //
  4928. // Group: One of the following predefined Amazon S3 groups: AllUsers, AuthenticatedUsers,
  4929. // or LogDelivery.
  4930. //
  4931. // Grantee: The AWS user or group that you want to have access to transcoded
  4932. // files and playlists.
  4933. //
  4934. // Access: The permission that you want to give to the AWS user that is listed
  4935. // in Grantee. Valid values include:
  4936. //
  4937. // READ: The grantee can read the objects and metadata for objects that Elastic
  4938. // Transcoder adds to the Amazon S3 bucket.
  4939. //
  4940. // READ_ACP: The grantee can read the object ACL for objects that Elastic Transcoder
  4941. // adds to the Amazon S3 bucket.
  4942. //
  4943. // WRITE_ACP: The grantee can write the ACL for the objects that Elastic Transcoder
  4944. // adds to the Amazon S3 bucket.
  4945. //
  4946. // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for
  4947. // the objects that Elastic Transcoder adds to the Amazon S3 bucket.
  4948. //
  4949. // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy,
  4950. // that you want Elastic Transcoder to assign to the video files and playlists
  4951. // that it stores in your Amazon S3 bucket.
  4952. ContentConfig *PipelineOutputConfig `type:"structure"`
  4953. // The identifier for the pipeline. You use this value to identify the pipeline
  4954. // in which you want to perform a variety of operations, such as creating a
  4955. // job or a preset.
  4956. Id *string `type:"string"`
  4957. // The Amazon S3 bucket from which Elastic Transcoder gets media files for transcoding
  4958. // and the graphics files, if any, that you want to use for watermarks.
  4959. InputBucket *string `type:"string"`
  4960. // The name of the pipeline. We recommend that the name be unique within the
  4961. // AWS account, but uniqueness is not enforced.
  4962. //
  4963. // Constraints: Maximum 40 characters
  4964. Name *string `min:"1" type:"string"`
  4965. // The Amazon Simple Notification Service (Amazon SNS) topic that you want to
  4966. // notify to report job status.
  4967. //
  4968. // To receive notifications, you must also subscribe to the new topic in the
  4969. // Amazon SNS console.
  4970. //
  4971. // * Progressing (optional): The Amazon Simple Notification Service (Amazon
  4972. // SNS) topic that you want to notify when Elastic Transcoder has started
  4973. // to process the job.
  4974. //
  4975. // * Complete (optional): The Amazon SNS topic that you want to notify when
  4976. // Elastic Transcoder has finished processing the job.
  4977. //
  4978. // * Warning (optional): The Amazon SNS topic that you want to notify when
  4979. // Elastic Transcoder encounters a warning condition.
  4980. //
  4981. // * Error (optional): The Amazon SNS topic that you want to notify when
  4982. // Elastic Transcoder encounters an error condition.
  4983. Notifications *Notifications `type:"structure"`
  4984. // The Amazon S3 bucket in which you want Elastic Transcoder to save transcoded
  4985. // files, thumbnails, and playlists. Either you specify this value, or you specify
  4986. // both ContentConfig and ThumbnailConfig.
  4987. OutputBucket *string `type:"string"`
  4988. // The IAM Amazon Resource Name (ARN) for the role that Elastic Transcoder uses
  4989. // to transcode jobs for this pipeline.
  4990. Role *string `type:"string"`
  4991. // The current status of the pipeline:
  4992. //
  4993. // * Active: The pipeline is processing jobs.
  4994. //
  4995. // * Paused: The pipeline is not currently processing jobs.
  4996. Status *string `type:"string"`
  4997. // Information about the Amazon S3 bucket in which you want Elastic Transcoder
  4998. // to save thumbnail files. Either you specify both ContentConfig and ThumbnailConfig,
  4999. // or you specify OutputBucket.
  5000. //
  5001. // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to
  5002. // save thumbnail files.
  5003. //
  5004. // * Permissions: A list of the users and/or predefined Amazon S3 groups
  5005. // you want to have access to thumbnail files, and the type of access that
  5006. // you want them to have.
  5007. //
  5008. // GranteeType: The type of value that appears in the Grantee object:
  5009. //
  5010. // Canonical: Either the canonical user ID for an AWS account or an origin access
  5011. // identity for an Amazon CloudFront distribution.
  5012. //
  5013. // A canonical user ID is not the same as an AWS account number.
  5014. //
  5015. // Email: The registered email address of an AWS account.
  5016. //
  5017. // Group: One of the following predefined Amazon S3 groups: AllUsers, AuthenticatedUsers,
  5018. // or LogDelivery.
  5019. //
  5020. // Grantee: The AWS user or group that you want to have access to thumbnail
  5021. // files.
  5022. //
  5023. // Access: The permission that you want to give to the AWS user that is listed
  5024. // in Grantee. Valid values include:
  5025. //
  5026. // READ: The grantee can read the thumbnails and metadata for thumbnails that
  5027. // Elastic Transcoder adds to the Amazon S3 bucket.
  5028. //
  5029. // READ_ACP: The grantee can read the object ACL for thumbnails that Elastic
  5030. // Transcoder adds to the Amazon S3 bucket.
  5031. //
  5032. // WRITE_ACP: The grantee can write the ACL for the thumbnails that Elastic
  5033. // Transcoder adds to the Amazon S3 bucket.
  5034. //
  5035. // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for
  5036. // the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.
  5037. //
  5038. // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy,
  5039. // that you want Elastic Transcoder to assign to the thumbnails that it stores
  5040. // in your Amazon S3 bucket.
  5041. ThumbnailConfig *PipelineOutputConfig `type:"structure"`
  5042. }
  5043. // String returns the string representation
  5044. func (s Pipeline) String() string {
  5045. return awsutil.Prettify(s)
  5046. }
  5047. // GoString returns the string representation
  5048. func (s Pipeline) GoString() string {
  5049. return s.String()
  5050. }
  5051. // SetArn sets the Arn field's value.
  5052. func (s *Pipeline) SetArn(v string) *Pipeline {
  5053. s.Arn = &v
  5054. return s
  5055. }
  5056. // SetAwsKmsKeyArn sets the AwsKmsKeyArn field's value.
  5057. func (s *Pipeline) SetAwsKmsKeyArn(v string) *Pipeline {
  5058. s.AwsKmsKeyArn = &v
  5059. return s
  5060. }
  5061. // SetContentConfig sets the ContentConfig field's value.
  5062. func (s *Pipeline) SetContentConfig(v *PipelineOutputConfig) *Pipeline {
  5063. s.ContentConfig = v
  5064. return s
  5065. }
  5066. // SetId sets the Id field's value.
  5067. func (s *Pipeline) SetId(v string) *Pipeline {
  5068. s.Id = &v
  5069. return s
  5070. }
  5071. // SetInputBucket sets the InputBucket field's value.
  5072. func (s *Pipeline) SetInputBucket(v string) *Pipeline {
  5073. s.InputBucket = &v
  5074. return s
  5075. }
  5076. // SetName sets the Name field's value.
  5077. func (s *Pipeline) SetName(v string) *Pipeline {
  5078. s.Name = &v
  5079. return s
  5080. }
  5081. // SetNotifications sets the Notifications field's value.
  5082. func (s *Pipeline) SetNotifications(v *Notifications) *Pipeline {
  5083. s.Notifications = v
  5084. return s
  5085. }
  5086. // SetOutputBucket sets the OutputBucket field's value.
  5087. func (s *Pipeline) SetOutputBucket(v string) *Pipeline {
  5088. s.OutputBucket = &v
  5089. return s
  5090. }
  5091. // SetRole sets the Role field's value.
  5092. func (s *Pipeline) SetRole(v string) *Pipeline {
  5093. s.Role = &v
  5094. return s
  5095. }
  5096. // SetStatus sets the Status field's value.
  5097. func (s *Pipeline) SetStatus(v string) *Pipeline {
  5098. s.Status = &v
  5099. return s
  5100. }
  5101. // SetThumbnailConfig sets the ThumbnailConfig field's value.
  5102. func (s *Pipeline) SetThumbnailConfig(v *PipelineOutputConfig) *Pipeline {
  5103. s.ThumbnailConfig = v
  5104. return s
  5105. }
  5106. // The PipelineOutputConfig structure.
  5107. type PipelineOutputConfig struct {
  5108. _ struct{} `type:"structure"`
  5109. // The Amazon S3 bucket in which you want Elastic Transcoder to save the transcoded
  5110. // files. Specify this value when all of the following are true:
  5111. //
  5112. // * You want to save transcoded files, thumbnails (if any), and playlists
  5113. // (if any) together in one bucket.
  5114. //
  5115. // * You do not want to specify the users or groups who have access to the
  5116. // transcoded files, thumbnails, and playlists.
  5117. //
  5118. // * You do not want to specify the permissions that Elastic Transcoder grants
  5119. // to the files.
  5120. //
  5121. // * You want to associate the transcoded files and thumbnails with the Amazon
  5122. // S3 Standard storage class.
  5123. //
  5124. // If you want to save transcoded files and playlists in one bucket and thumbnails
  5125. // in another bucket, specify which users can access the transcoded files or
  5126. // the permissions the users have, or change the Amazon S3 storage class, omit
  5127. // OutputBucket and specify values for ContentConfig and ThumbnailConfig instead.
  5128. Bucket *string `type:"string"`
  5129. // Optional. The Permissions object specifies which users and/or predefined
  5130. // Amazon S3 groups you want to have access to transcoded files and playlists,
  5131. // and the type of access you want them to have. You can grant permissions to
  5132. // a maximum of 30 users and/or predefined Amazon S3 groups.
  5133. //
  5134. // If you include Permissions, Elastic Transcoder grants only the permissions
  5135. // that you specify. It does not grant full permissions to the owner of the
  5136. // role specified by Role. If you want that user to have full control, you must
  5137. // explicitly grant full control to the user.
  5138. //
  5139. // If you omit Permissions, Elastic Transcoder grants full control over the
  5140. // transcoded files and playlists to the owner of the role specified by Role,
  5141. // and grants no other permissions to any other user or group.
  5142. Permissions []*Permission `type:"list"`
  5143. // The Amazon S3 storage class, Standard or ReducedRedundancy, that you want
  5144. // Elastic Transcoder to assign to the video files and playlists that it stores
  5145. // in your Amazon S3 bucket.
  5146. StorageClass *string `type:"string"`
  5147. }
  5148. // String returns the string representation
  5149. func (s PipelineOutputConfig) String() string {
  5150. return awsutil.Prettify(s)
  5151. }
  5152. // GoString returns the string representation
  5153. func (s PipelineOutputConfig) GoString() string {
  5154. return s.String()
  5155. }
  5156. // Validate inspects the fields of the type to determine if they are valid.
  5157. func (s *PipelineOutputConfig) Validate() error {
  5158. invalidParams := request.ErrInvalidParams{Context: "PipelineOutputConfig"}
  5159. if s.Permissions != nil {
  5160. for i, v := range s.Permissions {
  5161. if v == nil {
  5162. continue
  5163. }
  5164. if err := v.Validate(); err != nil {
  5165. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Permissions", i), err.(request.ErrInvalidParams))
  5166. }
  5167. }
  5168. }
  5169. if invalidParams.Len() > 0 {
  5170. return invalidParams
  5171. }
  5172. return nil
  5173. }
  5174. // SetBucket sets the Bucket field's value.
  5175. func (s *PipelineOutputConfig) SetBucket(v string) *PipelineOutputConfig {
  5176. s.Bucket = &v
  5177. return s
  5178. }
  5179. // SetPermissions sets the Permissions field's value.
  5180. func (s *PipelineOutputConfig) SetPermissions(v []*Permission) *PipelineOutputConfig {
  5181. s.Permissions = v
  5182. return s
  5183. }
  5184. // SetStorageClass sets the StorageClass field's value.
  5185. func (s *PipelineOutputConfig) SetStorageClass(v string) *PipelineOutputConfig {
  5186. s.StorageClass = &v
  5187. return s
  5188. }
  5189. // The PlayReady DRM settings, if any, that you want Elastic Transcoder to apply
  5190. // to the output files associated with this playlist.
  5191. //
  5192. // PlayReady DRM encrypts your media files using aes-ctr encryption.
  5193. //
  5194. // If you use DRM for an HLSv3 playlist, your outputs must have a master playlist.
  5195. type PlayReadyDrm struct {
  5196. _ struct{} `type:"structure"`
  5197. // The type of DRM, if any, that you want Elastic Transcoder to apply to the
  5198. // output files associated with this playlist.
  5199. Format *string `type:"string"`
  5200. // The series of random bits created by a random bit generator, unique for every
  5201. // encryption operation, that you want Elastic Transcoder to use to encrypt
  5202. // your files. The initialization vector must be base64-encoded, and it must
  5203. // be exactly 8 bytes long before being base64-encoded. If no initialization
  5204. // vector is provided, Elastic Transcoder generates one for you.
  5205. InitializationVector *string `type:"string"`
  5206. // The DRM key for your file, provided by your DRM license provider. The key
  5207. // must be base64-encoded, and it must be one of the following bit lengths before
  5208. // being base64-encoded:
  5209. //
  5210. // 128, 192, or 256.
  5211. //
  5212. // The key must also be encrypted by using AWS KMS.
  5213. Key *string `type:"string"`
  5214. // The ID for your DRM key, so that your DRM license provider knows which key
  5215. // to provide.
  5216. //
  5217. // The key ID must be provided in big endian, and Elastic Transcoder converts
  5218. // it to little endian before inserting it into the PlayReady DRM headers. If
  5219. // you are unsure whether your license server provides your key ID in big or
  5220. // little endian, check with your DRM provider.
  5221. KeyId *string `type:"string"`
  5222. // The MD5 digest of the key used for DRM on your file, and that you want Elastic
  5223. // Transcoder to use as a checksum to make sure your key was not corrupted in
  5224. // transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes
  5225. // before being base64-encoded.
  5226. KeyMd5 *string `type:"string"`
  5227. // The location of the license key required to play DRM content. The URL must
  5228. // be an absolute path, and is referenced by the PlayReady header. The PlayReady
  5229. // header is referenced in the protection header of the client manifest for
  5230. // Smooth Streaming outputs, and in the EXT-X-DXDRM and EXT-XDXDRMINFO metadata
  5231. // tags for HLS playlist outputs. An example URL looks like this: https://www.example.com/exampleKey/
  5232. LicenseAcquisitionUrl *string `min:"1" type:"string"`
  5233. }
  5234. // String returns the string representation
  5235. func (s PlayReadyDrm) String() string {
  5236. return awsutil.Prettify(s)
  5237. }
  5238. // GoString returns the string representation
  5239. func (s PlayReadyDrm) GoString() string {
  5240. return s.String()
  5241. }
  5242. // Validate inspects the fields of the type to determine if they are valid.
  5243. func (s *PlayReadyDrm) Validate() error {
  5244. invalidParams := request.ErrInvalidParams{Context: "PlayReadyDrm"}
  5245. if s.LicenseAcquisitionUrl != nil && len(*s.LicenseAcquisitionUrl) < 1 {
  5246. invalidParams.Add(request.NewErrParamMinLen("LicenseAcquisitionUrl", 1))
  5247. }
  5248. if invalidParams.Len() > 0 {
  5249. return invalidParams
  5250. }
  5251. return nil
  5252. }
  5253. // SetFormat sets the Format field's value.
  5254. func (s *PlayReadyDrm) SetFormat(v string) *PlayReadyDrm {
  5255. s.Format = &v
  5256. return s
  5257. }
  5258. // SetInitializationVector sets the InitializationVector field's value.
  5259. func (s *PlayReadyDrm) SetInitializationVector(v string) *PlayReadyDrm {
  5260. s.InitializationVector = &v
  5261. return s
  5262. }
  5263. // SetKey sets the Key field's value.
  5264. func (s *PlayReadyDrm) SetKey(v string) *PlayReadyDrm {
  5265. s.Key = &v
  5266. return s
  5267. }
  5268. // SetKeyId sets the KeyId field's value.
  5269. func (s *PlayReadyDrm) SetKeyId(v string) *PlayReadyDrm {
  5270. s.KeyId = &v
  5271. return s
  5272. }
  5273. // SetKeyMd5 sets the KeyMd5 field's value.
  5274. func (s *PlayReadyDrm) SetKeyMd5(v string) *PlayReadyDrm {
  5275. s.KeyMd5 = &v
  5276. return s
  5277. }
  5278. // SetLicenseAcquisitionUrl sets the LicenseAcquisitionUrl field's value.
  5279. func (s *PlayReadyDrm) SetLicenseAcquisitionUrl(v string) *PlayReadyDrm {
  5280. s.LicenseAcquisitionUrl = &v
  5281. return s
  5282. }
  5283. // Use Only for Fragmented MP4 or MPEG-TS Outputs. If you specify a preset for
  5284. // which the value of Container is fmp4 (Fragmented MP4) or ts (MPEG-TS), Playlists
  5285. // contains information about the master playlists that you want Elastic Transcoder
  5286. // to create. We recommend that you create only one master playlist per output
  5287. // format. The maximum number of master playlists in a job is 30.
  5288. type Playlist struct {
  5289. _ struct{} `type:"structure"`
  5290. // The format of the output playlist. Valid formats include HLSv3, HLSv4, and
  5291. // Smooth.
  5292. Format *string `type:"string"`
  5293. // The HLS content protection settings, if any, that you want Elastic Transcoder
  5294. // to apply to the output files associated with this playlist.
  5295. HlsContentProtection *HlsContentProtection `type:"structure"`
  5296. // The name that you want Elastic Transcoder to assign to the master playlist,
  5297. // for example, nyc-vacation.m3u8. If the name includes a / character, the section
  5298. // of the name before the last / must be identical for all Name objects. If
  5299. // you create more than one master playlist, the values of all Name objects
  5300. // must be unique.
  5301. //
  5302. // Elastic Transcoder automatically appends the relevant file extension to the
  5303. // file name (.m3u8 for HLSv3 and HLSv4 playlists, and .ism and .ismc for Smooth
  5304. // playlists). If you include a file extension in Name, the file name will have
  5305. // two extensions.
  5306. Name *string `min:"1" type:"string"`
  5307. // For each output in this job that you want to include in a master playlist,
  5308. // the value of the Outputs:Key object.
  5309. //
  5310. // * If your output is not HLS or does not have a segment duration set, the
  5311. // name of the output file is a concatenation of OutputKeyPrefix and Outputs:Key:
  5312. //
  5313. // OutputKeyPrefixOutputs:Key
  5314. //
  5315. // * If your output is HLSv3 and has a segment duration set, or is not included
  5316. // in a playlist, Elastic Transcoder creates an output playlist file with
  5317. // a file extension of .m3u8, and a series of .ts files that include a five-digit
  5318. // sequential counter beginning with 00000:
  5319. //
  5320. // OutputKeyPrefixOutputs:Key.m3u8
  5321. //
  5322. // OutputKeyPrefixOutputs:Key00000.ts
  5323. //
  5324. // * If your output is HLSv4, has a segment duration set, and is included
  5325. // in an HLSv4 playlist, Elastic Transcoder creates an output playlist file
  5326. // with a file extension of _v4.m3u8. If the output is video, Elastic Transcoder
  5327. // also creates an output file with an extension of _iframe.m3u8:
  5328. //
  5329. // OutputKeyPrefixOutputs:Key_v4.m3u8
  5330. //
  5331. // OutputKeyPrefixOutputs:Key_iframe.m3u8
  5332. //
  5333. // OutputKeyPrefixOutputs:Key.ts
  5334. //
  5335. // Elastic Transcoder automatically appends the relevant file extension to the
  5336. // file name. If you include a file extension in Output Key, the file name will
  5337. // have two extensions.
  5338. //
  5339. // If you include more than one output in a playlist, any segment duration settings,
  5340. // clip settings, or caption settings must be the same for all outputs in the
  5341. // playlist. For Smooth playlists, the Audio:Profile, Video:Profile, and Video:FrameRate
  5342. // to Video:KeyframesMaxDist ratio must be the same for all outputs.
  5343. OutputKeys []*string `type:"list"`
  5344. // The DRM settings, if any, that you want Elastic Transcoder to apply to the
  5345. // output files associated with this playlist.
  5346. PlayReadyDrm *PlayReadyDrm `type:"structure"`
  5347. // The status of the job with which the playlist is associated.
  5348. Status *string `type:"string"`
  5349. // Information that further explains the status.
  5350. StatusDetail *string `type:"string"`
  5351. }
  5352. // String returns the string representation
  5353. func (s Playlist) String() string {
  5354. return awsutil.Prettify(s)
  5355. }
  5356. // GoString returns the string representation
  5357. func (s Playlist) GoString() string {
  5358. return s.String()
  5359. }
  5360. // SetFormat sets the Format field's value.
  5361. func (s *Playlist) SetFormat(v string) *Playlist {
  5362. s.Format = &v
  5363. return s
  5364. }
  5365. // SetHlsContentProtection sets the HlsContentProtection field's value.
  5366. func (s *Playlist) SetHlsContentProtection(v *HlsContentProtection) *Playlist {
  5367. s.HlsContentProtection = v
  5368. return s
  5369. }
  5370. // SetName sets the Name field's value.
  5371. func (s *Playlist) SetName(v string) *Playlist {
  5372. s.Name = &v
  5373. return s
  5374. }
  5375. // SetOutputKeys sets the OutputKeys field's value.
  5376. func (s *Playlist) SetOutputKeys(v []*string) *Playlist {
  5377. s.OutputKeys = v
  5378. return s
  5379. }
  5380. // SetPlayReadyDrm sets the PlayReadyDrm field's value.
  5381. func (s *Playlist) SetPlayReadyDrm(v *PlayReadyDrm) *Playlist {
  5382. s.PlayReadyDrm = v
  5383. return s
  5384. }
  5385. // SetStatus sets the Status field's value.
  5386. func (s *Playlist) SetStatus(v string) *Playlist {
  5387. s.Status = &v
  5388. return s
  5389. }
  5390. // SetStatusDetail sets the StatusDetail field's value.
  5391. func (s *Playlist) SetStatusDetail(v string) *Playlist {
  5392. s.StatusDetail = &v
  5393. return s
  5394. }
  5395. // Presets are templates that contain most of the settings for transcoding media
  5396. // files from one format to another. Elastic Transcoder includes some default
  5397. // presets for common formats, for example, several iPod and iPhone versions.
  5398. // You can also create your own presets for formats that aren't included among
  5399. // the default presets. You specify which preset you want to use when you create
  5400. // a job.
  5401. type Preset struct {
  5402. _ struct{} `type:"structure"`
  5403. // The Amazon Resource Name (ARN) for the preset.
  5404. Arn *string `type:"string"`
  5405. // A section of the response body that provides information about the audio
  5406. // preset values.
  5407. Audio *AudioParameters `type:"structure"`
  5408. // The container type for the output file. Valid values include flac, flv, fmp4,
  5409. // gif, mp3, mp4, mpg, mxf, oga, ogg, ts, and webm.
  5410. Container *string `type:"string"`
  5411. // A description of the preset.
  5412. Description *string `type:"string"`
  5413. // Identifier for the new preset. You use this value to get settings for the
  5414. // preset or to delete it.
  5415. Id *string `type:"string"`
  5416. // The name of the preset.
  5417. Name *string `min:"1" type:"string"`
  5418. // A section of the response body that provides information about the thumbnail
  5419. // preset values, if any.
  5420. Thumbnails *Thumbnails `type:"structure"`
  5421. // Whether the preset is a default preset provided by Elastic Transcoder (System)
  5422. // or a preset that you have defined (Custom).
  5423. Type *string `type:"string"`
  5424. // A section of the response body that provides information about the video
  5425. // preset values.
  5426. Video *VideoParameters `type:"structure"`
  5427. }
  5428. // String returns the string representation
  5429. func (s Preset) String() string {
  5430. return awsutil.Prettify(s)
  5431. }
  5432. // GoString returns the string representation
  5433. func (s Preset) GoString() string {
  5434. return s.String()
  5435. }
  5436. // SetArn sets the Arn field's value.
  5437. func (s *Preset) SetArn(v string) *Preset {
  5438. s.Arn = &v
  5439. return s
  5440. }
  5441. // SetAudio sets the Audio field's value.
  5442. func (s *Preset) SetAudio(v *AudioParameters) *Preset {
  5443. s.Audio = v
  5444. return s
  5445. }
  5446. // SetContainer sets the Container field's value.
  5447. func (s *Preset) SetContainer(v string) *Preset {
  5448. s.Container = &v
  5449. return s
  5450. }
  5451. // SetDescription sets the Description field's value.
  5452. func (s *Preset) SetDescription(v string) *Preset {
  5453. s.Description = &v
  5454. return s
  5455. }
  5456. // SetId sets the Id field's value.
  5457. func (s *Preset) SetId(v string) *Preset {
  5458. s.Id = &v
  5459. return s
  5460. }
  5461. // SetName sets the Name field's value.
  5462. func (s *Preset) SetName(v string) *Preset {
  5463. s.Name = &v
  5464. return s
  5465. }
  5466. // SetThumbnails sets the Thumbnails field's value.
  5467. func (s *Preset) SetThumbnails(v *Thumbnails) *Preset {
  5468. s.Thumbnails = v
  5469. return s
  5470. }
  5471. // SetType sets the Type field's value.
  5472. func (s *Preset) SetType(v string) *Preset {
  5473. s.Type = &v
  5474. return s
  5475. }
  5476. // SetVideo sets the Video field's value.
  5477. func (s *Preset) SetVideo(v *VideoParameters) *Preset {
  5478. s.Video = v
  5479. return s
  5480. }
  5481. // Settings for the size, location, and opacity of graphics that you want Elastic
  5482. // Transcoder to overlay over videos that are transcoded using this preset.
  5483. // You can specify settings for up to four watermarks. Watermarks appear in
  5484. // the specified size and location, and with the specified opacity for the duration
  5485. // of the transcoded video.
  5486. //
  5487. // Watermarks can be in .png or .jpg format. If you want to display a watermark
  5488. // that is not rectangular, use the .png format, which supports transparency.
  5489. //
  5490. // When you create a job that uses this preset, you specify the .png or .jpg
  5491. // graphics that you want Elastic Transcoder to include in the transcoded videos.
  5492. // You can specify fewer graphics in the job than you specify watermark settings
  5493. // in the preset, which allows you to use the same preset for up to four watermarks
  5494. // that have different dimensions.
  5495. type PresetWatermark struct {
  5496. _ struct{} `type:"structure"`
  5497. // The horizontal position of the watermark unless you specify a non-zero value
  5498. // for HorizontalOffset:
  5499. //
  5500. // * Left: The left edge of the watermark is aligned with the left border
  5501. // of the video.
  5502. //
  5503. // * Right: The right edge of the watermark is aligned with the right border
  5504. // of the video.
  5505. //
  5506. // * Center: The watermark is centered between the left and right borders.
  5507. HorizontalAlign *string `type:"string"`
  5508. // The amount by which you want the horizontal position of the watermark to
  5509. // be offset from the position specified by HorizontalAlign:
  5510. //
  5511. // * number of pixels (px): The minimum value is 0 pixels, and the maximum
  5512. // value is the value of MaxWidth.
  5513. //
  5514. // * integer percentage (%): The range of valid values is 0 to 100.
  5515. //
  5516. // For example, if you specify Left for HorizontalAlign and 5px for HorizontalOffset,
  5517. // the left side of the watermark appears 5 pixels from the left border of the
  5518. // output video.
  5519. //
  5520. // HorizontalOffset is only valid when the value of HorizontalAlign is Left
  5521. // or Right. If you specify an offset that causes the watermark to extend beyond
  5522. // the left or right border and Elastic Transcoder has not added black bars,
  5523. // the watermark is cropped. If Elastic Transcoder has added black bars, the
  5524. // watermark extends into the black bars. If the watermark extends beyond the
  5525. // black bars, it is cropped.
  5526. //
  5527. // Use the value of Target to specify whether you want to include the black
  5528. // bars that are added by Elastic Transcoder, if any, in the offset calculation.
  5529. HorizontalOffset *string `type:"string"`
  5530. // A unique identifier for the settings for one watermark. The value of Id can
  5531. // be up to 40 characters long.
  5532. Id *string `min:"1" type:"string"`
  5533. // The maximum height of the watermark in one of the following formats:
  5534. //
  5535. // * number of pixels (px): The minimum value is 16 pixels, and the maximum
  5536. // value is the value of MaxHeight.
  5537. //
  5538. // * integer percentage (%): The range of valid values is 0 to 100. Use the
  5539. // value of Target to specify whether you want Elastic Transcoder to include
  5540. // the black bars that are added by Elastic Transcoder, if any, in the calculation.
  5541. //
  5542. // If you specify the value in pixels, it must be less than or equal to the
  5543. // value of MaxHeight.
  5544. MaxHeight *string `type:"string"`
  5545. // The maximum width of the watermark in one of the following formats:
  5546. //
  5547. // * number of pixels (px): The minimum value is 16 pixels, and the maximum
  5548. // value is the value of MaxWidth.
  5549. //
  5550. // * integer percentage (%): The range of valid values is 0 to 100. Use the
  5551. // value of Target to specify whether you want Elastic Transcoder to include
  5552. // the black bars that are added by Elastic Transcoder, if any, in the calculation.
  5553. //
  5554. // If you specify the value in pixels, it must be less than or equal to the
  5555. // value of MaxWidth.
  5556. MaxWidth *string `type:"string"`
  5557. // A percentage that indicates how much you want a watermark to obscure the
  5558. // video in the location where it appears. Valid values are 0 (the watermark
  5559. // is invisible) to 100 (the watermark completely obscures the video in the
  5560. // specified location). The datatype of Opacity is float.
  5561. //
  5562. // Elastic Transcoder supports transparent .png graphics. If you use a transparent
  5563. // .png, the transparent portion of the video appears as if you had specified
  5564. // a value of 0 for Opacity. The .jpg file format doesn't support transparency.
  5565. Opacity *string `type:"string"`
  5566. // A value that controls scaling of the watermark:
  5567. //
  5568. // * Fit: Elastic Transcoder scales the watermark so it matches the value
  5569. // that you specified in either MaxWidth or MaxHeight without exceeding the
  5570. // other value.
  5571. //
  5572. // * Stretch: Elastic Transcoder stretches the watermark to match the values
  5573. // that you specified for MaxWidth and MaxHeight. If the relative proportions
  5574. // of the watermark and the values of MaxWidth and MaxHeight are different,
  5575. // the watermark will be distorted.
  5576. //
  5577. // * ShrinkToFit: Elastic Transcoder scales the watermark down so that its
  5578. // dimensions match the values that you specified for at least one of MaxWidth
  5579. // and MaxHeight without exceeding either value. If you specify this option,
  5580. // Elastic Transcoder does not scale the watermark up.
  5581. SizingPolicy *string `type:"string"`
  5582. // A value that determines how Elastic Transcoder interprets values that you
  5583. // specified for HorizontalOffset, VerticalOffset, MaxWidth, and MaxHeight:
  5584. //
  5585. // * Content: HorizontalOffset and VerticalOffset values are calculated based
  5586. // on the borders of the video excluding black bars added by Elastic Transcoder,
  5587. // if any. In addition, MaxWidth and MaxHeight, if specified as a percentage,
  5588. // are calculated based on the borders of the video excluding black bars
  5589. // added by Elastic Transcoder, if any.
  5590. //
  5591. // * Frame: HorizontalOffset and VerticalOffset values are calculated based
  5592. // on the borders of the video including black bars added by Elastic Transcoder,
  5593. // if any. In addition, MaxWidth and MaxHeight, if specified as a percentage,
  5594. // are calculated based on the borders of the video including black bars
  5595. // added by Elastic Transcoder, if any.
  5596. Target *string `type:"string"`
  5597. // The vertical position of the watermark unless you specify a non-zero value
  5598. // for VerticalOffset:
  5599. //
  5600. // * Top: The top edge of the watermark is aligned with the top border of
  5601. // the video.
  5602. //
  5603. // * Bottom: The bottom edge of the watermark is aligned with the bottom
  5604. // border of the video.
  5605. //
  5606. // * Center: The watermark is centered between the top and bottom borders.
  5607. VerticalAlign *string `type:"string"`
  5608. // VerticalOffset
  5609. //
  5610. // The amount by which you want the vertical position of the watermark to be
  5611. // offset from the position specified by VerticalAlign:
  5612. //
  5613. // * number of pixels (px): The minimum value is 0 pixels, and the maximum
  5614. // value is the value of MaxHeight.
  5615. //
  5616. // * integer percentage (%): The range of valid values is 0 to 100.
  5617. //
  5618. // For example, if you specify Top for VerticalAlign and 5px for VerticalOffset,
  5619. // the top of the watermark appears 5 pixels from the top border of the output
  5620. // video.
  5621. //
  5622. // VerticalOffset is only valid when the value of VerticalAlign is Top or Bottom.
  5623. //
  5624. // If you specify an offset that causes the watermark to extend beyond the top
  5625. // or bottom border and Elastic Transcoder has not added black bars, the watermark
  5626. // is cropped. If Elastic Transcoder has added black bars, the watermark extends
  5627. // into the black bars. If the watermark extends beyond the black bars, it is
  5628. // cropped.
  5629. //
  5630. // Use the value of Target to specify whether you want Elastic Transcoder to
  5631. // include the black bars that are added by Elastic Transcoder, if any, in the
  5632. // offset calculation.
  5633. VerticalOffset *string `type:"string"`
  5634. }
  5635. // String returns the string representation
  5636. func (s PresetWatermark) String() string {
  5637. return awsutil.Prettify(s)
  5638. }
  5639. // GoString returns the string representation
  5640. func (s PresetWatermark) GoString() string {
  5641. return s.String()
  5642. }
  5643. // Validate inspects the fields of the type to determine if they are valid.
  5644. func (s *PresetWatermark) Validate() error {
  5645. invalidParams := request.ErrInvalidParams{Context: "PresetWatermark"}
  5646. if s.Id != nil && len(*s.Id) < 1 {
  5647. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  5648. }
  5649. if invalidParams.Len() > 0 {
  5650. return invalidParams
  5651. }
  5652. return nil
  5653. }
  5654. // SetHorizontalAlign sets the HorizontalAlign field's value.
  5655. func (s *PresetWatermark) SetHorizontalAlign(v string) *PresetWatermark {
  5656. s.HorizontalAlign = &v
  5657. return s
  5658. }
  5659. // SetHorizontalOffset sets the HorizontalOffset field's value.
  5660. func (s *PresetWatermark) SetHorizontalOffset(v string) *PresetWatermark {
  5661. s.HorizontalOffset = &v
  5662. return s
  5663. }
  5664. // SetId sets the Id field's value.
  5665. func (s *PresetWatermark) SetId(v string) *PresetWatermark {
  5666. s.Id = &v
  5667. return s
  5668. }
  5669. // SetMaxHeight sets the MaxHeight field's value.
  5670. func (s *PresetWatermark) SetMaxHeight(v string) *PresetWatermark {
  5671. s.MaxHeight = &v
  5672. return s
  5673. }
  5674. // SetMaxWidth sets the MaxWidth field's value.
  5675. func (s *PresetWatermark) SetMaxWidth(v string) *PresetWatermark {
  5676. s.MaxWidth = &v
  5677. return s
  5678. }
  5679. // SetOpacity sets the Opacity field's value.
  5680. func (s *PresetWatermark) SetOpacity(v string) *PresetWatermark {
  5681. s.Opacity = &v
  5682. return s
  5683. }
  5684. // SetSizingPolicy sets the SizingPolicy field's value.
  5685. func (s *PresetWatermark) SetSizingPolicy(v string) *PresetWatermark {
  5686. s.SizingPolicy = &v
  5687. return s
  5688. }
  5689. // SetTarget sets the Target field's value.
  5690. func (s *PresetWatermark) SetTarget(v string) *PresetWatermark {
  5691. s.Target = &v
  5692. return s
  5693. }
  5694. // SetVerticalAlign sets the VerticalAlign field's value.
  5695. func (s *PresetWatermark) SetVerticalAlign(v string) *PresetWatermark {
  5696. s.VerticalAlign = &v
  5697. return s
  5698. }
  5699. // SetVerticalOffset sets the VerticalOffset field's value.
  5700. func (s *PresetWatermark) SetVerticalOffset(v string) *PresetWatermark {
  5701. s.VerticalOffset = &v
  5702. return s
  5703. }
  5704. // The ReadJobRequest structure.
  5705. type ReadJobInput struct {
  5706. _ struct{} `type:"structure"`
  5707. // The identifier of the job for which you want to get detailed information.
  5708. //
  5709. // Id is a required field
  5710. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  5711. }
  5712. // String returns the string representation
  5713. func (s ReadJobInput) String() string {
  5714. return awsutil.Prettify(s)
  5715. }
  5716. // GoString returns the string representation
  5717. func (s ReadJobInput) GoString() string {
  5718. return s.String()
  5719. }
  5720. // Validate inspects the fields of the type to determine if they are valid.
  5721. func (s *ReadJobInput) Validate() error {
  5722. invalidParams := request.ErrInvalidParams{Context: "ReadJobInput"}
  5723. if s.Id == nil {
  5724. invalidParams.Add(request.NewErrParamRequired("Id"))
  5725. }
  5726. if s.Id != nil && len(*s.Id) < 1 {
  5727. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  5728. }
  5729. if invalidParams.Len() > 0 {
  5730. return invalidParams
  5731. }
  5732. return nil
  5733. }
  5734. // SetId sets the Id field's value.
  5735. func (s *ReadJobInput) SetId(v string) *ReadJobInput {
  5736. s.Id = &v
  5737. return s
  5738. }
  5739. // The ReadJobResponse structure.
  5740. type ReadJobOutput struct {
  5741. _ struct{} `type:"structure"`
  5742. // A section of the response body that provides information about the job.
  5743. Job *Job `type:"structure"`
  5744. }
  5745. // String returns the string representation
  5746. func (s ReadJobOutput) String() string {
  5747. return awsutil.Prettify(s)
  5748. }
  5749. // GoString returns the string representation
  5750. func (s ReadJobOutput) GoString() string {
  5751. return s.String()
  5752. }
  5753. // SetJob sets the Job field's value.
  5754. func (s *ReadJobOutput) SetJob(v *Job) *ReadJobOutput {
  5755. s.Job = v
  5756. return s
  5757. }
  5758. // The ReadPipelineRequest structure.
  5759. type ReadPipelineInput struct {
  5760. _ struct{} `type:"structure"`
  5761. // The identifier of the pipeline to read.
  5762. //
  5763. // Id is a required field
  5764. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  5765. }
  5766. // String returns the string representation
  5767. func (s ReadPipelineInput) String() string {
  5768. return awsutil.Prettify(s)
  5769. }
  5770. // GoString returns the string representation
  5771. func (s ReadPipelineInput) GoString() string {
  5772. return s.String()
  5773. }
  5774. // Validate inspects the fields of the type to determine if they are valid.
  5775. func (s *ReadPipelineInput) Validate() error {
  5776. invalidParams := request.ErrInvalidParams{Context: "ReadPipelineInput"}
  5777. if s.Id == nil {
  5778. invalidParams.Add(request.NewErrParamRequired("Id"))
  5779. }
  5780. if s.Id != nil && len(*s.Id) < 1 {
  5781. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  5782. }
  5783. if invalidParams.Len() > 0 {
  5784. return invalidParams
  5785. }
  5786. return nil
  5787. }
  5788. // SetId sets the Id field's value.
  5789. func (s *ReadPipelineInput) SetId(v string) *ReadPipelineInput {
  5790. s.Id = &v
  5791. return s
  5792. }
  5793. // The ReadPipelineResponse structure.
  5794. type ReadPipelineOutput struct {
  5795. _ struct{} `type:"structure"`
  5796. // A section of the response body that provides information about the pipeline.
  5797. Pipeline *Pipeline `type:"structure"`
  5798. // Elastic Transcoder returns a warning if the resources used by your pipeline
  5799. // are not in the same region as the pipeline.
  5800. //
  5801. // Using resources in the same region, such as your Amazon S3 buckets, Amazon
  5802. // SNS notification topics, and AWS KMS key, reduces processing time and prevents
  5803. // cross-regional charges.
  5804. Warnings []*Warning `type:"list"`
  5805. }
  5806. // String returns the string representation
  5807. func (s ReadPipelineOutput) String() string {
  5808. return awsutil.Prettify(s)
  5809. }
  5810. // GoString returns the string representation
  5811. func (s ReadPipelineOutput) GoString() string {
  5812. return s.String()
  5813. }
  5814. // SetPipeline sets the Pipeline field's value.
  5815. func (s *ReadPipelineOutput) SetPipeline(v *Pipeline) *ReadPipelineOutput {
  5816. s.Pipeline = v
  5817. return s
  5818. }
  5819. // SetWarnings sets the Warnings field's value.
  5820. func (s *ReadPipelineOutput) SetWarnings(v []*Warning) *ReadPipelineOutput {
  5821. s.Warnings = v
  5822. return s
  5823. }
  5824. // The ReadPresetRequest structure.
  5825. type ReadPresetInput struct {
  5826. _ struct{} `type:"structure"`
  5827. // The identifier of the preset for which you want to get detailed information.
  5828. //
  5829. // Id is a required field
  5830. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  5831. }
  5832. // String returns the string representation
  5833. func (s ReadPresetInput) String() string {
  5834. return awsutil.Prettify(s)
  5835. }
  5836. // GoString returns the string representation
  5837. func (s ReadPresetInput) GoString() string {
  5838. return s.String()
  5839. }
  5840. // Validate inspects the fields of the type to determine if they are valid.
  5841. func (s *ReadPresetInput) Validate() error {
  5842. invalidParams := request.ErrInvalidParams{Context: "ReadPresetInput"}
  5843. if s.Id == nil {
  5844. invalidParams.Add(request.NewErrParamRequired("Id"))
  5845. }
  5846. if s.Id != nil && len(*s.Id) < 1 {
  5847. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  5848. }
  5849. if invalidParams.Len() > 0 {
  5850. return invalidParams
  5851. }
  5852. return nil
  5853. }
  5854. // SetId sets the Id field's value.
  5855. func (s *ReadPresetInput) SetId(v string) *ReadPresetInput {
  5856. s.Id = &v
  5857. return s
  5858. }
  5859. // The ReadPresetResponse structure.
  5860. type ReadPresetOutput struct {
  5861. _ struct{} `type:"structure"`
  5862. // A section of the response body that provides information about the preset.
  5863. Preset *Preset `type:"structure"`
  5864. }
  5865. // String returns the string representation
  5866. func (s ReadPresetOutput) String() string {
  5867. return awsutil.Prettify(s)
  5868. }
  5869. // GoString returns the string representation
  5870. func (s ReadPresetOutput) GoString() string {
  5871. return s.String()
  5872. }
  5873. // SetPreset sets the Preset field's value.
  5874. func (s *ReadPresetOutput) SetPreset(v *Preset) *ReadPresetOutput {
  5875. s.Preset = v
  5876. return s
  5877. }
  5878. // The TestRoleRequest structure.
  5879. //
  5880. // Deprecated: TestRoleInput has been deprecated
  5881. type TestRoleInput struct {
  5882. _ struct{} `deprecated:"true" type:"structure"`
  5883. // The Amazon S3 bucket that contains media files to be transcoded. The action
  5884. // attempts to read from this bucket.
  5885. //
  5886. // InputBucket is a required field
  5887. InputBucket *string `type:"string" required:"true"`
  5888. // The Amazon S3 bucket that Elastic Transcoder writes transcoded media files
  5889. // to. The action attempts to read from this bucket.
  5890. //
  5891. // OutputBucket is a required field
  5892. OutputBucket *string `type:"string" required:"true"`
  5893. // The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder
  5894. // to test.
  5895. //
  5896. // Role is a required field
  5897. Role *string `type:"string" required:"true"`
  5898. // The ARNs of one or more Amazon Simple Notification Service (Amazon SNS) topics
  5899. // that you want the action to send a test notification to.
  5900. //
  5901. // Topics is a required field
  5902. Topics []*string `type:"list" required:"true"`
  5903. }
  5904. // String returns the string representation
  5905. func (s TestRoleInput) String() string {
  5906. return awsutil.Prettify(s)
  5907. }
  5908. // GoString returns the string representation
  5909. func (s TestRoleInput) GoString() string {
  5910. return s.String()
  5911. }
  5912. // Validate inspects the fields of the type to determine if they are valid.
  5913. func (s *TestRoleInput) Validate() error {
  5914. invalidParams := request.ErrInvalidParams{Context: "TestRoleInput"}
  5915. if s.InputBucket == nil {
  5916. invalidParams.Add(request.NewErrParamRequired("InputBucket"))
  5917. }
  5918. if s.OutputBucket == nil {
  5919. invalidParams.Add(request.NewErrParamRequired("OutputBucket"))
  5920. }
  5921. if s.Role == nil {
  5922. invalidParams.Add(request.NewErrParamRequired("Role"))
  5923. }
  5924. if s.Topics == nil {
  5925. invalidParams.Add(request.NewErrParamRequired("Topics"))
  5926. }
  5927. if invalidParams.Len() > 0 {
  5928. return invalidParams
  5929. }
  5930. return nil
  5931. }
  5932. // SetInputBucket sets the InputBucket field's value.
  5933. func (s *TestRoleInput) SetInputBucket(v string) *TestRoleInput {
  5934. s.InputBucket = &v
  5935. return s
  5936. }
  5937. // SetOutputBucket sets the OutputBucket field's value.
  5938. func (s *TestRoleInput) SetOutputBucket(v string) *TestRoleInput {
  5939. s.OutputBucket = &v
  5940. return s
  5941. }
  5942. // SetRole sets the Role field's value.
  5943. func (s *TestRoleInput) SetRole(v string) *TestRoleInput {
  5944. s.Role = &v
  5945. return s
  5946. }
  5947. // SetTopics sets the Topics field's value.
  5948. func (s *TestRoleInput) SetTopics(v []*string) *TestRoleInput {
  5949. s.Topics = v
  5950. return s
  5951. }
  5952. // The TestRoleResponse structure.
  5953. //
  5954. // Deprecated: TestRoleOutput has been deprecated
  5955. type TestRoleOutput struct {
  5956. _ struct{} `deprecated:"true" type:"structure"`
  5957. // If the Success element contains false, this value is an array of one or more
  5958. // error messages that were generated during the test process.
  5959. Messages []*string `type:"list"`
  5960. // If the operation is successful, this value is true; otherwise, the value
  5961. // is false.
  5962. Success *string `type:"string"`
  5963. }
  5964. // String returns the string representation
  5965. func (s TestRoleOutput) String() string {
  5966. return awsutil.Prettify(s)
  5967. }
  5968. // GoString returns the string representation
  5969. func (s TestRoleOutput) GoString() string {
  5970. return s.String()
  5971. }
  5972. // SetMessages sets the Messages field's value.
  5973. func (s *TestRoleOutput) SetMessages(v []*string) *TestRoleOutput {
  5974. s.Messages = v
  5975. return s
  5976. }
  5977. // SetSuccess sets the Success field's value.
  5978. func (s *TestRoleOutput) SetSuccess(v string) *TestRoleOutput {
  5979. s.Success = &v
  5980. return s
  5981. }
  5982. // Thumbnails for videos.
  5983. type Thumbnails struct {
  5984. _ struct{} `type:"structure"`
  5985. // To better control resolution and aspect ratio of thumbnails, we recommend
  5986. // that you use the values MaxWidth, MaxHeight, SizingPolicy, and PaddingPolicy
  5987. // instead of Resolution and AspectRatio. The two groups of settings are mutually
  5988. // exclusive. Do not use them together.
  5989. //
  5990. // The aspect ratio of thumbnails. Valid values include:
  5991. //
  5992. // auto, 1:1, 4:3, 3:2, 16:9
  5993. //
  5994. // If you specify auto, Elastic Transcoder tries to preserve the aspect ratio
  5995. // of the video in the output file.
  5996. AspectRatio *string `type:"string"`
  5997. // The format of thumbnails, if any. Valid values are jpg and png.
  5998. //
  5999. // You specify whether you want Elastic Transcoder to create thumbnails when
  6000. // you create a job.
  6001. Format *string `type:"string"`
  6002. // The approximate number of seconds between thumbnails. Specify an integer
  6003. // value.
  6004. Interval *string `type:"string"`
  6005. // The maximum height of thumbnails in pixels. If you specify auto, Elastic
  6006. // Transcoder uses 1080 (Full HD) as the default value. If you specify a numeric
  6007. // value, enter an even integer between 32 and 3072.
  6008. MaxHeight *string `type:"string"`
  6009. // The maximum width of thumbnails in pixels. If you specify auto, Elastic Transcoder
  6010. // uses 1920 (Full HD) as the default value. If you specify a numeric value,
  6011. // enter an even integer between 32 and 4096.
  6012. MaxWidth *string `type:"string"`
  6013. // When you set PaddingPolicy to Pad, Elastic Transcoder may add black bars
  6014. // to the top and bottom and/or left and right sides of thumbnails to make the
  6015. // total size of the thumbnails match the values that you specified for thumbnail
  6016. // MaxWidth and MaxHeight settings.
  6017. PaddingPolicy *string `type:"string"`
  6018. // To better control resolution and aspect ratio of thumbnails, we recommend
  6019. // that you use the values MaxWidth, MaxHeight, SizingPolicy, and PaddingPolicy
  6020. // instead of Resolution and AspectRatio. The two groups of settings are mutually
  6021. // exclusive. Do not use them together.
  6022. //
  6023. // The width and height of thumbnail files in pixels. Specify a value in the
  6024. // format width x height where both values are even integers. The values cannot
  6025. // exceed the width and height that you specified in the Video:Resolution object.
  6026. Resolution *string `type:"string"`
  6027. // Specify one of the following values to control scaling of thumbnails:
  6028. //
  6029. // * Fit: Elastic Transcoder scales thumbnails so they match the value that
  6030. // you specified in thumbnail MaxWidth or MaxHeight settings without exceeding
  6031. // the other value.
  6032. //
  6033. // * Fill: Elastic Transcoder scales thumbnails so they match the value that
  6034. // you specified in thumbnail MaxWidth or MaxHeight settings and matches
  6035. // or exceeds the other value. Elastic Transcoder centers the image in thumbnails
  6036. // and then crops in the dimension (if any) that exceeds the maximum value.
  6037. //
  6038. // * Stretch: Elastic Transcoder stretches thumbnails to match the values
  6039. // that you specified for thumbnail MaxWidth and MaxHeight settings. If the
  6040. // relative proportions of the input video and thumbnails are different,
  6041. // the thumbnails will be distorted.
  6042. //
  6043. // * Keep: Elastic Transcoder does not scale thumbnails. If either dimension
  6044. // of the input video exceeds the values that you specified for thumbnail
  6045. // MaxWidth and MaxHeight settings, Elastic Transcoder crops the thumbnails.
  6046. //
  6047. // * ShrinkToFit: Elastic Transcoder scales thumbnails down so that their
  6048. // dimensions match the values that you specified for at least one of thumbnail
  6049. // MaxWidth and MaxHeight without exceeding either value. If you specify
  6050. // this option, Elastic Transcoder does not scale thumbnails up.
  6051. //
  6052. // * ShrinkToFill: Elastic Transcoder scales thumbnails down so that their
  6053. // dimensions match the values that you specified for at least one of MaxWidth
  6054. // and MaxHeight without dropping below either value. If you specify this
  6055. // option, Elastic Transcoder does not scale thumbnails up.
  6056. SizingPolicy *string `type:"string"`
  6057. }
  6058. // String returns the string representation
  6059. func (s Thumbnails) String() string {
  6060. return awsutil.Prettify(s)
  6061. }
  6062. // GoString returns the string representation
  6063. func (s Thumbnails) GoString() string {
  6064. return s.String()
  6065. }
  6066. // SetAspectRatio sets the AspectRatio field's value.
  6067. func (s *Thumbnails) SetAspectRatio(v string) *Thumbnails {
  6068. s.AspectRatio = &v
  6069. return s
  6070. }
  6071. // SetFormat sets the Format field's value.
  6072. func (s *Thumbnails) SetFormat(v string) *Thumbnails {
  6073. s.Format = &v
  6074. return s
  6075. }
  6076. // SetInterval sets the Interval field's value.
  6077. func (s *Thumbnails) SetInterval(v string) *Thumbnails {
  6078. s.Interval = &v
  6079. return s
  6080. }
  6081. // SetMaxHeight sets the MaxHeight field's value.
  6082. func (s *Thumbnails) SetMaxHeight(v string) *Thumbnails {
  6083. s.MaxHeight = &v
  6084. return s
  6085. }
  6086. // SetMaxWidth sets the MaxWidth field's value.
  6087. func (s *Thumbnails) SetMaxWidth(v string) *Thumbnails {
  6088. s.MaxWidth = &v
  6089. return s
  6090. }
  6091. // SetPaddingPolicy sets the PaddingPolicy field's value.
  6092. func (s *Thumbnails) SetPaddingPolicy(v string) *Thumbnails {
  6093. s.PaddingPolicy = &v
  6094. return s
  6095. }
  6096. // SetResolution sets the Resolution field's value.
  6097. func (s *Thumbnails) SetResolution(v string) *Thumbnails {
  6098. s.Resolution = &v
  6099. return s
  6100. }
  6101. // SetSizingPolicy sets the SizingPolicy field's value.
  6102. func (s *Thumbnails) SetSizingPolicy(v string) *Thumbnails {
  6103. s.SizingPolicy = &v
  6104. return s
  6105. }
  6106. // Settings that determine when a clip begins and how long it lasts.
  6107. type TimeSpan struct {
  6108. _ struct{} `type:"structure"`
  6109. // The duration of the clip. The format can be either HH:mm:ss.SSS (maximum
  6110. // value: 23:59:59.999; SSS is thousandths of a second) or sssss.SSS (maximum
  6111. // value: 86399.999). If you don't specify a value, Elastic Transcoder creates
  6112. // an output file from StartTime to the end of the file.
  6113. //
  6114. // If you specify a value longer than the duration of the input file, Elastic
  6115. // Transcoder transcodes the file and returns a warning message.
  6116. Duration *string `type:"string"`
  6117. // The place in the input file where you want a clip to start. The format can
  6118. // be either HH:mm:ss.SSS (maximum value: 23:59:59.999; SSS is thousandths of
  6119. // a second) or sssss.SSS (maximum value: 86399.999). If you don't specify a
  6120. // value, Elastic Transcoder starts at the beginning of the input file.
  6121. StartTime *string `type:"string"`
  6122. }
  6123. // String returns the string representation
  6124. func (s TimeSpan) String() string {
  6125. return awsutil.Prettify(s)
  6126. }
  6127. // GoString returns the string representation
  6128. func (s TimeSpan) GoString() string {
  6129. return s.String()
  6130. }
  6131. // SetDuration sets the Duration field's value.
  6132. func (s *TimeSpan) SetDuration(v string) *TimeSpan {
  6133. s.Duration = &v
  6134. return s
  6135. }
  6136. // SetStartTime sets the StartTime field's value.
  6137. func (s *TimeSpan) SetStartTime(v string) *TimeSpan {
  6138. s.StartTime = &v
  6139. return s
  6140. }
  6141. // Details about the timing of a job.
  6142. type Timing struct {
  6143. _ struct{} `type:"structure"`
  6144. // The time the job finished transcoding, in epoch milliseconds.
  6145. FinishTimeMillis *int64 `type:"long"`
  6146. // The time the job began transcoding, in epoch milliseconds.
  6147. StartTimeMillis *int64 `type:"long"`
  6148. // The time the job was submitted to Elastic Transcoder, in epoch milliseconds.
  6149. SubmitTimeMillis *int64 `type:"long"`
  6150. }
  6151. // String returns the string representation
  6152. func (s Timing) String() string {
  6153. return awsutil.Prettify(s)
  6154. }
  6155. // GoString returns the string representation
  6156. func (s Timing) GoString() string {
  6157. return s.String()
  6158. }
  6159. // SetFinishTimeMillis sets the FinishTimeMillis field's value.
  6160. func (s *Timing) SetFinishTimeMillis(v int64) *Timing {
  6161. s.FinishTimeMillis = &v
  6162. return s
  6163. }
  6164. // SetStartTimeMillis sets the StartTimeMillis field's value.
  6165. func (s *Timing) SetStartTimeMillis(v int64) *Timing {
  6166. s.StartTimeMillis = &v
  6167. return s
  6168. }
  6169. // SetSubmitTimeMillis sets the SubmitTimeMillis field's value.
  6170. func (s *Timing) SetSubmitTimeMillis(v int64) *Timing {
  6171. s.SubmitTimeMillis = &v
  6172. return s
  6173. }
  6174. // The UpdatePipelineRequest structure.
  6175. type UpdatePipelineInput struct {
  6176. _ struct{} `type:"structure"`
  6177. // The AWS Key Management Service (AWS KMS) key that you want to use with this
  6178. // pipeline.
  6179. //
  6180. // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need
  6181. // to provide a key with your job because a default key, known as an AWS-KMS
  6182. // key, is created for you automatically. You need to provide an AWS-KMS key
  6183. // only if you want to use a non-default AWS-KMS key, or if you are using an
  6184. // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm.
  6185. AwsKmsKeyArn *string `type:"string"`
  6186. // The optional ContentConfig object specifies information about the Amazon
  6187. // S3 bucket in which you want Elastic Transcoder to save transcoded files and
  6188. // playlists: which bucket to use, which users you want to have access to the
  6189. // files, the type of access you want users to have, and the storage class that
  6190. // you want to assign to the files.
  6191. //
  6192. // If you specify values for ContentConfig, you must also specify values for
  6193. // ThumbnailConfig.
  6194. //
  6195. // If you specify values for ContentConfig and ThumbnailConfig, omit the OutputBucket
  6196. // object.
  6197. //
  6198. // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to
  6199. // save transcoded files and playlists.
  6200. //
  6201. // * Permissions (Optional): The Permissions object specifies which users
  6202. // you want to have access to transcoded files and the type of access you
  6203. // want them to have. You can grant permissions to a maximum of 30 users
  6204. // and/or predefined Amazon S3 groups.
  6205. //
  6206. // * Grantee Type: Specify the type of value that appears in the Grantee
  6207. // object:
  6208. //
  6209. // Canonical: The value in the Grantee object is either the canonical user ID
  6210. // for an AWS account or an origin access identity for an Amazon CloudFront
  6211. // distribution. For more information about canonical user IDs, see Access
  6212. // Control List (ACL) Overview in the Amazon Simple Storage Service Developer
  6213. // Guide. For more information about using CloudFront origin access identities
  6214. // to require that users use CloudFront URLs instead of Amazon S3 URLs, see
  6215. // Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content.
  6216. //
  6217. // A canonical user ID is not the same as an AWS account number.
  6218. //
  6219. // Email: The value in the Grantee object is the registered email address of
  6220. // an AWS account.
  6221. //
  6222. // Group: The value in the Grantee object is one of the following predefined
  6223. // Amazon S3 groups: AllUsers, AuthenticatedUsers, or LogDelivery.
  6224. //
  6225. // * Grantee: The AWS user or group that you want to have access to transcoded
  6226. // files and playlists. To identify the user or group, you can specify the
  6227. // canonical user ID for an AWS account, an origin access identity for a
  6228. // CloudFront distribution, the registered email address of an AWS account,
  6229. // or a predefined Amazon S3 group
  6230. //
  6231. // * Access: The permission that you want to give to the AWS user that you
  6232. // specified in Grantee. Permissions are granted on the files that Elastic
  6233. // Transcoder adds to the bucket, including playlists and video files. Valid
  6234. // values include:
  6235. //
  6236. // READ: The grantee can read the objects and metadata for objects that Elastic
  6237. // Transcoder adds to the Amazon S3 bucket.
  6238. //
  6239. // READ_ACP: The grantee can read the object ACL for objects that Elastic Transcoder
  6240. // adds to the Amazon S3 bucket.
  6241. //
  6242. // WRITE_ACP: The grantee can write the ACL for the objects that Elastic Transcoder
  6243. // adds to the Amazon S3 bucket.
  6244. //
  6245. // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for
  6246. // the objects that Elastic Transcoder adds to the Amazon S3 bucket.
  6247. //
  6248. // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy,
  6249. // that you want Elastic Transcoder to assign to the video files and playlists
  6250. // that it stores in your Amazon S3 bucket.
  6251. ContentConfig *PipelineOutputConfig `type:"structure"`
  6252. // The ID of the pipeline that you want to update.
  6253. //
  6254. // Id is a required field
  6255. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6256. // The Amazon S3 bucket in which you saved the media files that you want to
  6257. // transcode and the graphics that you want to use as watermarks.
  6258. InputBucket *string `type:"string"`
  6259. // The name of the pipeline. We recommend that the name be unique within the
  6260. // AWS account, but uniqueness is not enforced.
  6261. //
  6262. // Constraints: Maximum 40 characters
  6263. Name *string `min:"1" type:"string"`
  6264. // The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic
  6265. // that you want to notify to report job status.
  6266. //
  6267. // To receive notifications, you must also subscribe to the new topic in the
  6268. // Amazon SNS console.
  6269. //
  6270. // * Progressing: The topic ARN for the Amazon Simple Notification Service
  6271. // (Amazon SNS) topic that you want to notify when Elastic Transcoder has
  6272. // started to process jobs that are added to this pipeline. This is the ARN
  6273. // that Amazon SNS returned when you created the topic.
  6274. //
  6275. // * Complete: The topic ARN for the Amazon SNS topic that you want to notify
  6276. // when Elastic Transcoder has finished processing a job. This is the ARN
  6277. // that Amazon SNS returned when you created the topic.
  6278. //
  6279. // * Warning: The topic ARN for the Amazon SNS topic that you want to notify
  6280. // when Elastic Transcoder encounters a warning condition. This is the ARN
  6281. // that Amazon SNS returned when you created the topic.
  6282. //
  6283. // * Error: The topic ARN for the Amazon SNS topic that you want to notify
  6284. // when Elastic Transcoder encounters an error condition. This is the ARN
  6285. // that Amazon SNS returned when you created the topic.
  6286. Notifications *Notifications `type:"structure"`
  6287. // The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder
  6288. // to use to transcode jobs for this pipeline.
  6289. Role *string `type:"string"`
  6290. // The ThumbnailConfig object specifies several values, including the Amazon
  6291. // S3 bucket in which you want Elastic Transcoder to save thumbnail files, which
  6292. // users you want to have access to the files, the type of access you want users
  6293. // to have, and the storage class that you want to assign to the files.
  6294. //
  6295. // If you specify values for ContentConfig, you must also specify values for
  6296. // ThumbnailConfig even if you don't want to create thumbnails.
  6297. //
  6298. // If you specify values for ContentConfig and ThumbnailConfig, omit the OutputBucket
  6299. // object.
  6300. //
  6301. // * Bucket: The Amazon S3 bucket in which you want Elastic Transcoder to
  6302. // save thumbnail files.
  6303. //
  6304. // * Permissions (Optional): The Permissions object specifies which users
  6305. // and/or predefined Amazon S3 groups you want to have access to thumbnail
  6306. // files, and the type of access you want them to have. You can grant permissions
  6307. // to a maximum of 30 users and/or predefined Amazon S3 groups.
  6308. //
  6309. // * GranteeType: Specify the type of value that appears in the Grantee object:
  6310. //
  6311. // Canonical: The value in the Grantee object is either the canonical user ID
  6312. // for an AWS account or an origin access identity for an Amazon CloudFront
  6313. // distribution.
  6314. //
  6315. // A canonical user ID is not the same as an AWS account number.
  6316. //
  6317. // Email: The value in the Grantee object is the registered email address of
  6318. // an AWS account.
  6319. //
  6320. // Group: The value in the Grantee object is one of the following predefined
  6321. // Amazon S3 groups: AllUsers, AuthenticatedUsers, or LogDelivery.
  6322. //
  6323. // * Grantee: The AWS user or group that you want to have access to thumbnail
  6324. // files. To identify the user or group, you can specify the canonical user
  6325. // ID for an AWS account, an origin access identity for a CloudFront distribution,
  6326. // the registered email address of an AWS account, or a predefined Amazon
  6327. // S3 group.
  6328. //
  6329. // * Access: The permission that you want to give to the AWS user that you
  6330. // specified in Grantee. Permissions are granted on the thumbnail files that
  6331. // Elastic Transcoder adds to the bucket. Valid values include:
  6332. //
  6333. // READ: The grantee can read the thumbnails and metadata for objects that Elastic
  6334. // Transcoder adds to the Amazon S3 bucket.
  6335. //
  6336. // READ_ACP: The grantee can read the object ACL for thumbnails that Elastic
  6337. // Transcoder adds to the Amazon S3 bucket.
  6338. //
  6339. // WRITE_ACP: The grantee can write the ACL for the thumbnails that Elastic
  6340. // Transcoder adds to the Amazon S3 bucket.
  6341. //
  6342. // FULL_CONTROL: The grantee has READ, READ_ACP, and WRITE_ACP permissions for
  6343. // the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.
  6344. //
  6345. // * StorageClass: The Amazon S3 storage class, Standard or ReducedRedundancy,
  6346. // that you want Elastic Transcoder to assign to the thumbnails that it stores
  6347. // in your Amazon S3 bucket.
  6348. ThumbnailConfig *PipelineOutputConfig `type:"structure"`
  6349. }
  6350. // String returns the string representation
  6351. func (s UpdatePipelineInput) String() string {
  6352. return awsutil.Prettify(s)
  6353. }
  6354. // GoString returns the string representation
  6355. func (s UpdatePipelineInput) GoString() string {
  6356. return s.String()
  6357. }
  6358. // Validate inspects the fields of the type to determine if they are valid.
  6359. func (s *UpdatePipelineInput) Validate() error {
  6360. invalidParams := request.ErrInvalidParams{Context: "UpdatePipelineInput"}
  6361. if s.Id == nil {
  6362. invalidParams.Add(request.NewErrParamRequired("Id"))
  6363. }
  6364. if s.Id != nil && len(*s.Id) < 1 {
  6365. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6366. }
  6367. if s.Name != nil && len(*s.Name) < 1 {
  6368. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  6369. }
  6370. if s.ContentConfig != nil {
  6371. if err := s.ContentConfig.Validate(); err != nil {
  6372. invalidParams.AddNested("ContentConfig", err.(request.ErrInvalidParams))
  6373. }
  6374. }
  6375. if s.ThumbnailConfig != nil {
  6376. if err := s.ThumbnailConfig.Validate(); err != nil {
  6377. invalidParams.AddNested("ThumbnailConfig", err.(request.ErrInvalidParams))
  6378. }
  6379. }
  6380. if invalidParams.Len() > 0 {
  6381. return invalidParams
  6382. }
  6383. return nil
  6384. }
  6385. // SetAwsKmsKeyArn sets the AwsKmsKeyArn field's value.
  6386. func (s *UpdatePipelineInput) SetAwsKmsKeyArn(v string) *UpdatePipelineInput {
  6387. s.AwsKmsKeyArn = &v
  6388. return s
  6389. }
  6390. // SetContentConfig sets the ContentConfig field's value.
  6391. func (s *UpdatePipelineInput) SetContentConfig(v *PipelineOutputConfig) *UpdatePipelineInput {
  6392. s.ContentConfig = v
  6393. return s
  6394. }
  6395. // SetId sets the Id field's value.
  6396. func (s *UpdatePipelineInput) SetId(v string) *UpdatePipelineInput {
  6397. s.Id = &v
  6398. return s
  6399. }
  6400. // SetInputBucket sets the InputBucket field's value.
  6401. func (s *UpdatePipelineInput) SetInputBucket(v string) *UpdatePipelineInput {
  6402. s.InputBucket = &v
  6403. return s
  6404. }
  6405. // SetName sets the Name field's value.
  6406. func (s *UpdatePipelineInput) SetName(v string) *UpdatePipelineInput {
  6407. s.Name = &v
  6408. return s
  6409. }
  6410. // SetNotifications sets the Notifications field's value.
  6411. func (s *UpdatePipelineInput) SetNotifications(v *Notifications) *UpdatePipelineInput {
  6412. s.Notifications = v
  6413. return s
  6414. }
  6415. // SetRole sets the Role field's value.
  6416. func (s *UpdatePipelineInput) SetRole(v string) *UpdatePipelineInput {
  6417. s.Role = &v
  6418. return s
  6419. }
  6420. // SetThumbnailConfig sets the ThumbnailConfig field's value.
  6421. func (s *UpdatePipelineInput) SetThumbnailConfig(v *PipelineOutputConfig) *UpdatePipelineInput {
  6422. s.ThumbnailConfig = v
  6423. return s
  6424. }
  6425. // The UpdatePipelineNotificationsRequest structure.
  6426. type UpdatePipelineNotificationsInput struct {
  6427. _ struct{} `type:"structure"`
  6428. // The identifier of the pipeline for which you want to change notification
  6429. // settings.
  6430. //
  6431. // Id is a required field
  6432. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6433. // The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic
  6434. // that you want to notify to report job status.
  6435. //
  6436. // To receive notifications, you must also subscribe to the new topic in the
  6437. // Amazon SNS console.
  6438. //
  6439. // * Progressing: The topic ARN for the Amazon Simple Notification Service
  6440. // (Amazon SNS) topic that you want to notify when Elastic Transcoder has
  6441. // started to process jobs that are added to this pipeline. This is the ARN
  6442. // that Amazon SNS returned when you created the topic.
  6443. //
  6444. // * Complete: The topic ARN for the Amazon SNS topic that you want to notify
  6445. // when Elastic Transcoder has finished processing a job. This is the ARN
  6446. // that Amazon SNS returned when you created the topic.
  6447. //
  6448. // * Warning: The topic ARN for the Amazon SNS topic that you want to notify
  6449. // when Elastic Transcoder encounters a warning condition. This is the ARN
  6450. // that Amazon SNS returned when you created the topic.
  6451. //
  6452. // * Error: The topic ARN for the Amazon SNS topic that you want to notify
  6453. // when Elastic Transcoder encounters an error condition. This is the ARN
  6454. // that Amazon SNS returned when you created the topic.
  6455. //
  6456. // Notifications is a required field
  6457. Notifications *Notifications `type:"structure" required:"true"`
  6458. }
  6459. // String returns the string representation
  6460. func (s UpdatePipelineNotificationsInput) String() string {
  6461. return awsutil.Prettify(s)
  6462. }
  6463. // GoString returns the string representation
  6464. func (s UpdatePipelineNotificationsInput) GoString() string {
  6465. return s.String()
  6466. }
  6467. // Validate inspects the fields of the type to determine if they are valid.
  6468. func (s *UpdatePipelineNotificationsInput) Validate() error {
  6469. invalidParams := request.ErrInvalidParams{Context: "UpdatePipelineNotificationsInput"}
  6470. if s.Id == nil {
  6471. invalidParams.Add(request.NewErrParamRequired("Id"))
  6472. }
  6473. if s.Id != nil && len(*s.Id) < 1 {
  6474. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6475. }
  6476. if s.Notifications == nil {
  6477. invalidParams.Add(request.NewErrParamRequired("Notifications"))
  6478. }
  6479. if invalidParams.Len() > 0 {
  6480. return invalidParams
  6481. }
  6482. return nil
  6483. }
  6484. // SetId sets the Id field's value.
  6485. func (s *UpdatePipelineNotificationsInput) SetId(v string) *UpdatePipelineNotificationsInput {
  6486. s.Id = &v
  6487. return s
  6488. }
  6489. // SetNotifications sets the Notifications field's value.
  6490. func (s *UpdatePipelineNotificationsInput) SetNotifications(v *Notifications) *UpdatePipelineNotificationsInput {
  6491. s.Notifications = v
  6492. return s
  6493. }
  6494. // The UpdatePipelineNotificationsResponse structure.
  6495. type UpdatePipelineNotificationsOutput struct {
  6496. _ struct{} `type:"structure"`
  6497. // A section of the response body that provides information about the pipeline
  6498. // associated with this notification.
  6499. Pipeline *Pipeline `type:"structure"`
  6500. }
  6501. // String returns the string representation
  6502. func (s UpdatePipelineNotificationsOutput) String() string {
  6503. return awsutil.Prettify(s)
  6504. }
  6505. // GoString returns the string representation
  6506. func (s UpdatePipelineNotificationsOutput) GoString() string {
  6507. return s.String()
  6508. }
  6509. // SetPipeline sets the Pipeline field's value.
  6510. func (s *UpdatePipelineNotificationsOutput) SetPipeline(v *Pipeline) *UpdatePipelineNotificationsOutput {
  6511. s.Pipeline = v
  6512. return s
  6513. }
  6514. // When you update a pipeline, Elastic Transcoder returns the values that you
  6515. // specified in the request.
  6516. type UpdatePipelineOutput struct {
  6517. _ struct{} `type:"structure"`
  6518. // The pipeline updated by this UpdatePipelineResponse call.
  6519. Pipeline *Pipeline `type:"structure"`
  6520. // Elastic Transcoder returns a warning if the resources used by your pipeline
  6521. // are not in the same region as the pipeline.
  6522. //
  6523. // Using resources in the same region, such as your Amazon S3 buckets, Amazon
  6524. // SNS notification topics, and AWS KMS key, reduces processing time and prevents
  6525. // cross-regional charges.
  6526. Warnings []*Warning `type:"list"`
  6527. }
  6528. // String returns the string representation
  6529. func (s UpdatePipelineOutput) String() string {
  6530. return awsutil.Prettify(s)
  6531. }
  6532. // GoString returns the string representation
  6533. func (s UpdatePipelineOutput) GoString() string {
  6534. return s.String()
  6535. }
  6536. // SetPipeline sets the Pipeline field's value.
  6537. func (s *UpdatePipelineOutput) SetPipeline(v *Pipeline) *UpdatePipelineOutput {
  6538. s.Pipeline = v
  6539. return s
  6540. }
  6541. // SetWarnings sets the Warnings field's value.
  6542. func (s *UpdatePipelineOutput) SetWarnings(v []*Warning) *UpdatePipelineOutput {
  6543. s.Warnings = v
  6544. return s
  6545. }
  6546. // The UpdatePipelineStatusRequest structure.
  6547. type UpdatePipelineStatusInput struct {
  6548. _ struct{} `type:"structure"`
  6549. // The identifier of the pipeline to update.
  6550. //
  6551. // Id is a required field
  6552. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6553. // The desired status of the pipeline:
  6554. //
  6555. // * Active: The pipeline is processing jobs.
  6556. //
  6557. // * Paused: The pipeline is not currently processing jobs.
  6558. //
  6559. // Status is a required field
  6560. Status *string `type:"string" required:"true"`
  6561. }
  6562. // String returns the string representation
  6563. func (s UpdatePipelineStatusInput) String() string {
  6564. return awsutil.Prettify(s)
  6565. }
  6566. // GoString returns the string representation
  6567. func (s UpdatePipelineStatusInput) GoString() string {
  6568. return s.String()
  6569. }
  6570. // Validate inspects the fields of the type to determine if they are valid.
  6571. func (s *UpdatePipelineStatusInput) Validate() error {
  6572. invalidParams := request.ErrInvalidParams{Context: "UpdatePipelineStatusInput"}
  6573. if s.Id == nil {
  6574. invalidParams.Add(request.NewErrParamRequired("Id"))
  6575. }
  6576. if s.Id != nil && len(*s.Id) < 1 {
  6577. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6578. }
  6579. if s.Status == nil {
  6580. invalidParams.Add(request.NewErrParamRequired("Status"))
  6581. }
  6582. if invalidParams.Len() > 0 {
  6583. return invalidParams
  6584. }
  6585. return nil
  6586. }
  6587. // SetId sets the Id field's value.
  6588. func (s *UpdatePipelineStatusInput) SetId(v string) *UpdatePipelineStatusInput {
  6589. s.Id = &v
  6590. return s
  6591. }
  6592. // SetStatus sets the Status field's value.
  6593. func (s *UpdatePipelineStatusInput) SetStatus(v string) *UpdatePipelineStatusInput {
  6594. s.Status = &v
  6595. return s
  6596. }
  6597. // When you update status for a pipeline, Elastic Transcoder returns the values
  6598. // that you specified in the request.
  6599. type UpdatePipelineStatusOutput struct {
  6600. _ struct{} `type:"structure"`
  6601. // A section of the response body that provides information about the pipeline.
  6602. Pipeline *Pipeline `type:"structure"`
  6603. }
  6604. // String returns the string representation
  6605. func (s UpdatePipelineStatusOutput) String() string {
  6606. return awsutil.Prettify(s)
  6607. }
  6608. // GoString returns the string representation
  6609. func (s UpdatePipelineStatusOutput) GoString() string {
  6610. return s.String()
  6611. }
  6612. // SetPipeline sets the Pipeline field's value.
  6613. func (s *UpdatePipelineStatusOutput) SetPipeline(v *Pipeline) *UpdatePipelineStatusOutput {
  6614. s.Pipeline = v
  6615. return s
  6616. }
  6617. // The VideoParameters structure.
  6618. type VideoParameters struct {
  6619. _ struct{} `type:"structure"`
  6620. // To better control resolution and aspect ratio of output videos, we recommend
  6621. // that you use the values MaxWidth, MaxHeight, SizingPolicy, PaddingPolicy,
  6622. // and DisplayAspectRatio instead of Resolution and AspectRatio. The two groups
  6623. // of settings are mutually exclusive. Do not use them together.
  6624. //
  6625. // The display aspect ratio of the video in the output file. Valid values include:
  6626. //
  6627. // auto, 1:1, 4:3, 3:2, 16:9
  6628. //
  6629. // If you specify auto, Elastic Transcoder tries to preserve the aspect ratio
  6630. // of the input file.
  6631. //
  6632. // If you specify an aspect ratio for the output file that differs from aspect
  6633. // ratio of the input file, Elastic Transcoder adds pillarboxing (black bars
  6634. // on the sides) or letterboxing (black bars on the top and bottom) to maintain
  6635. // the aspect ratio of the active region of the video.
  6636. AspectRatio *string `type:"string"`
  6637. // The bit rate of the video stream in the output file, in kilobits/second.
  6638. // Valid values depend on the values of Level and Profile. If you specify auto,
  6639. // Elastic Transcoder uses the detected bit rate of the input source. If you
  6640. // specify a value other than auto, we recommend that you specify a value less
  6641. // than or equal to the maximum H.264-compliant value listed for your level
  6642. // and profile:
  6643. //
  6644. // Level - Maximum video bit rate in kilobits/second (baseline and main Profile)
  6645. // : maximum video bit rate in kilobits/second (high Profile)
  6646. //
  6647. // * 1 - 64 : 80
  6648. //
  6649. // * 1b - 128 : 160
  6650. //
  6651. // * 1.1 - 192 : 240
  6652. //
  6653. // * 1.2 - 384 : 480
  6654. //
  6655. // * 1.3 - 768 : 960
  6656. //
  6657. // * 2 - 2000 : 2500
  6658. //
  6659. // * 3 - 10000 : 12500
  6660. //
  6661. // * 3.1 - 14000 : 17500
  6662. //
  6663. // * 3.2 - 20000 : 25000
  6664. //
  6665. // * 4 - 20000 : 25000
  6666. //
  6667. // * 4.1 - 50000 : 62500
  6668. BitRate *string `type:"string"`
  6669. // The video codec for the output file. Valid values include gif, H.264, mpeg2,
  6670. // vp8, and vp9. You can only specify vp8 and vp9 when the container type is
  6671. // webm, gif when the container type is gif, and mpeg2 when the container type
  6672. // is mpg.
  6673. Codec *string `type:"string"`
  6674. // Profile (H.264/VP8/VP9 Only)
  6675. //
  6676. // The H.264 profile that you want to use for the output file. Elastic Transcoder
  6677. // supports the following profiles:
  6678. //
  6679. // * baseline: The profile most commonly used for videoconferencing and for
  6680. // mobile applications.
  6681. //
  6682. // * main: The profile used for standard-definition digital TV broadcasts.
  6683. //
  6684. // * high: The profile used for high-definition digital TV broadcasts and
  6685. // for Blu-ray discs.
  6686. //
  6687. // Level (H.264 Only)
  6688. //
  6689. // The H.264 level that you want to use for the output file. Elastic Transcoder
  6690. // supports the following levels:
  6691. //
  6692. // 1, 1b, 1.1, 1.2, 1.3, 2, 2.1, 2.2, 3, 3.1, 3.2, 4, 4.1
  6693. //
  6694. // MaxReferenceFrames (H.264 Only)
  6695. //
  6696. // Applicable only when the value of Video:Codec is H.264. The maximum number
  6697. // of previously decoded frames to use as a reference for decoding future frames.
  6698. // Valid values are integers 0 through 16, but we recommend that you not use
  6699. // a value greater than the following:
  6700. //
  6701. // Min(Floor(Maximum decoded picture buffer in macroblocks * 256 / (Width in
  6702. // pixels * Height in pixels)), 16)
  6703. //
  6704. // where Width in pixels and Height in pixels represent either MaxWidth and
  6705. // MaxHeight, or Resolution. Maximum decoded picture buffer in macroblocks depends
  6706. // on the value of the Level object. See the list below. (A macroblock is a
  6707. // block of pixels measuring 16x16.)
  6708. //
  6709. // * 1 - 396
  6710. //
  6711. // * 1b - 396
  6712. //
  6713. // * 1.1 - 900
  6714. //
  6715. // * 1.2 - 2376
  6716. //
  6717. // * 1.3 - 2376
  6718. //
  6719. // * 2 - 2376
  6720. //
  6721. // * 2.1 - 4752
  6722. //
  6723. // * 2.2 - 8100
  6724. //
  6725. // * 3 - 8100
  6726. //
  6727. // * 3.1 - 18000
  6728. //
  6729. // * 3.2 - 20480
  6730. //
  6731. // * 4 - 32768
  6732. //
  6733. // * 4.1 - 32768
  6734. //
  6735. // MaxBitRate (Optional, H.264/MPEG2/VP8/VP9 only)
  6736. //
  6737. // The maximum number of bits per second in a video buffer; the size of the
  6738. // buffer is specified by BufferSize. Specify a value between 16 and 62,500.
  6739. // You can reduce the bandwidth required to stream a video by reducing the maximum
  6740. // bit rate, but this also reduces the quality of the video.
  6741. //
  6742. // BufferSize (Optional, H.264/MPEG2/VP8/VP9 only)
  6743. //
  6744. // The maximum number of bits in any x seconds of the output video. This window
  6745. // is commonly 10 seconds, the standard segment duration when you're using FMP4
  6746. // or MPEG-TS for the container type of the output video. Specify an integer
  6747. // greater than 0. If you specify MaxBitRate and omit BufferSize, Elastic Transcoder
  6748. // sets BufferSize to 10 times the value of MaxBitRate.
  6749. //
  6750. // InterlacedMode (Optional, H.264/MPEG2 Only)
  6751. //
  6752. // The interlace mode for the output video.
  6753. //
  6754. // Interlaced video is used to double the perceived frame rate for a video by
  6755. // interlacing two fields (one field on every other line, the other field on
  6756. // the other lines) so that the human eye registers multiple pictures per frame.
  6757. // Interlacing reduces the bandwidth required for transmitting a video, but
  6758. // can result in blurred images and flickering.
  6759. //
  6760. // Valid values include Progressive (no interlacing, top to bottom), TopFirst
  6761. // (top field first), BottomFirst (bottom field first), and Auto.
  6762. //
  6763. // If InterlaceMode is not specified, Elastic Transcoder uses Progressive for
  6764. // the output. If Auto is specified, Elastic Transcoder interlaces the output.
  6765. //
  6766. // ColorSpaceConversionMode (Optional, H.264/MPEG2 Only)
  6767. //
  6768. // The color space conversion Elastic Transcoder applies to the output video.
  6769. // Color spaces are the algorithms used by the computer to store information
  6770. // about how to render color. Bt.601 is the standard for standard definition
  6771. // video, while Bt.709 is the standard for high definition video.
  6772. //
  6773. // Valid values include None, Bt709toBt601, Bt601toBt709, and Auto.
  6774. //
  6775. // If you chose Auto for ColorSpaceConversionMode and your output is interlaced,
  6776. // your frame rate is one of 23.97, 24, 25, 29.97, 50, or 60, your SegmentDuration
  6777. // is null, and you are using one of the resolution changes from the list below,
  6778. // Elastic Transcoder applies the following color space conversions:
  6779. //
  6780. // * Standard to HD, 720x480 to 1920x1080 - Elastic Transcoder applies Bt601ToBt709
  6781. //
  6782. // * Standard to HD, 720x576 to 1920x1080 - Elastic Transcoder applies Bt601ToBt709
  6783. //
  6784. // * HD to Standard, 1920x1080 to 720x480 - Elastic Transcoder applies Bt709ToBt601
  6785. //
  6786. // * HD to Standard, 1920x1080 to 720x576 - Elastic Transcoder applies Bt709ToBt601
  6787. //
  6788. // Elastic Transcoder may change the behavior of the ColorspaceConversionModeAuto
  6789. // mode in the future. All outputs in a playlist must use the same ColorSpaceConversionMode.
  6790. //
  6791. // If you do not specify a ColorSpaceConversionMode, Elastic Transcoder does
  6792. // not change the color space of a file. If you are unsure what ColorSpaceConversionMode
  6793. // was applied to your output file, you can check the AppliedColorSpaceConversion
  6794. // parameter included in your job response. If your job does not have an AppliedColorSpaceConversion
  6795. // in its response, no ColorSpaceConversionMode was applied.
  6796. //
  6797. // ChromaSubsampling
  6798. //
  6799. // The sampling pattern for the chroma (color) channels of the output video.
  6800. // Valid values include yuv420p and yuv422p.
  6801. //
  6802. // yuv420p samples the chroma information of every other horizontal and every
  6803. // other vertical line, yuv422p samples the color information of every horizontal
  6804. // line and every other vertical line.
  6805. //
  6806. // LoopCount (Gif Only)
  6807. //
  6808. // The number of times you want the output gif to loop. Valid values include
  6809. // Infinite and integers between 0 and 100, inclusive.
  6810. CodecOptions map[string]*string `type:"map"`
  6811. // The value that Elastic Transcoder adds to the metadata in the output file.
  6812. DisplayAspectRatio *string `type:"string"`
  6813. // Applicable only when the value of Video:Codec is one of H.264, MPEG2, or
  6814. // VP8.
  6815. //
  6816. // Whether to use a fixed value for FixedGOP. Valid values are true and false:
  6817. //
  6818. // * true: Elastic Transcoder uses the value of KeyframesMaxDist for the
  6819. // distance between key frames (the number of frames in a group of pictures,
  6820. // or GOP).
  6821. //
  6822. // * false: The distance between key frames can vary.
  6823. //
  6824. // FixedGOP must be set to true for fmp4 containers.
  6825. FixedGOP *string `type:"string"`
  6826. // The frames per second for the video stream in the output file. Valid values
  6827. // include:
  6828. //
  6829. // auto, 10, 15, 23.97, 24, 25, 29.97, 30, 60
  6830. //
  6831. // If you specify auto, Elastic Transcoder uses the detected frame rate of the
  6832. // input source. If you specify a frame rate, we recommend that you perform
  6833. // the following calculation:
  6834. //
  6835. // Frame rate = maximum recommended decoding speed in luma samples/second /
  6836. // (width in pixels * height in pixels)
  6837. //
  6838. // where:
  6839. //
  6840. // * width in pixels and height in pixels represent the Resolution of the
  6841. // output video.
  6842. //
  6843. // * maximum recommended decoding speed in Luma samples/second is less than
  6844. // or equal to the maximum value listed in the following table, based on
  6845. // the value that you specified for Level.
  6846. //
  6847. // The maximum recommended decoding speed in Luma samples/second for each level
  6848. // is described in the following list (Level - Decoding speed):
  6849. //
  6850. // * 1 - 380160
  6851. //
  6852. // * 1b - 380160
  6853. //
  6854. // * 1.1 - 76800
  6855. //
  6856. // * 1.2 - 1536000
  6857. //
  6858. // * 1.3 - 3041280
  6859. //
  6860. // * 2 - 3041280
  6861. //
  6862. // * 2.1 - 5068800
  6863. //
  6864. // * 2.2 - 5184000
  6865. //
  6866. // * 3 - 10368000
  6867. //
  6868. // * 3.1 - 27648000
  6869. //
  6870. // * 3.2 - 55296000
  6871. //
  6872. // * 4 - 62914560
  6873. //
  6874. // * 4.1 - 62914560
  6875. FrameRate *string `type:"string"`
  6876. // Applicable only when the value of Video:Codec is one of H.264, MPEG2, or
  6877. // VP8.
  6878. //
  6879. // The maximum number of frames between key frames. Key frames are fully encoded
  6880. // frames; the frames between key frames are encoded based, in part, on the
  6881. // content of the key frames. The value is an integer formatted as a string;
  6882. // valid values are between 1 (every frame is a key frame) and 100000, inclusive.
  6883. // A higher value results in higher compression but may also discernibly decrease
  6884. // video quality.
  6885. //
  6886. // For Smooth outputs, the FrameRate must have a constant ratio to the KeyframesMaxDist.
  6887. // This allows Smooth playlists to switch between different quality levels while
  6888. // the file is being played.
  6889. //
  6890. // For example, an input file can have a FrameRate of 30 with a KeyframesMaxDist
  6891. // of 90. The output file then needs to have a ratio of 1:3. Valid outputs would
  6892. // have FrameRate of 30, 25, and 10, and KeyframesMaxDist of 90, 75, and 30,
  6893. // respectively.
  6894. //
  6895. // Alternately, this can be achieved by setting FrameRate to auto and having
  6896. // the same values for MaxFrameRate and KeyframesMaxDist.
  6897. KeyframesMaxDist *string `type:"string"`
  6898. // If you specify auto for FrameRate, Elastic Transcoder uses the frame rate
  6899. // of the input video for the frame rate of the output video. Specify the maximum
  6900. // frame rate that you want Elastic Transcoder to use when the frame rate of
  6901. // the input video is greater than the desired maximum frame rate of the output
  6902. // video. Valid values include: 10, 15, 23.97, 24, 25, 29.97, 30, 60.
  6903. MaxFrameRate *string `type:"string"`
  6904. // The maximum height of the output video in pixels. If you specify auto, Elastic
  6905. // Transcoder uses 1080 (Full HD) as the default value. If you specify a numeric
  6906. // value, enter an even integer between 96 and 3072.
  6907. MaxHeight *string `type:"string"`
  6908. // The maximum width of the output video in pixels. If you specify auto, Elastic
  6909. // Transcoder uses 1920 (Full HD) as the default value. If you specify a numeric
  6910. // value, enter an even integer between 128 and 4096.
  6911. MaxWidth *string `type:"string"`
  6912. // When you set PaddingPolicy to Pad, Elastic Transcoder may add black bars
  6913. // to the top and bottom and/or left and right sides of the output video to
  6914. // make the total size of the output video match the values that you specified
  6915. // for MaxWidth and MaxHeight.
  6916. PaddingPolicy *string `type:"string"`
  6917. // To better control resolution and aspect ratio of output videos, we recommend
  6918. // that you use the values MaxWidth, MaxHeight, SizingPolicy, PaddingPolicy,
  6919. // and DisplayAspectRatio instead of Resolution and AspectRatio. The two groups
  6920. // of settings are mutually exclusive. Do not use them together.
  6921. //
  6922. // The width and height of the video in the output file, in pixels. Valid values
  6923. // are auto and width x height:
  6924. //
  6925. // * auto: Elastic Transcoder attempts to preserve the width and height of
  6926. // the input file, subject to the following rules.
  6927. //
  6928. // * width x height: The width and height of the output video in pixels.
  6929. //
  6930. // Note the following about specifying the width and height:
  6931. //
  6932. // * The width must be an even integer between 128 and 4096, inclusive.
  6933. //
  6934. // * The height must be an even integer between 96 and 3072, inclusive.
  6935. //
  6936. // * If you specify a resolution that is less than the resolution of the
  6937. // input file, Elastic Transcoder rescales the output file to the lower resolution.
  6938. //
  6939. // * If you specify a resolution that is greater than the resolution of the
  6940. // input file, Elastic Transcoder rescales the output to the higher resolution.
  6941. //
  6942. // * We recommend that you specify a resolution for which the product of
  6943. // width and height is less than or equal to the applicable value in the
  6944. // following list (List - Max width x height value):
  6945. //
  6946. // 1 - 25344
  6947. //
  6948. // 1b - 25344
  6949. //
  6950. // 1.1 - 101376
  6951. //
  6952. // 1.2 - 101376
  6953. //
  6954. // 1.3 - 101376
  6955. //
  6956. // 2 - 101376
  6957. //
  6958. // 2.1 - 202752
  6959. //
  6960. // 2.2 - 404720
  6961. //
  6962. // 3 - 404720
  6963. //
  6964. // 3.1 - 921600
  6965. //
  6966. // 3.2 - 1310720
  6967. //
  6968. // 4 - 2097152
  6969. //
  6970. // 4.1 - 2097152
  6971. Resolution *string `type:"string"`
  6972. // Specify one of the following values to control scaling of the output video:
  6973. //
  6974. // * Fit: Elastic Transcoder scales the output video so it matches the value
  6975. // that you specified in either MaxWidth or MaxHeight without exceeding the
  6976. // other value.
  6977. //
  6978. // * Fill: Elastic Transcoder scales the output video so it matches the value
  6979. // that you specified in either MaxWidth or MaxHeight and matches or exceeds
  6980. // the other value. Elastic Transcoder centers the output video and then
  6981. // crops it in the dimension (if any) that exceeds the maximum value.
  6982. //
  6983. // * Stretch: Elastic Transcoder stretches the output video to match the
  6984. // values that you specified for MaxWidth and MaxHeight. If the relative
  6985. // proportions of the input video and the output video are different, the
  6986. // output video will be distorted.
  6987. //
  6988. // * Keep: Elastic Transcoder does not scale the output video. If either
  6989. // dimension of the input video exceeds the values that you specified for
  6990. // MaxWidth and MaxHeight, Elastic Transcoder crops the output video.
  6991. //
  6992. // * ShrinkToFit: Elastic Transcoder scales the output video down so that
  6993. // its dimensions match the values that you specified for at least one of
  6994. // MaxWidth and MaxHeight without exceeding either value. If you specify
  6995. // this option, Elastic Transcoder does not scale the video up.
  6996. //
  6997. // * ShrinkToFill: Elastic Transcoder scales the output video down so that
  6998. // its dimensions match the values that you specified for at least one of
  6999. // MaxWidth and MaxHeight without dropping below either value. If you specify
  7000. // this option, Elastic Transcoder does not scale the video up.
  7001. SizingPolicy *string `type:"string"`
  7002. // Settings for the size, location, and opacity of graphics that you want Elastic
  7003. // Transcoder to overlay over videos that are transcoded using this preset.
  7004. // You can specify settings for up to four watermarks. Watermarks appear in
  7005. // the specified size and location, and with the specified opacity for the duration
  7006. // of the transcoded video.
  7007. //
  7008. // Watermarks can be in .png or .jpg format. If you want to display a watermark
  7009. // that is not rectangular, use the .png format, which supports transparency.
  7010. //
  7011. // When you create a job that uses this preset, you specify the .png or .jpg
  7012. // graphics that you want Elastic Transcoder to include in the transcoded videos.
  7013. // You can specify fewer graphics in the job than you specify watermark settings
  7014. // in the preset, which allows you to use the same preset for up to four watermarks
  7015. // that have different dimensions.
  7016. Watermarks []*PresetWatermark `type:"list"`
  7017. }
  7018. // String returns the string representation
  7019. func (s VideoParameters) String() string {
  7020. return awsutil.Prettify(s)
  7021. }
  7022. // GoString returns the string representation
  7023. func (s VideoParameters) GoString() string {
  7024. return s.String()
  7025. }
  7026. // Validate inspects the fields of the type to determine if they are valid.
  7027. func (s *VideoParameters) Validate() error {
  7028. invalidParams := request.ErrInvalidParams{Context: "VideoParameters"}
  7029. if s.Watermarks != nil {
  7030. for i, v := range s.Watermarks {
  7031. if v == nil {
  7032. continue
  7033. }
  7034. if err := v.Validate(); err != nil {
  7035. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Watermarks", i), err.(request.ErrInvalidParams))
  7036. }
  7037. }
  7038. }
  7039. if invalidParams.Len() > 0 {
  7040. return invalidParams
  7041. }
  7042. return nil
  7043. }
  7044. // SetAspectRatio sets the AspectRatio field's value.
  7045. func (s *VideoParameters) SetAspectRatio(v string) *VideoParameters {
  7046. s.AspectRatio = &v
  7047. return s
  7048. }
  7049. // SetBitRate sets the BitRate field's value.
  7050. func (s *VideoParameters) SetBitRate(v string) *VideoParameters {
  7051. s.BitRate = &v
  7052. return s
  7053. }
  7054. // SetCodec sets the Codec field's value.
  7055. func (s *VideoParameters) SetCodec(v string) *VideoParameters {
  7056. s.Codec = &v
  7057. return s
  7058. }
  7059. // SetCodecOptions sets the CodecOptions field's value.
  7060. func (s *VideoParameters) SetCodecOptions(v map[string]*string) *VideoParameters {
  7061. s.CodecOptions = v
  7062. return s
  7063. }
  7064. // SetDisplayAspectRatio sets the DisplayAspectRatio field's value.
  7065. func (s *VideoParameters) SetDisplayAspectRatio(v string) *VideoParameters {
  7066. s.DisplayAspectRatio = &v
  7067. return s
  7068. }
  7069. // SetFixedGOP sets the FixedGOP field's value.
  7070. func (s *VideoParameters) SetFixedGOP(v string) *VideoParameters {
  7071. s.FixedGOP = &v
  7072. return s
  7073. }
  7074. // SetFrameRate sets the FrameRate field's value.
  7075. func (s *VideoParameters) SetFrameRate(v string) *VideoParameters {
  7076. s.FrameRate = &v
  7077. return s
  7078. }
  7079. // SetKeyframesMaxDist sets the KeyframesMaxDist field's value.
  7080. func (s *VideoParameters) SetKeyframesMaxDist(v string) *VideoParameters {
  7081. s.KeyframesMaxDist = &v
  7082. return s
  7083. }
  7084. // SetMaxFrameRate sets the MaxFrameRate field's value.
  7085. func (s *VideoParameters) SetMaxFrameRate(v string) *VideoParameters {
  7086. s.MaxFrameRate = &v
  7087. return s
  7088. }
  7089. // SetMaxHeight sets the MaxHeight field's value.
  7090. func (s *VideoParameters) SetMaxHeight(v string) *VideoParameters {
  7091. s.MaxHeight = &v
  7092. return s
  7093. }
  7094. // SetMaxWidth sets the MaxWidth field's value.
  7095. func (s *VideoParameters) SetMaxWidth(v string) *VideoParameters {
  7096. s.MaxWidth = &v
  7097. return s
  7098. }
  7099. // SetPaddingPolicy sets the PaddingPolicy field's value.
  7100. func (s *VideoParameters) SetPaddingPolicy(v string) *VideoParameters {
  7101. s.PaddingPolicy = &v
  7102. return s
  7103. }
  7104. // SetResolution sets the Resolution field's value.
  7105. func (s *VideoParameters) SetResolution(v string) *VideoParameters {
  7106. s.Resolution = &v
  7107. return s
  7108. }
  7109. // SetSizingPolicy sets the SizingPolicy field's value.
  7110. func (s *VideoParameters) SetSizingPolicy(v string) *VideoParameters {
  7111. s.SizingPolicy = &v
  7112. return s
  7113. }
  7114. // SetWatermarks sets the Watermarks field's value.
  7115. func (s *VideoParameters) SetWatermarks(v []*PresetWatermark) *VideoParameters {
  7116. s.Watermarks = v
  7117. return s
  7118. }
  7119. // Elastic Transcoder returns a warning if the resources used by your pipeline
  7120. // are not in the same region as the pipeline.
  7121. //
  7122. // Using resources in the same region, such as your Amazon S3 buckets, Amazon
  7123. // SNS notification topics, and AWS KMS key, reduces processing time and prevents
  7124. // cross-regional charges.
  7125. type Warning struct {
  7126. _ struct{} `type:"structure"`
  7127. // The code of the cross-regional warning.
  7128. Code *string `type:"string"`
  7129. // The message explaining what resources are in a different region from the
  7130. // pipeline.
  7131. //
  7132. // AWS KMS keys must be in the same region as the pipeline.
  7133. Message *string `type:"string"`
  7134. }
  7135. // String returns the string representation
  7136. func (s Warning) String() string {
  7137. return awsutil.Prettify(s)
  7138. }
  7139. // GoString returns the string representation
  7140. func (s Warning) GoString() string {
  7141. return s.String()
  7142. }
  7143. // SetCode sets the Code field's value.
  7144. func (s *Warning) SetCode(v string) *Warning {
  7145. s.Code = &v
  7146. return s
  7147. }
  7148. // SetMessage sets the Message field's value.
  7149. func (s *Warning) SetMessage(v string) *Warning {
  7150. s.Message = &v
  7151. return s
  7152. }