api.go 309 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package machinelearning
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. )
  10. const opAddTags = "AddTags"
  11. // AddTagsRequest generates a "aws/request.Request" representing the
  12. // client's request for the AddTags operation. The "output" return
  13. // value will be populated with the request's response once the request completes
  14. // successfully.
  15. //
  16. // Use "Send" method on the returned Request to send the API call to the service.
  17. // the "output" return value is not valid until after Send returns without error.
  18. //
  19. // See AddTags for more information on using the AddTags
  20. // API call, and error handling.
  21. //
  22. // This method is useful when you want to inject custom logic or configuration
  23. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  24. //
  25. //
  26. // // Example sending a request using the AddTagsRequest method.
  27. // req, resp := client.AddTagsRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. func (c *MachineLearning) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
  34. op := &request.Operation{
  35. Name: opAddTags,
  36. HTTPMethod: "POST",
  37. HTTPPath: "/",
  38. }
  39. if input == nil {
  40. input = &AddTagsInput{}
  41. }
  42. output = &AddTagsOutput{}
  43. req = c.newRequest(op, input, output)
  44. return
  45. }
  46. // AddTags API operation for Amazon Machine Learning.
  47. //
  48. // Adds one or more tags to an object, up to a limit of 10. Each tag consists
  49. // of a key and an optional value. If you add a tag using a key that is already
  50. // associated with the ML object, AddTags updates the tag's value.
  51. //
  52. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  53. // with awserr.Error's Code and Message methods to get detailed information about
  54. // the error.
  55. //
  56. // See the AWS API reference guide for Amazon Machine Learning's
  57. // API operation AddTags for usage and error information.
  58. //
  59. // Returned Error Codes:
  60. // * ErrCodeInvalidInputException "InvalidInputException"
  61. // An error on the client occurred. Typically, the cause is an invalid input
  62. // value.
  63. //
  64. // * ErrCodeInvalidTagException "InvalidTagException"
  65. //
  66. // * ErrCodeTagLimitExceededException "TagLimitExceededException"
  67. //
  68. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  69. // A specified resource cannot be located.
  70. //
  71. // * ErrCodeInternalServerException "InternalServerException"
  72. // An error on the server occurred when trying to process a request.
  73. //
  74. func (c *MachineLearning) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
  75. req, out := c.AddTagsRequest(input)
  76. return out, req.Send()
  77. }
  78. // AddTagsWithContext is the same as AddTags with the addition of
  79. // the ability to pass a context and additional request options.
  80. //
  81. // See AddTags for details on how to use this API operation.
  82. //
  83. // The context must be non-nil and will be used for request cancellation. If
  84. // the context is nil a panic will occur. In the future the SDK may create
  85. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  86. // for more information on using Contexts.
  87. func (c *MachineLearning) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) {
  88. req, out := c.AddTagsRequest(input)
  89. req.SetContext(ctx)
  90. req.ApplyOptions(opts...)
  91. return out, req.Send()
  92. }
  93. const opCreateBatchPrediction = "CreateBatchPrediction"
  94. // CreateBatchPredictionRequest generates a "aws/request.Request" representing the
  95. // client's request for the CreateBatchPrediction operation. The "output" return
  96. // value will be populated with the request's response once the request completes
  97. // successfully.
  98. //
  99. // Use "Send" method on the returned Request to send the API call to the service.
  100. // the "output" return value is not valid until after Send returns without error.
  101. //
  102. // See CreateBatchPrediction for more information on using the CreateBatchPrediction
  103. // API call, and error handling.
  104. //
  105. // This method is useful when you want to inject custom logic or configuration
  106. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  107. //
  108. //
  109. // // Example sending a request using the CreateBatchPredictionRequest method.
  110. // req, resp := client.CreateBatchPredictionRequest(params)
  111. //
  112. // err := req.Send()
  113. // if err == nil { // resp is now filled
  114. // fmt.Println(resp)
  115. // }
  116. func (c *MachineLearning) CreateBatchPredictionRequest(input *CreateBatchPredictionInput) (req *request.Request, output *CreateBatchPredictionOutput) {
  117. op := &request.Operation{
  118. Name: opCreateBatchPrediction,
  119. HTTPMethod: "POST",
  120. HTTPPath: "/",
  121. }
  122. if input == nil {
  123. input = &CreateBatchPredictionInput{}
  124. }
  125. output = &CreateBatchPredictionOutput{}
  126. req = c.newRequest(op, input, output)
  127. return
  128. }
  129. // CreateBatchPrediction API operation for Amazon Machine Learning.
  130. //
  131. // Generates predictions for a group of observations. The observations to process
  132. // exist in one or more data files referenced by a DataSource. This operation
  133. // creates a new BatchPrediction, and uses an MLModel and the data files referenced
  134. // by the DataSource as information sources.
  135. //
  136. // CreateBatchPrediction is an asynchronous operation. In response to CreateBatchPrediction,
  137. // Amazon Machine Learning (Amazon ML) immediately returns and sets the BatchPrediction
  138. // status to PENDING. After the BatchPrediction completes, Amazon ML sets the
  139. // status to COMPLETED.
  140. //
  141. // You can poll for status updates by using the GetBatchPrediction operation
  142. // and checking the Status parameter of the result. After the COMPLETED status
  143. // appears, the results are available in the location specified by the OutputUri
  144. // parameter.
  145. //
  146. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  147. // with awserr.Error's Code and Message methods to get detailed information about
  148. // the error.
  149. //
  150. // See the AWS API reference guide for Amazon Machine Learning's
  151. // API operation CreateBatchPrediction for usage and error information.
  152. //
  153. // Returned Error Codes:
  154. // * ErrCodeInvalidInputException "InvalidInputException"
  155. // An error on the client occurred. Typically, the cause is an invalid input
  156. // value.
  157. //
  158. // * ErrCodeInternalServerException "InternalServerException"
  159. // An error on the server occurred when trying to process a request.
  160. //
  161. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  162. // A second request to use or change an object was not allowed. This can result
  163. // from retrying a request using a parameter that was not present in the original
  164. // request.
  165. //
  166. func (c *MachineLearning) CreateBatchPrediction(input *CreateBatchPredictionInput) (*CreateBatchPredictionOutput, error) {
  167. req, out := c.CreateBatchPredictionRequest(input)
  168. return out, req.Send()
  169. }
  170. // CreateBatchPredictionWithContext is the same as CreateBatchPrediction with the addition of
  171. // the ability to pass a context and additional request options.
  172. //
  173. // See CreateBatchPrediction for details on how to use this API operation.
  174. //
  175. // The context must be non-nil and will be used for request cancellation. If
  176. // the context is nil a panic will occur. In the future the SDK may create
  177. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  178. // for more information on using Contexts.
  179. func (c *MachineLearning) CreateBatchPredictionWithContext(ctx aws.Context, input *CreateBatchPredictionInput, opts ...request.Option) (*CreateBatchPredictionOutput, error) {
  180. req, out := c.CreateBatchPredictionRequest(input)
  181. req.SetContext(ctx)
  182. req.ApplyOptions(opts...)
  183. return out, req.Send()
  184. }
  185. const opCreateDataSourceFromRDS = "CreateDataSourceFromRDS"
  186. // CreateDataSourceFromRDSRequest generates a "aws/request.Request" representing the
  187. // client's request for the CreateDataSourceFromRDS operation. The "output" return
  188. // value will be populated with the request's response once the request completes
  189. // successfully.
  190. //
  191. // Use "Send" method on the returned Request to send the API call to the service.
  192. // the "output" return value is not valid until after Send returns without error.
  193. //
  194. // See CreateDataSourceFromRDS for more information on using the CreateDataSourceFromRDS
  195. // API call, and error handling.
  196. //
  197. // This method is useful when you want to inject custom logic or configuration
  198. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  199. //
  200. //
  201. // // Example sending a request using the CreateDataSourceFromRDSRequest method.
  202. // req, resp := client.CreateDataSourceFromRDSRequest(params)
  203. //
  204. // err := req.Send()
  205. // if err == nil { // resp is now filled
  206. // fmt.Println(resp)
  207. // }
  208. func (c *MachineLearning) CreateDataSourceFromRDSRequest(input *CreateDataSourceFromRDSInput) (req *request.Request, output *CreateDataSourceFromRDSOutput) {
  209. op := &request.Operation{
  210. Name: opCreateDataSourceFromRDS,
  211. HTTPMethod: "POST",
  212. HTTPPath: "/",
  213. }
  214. if input == nil {
  215. input = &CreateDataSourceFromRDSInput{}
  216. }
  217. output = &CreateDataSourceFromRDSOutput{}
  218. req = c.newRequest(op, input, output)
  219. return
  220. }
  221. // CreateDataSourceFromRDS API operation for Amazon Machine Learning.
  222. //
  223. // Creates a DataSource object from an Amazon Relational Database Service (http://aws.amazon.com/rds/)
  224. // (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel,
  225. // CreateEvaluation, or CreateBatchPrediction operations.
  226. //
  227. // CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS,
  228. // Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource
  229. // status to PENDING. After the DataSource is created and ready for use, Amazon
  230. // ML sets the Status parameter to COMPLETED. DataSource in the COMPLETED or
  231. // PENDING state can be used only to perform >CreateMLModel>, CreateEvaluation,
  232. // or CreateBatchPrediction operations.
  233. //
  234. // If Amazon ML cannot accept the input source, it sets the Status parameter
  235. // to FAILED and includes an error message in the Message attribute of the GetDataSource
  236. // operation response.
  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 Machine Learning's
  243. // API operation CreateDataSourceFromRDS for usage and error information.
  244. //
  245. // Returned Error Codes:
  246. // * ErrCodeInvalidInputException "InvalidInputException"
  247. // An error on the client occurred. Typically, the cause is an invalid input
  248. // value.
  249. //
  250. // * ErrCodeInternalServerException "InternalServerException"
  251. // An error on the server occurred when trying to process a request.
  252. //
  253. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  254. // A second request to use or change an object was not allowed. This can result
  255. // from retrying a request using a parameter that was not present in the original
  256. // request.
  257. //
  258. func (c *MachineLearning) CreateDataSourceFromRDS(input *CreateDataSourceFromRDSInput) (*CreateDataSourceFromRDSOutput, error) {
  259. req, out := c.CreateDataSourceFromRDSRequest(input)
  260. return out, req.Send()
  261. }
  262. // CreateDataSourceFromRDSWithContext is the same as CreateDataSourceFromRDS with the addition of
  263. // the ability to pass a context and additional request options.
  264. //
  265. // See CreateDataSourceFromRDS for details on how to use this API operation.
  266. //
  267. // The context must be non-nil and will be used for request cancellation. If
  268. // the context is nil a panic will occur. In the future the SDK may create
  269. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  270. // for more information on using Contexts.
  271. func (c *MachineLearning) CreateDataSourceFromRDSWithContext(ctx aws.Context, input *CreateDataSourceFromRDSInput, opts ...request.Option) (*CreateDataSourceFromRDSOutput, error) {
  272. req, out := c.CreateDataSourceFromRDSRequest(input)
  273. req.SetContext(ctx)
  274. req.ApplyOptions(opts...)
  275. return out, req.Send()
  276. }
  277. const opCreateDataSourceFromRedshift = "CreateDataSourceFromRedshift"
  278. // CreateDataSourceFromRedshiftRequest generates a "aws/request.Request" representing the
  279. // client's request for the CreateDataSourceFromRedshift operation. The "output" return
  280. // value will be populated with the request's response once the request completes
  281. // successfully.
  282. //
  283. // Use "Send" method on the returned Request to send the API call to the service.
  284. // the "output" return value is not valid until after Send returns without error.
  285. //
  286. // See CreateDataSourceFromRedshift for more information on using the CreateDataSourceFromRedshift
  287. // API call, and error handling.
  288. //
  289. // This method is useful when you want to inject custom logic or configuration
  290. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  291. //
  292. //
  293. // // Example sending a request using the CreateDataSourceFromRedshiftRequest method.
  294. // req, resp := client.CreateDataSourceFromRedshiftRequest(params)
  295. //
  296. // err := req.Send()
  297. // if err == nil { // resp is now filled
  298. // fmt.Println(resp)
  299. // }
  300. func (c *MachineLearning) CreateDataSourceFromRedshiftRequest(input *CreateDataSourceFromRedshiftInput) (req *request.Request, output *CreateDataSourceFromRedshiftOutput) {
  301. op := &request.Operation{
  302. Name: opCreateDataSourceFromRedshift,
  303. HTTPMethod: "POST",
  304. HTTPPath: "/",
  305. }
  306. if input == nil {
  307. input = &CreateDataSourceFromRedshiftInput{}
  308. }
  309. output = &CreateDataSourceFromRedshiftOutput{}
  310. req = c.newRequest(op, input, output)
  311. return
  312. }
  313. // CreateDataSourceFromRedshift API operation for Amazon Machine Learning.
  314. //
  315. // Creates a DataSource from a database hosted on an Amazon Redshift cluster.
  316. // A DataSource references data that can be used to perform either CreateMLModel,
  317. // CreateEvaluation, or CreateBatchPrediction operations.
  318. //
  319. // CreateDataSourceFromRedshift is an asynchronous operation. In response to
  320. // CreateDataSourceFromRedshift, Amazon Machine Learning (Amazon ML) immediately
  321. // returns and sets the DataSource status to PENDING. After the DataSource is
  322. // created and ready for use, Amazon ML sets the Status parameter to COMPLETED.
  323. // DataSource in COMPLETED or PENDING states can be used to perform only CreateMLModel,
  324. // CreateEvaluation, or CreateBatchPrediction operations.
  325. //
  326. // If Amazon ML can't accept the input source, it sets the Status parameter
  327. // to FAILED and includes an error message in the Message attribute of the GetDataSource
  328. // operation response.
  329. //
  330. // The observations should be contained in the database hosted on an Amazon
  331. // Redshift cluster and should be specified by a SelectSqlQuery query. Amazon
  332. // ML executes an Unload command in Amazon Redshift to transfer the result set
  333. // of the SelectSqlQuery query to S3StagingLocation.
  334. //
  335. // After the DataSource has been created, it's ready for use in evaluations
  336. // and batch predictions. If you plan to use the DataSource to train an MLModel,
  337. // the DataSource also requires a recipe. A recipe describes how each input
  338. // variable will be used in training an MLModel. Will the variable be included
  339. // or excluded from training? Will the variable be manipulated; for example,
  340. // will it be combined with another variable or will it be split apart into
  341. // word combinations? The recipe provides answers to these questions.
  342. //
  343. // You can't change an existing datasource, but you can copy and modify the
  344. // settings from an existing Amazon Redshift datasource to create a new datasource.
  345. // To do so, call GetDataSource for an existing datasource and copy the values
  346. // to a CreateDataSource call. Change the settings that you want to change and
  347. // make sure that all required fields have the appropriate values.
  348. //
  349. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  350. // with awserr.Error's Code and Message methods to get detailed information about
  351. // the error.
  352. //
  353. // See the AWS API reference guide for Amazon Machine Learning's
  354. // API operation CreateDataSourceFromRedshift for usage and error information.
  355. //
  356. // Returned Error Codes:
  357. // * ErrCodeInvalidInputException "InvalidInputException"
  358. // An error on the client occurred. Typically, the cause is an invalid input
  359. // value.
  360. //
  361. // * ErrCodeInternalServerException "InternalServerException"
  362. // An error on the server occurred when trying to process a request.
  363. //
  364. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  365. // A second request to use or change an object was not allowed. This can result
  366. // from retrying a request using a parameter that was not present in the original
  367. // request.
  368. //
  369. func (c *MachineLearning) CreateDataSourceFromRedshift(input *CreateDataSourceFromRedshiftInput) (*CreateDataSourceFromRedshiftOutput, error) {
  370. req, out := c.CreateDataSourceFromRedshiftRequest(input)
  371. return out, req.Send()
  372. }
  373. // CreateDataSourceFromRedshiftWithContext is the same as CreateDataSourceFromRedshift with the addition of
  374. // the ability to pass a context and additional request options.
  375. //
  376. // See CreateDataSourceFromRedshift for details on how to use this API operation.
  377. //
  378. // The context must be non-nil and will be used for request cancellation. If
  379. // the context is nil a panic will occur. In the future the SDK may create
  380. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  381. // for more information on using Contexts.
  382. func (c *MachineLearning) CreateDataSourceFromRedshiftWithContext(ctx aws.Context, input *CreateDataSourceFromRedshiftInput, opts ...request.Option) (*CreateDataSourceFromRedshiftOutput, error) {
  383. req, out := c.CreateDataSourceFromRedshiftRequest(input)
  384. req.SetContext(ctx)
  385. req.ApplyOptions(opts...)
  386. return out, req.Send()
  387. }
  388. const opCreateDataSourceFromS3 = "CreateDataSourceFromS3"
  389. // CreateDataSourceFromS3Request generates a "aws/request.Request" representing the
  390. // client's request for the CreateDataSourceFromS3 operation. The "output" return
  391. // value will be populated with the request's response once the request completes
  392. // successfully.
  393. //
  394. // Use "Send" method on the returned Request to send the API call to the service.
  395. // the "output" return value is not valid until after Send returns without error.
  396. //
  397. // See CreateDataSourceFromS3 for more information on using the CreateDataSourceFromS3
  398. // API call, and error handling.
  399. //
  400. // This method is useful when you want to inject custom logic or configuration
  401. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  402. //
  403. //
  404. // // Example sending a request using the CreateDataSourceFromS3Request method.
  405. // req, resp := client.CreateDataSourceFromS3Request(params)
  406. //
  407. // err := req.Send()
  408. // if err == nil { // resp is now filled
  409. // fmt.Println(resp)
  410. // }
  411. func (c *MachineLearning) CreateDataSourceFromS3Request(input *CreateDataSourceFromS3Input) (req *request.Request, output *CreateDataSourceFromS3Output) {
  412. op := &request.Operation{
  413. Name: opCreateDataSourceFromS3,
  414. HTTPMethod: "POST",
  415. HTTPPath: "/",
  416. }
  417. if input == nil {
  418. input = &CreateDataSourceFromS3Input{}
  419. }
  420. output = &CreateDataSourceFromS3Output{}
  421. req = c.newRequest(op, input, output)
  422. return
  423. }
  424. // CreateDataSourceFromS3 API operation for Amazon Machine Learning.
  425. //
  426. // Creates a DataSource object. A DataSource references data that can be used
  427. // to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations.
  428. //
  429. // CreateDataSourceFromS3 is an asynchronous operation. In response to CreateDataSourceFromS3,
  430. // Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource
  431. // status to PENDING. After the DataSource has been created and is ready for
  432. // use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the
  433. // COMPLETED or PENDING state can be used to perform only CreateMLModel, CreateEvaluation
  434. // or CreateBatchPrediction operations.
  435. //
  436. // If Amazon ML can't accept the input source, it sets the Status parameter
  437. // to FAILED and includes an error message in the Message attribute of the GetDataSource
  438. // operation response.
  439. //
  440. // The observation data used in a DataSource should be ready to use; that is,
  441. // it should have a consistent structure, and missing data values should be
  442. // kept to a minimum. The observation data must reside in one or more .csv files
  443. // in an Amazon Simple Storage Service (Amazon S3) location, along with a schema
  444. // that describes the data items by name and type. The same schema must be used
  445. // for all of the data files referenced by the DataSource.
  446. //
  447. // After the DataSource has been created, it's ready to use in evaluations and
  448. // batch predictions. If you plan to use the DataSource to train an MLModel,
  449. // the DataSource also needs a recipe. A recipe describes how each input variable
  450. // will be used in training an MLModel. Will the variable be included or excluded
  451. // from training? Will the variable be manipulated; for example, will it be
  452. // combined with another variable or will it be split apart into word combinations?
  453. // The recipe provides answers to these questions.
  454. //
  455. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  456. // with awserr.Error's Code and Message methods to get detailed information about
  457. // the error.
  458. //
  459. // See the AWS API reference guide for Amazon Machine Learning's
  460. // API operation CreateDataSourceFromS3 for usage and error information.
  461. //
  462. // Returned Error Codes:
  463. // * ErrCodeInvalidInputException "InvalidInputException"
  464. // An error on the client occurred. Typically, the cause is an invalid input
  465. // value.
  466. //
  467. // * ErrCodeInternalServerException "InternalServerException"
  468. // An error on the server occurred when trying to process a request.
  469. //
  470. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  471. // A second request to use or change an object was not allowed. This can result
  472. // from retrying a request using a parameter that was not present in the original
  473. // request.
  474. //
  475. func (c *MachineLearning) CreateDataSourceFromS3(input *CreateDataSourceFromS3Input) (*CreateDataSourceFromS3Output, error) {
  476. req, out := c.CreateDataSourceFromS3Request(input)
  477. return out, req.Send()
  478. }
  479. // CreateDataSourceFromS3WithContext is the same as CreateDataSourceFromS3 with the addition of
  480. // the ability to pass a context and additional request options.
  481. //
  482. // See CreateDataSourceFromS3 for details on how to use this API operation.
  483. //
  484. // The context must be non-nil and will be used for request cancellation. If
  485. // the context is nil a panic will occur. In the future the SDK may create
  486. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  487. // for more information on using Contexts.
  488. func (c *MachineLearning) CreateDataSourceFromS3WithContext(ctx aws.Context, input *CreateDataSourceFromS3Input, opts ...request.Option) (*CreateDataSourceFromS3Output, error) {
  489. req, out := c.CreateDataSourceFromS3Request(input)
  490. req.SetContext(ctx)
  491. req.ApplyOptions(opts...)
  492. return out, req.Send()
  493. }
  494. const opCreateEvaluation = "CreateEvaluation"
  495. // CreateEvaluationRequest generates a "aws/request.Request" representing the
  496. // client's request for the CreateEvaluation operation. The "output" return
  497. // value will be populated with the request's response once the request completes
  498. // successfully.
  499. //
  500. // Use "Send" method on the returned Request to send the API call to the service.
  501. // the "output" return value is not valid until after Send returns without error.
  502. //
  503. // See CreateEvaluation for more information on using the CreateEvaluation
  504. // API call, and error handling.
  505. //
  506. // This method is useful when you want to inject custom logic or configuration
  507. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  508. //
  509. //
  510. // // Example sending a request using the CreateEvaluationRequest method.
  511. // req, resp := client.CreateEvaluationRequest(params)
  512. //
  513. // err := req.Send()
  514. // if err == nil { // resp is now filled
  515. // fmt.Println(resp)
  516. // }
  517. func (c *MachineLearning) CreateEvaluationRequest(input *CreateEvaluationInput) (req *request.Request, output *CreateEvaluationOutput) {
  518. op := &request.Operation{
  519. Name: opCreateEvaluation,
  520. HTTPMethod: "POST",
  521. HTTPPath: "/",
  522. }
  523. if input == nil {
  524. input = &CreateEvaluationInput{}
  525. }
  526. output = &CreateEvaluationOutput{}
  527. req = c.newRequest(op, input, output)
  528. return
  529. }
  530. // CreateEvaluation API operation for Amazon Machine Learning.
  531. //
  532. // Creates a new Evaluation of an MLModel. An MLModel is evaluated on a set
  533. // of observations associated to a DataSource. Like a DataSource for an MLModel,
  534. // the DataSource for an Evaluation contains values for the Target Variable.
  535. // The Evaluation compares the predicted result for each observation to the
  536. // actual outcome and provides a summary so that you know how effective the
  537. // MLModel functions on the test data. Evaluation generates a relevant performance
  538. // metric, such as BinaryAUC, RegressionRMSE or MulticlassAvgFScore based on
  539. // the corresponding MLModelType: BINARY, REGRESSION or MULTICLASS.
  540. //
  541. // CreateEvaluation is an asynchronous operation. In response to CreateEvaluation,
  542. // Amazon Machine Learning (Amazon ML) immediately returns and sets the evaluation
  543. // status to PENDING. After the Evaluation is created and ready for use, Amazon
  544. // ML sets the status to COMPLETED.
  545. //
  546. // You can use the GetEvaluation operation to check progress of the evaluation
  547. // during the creation operation.
  548. //
  549. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  550. // with awserr.Error's Code and Message methods to get detailed information about
  551. // the error.
  552. //
  553. // See the AWS API reference guide for Amazon Machine Learning's
  554. // API operation CreateEvaluation for usage and error information.
  555. //
  556. // Returned Error Codes:
  557. // * ErrCodeInvalidInputException "InvalidInputException"
  558. // An error on the client occurred. Typically, the cause is an invalid input
  559. // value.
  560. //
  561. // * ErrCodeInternalServerException "InternalServerException"
  562. // An error on the server occurred when trying to process a request.
  563. //
  564. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  565. // A second request to use or change an object was not allowed. This can result
  566. // from retrying a request using a parameter that was not present in the original
  567. // request.
  568. //
  569. func (c *MachineLearning) CreateEvaluation(input *CreateEvaluationInput) (*CreateEvaluationOutput, error) {
  570. req, out := c.CreateEvaluationRequest(input)
  571. return out, req.Send()
  572. }
  573. // CreateEvaluationWithContext is the same as CreateEvaluation with the addition of
  574. // the ability to pass a context and additional request options.
  575. //
  576. // See CreateEvaluation for details on how to use this API operation.
  577. //
  578. // The context must be non-nil and will be used for request cancellation. If
  579. // the context is nil a panic will occur. In the future the SDK may create
  580. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  581. // for more information on using Contexts.
  582. func (c *MachineLearning) CreateEvaluationWithContext(ctx aws.Context, input *CreateEvaluationInput, opts ...request.Option) (*CreateEvaluationOutput, error) {
  583. req, out := c.CreateEvaluationRequest(input)
  584. req.SetContext(ctx)
  585. req.ApplyOptions(opts...)
  586. return out, req.Send()
  587. }
  588. const opCreateMLModel = "CreateMLModel"
  589. // CreateMLModelRequest generates a "aws/request.Request" representing the
  590. // client's request for the CreateMLModel operation. The "output" return
  591. // value will be populated with the request's response once the request completes
  592. // successfully.
  593. //
  594. // Use "Send" method on the returned Request to send the API call to the service.
  595. // the "output" return value is not valid until after Send returns without error.
  596. //
  597. // See CreateMLModel for more information on using the CreateMLModel
  598. // API call, and error handling.
  599. //
  600. // This method is useful when you want to inject custom logic or configuration
  601. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  602. //
  603. //
  604. // // Example sending a request using the CreateMLModelRequest method.
  605. // req, resp := client.CreateMLModelRequest(params)
  606. //
  607. // err := req.Send()
  608. // if err == nil { // resp is now filled
  609. // fmt.Println(resp)
  610. // }
  611. func (c *MachineLearning) CreateMLModelRequest(input *CreateMLModelInput) (req *request.Request, output *CreateMLModelOutput) {
  612. op := &request.Operation{
  613. Name: opCreateMLModel,
  614. HTTPMethod: "POST",
  615. HTTPPath: "/",
  616. }
  617. if input == nil {
  618. input = &CreateMLModelInput{}
  619. }
  620. output = &CreateMLModelOutput{}
  621. req = c.newRequest(op, input, output)
  622. return
  623. }
  624. // CreateMLModel API operation for Amazon Machine Learning.
  625. //
  626. // Creates a new MLModel using the DataSource and the recipe as information
  627. // sources.
  628. //
  629. // An MLModel is nearly immutable. Users can update only the MLModelName and
  630. // the ScoreThreshold in an MLModel without creating a new MLModel.
  631. //
  632. // CreateMLModel is an asynchronous operation. In response to CreateMLModel,
  633. // Amazon Machine Learning (Amazon ML) immediately returns and sets the MLModel
  634. // status to PENDING. After the MLModel has been created and ready is for use,
  635. // Amazon ML sets the status to COMPLETED.
  636. //
  637. // You can use the GetMLModel operation to check the progress of the MLModel
  638. // during the creation operation.
  639. //
  640. // CreateMLModel requires a DataSource with computed statistics, which can be
  641. // created by setting ComputeStatistics to true in CreateDataSourceFromRDS,
  642. // CreateDataSourceFromS3, or CreateDataSourceFromRedshift operations.
  643. //
  644. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  645. // with awserr.Error's Code and Message methods to get detailed information about
  646. // the error.
  647. //
  648. // See the AWS API reference guide for Amazon Machine Learning's
  649. // API operation CreateMLModel for usage and error information.
  650. //
  651. // Returned Error Codes:
  652. // * ErrCodeInvalidInputException "InvalidInputException"
  653. // An error on the client occurred. Typically, the cause is an invalid input
  654. // value.
  655. //
  656. // * ErrCodeInternalServerException "InternalServerException"
  657. // An error on the server occurred when trying to process a request.
  658. //
  659. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  660. // A second request to use or change an object was not allowed. This can result
  661. // from retrying a request using a parameter that was not present in the original
  662. // request.
  663. //
  664. func (c *MachineLearning) CreateMLModel(input *CreateMLModelInput) (*CreateMLModelOutput, error) {
  665. req, out := c.CreateMLModelRequest(input)
  666. return out, req.Send()
  667. }
  668. // CreateMLModelWithContext is the same as CreateMLModel with the addition of
  669. // the ability to pass a context and additional request options.
  670. //
  671. // See CreateMLModel for details on how to use this API operation.
  672. //
  673. // The context must be non-nil and will be used for request cancellation. If
  674. // the context is nil a panic will occur. In the future the SDK may create
  675. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  676. // for more information on using Contexts.
  677. func (c *MachineLearning) CreateMLModelWithContext(ctx aws.Context, input *CreateMLModelInput, opts ...request.Option) (*CreateMLModelOutput, error) {
  678. req, out := c.CreateMLModelRequest(input)
  679. req.SetContext(ctx)
  680. req.ApplyOptions(opts...)
  681. return out, req.Send()
  682. }
  683. const opCreateRealtimeEndpoint = "CreateRealtimeEndpoint"
  684. // CreateRealtimeEndpointRequest generates a "aws/request.Request" representing the
  685. // client's request for the CreateRealtimeEndpoint operation. The "output" return
  686. // value will be populated with the request's response once the request completes
  687. // successfully.
  688. //
  689. // Use "Send" method on the returned Request to send the API call to the service.
  690. // the "output" return value is not valid until after Send returns without error.
  691. //
  692. // See CreateRealtimeEndpoint for more information on using the CreateRealtimeEndpoint
  693. // API call, and error handling.
  694. //
  695. // This method is useful when you want to inject custom logic or configuration
  696. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  697. //
  698. //
  699. // // Example sending a request using the CreateRealtimeEndpointRequest method.
  700. // req, resp := client.CreateRealtimeEndpointRequest(params)
  701. //
  702. // err := req.Send()
  703. // if err == nil { // resp is now filled
  704. // fmt.Println(resp)
  705. // }
  706. func (c *MachineLearning) CreateRealtimeEndpointRequest(input *CreateRealtimeEndpointInput) (req *request.Request, output *CreateRealtimeEndpointOutput) {
  707. op := &request.Operation{
  708. Name: opCreateRealtimeEndpoint,
  709. HTTPMethod: "POST",
  710. HTTPPath: "/",
  711. }
  712. if input == nil {
  713. input = &CreateRealtimeEndpointInput{}
  714. }
  715. output = &CreateRealtimeEndpointOutput{}
  716. req = c.newRequest(op, input, output)
  717. return
  718. }
  719. // CreateRealtimeEndpoint API operation for Amazon Machine Learning.
  720. //
  721. // Creates a real-time endpoint for the MLModel. The endpoint contains the URI
  722. // of the MLModel; that is, the location to send real-time prediction requests
  723. // for the specified MLModel.
  724. //
  725. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  726. // with awserr.Error's Code and Message methods to get detailed information about
  727. // the error.
  728. //
  729. // See the AWS API reference guide for Amazon Machine Learning's
  730. // API operation CreateRealtimeEndpoint for usage and error information.
  731. //
  732. // Returned Error Codes:
  733. // * ErrCodeInvalidInputException "InvalidInputException"
  734. // An error on the client occurred. Typically, the cause is an invalid input
  735. // value.
  736. //
  737. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  738. // A specified resource cannot be located.
  739. //
  740. // * ErrCodeInternalServerException "InternalServerException"
  741. // An error on the server occurred when trying to process a request.
  742. //
  743. func (c *MachineLearning) CreateRealtimeEndpoint(input *CreateRealtimeEndpointInput) (*CreateRealtimeEndpointOutput, error) {
  744. req, out := c.CreateRealtimeEndpointRequest(input)
  745. return out, req.Send()
  746. }
  747. // CreateRealtimeEndpointWithContext is the same as CreateRealtimeEndpoint with the addition of
  748. // the ability to pass a context and additional request options.
  749. //
  750. // See CreateRealtimeEndpoint for details on how to use this API operation.
  751. //
  752. // The context must be non-nil and will be used for request cancellation. If
  753. // the context is nil a panic will occur. In the future the SDK may create
  754. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  755. // for more information on using Contexts.
  756. func (c *MachineLearning) CreateRealtimeEndpointWithContext(ctx aws.Context, input *CreateRealtimeEndpointInput, opts ...request.Option) (*CreateRealtimeEndpointOutput, error) {
  757. req, out := c.CreateRealtimeEndpointRequest(input)
  758. req.SetContext(ctx)
  759. req.ApplyOptions(opts...)
  760. return out, req.Send()
  761. }
  762. const opDeleteBatchPrediction = "DeleteBatchPrediction"
  763. // DeleteBatchPredictionRequest generates a "aws/request.Request" representing the
  764. // client's request for the DeleteBatchPrediction operation. The "output" return
  765. // value will be populated with the request's response once the request completes
  766. // successfully.
  767. //
  768. // Use "Send" method on the returned Request to send the API call to the service.
  769. // the "output" return value is not valid until after Send returns without error.
  770. //
  771. // See DeleteBatchPrediction for more information on using the DeleteBatchPrediction
  772. // API call, and error handling.
  773. //
  774. // This method is useful when you want to inject custom logic or configuration
  775. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  776. //
  777. //
  778. // // Example sending a request using the DeleteBatchPredictionRequest method.
  779. // req, resp := client.DeleteBatchPredictionRequest(params)
  780. //
  781. // err := req.Send()
  782. // if err == nil { // resp is now filled
  783. // fmt.Println(resp)
  784. // }
  785. func (c *MachineLearning) DeleteBatchPredictionRequest(input *DeleteBatchPredictionInput) (req *request.Request, output *DeleteBatchPredictionOutput) {
  786. op := &request.Operation{
  787. Name: opDeleteBatchPrediction,
  788. HTTPMethod: "POST",
  789. HTTPPath: "/",
  790. }
  791. if input == nil {
  792. input = &DeleteBatchPredictionInput{}
  793. }
  794. output = &DeleteBatchPredictionOutput{}
  795. req = c.newRequest(op, input, output)
  796. return
  797. }
  798. // DeleteBatchPrediction API operation for Amazon Machine Learning.
  799. //
  800. // Assigns the DELETED status to a BatchPrediction, rendering it unusable.
  801. //
  802. // After using the DeleteBatchPrediction operation, you can use the GetBatchPrediction
  803. // operation to verify that the status of the BatchPrediction changed to DELETED.
  804. //
  805. // Caution: The result of the DeleteBatchPrediction operation is irreversible.
  806. //
  807. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  808. // with awserr.Error's Code and Message methods to get detailed information about
  809. // the error.
  810. //
  811. // See the AWS API reference guide for Amazon Machine Learning's
  812. // API operation DeleteBatchPrediction for usage and error information.
  813. //
  814. // Returned Error Codes:
  815. // * ErrCodeInvalidInputException "InvalidInputException"
  816. // An error on the client occurred. Typically, the cause is an invalid input
  817. // value.
  818. //
  819. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  820. // A specified resource cannot be located.
  821. //
  822. // * ErrCodeInternalServerException "InternalServerException"
  823. // An error on the server occurred when trying to process a request.
  824. //
  825. func (c *MachineLearning) DeleteBatchPrediction(input *DeleteBatchPredictionInput) (*DeleteBatchPredictionOutput, error) {
  826. req, out := c.DeleteBatchPredictionRequest(input)
  827. return out, req.Send()
  828. }
  829. // DeleteBatchPredictionWithContext is the same as DeleteBatchPrediction with the addition of
  830. // the ability to pass a context and additional request options.
  831. //
  832. // See DeleteBatchPrediction for details on how to use this API operation.
  833. //
  834. // The context must be non-nil and will be used for request cancellation. If
  835. // the context is nil a panic will occur. In the future the SDK may create
  836. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  837. // for more information on using Contexts.
  838. func (c *MachineLearning) DeleteBatchPredictionWithContext(ctx aws.Context, input *DeleteBatchPredictionInput, opts ...request.Option) (*DeleteBatchPredictionOutput, error) {
  839. req, out := c.DeleteBatchPredictionRequest(input)
  840. req.SetContext(ctx)
  841. req.ApplyOptions(opts...)
  842. return out, req.Send()
  843. }
  844. const opDeleteDataSource = "DeleteDataSource"
  845. // DeleteDataSourceRequest generates a "aws/request.Request" representing the
  846. // client's request for the DeleteDataSource operation. The "output" return
  847. // value will be populated with the request's response once the request completes
  848. // successfully.
  849. //
  850. // Use "Send" method on the returned Request to send the API call to the service.
  851. // the "output" return value is not valid until after Send returns without error.
  852. //
  853. // See DeleteDataSource for more information on using the DeleteDataSource
  854. // API call, and error handling.
  855. //
  856. // This method is useful when you want to inject custom logic or configuration
  857. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  858. //
  859. //
  860. // // Example sending a request using the DeleteDataSourceRequest method.
  861. // req, resp := client.DeleteDataSourceRequest(params)
  862. //
  863. // err := req.Send()
  864. // if err == nil { // resp is now filled
  865. // fmt.Println(resp)
  866. // }
  867. func (c *MachineLearning) DeleteDataSourceRequest(input *DeleteDataSourceInput) (req *request.Request, output *DeleteDataSourceOutput) {
  868. op := &request.Operation{
  869. Name: opDeleteDataSource,
  870. HTTPMethod: "POST",
  871. HTTPPath: "/",
  872. }
  873. if input == nil {
  874. input = &DeleteDataSourceInput{}
  875. }
  876. output = &DeleteDataSourceOutput{}
  877. req = c.newRequest(op, input, output)
  878. return
  879. }
  880. // DeleteDataSource API operation for Amazon Machine Learning.
  881. //
  882. // Assigns the DELETED status to a DataSource, rendering it unusable.
  883. //
  884. // After using the DeleteDataSource operation, you can use the GetDataSource
  885. // operation to verify that the status of the DataSource changed to DELETED.
  886. //
  887. // Caution: The results of the DeleteDataSource operation are irreversible.
  888. //
  889. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  890. // with awserr.Error's Code and Message methods to get detailed information about
  891. // the error.
  892. //
  893. // See the AWS API reference guide for Amazon Machine Learning's
  894. // API operation DeleteDataSource for usage and error information.
  895. //
  896. // Returned Error Codes:
  897. // * ErrCodeInvalidInputException "InvalidInputException"
  898. // An error on the client occurred. Typically, the cause is an invalid input
  899. // value.
  900. //
  901. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  902. // A specified resource cannot be located.
  903. //
  904. // * ErrCodeInternalServerException "InternalServerException"
  905. // An error on the server occurred when trying to process a request.
  906. //
  907. func (c *MachineLearning) DeleteDataSource(input *DeleteDataSourceInput) (*DeleteDataSourceOutput, error) {
  908. req, out := c.DeleteDataSourceRequest(input)
  909. return out, req.Send()
  910. }
  911. // DeleteDataSourceWithContext is the same as DeleteDataSource with the addition of
  912. // the ability to pass a context and additional request options.
  913. //
  914. // See DeleteDataSource for details on how to use this API operation.
  915. //
  916. // The context must be non-nil and will be used for request cancellation. If
  917. // the context is nil a panic will occur. In the future the SDK may create
  918. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  919. // for more information on using Contexts.
  920. func (c *MachineLearning) DeleteDataSourceWithContext(ctx aws.Context, input *DeleteDataSourceInput, opts ...request.Option) (*DeleteDataSourceOutput, error) {
  921. req, out := c.DeleteDataSourceRequest(input)
  922. req.SetContext(ctx)
  923. req.ApplyOptions(opts...)
  924. return out, req.Send()
  925. }
  926. const opDeleteEvaluation = "DeleteEvaluation"
  927. // DeleteEvaluationRequest generates a "aws/request.Request" representing the
  928. // client's request for the DeleteEvaluation operation. The "output" return
  929. // value will be populated with the request's response once the request completes
  930. // successfully.
  931. //
  932. // Use "Send" method on the returned Request to send the API call to the service.
  933. // the "output" return value is not valid until after Send returns without error.
  934. //
  935. // See DeleteEvaluation for more information on using the DeleteEvaluation
  936. // API call, and error handling.
  937. //
  938. // This method is useful when you want to inject custom logic or configuration
  939. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  940. //
  941. //
  942. // // Example sending a request using the DeleteEvaluationRequest method.
  943. // req, resp := client.DeleteEvaluationRequest(params)
  944. //
  945. // err := req.Send()
  946. // if err == nil { // resp is now filled
  947. // fmt.Println(resp)
  948. // }
  949. func (c *MachineLearning) DeleteEvaluationRequest(input *DeleteEvaluationInput) (req *request.Request, output *DeleteEvaluationOutput) {
  950. op := &request.Operation{
  951. Name: opDeleteEvaluation,
  952. HTTPMethod: "POST",
  953. HTTPPath: "/",
  954. }
  955. if input == nil {
  956. input = &DeleteEvaluationInput{}
  957. }
  958. output = &DeleteEvaluationOutput{}
  959. req = c.newRequest(op, input, output)
  960. return
  961. }
  962. // DeleteEvaluation API operation for Amazon Machine Learning.
  963. //
  964. // Assigns the DELETED status to an Evaluation, rendering it unusable.
  965. //
  966. // After invoking the DeleteEvaluation operation, you can use the GetEvaluation
  967. // operation to verify that the status of the Evaluation changed to DELETED.
  968. //
  969. // CautionThe results of the DeleteEvaluation operation are irreversible.
  970. //
  971. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  972. // with awserr.Error's Code and Message methods to get detailed information about
  973. // the error.
  974. //
  975. // See the AWS API reference guide for Amazon Machine Learning's
  976. // API operation DeleteEvaluation for usage and error information.
  977. //
  978. // Returned Error Codes:
  979. // * ErrCodeInvalidInputException "InvalidInputException"
  980. // An error on the client occurred. Typically, the cause is an invalid input
  981. // value.
  982. //
  983. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  984. // A specified resource cannot be located.
  985. //
  986. // * ErrCodeInternalServerException "InternalServerException"
  987. // An error on the server occurred when trying to process a request.
  988. //
  989. func (c *MachineLearning) DeleteEvaluation(input *DeleteEvaluationInput) (*DeleteEvaluationOutput, error) {
  990. req, out := c.DeleteEvaluationRequest(input)
  991. return out, req.Send()
  992. }
  993. // DeleteEvaluationWithContext is the same as DeleteEvaluation with the addition of
  994. // the ability to pass a context and additional request options.
  995. //
  996. // See DeleteEvaluation for details on how to use this API operation.
  997. //
  998. // The context must be non-nil and will be used for request cancellation. If
  999. // the context is nil a panic will occur. In the future the SDK may create
  1000. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1001. // for more information on using Contexts.
  1002. func (c *MachineLearning) DeleteEvaluationWithContext(ctx aws.Context, input *DeleteEvaluationInput, opts ...request.Option) (*DeleteEvaluationOutput, error) {
  1003. req, out := c.DeleteEvaluationRequest(input)
  1004. req.SetContext(ctx)
  1005. req.ApplyOptions(opts...)
  1006. return out, req.Send()
  1007. }
  1008. const opDeleteMLModel = "DeleteMLModel"
  1009. // DeleteMLModelRequest generates a "aws/request.Request" representing the
  1010. // client's request for the DeleteMLModel operation. The "output" return
  1011. // value will be populated with the request's response once the request completes
  1012. // successfully.
  1013. //
  1014. // Use "Send" method on the returned Request to send the API call to the service.
  1015. // the "output" return value is not valid until after Send returns without error.
  1016. //
  1017. // See DeleteMLModel for more information on using the DeleteMLModel
  1018. // API call, and error handling.
  1019. //
  1020. // This method is useful when you want to inject custom logic or configuration
  1021. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1022. //
  1023. //
  1024. // // Example sending a request using the DeleteMLModelRequest method.
  1025. // req, resp := client.DeleteMLModelRequest(params)
  1026. //
  1027. // err := req.Send()
  1028. // if err == nil { // resp is now filled
  1029. // fmt.Println(resp)
  1030. // }
  1031. func (c *MachineLearning) DeleteMLModelRequest(input *DeleteMLModelInput) (req *request.Request, output *DeleteMLModelOutput) {
  1032. op := &request.Operation{
  1033. Name: opDeleteMLModel,
  1034. HTTPMethod: "POST",
  1035. HTTPPath: "/",
  1036. }
  1037. if input == nil {
  1038. input = &DeleteMLModelInput{}
  1039. }
  1040. output = &DeleteMLModelOutput{}
  1041. req = c.newRequest(op, input, output)
  1042. return
  1043. }
  1044. // DeleteMLModel API operation for Amazon Machine Learning.
  1045. //
  1046. // Assigns the DELETED status to an MLModel, rendering it unusable.
  1047. //
  1048. // After using the DeleteMLModel operation, you can use the GetMLModel operation
  1049. // to verify that the status of the MLModel changed to DELETED.
  1050. //
  1051. // Caution: The result of the DeleteMLModel operation is irreversible.
  1052. //
  1053. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1054. // with awserr.Error's Code and Message methods to get detailed information about
  1055. // the error.
  1056. //
  1057. // See the AWS API reference guide for Amazon Machine Learning's
  1058. // API operation DeleteMLModel for usage and error information.
  1059. //
  1060. // Returned Error Codes:
  1061. // * ErrCodeInvalidInputException "InvalidInputException"
  1062. // An error on the client occurred. Typically, the cause is an invalid input
  1063. // value.
  1064. //
  1065. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1066. // A specified resource cannot be located.
  1067. //
  1068. // * ErrCodeInternalServerException "InternalServerException"
  1069. // An error on the server occurred when trying to process a request.
  1070. //
  1071. func (c *MachineLearning) DeleteMLModel(input *DeleteMLModelInput) (*DeleteMLModelOutput, error) {
  1072. req, out := c.DeleteMLModelRequest(input)
  1073. return out, req.Send()
  1074. }
  1075. // DeleteMLModelWithContext is the same as DeleteMLModel with the addition of
  1076. // the ability to pass a context and additional request options.
  1077. //
  1078. // See DeleteMLModel for details on how to use this API operation.
  1079. //
  1080. // The context must be non-nil and will be used for request cancellation. If
  1081. // the context is nil a panic will occur. In the future the SDK may create
  1082. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1083. // for more information on using Contexts.
  1084. func (c *MachineLearning) DeleteMLModelWithContext(ctx aws.Context, input *DeleteMLModelInput, opts ...request.Option) (*DeleteMLModelOutput, error) {
  1085. req, out := c.DeleteMLModelRequest(input)
  1086. req.SetContext(ctx)
  1087. req.ApplyOptions(opts...)
  1088. return out, req.Send()
  1089. }
  1090. const opDeleteRealtimeEndpoint = "DeleteRealtimeEndpoint"
  1091. // DeleteRealtimeEndpointRequest generates a "aws/request.Request" representing the
  1092. // client's request for the DeleteRealtimeEndpoint operation. The "output" return
  1093. // value will be populated with the request's response once the request completes
  1094. // successfully.
  1095. //
  1096. // Use "Send" method on the returned Request to send the API call to the service.
  1097. // the "output" return value is not valid until after Send returns without error.
  1098. //
  1099. // See DeleteRealtimeEndpoint for more information on using the DeleteRealtimeEndpoint
  1100. // API call, and error handling.
  1101. //
  1102. // This method is useful when you want to inject custom logic or configuration
  1103. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1104. //
  1105. //
  1106. // // Example sending a request using the DeleteRealtimeEndpointRequest method.
  1107. // req, resp := client.DeleteRealtimeEndpointRequest(params)
  1108. //
  1109. // err := req.Send()
  1110. // if err == nil { // resp is now filled
  1111. // fmt.Println(resp)
  1112. // }
  1113. func (c *MachineLearning) DeleteRealtimeEndpointRequest(input *DeleteRealtimeEndpointInput) (req *request.Request, output *DeleteRealtimeEndpointOutput) {
  1114. op := &request.Operation{
  1115. Name: opDeleteRealtimeEndpoint,
  1116. HTTPMethod: "POST",
  1117. HTTPPath: "/",
  1118. }
  1119. if input == nil {
  1120. input = &DeleteRealtimeEndpointInput{}
  1121. }
  1122. output = &DeleteRealtimeEndpointOutput{}
  1123. req = c.newRequest(op, input, output)
  1124. return
  1125. }
  1126. // DeleteRealtimeEndpoint API operation for Amazon Machine Learning.
  1127. //
  1128. // Deletes a real time endpoint of an MLModel.
  1129. //
  1130. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1131. // with awserr.Error's Code and Message methods to get detailed information about
  1132. // the error.
  1133. //
  1134. // See the AWS API reference guide for Amazon Machine Learning's
  1135. // API operation DeleteRealtimeEndpoint for usage and error information.
  1136. //
  1137. // Returned Error Codes:
  1138. // * ErrCodeInvalidInputException "InvalidInputException"
  1139. // An error on the client occurred. Typically, the cause is an invalid input
  1140. // value.
  1141. //
  1142. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1143. // A specified resource cannot be located.
  1144. //
  1145. // * ErrCodeInternalServerException "InternalServerException"
  1146. // An error on the server occurred when trying to process a request.
  1147. //
  1148. func (c *MachineLearning) DeleteRealtimeEndpoint(input *DeleteRealtimeEndpointInput) (*DeleteRealtimeEndpointOutput, error) {
  1149. req, out := c.DeleteRealtimeEndpointRequest(input)
  1150. return out, req.Send()
  1151. }
  1152. // DeleteRealtimeEndpointWithContext is the same as DeleteRealtimeEndpoint with the addition of
  1153. // the ability to pass a context and additional request options.
  1154. //
  1155. // See DeleteRealtimeEndpoint for details on how to use this API operation.
  1156. //
  1157. // The context must be non-nil and will be used for request cancellation. If
  1158. // the context is nil a panic will occur. In the future the SDK may create
  1159. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1160. // for more information on using Contexts.
  1161. func (c *MachineLearning) DeleteRealtimeEndpointWithContext(ctx aws.Context, input *DeleteRealtimeEndpointInput, opts ...request.Option) (*DeleteRealtimeEndpointOutput, error) {
  1162. req, out := c.DeleteRealtimeEndpointRequest(input)
  1163. req.SetContext(ctx)
  1164. req.ApplyOptions(opts...)
  1165. return out, req.Send()
  1166. }
  1167. const opDeleteTags = "DeleteTags"
  1168. // DeleteTagsRequest generates a "aws/request.Request" representing the
  1169. // client's request for the DeleteTags operation. The "output" return
  1170. // value will be populated with the request's response once the request completes
  1171. // successfully.
  1172. //
  1173. // Use "Send" method on the returned Request to send the API call to the service.
  1174. // the "output" return value is not valid until after Send returns without error.
  1175. //
  1176. // See DeleteTags for more information on using the DeleteTags
  1177. // API call, and error handling.
  1178. //
  1179. // This method is useful when you want to inject custom logic or configuration
  1180. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1181. //
  1182. //
  1183. // // Example sending a request using the DeleteTagsRequest method.
  1184. // req, resp := client.DeleteTagsRequest(params)
  1185. //
  1186. // err := req.Send()
  1187. // if err == nil { // resp is now filled
  1188. // fmt.Println(resp)
  1189. // }
  1190. func (c *MachineLearning) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  1191. op := &request.Operation{
  1192. Name: opDeleteTags,
  1193. HTTPMethod: "POST",
  1194. HTTPPath: "/",
  1195. }
  1196. if input == nil {
  1197. input = &DeleteTagsInput{}
  1198. }
  1199. output = &DeleteTagsOutput{}
  1200. req = c.newRequest(op, input, output)
  1201. return
  1202. }
  1203. // DeleteTags API operation for Amazon Machine Learning.
  1204. //
  1205. // Deletes the specified tags associated with an ML object. After this operation
  1206. // is complete, you can't recover deleted tags.
  1207. //
  1208. // If you specify a tag that doesn't exist, Amazon ML ignores it.
  1209. //
  1210. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1211. // with awserr.Error's Code and Message methods to get detailed information about
  1212. // the error.
  1213. //
  1214. // See the AWS API reference guide for Amazon Machine Learning's
  1215. // API operation DeleteTags for usage and error information.
  1216. //
  1217. // Returned Error Codes:
  1218. // * ErrCodeInvalidInputException "InvalidInputException"
  1219. // An error on the client occurred. Typically, the cause is an invalid input
  1220. // value.
  1221. //
  1222. // * ErrCodeInvalidTagException "InvalidTagException"
  1223. //
  1224. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1225. // A specified resource cannot be located.
  1226. //
  1227. // * ErrCodeInternalServerException "InternalServerException"
  1228. // An error on the server occurred when trying to process a request.
  1229. //
  1230. func (c *MachineLearning) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  1231. req, out := c.DeleteTagsRequest(input)
  1232. return out, req.Send()
  1233. }
  1234. // DeleteTagsWithContext is the same as DeleteTags with the addition of
  1235. // the ability to pass a context and additional request options.
  1236. //
  1237. // See DeleteTags for details on how to use this API operation.
  1238. //
  1239. // The context must be non-nil and will be used for request cancellation. If
  1240. // the context is nil a panic will occur. In the future the SDK may create
  1241. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1242. // for more information on using Contexts.
  1243. func (c *MachineLearning) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
  1244. req, out := c.DeleteTagsRequest(input)
  1245. req.SetContext(ctx)
  1246. req.ApplyOptions(opts...)
  1247. return out, req.Send()
  1248. }
  1249. const opDescribeBatchPredictions = "DescribeBatchPredictions"
  1250. // DescribeBatchPredictionsRequest generates a "aws/request.Request" representing the
  1251. // client's request for the DescribeBatchPredictions operation. The "output" return
  1252. // value will be populated with the request's response once the request completes
  1253. // successfully.
  1254. //
  1255. // Use "Send" method on the returned Request to send the API call to the service.
  1256. // the "output" return value is not valid until after Send returns without error.
  1257. //
  1258. // See DescribeBatchPredictions for more information on using the DescribeBatchPredictions
  1259. // API call, and error handling.
  1260. //
  1261. // This method is useful when you want to inject custom logic or configuration
  1262. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1263. //
  1264. //
  1265. // // Example sending a request using the DescribeBatchPredictionsRequest method.
  1266. // req, resp := client.DescribeBatchPredictionsRequest(params)
  1267. //
  1268. // err := req.Send()
  1269. // if err == nil { // resp is now filled
  1270. // fmt.Println(resp)
  1271. // }
  1272. func (c *MachineLearning) DescribeBatchPredictionsRequest(input *DescribeBatchPredictionsInput) (req *request.Request, output *DescribeBatchPredictionsOutput) {
  1273. op := &request.Operation{
  1274. Name: opDescribeBatchPredictions,
  1275. HTTPMethod: "POST",
  1276. HTTPPath: "/",
  1277. Paginator: &request.Paginator{
  1278. InputTokens: []string{"NextToken"},
  1279. OutputTokens: []string{"NextToken"},
  1280. LimitToken: "Limit",
  1281. TruncationToken: "",
  1282. },
  1283. }
  1284. if input == nil {
  1285. input = &DescribeBatchPredictionsInput{}
  1286. }
  1287. output = &DescribeBatchPredictionsOutput{}
  1288. req = c.newRequest(op, input, output)
  1289. return
  1290. }
  1291. // DescribeBatchPredictions API operation for Amazon Machine Learning.
  1292. //
  1293. // Returns a list of BatchPrediction operations that match the search criteria
  1294. // in the request.
  1295. //
  1296. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1297. // with awserr.Error's Code and Message methods to get detailed information about
  1298. // the error.
  1299. //
  1300. // See the AWS API reference guide for Amazon Machine Learning's
  1301. // API operation DescribeBatchPredictions for usage and error information.
  1302. //
  1303. // Returned Error Codes:
  1304. // * ErrCodeInvalidInputException "InvalidInputException"
  1305. // An error on the client occurred. Typically, the cause is an invalid input
  1306. // value.
  1307. //
  1308. // * ErrCodeInternalServerException "InternalServerException"
  1309. // An error on the server occurred when trying to process a request.
  1310. //
  1311. func (c *MachineLearning) DescribeBatchPredictions(input *DescribeBatchPredictionsInput) (*DescribeBatchPredictionsOutput, error) {
  1312. req, out := c.DescribeBatchPredictionsRequest(input)
  1313. return out, req.Send()
  1314. }
  1315. // DescribeBatchPredictionsWithContext is the same as DescribeBatchPredictions with the addition of
  1316. // the ability to pass a context and additional request options.
  1317. //
  1318. // See DescribeBatchPredictions for details on how to use this API operation.
  1319. //
  1320. // The context must be non-nil and will be used for request cancellation. If
  1321. // the context is nil a panic will occur. In the future the SDK may create
  1322. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1323. // for more information on using Contexts.
  1324. func (c *MachineLearning) DescribeBatchPredictionsWithContext(ctx aws.Context, input *DescribeBatchPredictionsInput, opts ...request.Option) (*DescribeBatchPredictionsOutput, error) {
  1325. req, out := c.DescribeBatchPredictionsRequest(input)
  1326. req.SetContext(ctx)
  1327. req.ApplyOptions(opts...)
  1328. return out, req.Send()
  1329. }
  1330. // DescribeBatchPredictionsPages iterates over the pages of a DescribeBatchPredictions operation,
  1331. // calling the "fn" function with the response data for each page. To stop
  1332. // iterating, return false from the fn function.
  1333. //
  1334. // See DescribeBatchPredictions method for more information on how to use this operation.
  1335. //
  1336. // Note: This operation can generate multiple requests to a service.
  1337. //
  1338. // // Example iterating over at most 3 pages of a DescribeBatchPredictions operation.
  1339. // pageNum := 0
  1340. // err := client.DescribeBatchPredictionsPages(params,
  1341. // func(page *DescribeBatchPredictionsOutput, lastPage bool) bool {
  1342. // pageNum++
  1343. // fmt.Println(page)
  1344. // return pageNum <= 3
  1345. // })
  1346. //
  1347. func (c *MachineLearning) DescribeBatchPredictionsPages(input *DescribeBatchPredictionsInput, fn func(*DescribeBatchPredictionsOutput, bool) bool) error {
  1348. return c.DescribeBatchPredictionsPagesWithContext(aws.BackgroundContext(), input, fn)
  1349. }
  1350. // DescribeBatchPredictionsPagesWithContext same as DescribeBatchPredictionsPages except
  1351. // it takes a Context and allows setting request options on the pages.
  1352. //
  1353. // The context must be non-nil and will be used for request cancellation. If
  1354. // the context is nil a panic will occur. In the future the SDK may create
  1355. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1356. // for more information on using Contexts.
  1357. func (c *MachineLearning) DescribeBatchPredictionsPagesWithContext(ctx aws.Context, input *DescribeBatchPredictionsInput, fn func(*DescribeBatchPredictionsOutput, bool) bool, opts ...request.Option) error {
  1358. p := request.Pagination{
  1359. NewRequest: func() (*request.Request, error) {
  1360. var inCpy *DescribeBatchPredictionsInput
  1361. if input != nil {
  1362. tmp := *input
  1363. inCpy = &tmp
  1364. }
  1365. req, _ := c.DescribeBatchPredictionsRequest(inCpy)
  1366. req.SetContext(ctx)
  1367. req.ApplyOptions(opts...)
  1368. return req, nil
  1369. },
  1370. }
  1371. cont := true
  1372. for p.Next() && cont {
  1373. cont = fn(p.Page().(*DescribeBatchPredictionsOutput), !p.HasNextPage())
  1374. }
  1375. return p.Err()
  1376. }
  1377. const opDescribeDataSources = "DescribeDataSources"
  1378. // DescribeDataSourcesRequest generates a "aws/request.Request" representing the
  1379. // client's request for the DescribeDataSources operation. The "output" return
  1380. // value will be populated with the request's response once the request completes
  1381. // successfully.
  1382. //
  1383. // Use "Send" method on the returned Request to send the API call to the service.
  1384. // the "output" return value is not valid until after Send returns without error.
  1385. //
  1386. // See DescribeDataSources for more information on using the DescribeDataSources
  1387. // API call, and error handling.
  1388. //
  1389. // This method is useful when you want to inject custom logic or configuration
  1390. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1391. //
  1392. //
  1393. // // Example sending a request using the DescribeDataSourcesRequest method.
  1394. // req, resp := client.DescribeDataSourcesRequest(params)
  1395. //
  1396. // err := req.Send()
  1397. // if err == nil { // resp is now filled
  1398. // fmt.Println(resp)
  1399. // }
  1400. func (c *MachineLearning) DescribeDataSourcesRequest(input *DescribeDataSourcesInput) (req *request.Request, output *DescribeDataSourcesOutput) {
  1401. op := &request.Operation{
  1402. Name: opDescribeDataSources,
  1403. HTTPMethod: "POST",
  1404. HTTPPath: "/",
  1405. Paginator: &request.Paginator{
  1406. InputTokens: []string{"NextToken"},
  1407. OutputTokens: []string{"NextToken"},
  1408. LimitToken: "Limit",
  1409. TruncationToken: "",
  1410. },
  1411. }
  1412. if input == nil {
  1413. input = &DescribeDataSourcesInput{}
  1414. }
  1415. output = &DescribeDataSourcesOutput{}
  1416. req = c.newRequest(op, input, output)
  1417. return
  1418. }
  1419. // DescribeDataSources API operation for Amazon Machine Learning.
  1420. //
  1421. // Returns a list of DataSource that match the search criteria in the request.
  1422. //
  1423. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1424. // with awserr.Error's Code and Message methods to get detailed information about
  1425. // the error.
  1426. //
  1427. // See the AWS API reference guide for Amazon Machine Learning's
  1428. // API operation DescribeDataSources for usage and error information.
  1429. //
  1430. // Returned Error Codes:
  1431. // * ErrCodeInvalidInputException "InvalidInputException"
  1432. // An error on the client occurred. Typically, the cause is an invalid input
  1433. // value.
  1434. //
  1435. // * ErrCodeInternalServerException "InternalServerException"
  1436. // An error on the server occurred when trying to process a request.
  1437. //
  1438. func (c *MachineLearning) DescribeDataSources(input *DescribeDataSourcesInput) (*DescribeDataSourcesOutput, error) {
  1439. req, out := c.DescribeDataSourcesRequest(input)
  1440. return out, req.Send()
  1441. }
  1442. // DescribeDataSourcesWithContext is the same as DescribeDataSources with the addition of
  1443. // the ability to pass a context and additional request options.
  1444. //
  1445. // See DescribeDataSources for details on how to use this API operation.
  1446. //
  1447. // The context must be non-nil and will be used for request cancellation. If
  1448. // the context is nil a panic will occur. In the future the SDK may create
  1449. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1450. // for more information on using Contexts.
  1451. func (c *MachineLearning) DescribeDataSourcesWithContext(ctx aws.Context, input *DescribeDataSourcesInput, opts ...request.Option) (*DescribeDataSourcesOutput, error) {
  1452. req, out := c.DescribeDataSourcesRequest(input)
  1453. req.SetContext(ctx)
  1454. req.ApplyOptions(opts...)
  1455. return out, req.Send()
  1456. }
  1457. // DescribeDataSourcesPages iterates over the pages of a DescribeDataSources operation,
  1458. // calling the "fn" function with the response data for each page. To stop
  1459. // iterating, return false from the fn function.
  1460. //
  1461. // See DescribeDataSources method for more information on how to use this operation.
  1462. //
  1463. // Note: This operation can generate multiple requests to a service.
  1464. //
  1465. // // Example iterating over at most 3 pages of a DescribeDataSources operation.
  1466. // pageNum := 0
  1467. // err := client.DescribeDataSourcesPages(params,
  1468. // func(page *DescribeDataSourcesOutput, lastPage bool) bool {
  1469. // pageNum++
  1470. // fmt.Println(page)
  1471. // return pageNum <= 3
  1472. // })
  1473. //
  1474. func (c *MachineLearning) DescribeDataSourcesPages(input *DescribeDataSourcesInput, fn func(*DescribeDataSourcesOutput, bool) bool) error {
  1475. return c.DescribeDataSourcesPagesWithContext(aws.BackgroundContext(), input, fn)
  1476. }
  1477. // DescribeDataSourcesPagesWithContext same as DescribeDataSourcesPages except
  1478. // it takes a Context and allows setting request options on the pages.
  1479. //
  1480. // The context must be non-nil and will be used for request cancellation. If
  1481. // the context is nil a panic will occur. In the future the SDK may create
  1482. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1483. // for more information on using Contexts.
  1484. func (c *MachineLearning) DescribeDataSourcesPagesWithContext(ctx aws.Context, input *DescribeDataSourcesInput, fn func(*DescribeDataSourcesOutput, bool) bool, opts ...request.Option) error {
  1485. p := request.Pagination{
  1486. NewRequest: func() (*request.Request, error) {
  1487. var inCpy *DescribeDataSourcesInput
  1488. if input != nil {
  1489. tmp := *input
  1490. inCpy = &tmp
  1491. }
  1492. req, _ := c.DescribeDataSourcesRequest(inCpy)
  1493. req.SetContext(ctx)
  1494. req.ApplyOptions(opts...)
  1495. return req, nil
  1496. },
  1497. }
  1498. cont := true
  1499. for p.Next() && cont {
  1500. cont = fn(p.Page().(*DescribeDataSourcesOutput), !p.HasNextPage())
  1501. }
  1502. return p.Err()
  1503. }
  1504. const opDescribeEvaluations = "DescribeEvaluations"
  1505. // DescribeEvaluationsRequest generates a "aws/request.Request" representing the
  1506. // client's request for the DescribeEvaluations operation. The "output" return
  1507. // value will be populated with the request's response once the request completes
  1508. // successfully.
  1509. //
  1510. // Use "Send" method on the returned Request to send the API call to the service.
  1511. // the "output" return value is not valid until after Send returns without error.
  1512. //
  1513. // See DescribeEvaluations for more information on using the DescribeEvaluations
  1514. // API call, and error handling.
  1515. //
  1516. // This method is useful when you want to inject custom logic or configuration
  1517. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1518. //
  1519. //
  1520. // // Example sending a request using the DescribeEvaluationsRequest method.
  1521. // req, resp := client.DescribeEvaluationsRequest(params)
  1522. //
  1523. // err := req.Send()
  1524. // if err == nil { // resp is now filled
  1525. // fmt.Println(resp)
  1526. // }
  1527. func (c *MachineLearning) DescribeEvaluationsRequest(input *DescribeEvaluationsInput) (req *request.Request, output *DescribeEvaluationsOutput) {
  1528. op := &request.Operation{
  1529. Name: opDescribeEvaluations,
  1530. HTTPMethod: "POST",
  1531. HTTPPath: "/",
  1532. Paginator: &request.Paginator{
  1533. InputTokens: []string{"NextToken"},
  1534. OutputTokens: []string{"NextToken"},
  1535. LimitToken: "Limit",
  1536. TruncationToken: "",
  1537. },
  1538. }
  1539. if input == nil {
  1540. input = &DescribeEvaluationsInput{}
  1541. }
  1542. output = &DescribeEvaluationsOutput{}
  1543. req = c.newRequest(op, input, output)
  1544. return
  1545. }
  1546. // DescribeEvaluations API operation for Amazon Machine Learning.
  1547. //
  1548. // Returns a list of DescribeEvaluations that match the search criteria in the
  1549. // request.
  1550. //
  1551. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1552. // with awserr.Error's Code and Message methods to get detailed information about
  1553. // the error.
  1554. //
  1555. // See the AWS API reference guide for Amazon Machine Learning's
  1556. // API operation DescribeEvaluations for usage and error information.
  1557. //
  1558. // Returned Error Codes:
  1559. // * ErrCodeInvalidInputException "InvalidInputException"
  1560. // An error on the client occurred. Typically, the cause is an invalid input
  1561. // value.
  1562. //
  1563. // * ErrCodeInternalServerException "InternalServerException"
  1564. // An error on the server occurred when trying to process a request.
  1565. //
  1566. func (c *MachineLearning) DescribeEvaluations(input *DescribeEvaluationsInput) (*DescribeEvaluationsOutput, error) {
  1567. req, out := c.DescribeEvaluationsRequest(input)
  1568. return out, req.Send()
  1569. }
  1570. // DescribeEvaluationsWithContext is the same as DescribeEvaluations with the addition of
  1571. // the ability to pass a context and additional request options.
  1572. //
  1573. // See DescribeEvaluations for details on how to use this API operation.
  1574. //
  1575. // The context must be non-nil and will be used for request cancellation. If
  1576. // the context is nil a panic will occur. In the future the SDK may create
  1577. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1578. // for more information on using Contexts.
  1579. func (c *MachineLearning) DescribeEvaluationsWithContext(ctx aws.Context, input *DescribeEvaluationsInput, opts ...request.Option) (*DescribeEvaluationsOutput, error) {
  1580. req, out := c.DescribeEvaluationsRequest(input)
  1581. req.SetContext(ctx)
  1582. req.ApplyOptions(opts...)
  1583. return out, req.Send()
  1584. }
  1585. // DescribeEvaluationsPages iterates over the pages of a DescribeEvaluations operation,
  1586. // calling the "fn" function with the response data for each page. To stop
  1587. // iterating, return false from the fn function.
  1588. //
  1589. // See DescribeEvaluations method for more information on how to use this operation.
  1590. //
  1591. // Note: This operation can generate multiple requests to a service.
  1592. //
  1593. // // Example iterating over at most 3 pages of a DescribeEvaluations operation.
  1594. // pageNum := 0
  1595. // err := client.DescribeEvaluationsPages(params,
  1596. // func(page *DescribeEvaluationsOutput, lastPage bool) bool {
  1597. // pageNum++
  1598. // fmt.Println(page)
  1599. // return pageNum <= 3
  1600. // })
  1601. //
  1602. func (c *MachineLearning) DescribeEvaluationsPages(input *DescribeEvaluationsInput, fn func(*DescribeEvaluationsOutput, bool) bool) error {
  1603. return c.DescribeEvaluationsPagesWithContext(aws.BackgroundContext(), input, fn)
  1604. }
  1605. // DescribeEvaluationsPagesWithContext same as DescribeEvaluationsPages except
  1606. // it takes a Context and allows setting request options on the pages.
  1607. //
  1608. // The context must be non-nil and will be used for request cancellation. If
  1609. // the context is nil a panic will occur. In the future the SDK may create
  1610. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1611. // for more information on using Contexts.
  1612. func (c *MachineLearning) DescribeEvaluationsPagesWithContext(ctx aws.Context, input *DescribeEvaluationsInput, fn func(*DescribeEvaluationsOutput, bool) bool, opts ...request.Option) error {
  1613. p := request.Pagination{
  1614. NewRequest: func() (*request.Request, error) {
  1615. var inCpy *DescribeEvaluationsInput
  1616. if input != nil {
  1617. tmp := *input
  1618. inCpy = &tmp
  1619. }
  1620. req, _ := c.DescribeEvaluationsRequest(inCpy)
  1621. req.SetContext(ctx)
  1622. req.ApplyOptions(opts...)
  1623. return req, nil
  1624. },
  1625. }
  1626. cont := true
  1627. for p.Next() && cont {
  1628. cont = fn(p.Page().(*DescribeEvaluationsOutput), !p.HasNextPage())
  1629. }
  1630. return p.Err()
  1631. }
  1632. const opDescribeMLModels = "DescribeMLModels"
  1633. // DescribeMLModelsRequest generates a "aws/request.Request" representing the
  1634. // client's request for the DescribeMLModels operation. The "output" return
  1635. // value will be populated with the request's response once the request completes
  1636. // successfully.
  1637. //
  1638. // Use "Send" method on the returned Request to send the API call to the service.
  1639. // the "output" return value is not valid until after Send returns without error.
  1640. //
  1641. // See DescribeMLModels for more information on using the DescribeMLModels
  1642. // API call, and error handling.
  1643. //
  1644. // This method is useful when you want to inject custom logic or configuration
  1645. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1646. //
  1647. //
  1648. // // Example sending a request using the DescribeMLModelsRequest method.
  1649. // req, resp := client.DescribeMLModelsRequest(params)
  1650. //
  1651. // err := req.Send()
  1652. // if err == nil { // resp is now filled
  1653. // fmt.Println(resp)
  1654. // }
  1655. func (c *MachineLearning) DescribeMLModelsRequest(input *DescribeMLModelsInput) (req *request.Request, output *DescribeMLModelsOutput) {
  1656. op := &request.Operation{
  1657. Name: opDescribeMLModels,
  1658. HTTPMethod: "POST",
  1659. HTTPPath: "/",
  1660. Paginator: &request.Paginator{
  1661. InputTokens: []string{"NextToken"},
  1662. OutputTokens: []string{"NextToken"},
  1663. LimitToken: "Limit",
  1664. TruncationToken: "",
  1665. },
  1666. }
  1667. if input == nil {
  1668. input = &DescribeMLModelsInput{}
  1669. }
  1670. output = &DescribeMLModelsOutput{}
  1671. req = c.newRequest(op, input, output)
  1672. return
  1673. }
  1674. // DescribeMLModels API operation for Amazon Machine Learning.
  1675. //
  1676. // Returns a list of MLModel that match the search criteria in the request.
  1677. //
  1678. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1679. // with awserr.Error's Code and Message methods to get detailed information about
  1680. // the error.
  1681. //
  1682. // See the AWS API reference guide for Amazon Machine Learning's
  1683. // API operation DescribeMLModels for usage and error information.
  1684. //
  1685. // Returned Error Codes:
  1686. // * ErrCodeInvalidInputException "InvalidInputException"
  1687. // An error on the client occurred. Typically, the cause is an invalid input
  1688. // value.
  1689. //
  1690. // * ErrCodeInternalServerException "InternalServerException"
  1691. // An error on the server occurred when trying to process a request.
  1692. //
  1693. func (c *MachineLearning) DescribeMLModels(input *DescribeMLModelsInput) (*DescribeMLModelsOutput, error) {
  1694. req, out := c.DescribeMLModelsRequest(input)
  1695. return out, req.Send()
  1696. }
  1697. // DescribeMLModelsWithContext is the same as DescribeMLModels with the addition of
  1698. // the ability to pass a context and additional request options.
  1699. //
  1700. // See DescribeMLModels for details on how to use this API operation.
  1701. //
  1702. // The context must be non-nil and will be used for request cancellation. If
  1703. // the context is nil a panic will occur. In the future the SDK may create
  1704. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1705. // for more information on using Contexts.
  1706. func (c *MachineLearning) DescribeMLModelsWithContext(ctx aws.Context, input *DescribeMLModelsInput, opts ...request.Option) (*DescribeMLModelsOutput, error) {
  1707. req, out := c.DescribeMLModelsRequest(input)
  1708. req.SetContext(ctx)
  1709. req.ApplyOptions(opts...)
  1710. return out, req.Send()
  1711. }
  1712. // DescribeMLModelsPages iterates over the pages of a DescribeMLModels operation,
  1713. // calling the "fn" function with the response data for each page. To stop
  1714. // iterating, return false from the fn function.
  1715. //
  1716. // See DescribeMLModels method for more information on how to use this operation.
  1717. //
  1718. // Note: This operation can generate multiple requests to a service.
  1719. //
  1720. // // Example iterating over at most 3 pages of a DescribeMLModels operation.
  1721. // pageNum := 0
  1722. // err := client.DescribeMLModelsPages(params,
  1723. // func(page *DescribeMLModelsOutput, lastPage bool) bool {
  1724. // pageNum++
  1725. // fmt.Println(page)
  1726. // return pageNum <= 3
  1727. // })
  1728. //
  1729. func (c *MachineLearning) DescribeMLModelsPages(input *DescribeMLModelsInput, fn func(*DescribeMLModelsOutput, bool) bool) error {
  1730. return c.DescribeMLModelsPagesWithContext(aws.BackgroundContext(), input, fn)
  1731. }
  1732. // DescribeMLModelsPagesWithContext same as DescribeMLModelsPages except
  1733. // it takes a Context and allows setting request options on the pages.
  1734. //
  1735. // The context must be non-nil and will be used for request cancellation. If
  1736. // the context is nil a panic will occur. In the future the SDK may create
  1737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1738. // for more information on using Contexts.
  1739. func (c *MachineLearning) DescribeMLModelsPagesWithContext(ctx aws.Context, input *DescribeMLModelsInput, fn func(*DescribeMLModelsOutput, bool) bool, opts ...request.Option) error {
  1740. p := request.Pagination{
  1741. NewRequest: func() (*request.Request, error) {
  1742. var inCpy *DescribeMLModelsInput
  1743. if input != nil {
  1744. tmp := *input
  1745. inCpy = &tmp
  1746. }
  1747. req, _ := c.DescribeMLModelsRequest(inCpy)
  1748. req.SetContext(ctx)
  1749. req.ApplyOptions(opts...)
  1750. return req, nil
  1751. },
  1752. }
  1753. cont := true
  1754. for p.Next() && cont {
  1755. cont = fn(p.Page().(*DescribeMLModelsOutput), !p.HasNextPage())
  1756. }
  1757. return p.Err()
  1758. }
  1759. const opDescribeTags = "DescribeTags"
  1760. // DescribeTagsRequest generates a "aws/request.Request" representing the
  1761. // client's request for the DescribeTags operation. The "output" return
  1762. // value will be populated with the request's response once the request completes
  1763. // successfully.
  1764. //
  1765. // Use "Send" method on the returned Request to send the API call to the service.
  1766. // the "output" return value is not valid until after Send returns without error.
  1767. //
  1768. // See DescribeTags for more information on using the DescribeTags
  1769. // API call, and error handling.
  1770. //
  1771. // This method is useful when you want to inject custom logic or configuration
  1772. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1773. //
  1774. //
  1775. // // Example sending a request using the DescribeTagsRequest method.
  1776. // req, resp := client.DescribeTagsRequest(params)
  1777. //
  1778. // err := req.Send()
  1779. // if err == nil { // resp is now filled
  1780. // fmt.Println(resp)
  1781. // }
  1782. func (c *MachineLearning) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  1783. op := &request.Operation{
  1784. Name: opDescribeTags,
  1785. HTTPMethod: "POST",
  1786. HTTPPath: "/",
  1787. }
  1788. if input == nil {
  1789. input = &DescribeTagsInput{}
  1790. }
  1791. output = &DescribeTagsOutput{}
  1792. req = c.newRequest(op, input, output)
  1793. return
  1794. }
  1795. // DescribeTags API operation for Amazon Machine Learning.
  1796. //
  1797. // Describes one or more of the tags for your Amazon ML object.
  1798. //
  1799. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1800. // with awserr.Error's Code and Message methods to get detailed information about
  1801. // the error.
  1802. //
  1803. // See the AWS API reference guide for Amazon Machine Learning's
  1804. // API operation DescribeTags for usage and error information.
  1805. //
  1806. // Returned Error Codes:
  1807. // * ErrCodeInvalidInputException "InvalidInputException"
  1808. // An error on the client occurred. Typically, the cause is an invalid input
  1809. // value.
  1810. //
  1811. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1812. // A specified resource cannot be located.
  1813. //
  1814. // * ErrCodeInternalServerException "InternalServerException"
  1815. // An error on the server occurred when trying to process a request.
  1816. //
  1817. func (c *MachineLearning) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  1818. req, out := c.DescribeTagsRequest(input)
  1819. return out, req.Send()
  1820. }
  1821. // DescribeTagsWithContext is the same as DescribeTags with the addition of
  1822. // the ability to pass a context and additional request options.
  1823. //
  1824. // See DescribeTags for details on how to use this API operation.
  1825. //
  1826. // The context must be non-nil and will be used for request cancellation. If
  1827. // the context is nil a panic will occur. In the future the SDK may create
  1828. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1829. // for more information on using Contexts.
  1830. func (c *MachineLearning) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
  1831. req, out := c.DescribeTagsRequest(input)
  1832. req.SetContext(ctx)
  1833. req.ApplyOptions(opts...)
  1834. return out, req.Send()
  1835. }
  1836. const opGetBatchPrediction = "GetBatchPrediction"
  1837. // GetBatchPredictionRequest generates a "aws/request.Request" representing the
  1838. // client's request for the GetBatchPrediction operation. The "output" return
  1839. // value will be populated with the request's response once the request completes
  1840. // successfully.
  1841. //
  1842. // Use "Send" method on the returned Request to send the API call to the service.
  1843. // the "output" return value is not valid until after Send returns without error.
  1844. //
  1845. // See GetBatchPrediction for more information on using the GetBatchPrediction
  1846. // API call, and error handling.
  1847. //
  1848. // This method is useful when you want to inject custom logic or configuration
  1849. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1850. //
  1851. //
  1852. // // Example sending a request using the GetBatchPredictionRequest method.
  1853. // req, resp := client.GetBatchPredictionRequest(params)
  1854. //
  1855. // err := req.Send()
  1856. // if err == nil { // resp is now filled
  1857. // fmt.Println(resp)
  1858. // }
  1859. func (c *MachineLearning) GetBatchPredictionRequest(input *GetBatchPredictionInput) (req *request.Request, output *GetBatchPredictionOutput) {
  1860. op := &request.Operation{
  1861. Name: opGetBatchPrediction,
  1862. HTTPMethod: "POST",
  1863. HTTPPath: "/",
  1864. }
  1865. if input == nil {
  1866. input = &GetBatchPredictionInput{}
  1867. }
  1868. output = &GetBatchPredictionOutput{}
  1869. req = c.newRequest(op, input, output)
  1870. return
  1871. }
  1872. // GetBatchPrediction API operation for Amazon Machine Learning.
  1873. //
  1874. // Returns a BatchPrediction that includes detailed metadata, status, and data
  1875. // file information for a Batch Prediction request.
  1876. //
  1877. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1878. // with awserr.Error's Code and Message methods to get detailed information about
  1879. // the error.
  1880. //
  1881. // See the AWS API reference guide for Amazon Machine Learning's
  1882. // API operation GetBatchPrediction for usage and error information.
  1883. //
  1884. // Returned Error Codes:
  1885. // * ErrCodeInvalidInputException "InvalidInputException"
  1886. // An error on the client occurred. Typically, the cause is an invalid input
  1887. // value.
  1888. //
  1889. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1890. // A specified resource cannot be located.
  1891. //
  1892. // * ErrCodeInternalServerException "InternalServerException"
  1893. // An error on the server occurred when trying to process a request.
  1894. //
  1895. func (c *MachineLearning) GetBatchPrediction(input *GetBatchPredictionInput) (*GetBatchPredictionOutput, error) {
  1896. req, out := c.GetBatchPredictionRequest(input)
  1897. return out, req.Send()
  1898. }
  1899. // GetBatchPredictionWithContext is the same as GetBatchPrediction with the addition of
  1900. // the ability to pass a context and additional request options.
  1901. //
  1902. // See GetBatchPrediction for details on how to use this API operation.
  1903. //
  1904. // The context must be non-nil and will be used for request cancellation. If
  1905. // the context is nil a panic will occur. In the future the SDK may create
  1906. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1907. // for more information on using Contexts.
  1908. func (c *MachineLearning) GetBatchPredictionWithContext(ctx aws.Context, input *GetBatchPredictionInput, opts ...request.Option) (*GetBatchPredictionOutput, error) {
  1909. req, out := c.GetBatchPredictionRequest(input)
  1910. req.SetContext(ctx)
  1911. req.ApplyOptions(opts...)
  1912. return out, req.Send()
  1913. }
  1914. const opGetDataSource = "GetDataSource"
  1915. // GetDataSourceRequest generates a "aws/request.Request" representing the
  1916. // client's request for the GetDataSource operation. The "output" return
  1917. // value will be populated with the request's response once the request completes
  1918. // successfully.
  1919. //
  1920. // Use "Send" method on the returned Request to send the API call to the service.
  1921. // the "output" return value is not valid until after Send returns without error.
  1922. //
  1923. // See GetDataSource for more information on using the GetDataSource
  1924. // API call, and error handling.
  1925. //
  1926. // This method is useful when you want to inject custom logic or configuration
  1927. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1928. //
  1929. //
  1930. // // Example sending a request using the GetDataSourceRequest method.
  1931. // req, resp := client.GetDataSourceRequest(params)
  1932. //
  1933. // err := req.Send()
  1934. // if err == nil { // resp is now filled
  1935. // fmt.Println(resp)
  1936. // }
  1937. func (c *MachineLearning) GetDataSourceRequest(input *GetDataSourceInput) (req *request.Request, output *GetDataSourceOutput) {
  1938. op := &request.Operation{
  1939. Name: opGetDataSource,
  1940. HTTPMethod: "POST",
  1941. HTTPPath: "/",
  1942. }
  1943. if input == nil {
  1944. input = &GetDataSourceInput{}
  1945. }
  1946. output = &GetDataSourceOutput{}
  1947. req = c.newRequest(op, input, output)
  1948. return
  1949. }
  1950. // GetDataSource API operation for Amazon Machine Learning.
  1951. //
  1952. // Returns a DataSource that includes metadata and data file information, as
  1953. // well as the current status of the DataSource.
  1954. //
  1955. // GetDataSource provides results in normal or verbose format. The verbose format
  1956. // adds the schema description and the list of files pointed to by the DataSource
  1957. // to the normal format.
  1958. //
  1959. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1960. // with awserr.Error's Code and Message methods to get detailed information about
  1961. // the error.
  1962. //
  1963. // See the AWS API reference guide for Amazon Machine Learning's
  1964. // API operation GetDataSource for usage and error information.
  1965. //
  1966. // Returned Error Codes:
  1967. // * ErrCodeInvalidInputException "InvalidInputException"
  1968. // An error on the client occurred. Typically, the cause is an invalid input
  1969. // value.
  1970. //
  1971. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1972. // A specified resource cannot be located.
  1973. //
  1974. // * ErrCodeInternalServerException "InternalServerException"
  1975. // An error on the server occurred when trying to process a request.
  1976. //
  1977. func (c *MachineLearning) GetDataSource(input *GetDataSourceInput) (*GetDataSourceOutput, error) {
  1978. req, out := c.GetDataSourceRequest(input)
  1979. return out, req.Send()
  1980. }
  1981. // GetDataSourceWithContext is the same as GetDataSource with the addition of
  1982. // the ability to pass a context and additional request options.
  1983. //
  1984. // See GetDataSource for details on how to use this API operation.
  1985. //
  1986. // The context must be non-nil and will be used for request cancellation. If
  1987. // the context is nil a panic will occur. In the future the SDK may create
  1988. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1989. // for more information on using Contexts.
  1990. func (c *MachineLearning) GetDataSourceWithContext(ctx aws.Context, input *GetDataSourceInput, opts ...request.Option) (*GetDataSourceOutput, error) {
  1991. req, out := c.GetDataSourceRequest(input)
  1992. req.SetContext(ctx)
  1993. req.ApplyOptions(opts...)
  1994. return out, req.Send()
  1995. }
  1996. const opGetEvaluation = "GetEvaluation"
  1997. // GetEvaluationRequest generates a "aws/request.Request" representing the
  1998. // client's request for the GetEvaluation operation. The "output" return
  1999. // value will be populated with the request's response once the request completes
  2000. // successfully.
  2001. //
  2002. // Use "Send" method on the returned Request to send the API call to the service.
  2003. // the "output" return value is not valid until after Send returns without error.
  2004. //
  2005. // See GetEvaluation for more information on using the GetEvaluation
  2006. // API call, and error handling.
  2007. //
  2008. // This method is useful when you want to inject custom logic or configuration
  2009. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2010. //
  2011. //
  2012. // // Example sending a request using the GetEvaluationRequest method.
  2013. // req, resp := client.GetEvaluationRequest(params)
  2014. //
  2015. // err := req.Send()
  2016. // if err == nil { // resp is now filled
  2017. // fmt.Println(resp)
  2018. // }
  2019. func (c *MachineLearning) GetEvaluationRequest(input *GetEvaluationInput) (req *request.Request, output *GetEvaluationOutput) {
  2020. op := &request.Operation{
  2021. Name: opGetEvaluation,
  2022. HTTPMethod: "POST",
  2023. HTTPPath: "/",
  2024. }
  2025. if input == nil {
  2026. input = &GetEvaluationInput{}
  2027. }
  2028. output = &GetEvaluationOutput{}
  2029. req = c.newRequest(op, input, output)
  2030. return
  2031. }
  2032. // GetEvaluation API operation for Amazon Machine Learning.
  2033. //
  2034. // Returns an Evaluation that includes metadata as well as the current status
  2035. // of the Evaluation.
  2036. //
  2037. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2038. // with awserr.Error's Code and Message methods to get detailed information about
  2039. // the error.
  2040. //
  2041. // See the AWS API reference guide for Amazon Machine Learning's
  2042. // API operation GetEvaluation for usage and error information.
  2043. //
  2044. // Returned Error Codes:
  2045. // * ErrCodeInvalidInputException "InvalidInputException"
  2046. // An error on the client occurred. Typically, the cause is an invalid input
  2047. // value.
  2048. //
  2049. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2050. // A specified resource cannot be located.
  2051. //
  2052. // * ErrCodeInternalServerException "InternalServerException"
  2053. // An error on the server occurred when trying to process a request.
  2054. //
  2055. func (c *MachineLearning) GetEvaluation(input *GetEvaluationInput) (*GetEvaluationOutput, error) {
  2056. req, out := c.GetEvaluationRequest(input)
  2057. return out, req.Send()
  2058. }
  2059. // GetEvaluationWithContext is the same as GetEvaluation with the addition of
  2060. // the ability to pass a context and additional request options.
  2061. //
  2062. // See GetEvaluation for details on how to use this API operation.
  2063. //
  2064. // The context must be non-nil and will be used for request cancellation. If
  2065. // the context is nil a panic will occur. In the future the SDK may create
  2066. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2067. // for more information on using Contexts.
  2068. func (c *MachineLearning) GetEvaluationWithContext(ctx aws.Context, input *GetEvaluationInput, opts ...request.Option) (*GetEvaluationOutput, error) {
  2069. req, out := c.GetEvaluationRequest(input)
  2070. req.SetContext(ctx)
  2071. req.ApplyOptions(opts...)
  2072. return out, req.Send()
  2073. }
  2074. const opGetMLModel = "GetMLModel"
  2075. // GetMLModelRequest generates a "aws/request.Request" representing the
  2076. // client's request for the GetMLModel operation. The "output" return
  2077. // value will be populated with the request's response once the request completes
  2078. // successfully.
  2079. //
  2080. // Use "Send" method on the returned Request to send the API call to the service.
  2081. // the "output" return value is not valid until after Send returns without error.
  2082. //
  2083. // See GetMLModel for more information on using the GetMLModel
  2084. // API call, and error handling.
  2085. //
  2086. // This method is useful when you want to inject custom logic or configuration
  2087. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2088. //
  2089. //
  2090. // // Example sending a request using the GetMLModelRequest method.
  2091. // req, resp := client.GetMLModelRequest(params)
  2092. //
  2093. // err := req.Send()
  2094. // if err == nil { // resp is now filled
  2095. // fmt.Println(resp)
  2096. // }
  2097. func (c *MachineLearning) GetMLModelRequest(input *GetMLModelInput) (req *request.Request, output *GetMLModelOutput) {
  2098. op := &request.Operation{
  2099. Name: opGetMLModel,
  2100. HTTPMethod: "POST",
  2101. HTTPPath: "/",
  2102. }
  2103. if input == nil {
  2104. input = &GetMLModelInput{}
  2105. }
  2106. output = &GetMLModelOutput{}
  2107. req = c.newRequest(op, input, output)
  2108. return
  2109. }
  2110. // GetMLModel API operation for Amazon Machine Learning.
  2111. //
  2112. // Returns an MLModel that includes detailed metadata, data source information,
  2113. // and the current status of the MLModel.
  2114. //
  2115. // GetMLModel provides results in normal or verbose format.
  2116. //
  2117. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2118. // with awserr.Error's Code and Message methods to get detailed information about
  2119. // the error.
  2120. //
  2121. // See the AWS API reference guide for Amazon Machine Learning's
  2122. // API operation GetMLModel for usage and error information.
  2123. //
  2124. // Returned Error Codes:
  2125. // * ErrCodeInvalidInputException "InvalidInputException"
  2126. // An error on the client occurred. Typically, the cause is an invalid input
  2127. // value.
  2128. //
  2129. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2130. // A specified resource cannot be located.
  2131. //
  2132. // * ErrCodeInternalServerException "InternalServerException"
  2133. // An error on the server occurred when trying to process a request.
  2134. //
  2135. func (c *MachineLearning) GetMLModel(input *GetMLModelInput) (*GetMLModelOutput, error) {
  2136. req, out := c.GetMLModelRequest(input)
  2137. return out, req.Send()
  2138. }
  2139. // GetMLModelWithContext is the same as GetMLModel with the addition of
  2140. // the ability to pass a context and additional request options.
  2141. //
  2142. // See GetMLModel for details on how to use this API operation.
  2143. //
  2144. // The context must be non-nil and will be used for request cancellation. If
  2145. // the context is nil a panic will occur. In the future the SDK may create
  2146. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2147. // for more information on using Contexts.
  2148. func (c *MachineLearning) GetMLModelWithContext(ctx aws.Context, input *GetMLModelInput, opts ...request.Option) (*GetMLModelOutput, error) {
  2149. req, out := c.GetMLModelRequest(input)
  2150. req.SetContext(ctx)
  2151. req.ApplyOptions(opts...)
  2152. return out, req.Send()
  2153. }
  2154. const opPredict = "Predict"
  2155. // PredictRequest generates a "aws/request.Request" representing the
  2156. // client's request for the Predict operation. The "output" return
  2157. // value will be populated with the request's response once the request completes
  2158. // successfully.
  2159. //
  2160. // Use "Send" method on the returned Request to send the API call to the service.
  2161. // the "output" return value is not valid until after Send returns without error.
  2162. //
  2163. // See Predict for more information on using the Predict
  2164. // API call, and error handling.
  2165. //
  2166. // This method is useful when you want to inject custom logic or configuration
  2167. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2168. //
  2169. //
  2170. // // Example sending a request using the PredictRequest method.
  2171. // req, resp := client.PredictRequest(params)
  2172. //
  2173. // err := req.Send()
  2174. // if err == nil { // resp is now filled
  2175. // fmt.Println(resp)
  2176. // }
  2177. func (c *MachineLearning) PredictRequest(input *PredictInput) (req *request.Request, output *PredictOutput) {
  2178. op := &request.Operation{
  2179. Name: opPredict,
  2180. HTTPMethod: "POST",
  2181. HTTPPath: "/",
  2182. }
  2183. if input == nil {
  2184. input = &PredictInput{}
  2185. }
  2186. output = &PredictOutput{}
  2187. req = c.newRequest(op, input, output)
  2188. return
  2189. }
  2190. // Predict API operation for Amazon Machine Learning.
  2191. //
  2192. // Generates a prediction for the observation using the specified ML Model.
  2193. //
  2194. // NoteNot all response parameters will be populated. Whether a response parameter
  2195. // is populated depends on the type of model requested.
  2196. //
  2197. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2198. // with awserr.Error's Code and Message methods to get detailed information about
  2199. // the error.
  2200. //
  2201. // See the AWS API reference guide for Amazon Machine Learning's
  2202. // API operation Predict for usage and error information.
  2203. //
  2204. // Returned Error Codes:
  2205. // * ErrCodeInvalidInputException "InvalidInputException"
  2206. // An error on the client occurred. Typically, the cause is an invalid input
  2207. // value.
  2208. //
  2209. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2210. // A specified resource cannot be located.
  2211. //
  2212. // * ErrCodeLimitExceededException "LimitExceededException"
  2213. // The subscriber exceeded the maximum number of operations. This exception
  2214. // can occur when listing objects such as DataSource.
  2215. //
  2216. // * ErrCodeInternalServerException "InternalServerException"
  2217. // An error on the server occurred when trying to process a request.
  2218. //
  2219. // * ErrCodePredictorNotMountedException "PredictorNotMountedException"
  2220. // The exception is thrown when a predict request is made to an unmounted MLModel.
  2221. //
  2222. func (c *MachineLearning) Predict(input *PredictInput) (*PredictOutput, error) {
  2223. req, out := c.PredictRequest(input)
  2224. return out, req.Send()
  2225. }
  2226. // PredictWithContext is the same as Predict with the addition of
  2227. // the ability to pass a context and additional request options.
  2228. //
  2229. // See Predict for details on how to use this API operation.
  2230. //
  2231. // The context must be non-nil and will be used for request cancellation. If
  2232. // the context is nil a panic will occur. In the future the SDK may create
  2233. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2234. // for more information on using Contexts.
  2235. func (c *MachineLearning) PredictWithContext(ctx aws.Context, input *PredictInput, opts ...request.Option) (*PredictOutput, error) {
  2236. req, out := c.PredictRequest(input)
  2237. req.SetContext(ctx)
  2238. req.ApplyOptions(opts...)
  2239. return out, req.Send()
  2240. }
  2241. const opUpdateBatchPrediction = "UpdateBatchPrediction"
  2242. // UpdateBatchPredictionRequest generates a "aws/request.Request" representing the
  2243. // client's request for the UpdateBatchPrediction operation. The "output" return
  2244. // value will be populated with the request's response once the request completes
  2245. // successfully.
  2246. //
  2247. // Use "Send" method on the returned Request to send the API call to the service.
  2248. // the "output" return value is not valid until after Send returns without error.
  2249. //
  2250. // See UpdateBatchPrediction for more information on using the UpdateBatchPrediction
  2251. // API call, and error handling.
  2252. //
  2253. // This method is useful when you want to inject custom logic or configuration
  2254. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2255. //
  2256. //
  2257. // // Example sending a request using the UpdateBatchPredictionRequest method.
  2258. // req, resp := client.UpdateBatchPredictionRequest(params)
  2259. //
  2260. // err := req.Send()
  2261. // if err == nil { // resp is now filled
  2262. // fmt.Println(resp)
  2263. // }
  2264. func (c *MachineLearning) UpdateBatchPredictionRequest(input *UpdateBatchPredictionInput) (req *request.Request, output *UpdateBatchPredictionOutput) {
  2265. op := &request.Operation{
  2266. Name: opUpdateBatchPrediction,
  2267. HTTPMethod: "POST",
  2268. HTTPPath: "/",
  2269. }
  2270. if input == nil {
  2271. input = &UpdateBatchPredictionInput{}
  2272. }
  2273. output = &UpdateBatchPredictionOutput{}
  2274. req = c.newRequest(op, input, output)
  2275. return
  2276. }
  2277. // UpdateBatchPrediction API operation for Amazon Machine Learning.
  2278. //
  2279. // Updates the BatchPredictionName of a BatchPrediction.
  2280. //
  2281. // You can use the GetBatchPrediction operation to view the contents of the
  2282. // updated data element.
  2283. //
  2284. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2285. // with awserr.Error's Code and Message methods to get detailed information about
  2286. // the error.
  2287. //
  2288. // See the AWS API reference guide for Amazon Machine Learning's
  2289. // API operation UpdateBatchPrediction for usage and error information.
  2290. //
  2291. // Returned Error Codes:
  2292. // * ErrCodeInvalidInputException "InvalidInputException"
  2293. // An error on the client occurred. Typically, the cause is an invalid input
  2294. // value.
  2295. //
  2296. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2297. // A specified resource cannot be located.
  2298. //
  2299. // * ErrCodeInternalServerException "InternalServerException"
  2300. // An error on the server occurred when trying to process a request.
  2301. //
  2302. func (c *MachineLearning) UpdateBatchPrediction(input *UpdateBatchPredictionInput) (*UpdateBatchPredictionOutput, error) {
  2303. req, out := c.UpdateBatchPredictionRequest(input)
  2304. return out, req.Send()
  2305. }
  2306. // UpdateBatchPredictionWithContext is the same as UpdateBatchPrediction with the addition of
  2307. // the ability to pass a context and additional request options.
  2308. //
  2309. // See UpdateBatchPrediction for details on how to use this API operation.
  2310. //
  2311. // The context must be non-nil and will be used for request cancellation. If
  2312. // the context is nil a panic will occur. In the future the SDK may create
  2313. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2314. // for more information on using Contexts.
  2315. func (c *MachineLearning) UpdateBatchPredictionWithContext(ctx aws.Context, input *UpdateBatchPredictionInput, opts ...request.Option) (*UpdateBatchPredictionOutput, error) {
  2316. req, out := c.UpdateBatchPredictionRequest(input)
  2317. req.SetContext(ctx)
  2318. req.ApplyOptions(opts...)
  2319. return out, req.Send()
  2320. }
  2321. const opUpdateDataSource = "UpdateDataSource"
  2322. // UpdateDataSourceRequest generates a "aws/request.Request" representing the
  2323. // client's request for the UpdateDataSource operation. The "output" return
  2324. // value will be populated with the request's response once the request completes
  2325. // successfully.
  2326. //
  2327. // Use "Send" method on the returned Request to send the API call to the service.
  2328. // the "output" return value is not valid until after Send returns without error.
  2329. //
  2330. // See UpdateDataSource for more information on using the UpdateDataSource
  2331. // API call, and error handling.
  2332. //
  2333. // This method is useful when you want to inject custom logic or configuration
  2334. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2335. //
  2336. //
  2337. // // Example sending a request using the UpdateDataSourceRequest method.
  2338. // req, resp := client.UpdateDataSourceRequest(params)
  2339. //
  2340. // err := req.Send()
  2341. // if err == nil { // resp is now filled
  2342. // fmt.Println(resp)
  2343. // }
  2344. func (c *MachineLearning) UpdateDataSourceRequest(input *UpdateDataSourceInput) (req *request.Request, output *UpdateDataSourceOutput) {
  2345. op := &request.Operation{
  2346. Name: opUpdateDataSource,
  2347. HTTPMethod: "POST",
  2348. HTTPPath: "/",
  2349. }
  2350. if input == nil {
  2351. input = &UpdateDataSourceInput{}
  2352. }
  2353. output = &UpdateDataSourceOutput{}
  2354. req = c.newRequest(op, input, output)
  2355. return
  2356. }
  2357. // UpdateDataSource API operation for Amazon Machine Learning.
  2358. //
  2359. // Updates the DataSourceName of a DataSource.
  2360. //
  2361. // You can use the GetDataSource operation to view the contents of the updated
  2362. // data element.
  2363. //
  2364. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2365. // with awserr.Error's Code and Message methods to get detailed information about
  2366. // the error.
  2367. //
  2368. // See the AWS API reference guide for Amazon Machine Learning's
  2369. // API operation UpdateDataSource for usage and error information.
  2370. //
  2371. // Returned Error Codes:
  2372. // * ErrCodeInvalidInputException "InvalidInputException"
  2373. // An error on the client occurred. Typically, the cause is an invalid input
  2374. // value.
  2375. //
  2376. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2377. // A specified resource cannot be located.
  2378. //
  2379. // * ErrCodeInternalServerException "InternalServerException"
  2380. // An error on the server occurred when trying to process a request.
  2381. //
  2382. func (c *MachineLearning) UpdateDataSource(input *UpdateDataSourceInput) (*UpdateDataSourceOutput, error) {
  2383. req, out := c.UpdateDataSourceRequest(input)
  2384. return out, req.Send()
  2385. }
  2386. // UpdateDataSourceWithContext is the same as UpdateDataSource with the addition of
  2387. // the ability to pass a context and additional request options.
  2388. //
  2389. // See UpdateDataSource for details on how to use this API operation.
  2390. //
  2391. // The context must be non-nil and will be used for request cancellation. If
  2392. // the context is nil a panic will occur. In the future the SDK may create
  2393. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2394. // for more information on using Contexts.
  2395. func (c *MachineLearning) UpdateDataSourceWithContext(ctx aws.Context, input *UpdateDataSourceInput, opts ...request.Option) (*UpdateDataSourceOutput, error) {
  2396. req, out := c.UpdateDataSourceRequest(input)
  2397. req.SetContext(ctx)
  2398. req.ApplyOptions(opts...)
  2399. return out, req.Send()
  2400. }
  2401. const opUpdateEvaluation = "UpdateEvaluation"
  2402. // UpdateEvaluationRequest generates a "aws/request.Request" representing the
  2403. // client's request for the UpdateEvaluation operation. The "output" return
  2404. // value will be populated with the request's response once the request completes
  2405. // successfully.
  2406. //
  2407. // Use "Send" method on the returned Request to send the API call to the service.
  2408. // the "output" return value is not valid until after Send returns without error.
  2409. //
  2410. // See UpdateEvaluation for more information on using the UpdateEvaluation
  2411. // API call, and error handling.
  2412. //
  2413. // This method is useful when you want to inject custom logic or configuration
  2414. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2415. //
  2416. //
  2417. // // Example sending a request using the UpdateEvaluationRequest method.
  2418. // req, resp := client.UpdateEvaluationRequest(params)
  2419. //
  2420. // err := req.Send()
  2421. // if err == nil { // resp is now filled
  2422. // fmt.Println(resp)
  2423. // }
  2424. func (c *MachineLearning) UpdateEvaluationRequest(input *UpdateEvaluationInput) (req *request.Request, output *UpdateEvaluationOutput) {
  2425. op := &request.Operation{
  2426. Name: opUpdateEvaluation,
  2427. HTTPMethod: "POST",
  2428. HTTPPath: "/",
  2429. }
  2430. if input == nil {
  2431. input = &UpdateEvaluationInput{}
  2432. }
  2433. output = &UpdateEvaluationOutput{}
  2434. req = c.newRequest(op, input, output)
  2435. return
  2436. }
  2437. // UpdateEvaluation API operation for Amazon Machine Learning.
  2438. //
  2439. // Updates the EvaluationName of an Evaluation.
  2440. //
  2441. // You can use the GetEvaluation operation to view the contents of the updated
  2442. // data element.
  2443. //
  2444. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2445. // with awserr.Error's Code and Message methods to get detailed information about
  2446. // the error.
  2447. //
  2448. // See the AWS API reference guide for Amazon Machine Learning's
  2449. // API operation UpdateEvaluation for usage and error information.
  2450. //
  2451. // Returned Error Codes:
  2452. // * ErrCodeInvalidInputException "InvalidInputException"
  2453. // An error on the client occurred. Typically, the cause is an invalid input
  2454. // value.
  2455. //
  2456. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2457. // A specified resource cannot be located.
  2458. //
  2459. // * ErrCodeInternalServerException "InternalServerException"
  2460. // An error on the server occurred when trying to process a request.
  2461. //
  2462. func (c *MachineLearning) UpdateEvaluation(input *UpdateEvaluationInput) (*UpdateEvaluationOutput, error) {
  2463. req, out := c.UpdateEvaluationRequest(input)
  2464. return out, req.Send()
  2465. }
  2466. // UpdateEvaluationWithContext is the same as UpdateEvaluation with the addition of
  2467. // the ability to pass a context and additional request options.
  2468. //
  2469. // See UpdateEvaluation for details on how to use this API operation.
  2470. //
  2471. // The context must be non-nil and will be used for request cancellation. If
  2472. // the context is nil a panic will occur. In the future the SDK may create
  2473. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2474. // for more information on using Contexts.
  2475. func (c *MachineLearning) UpdateEvaluationWithContext(ctx aws.Context, input *UpdateEvaluationInput, opts ...request.Option) (*UpdateEvaluationOutput, error) {
  2476. req, out := c.UpdateEvaluationRequest(input)
  2477. req.SetContext(ctx)
  2478. req.ApplyOptions(opts...)
  2479. return out, req.Send()
  2480. }
  2481. const opUpdateMLModel = "UpdateMLModel"
  2482. // UpdateMLModelRequest generates a "aws/request.Request" representing the
  2483. // client's request for the UpdateMLModel operation. The "output" return
  2484. // value will be populated with the request's response once the request completes
  2485. // successfully.
  2486. //
  2487. // Use "Send" method on the returned Request to send the API call to the service.
  2488. // the "output" return value is not valid until after Send returns without error.
  2489. //
  2490. // See UpdateMLModel for more information on using the UpdateMLModel
  2491. // API call, and error handling.
  2492. //
  2493. // This method is useful when you want to inject custom logic or configuration
  2494. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2495. //
  2496. //
  2497. // // Example sending a request using the UpdateMLModelRequest method.
  2498. // req, resp := client.UpdateMLModelRequest(params)
  2499. //
  2500. // err := req.Send()
  2501. // if err == nil { // resp is now filled
  2502. // fmt.Println(resp)
  2503. // }
  2504. func (c *MachineLearning) UpdateMLModelRequest(input *UpdateMLModelInput) (req *request.Request, output *UpdateMLModelOutput) {
  2505. op := &request.Operation{
  2506. Name: opUpdateMLModel,
  2507. HTTPMethod: "POST",
  2508. HTTPPath: "/",
  2509. }
  2510. if input == nil {
  2511. input = &UpdateMLModelInput{}
  2512. }
  2513. output = &UpdateMLModelOutput{}
  2514. req = c.newRequest(op, input, output)
  2515. return
  2516. }
  2517. // UpdateMLModel API operation for Amazon Machine Learning.
  2518. //
  2519. // Updates the MLModelName and the ScoreThreshold of an MLModel.
  2520. //
  2521. // You can use the GetMLModel operation to view the contents of the updated
  2522. // data element.
  2523. //
  2524. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2525. // with awserr.Error's Code and Message methods to get detailed information about
  2526. // the error.
  2527. //
  2528. // See the AWS API reference guide for Amazon Machine Learning's
  2529. // API operation UpdateMLModel for usage and error information.
  2530. //
  2531. // Returned Error Codes:
  2532. // * ErrCodeInvalidInputException "InvalidInputException"
  2533. // An error on the client occurred. Typically, the cause is an invalid input
  2534. // value.
  2535. //
  2536. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2537. // A specified resource cannot be located.
  2538. //
  2539. // * ErrCodeInternalServerException "InternalServerException"
  2540. // An error on the server occurred when trying to process a request.
  2541. //
  2542. func (c *MachineLearning) UpdateMLModel(input *UpdateMLModelInput) (*UpdateMLModelOutput, error) {
  2543. req, out := c.UpdateMLModelRequest(input)
  2544. return out, req.Send()
  2545. }
  2546. // UpdateMLModelWithContext is the same as UpdateMLModel with the addition of
  2547. // the ability to pass a context and additional request options.
  2548. //
  2549. // See UpdateMLModel for details on how to use this API operation.
  2550. //
  2551. // The context must be non-nil and will be used for request cancellation. If
  2552. // the context is nil a panic will occur. In the future the SDK may create
  2553. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2554. // for more information on using Contexts.
  2555. func (c *MachineLearning) UpdateMLModelWithContext(ctx aws.Context, input *UpdateMLModelInput, opts ...request.Option) (*UpdateMLModelOutput, error) {
  2556. req, out := c.UpdateMLModelRequest(input)
  2557. req.SetContext(ctx)
  2558. req.ApplyOptions(opts...)
  2559. return out, req.Send()
  2560. }
  2561. type AddTagsInput struct {
  2562. _ struct{} `type:"structure"`
  2563. // The ID of the ML object to tag. For example, exampleModelId.
  2564. //
  2565. // ResourceId is a required field
  2566. ResourceId *string `min:"1" type:"string" required:"true"`
  2567. // The type of the ML object to tag.
  2568. //
  2569. // ResourceType is a required field
  2570. ResourceType *string `type:"string" required:"true" enum:"TaggableResourceType"`
  2571. // The key-value pairs to use to create tags. If you specify a key without specifying
  2572. // a value, Amazon ML creates a tag with the specified key and a value of null.
  2573. //
  2574. // Tags is a required field
  2575. Tags []*Tag `type:"list" required:"true"`
  2576. }
  2577. // String returns the string representation
  2578. func (s AddTagsInput) String() string {
  2579. return awsutil.Prettify(s)
  2580. }
  2581. // GoString returns the string representation
  2582. func (s AddTagsInput) GoString() string {
  2583. return s.String()
  2584. }
  2585. // Validate inspects the fields of the type to determine if they are valid.
  2586. func (s *AddTagsInput) Validate() error {
  2587. invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
  2588. if s.ResourceId == nil {
  2589. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  2590. }
  2591. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  2592. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  2593. }
  2594. if s.ResourceType == nil {
  2595. invalidParams.Add(request.NewErrParamRequired("ResourceType"))
  2596. }
  2597. if s.Tags == nil {
  2598. invalidParams.Add(request.NewErrParamRequired("Tags"))
  2599. }
  2600. if s.Tags != nil {
  2601. for i, v := range s.Tags {
  2602. if v == nil {
  2603. continue
  2604. }
  2605. if err := v.Validate(); err != nil {
  2606. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2607. }
  2608. }
  2609. }
  2610. if invalidParams.Len() > 0 {
  2611. return invalidParams
  2612. }
  2613. return nil
  2614. }
  2615. // SetResourceId sets the ResourceId field's value.
  2616. func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput {
  2617. s.ResourceId = &v
  2618. return s
  2619. }
  2620. // SetResourceType sets the ResourceType field's value.
  2621. func (s *AddTagsInput) SetResourceType(v string) *AddTagsInput {
  2622. s.ResourceType = &v
  2623. return s
  2624. }
  2625. // SetTags sets the Tags field's value.
  2626. func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput {
  2627. s.Tags = v
  2628. return s
  2629. }
  2630. // Amazon ML returns the following elements.
  2631. type AddTagsOutput struct {
  2632. _ struct{} `type:"structure"`
  2633. // The ID of the ML object that was tagged.
  2634. ResourceId *string `min:"1" type:"string"`
  2635. // The type of the ML object that was tagged.
  2636. ResourceType *string `type:"string" enum:"TaggableResourceType"`
  2637. }
  2638. // String returns the string representation
  2639. func (s AddTagsOutput) String() string {
  2640. return awsutil.Prettify(s)
  2641. }
  2642. // GoString returns the string representation
  2643. func (s AddTagsOutput) GoString() string {
  2644. return s.String()
  2645. }
  2646. // SetResourceId sets the ResourceId field's value.
  2647. func (s *AddTagsOutput) SetResourceId(v string) *AddTagsOutput {
  2648. s.ResourceId = &v
  2649. return s
  2650. }
  2651. // SetResourceType sets the ResourceType field's value.
  2652. func (s *AddTagsOutput) SetResourceType(v string) *AddTagsOutput {
  2653. s.ResourceType = &v
  2654. return s
  2655. }
  2656. // Represents the output of a GetBatchPrediction operation.
  2657. //
  2658. // The content consists of the detailed metadata, the status, and the data file
  2659. // information of a Batch Prediction.
  2660. type BatchPrediction struct {
  2661. _ struct{} `type:"structure"`
  2662. // The ID of the DataSource that points to the group of observations to predict.
  2663. BatchPredictionDataSourceId *string `min:"1" type:"string"`
  2664. // The ID assigned to the BatchPrediction at creation. This value should be
  2665. // identical to the value of the BatchPredictionID in the request.
  2666. BatchPredictionId *string `min:"1" type:"string"`
  2667. // Long integer type that is a 64-bit signed number.
  2668. ComputeTime *int64 `type:"long"`
  2669. // The time that the BatchPrediction was created. The time is expressed in epoch
  2670. // time.
  2671. CreatedAt *time.Time `type:"timestamp"`
  2672. // The AWS user account that invoked the BatchPrediction. The account type can
  2673. // be either an AWS root account or an AWS Identity and Access Management (IAM)
  2674. // user account.
  2675. CreatedByIamUser *string `type:"string"`
  2676. // A timestamp represented in epoch time.
  2677. FinishedAt *time.Time `type:"timestamp"`
  2678. // The location of the data file or directory in Amazon Simple Storage Service
  2679. // (Amazon S3).
  2680. InputDataLocationS3 *string `type:"string"`
  2681. // Long integer type that is a 64-bit signed number.
  2682. InvalidRecordCount *int64 `type:"long"`
  2683. // The time of the most recent edit to the BatchPrediction. The time is expressed
  2684. // in epoch time.
  2685. LastUpdatedAt *time.Time `type:"timestamp"`
  2686. // The ID of the MLModel that generated predictions for the BatchPrediction
  2687. // request.
  2688. MLModelId *string `min:"1" type:"string"`
  2689. // A description of the most recent details about processing the batch prediction
  2690. // request.
  2691. Message *string `type:"string"`
  2692. // A user-supplied name or description of the BatchPrediction.
  2693. Name *string `type:"string"`
  2694. // The location of an Amazon S3 bucket or directory to receive the operation
  2695. // results. The following substrings are not allowed in the s3 key portion of
  2696. // the outputURI field: ':', '//', '/./', '/../'.
  2697. OutputUri *string `type:"string"`
  2698. // A timestamp represented in epoch time.
  2699. StartedAt *time.Time `type:"timestamp"`
  2700. // The status of the BatchPrediction. This element can have one of the following
  2701. // values:
  2702. //
  2703. // * PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
  2704. // generate predictions for a batch of observations.
  2705. // * INPROGRESS - The process is underway.
  2706. // * FAILED - The request to perform a batch prediction did not run to completion.
  2707. // It is not usable.
  2708. // * COMPLETED - The batch prediction process completed successfully.
  2709. // * DELETED - The BatchPrediction is marked as deleted. It is not usable.
  2710. Status *string `type:"string" enum:"EntityStatus"`
  2711. // Long integer type that is a 64-bit signed number.
  2712. TotalRecordCount *int64 `type:"long"`
  2713. }
  2714. // String returns the string representation
  2715. func (s BatchPrediction) String() string {
  2716. return awsutil.Prettify(s)
  2717. }
  2718. // GoString returns the string representation
  2719. func (s BatchPrediction) GoString() string {
  2720. return s.String()
  2721. }
  2722. // SetBatchPredictionDataSourceId sets the BatchPredictionDataSourceId field's value.
  2723. func (s *BatchPrediction) SetBatchPredictionDataSourceId(v string) *BatchPrediction {
  2724. s.BatchPredictionDataSourceId = &v
  2725. return s
  2726. }
  2727. // SetBatchPredictionId sets the BatchPredictionId field's value.
  2728. func (s *BatchPrediction) SetBatchPredictionId(v string) *BatchPrediction {
  2729. s.BatchPredictionId = &v
  2730. return s
  2731. }
  2732. // SetComputeTime sets the ComputeTime field's value.
  2733. func (s *BatchPrediction) SetComputeTime(v int64) *BatchPrediction {
  2734. s.ComputeTime = &v
  2735. return s
  2736. }
  2737. // SetCreatedAt sets the CreatedAt field's value.
  2738. func (s *BatchPrediction) SetCreatedAt(v time.Time) *BatchPrediction {
  2739. s.CreatedAt = &v
  2740. return s
  2741. }
  2742. // SetCreatedByIamUser sets the CreatedByIamUser field's value.
  2743. func (s *BatchPrediction) SetCreatedByIamUser(v string) *BatchPrediction {
  2744. s.CreatedByIamUser = &v
  2745. return s
  2746. }
  2747. // SetFinishedAt sets the FinishedAt field's value.
  2748. func (s *BatchPrediction) SetFinishedAt(v time.Time) *BatchPrediction {
  2749. s.FinishedAt = &v
  2750. return s
  2751. }
  2752. // SetInputDataLocationS3 sets the InputDataLocationS3 field's value.
  2753. func (s *BatchPrediction) SetInputDataLocationS3(v string) *BatchPrediction {
  2754. s.InputDataLocationS3 = &v
  2755. return s
  2756. }
  2757. // SetInvalidRecordCount sets the InvalidRecordCount field's value.
  2758. func (s *BatchPrediction) SetInvalidRecordCount(v int64) *BatchPrediction {
  2759. s.InvalidRecordCount = &v
  2760. return s
  2761. }
  2762. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  2763. func (s *BatchPrediction) SetLastUpdatedAt(v time.Time) *BatchPrediction {
  2764. s.LastUpdatedAt = &v
  2765. return s
  2766. }
  2767. // SetMLModelId sets the MLModelId field's value.
  2768. func (s *BatchPrediction) SetMLModelId(v string) *BatchPrediction {
  2769. s.MLModelId = &v
  2770. return s
  2771. }
  2772. // SetMessage sets the Message field's value.
  2773. func (s *BatchPrediction) SetMessage(v string) *BatchPrediction {
  2774. s.Message = &v
  2775. return s
  2776. }
  2777. // SetName sets the Name field's value.
  2778. func (s *BatchPrediction) SetName(v string) *BatchPrediction {
  2779. s.Name = &v
  2780. return s
  2781. }
  2782. // SetOutputUri sets the OutputUri field's value.
  2783. func (s *BatchPrediction) SetOutputUri(v string) *BatchPrediction {
  2784. s.OutputUri = &v
  2785. return s
  2786. }
  2787. // SetStartedAt sets the StartedAt field's value.
  2788. func (s *BatchPrediction) SetStartedAt(v time.Time) *BatchPrediction {
  2789. s.StartedAt = &v
  2790. return s
  2791. }
  2792. // SetStatus sets the Status field's value.
  2793. func (s *BatchPrediction) SetStatus(v string) *BatchPrediction {
  2794. s.Status = &v
  2795. return s
  2796. }
  2797. // SetTotalRecordCount sets the TotalRecordCount field's value.
  2798. func (s *BatchPrediction) SetTotalRecordCount(v int64) *BatchPrediction {
  2799. s.TotalRecordCount = &v
  2800. return s
  2801. }
  2802. type CreateBatchPredictionInput struct {
  2803. _ struct{} `type:"structure"`
  2804. // The ID of the DataSource that points to the group of observations to predict.
  2805. //
  2806. // BatchPredictionDataSourceId is a required field
  2807. BatchPredictionDataSourceId *string `min:"1" type:"string" required:"true"`
  2808. // A user-supplied ID that uniquely identifies the BatchPrediction.
  2809. //
  2810. // BatchPredictionId is a required field
  2811. BatchPredictionId *string `min:"1" type:"string" required:"true"`
  2812. // A user-supplied name or description of the BatchPrediction. BatchPredictionName
  2813. // can only use the UTF-8 character set.
  2814. BatchPredictionName *string `type:"string"`
  2815. // The ID of the MLModel that will generate predictions for the group of observations.
  2816. //
  2817. // MLModelId is a required field
  2818. MLModelId *string `min:"1" type:"string" required:"true"`
  2819. // The location of an Amazon Simple Storage Service (Amazon S3) bucket or directory
  2820. // to store the batch prediction results. The following substrings are not allowed
  2821. // in the s3 key portion of the outputURI field: ':', '//', '/./', '/../'.
  2822. //
  2823. // Amazon ML needs permissions to store and retrieve the logs on your behalf.
  2824. // For information about how to set permissions, see the Amazon Machine Learning
  2825. // Developer Guide (http://docs.aws.amazon.com/machine-learning/latest/dg).
  2826. //
  2827. // OutputUri is a required field
  2828. OutputUri *string `type:"string" required:"true"`
  2829. }
  2830. // String returns the string representation
  2831. func (s CreateBatchPredictionInput) String() string {
  2832. return awsutil.Prettify(s)
  2833. }
  2834. // GoString returns the string representation
  2835. func (s CreateBatchPredictionInput) GoString() string {
  2836. return s.String()
  2837. }
  2838. // Validate inspects the fields of the type to determine if they are valid.
  2839. func (s *CreateBatchPredictionInput) Validate() error {
  2840. invalidParams := request.ErrInvalidParams{Context: "CreateBatchPredictionInput"}
  2841. if s.BatchPredictionDataSourceId == nil {
  2842. invalidParams.Add(request.NewErrParamRequired("BatchPredictionDataSourceId"))
  2843. }
  2844. if s.BatchPredictionDataSourceId != nil && len(*s.BatchPredictionDataSourceId) < 1 {
  2845. invalidParams.Add(request.NewErrParamMinLen("BatchPredictionDataSourceId", 1))
  2846. }
  2847. if s.BatchPredictionId == nil {
  2848. invalidParams.Add(request.NewErrParamRequired("BatchPredictionId"))
  2849. }
  2850. if s.BatchPredictionId != nil && len(*s.BatchPredictionId) < 1 {
  2851. invalidParams.Add(request.NewErrParamMinLen("BatchPredictionId", 1))
  2852. }
  2853. if s.MLModelId == nil {
  2854. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  2855. }
  2856. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  2857. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  2858. }
  2859. if s.OutputUri == nil {
  2860. invalidParams.Add(request.NewErrParamRequired("OutputUri"))
  2861. }
  2862. if invalidParams.Len() > 0 {
  2863. return invalidParams
  2864. }
  2865. return nil
  2866. }
  2867. // SetBatchPredictionDataSourceId sets the BatchPredictionDataSourceId field's value.
  2868. func (s *CreateBatchPredictionInput) SetBatchPredictionDataSourceId(v string) *CreateBatchPredictionInput {
  2869. s.BatchPredictionDataSourceId = &v
  2870. return s
  2871. }
  2872. // SetBatchPredictionId sets the BatchPredictionId field's value.
  2873. func (s *CreateBatchPredictionInput) SetBatchPredictionId(v string) *CreateBatchPredictionInput {
  2874. s.BatchPredictionId = &v
  2875. return s
  2876. }
  2877. // SetBatchPredictionName sets the BatchPredictionName field's value.
  2878. func (s *CreateBatchPredictionInput) SetBatchPredictionName(v string) *CreateBatchPredictionInput {
  2879. s.BatchPredictionName = &v
  2880. return s
  2881. }
  2882. // SetMLModelId sets the MLModelId field's value.
  2883. func (s *CreateBatchPredictionInput) SetMLModelId(v string) *CreateBatchPredictionInput {
  2884. s.MLModelId = &v
  2885. return s
  2886. }
  2887. // SetOutputUri sets the OutputUri field's value.
  2888. func (s *CreateBatchPredictionInput) SetOutputUri(v string) *CreateBatchPredictionInput {
  2889. s.OutputUri = &v
  2890. return s
  2891. }
  2892. // Represents the output of a CreateBatchPrediction operation, and is an acknowledgement
  2893. // that Amazon ML received the request.
  2894. //
  2895. // The CreateBatchPrediction operation is asynchronous. You can poll for status
  2896. // updates by using the >GetBatchPrediction operation and checking the Status
  2897. // parameter of the result.
  2898. type CreateBatchPredictionOutput struct {
  2899. _ struct{} `type:"structure"`
  2900. // A user-supplied ID that uniquely identifies the BatchPrediction. This value
  2901. // is identical to the value of the BatchPredictionId in the request.
  2902. BatchPredictionId *string `min:"1" type:"string"`
  2903. }
  2904. // String returns the string representation
  2905. func (s CreateBatchPredictionOutput) String() string {
  2906. return awsutil.Prettify(s)
  2907. }
  2908. // GoString returns the string representation
  2909. func (s CreateBatchPredictionOutput) GoString() string {
  2910. return s.String()
  2911. }
  2912. // SetBatchPredictionId sets the BatchPredictionId field's value.
  2913. func (s *CreateBatchPredictionOutput) SetBatchPredictionId(v string) *CreateBatchPredictionOutput {
  2914. s.BatchPredictionId = &v
  2915. return s
  2916. }
  2917. type CreateDataSourceFromRDSInput struct {
  2918. _ struct{} `type:"structure"`
  2919. // The compute statistics for a DataSource. The statistics are generated from
  2920. // the observation data referenced by a DataSource. Amazon ML uses the statistics
  2921. // internally during MLModel training. This parameter must be set to true if
  2922. // the DataSource needs to be used for MLModel training.
  2923. ComputeStatistics *bool `type:"boolean"`
  2924. // A user-supplied ID that uniquely identifies the DataSource. Typically, an
  2925. // Amazon Resource Number (ARN) becomes the ID for a DataSource.
  2926. //
  2927. // DataSourceId is a required field
  2928. DataSourceId *string `min:"1" type:"string" required:"true"`
  2929. // A user-supplied name or description of the DataSource.
  2930. DataSourceName *string `type:"string"`
  2931. // The data specification of an Amazon RDS DataSource:
  2932. //
  2933. // RDSData is a required field
  2934. RDSData *RDSDataSpec `type:"structure" required:"true"`
  2935. // The role that Amazon ML assumes on behalf of the user to create and activate
  2936. // a data pipeline in the user's account and copy data using the SelectSqlQuery
  2937. // query from Amazon RDS to Amazon S3.
  2938. //
  2939. // RoleARN is a required field
  2940. RoleARN *string `min:"1" type:"string" required:"true"`
  2941. }
  2942. // String returns the string representation
  2943. func (s CreateDataSourceFromRDSInput) String() string {
  2944. return awsutil.Prettify(s)
  2945. }
  2946. // GoString returns the string representation
  2947. func (s CreateDataSourceFromRDSInput) GoString() string {
  2948. return s.String()
  2949. }
  2950. // Validate inspects the fields of the type to determine if they are valid.
  2951. func (s *CreateDataSourceFromRDSInput) Validate() error {
  2952. invalidParams := request.ErrInvalidParams{Context: "CreateDataSourceFromRDSInput"}
  2953. if s.DataSourceId == nil {
  2954. invalidParams.Add(request.NewErrParamRequired("DataSourceId"))
  2955. }
  2956. if s.DataSourceId != nil && len(*s.DataSourceId) < 1 {
  2957. invalidParams.Add(request.NewErrParamMinLen("DataSourceId", 1))
  2958. }
  2959. if s.RDSData == nil {
  2960. invalidParams.Add(request.NewErrParamRequired("RDSData"))
  2961. }
  2962. if s.RoleARN == nil {
  2963. invalidParams.Add(request.NewErrParamRequired("RoleARN"))
  2964. }
  2965. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  2966. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  2967. }
  2968. if s.RDSData != nil {
  2969. if err := s.RDSData.Validate(); err != nil {
  2970. invalidParams.AddNested("RDSData", err.(request.ErrInvalidParams))
  2971. }
  2972. }
  2973. if invalidParams.Len() > 0 {
  2974. return invalidParams
  2975. }
  2976. return nil
  2977. }
  2978. // SetComputeStatistics sets the ComputeStatistics field's value.
  2979. func (s *CreateDataSourceFromRDSInput) SetComputeStatistics(v bool) *CreateDataSourceFromRDSInput {
  2980. s.ComputeStatistics = &v
  2981. return s
  2982. }
  2983. // SetDataSourceId sets the DataSourceId field's value.
  2984. func (s *CreateDataSourceFromRDSInput) SetDataSourceId(v string) *CreateDataSourceFromRDSInput {
  2985. s.DataSourceId = &v
  2986. return s
  2987. }
  2988. // SetDataSourceName sets the DataSourceName field's value.
  2989. func (s *CreateDataSourceFromRDSInput) SetDataSourceName(v string) *CreateDataSourceFromRDSInput {
  2990. s.DataSourceName = &v
  2991. return s
  2992. }
  2993. // SetRDSData sets the RDSData field's value.
  2994. func (s *CreateDataSourceFromRDSInput) SetRDSData(v *RDSDataSpec) *CreateDataSourceFromRDSInput {
  2995. s.RDSData = v
  2996. return s
  2997. }
  2998. // SetRoleARN sets the RoleARN field's value.
  2999. func (s *CreateDataSourceFromRDSInput) SetRoleARN(v string) *CreateDataSourceFromRDSInput {
  3000. s.RoleARN = &v
  3001. return s
  3002. }
  3003. // Represents the output of a CreateDataSourceFromRDS operation, and is an acknowledgement
  3004. // that Amazon ML received the request.
  3005. //
  3006. // The CreateDataSourceFromRDS> operation is asynchronous. You can poll for
  3007. // updates by using the GetBatchPrediction operation and checking the Status
  3008. // parameter. You can inspect the Message when Status shows up as FAILED. You
  3009. // can also check the progress of the copy operation by going to the DataPipeline
  3010. // console and looking up the pipeline using the pipelineId from the describe
  3011. // call.
  3012. type CreateDataSourceFromRDSOutput struct {
  3013. _ struct{} `type:"structure"`
  3014. // A user-supplied ID that uniquely identifies the datasource. This value should
  3015. // be identical to the value of the DataSourceID in the request.
  3016. DataSourceId *string `min:"1" type:"string"`
  3017. }
  3018. // String returns the string representation
  3019. func (s CreateDataSourceFromRDSOutput) String() string {
  3020. return awsutil.Prettify(s)
  3021. }
  3022. // GoString returns the string representation
  3023. func (s CreateDataSourceFromRDSOutput) GoString() string {
  3024. return s.String()
  3025. }
  3026. // SetDataSourceId sets the DataSourceId field's value.
  3027. func (s *CreateDataSourceFromRDSOutput) SetDataSourceId(v string) *CreateDataSourceFromRDSOutput {
  3028. s.DataSourceId = &v
  3029. return s
  3030. }
  3031. type CreateDataSourceFromRedshiftInput struct {
  3032. _ struct{} `type:"structure"`
  3033. // The compute statistics for a DataSource. The statistics are generated from
  3034. // the observation data referenced by a DataSource. Amazon ML uses the statistics
  3035. // internally during MLModel training. This parameter must be set to true if
  3036. // the DataSource needs to be used for MLModel training.
  3037. ComputeStatistics *bool `type:"boolean"`
  3038. // A user-supplied ID that uniquely identifies the DataSource.
  3039. //
  3040. // DataSourceId is a required field
  3041. DataSourceId *string `min:"1" type:"string" required:"true"`
  3042. // A user-supplied name or description of the DataSource.
  3043. DataSourceName *string `type:"string"`
  3044. // The data specification of an Amazon Redshift DataSource:
  3045. //
  3046. // * DatabaseInformation - DatabaseName - The name of the Amazon Redshift
  3047. // database.
  3048. // ClusterIdentifier - The unique ID for the Amazon Redshift cluster.
  3049. //
  3050. // * DatabaseCredentials - The AWS Identity and Access Management (IAM) credentials
  3051. // that are used to connect to the Amazon Redshift database.
  3052. //
  3053. // * SelectSqlQuery - The query that is used to retrieve the observation
  3054. // data for the Datasource.
  3055. //
  3056. // * S3StagingLocation - The Amazon Simple Storage Service (Amazon S3) location
  3057. // for staging Amazon Redshift data. The data retrieved from Amazon Redshift
  3058. // using the SelectSqlQuery query is stored in this location.
  3059. //
  3060. // * DataSchemaUri - The Amazon S3 location of the DataSchema.
  3061. //
  3062. // * DataSchema - A JSON string representing the schema. This is not required
  3063. // if DataSchemaUri is specified.
  3064. //
  3065. // * DataRearrangement - A JSON string that represents the splitting and
  3066. // rearrangement requirements for the DataSource.
  3067. //
  3068. // Sample - "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
  3069. //
  3070. // DataSpec is a required field
  3071. DataSpec *RedshiftDataSpec `type:"structure" required:"true"`
  3072. // A fully specified role Amazon Resource Name (ARN). Amazon ML assumes the
  3073. // role on behalf of the user to create the following:
  3074. //
  3075. // A security group to allow Amazon ML to execute the SelectSqlQuery query on
  3076. // an Amazon Redshift cluster
  3077. //
  3078. // An Amazon S3 bucket policy to grant Amazon ML read/write permissions on the
  3079. // S3StagingLocation
  3080. //
  3081. // RoleARN is a required field
  3082. RoleARN *string `min:"1" type:"string" required:"true"`
  3083. }
  3084. // String returns the string representation
  3085. func (s CreateDataSourceFromRedshiftInput) String() string {
  3086. return awsutil.Prettify(s)
  3087. }
  3088. // GoString returns the string representation
  3089. func (s CreateDataSourceFromRedshiftInput) GoString() string {
  3090. return s.String()
  3091. }
  3092. // Validate inspects the fields of the type to determine if they are valid.
  3093. func (s *CreateDataSourceFromRedshiftInput) Validate() error {
  3094. invalidParams := request.ErrInvalidParams{Context: "CreateDataSourceFromRedshiftInput"}
  3095. if s.DataSourceId == nil {
  3096. invalidParams.Add(request.NewErrParamRequired("DataSourceId"))
  3097. }
  3098. if s.DataSourceId != nil && len(*s.DataSourceId) < 1 {
  3099. invalidParams.Add(request.NewErrParamMinLen("DataSourceId", 1))
  3100. }
  3101. if s.DataSpec == nil {
  3102. invalidParams.Add(request.NewErrParamRequired("DataSpec"))
  3103. }
  3104. if s.RoleARN == nil {
  3105. invalidParams.Add(request.NewErrParamRequired("RoleARN"))
  3106. }
  3107. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  3108. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  3109. }
  3110. if s.DataSpec != nil {
  3111. if err := s.DataSpec.Validate(); err != nil {
  3112. invalidParams.AddNested("DataSpec", err.(request.ErrInvalidParams))
  3113. }
  3114. }
  3115. if invalidParams.Len() > 0 {
  3116. return invalidParams
  3117. }
  3118. return nil
  3119. }
  3120. // SetComputeStatistics sets the ComputeStatistics field's value.
  3121. func (s *CreateDataSourceFromRedshiftInput) SetComputeStatistics(v bool) *CreateDataSourceFromRedshiftInput {
  3122. s.ComputeStatistics = &v
  3123. return s
  3124. }
  3125. // SetDataSourceId sets the DataSourceId field's value.
  3126. func (s *CreateDataSourceFromRedshiftInput) SetDataSourceId(v string) *CreateDataSourceFromRedshiftInput {
  3127. s.DataSourceId = &v
  3128. return s
  3129. }
  3130. // SetDataSourceName sets the DataSourceName field's value.
  3131. func (s *CreateDataSourceFromRedshiftInput) SetDataSourceName(v string) *CreateDataSourceFromRedshiftInput {
  3132. s.DataSourceName = &v
  3133. return s
  3134. }
  3135. // SetDataSpec sets the DataSpec field's value.
  3136. func (s *CreateDataSourceFromRedshiftInput) SetDataSpec(v *RedshiftDataSpec) *CreateDataSourceFromRedshiftInput {
  3137. s.DataSpec = v
  3138. return s
  3139. }
  3140. // SetRoleARN sets the RoleARN field's value.
  3141. func (s *CreateDataSourceFromRedshiftInput) SetRoleARN(v string) *CreateDataSourceFromRedshiftInput {
  3142. s.RoleARN = &v
  3143. return s
  3144. }
  3145. // Represents the output of a CreateDataSourceFromRedshift operation, and is
  3146. // an acknowledgement that Amazon ML received the request.
  3147. //
  3148. // The CreateDataSourceFromRedshift operation is asynchronous. You can poll
  3149. // for updates by using the GetBatchPrediction operation and checking the Status
  3150. // parameter.
  3151. type CreateDataSourceFromRedshiftOutput struct {
  3152. _ struct{} `type:"structure"`
  3153. // A user-supplied ID that uniquely identifies the datasource. This value should
  3154. // be identical to the value of the DataSourceID in the request.
  3155. DataSourceId *string `min:"1" type:"string"`
  3156. }
  3157. // String returns the string representation
  3158. func (s CreateDataSourceFromRedshiftOutput) String() string {
  3159. return awsutil.Prettify(s)
  3160. }
  3161. // GoString returns the string representation
  3162. func (s CreateDataSourceFromRedshiftOutput) GoString() string {
  3163. return s.String()
  3164. }
  3165. // SetDataSourceId sets the DataSourceId field's value.
  3166. func (s *CreateDataSourceFromRedshiftOutput) SetDataSourceId(v string) *CreateDataSourceFromRedshiftOutput {
  3167. s.DataSourceId = &v
  3168. return s
  3169. }
  3170. type CreateDataSourceFromS3Input struct {
  3171. _ struct{} `type:"structure"`
  3172. // The compute statistics for a DataSource. The statistics are generated from
  3173. // the observation data referenced by a DataSource. Amazon ML uses the statistics
  3174. // internally during MLModel training. This parameter must be set to true if
  3175. // the DataSource needs to be used for MLModel training.
  3176. ComputeStatistics *bool `type:"boolean"`
  3177. // A user-supplied identifier that uniquely identifies the DataSource.
  3178. //
  3179. // DataSourceId is a required field
  3180. DataSourceId *string `min:"1" type:"string" required:"true"`
  3181. // A user-supplied name or description of the DataSource.
  3182. DataSourceName *string `type:"string"`
  3183. // The data specification of a DataSource:
  3184. //
  3185. // * DataLocationS3 - The Amazon S3 location of the observation data.
  3186. //
  3187. // * DataSchemaLocationS3 - The Amazon S3 location of the DataSchema.
  3188. //
  3189. // * DataSchema - A JSON string representing the schema. This is not required
  3190. // if DataSchemaUri is specified.
  3191. //
  3192. // * DataRearrangement - A JSON string that represents the splitting and
  3193. // rearrangement requirements for the Datasource.
  3194. //
  3195. // Sample - "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
  3196. //
  3197. // DataSpec is a required field
  3198. DataSpec *S3DataSpec `type:"structure" required:"true"`
  3199. }
  3200. // String returns the string representation
  3201. func (s CreateDataSourceFromS3Input) String() string {
  3202. return awsutil.Prettify(s)
  3203. }
  3204. // GoString returns the string representation
  3205. func (s CreateDataSourceFromS3Input) GoString() string {
  3206. return s.String()
  3207. }
  3208. // Validate inspects the fields of the type to determine if they are valid.
  3209. func (s *CreateDataSourceFromS3Input) Validate() error {
  3210. invalidParams := request.ErrInvalidParams{Context: "CreateDataSourceFromS3Input"}
  3211. if s.DataSourceId == nil {
  3212. invalidParams.Add(request.NewErrParamRequired("DataSourceId"))
  3213. }
  3214. if s.DataSourceId != nil && len(*s.DataSourceId) < 1 {
  3215. invalidParams.Add(request.NewErrParamMinLen("DataSourceId", 1))
  3216. }
  3217. if s.DataSpec == nil {
  3218. invalidParams.Add(request.NewErrParamRequired("DataSpec"))
  3219. }
  3220. if s.DataSpec != nil {
  3221. if err := s.DataSpec.Validate(); err != nil {
  3222. invalidParams.AddNested("DataSpec", err.(request.ErrInvalidParams))
  3223. }
  3224. }
  3225. if invalidParams.Len() > 0 {
  3226. return invalidParams
  3227. }
  3228. return nil
  3229. }
  3230. // SetComputeStatistics sets the ComputeStatistics field's value.
  3231. func (s *CreateDataSourceFromS3Input) SetComputeStatistics(v bool) *CreateDataSourceFromS3Input {
  3232. s.ComputeStatistics = &v
  3233. return s
  3234. }
  3235. // SetDataSourceId sets the DataSourceId field's value.
  3236. func (s *CreateDataSourceFromS3Input) SetDataSourceId(v string) *CreateDataSourceFromS3Input {
  3237. s.DataSourceId = &v
  3238. return s
  3239. }
  3240. // SetDataSourceName sets the DataSourceName field's value.
  3241. func (s *CreateDataSourceFromS3Input) SetDataSourceName(v string) *CreateDataSourceFromS3Input {
  3242. s.DataSourceName = &v
  3243. return s
  3244. }
  3245. // SetDataSpec sets the DataSpec field's value.
  3246. func (s *CreateDataSourceFromS3Input) SetDataSpec(v *S3DataSpec) *CreateDataSourceFromS3Input {
  3247. s.DataSpec = v
  3248. return s
  3249. }
  3250. // Represents the output of a CreateDataSourceFromS3 operation, and is an acknowledgement
  3251. // that Amazon ML received the request.
  3252. //
  3253. // The CreateDataSourceFromS3 operation is asynchronous. You can poll for updates
  3254. // by using the GetBatchPrediction operation and checking the Status parameter.
  3255. type CreateDataSourceFromS3Output struct {
  3256. _ struct{} `type:"structure"`
  3257. // A user-supplied ID that uniquely identifies the DataSource. This value should
  3258. // be identical to the value of the DataSourceID in the request.
  3259. DataSourceId *string `min:"1" type:"string"`
  3260. }
  3261. // String returns the string representation
  3262. func (s CreateDataSourceFromS3Output) String() string {
  3263. return awsutil.Prettify(s)
  3264. }
  3265. // GoString returns the string representation
  3266. func (s CreateDataSourceFromS3Output) GoString() string {
  3267. return s.String()
  3268. }
  3269. // SetDataSourceId sets the DataSourceId field's value.
  3270. func (s *CreateDataSourceFromS3Output) SetDataSourceId(v string) *CreateDataSourceFromS3Output {
  3271. s.DataSourceId = &v
  3272. return s
  3273. }
  3274. type CreateEvaluationInput struct {
  3275. _ struct{} `type:"structure"`
  3276. // The ID of the DataSource for the evaluation. The schema of the DataSource
  3277. // must match the schema used to create the MLModel.
  3278. //
  3279. // EvaluationDataSourceId is a required field
  3280. EvaluationDataSourceId *string `min:"1" type:"string" required:"true"`
  3281. // A user-supplied ID that uniquely identifies the Evaluation.
  3282. //
  3283. // EvaluationId is a required field
  3284. EvaluationId *string `min:"1" type:"string" required:"true"`
  3285. // A user-supplied name or description of the Evaluation.
  3286. EvaluationName *string `type:"string"`
  3287. // The ID of the MLModel to evaluate.
  3288. //
  3289. // The schema used in creating the MLModel must match the schema of the DataSource
  3290. // used in the Evaluation.
  3291. //
  3292. // MLModelId is a required field
  3293. MLModelId *string `min:"1" type:"string" required:"true"`
  3294. }
  3295. // String returns the string representation
  3296. func (s CreateEvaluationInput) String() string {
  3297. return awsutil.Prettify(s)
  3298. }
  3299. // GoString returns the string representation
  3300. func (s CreateEvaluationInput) GoString() string {
  3301. return s.String()
  3302. }
  3303. // Validate inspects the fields of the type to determine if they are valid.
  3304. func (s *CreateEvaluationInput) Validate() error {
  3305. invalidParams := request.ErrInvalidParams{Context: "CreateEvaluationInput"}
  3306. if s.EvaluationDataSourceId == nil {
  3307. invalidParams.Add(request.NewErrParamRequired("EvaluationDataSourceId"))
  3308. }
  3309. if s.EvaluationDataSourceId != nil && len(*s.EvaluationDataSourceId) < 1 {
  3310. invalidParams.Add(request.NewErrParamMinLen("EvaluationDataSourceId", 1))
  3311. }
  3312. if s.EvaluationId == nil {
  3313. invalidParams.Add(request.NewErrParamRequired("EvaluationId"))
  3314. }
  3315. if s.EvaluationId != nil && len(*s.EvaluationId) < 1 {
  3316. invalidParams.Add(request.NewErrParamMinLen("EvaluationId", 1))
  3317. }
  3318. if s.MLModelId == nil {
  3319. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  3320. }
  3321. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  3322. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  3323. }
  3324. if invalidParams.Len() > 0 {
  3325. return invalidParams
  3326. }
  3327. return nil
  3328. }
  3329. // SetEvaluationDataSourceId sets the EvaluationDataSourceId field's value.
  3330. func (s *CreateEvaluationInput) SetEvaluationDataSourceId(v string) *CreateEvaluationInput {
  3331. s.EvaluationDataSourceId = &v
  3332. return s
  3333. }
  3334. // SetEvaluationId sets the EvaluationId field's value.
  3335. func (s *CreateEvaluationInput) SetEvaluationId(v string) *CreateEvaluationInput {
  3336. s.EvaluationId = &v
  3337. return s
  3338. }
  3339. // SetEvaluationName sets the EvaluationName field's value.
  3340. func (s *CreateEvaluationInput) SetEvaluationName(v string) *CreateEvaluationInput {
  3341. s.EvaluationName = &v
  3342. return s
  3343. }
  3344. // SetMLModelId sets the MLModelId field's value.
  3345. func (s *CreateEvaluationInput) SetMLModelId(v string) *CreateEvaluationInput {
  3346. s.MLModelId = &v
  3347. return s
  3348. }
  3349. // Represents the output of a CreateEvaluation operation, and is an acknowledgement
  3350. // that Amazon ML received the request.
  3351. //
  3352. // CreateEvaluation operation is asynchronous. You can poll for status updates
  3353. // by using the GetEvcaluation operation and checking the Status parameter.
  3354. type CreateEvaluationOutput struct {
  3355. _ struct{} `type:"structure"`
  3356. // The user-supplied ID that uniquely identifies the Evaluation. This value
  3357. // should be identical to the value of the EvaluationId in the request.
  3358. EvaluationId *string `min:"1" type:"string"`
  3359. }
  3360. // String returns the string representation
  3361. func (s CreateEvaluationOutput) String() string {
  3362. return awsutil.Prettify(s)
  3363. }
  3364. // GoString returns the string representation
  3365. func (s CreateEvaluationOutput) GoString() string {
  3366. return s.String()
  3367. }
  3368. // SetEvaluationId sets the EvaluationId field's value.
  3369. func (s *CreateEvaluationOutput) SetEvaluationId(v string) *CreateEvaluationOutput {
  3370. s.EvaluationId = &v
  3371. return s
  3372. }
  3373. type CreateMLModelInput struct {
  3374. _ struct{} `type:"structure"`
  3375. // A user-supplied ID that uniquely identifies the MLModel.
  3376. //
  3377. // MLModelId is a required field
  3378. MLModelId *string `min:"1" type:"string" required:"true"`
  3379. // A user-supplied name or description of the MLModel.
  3380. MLModelName *string `type:"string"`
  3381. // The category of supervised learning that this MLModel will address. Choose
  3382. // from the following types:
  3383. //
  3384. // * Choose REGRESSION if the MLModel will be used to predict a numeric value.
  3385. //
  3386. // * Choose BINARY if the MLModel result has two possible values.
  3387. // * Choose MULTICLASS if the MLModel result has a limited number of values.
  3388. //
  3389. // For more information, see the Amazon Machine Learning Developer Guide (http://docs.aws.amazon.com/machine-learning/latest/dg).
  3390. //
  3391. // MLModelType is a required field
  3392. MLModelType *string `type:"string" required:"true" enum:"MLModelType"`
  3393. // A list of the training parameters in the MLModel. The list is implemented
  3394. // as a map of key-value pairs.
  3395. //
  3396. // The following is the current set of training parameters:
  3397. //
  3398. // * sgd.maxMLModelSizeInBytes - The maximum allowed size of the model. Depending
  3399. // on the input data, the size of the model might affect its performance.
  3400. //
  3401. // The value is an integer that ranges from 100000 to 2147483648. The default
  3402. // value is 33554432.
  3403. //
  3404. // * sgd.maxPasses - The number of times that the training process traverses
  3405. // the observations to build the MLModel. The value is an integer that ranges
  3406. // from 1 to 10000. The default value is 10.
  3407. //
  3408. // * sgd.shuffleType - Whether Amazon ML shuffles the training data. Shuffling
  3409. // the data improves a model's ability to find the optimal solution for a
  3410. // variety of data types. The valid values are auto and none. The default
  3411. // value is none. We strongly recommend that you shuffle your data.
  3412. //
  3413. // * sgd.l1RegularizationAmount - The coefficient regularization L1 norm.
  3414. // It controls overfitting the data by penalizing large coefficients. This
  3415. // tends to drive coefficients to zero, resulting in a sparse feature set.
  3416. // If you use this parameter, start by specifying a small value, such as
  3417. // 1.0E-08.
  3418. //
  3419. // The value is a double that ranges from 0 to MAX_DOUBLE. The default is to
  3420. // not use L1 normalization. This parameter can't be used when L2 is specified.
  3421. // Use this parameter sparingly.
  3422. //
  3423. // * sgd.l2RegularizationAmount - The coefficient regularization L2 norm.
  3424. // It controls overfitting the data by penalizing large coefficients. This
  3425. // tends to drive coefficients to small, nonzero values. If you use this
  3426. // parameter, start by specifying a small value, such as 1.0E-08.
  3427. //
  3428. // The value is a double that ranges from 0 to MAX_DOUBLE. The default is to
  3429. // not use L2 normalization. This parameter can't be used when L1 is specified.
  3430. // Use this parameter sparingly.
  3431. Parameters map[string]*string `type:"map"`
  3432. // The data recipe for creating the MLModel. You must specify either the recipe
  3433. // or its URI. If you don't specify a recipe or its URI, Amazon ML creates a
  3434. // default.
  3435. Recipe *string `type:"string"`
  3436. // The Amazon Simple Storage Service (Amazon S3) location and file name that
  3437. // contains the MLModel recipe. You must specify either the recipe or its URI.
  3438. // If you don't specify a recipe or its URI, Amazon ML creates a default.
  3439. RecipeUri *string `type:"string"`
  3440. // The DataSource that points to the training data.
  3441. //
  3442. // TrainingDataSourceId is a required field
  3443. TrainingDataSourceId *string `min:"1" type:"string" required:"true"`
  3444. }
  3445. // String returns the string representation
  3446. func (s CreateMLModelInput) String() string {
  3447. return awsutil.Prettify(s)
  3448. }
  3449. // GoString returns the string representation
  3450. func (s CreateMLModelInput) GoString() string {
  3451. return s.String()
  3452. }
  3453. // Validate inspects the fields of the type to determine if they are valid.
  3454. func (s *CreateMLModelInput) Validate() error {
  3455. invalidParams := request.ErrInvalidParams{Context: "CreateMLModelInput"}
  3456. if s.MLModelId == nil {
  3457. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  3458. }
  3459. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  3460. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  3461. }
  3462. if s.MLModelType == nil {
  3463. invalidParams.Add(request.NewErrParamRequired("MLModelType"))
  3464. }
  3465. if s.TrainingDataSourceId == nil {
  3466. invalidParams.Add(request.NewErrParamRequired("TrainingDataSourceId"))
  3467. }
  3468. if s.TrainingDataSourceId != nil && len(*s.TrainingDataSourceId) < 1 {
  3469. invalidParams.Add(request.NewErrParamMinLen("TrainingDataSourceId", 1))
  3470. }
  3471. if invalidParams.Len() > 0 {
  3472. return invalidParams
  3473. }
  3474. return nil
  3475. }
  3476. // SetMLModelId sets the MLModelId field's value.
  3477. func (s *CreateMLModelInput) SetMLModelId(v string) *CreateMLModelInput {
  3478. s.MLModelId = &v
  3479. return s
  3480. }
  3481. // SetMLModelName sets the MLModelName field's value.
  3482. func (s *CreateMLModelInput) SetMLModelName(v string) *CreateMLModelInput {
  3483. s.MLModelName = &v
  3484. return s
  3485. }
  3486. // SetMLModelType sets the MLModelType field's value.
  3487. func (s *CreateMLModelInput) SetMLModelType(v string) *CreateMLModelInput {
  3488. s.MLModelType = &v
  3489. return s
  3490. }
  3491. // SetParameters sets the Parameters field's value.
  3492. func (s *CreateMLModelInput) SetParameters(v map[string]*string) *CreateMLModelInput {
  3493. s.Parameters = v
  3494. return s
  3495. }
  3496. // SetRecipe sets the Recipe field's value.
  3497. func (s *CreateMLModelInput) SetRecipe(v string) *CreateMLModelInput {
  3498. s.Recipe = &v
  3499. return s
  3500. }
  3501. // SetRecipeUri sets the RecipeUri field's value.
  3502. func (s *CreateMLModelInput) SetRecipeUri(v string) *CreateMLModelInput {
  3503. s.RecipeUri = &v
  3504. return s
  3505. }
  3506. // SetTrainingDataSourceId sets the TrainingDataSourceId field's value.
  3507. func (s *CreateMLModelInput) SetTrainingDataSourceId(v string) *CreateMLModelInput {
  3508. s.TrainingDataSourceId = &v
  3509. return s
  3510. }
  3511. // Represents the output of a CreateMLModel operation, and is an acknowledgement
  3512. // that Amazon ML received the request.
  3513. //
  3514. // The CreateMLModel operation is asynchronous. You can poll for status updates
  3515. // by using the GetMLModel operation and checking the Status parameter.
  3516. type CreateMLModelOutput struct {
  3517. _ struct{} `type:"structure"`
  3518. // A user-supplied ID that uniquely identifies the MLModel. This value should
  3519. // be identical to the value of the MLModelId in the request.
  3520. MLModelId *string `min:"1" type:"string"`
  3521. }
  3522. // String returns the string representation
  3523. func (s CreateMLModelOutput) String() string {
  3524. return awsutil.Prettify(s)
  3525. }
  3526. // GoString returns the string representation
  3527. func (s CreateMLModelOutput) GoString() string {
  3528. return s.String()
  3529. }
  3530. // SetMLModelId sets the MLModelId field's value.
  3531. func (s *CreateMLModelOutput) SetMLModelId(v string) *CreateMLModelOutput {
  3532. s.MLModelId = &v
  3533. return s
  3534. }
  3535. type CreateRealtimeEndpointInput struct {
  3536. _ struct{} `type:"structure"`
  3537. // The ID assigned to the MLModel during creation.
  3538. //
  3539. // MLModelId is a required field
  3540. MLModelId *string `min:"1" type:"string" required:"true"`
  3541. }
  3542. // String returns the string representation
  3543. func (s CreateRealtimeEndpointInput) String() string {
  3544. return awsutil.Prettify(s)
  3545. }
  3546. // GoString returns the string representation
  3547. func (s CreateRealtimeEndpointInput) GoString() string {
  3548. return s.String()
  3549. }
  3550. // Validate inspects the fields of the type to determine if they are valid.
  3551. func (s *CreateRealtimeEndpointInput) Validate() error {
  3552. invalidParams := request.ErrInvalidParams{Context: "CreateRealtimeEndpointInput"}
  3553. if s.MLModelId == nil {
  3554. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  3555. }
  3556. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  3557. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  3558. }
  3559. if invalidParams.Len() > 0 {
  3560. return invalidParams
  3561. }
  3562. return nil
  3563. }
  3564. // SetMLModelId sets the MLModelId field's value.
  3565. func (s *CreateRealtimeEndpointInput) SetMLModelId(v string) *CreateRealtimeEndpointInput {
  3566. s.MLModelId = &v
  3567. return s
  3568. }
  3569. // Represents the output of an CreateRealtimeEndpoint operation.
  3570. //
  3571. // The result contains the MLModelId and the endpoint information for the MLModel.
  3572. //
  3573. // The endpoint information includes the URI of the MLModel; that is, the location
  3574. // to send online prediction requests for the specified MLModel.
  3575. type CreateRealtimeEndpointOutput struct {
  3576. _ struct{} `type:"structure"`
  3577. // A user-supplied ID that uniquely identifies the MLModel. This value should
  3578. // be identical to the value of the MLModelId in the request.
  3579. MLModelId *string `min:"1" type:"string"`
  3580. // The endpoint information of the MLModel
  3581. RealtimeEndpointInfo *RealtimeEndpointInfo `type:"structure"`
  3582. }
  3583. // String returns the string representation
  3584. func (s CreateRealtimeEndpointOutput) String() string {
  3585. return awsutil.Prettify(s)
  3586. }
  3587. // GoString returns the string representation
  3588. func (s CreateRealtimeEndpointOutput) GoString() string {
  3589. return s.String()
  3590. }
  3591. // SetMLModelId sets the MLModelId field's value.
  3592. func (s *CreateRealtimeEndpointOutput) SetMLModelId(v string) *CreateRealtimeEndpointOutput {
  3593. s.MLModelId = &v
  3594. return s
  3595. }
  3596. // SetRealtimeEndpointInfo sets the RealtimeEndpointInfo field's value.
  3597. func (s *CreateRealtimeEndpointOutput) SetRealtimeEndpointInfo(v *RealtimeEndpointInfo) *CreateRealtimeEndpointOutput {
  3598. s.RealtimeEndpointInfo = v
  3599. return s
  3600. }
  3601. // Represents the output of the GetDataSource operation.
  3602. //
  3603. // The content consists of the detailed metadata and data file information and
  3604. // the current status of the DataSource.
  3605. type DataSource struct {
  3606. _ struct{} `type:"structure"`
  3607. // The parameter is true if statistics need to be generated from the observation
  3608. // data.
  3609. ComputeStatistics *bool `type:"boolean"`
  3610. // Long integer type that is a 64-bit signed number.
  3611. ComputeTime *int64 `type:"long"`
  3612. // The time that the DataSource was created. The time is expressed in epoch
  3613. // time.
  3614. CreatedAt *time.Time `type:"timestamp"`
  3615. // The AWS user account from which the DataSource was created. The account type
  3616. // can be either an AWS root account or an AWS Identity and Access Management
  3617. // (IAM) user account.
  3618. CreatedByIamUser *string `type:"string"`
  3619. // The location and name of the data in Amazon Simple Storage Service (Amazon
  3620. // S3) that is used by a DataSource.
  3621. DataLocationS3 *string `type:"string"`
  3622. // A JSON string that represents the splitting and rearrangement requirement
  3623. // used when this DataSource was created.
  3624. DataRearrangement *string `type:"string"`
  3625. // The total number of observations contained in the data files that the DataSource
  3626. // references.
  3627. DataSizeInBytes *int64 `type:"long"`
  3628. // The ID that is assigned to the DataSource during creation.
  3629. DataSourceId *string `min:"1" type:"string"`
  3630. // A timestamp represented in epoch time.
  3631. FinishedAt *time.Time `type:"timestamp"`
  3632. // The time of the most recent edit to the BatchPrediction. The time is expressed
  3633. // in epoch time.
  3634. LastUpdatedAt *time.Time `type:"timestamp"`
  3635. // A description of the most recent details about creating the DataSource.
  3636. Message *string `type:"string"`
  3637. // A user-supplied name or description of the DataSource.
  3638. Name *string `type:"string"`
  3639. // The number of data files referenced by the DataSource.
  3640. NumberOfFiles *int64 `type:"long"`
  3641. // The datasource details that are specific to Amazon RDS.
  3642. RDSMetadata *RDSMetadata `type:"structure"`
  3643. // Describes the DataSource details specific to Amazon Redshift.
  3644. RedshiftMetadata *RedshiftMetadata `type:"structure"`
  3645. // The Amazon Resource Name (ARN) of an AWS IAM Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html#roles-about-termsandconcepts),
  3646. // such as the following: arn:aws:iam::account:role/rolename.
  3647. RoleARN *string `min:"1" type:"string"`
  3648. // A timestamp represented in epoch time.
  3649. StartedAt *time.Time `type:"timestamp"`
  3650. // The current status of the DataSource. This element can have one of the following
  3651. // values:
  3652. //
  3653. // * PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
  3654. // create a DataSource.
  3655. // * INPROGRESS - The creation process is underway.
  3656. // * FAILED - The request to create a DataSource did not run to completion.
  3657. // It is not usable.
  3658. // * COMPLETED - The creation process completed successfully.
  3659. // * DELETED - The DataSource is marked as deleted. It is not usable.
  3660. Status *string `type:"string" enum:"EntityStatus"`
  3661. }
  3662. // String returns the string representation
  3663. func (s DataSource) String() string {
  3664. return awsutil.Prettify(s)
  3665. }
  3666. // GoString returns the string representation
  3667. func (s DataSource) GoString() string {
  3668. return s.String()
  3669. }
  3670. // SetComputeStatistics sets the ComputeStatistics field's value.
  3671. func (s *DataSource) SetComputeStatistics(v bool) *DataSource {
  3672. s.ComputeStatistics = &v
  3673. return s
  3674. }
  3675. // SetComputeTime sets the ComputeTime field's value.
  3676. func (s *DataSource) SetComputeTime(v int64) *DataSource {
  3677. s.ComputeTime = &v
  3678. return s
  3679. }
  3680. // SetCreatedAt sets the CreatedAt field's value.
  3681. func (s *DataSource) SetCreatedAt(v time.Time) *DataSource {
  3682. s.CreatedAt = &v
  3683. return s
  3684. }
  3685. // SetCreatedByIamUser sets the CreatedByIamUser field's value.
  3686. func (s *DataSource) SetCreatedByIamUser(v string) *DataSource {
  3687. s.CreatedByIamUser = &v
  3688. return s
  3689. }
  3690. // SetDataLocationS3 sets the DataLocationS3 field's value.
  3691. func (s *DataSource) SetDataLocationS3(v string) *DataSource {
  3692. s.DataLocationS3 = &v
  3693. return s
  3694. }
  3695. // SetDataRearrangement sets the DataRearrangement field's value.
  3696. func (s *DataSource) SetDataRearrangement(v string) *DataSource {
  3697. s.DataRearrangement = &v
  3698. return s
  3699. }
  3700. // SetDataSizeInBytes sets the DataSizeInBytes field's value.
  3701. func (s *DataSource) SetDataSizeInBytes(v int64) *DataSource {
  3702. s.DataSizeInBytes = &v
  3703. return s
  3704. }
  3705. // SetDataSourceId sets the DataSourceId field's value.
  3706. func (s *DataSource) SetDataSourceId(v string) *DataSource {
  3707. s.DataSourceId = &v
  3708. return s
  3709. }
  3710. // SetFinishedAt sets the FinishedAt field's value.
  3711. func (s *DataSource) SetFinishedAt(v time.Time) *DataSource {
  3712. s.FinishedAt = &v
  3713. return s
  3714. }
  3715. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  3716. func (s *DataSource) SetLastUpdatedAt(v time.Time) *DataSource {
  3717. s.LastUpdatedAt = &v
  3718. return s
  3719. }
  3720. // SetMessage sets the Message field's value.
  3721. func (s *DataSource) SetMessage(v string) *DataSource {
  3722. s.Message = &v
  3723. return s
  3724. }
  3725. // SetName sets the Name field's value.
  3726. func (s *DataSource) SetName(v string) *DataSource {
  3727. s.Name = &v
  3728. return s
  3729. }
  3730. // SetNumberOfFiles sets the NumberOfFiles field's value.
  3731. func (s *DataSource) SetNumberOfFiles(v int64) *DataSource {
  3732. s.NumberOfFiles = &v
  3733. return s
  3734. }
  3735. // SetRDSMetadata sets the RDSMetadata field's value.
  3736. func (s *DataSource) SetRDSMetadata(v *RDSMetadata) *DataSource {
  3737. s.RDSMetadata = v
  3738. return s
  3739. }
  3740. // SetRedshiftMetadata sets the RedshiftMetadata field's value.
  3741. func (s *DataSource) SetRedshiftMetadata(v *RedshiftMetadata) *DataSource {
  3742. s.RedshiftMetadata = v
  3743. return s
  3744. }
  3745. // SetRoleARN sets the RoleARN field's value.
  3746. func (s *DataSource) SetRoleARN(v string) *DataSource {
  3747. s.RoleARN = &v
  3748. return s
  3749. }
  3750. // SetStartedAt sets the StartedAt field's value.
  3751. func (s *DataSource) SetStartedAt(v time.Time) *DataSource {
  3752. s.StartedAt = &v
  3753. return s
  3754. }
  3755. // SetStatus sets the Status field's value.
  3756. func (s *DataSource) SetStatus(v string) *DataSource {
  3757. s.Status = &v
  3758. return s
  3759. }
  3760. type DeleteBatchPredictionInput struct {
  3761. _ struct{} `type:"structure"`
  3762. // A user-supplied ID that uniquely identifies the BatchPrediction.
  3763. //
  3764. // BatchPredictionId is a required field
  3765. BatchPredictionId *string `min:"1" type:"string" required:"true"`
  3766. }
  3767. // String returns the string representation
  3768. func (s DeleteBatchPredictionInput) String() string {
  3769. return awsutil.Prettify(s)
  3770. }
  3771. // GoString returns the string representation
  3772. func (s DeleteBatchPredictionInput) GoString() string {
  3773. return s.String()
  3774. }
  3775. // Validate inspects the fields of the type to determine if they are valid.
  3776. func (s *DeleteBatchPredictionInput) Validate() error {
  3777. invalidParams := request.ErrInvalidParams{Context: "DeleteBatchPredictionInput"}
  3778. if s.BatchPredictionId == nil {
  3779. invalidParams.Add(request.NewErrParamRequired("BatchPredictionId"))
  3780. }
  3781. if s.BatchPredictionId != nil && len(*s.BatchPredictionId) < 1 {
  3782. invalidParams.Add(request.NewErrParamMinLen("BatchPredictionId", 1))
  3783. }
  3784. if invalidParams.Len() > 0 {
  3785. return invalidParams
  3786. }
  3787. return nil
  3788. }
  3789. // SetBatchPredictionId sets the BatchPredictionId field's value.
  3790. func (s *DeleteBatchPredictionInput) SetBatchPredictionId(v string) *DeleteBatchPredictionInput {
  3791. s.BatchPredictionId = &v
  3792. return s
  3793. }
  3794. // Represents the output of a DeleteBatchPrediction operation.
  3795. //
  3796. // You can use the GetBatchPrediction operation and check the value of the Status
  3797. // parameter to see whether a BatchPrediction is marked as DELETED.
  3798. type DeleteBatchPredictionOutput struct {
  3799. _ struct{} `type:"structure"`
  3800. // A user-supplied ID that uniquely identifies the BatchPrediction. This value
  3801. // should be identical to the value of the BatchPredictionID in the request.
  3802. BatchPredictionId *string `min:"1" type:"string"`
  3803. }
  3804. // String returns the string representation
  3805. func (s DeleteBatchPredictionOutput) String() string {
  3806. return awsutil.Prettify(s)
  3807. }
  3808. // GoString returns the string representation
  3809. func (s DeleteBatchPredictionOutput) GoString() string {
  3810. return s.String()
  3811. }
  3812. // SetBatchPredictionId sets the BatchPredictionId field's value.
  3813. func (s *DeleteBatchPredictionOutput) SetBatchPredictionId(v string) *DeleteBatchPredictionOutput {
  3814. s.BatchPredictionId = &v
  3815. return s
  3816. }
  3817. type DeleteDataSourceInput struct {
  3818. _ struct{} `type:"structure"`
  3819. // A user-supplied ID that uniquely identifies the DataSource.
  3820. //
  3821. // DataSourceId is a required field
  3822. DataSourceId *string `min:"1" type:"string" required:"true"`
  3823. }
  3824. // String returns the string representation
  3825. func (s DeleteDataSourceInput) String() string {
  3826. return awsutil.Prettify(s)
  3827. }
  3828. // GoString returns the string representation
  3829. func (s DeleteDataSourceInput) GoString() string {
  3830. return s.String()
  3831. }
  3832. // Validate inspects the fields of the type to determine if they are valid.
  3833. func (s *DeleteDataSourceInput) Validate() error {
  3834. invalidParams := request.ErrInvalidParams{Context: "DeleteDataSourceInput"}
  3835. if s.DataSourceId == nil {
  3836. invalidParams.Add(request.NewErrParamRequired("DataSourceId"))
  3837. }
  3838. if s.DataSourceId != nil && len(*s.DataSourceId) < 1 {
  3839. invalidParams.Add(request.NewErrParamMinLen("DataSourceId", 1))
  3840. }
  3841. if invalidParams.Len() > 0 {
  3842. return invalidParams
  3843. }
  3844. return nil
  3845. }
  3846. // SetDataSourceId sets the DataSourceId field's value.
  3847. func (s *DeleteDataSourceInput) SetDataSourceId(v string) *DeleteDataSourceInput {
  3848. s.DataSourceId = &v
  3849. return s
  3850. }
  3851. // Represents the output of a DeleteDataSource operation.
  3852. type DeleteDataSourceOutput struct {
  3853. _ struct{} `type:"structure"`
  3854. // A user-supplied ID that uniquely identifies the DataSource. This value should
  3855. // be identical to the value of the DataSourceID in the request.
  3856. DataSourceId *string `min:"1" type:"string"`
  3857. }
  3858. // String returns the string representation
  3859. func (s DeleteDataSourceOutput) String() string {
  3860. return awsutil.Prettify(s)
  3861. }
  3862. // GoString returns the string representation
  3863. func (s DeleteDataSourceOutput) GoString() string {
  3864. return s.String()
  3865. }
  3866. // SetDataSourceId sets the DataSourceId field's value.
  3867. func (s *DeleteDataSourceOutput) SetDataSourceId(v string) *DeleteDataSourceOutput {
  3868. s.DataSourceId = &v
  3869. return s
  3870. }
  3871. type DeleteEvaluationInput struct {
  3872. _ struct{} `type:"structure"`
  3873. // A user-supplied ID that uniquely identifies the Evaluation to delete.
  3874. //
  3875. // EvaluationId is a required field
  3876. EvaluationId *string `min:"1" type:"string" required:"true"`
  3877. }
  3878. // String returns the string representation
  3879. func (s DeleteEvaluationInput) String() string {
  3880. return awsutil.Prettify(s)
  3881. }
  3882. // GoString returns the string representation
  3883. func (s DeleteEvaluationInput) GoString() string {
  3884. return s.String()
  3885. }
  3886. // Validate inspects the fields of the type to determine if they are valid.
  3887. func (s *DeleteEvaluationInput) Validate() error {
  3888. invalidParams := request.ErrInvalidParams{Context: "DeleteEvaluationInput"}
  3889. if s.EvaluationId == nil {
  3890. invalidParams.Add(request.NewErrParamRequired("EvaluationId"))
  3891. }
  3892. if s.EvaluationId != nil && len(*s.EvaluationId) < 1 {
  3893. invalidParams.Add(request.NewErrParamMinLen("EvaluationId", 1))
  3894. }
  3895. if invalidParams.Len() > 0 {
  3896. return invalidParams
  3897. }
  3898. return nil
  3899. }
  3900. // SetEvaluationId sets the EvaluationId field's value.
  3901. func (s *DeleteEvaluationInput) SetEvaluationId(v string) *DeleteEvaluationInput {
  3902. s.EvaluationId = &v
  3903. return s
  3904. }
  3905. // Represents the output of a DeleteEvaluation operation. The output indicates
  3906. // that Amazon Machine Learning (Amazon ML) received the request.
  3907. //
  3908. // You can use the GetEvaluation operation and check the value of the Status
  3909. // parameter to see whether an Evaluation is marked as DELETED.
  3910. type DeleteEvaluationOutput struct {
  3911. _ struct{} `type:"structure"`
  3912. // A user-supplied ID that uniquely identifies the Evaluation. This value should
  3913. // be identical to the value of the EvaluationId in the request.
  3914. EvaluationId *string `min:"1" type:"string"`
  3915. }
  3916. // String returns the string representation
  3917. func (s DeleteEvaluationOutput) String() string {
  3918. return awsutil.Prettify(s)
  3919. }
  3920. // GoString returns the string representation
  3921. func (s DeleteEvaluationOutput) GoString() string {
  3922. return s.String()
  3923. }
  3924. // SetEvaluationId sets the EvaluationId field's value.
  3925. func (s *DeleteEvaluationOutput) SetEvaluationId(v string) *DeleteEvaluationOutput {
  3926. s.EvaluationId = &v
  3927. return s
  3928. }
  3929. type DeleteMLModelInput struct {
  3930. _ struct{} `type:"structure"`
  3931. // A user-supplied ID that uniquely identifies the MLModel.
  3932. //
  3933. // MLModelId is a required field
  3934. MLModelId *string `min:"1" type:"string" required:"true"`
  3935. }
  3936. // String returns the string representation
  3937. func (s DeleteMLModelInput) String() string {
  3938. return awsutil.Prettify(s)
  3939. }
  3940. // GoString returns the string representation
  3941. func (s DeleteMLModelInput) GoString() string {
  3942. return s.String()
  3943. }
  3944. // Validate inspects the fields of the type to determine if they are valid.
  3945. func (s *DeleteMLModelInput) Validate() error {
  3946. invalidParams := request.ErrInvalidParams{Context: "DeleteMLModelInput"}
  3947. if s.MLModelId == nil {
  3948. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  3949. }
  3950. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  3951. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  3952. }
  3953. if invalidParams.Len() > 0 {
  3954. return invalidParams
  3955. }
  3956. return nil
  3957. }
  3958. // SetMLModelId sets the MLModelId field's value.
  3959. func (s *DeleteMLModelInput) SetMLModelId(v string) *DeleteMLModelInput {
  3960. s.MLModelId = &v
  3961. return s
  3962. }
  3963. // Represents the output of a DeleteMLModel operation.
  3964. //
  3965. // You can use the GetMLModel operation and check the value of the Status parameter
  3966. // to see whether an MLModel is marked as DELETED.
  3967. type DeleteMLModelOutput struct {
  3968. _ struct{} `type:"structure"`
  3969. // A user-supplied ID that uniquely identifies the MLModel. This value should
  3970. // be identical to the value of the MLModelID in the request.
  3971. MLModelId *string `min:"1" type:"string"`
  3972. }
  3973. // String returns the string representation
  3974. func (s DeleteMLModelOutput) String() string {
  3975. return awsutil.Prettify(s)
  3976. }
  3977. // GoString returns the string representation
  3978. func (s DeleteMLModelOutput) GoString() string {
  3979. return s.String()
  3980. }
  3981. // SetMLModelId sets the MLModelId field's value.
  3982. func (s *DeleteMLModelOutput) SetMLModelId(v string) *DeleteMLModelOutput {
  3983. s.MLModelId = &v
  3984. return s
  3985. }
  3986. type DeleteRealtimeEndpointInput struct {
  3987. _ struct{} `type:"structure"`
  3988. // The ID assigned to the MLModel during creation.
  3989. //
  3990. // MLModelId is a required field
  3991. MLModelId *string `min:"1" type:"string" required:"true"`
  3992. }
  3993. // String returns the string representation
  3994. func (s DeleteRealtimeEndpointInput) String() string {
  3995. return awsutil.Prettify(s)
  3996. }
  3997. // GoString returns the string representation
  3998. func (s DeleteRealtimeEndpointInput) GoString() string {
  3999. return s.String()
  4000. }
  4001. // Validate inspects the fields of the type to determine if they are valid.
  4002. func (s *DeleteRealtimeEndpointInput) Validate() error {
  4003. invalidParams := request.ErrInvalidParams{Context: "DeleteRealtimeEndpointInput"}
  4004. if s.MLModelId == nil {
  4005. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  4006. }
  4007. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  4008. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  4009. }
  4010. if invalidParams.Len() > 0 {
  4011. return invalidParams
  4012. }
  4013. return nil
  4014. }
  4015. // SetMLModelId sets the MLModelId field's value.
  4016. func (s *DeleteRealtimeEndpointInput) SetMLModelId(v string) *DeleteRealtimeEndpointInput {
  4017. s.MLModelId = &v
  4018. return s
  4019. }
  4020. // Represents the output of an DeleteRealtimeEndpoint operation.
  4021. //
  4022. // The result contains the MLModelId and the endpoint information for the MLModel.
  4023. type DeleteRealtimeEndpointOutput struct {
  4024. _ struct{} `type:"structure"`
  4025. // A user-supplied ID that uniquely identifies the MLModel. This value should
  4026. // be identical to the value of the MLModelId in the request.
  4027. MLModelId *string `min:"1" type:"string"`
  4028. // The endpoint information of the MLModel
  4029. RealtimeEndpointInfo *RealtimeEndpointInfo `type:"structure"`
  4030. }
  4031. // String returns the string representation
  4032. func (s DeleteRealtimeEndpointOutput) String() string {
  4033. return awsutil.Prettify(s)
  4034. }
  4035. // GoString returns the string representation
  4036. func (s DeleteRealtimeEndpointOutput) GoString() string {
  4037. return s.String()
  4038. }
  4039. // SetMLModelId sets the MLModelId field's value.
  4040. func (s *DeleteRealtimeEndpointOutput) SetMLModelId(v string) *DeleteRealtimeEndpointOutput {
  4041. s.MLModelId = &v
  4042. return s
  4043. }
  4044. // SetRealtimeEndpointInfo sets the RealtimeEndpointInfo field's value.
  4045. func (s *DeleteRealtimeEndpointOutput) SetRealtimeEndpointInfo(v *RealtimeEndpointInfo) *DeleteRealtimeEndpointOutput {
  4046. s.RealtimeEndpointInfo = v
  4047. return s
  4048. }
  4049. type DeleteTagsInput struct {
  4050. _ struct{} `type:"structure"`
  4051. // The ID of the tagged ML object. For example, exampleModelId.
  4052. //
  4053. // ResourceId is a required field
  4054. ResourceId *string `min:"1" type:"string" required:"true"`
  4055. // The type of the tagged ML object.
  4056. //
  4057. // ResourceType is a required field
  4058. ResourceType *string `type:"string" required:"true" enum:"TaggableResourceType"`
  4059. // One or more tags to delete.
  4060. //
  4061. // TagKeys is a required field
  4062. TagKeys []*string `type:"list" required:"true"`
  4063. }
  4064. // String returns the string representation
  4065. func (s DeleteTagsInput) String() string {
  4066. return awsutil.Prettify(s)
  4067. }
  4068. // GoString returns the string representation
  4069. func (s DeleteTagsInput) GoString() string {
  4070. return s.String()
  4071. }
  4072. // Validate inspects the fields of the type to determine if they are valid.
  4073. func (s *DeleteTagsInput) Validate() error {
  4074. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  4075. if s.ResourceId == nil {
  4076. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4077. }
  4078. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  4079. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  4080. }
  4081. if s.ResourceType == nil {
  4082. invalidParams.Add(request.NewErrParamRequired("ResourceType"))
  4083. }
  4084. if s.TagKeys == nil {
  4085. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  4086. }
  4087. if invalidParams.Len() > 0 {
  4088. return invalidParams
  4089. }
  4090. return nil
  4091. }
  4092. // SetResourceId sets the ResourceId field's value.
  4093. func (s *DeleteTagsInput) SetResourceId(v string) *DeleteTagsInput {
  4094. s.ResourceId = &v
  4095. return s
  4096. }
  4097. // SetResourceType sets the ResourceType field's value.
  4098. func (s *DeleteTagsInput) SetResourceType(v string) *DeleteTagsInput {
  4099. s.ResourceType = &v
  4100. return s
  4101. }
  4102. // SetTagKeys sets the TagKeys field's value.
  4103. func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput {
  4104. s.TagKeys = v
  4105. return s
  4106. }
  4107. // Amazon ML returns the following elements.
  4108. type DeleteTagsOutput struct {
  4109. _ struct{} `type:"structure"`
  4110. // The ID of the ML object from which tags were deleted.
  4111. ResourceId *string `min:"1" type:"string"`
  4112. // The type of the ML object from which tags were deleted.
  4113. ResourceType *string `type:"string" enum:"TaggableResourceType"`
  4114. }
  4115. // String returns the string representation
  4116. func (s DeleteTagsOutput) String() string {
  4117. return awsutil.Prettify(s)
  4118. }
  4119. // GoString returns the string representation
  4120. func (s DeleteTagsOutput) GoString() string {
  4121. return s.String()
  4122. }
  4123. // SetResourceId sets the ResourceId field's value.
  4124. func (s *DeleteTagsOutput) SetResourceId(v string) *DeleteTagsOutput {
  4125. s.ResourceId = &v
  4126. return s
  4127. }
  4128. // SetResourceType sets the ResourceType field's value.
  4129. func (s *DeleteTagsOutput) SetResourceType(v string) *DeleteTagsOutput {
  4130. s.ResourceType = &v
  4131. return s
  4132. }
  4133. type DescribeBatchPredictionsInput struct {
  4134. _ struct{} `type:"structure"`
  4135. // The equal to operator. The BatchPrediction results will have FilterVariable
  4136. // values that exactly match the value specified with EQ.
  4137. EQ *string `type:"string"`
  4138. // Use one of the following variables to filter a list of BatchPrediction:
  4139. //
  4140. // * CreatedAt - Sets the search criteria to the BatchPrediction creation
  4141. // date.
  4142. // * Status - Sets the search criteria to the BatchPrediction status.
  4143. // * Name - Sets the search criteria to the contents of the BatchPredictionName.
  4144. //
  4145. // * IAMUser - Sets the search criteria to the user account that invoked
  4146. // the BatchPrediction creation.
  4147. // * MLModelId - Sets the search criteria to the MLModel used in the BatchPrediction.
  4148. //
  4149. // * DataSourceId - Sets the search criteria to the DataSource used in the
  4150. // BatchPrediction.
  4151. // * DataURI - Sets the search criteria to the data file(s) used in the BatchPrediction.
  4152. // The URL can identify either a file or an Amazon Simple Storage Solution
  4153. // (Amazon S3) bucket or directory.
  4154. FilterVariable *string `type:"string" enum:"BatchPredictionFilterVariable"`
  4155. // The greater than or equal to operator. The BatchPrediction results will have
  4156. // FilterVariable values that are greater than or equal to the value specified
  4157. // with GE.
  4158. GE *string `type:"string"`
  4159. // The greater than operator. The BatchPrediction results will have FilterVariable
  4160. // values that are greater than the value specified with GT.
  4161. GT *string `type:"string"`
  4162. // The less than or equal to operator. The BatchPrediction results will have
  4163. // FilterVariable values that are less than or equal to the value specified
  4164. // with LE.
  4165. LE *string `type:"string"`
  4166. // The less than operator. The BatchPrediction results will have FilterVariable
  4167. // values that are less than the value specified with LT.
  4168. LT *string `type:"string"`
  4169. // The number of pages of information to include in the result. The range of
  4170. // acceptable values is 1 through 100. The default value is 100.
  4171. Limit *int64 `min:"1" type:"integer"`
  4172. // The not equal to operator. The BatchPrediction results will have FilterVariable
  4173. // values not equal to the value specified with NE.
  4174. NE *string `type:"string"`
  4175. // An ID of the page in the paginated results.
  4176. NextToken *string `type:"string"`
  4177. // A string that is found at the beginning of a variable, such as Name or Id.
  4178. //
  4179. // For example, a Batch Prediction operation could have the Name2014-09-09-HolidayGiftMailer.
  4180. // To search for this BatchPrediction, select Name for the FilterVariable and
  4181. // any of the following strings for the Prefix:
  4182. //
  4183. // * 2014-09
  4184. //
  4185. // * 2014-09-09
  4186. //
  4187. // * 2014-09-09-Holiday
  4188. Prefix *string `type:"string"`
  4189. // A two-value parameter that determines the sequence of the resulting list
  4190. // of MLModels.
  4191. //
  4192. // * asc - Arranges the list in ascending order (A-Z, 0-9).
  4193. // * dsc - Arranges the list in descending order (Z-A, 9-0).
  4194. // Results are sorted by FilterVariable.
  4195. SortOrder *string `type:"string" enum:"SortOrder"`
  4196. }
  4197. // String returns the string representation
  4198. func (s DescribeBatchPredictionsInput) String() string {
  4199. return awsutil.Prettify(s)
  4200. }
  4201. // GoString returns the string representation
  4202. func (s DescribeBatchPredictionsInput) GoString() string {
  4203. return s.String()
  4204. }
  4205. // Validate inspects the fields of the type to determine if they are valid.
  4206. func (s *DescribeBatchPredictionsInput) Validate() error {
  4207. invalidParams := request.ErrInvalidParams{Context: "DescribeBatchPredictionsInput"}
  4208. if s.Limit != nil && *s.Limit < 1 {
  4209. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4210. }
  4211. if invalidParams.Len() > 0 {
  4212. return invalidParams
  4213. }
  4214. return nil
  4215. }
  4216. // SetEQ sets the EQ field's value.
  4217. func (s *DescribeBatchPredictionsInput) SetEQ(v string) *DescribeBatchPredictionsInput {
  4218. s.EQ = &v
  4219. return s
  4220. }
  4221. // SetFilterVariable sets the FilterVariable field's value.
  4222. func (s *DescribeBatchPredictionsInput) SetFilterVariable(v string) *DescribeBatchPredictionsInput {
  4223. s.FilterVariable = &v
  4224. return s
  4225. }
  4226. // SetGE sets the GE field's value.
  4227. func (s *DescribeBatchPredictionsInput) SetGE(v string) *DescribeBatchPredictionsInput {
  4228. s.GE = &v
  4229. return s
  4230. }
  4231. // SetGT sets the GT field's value.
  4232. func (s *DescribeBatchPredictionsInput) SetGT(v string) *DescribeBatchPredictionsInput {
  4233. s.GT = &v
  4234. return s
  4235. }
  4236. // SetLE sets the LE field's value.
  4237. func (s *DescribeBatchPredictionsInput) SetLE(v string) *DescribeBatchPredictionsInput {
  4238. s.LE = &v
  4239. return s
  4240. }
  4241. // SetLT sets the LT field's value.
  4242. func (s *DescribeBatchPredictionsInput) SetLT(v string) *DescribeBatchPredictionsInput {
  4243. s.LT = &v
  4244. return s
  4245. }
  4246. // SetLimit sets the Limit field's value.
  4247. func (s *DescribeBatchPredictionsInput) SetLimit(v int64) *DescribeBatchPredictionsInput {
  4248. s.Limit = &v
  4249. return s
  4250. }
  4251. // SetNE sets the NE field's value.
  4252. func (s *DescribeBatchPredictionsInput) SetNE(v string) *DescribeBatchPredictionsInput {
  4253. s.NE = &v
  4254. return s
  4255. }
  4256. // SetNextToken sets the NextToken field's value.
  4257. func (s *DescribeBatchPredictionsInput) SetNextToken(v string) *DescribeBatchPredictionsInput {
  4258. s.NextToken = &v
  4259. return s
  4260. }
  4261. // SetPrefix sets the Prefix field's value.
  4262. func (s *DescribeBatchPredictionsInput) SetPrefix(v string) *DescribeBatchPredictionsInput {
  4263. s.Prefix = &v
  4264. return s
  4265. }
  4266. // SetSortOrder sets the SortOrder field's value.
  4267. func (s *DescribeBatchPredictionsInput) SetSortOrder(v string) *DescribeBatchPredictionsInput {
  4268. s.SortOrder = &v
  4269. return s
  4270. }
  4271. // Represents the output of a DescribeBatchPredictions operation. The content
  4272. // is essentially a list of BatchPredictions.
  4273. type DescribeBatchPredictionsOutput struct {
  4274. _ struct{} `type:"structure"`
  4275. // The ID of the next page in the paginated results that indicates at least
  4276. // one more page follows.
  4277. NextToken *string `type:"string"`
  4278. // A list of BatchPrediction objects that meet the search criteria.
  4279. Results []*BatchPrediction `type:"list"`
  4280. }
  4281. // String returns the string representation
  4282. func (s DescribeBatchPredictionsOutput) String() string {
  4283. return awsutil.Prettify(s)
  4284. }
  4285. // GoString returns the string representation
  4286. func (s DescribeBatchPredictionsOutput) GoString() string {
  4287. return s.String()
  4288. }
  4289. // SetNextToken sets the NextToken field's value.
  4290. func (s *DescribeBatchPredictionsOutput) SetNextToken(v string) *DescribeBatchPredictionsOutput {
  4291. s.NextToken = &v
  4292. return s
  4293. }
  4294. // SetResults sets the Results field's value.
  4295. func (s *DescribeBatchPredictionsOutput) SetResults(v []*BatchPrediction) *DescribeBatchPredictionsOutput {
  4296. s.Results = v
  4297. return s
  4298. }
  4299. type DescribeDataSourcesInput struct {
  4300. _ struct{} `type:"structure"`
  4301. // The equal to operator. The DataSource results will have FilterVariable values
  4302. // that exactly match the value specified with EQ.
  4303. EQ *string `type:"string"`
  4304. // Use one of the following variables to filter a list of DataSource:
  4305. //
  4306. // * CreatedAt - Sets the search criteria to DataSource creation dates.
  4307. // * Status - Sets the search criteria to DataSource statuses.
  4308. // * Name - Sets the search criteria to the contents of DataSourceName.
  4309. // * DataUri - Sets the search criteria to the URI of data files used to
  4310. // create the DataSource. The URI can identify either a file or an Amazon
  4311. // Simple Storage Service (Amazon S3) bucket or directory.
  4312. // * IAMUser - Sets the search criteria to the user account that invoked
  4313. // the DataSource creation.
  4314. FilterVariable *string `type:"string" enum:"DataSourceFilterVariable"`
  4315. // The greater than or equal to operator. The DataSource results will have FilterVariable
  4316. // values that are greater than or equal to the value specified with GE.
  4317. GE *string `type:"string"`
  4318. // The greater than operator. The DataSource results will have FilterVariable
  4319. // values that are greater than the value specified with GT.
  4320. GT *string `type:"string"`
  4321. // The less than or equal to operator. The DataSource results will have FilterVariable
  4322. // values that are less than or equal to the value specified with LE.
  4323. LE *string `type:"string"`
  4324. // The less than operator. The DataSource results will have FilterVariable values
  4325. // that are less than the value specified with LT.
  4326. LT *string `type:"string"`
  4327. // The maximum number of DataSource to include in the result.
  4328. Limit *int64 `min:"1" type:"integer"`
  4329. // The not equal to operator. The DataSource results will have FilterVariable
  4330. // values not equal to the value specified with NE.
  4331. NE *string `type:"string"`
  4332. // The ID of the page in the paginated results.
  4333. NextToken *string `type:"string"`
  4334. // A string that is found at the beginning of a variable, such as Name or Id.
  4335. //
  4336. // For example, a DataSource could have the Name2014-09-09-HolidayGiftMailer.
  4337. // To search for this DataSource, select Name for the FilterVariable and any
  4338. // of the following strings for the Prefix:
  4339. //
  4340. // * 2014-09
  4341. //
  4342. // * 2014-09-09
  4343. //
  4344. // * 2014-09-09-Holiday
  4345. Prefix *string `type:"string"`
  4346. // A two-value parameter that determines the sequence of the resulting list
  4347. // of DataSource.
  4348. //
  4349. // * asc - Arranges the list in ascending order (A-Z, 0-9).
  4350. // * dsc - Arranges the list in descending order (Z-A, 9-0).
  4351. // Results are sorted by FilterVariable.
  4352. SortOrder *string `type:"string" enum:"SortOrder"`
  4353. }
  4354. // String returns the string representation
  4355. func (s DescribeDataSourcesInput) String() string {
  4356. return awsutil.Prettify(s)
  4357. }
  4358. // GoString returns the string representation
  4359. func (s DescribeDataSourcesInput) GoString() string {
  4360. return s.String()
  4361. }
  4362. // Validate inspects the fields of the type to determine if they are valid.
  4363. func (s *DescribeDataSourcesInput) Validate() error {
  4364. invalidParams := request.ErrInvalidParams{Context: "DescribeDataSourcesInput"}
  4365. if s.Limit != nil && *s.Limit < 1 {
  4366. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4367. }
  4368. if invalidParams.Len() > 0 {
  4369. return invalidParams
  4370. }
  4371. return nil
  4372. }
  4373. // SetEQ sets the EQ field's value.
  4374. func (s *DescribeDataSourcesInput) SetEQ(v string) *DescribeDataSourcesInput {
  4375. s.EQ = &v
  4376. return s
  4377. }
  4378. // SetFilterVariable sets the FilterVariable field's value.
  4379. func (s *DescribeDataSourcesInput) SetFilterVariable(v string) *DescribeDataSourcesInput {
  4380. s.FilterVariable = &v
  4381. return s
  4382. }
  4383. // SetGE sets the GE field's value.
  4384. func (s *DescribeDataSourcesInput) SetGE(v string) *DescribeDataSourcesInput {
  4385. s.GE = &v
  4386. return s
  4387. }
  4388. // SetGT sets the GT field's value.
  4389. func (s *DescribeDataSourcesInput) SetGT(v string) *DescribeDataSourcesInput {
  4390. s.GT = &v
  4391. return s
  4392. }
  4393. // SetLE sets the LE field's value.
  4394. func (s *DescribeDataSourcesInput) SetLE(v string) *DescribeDataSourcesInput {
  4395. s.LE = &v
  4396. return s
  4397. }
  4398. // SetLT sets the LT field's value.
  4399. func (s *DescribeDataSourcesInput) SetLT(v string) *DescribeDataSourcesInput {
  4400. s.LT = &v
  4401. return s
  4402. }
  4403. // SetLimit sets the Limit field's value.
  4404. func (s *DescribeDataSourcesInput) SetLimit(v int64) *DescribeDataSourcesInput {
  4405. s.Limit = &v
  4406. return s
  4407. }
  4408. // SetNE sets the NE field's value.
  4409. func (s *DescribeDataSourcesInput) SetNE(v string) *DescribeDataSourcesInput {
  4410. s.NE = &v
  4411. return s
  4412. }
  4413. // SetNextToken sets the NextToken field's value.
  4414. func (s *DescribeDataSourcesInput) SetNextToken(v string) *DescribeDataSourcesInput {
  4415. s.NextToken = &v
  4416. return s
  4417. }
  4418. // SetPrefix sets the Prefix field's value.
  4419. func (s *DescribeDataSourcesInput) SetPrefix(v string) *DescribeDataSourcesInput {
  4420. s.Prefix = &v
  4421. return s
  4422. }
  4423. // SetSortOrder sets the SortOrder field's value.
  4424. func (s *DescribeDataSourcesInput) SetSortOrder(v string) *DescribeDataSourcesInput {
  4425. s.SortOrder = &v
  4426. return s
  4427. }
  4428. // Represents the query results from a DescribeDataSources operation. The content
  4429. // is essentially a list of DataSource.
  4430. type DescribeDataSourcesOutput struct {
  4431. _ struct{} `type:"structure"`
  4432. // An ID of the next page in the paginated results that indicates at least one
  4433. // more page follows.
  4434. NextToken *string `type:"string"`
  4435. // A list of DataSource that meet the search criteria.
  4436. Results []*DataSource `type:"list"`
  4437. }
  4438. // String returns the string representation
  4439. func (s DescribeDataSourcesOutput) String() string {
  4440. return awsutil.Prettify(s)
  4441. }
  4442. // GoString returns the string representation
  4443. func (s DescribeDataSourcesOutput) GoString() string {
  4444. return s.String()
  4445. }
  4446. // SetNextToken sets the NextToken field's value.
  4447. func (s *DescribeDataSourcesOutput) SetNextToken(v string) *DescribeDataSourcesOutput {
  4448. s.NextToken = &v
  4449. return s
  4450. }
  4451. // SetResults sets the Results field's value.
  4452. func (s *DescribeDataSourcesOutput) SetResults(v []*DataSource) *DescribeDataSourcesOutput {
  4453. s.Results = v
  4454. return s
  4455. }
  4456. type DescribeEvaluationsInput struct {
  4457. _ struct{} `type:"structure"`
  4458. // The equal to operator. The Evaluation results will have FilterVariable values
  4459. // that exactly match the value specified with EQ.
  4460. EQ *string `type:"string"`
  4461. // Use one of the following variable to filter a list of Evaluation objects:
  4462. //
  4463. // * CreatedAt - Sets the search criteria to the Evaluation creation date.
  4464. //
  4465. // * Status - Sets the search criteria to the Evaluation status.
  4466. // * Name - Sets the search criteria to the contents of EvaluationName.
  4467. // * IAMUser - Sets the search criteria to the user account that invoked
  4468. // an Evaluation.
  4469. // * MLModelId - Sets the search criteria to the MLModel that was evaluated.
  4470. //
  4471. // * DataSourceId - Sets the search criteria to the DataSource used in Evaluation.
  4472. //
  4473. // * DataUri - Sets the search criteria to the data file(s) used in Evaluation.
  4474. // The URL can identify either a file or an Amazon Simple Storage Solution
  4475. // (Amazon S3) bucket or directory.
  4476. FilterVariable *string `type:"string" enum:"EvaluationFilterVariable"`
  4477. // The greater than or equal to operator. The Evaluation results will have FilterVariable
  4478. // values that are greater than or equal to the value specified with GE.
  4479. GE *string `type:"string"`
  4480. // The greater than operator. The Evaluation results will have FilterVariable
  4481. // values that are greater than the value specified with GT.
  4482. GT *string `type:"string"`
  4483. // The less than or equal to operator. The Evaluation results will have FilterVariable
  4484. // values that are less than or equal to the value specified with LE.
  4485. LE *string `type:"string"`
  4486. // The less than operator. The Evaluation results will have FilterVariable values
  4487. // that are less than the value specified with LT.
  4488. LT *string `type:"string"`
  4489. // The maximum number of Evaluation to include in the result.
  4490. Limit *int64 `min:"1" type:"integer"`
  4491. // The not equal to operator. The Evaluation results will have FilterVariable
  4492. // values not equal to the value specified with NE.
  4493. NE *string `type:"string"`
  4494. // The ID of the page in the paginated results.
  4495. NextToken *string `type:"string"`
  4496. // A string that is found at the beginning of a variable, such as Name or Id.
  4497. //
  4498. // For example, an Evaluation could have the Name2014-09-09-HolidayGiftMailer.
  4499. // To search for this Evaluation, select Name for the FilterVariable and any
  4500. // of the following strings for the Prefix:
  4501. //
  4502. // * 2014-09
  4503. //
  4504. // * 2014-09-09
  4505. //
  4506. // * 2014-09-09-Holiday
  4507. Prefix *string `type:"string"`
  4508. // A two-value parameter that determines the sequence of the resulting list
  4509. // of Evaluation.
  4510. //
  4511. // * asc - Arranges the list in ascending order (A-Z, 0-9).
  4512. // * dsc - Arranges the list in descending order (Z-A, 9-0).
  4513. // Results are sorted by FilterVariable.
  4514. SortOrder *string `type:"string" enum:"SortOrder"`
  4515. }
  4516. // String returns the string representation
  4517. func (s DescribeEvaluationsInput) String() string {
  4518. return awsutil.Prettify(s)
  4519. }
  4520. // GoString returns the string representation
  4521. func (s DescribeEvaluationsInput) GoString() string {
  4522. return s.String()
  4523. }
  4524. // Validate inspects the fields of the type to determine if they are valid.
  4525. func (s *DescribeEvaluationsInput) Validate() error {
  4526. invalidParams := request.ErrInvalidParams{Context: "DescribeEvaluationsInput"}
  4527. if s.Limit != nil && *s.Limit < 1 {
  4528. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4529. }
  4530. if invalidParams.Len() > 0 {
  4531. return invalidParams
  4532. }
  4533. return nil
  4534. }
  4535. // SetEQ sets the EQ field's value.
  4536. func (s *DescribeEvaluationsInput) SetEQ(v string) *DescribeEvaluationsInput {
  4537. s.EQ = &v
  4538. return s
  4539. }
  4540. // SetFilterVariable sets the FilterVariable field's value.
  4541. func (s *DescribeEvaluationsInput) SetFilterVariable(v string) *DescribeEvaluationsInput {
  4542. s.FilterVariable = &v
  4543. return s
  4544. }
  4545. // SetGE sets the GE field's value.
  4546. func (s *DescribeEvaluationsInput) SetGE(v string) *DescribeEvaluationsInput {
  4547. s.GE = &v
  4548. return s
  4549. }
  4550. // SetGT sets the GT field's value.
  4551. func (s *DescribeEvaluationsInput) SetGT(v string) *DescribeEvaluationsInput {
  4552. s.GT = &v
  4553. return s
  4554. }
  4555. // SetLE sets the LE field's value.
  4556. func (s *DescribeEvaluationsInput) SetLE(v string) *DescribeEvaluationsInput {
  4557. s.LE = &v
  4558. return s
  4559. }
  4560. // SetLT sets the LT field's value.
  4561. func (s *DescribeEvaluationsInput) SetLT(v string) *DescribeEvaluationsInput {
  4562. s.LT = &v
  4563. return s
  4564. }
  4565. // SetLimit sets the Limit field's value.
  4566. func (s *DescribeEvaluationsInput) SetLimit(v int64) *DescribeEvaluationsInput {
  4567. s.Limit = &v
  4568. return s
  4569. }
  4570. // SetNE sets the NE field's value.
  4571. func (s *DescribeEvaluationsInput) SetNE(v string) *DescribeEvaluationsInput {
  4572. s.NE = &v
  4573. return s
  4574. }
  4575. // SetNextToken sets the NextToken field's value.
  4576. func (s *DescribeEvaluationsInput) SetNextToken(v string) *DescribeEvaluationsInput {
  4577. s.NextToken = &v
  4578. return s
  4579. }
  4580. // SetPrefix sets the Prefix field's value.
  4581. func (s *DescribeEvaluationsInput) SetPrefix(v string) *DescribeEvaluationsInput {
  4582. s.Prefix = &v
  4583. return s
  4584. }
  4585. // SetSortOrder sets the SortOrder field's value.
  4586. func (s *DescribeEvaluationsInput) SetSortOrder(v string) *DescribeEvaluationsInput {
  4587. s.SortOrder = &v
  4588. return s
  4589. }
  4590. // Represents the query results from a DescribeEvaluations operation. The content
  4591. // is essentially a list of Evaluation.
  4592. type DescribeEvaluationsOutput struct {
  4593. _ struct{} `type:"structure"`
  4594. // The ID of the next page in the paginated results that indicates at least
  4595. // one more page follows.
  4596. NextToken *string `type:"string"`
  4597. // A list of Evaluation that meet the search criteria.
  4598. Results []*Evaluation `type:"list"`
  4599. }
  4600. // String returns the string representation
  4601. func (s DescribeEvaluationsOutput) String() string {
  4602. return awsutil.Prettify(s)
  4603. }
  4604. // GoString returns the string representation
  4605. func (s DescribeEvaluationsOutput) GoString() string {
  4606. return s.String()
  4607. }
  4608. // SetNextToken sets the NextToken field's value.
  4609. func (s *DescribeEvaluationsOutput) SetNextToken(v string) *DescribeEvaluationsOutput {
  4610. s.NextToken = &v
  4611. return s
  4612. }
  4613. // SetResults sets the Results field's value.
  4614. func (s *DescribeEvaluationsOutput) SetResults(v []*Evaluation) *DescribeEvaluationsOutput {
  4615. s.Results = v
  4616. return s
  4617. }
  4618. type DescribeMLModelsInput struct {
  4619. _ struct{} `type:"structure"`
  4620. // The equal to operator. The MLModel results will have FilterVariable values
  4621. // that exactly match the value specified with EQ.
  4622. EQ *string `type:"string"`
  4623. // Use one of the following variables to filter a list of MLModel:
  4624. //
  4625. // * CreatedAt - Sets the search criteria to MLModel creation date.
  4626. // * Status - Sets the search criteria to MLModel status.
  4627. // * Name - Sets the search criteria to the contents of MLModelName.
  4628. // * IAMUser - Sets the search criteria to the user account that invoked
  4629. // the MLModel creation.
  4630. // * TrainingDataSourceId - Sets the search criteria to the DataSource used
  4631. // to train one or more MLModel.
  4632. // * RealtimeEndpointStatus - Sets the search criteria to the MLModel real-time
  4633. // endpoint status.
  4634. // * MLModelType - Sets the search criteria to MLModel type: binary, regression,
  4635. // or multi-class.
  4636. // * Algorithm - Sets the search criteria to the algorithm that the MLModel
  4637. // uses.
  4638. // * TrainingDataURI - Sets the search criteria to the data file(s) used
  4639. // in training a MLModel. The URL can identify either a file or an Amazon
  4640. // Simple Storage Service (Amazon S3) bucket or directory.
  4641. FilterVariable *string `type:"string" enum:"MLModelFilterVariable"`
  4642. // The greater than or equal to operator. The MLModel results will have FilterVariable
  4643. // values that are greater than or equal to the value specified with GE.
  4644. GE *string `type:"string"`
  4645. // The greater than operator. The MLModel results will have FilterVariable values
  4646. // that are greater than the value specified with GT.
  4647. GT *string `type:"string"`
  4648. // The less than or equal to operator. The MLModel results will have FilterVariable
  4649. // values that are less than or equal to the value specified with LE.
  4650. LE *string `type:"string"`
  4651. // The less than operator. The MLModel results will have FilterVariable values
  4652. // that are less than the value specified with LT.
  4653. LT *string `type:"string"`
  4654. // The number of pages of information to include in the result. The range of
  4655. // acceptable values is 1 through 100. The default value is 100.
  4656. Limit *int64 `min:"1" type:"integer"`
  4657. // The not equal to operator. The MLModel results will have FilterVariable values
  4658. // not equal to the value specified with NE.
  4659. NE *string `type:"string"`
  4660. // The ID of the page in the paginated results.
  4661. NextToken *string `type:"string"`
  4662. // A string that is found at the beginning of a variable, such as Name or Id.
  4663. //
  4664. // For example, an MLModel could have the Name2014-09-09-HolidayGiftMailer.
  4665. // To search for this MLModel, select Name for the FilterVariable and any of
  4666. // the following strings for the Prefix:
  4667. //
  4668. // * 2014-09
  4669. //
  4670. // * 2014-09-09
  4671. //
  4672. // * 2014-09-09-Holiday
  4673. Prefix *string `type:"string"`
  4674. // A two-value parameter that determines the sequence of the resulting list
  4675. // of MLModel.
  4676. //
  4677. // * asc - Arranges the list in ascending order (A-Z, 0-9).
  4678. // * dsc - Arranges the list in descending order (Z-A, 9-0).
  4679. // Results are sorted by FilterVariable.
  4680. SortOrder *string `type:"string" enum:"SortOrder"`
  4681. }
  4682. // String returns the string representation
  4683. func (s DescribeMLModelsInput) String() string {
  4684. return awsutil.Prettify(s)
  4685. }
  4686. // GoString returns the string representation
  4687. func (s DescribeMLModelsInput) GoString() string {
  4688. return s.String()
  4689. }
  4690. // Validate inspects the fields of the type to determine if they are valid.
  4691. func (s *DescribeMLModelsInput) Validate() error {
  4692. invalidParams := request.ErrInvalidParams{Context: "DescribeMLModelsInput"}
  4693. if s.Limit != nil && *s.Limit < 1 {
  4694. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4695. }
  4696. if invalidParams.Len() > 0 {
  4697. return invalidParams
  4698. }
  4699. return nil
  4700. }
  4701. // SetEQ sets the EQ field's value.
  4702. func (s *DescribeMLModelsInput) SetEQ(v string) *DescribeMLModelsInput {
  4703. s.EQ = &v
  4704. return s
  4705. }
  4706. // SetFilterVariable sets the FilterVariable field's value.
  4707. func (s *DescribeMLModelsInput) SetFilterVariable(v string) *DescribeMLModelsInput {
  4708. s.FilterVariable = &v
  4709. return s
  4710. }
  4711. // SetGE sets the GE field's value.
  4712. func (s *DescribeMLModelsInput) SetGE(v string) *DescribeMLModelsInput {
  4713. s.GE = &v
  4714. return s
  4715. }
  4716. // SetGT sets the GT field's value.
  4717. func (s *DescribeMLModelsInput) SetGT(v string) *DescribeMLModelsInput {
  4718. s.GT = &v
  4719. return s
  4720. }
  4721. // SetLE sets the LE field's value.
  4722. func (s *DescribeMLModelsInput) SetLE(v string) *DescribeMLModelsInput {
  4723. s.LE = &v
  4724. return s
  4725. }
  4726. // SetLT sets the LT field's value.
  4727. func (s *DescribeMLModelsInput) SetLT(v string) *DescribeMLModelsInput {
  4728. s.LT = &v
  4729. return s
  4730. }
  4731. // SetLimit sets the Limit field's value.
  4732. func (s *DescribeMLModelsInput) SetLimit(v int64) *DescribeMLModelsInput {
  4733. s.Limit = &v
  4734. return s
  4735. }
  4736. // SetNE sets the NE field's value.
  4737. func (s *DescribeMLModelsInput) SetNE(v string) *DescribeMLModelsInput {
  4738. s.NE = &v
  4739. return s
  4740. }
  4741. // SetNextToken sets the NextToken field's value.
  4742. func (s *DescribeMLModelsInput) SetNextToken(v string) *DescribeMLModelsInput {
  4743. s.NextToken = &v
  4744. return s
  4745. }
  4746. // SetPrefix sets the Prefix field's value.
  4747. func (s *DescribeMLModelsInput) SetPrefix(v string) *DescribeMLModelsInput {
  4748. s.Prefix = &v
  4749. return s
  4750. }
  4751. // SetSortOrder sets the SortOrder field's value.
  4752. func (s *DescribeMLModelsInput) SetSortOrder(v string) *DescribeMLModelsInput {
  4753. s.SortOrder = &v
  4754. return s
  4755. }
  4756. // Represents the output of a DescribeMLModels operation. The content is essentially
  4757. // a list of MLModel.
  4758. type DescribeMLModelsOutput struct {
  4759. _ struct{} `type:"structure"`
  4760. // The ID of the next page in the paginated results that indicates at least
  4761. // one more page follows.
  4762. NextToken *string `type:"string"`
  4763. // A list of MLModel that meet the search criteria.
  4764. Results []*MLModel `type:"list"`
  4765. }
  4766. // String returns the string representation
  4767. func (s DescribeMLModelsOutput) String() string {
  4768. return awsutil.Prettify(s)
  4769. }
  4770. // GoString returns the string representation
  4771. func (s DescribeMLModelsOutput) GoString() string {
  4772. return s.String()
  4773. }
  4774. // SetNextToken sets the NextToken field's value.
  4775. func (s *DescribeMLModelsOutput) SetNextToken(v string) *DescribeMLModelsOutput {
  4776. s.NextToken = &v
  4777. return s
  4778. }
  4779. // SetResults sets the Results field's value.
  4780. func (s *DescribeMLModelsOutput) SetResults(v []*MLModel) *DescribeMLModelsOutput {
  4781. s.Results = v
  4782. return s
  4783. }
  4784. type DescribeTagsInput struct {
  4785. _ struct{} `type:"structure"`
  4786. // The ID of the ML object. For example, exampleModelId.
  4787. //
  4788. // ResourceId is a required field
  4789. ResourceId *string `min:"1" type:"string" required:"true"`
  4790. // The type of the ML object.
  4791. //
  4792. // ResourceType is a required field
  4793. ResourceType *string `type:"string" required:"true" enum:"TaggableResourceType"`
  4794. }
  4795. // String returns the string representation
  4796. func (s DescribeTagsInput) String() string {
  4797. return awsutil.Prettify(s)
  4798. }
  4799. // GoString returns the string representation
  4800. func (s DescribeTagsInput) GoString() string {
  4801. return s.String()
  4802. }
  4803. // Validate inspects the fields of the type to determine if they are valid.
  4804. func (s *DescribeTagsInput) Validate() error {
  4805. invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
  4806. if s.ResourceId == nil {
  4807. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4808. }
  4809. if s.ResourceId != nil && len(*s.ResourceId) < 1 {
  4810. invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
  4811. }
  4812. if s.ResourceType == nil {
  4813. invalidParams.Add(request.NewErrParamRequired("ResourceType"))
  4814. }
  4815. if invalidParams.Len() > 0 {
  4816. return invalidParams
  4817. }
  4818. return nil
  4819. }
  4820. // SetResourceId sets the ResourceId field's value.
  4821. func (s *DescribeTagsInput) SetResourceId(v string) *DescribeTagsInput {
  4822. s.ResourceId = &v
  4823. return s
  4824. }
  4825. // SetResourceType sets the ResourceType field's value.
  4826. func (s *DescribeTagsInput) SetResourceType(v string) *DescribeTagsInput {
  4827. s.ResourceType = &v
  4828. return s
  4829. }
  4830. // Amazon ML returns the following elements.
  4831. type DescribeTagsOutput struct {
  4832. _ struct{} `type:"structure"`
  4833. // The ID of the tagged ML object.
  4834. ResourceId *string `min:"1" type:"string"`
  4835. // The type of the tagged ML object.
  4836. ResourceType *string `type:"string" enum:"TaggableResourceType"`
  4837. // A list of tags associated with the ML object.
  4838. Tags []*Tag `type:"list"`
  4839. }
  4840. // String returns the string representation
  4841. func (s DescribeTagsOutput) String() string {
  4842. return awsutil.Prettify(s)
  4843. }
  4844. // GoString returns the string representation
  4845. func (s DescribeTagsOutput) GoString() string {
  4846. return s.String()
  4847. }
  4848. // SetResourceId sets the ResourceId field's value.
  4849. func (s *DescribeTagsOutput) SetResourceId(v string) *DescribeTagsOutput {
  4850. s.ResourceId = &v
  4851. return s
  4852. }
  4853. // SetResourceType sets the ResourceType field's value.
  4854. func (s *DescribeTagsOutput) SetResourceType(v string) *DescribeTagsOutput {
  4855. s.ResourceType = &v
  4856. return s
  4857. }
  4858. // SetTags sets the Tags field's value.
  4859. func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput {
  4860. s.Tags = v
  4861. return s
  4862. }
  4863. // Represents the output of GetEvaluation operation.
  4864. //
  4865. // The content consists of the detailed metadata and data file information and
  4866. // the current status of the Evaluation.
  4867. type Evaluation struct {
  4868. _ struct{} `type:"structure"`
  4869. // Long integer type that is a 64-bit signed number.
  4870. ComputeTime *int64 `type:"long"`
  4871. // The time that the Evaluation was created. The time is expressed in epoch
  4872. // time.
  4873. CreatedAt *time.Time `type:"timestamp"`
  4874. // The AWS user account that invoked the evaluation. The account type can be
  4875. // either an AWS root account or an AWS Identity and Access Management (IAM)
  4876. // user account.
  4877. CreatedByIamUser *string `type:"string"`
  4878. // The ID of the DataSource that is used to evaluate the MLModel.
  4879. EvaluationDataSourceId *string `min:"1" type:"string"`
  4880. // The ID that is assigned to the Evaluation at creation.
  4881. EvaluationId *string `min:"1" type:"string"`
  4882. // A timestamp represented in epoch time.
  4883. FinishedAt *time.Time `type:"timestamp"`
  4884. // The location and name of the data in Amazon Simple Storage Server (Amazon
  4885. // S3) that is used in the evaluation.
  4886. InputDataLocationS3 *string `type:"string"`
  4887. // The time of the most recent edit to the Evaluation. The time is expressed
  4888. // in epoch time.
  4889. LastUpdatedAt *time.Time `type:"timestamp"`
  4890. // The ID of the MLModel that is the focus of the evaluation.
  4891. MLModelId *string `min:"1" type:"string"`
  4892. // A description of the most recent details about evaluating the MLModel.
  4893. Message *string `type:"string"`
  4894. // A user-supplied name or description of the Evaluation.
  4895. Name *string `type:"string"`
  4896. // Measurements of how well the MLModel performed, using observations referenced
  4897. // by the DataSource. One of the following metrics is returned, based on the
  4898. // type of the MLModel:
  4899. //
  4900. // * BinaryAUC: A binary MLModel uses the Area Under the Curve (AUC) technique
  4901. // to measure performance.
  4902. //
  4903. // * RegressionRMSE: A regression MLModel uses the Root Mean Square Error
  4904. // (RMSE) technique to measure performance. RMSE measures the difference
  4905. // between predicted and actual values for a single variable.
  4906. //
  4907. // * MulticlassAvgFScore: A multiclass MLModel uses the F1 score technique
  4908. // to measure performance.
  4909. //
  4910. // For more information about performance metrics, please see the Amazon Machine
  4911. // Learning Developer Guide (http://docs.aws.amazon.com/machine-learning/latest/dg).
  4912. PerformanceMetrics *PerformanceMetrics `type:"structure"`
  4913. // A timestamp represented in epoch time.
  4914. StartedAt *time.Time `type:"timestamp"`
  4915. // The status of the evaluation. This element can have one of the following
  4916. // values:
  4917. //
  4918. // * PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
  4919. // evaluate an MLModel.
  4920. // * INPROGRESS - The evaluation is underway.
  4921. // * FAILED - The request to evaluate an MLModel did not run to completion.
  4922. // It is not usable.
  4923. // * COMPLETED - The evaluation process completed successfully.
  4924. // * DELETED - The Evaluation is marked as deleted. It is not usable.
  4925. Status *string `type:"string" enum:"EntityStatus"`
  4926. }
  4927. // String returns the string representation
  4928. func (s Evaluation) String() string {
  4929. return awsutil.Prettify(s)
  4930. }
  4931. // GoString returns the string representation
  4932. func (s Evaluation) GoString() string {
  4933. return s.String()
  4934. }
  4935. // SetComputeTime sets the ComputeTime field's value.
  4936. func (s *Evaluation) SetComputeTime(v int64) *Evaluation {
  4937. s.ComputeTime = &v
  4938. return s
  4939. }
  4940. // SetCreatedAt sets the CreatedAt field's value.
  4941. func (s *Evaluation) SetCreatedAt(v time.Time) *Evaluation {
  4942. s.CreatedAt = &v
  4943. return s
  4944. }
  4945. // SetCreatedByIamUser sets the CreatedByIamUser field's value.
  4946. func (s *Evaluation) SetCreatedByIamUser(v string) *Evaluation {
  4947. s.CreatedByIamUser = &v
  4948. return s
  4949. }
  4950. // SetEvaluationDataSourceId sets the EvaluationDataSourceId field's value.
  4951. func (s *Evaluation) SetEvaluationDataSourceId(v string) *Evaluation {
  4952. s.EvaluationDataSourceId = &v
  4953. return s
  4954. }
  4955. // SetEvaluationId sets the EvaluationId field's value.
  4956. func (s *Evaluation) SetEvaluationId(v string) *Evaluation {
  4957. s.EvaluationId = &v
  4958. return s
  4959. }
  4960. // SetFinishedAt sets the FinishedAt field's value.
  4961. func (s *Evaluation) SetFinishedAt(v time.Time) *Evaluation {
  4962. s.FinishedAt = &v
  4963. return s
  4964. }
  4965. // SetInputDataLocationS3 sets the InputDataLocationS3 field's value.
  4966. func (s *Evaluation) SetInputDataLocationS3(v string) *Evaluation {
  4967. s.InputDataLocationS3 = &v
  4968. return s
  4969. }
  4970. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  4971. func (s *Evaluation) SetLastUpdatedAt(v time.Time) *Evaluation {
  4972. s.LastUpdatedAt = &v
  4973. return s
  4974. }
  4975. // SetMLModelId sets the MLModelId field's value.
  4976. func (s *Evaluation) SetMLModelId(v string) *Evaluation {
  4977. s.MLModelId = &v
  4978. return s
  4979. }
  4980. // SetMessage sets the Message field's value.
  4981. func (s *Evaluation) SetMessage(v string) *Evaluation {
  4982. s.Message = &v
  4983. return s
  4984. }
  4985. // SetName sets the Name field's value.
  4986. func (s *Evaluation) SetName(v string) *Evaluation {
  4987. s.Name = &v
  4988. return s
  4989. }
  4990. // SetPerformanceMetrics sets the PerformanceMetrics field's value.
  4991. func (s *Evaluation) SetPerformanceMetrics(v *PerformanceMetrics) *Evaluation {
  4992. s.PerformanceMetrics = v
  4993. return s
  4994. }
  4995. // SetStartedAt sets the StartedAt field's value.
  4996. func (s *Evaluation) SetStartedAt(v time.Time) *Evaluation {
  4997. s.StartedAt = &v
  4998. return s
  4999. }
  5000. // SetStatus sets the Status field's value.
  5001. func (s *Evaluation) SetStatus(v string) *Evaluation {
  5002. s.Status = &v
  5003. return s
  5004. }
  5005. type GetBatchPredictionInput struct {
  5006. _ struct{} `type:"structure"`
  5007. // An ID assigned to the BatchPrediction at creation.
  5008. //
  5009. // BatchPredictionId is a required field
  5010. BatchPredictionId *string `min:"1" type:"string" required:"true"`
  5011. }
  5012. // String returns the string representation
  5013. func (s GetBatchPredictionInput) String() string {
  5014. return awsutil.Prettify(s)
  5015. }
  5016. // GoString returns the string representation
  5017. func (s GetBatchPredictionInput) GoString() string {
  5018. return s.String()
  5019. }
  5020. // Validate inspects the fields of the type to determine if they are valid.
  5021. func (s *GetBatchPredictionInput) Validate() error {
  5022. invalidParams := request.ErrInvalidParams{Context: "GetBatchPredictionInput"}
  5023. if s.BatchPredictionId == nil {
  5024. invalidParams.Add(request.NewErrParamRequired("BatchPredictionId"))
  5025. }
  5026. if s.BatchPredictionId != nil && len(*s.BatchPredictionId) < 1 {
  5027. invalidParams.Add(request.NewErrParamMinLen("BatchPredictionId", 1))
  5028. }
  5029. if invalidParams.Len() > 0 {
  5030. return invalidParams
  5031. }
  5032. return nil
  5033. }
  5034. // SetBatchPredictionId sets the BatchPredictionId field's value.
  5035. func (s *GetBatchPredictionInput) SetBatchPredictionId(v string) *GetBatchPredictionInput {
  5036. s.BatchPredictionId = &v
  5037. return s
  5038. }
  5039. // Represents the output of a GetBatchPrediction operation and describes a BatchPrediction.
  5040. type GetBatchPredictionOutput struct {
  5041. _ struct{} `type:"structure"`
  5042. // The ID of the DataSource that was used to create the BatchPrediction.
  5043. BatchPredictionDataSourceId *string `min:"1" type:"string"`
  5044. // An ID assigned to the BatchPrediction at creation. This value should be identical
  5045. // to the value of the BatchPredictionID in the request.
  5046. BatchPredictionId *string `min:"1" type:"string"`
  5047. // The approximate CPU time in milliseconds that Amazon Machine Learning spent
  5048. // processing the BatchPrediction, normalized and scaled on computation resources.
  5049. // ComputeTime is only available if the BatchPrediction is in the COMPLETED
  5050. // state.
  5051. ComputeTime *int64 `type:"long"`
  5052. // The time when the BatchPrediction was created. The time is expressed in epoch
  5053. // time.
  5054. CreatedAt *time.Time `type:"timestamp"`
  5055. // The AWS user account that invoked the BatchPrediction. The account type can
  5056. // be either an AWS root account or an AWS Identity and Access Management (IAM)
  5057. // user account.
  5058. CreatedByIamUser *string `type:"string"`
  5059. // The epoch time when Amazon Machine Learning marked the BatchPrediction as
  5060. // COMPLETED or FAILED. FinishedAt is only available when the BatchPrediction
  5061. // is in the COMPLETED or FAILED state.
  5062. FinishedAt *time.Time `type:"timestamp"`
  5063. // The location of the data file or directory in Amazon Simple Storage Service
  5064. // (Amazon S3).
  5065. InputDataLocationS3 *string `type:"string"`
  5066. // The number of invalid records that Amazon Machine Learning saw while processing
  5067. // the BatchPrediction.
  5068. InvalidRecordCount *int64 `type:"long"`
  5069. // The time of the most recent edit to BatchPrediction. The time is expressed
  5070. // in epoch time.
  5071. LastUpdatedAt *time.Time `type:"timestamp"`
  5072. // A link to the file that contains logs of the CreateBatchPrediction operation.
  5073. LogUri *string `type:"string"`
  5074. // The ID of the MLModel that generated predictions for the BatchPrediction
  5075. // request.
  5076. MLModelId *string `min:"1" type:"string"`
  5077. // A description of the most recent details about processing the batch prediction
  5078. // request.
  5079. Message *string `type:"string"`
  5080. // A user-supplied name or description of the BatchPrediction.
  5081. Name *string `type:"string"`
  5082. // The location of an Amazon S3 bucket or directory to receive the operation
  5083. // results.
  5084. OutputUri *string `type:"string"`
  5085. // The epoch time when Amazon Machine Learning marked the BatchPrediction as
  5086. // INPROGRESS. StartedAt isn't available if the BatchPrediction is in the PENDING
  5087. // state.
  5088. StartedAt *time.Time `type:"timestamp"`
  5089. // The status of the BatchPrediction, which can be one of the following values:
  5090. //
  5091. // * PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
  5092. // generate batch predictions.
  5093. // * INPROGRESS - The batch predictions are in progress.
  5094. // * FAILED - The request to perform a batch prediction did not run to completion.
  5095. // It is not usable.
  5096. // * COMPLETED - The batch prediction process completed successfully.
  5097. // * DELETED - The BatchPrediction is marked as deleted. It is not usable.
  5098. Status *string `type:"string" enum:"EntityStatus"`
  5099. // The number of total records that Amazon Machine Learning saw while processing
  5100. // the BatchPrediction.
  5101. TotalRecordCount *int64 `type:"long"`
  5102. }
  5103. // String returns the string representation
  5104. func (s GetBatchPredictionOutput) String() string {
  5105. return awsutil.Prettify(s)
  5106. }
  5107. // GoString returns the string representation
  5108. func (s GetBatchPredictionOutput) GoString() string {
  5109. return s.String()
  5110. }
  5111. // SetBatchPredictionDataSourceId sets the BatchPredictionDataSourceId field's value.
  5112. func (s *GetBatchPredictionOutput) SetBatchPredictionDataSourceId(v string) *GetBatchPredictionOutput {
  5113. s.BatchPredictionDataSourceId = &v
  5114. return s
  5115. }
  5116. // SetBatchPredictionId sets the BatchPredictionId field's value.
  5117. func (s *GetBatchPredictionOutput) SetBatchPredictionId(v string) *GetBatchPredictionOutput {
  5118. s.BatchPredictionId = &v
  5119. return s
  5120. }
  5121. // SetComputeTime sets the ComputeTime field's value.
  5122. func (s *GetBatchPredictionOutput) SetComputeTime(v int64) *GetBatchPredictionOutput {
  5123. s.ComputeTime = &v
  5124. return s
  5125. }
  5126. // SetCreatedAt sets the CreatedAt field's value.
  5127. func (s *GetBatchPredictionOutput) SetCreatedAt(v time.Time) *GetBatchPredictionOutput {
  5128. s.CreatedAt = &v
  5129. return s
  5130. }
  5131. // SetCreatedByIamUser sets the CreatedByIamUser field's value.
  5132. func (s *GetBatchPredictionOutput) SetCreatedByIamUser(v string) *GetBatchPredictionOutput {
  5133. s.CreatedByIamUser = &v
  5134. return s
  5135. }
  5136. // SetFinishedAt sets the FinishedAt field's value.
  5137. func (s *GetBatchPredictionOutput) SetFinishedAt(v time.Time) *GetBatchPredictionOutput {
  5138. s.FinishedAt = &v
  5139. return s
  5140. }
  5141. // SetInputDataLocationS3 sets the InputDataLocationS3 field's value.
  5142. func (s *GetBatchPredictionOutput) SetInputDataLocationS3(v string) *GetBatchPredictionOutput {
  5143. s.InputDataLocationS3 = &v
  5144. return s
  5145. }
  5146. // SetInvalidRecordCount sets the InvalidRecordCount field's value.
  5147. func (s *GetBatchPredictionOutput) SetInvalidRecordCount(v int64) *GetBatchPredictionOutput {
  5148. s.InvalidRecordCount = &v
  5149. return s
  5150. }
  5151. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  5152. func (s *GetBatchPredictionOutput) SetLastUpdatedAt(v time.Time) *GetBatchPredictionOutput {
  5153. s.LastUpdatedAt = &v
  5154. return s
  5155. }
  5156. // SetLogUri sets the LogUri field's value.
  5157. func (s *GetBatchPredictionOutput) SetLogUri(v string) *GetBatchPredictionOutput {
  5158. s.LogUri = &v
  5159. return s
  5160. }
  5161. // SetMLModelId sets the MLModelId field's value.
  5162. func (s *GetBatchPredictionOutput) SetMLModelId(v string) *GetBatchPredictionOutput {
  5163. s.MLModelId = &v
  5164. return s
  5165. }
  5166. // SetMessage sets the Message field's value.
  5167. func (s *GetBatchPredictionOutput) SetMessage(v string) *GetBatchPredictionOutput {
  5168. s.Message = &v
  5169. return s
  5170. }
  5171. // SetName sets the Name field's value.
  5172. func (s *GetBatchPredictionOutput) SetName(v string) *GetBatchPredictionOutput {
  5173. s.Name = &v
  5174. return s
  5175. }
  5176. // SetOutputUri sets the OutputUri field's value.
  5177. func (s *GetBatchPredictionOutput) SetOutputUri(v string) *GetBatchPredictionOutput {
  5178. s.OutputUri = &v
  5179. return s
  5180. }
  5181. // SetStartedAt sets the StartedAt field's value.
  5182. func (s *GetBatchPredictionOutput) SetStartedAt(v time.Time) *GetBatchPredictionOutput {
  5183. s.StartedAt = &v
  5184. return s
  5185. }
  5186. // SetStatus sets the Status field's value.
  5187. func (s *GetBatchPredictionOutput) SetStatus(v string) *GetBatchPredictionOutput {
  5188. s.Status = &v
  5189. return s
  5190. }
  5191. // SetTotalRecordCount sets the TotalRecordCount field's value.
  5192. func (s *GetBatchPredictionOutput) SetTotalRecordCount(v int64) *GetBatchPredictionOutput {
  5193. s.TotalRecordCount = &v
  5194. return s
  5195. }
  5196. type GetDataSourceInput struct {
  5197. _ struct{} `type:"structure"`
  5198. // The ID assigned to the DataSource at creation.
  5199. //
  5200. // DataSourceId is a required field
  5201. DataSourceId *string `min:"1" type:"string" required:"true"`
  5202. // Specifies whether the GetDataSource operation should return DataSourceSchema.
  5203. //
  5204. // If true, DataSourceSchema is returned.
  5205. //
  5206. // If false, DataSourceSchema is not returned.
  5207. Verbose *bool `type:"boolean"`
  5208. }
  5209. // String returns the string representation
  5210. func (s GetDataSourceInput) String() string {
  5211. return awsutil.Prettify(s)
  5212. }
  5213. // GoString returns the string representation
  5214. func (s GetDataSourceInput) GoString() string {
  5215. return s.String()
  5216. }
  5217. // Validate inspects the fields of the type to determine if they are valid.
  5218. func (s *GetDataSourceInput) Validate() error {
  5219. invalidParams := request.ErrInvalidParams{Context: "GetDataSourceInput"}
  5220. if s.DataSourceId == nil {
  5221. invalidParams.Add(request.NewErrParamRequired("DataSourceId"))
  5222. }
  5223. if s.DataSourceId != nil && len(*s.DataSourceId) < 1 {
  5224. invalidParams.Add(request.NewErrParamMinLen("DataSourceId", 1))
  5225. }
  5226. if invalidParams.Len() > 0 {
  5227. return invalidParams
  5228. }
  5229. return nil
  5230. }
  5231. // SetDataSourceId sets the DataSourceId field's value.
  5232. func (s *GetDataSourceInput) SetDataSourceId(v string) *GetDataSourceInput {
  5233. s.DataSourceId = &v
  5234. return s
  5235. }
  5236. // SetVerbose sets the Verbose field's value.
  5237. func (s *GetDataSourceInput) SetVerbose(v bool) *GetDataSourceInput {
  5238. s.Verbose = &v
  5239. return s
  5240. }
  5241. // Represents the output of a GetDataSource operation and describes a DataSource.
  5242. type GetDataSourceOutput struct {
  5243. _ struct{} `type:"structure"`
  5244. // The parameter is true if statistics need to be generated from the observation
  5245. // data.
  5246. ComputeStatistics *bool `type:"boolean"`
  5247. // The approximate CPU time in milliseconds that Amazon Machine Learning spent
  5248. // processing the DataSource, normalized and scaled on computation resources.
  5249. // ComputeTime is only available if the DataSource is in the COMPLETED state
  5250. // and the ComputeStatistics is set to true.
  5251. ComputeTime *int64 `type:"long"`
  5252. // The time that the DataSource was created. The time is expressed in epoch
  5253. // time.
  5254. CreatedAt *time.Time `type:"timestamp"`
  5255. // The AWS user account from which the DataSource was created. The account type
  5256. // can be either an AWS root account or an AWS Identity and Access Management
  5257. // (IAM) user account.
  5258. CreatedByIamUser *string `type:"string"`
  5259. // The location of the data file or directory in Amazon Simple Storage Service
  5260. // (Amazon S3).
  5261. DataLocationS3 *string `type:"string"`
  5262. // A JSON string that represents the splitting and rearrangement requirement
  5263. // used when this DataSource was created.
  5264. DataRearrangement *string `type:"string"`
  5265. // The total size of observations in the data files.
  5266. DataSizeInBytes *int64 `type:"long"`
  5267. // The ID assigned to the DataSource at creation. This value should be identical
  5268. // to the value of the DataSourceId in the request.
  5269. DataSourceId *string `min:"1" type:"string"`
  5270. // The schema used by all of the data files of this DataSource.
  5271. //
  5272. // NoteThis parameter is provided as part of the verbose format.
  5273. DataSourceSchema *string `type:"string"`
  5274. // The epoch time when Amazon Machine Learning marked the DataSource as COMPLETED
  5275. // or FAILED. FinishedAt is only available when the DataSource is in the COMPLETED
  5276. // or FAILED state.
  5277. FinishedAt *time.Time `type:"timestamp"`
  5278. // The time of the most recent edit to the DataSource. The time is expressed
  5279. // in epoch time.
  5280. LastUpdatedAt *time.Time `type:"timestamp"`
  5281. // A link to the file containing logs of CreateDataSourceFrom* operations.
  5282. LogUri *string `type:"string"`
  5283. // The user-supplied description of the most recent details about creating the
  5284. // DataSource.
  5285. Message *string `type:"string"`
  5286. // A user-supplied name or description of the DataSource.
  5287. Name *string `type:"string"`
  5288. // The number of data files referenced by the DataSource.
  5289. NumberOfFiles *int64 `type:"long"`
  5290. // The datasource details that are specific to Amazon RDS.
  5291. RDSMetadata *RDSMetadata `type:"structure"`
  5292. // Describes the DataSource details specific to Amazon Redshift.
  5293. RedshiftMetadata *RedshiftMetadata `type:"structure"`
  5294. // The Amazon Resource Name (ARN) of an AWS IAM Role (http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html#roles-about-termsandconcepts),
  5295. // such as the following: arn:aws:iam::account:role/rolename.
  5296. RoleARN *string `min:"1" type:"string"`
  5297. // The epoch time when Amazon Machine Learning marked the DataSource as INPROGRESS.
  5298. // StartedAt isn't available if the DataSource is in the PENDING state.
  5299. StartedAt *time.Time `type:"timestamp"`
  5300. // The current status of the DataSource. This element can have one of the following
  5301. // values:
  5302. //
  5303. // * PENDING - Amazon ML submitted a request to create a DataSource.
  5304. // * INPROGRESS - The creation process is underway.
  5305. // * FAILED - The request to create a DataSource did not run to completion.
  5306. // It is not usable.
  5307. // * COMPLETED - The creation process completed successfully.
  5308. // * DELETED - The DataSource is marked as deleted. It is not usable.
  5309. Status *string `type:"string" enum:"EntityStatus"`
  5310. }
  5311. // String returns the string representation
  5312. func (s GetDataSourceOutput) String() string {
  5313. return awsutil.Prettify(s)
  5314. }
  5315. // GoString returns the string representation
  5316. func (s GetDataSourceOutput) GoString() string {
  5317. return s.String()
  5318. }
  5319. // SetComputeStatistics sets the ComputeStatistics field's value.
  5320. func (s *GetDataSourceOutput) SetComputeStatistics(v bool) *GetDataSourceOutput {
  5321. s.ComputeStatistics = &v
  5322. return s
  5323. }
  5324. // SetComputeTime sets the ComputeTime field's value.
  5325. func (s *GetDataSourceOutput) SetComputeTime(v int64) *GetDataSourceOutput {
  5326. s.ComputeTime = &v
  5327. return s
  5328. }
  5329. // SetCreatedAt sets the CreatedAt field's value.
  5330. func (s *GetDataSourceOutput) SetCreatedAt(v time.Time) *GetDataSourceOutput {
  5331. s.CreatedAt = &v
  5332. return s
  5333. }
  5334. // SetCreatedByIamUser sets the CreatedByIamUser field's value.
  5335. func (s *GetDataSourceOutput) SetCreatedByIamUser(v string) *GetDataSourceOutput {
  5336. s.CreatedByIamUser = &v
  5337. return s
  5338. }
  5339. // SetDataLocationS3 sets the DataLocationS3 field's value.
  5340. func (s *GetDataSourceOutput) SetDataLocationS3(v string) *GetDataSourceOutput {
  5341. s.DataLocationS3 = &v
  5342. return s
  5343. }
  5344. // SetDataRearrangement sets the DataRearrangement field's value.
  5345. func (s *GetDataSourceOutput) SetDataRearrangement(v string) *GetDataSourceOutput {
  5346. s.DataRearrangement = &v
  5347. return s
  5348. }
  5349. // SetDataSizeInBytes sets the DataSizeInBytes field's value.
  5350. func (s *GetDataSourceOutput) SetDataSizeInBytes(v int64) *GetDataSourceOutput {
  5351. s.DataSizeInBytes = &v
  5352. return s
  5353. }
  5354. // SetDataSourceId sets the DataSourceId field's value.
  5355. func (s *GetDataSourceOutput) SetDataSourceId(v string) *GetDataSourceOutput {
  5356. s.DataSourceId = &v
  5357. return s
  5358. }
  5359. // SetDataSourceSchema sets the DataSourceSchema field's value.
  5360. func (s *GetDataSourceOutput) SetDataSourceSchema(v string) *GetDataSourceOutput {
  5361. s.DataSourceSchema = &v
  5362. return s
  5363. }
  5364. // SetFinishedAt sets the FinishedAt field's value.
  5365. func (s *GetDataSourceOutput) SetFinishedAt(v time.Time) *GetDataSourceOutput {
  5366. s.FinishedAt = &v
  5367. return s
  5368. }
  5369. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  5370. func (s *GetDataSourceOutput) SetLastUpdatedAt(v time.Time) *GetDataSourceOutput {
  5371. s.LastUpdatedAt = &v
  5372. return s
  5373. }
  5374. // SetLogUri sets the LogUri field's value.
  5375. func (s *GetDataSourceOutput) SetLogUri(v string) *GetDataSourceOutput {
  5376. s.LogUri = &v
  5377. return s
  5378. }
  5379. // SetMessage sets the Message field's value.
  5380. func (s *GetDataSourceOutput) SetMessage(v string) *GetDataSourceOutput {
  5381. s.Message = &v
  5382. return s
  5383. }
  5384. // SetName sets the Name field's value.
  5385. func (s *GetDataSourceOutput) SetName(v string) *GetDataSourceOutput {
  5386. s.Name = &v
  5387. return s
  5388. }
  5389. // SetNumberOfFiles sets the NumberOfFiles field's value.
  5390. func (s *GetDataSourceOutput) SetNumberOfFiles(v int64) *GetDataSourceOutput {
  5391. s.NumberOfFiles = &v
  5392. return s
  5393. }
  5394. // SetRDSMetadata sets the RDSMetadata field's value.
  5395. func (s *GetDataSourceOutput) SetRDSMetadata(v *RDSMetadata) *GetDataSourceOutput {
  5396. s.RDSMetadata = v
  5397. return s
  5398. }
  5399. // SetRedshiftMetadata sets the RedshiftMetadata field's value.
  5400. func (s *GetDataSourceOutput) SetRedshiftMetadata(v *RedshiftMetadata) *GetDataSourceOutput {
  5401. s.RedshiftMetadata = v
  5402. return s
  5403. }
  5404. // SetRoleARN sets the RoleARN field's value.
  5405. func (s *GetDataSourceOutput) SetRoleARN(v string) *GetDataSourceOutput {
  5406. s.RoleARN = &v
  5407. return s
  5408. }
  5409. // SetStartedAt sets the StartedAt field's value.
  5410. func (s *GetDataSourceOutput) SetStartedAt(v time.Time) *GetDataSourceOutput {
  5411. s.StartedAt = &v
  5412. return s
  5413. }
  5414. // SetStatus sets the Status field's value.
  5415. func (s *GetDataSourceOutput) SetStatus(v string) *GetDataSourceOutput {
  5416. s.Status = &v
  5417. return s
  5418. }
  5419. type GetEvaluationInput struct {
  5420. _ struct{} `type:"structure"`
  5421. // The ID of the Evaluation to retrieve. The evaluation of each MLModel is recorded
  5422. // and cataloged. The ID provides the means to access the information.
  5423. //
  5424. // EvaluationId is a required field
  5425. EvaluationId *string `min:"1" type:"string" required:"true"`
  5426. }
  5427. // String returns the string representation
  5428. func (s GetEvaluationInput) String() string {
  5429. return awsutil.Prettify(s)
  5430. }
  5431. // GoString returns the string representation
  5432. func (s GetEvaluationInput) GoString() string {
  5433. return s.String()
  5434. }
  5435. // Validate inspects the fields of the type to determine if they are valid.
  5436. func (s *GetEvaluationInput) Validate() error {
  5437. invalidParams := request.ErrInvalidParams{Context: "GetEvaluationInput"}
  5438. if s.EvaluationId == nil {
  5439. invalidParams.Add(request.NewErrParamRequired("EvaluationId"))
  5440. }
  5441. if s.EvaluationId != nil && len(*s.EvaluationId) < 1 {
  5442. invalidParams.Add(request.NewErrParamMinLen("EvaluationId", 1))
  5443. }
  5444. if invalidParams.Len() > 0 {
  5445. return invalidParams
  5446. }
  5447. return nil
  5448. }
  5449. // SetEvaluationId sets the EvaluationId field's value.
  5450. func (s *GetEvaluationInput) SetEvaluationId(v string) *GetEvaluationInput {
  5451. s.EvaluationId = &v
  5452. return s
  5453. }
  5454. // Represents the output of a GetEvaluation operation and describes an Evaluation.
  5455. type GetEvaluationOutput struct {
  5456. _ struct{} `type:"structure"`
  5457. // The approximate CPU time in milliseconds that Amazon Machine Learning spent
  5458. // processing the Evaluation, normalized and scaled on computation resources.
  5459. // ComputeTime is only available if the Evaluation is in the COMPLETED state.
  5460. ComputeTime *int64 `type:"long"`
  5461. // The time that the Evaluation was created. The time is expressed in epoch
  5462. // time.
  5463. CreatedAt *time.Time `type:"timestamp"`
  5464. // The AWS user account that invoked the evaluation. The account type can be
  5465. // either an AWS root account or an AWS Identity and Access Management (IAM)
  5466. // user account.
  5467. CreatedByIamUser *string `type:"string"`
  5468. // The DataSource used for this evaluation.
  5469. EvaluationDataSourceId *string `min:"1" type:"string"`
  5470. // The evaluation ID which is same as the EvaluationId in the request.
  5471. EvaluationId *string `min:"1" type:"string"`
  5472. // The epoch time when Amazon Machine Learning marked the Evaluation as COMPLETED
  5473. // or FAILED. FinishedAt is only available when the Evaluation is in the COMPLETED
  5474. // or FAILED state.
  5475. FinishedAt *time.Time `type:"timestamp"`
  5476. // The location of the data file or directory in Amazon Simple Storage Service
  5477. // (Amazon S3).
  5478. InputDataLocationS3 *string `type:"string"`
  5479. // The time of the most recent edit to the Evaluation. The time is expressed
  5480. // in epoch time.
  5481. LastUpdatedAt *time.Time `type:"timestamp"`
  5482. // A link to the file that contains logs of the CreateEvaluation operation.
  5483. LogUri *string `type:"string"`
  5484. // The ID of the MLModel that was the focus of the evaluation.
  5485. MLModelId *string `min:"1" type:"string"`
  5486. // A description of the most recent details about evaluating the MLModel.
  5487. Message *string `type:"string"`
  5488. // A user-supplied name or description of the Evaluation.
  5489. Name *string `type:"string"`
  5490. // Measurements of how well the MLModel performed using observations referenced
  5491. // by the DataSource. One of the following metric is returned based on the type
  5492. // of the MLModel:
  5493. //
  5494. // * BinaryAUC: A binary MLModel uses the Area Under the Curve (AUC) technique
  5495. // to measure performance.
  5496. //
  5497. // * RegressionRMSE: A regression MLModel uses the Root Mean Square Error
  5498. // (RMSE) technique to measure performance. RMSE measures the difference
  5499. // between predicted and actual values for a single variable.
  5500. //
  5501. // * MulticlassAvgFScore: A multiclass MLModel uses the F1 score technique
  5502. // to measure performance.
  5503. //
  5504. // For more information about performance metrics, please see the Amazon Machine
  5505. // Learning Developer Guide (http://docs.aws.amazon.com/machine-learning/latest/dg).
  5506. PerformanceMetrics *PerformanceMetrics `type:"structure"`
  5507. // The epoch time when Amazon Machine Learning marked the Evaluation as INPROGRESS.
  5508. // StartedAt isn't available if the Evaluation is in the PENDING state.
  5509. StartedAt *time.Time `type:"timestamp"`
  5510. // The status of the evaluation. This element can have one of the following
  5511. // values:
  5512. //
  5513. // * PENDING - Amazon Machine Language (Amazon ML) submitted a request to
  5514. // evaluate an MLModel.
  5515. // * INPROGRESS - The evaluation is underway.
  5516. // * FAILED - The request to evaluate an MLModel did not run to completion.
  5517. // It is not usable.
  5518. // * COMPLETED - The evaluation process completed successfully.
  5519. // * DELETED - The Evaluation is marked as deleted. It is not usable.
  5520. Status *string `type:"string" enum:"EntityStatus"`
  5521. }
  5522. // String returns the string representation
  5523. func (s GetEvaluationOutput) String() string {
  5524. return awsutil.Prettify(s)
  5525. }
  5526. // GoString returns the string representation
  5527. func (s GetEvaluationOutput) GoString() string {
  5528. return s.String()
  5529. }
  5530. // SetComputeTime sets the ComputeTime field's value.
  5531. func (s *GetEvaluationOutput) SetComputeTime(v int64) *GetEvaluationOutput {
  5532. s.ComputeTime = &v
  5533. return s
  5534. }
  5535. // SetCreatedAt sets the CreatedAt field's value.
  5536. func (s *GetEvaluationOutput) SetCreatedAt(v time.Time) *GetEvaluationOutput {
  5537. s.CreatedAt = &v
  5538. return s
  5539. }
  5540. // SetCreatedByIamUser sets the CreatedByIamUser field's value.
  5541. func (s *GetEvaluationOutput) SetCreatedByIamUser(v string) *GetEvaluationOutput {
  5542. s.CreatedByIamUser = &v
  5543. return s
  5544. }
  5545. // SetEvaluationDataSourceId sets the EvaluationDataSourceId field's value.
  5546. func (s *GetEvaluationOutput) SetEvaluationDataSourceId(v string) *GetEvaluationOutput {
  5547. s.EvaluationDataSourceId = &v
  5548. return s
  5549. }
  5550. // SetEvaluationId sets the EvaluationId field's value.
  5551. func (s *GetEvaluationOutput) SetEvaluationId(v string) *GetEvaluationOutput {
  5552. s.EvaluationId = &v
  5553. return s
  5554. }
  5555. // SetFinishedAt sets the FinishedAt field's value.
  5556. func (s *GetEvaluationOutput) SetFinishedAt(v time.Time) *GetEvaluationOutput {
  5557. s.FinishedAt = &v
  5558. return s
  5559. }
  5560. // SetInputDataLocationS3 sets the InputDataLocationS3 field's value.
  5561. func (s *GetEvaluationOutput) SetInputDataLocationS3(v string) *GetEvaluationOutput {
  5562. s.InputDataLocationS3 = &v
  5563. return s
  5564. }
  5565. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  5566. func (s *GetEvaluationOutput) SetLastUpdatedAt(v time.Time) *GetEvaluationOutput {
  5567. s.LastUpdatedAt = &v
  5568. return s
  5569. }
  5570. // SetLogUri sets the LogUri field's value.
  5571. func (s *GetEvaluationOutput) SetLogUri(v string) *GetEvaluationOutput {
  5572. s.LogUri = &v
  5573. return s
  5574. }
  5575. // SetMLModelId sets the MLModelId field's value.
  5576. func (s *GetEvaluationOutput) SetMLModelId(v string) *GetEvaluationOutput {
  5577. s.MLModelId = &v
  5578. return s
  5579. }
  5580. // SetMessage sets the Message field's value.
  5581. func (s *GetEvaluationOutput) SetMessage(v string) *GetEvaluationOutput {
  5582. s.Message = &v
  5583. return s
  5584. }
  5585. // SetName sets the Name field's value.
  5586. func (s *GetEvaluationOutput) SetName(v string) *GetEvaluationOutput {
  5587. s.Name = &v
  5588. return s
  5589. }
  5590. // SetPerformanceMetrics sets the PerformanceMetrics field's value.
  5591. func (s *GetEvaluationOutput) SetPerformanceMetrics(v *PerformanceMetrics) *GetEvaluationOutput {
  5592. s.PerformanceMetrics = v
  5593. return s
  5594. }
  5595. // SetStartedAt sets the StartedAt field's value.
  5596. func (s *GetEvaluationOutput) SetStartedAt(v time.Time) *GetEvaluationOutput {
  5597. s.StartedAt = &v
  5598. return s
  5599. }
  5600. // SetStatus sets the Status field's value.
  5601. func (s *GetEvaluationOutput) SetStatus(v string) *GetEvaluationOutput {
  5602. s.Status = &v
  5603. return s
  5604. }
  5605. type GetMLModelInput struct {
  5606. _ struct{} `type:"structure"`
  5607. // The ID assigned to the MLModel at creation.
  5608. //
  5609. // MLModelId is a required field
  5610. MLModelId *string `min:"1" type:"string" required:"true"`
  5611. // Specifies whether the GetMLModel operation should return Recipe.
  5612. //
  5613. // If true, Recipe is returned.
  5614. //
  5615. // If false, Recipe is not returned.
  5616. Verbose *bool `type:"boolean"`
  5617. }
  5618. // String returns the string representation
  5619. func (s GetMLModelInput) String() string {
  5620. return awsutil.Prettify(s)
  5621. }
  5622. // GoString returns the string representation
  5623. func (s GetMLModelInput) GoString() string {
  5624. return s.String()
  5625. }
  5626. // Validate inspects the fields of the type to determine if they are valid.
  5627. func (s *GetMLModelInput) Validate() error {
  5628. invalidParams := request.ErrInvalidParams{Context: "GetMLModelInput"}
  5629. if s.MLModelId == nil {
  5630. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  5631. }
  5632. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  5633. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  5634. }
  5635. if invalidParams.Len() > 0 {
  5636. return invalidParams
  5637. }
  5638. return nil
  5639. }
  5640. // SetMLModelId sets the MLModelId field's value.
  5641. func (s *GetMLModelInput) SetMLModelId(v string) *GetMLModelInput {
  5642. s.MLModelId = &v
  5643. return s
  5644. }
  5645. // SetVerbose sets the Verbose field's value.
  5646. func (s *GetMLModelInput) SetVerbose(v bool) *GetMLModelInput {
  5647. s.Verbose = &v
  5648. return s
  5649. }
  5650. // Represents the output of a GetMLModel operation, and provides detailed information
  5651. // about a MLModel.
  5652. type GetMLModelOutput struct {
  5653. _ struct{} `type:"structure"`
  5654. // The approximate CPU time in milliseconds that Amazon Machine Learning spent
  5655. // processing the MLModel, normalized and scaled on computation resources. ComputeTime
  5656. // is only available if the MLModel is in the COMPLETED state.
  5657. ComputeTime *int64 `type:"long"`
  5658. // The time that the MLModel was created. The time is expressed in epoch time.
  5659. CreatedAt *time.Time `type:"timestamp"`
  5660. // The AWS user account from which the MLModel was created. The account type
  5661. // can be either an AWS root account or an AWS Identity and Access Management
  5662. // (IAM) user account.
  5663. CreatedByIamUser *string `type:"string"`
  5664. // The current endpoint of the MLModel
  5665. EndpointInfo *RealtimeEndpointInfo `type:"structure"`
  5666. // The epoch time when Amazon Machine Learning marked the MLModel as COMPLETED
  5667. // or FAILED. FinishedAt is only available when the MLModel is in the COMPLETED
  5668. // or FAILED state.
  5669. FinishedAt *time.Time `type:"timestamp"`
  5670. // The location of the data file or directory in Amazon Simple Storage Service
  5671. // (Amazon S3).
  5672. InputDataLocationS3 *string `type:"string"`
  5673. // The time of the most recent edit to the MLModel. The time is expressed in
  5674. // epoch time.
  5675. LastUpdatedAt *time.Time `type:"timestamp"`
  5676. // A link to the file that contains logs of the CreateMLModel operation.
  5677. LogUri *string `type:"string"`
  5678. // The MLModel ID, which is same as the MLModelId in the request.
  5679. MLModelId *string `min:"1" type:"string"`
  5680. // Identifies the MLModel category. The following are the available types:
  5681. //
  5682. // * REGRESSION -- Produces a numeric result. For example, "What price should
  5683. // a house be listed at?"
  5684. // * BINARY -- Produces one of two possible results. For example, "Is this
  5685. // an e-commerce website?"
  5686. // * MULTICLASS -- Produces one of several possible results. For example,
  5687. // "Is this a HIGH, LOW or MEDIUM risk trade?"
  5688. MLModelType *string `type:"string" enum:"MLModelType"`
  5689. // A description of the most recent details about accessing the MLModel.
  5690. Message *string `type:"string"`
  5691. // A user-supplied name or description of the MLModel.
  5692. Name *string `type:"string"`
  5693. // The recipe to use when training the MLModel. The Recipe provides detailed
  5694. // information about the observation data to use during training, and manipulations
  5695. // to perform on the observation data during training.
  5696. //
  5697. // NoteThis parameter is provided as part of the verbose format.
  5698. Recipe *string `type:"string"`
  5699. // The schema used by all of the data files referenced by the DataSource.
  5700. //
  5701. // NoteThis parameter is provided as part of the verbose format.
  5702. Schema *string `type:"string"`
  5703. // The scoring threshold is used in binary classification MLModelmodels. It
  5704. // marks the boundary between a positive prediction and a negative prediction.
  5705. //
  5706. // Output values greater than or equal to the threshold receive a positive result
  5707. // from the MLModel, such as true. Output values less than the threshold receive
  5708. // a negative response from the MLModel, such as false.
  5709. ScoreThreshold *float64 `type:"float"`
  5710. // The time of the most recent edit to the ScoreThreshold. The time is expressed
  5711. // in epoch time.
  5712. ScoreThresholdLastUpdatedAt *time.Time `type:"timestamp"`
  5713. // Long integer type that is a 64-bit signed number.
  5714. SizeInBytes *int64 `type:"long"`
  5715. // The epoch time when Amazon Machine Learning marked the MLModel as INPROGRESS.
  5716. // StartedAt isn't available if the MLModel is in the PENDING state.
  5717. StartedAt *time.Time `type:"timestamp"`
  5718. // The current status of the MLModel. This element can have one of the following
  5719. // values:
  5720. //
  5721. // * PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
  5722. // describe a MLModel.
  5723. // * INPROGRESS - The request is processing.
  5724. // * FAILED - The request did not run to completion. The ML model isn't usable.
  5725. //
  5726. // * COMPLETED - The request completed successfully.
  5727. // * DELETED - The MLModel is marked as deleted. It isn't usable.
  5728. Status *string `type:"string" enum:"EntityStatus"`
  5729. // The ID of the training DataSource.
  5730. TrainingDataSourceId *string `min:"1" type:"string"`
  5731. // A list of the training parameters in the MLModel. The list is implemented
  5732. // as a map of key-value pairs.
  5733. //
  5734. // The following is the current set of training parameters:
  5735. //
  5736. // * sgd.maxMLModelSizeInBytes - The maximum allowed size of the model. Depending
  5737. // on the input data, the size of the model might affect its performance.
  5738. //
  5739. // The value is an integer that ranges from 100000 to 2147483648. The default
  5740. // value is 33554432.
  5741. //
  5742. // * sgd.maxPasses - The number of times that the training process traverses
  5743. // the observations to build the MLModel. The value is an integer that ranges
  5744. // from 1 to 10000. The default value is 10.
  5745. //
  5746. // * sgd.shuffleType - Whether Amazon ML shuffles the training data. Shuffling
  5747. // data improves a model's ability to find the optimal solution for a variety
  5748. // of data types. The valid values are auto and none. The default value is
  5749. // none. We strongly recommend that you shuffle your data.
  5750. //
  5751. // * sgd.l1RegularizationAmount - The coefficient regularization L1 norm.
  5752. // It controls overfitting the data by penalizing large coefficients. This
  5753. // tends to drive coefficients to zero, resulting in a sparse feature set.
  5754. // If you use this parameter, start by specifying a small value, such as
  5755. // 1.0E-08.
  5756. //
  5757. // The value is a double that ranges from 0 to MAX_DOUBLE. The default is to
  5758. // not use L1 normalization. This parameter can't be used when L2 is specified.
  5759. // Use this parameter sparingly.
  5760. //
  5761. // * sgd.l2RegularizationAmount - The coefficient regularization L2 norm.
  5762. // It controls overfitting the data by penalizing large coefficients. This
  5763. // tends to drive coefficients to small, nonzero values. If you use this
  5764. // parameter, start by specifying a small value, such as 1.0E-08.
  5765. //
  5766. // The value is a double that ranges from 0 to MAX_DOUBLE. The default is to
  5767. // not use L2 normalization. This parameter can't be used when L1 is specified.
  5768. // Use this parameter sparingly.
  5769. TrainingParameters map[string]*string `type:"map"`
  5770. }
  5771. // String returns the string representation
  5772. func (s GetMLModelOutput) String() string {
  5773. return awsutil.Prettify(s)
  5774. }
  5775. // GoString returns the string representation
  5776. func (s GetMLModelOutput) GoString() string {
  5777. return s.String()
  5778. }
  5779. // SetComputeTime sets the ComputeTime field's value.
  5780. func (s *GetMLModelOutput) SetComputeTime(v int64) *GetMLModelOutput {
  5781. s.ComputeTime = &v
  5782. return s
  5783. }
  5784. // SetCreatedAt sets the CreatedAt field's value.
  5785. func (s *GetMLModelOutput) SetCreatedAt(v time.Time) *GetMLModelOutput {
  5786. s.CreatedAt = &v
  5787. return s
  5788. }
  5789. // SetCreatedByIamUser sets the CreatedByIamUser field's value.
  5790. func (s *GetMLModelOutput) SetCreatedByIamUser(v string) *GetMLModelOutput {
  5791. s.CreatedByIamUser = &v
  5792. return s
  5793. }
  5794. // SetEndpointInfo sets the EndpointInfo field's value.
  5795. func (s *GetMLModelOutput) SetEndpointInfo(v *RealtimeEndpointInfo) *GetMLModelOutput {
  5796. s.EndpointInfo = v
  5797. return s
  5798. }
  5799. // SetFinishedAt sets the FinishedAt field's value.
  5800. func (s *GetMLModelOutput) SetFinishedAt(v time.Time) *GetMLModelOutput {
  5801. s.FinishedAt = &v
  5802. return s
  5803. }
  5804. // SetInputDataLocationS3 sets the InputDataLocationS3 field's value.
  5805. func (s *GetMLModelOutput) SetInputDataLocationS3(v string) *GetMLModelOutput {
  5806. s.InputDataLocationS3 = &v
  5807. return s
  5808. }
  5809. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  5810. func (s *GetMLModelOutput) SetLastUpdatedAt(v time.Time) *GetMLModelOutput {
  5811. s.LastUpdatedAt = &v
  5812. return s
  5813. }
  5814. // SetLogUri sets the LogUri field's value.
  5815. func (s *GetMLModelOutput) SetLogUri(v string) *GetMLModelOutput {
  5816. s.LogUri = &v
  5817. return s
  5818. }
  5819. // SetMLModelId sets the MLModelId field's value.
  5820. func (s *GetMLModelOutput) SetMLModelId(v string) *GetMLModelOutput {
  5821. s.MLModelId = &v
  5822. return s
  5823. }
  5824. // SetMLModelType sets the MLModelType field's value.
  5825. func (s *GetMLModelOutput) SetMLModelType(v string) *GetMLModelOutput {
  5826. s.MLModelType = &v
  5827. return s
  5828. }
  5829. // SetMessage sets the Message field's value.
  5830. func (s *GetMLModelOutput) SetMessage(v string) *GetMLModelOutput {
  5831. s.Message = &v
  5832. return s
  5833. }
  5834. // SetName sets the Name field's value.
  5835. func (s *GetMLModelOutput) SetName(v string) *GetMLModelOutput {
  5836. s.Name = &v
  5837. return s
  5838. }
  5839. // SetRecipe sets the Recipe field's value.
  5840. func (s *GetMLModelOutput) SetRecipe(v string) *GetMLModelOutput {
  5841. s.Recipe = &v
  5842. return s
  5843. }
  5844. // SetSchema sets the Schema field's value.
  5845. func (s *GetMLModelOutput) SetSchema(v string) *GetMLModelOutput {
  5846. s.Schema = &v
  5847. return s
  5848. }
  5849. // SetScoreThreshold sets the ScoreThreshold field's value.
  5850. func (s *GetMLModelOutput) SetScoreThreshold(v float64) *GetMLModelOutput {
  5851. s.ScoreThreshold = &v
  5852. return s
  5853. }
  5854. // SetScoreThresholdLastUpdatedAt sets the ScoreThresholdLastUpdatedAt field's value.
  5855. func (s *GetMLModelOutput) SetScoreThresholdLastUpdatedAt(v time.Time) *GetMLModelOutput {
  5856. s.ScoreThresholdLastUpdatedAt = &v
  5857. return s
  5858. }
  5859. // SetSizeInBytes sets the SizeInBytes field's value.
  5860. func (s *GetMLModelOutput) SetSizeInBytes(v int64) *GetMLModelOutput {
  5861. s.SizeInBytes = &v
  5862. return s
  5863. }
  5864. // SetStartedAt sets the StartedAt field's value.
  5865. func (s *GetMLModelOutput) SetStartedAt(v time.Time) *GetMLModelOutput {
  5866. s.StartedAt = &v
  5867. return s
  5868. }
  5869. // SetStatus sets the Status field's value.
  5870. func (s *GetMLModelOutput) SetStatus(v string) *GetMLModelOutput {
  5871. s.Status = &v
  5872. return s
  5873. }
  5874. // SetTrainingDataSourceId sets the TrainingDataSourceId field's value.
  5875. func (s *GetMLModelOutput) SetTrainingDataSourceId(v string) *GetMLModelOutput {
  5876. s.TrainingDataSourceId = &v
  5877. return s
  5878. }
  5879. // SetTrainingParameters sets the TrainingParameters field's value.
  5880. func (s *GetMLModelOutput) SetTrainingParameters(v map[string]*string) *GetMLModelOutput {
  5881. s.TrainingParameters = v
  5882. return s
  5883. }
  5884. // Represents the output of a GetMLModel operation.
  5885. //
  5886. // The content consists of the detailed metadata and the current status of the
  5887. // MLModel.
  5888. type MLModel struct {
  5889. _ struct{} `type:"structure"`
  5890. // The algorithm used to train the MLModel. The following algorithm is supported:
  5891. //
  5892. // * SGD -- Stochastic gradient descent. The goal of SGD is to minimize the
  5893. // gradient of the loss function.
  5894. Algorithm *string `type:"string" enum:"Algorithm"`
  5895. // Long integer type that is a 64-bit signed number.
  5896. ComputeTime *int64 `type:"long"`
  5897. // The time that the MLModel was created. The time is expressed in epoch time.
  5898. CreatedAt *time.Time `type:"timestamp"`
  5899. // The AWS user account from which the MLModel was created. The account type
  5900. // can be either an AWS root account or an AWS Identity and Access Management
  5901. // (IAM) user account.
  5902. CreatedByIamUser *string `type:"string"`
  5903. // The current endpoint of the MLModel.
  5904. EndpointInfo *RealtimeEndpointInfo `type:"structure"`
  5905. // A timestamp represented in epoch time.
  5906. FinishedAt *time.Time `type:"timestamp"`
  5907. // The location of the data file or directory in Amazon Simple Storage Service
  5908. // (Amazon S3).
  5909. InputDataLocationS3 *string `type:"string"`
  5910. // The time of the most recent edit to the MLModel. The time is expressed in
  5911. // epoch time.
  5912. LastUpdatedAt *time.Time `type:"timestamp"`
  5913. // The ID assigned to the MLModel at creation.
  5914. MLModelId *string `min:"1" type:"string"`
  5915. // Identifies the MLModel category. The following are the available types:
  5916. //
  5917. // * REGRESSION - Produces a numeric result. For example, "What price should
  5918. // a house be listed at?"
  5919. // * BINARY - Produces one of two possible results. For example, "Is this
  5920. // a child-friendly web site?".
  5921. // * MULTICLASS - Produces one of several possible results. For example,
  5922. // "Is this a HIGH-, LOW-, or MEDIUM-risk trade?".
  5923. MLModelType *string `type:"string" enum:"MLModelType"`
  5924. // A description of the most recent details about accessing the MLModel.
  5925. Message *string `type:"string"`
  5926. // A user-supplied name or description of the MLModel.
  5927. Name *string `type:"string"`
  5928. ScoreThreshold *float64 `type:"float"`
  5929. // The time of the most recent edit to the ScoreThreshold. The time is expressed
  5930. // in epoch time.
  5931. ScoreThresholdLastUpdatedAt *time.Time `type:"timestamp"`
  5932. // Long integer type that is a 64-bit signed number.
  5933. SizeInBytes *int64 `type:"long"`
  5934. // A timestamp represented in epoch time.
  5935. StartedAt *time.Time `type:"timestamp"`
  5936. // The current status of an MLModel. This element can have one of the following
  5937. // values:
  5938. //
  5939. // * PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
  5940. // create an MLModel.
  5941. // * INPROGRESS - The creation process is underway.
  5942. // * FAILED - The request to create an MLModel didn't run to completion.
  5943. // The model isn't usable.
  5944. // * COMPLETED - The creation process completed successfully.
  5945. // * DELETED - The MLModel is marked as deleted. It isn't usable.
  5946. Status *string `type:"string" enum:"EntityStatus"`
  5947. // The ID of the training DataSource. The CreateMLModel operation uses the TrainingDataSourceId.
  5948. TrainingDataSourceId *string `min:"1" type:"string"`
  5949. // A list of the training parameters in the MLModel. The list is implemented
  5950. // as a map of key-value pairs.
  5951. //
  5952. // The following is the current set of training parameters:
  5953. //
  5954. // * sgd.maxMLModelSizeInBytes - The maximum allowed size of the model. Depending
  5955. // on the input data, the size of the model might affect its performance.
  5956. //
  5957. // The value is an integer that ranges from 100000 to 2147483648. The default
  5958. // value is 33554432.
  5959. //
  5960. // * sgd.maxPasses - The number of times that the training process traverses
  5961. // the observations to build the MLModel. The value is an integer that ranges
  5962. // from 1 to 10000. The default value is 10.
  5963. //
  5964. // * sgd.shuffleType - Whether Amazon ML shuffles the training data. Shuffling
  5965. // the data improves a model's ability to find the optimal solution for a
  5966. // variety of data types. The valid values are auto and none. The default
  5967. // value is none.
  5968. //
  5969. // * sgd.l1RegularizationAmount - The coefficient regularization L1 norm,
  5970. // which controls overfitting the data by penalizing large coefficients.
  5971. // This parameter tends to drive coefficients to zero, resulting in sparse
  5972. // feature set. If you use this parameter, start by specifying a small value,
  5973. // such as 1.0E-08.
  5974. //
  5975. // The value is a double that ranges from 0 to MAX_DOUBLE. The default is to
  5976. // not use L1 normalization. This parameter can't be used when L2 is specified.
  5977. // Use this parameter sparingly.
  5978. //
  5979. // * sgd.l2RegularizationAmount - The coefficient regularization L2 norm,
  5980. // which controls overfitting the data by penalizing large coefficients.
  5981. // This tends to drive coefficients to small, nonzero values. If you use
  5982. // this parameter, start by specifying a small value, such as 1.0E-08.
  5983. //
  5984. // The value is a double that ranges from 0 to MAX_DOUBLE. The default is to
  5985. // not use L2 normalization. This parameter can't be used when L1 is specified.
  5986. // Use this parameter sparingly.
  5987. TrainingParameters map[string]*string `type:"map"`
  5988. }
  5989. // String returns the string representation
  5990. func (s MLModel) String() string {
  5991. return awsutil.Prettify(s)
  5992. }
  5993. // GoString returns the string representation
  5994. func (s MLModel) GoString() string {
  5995. return s.String()
  5996. }
  5997. // SetAlgorithm sets the Algorithm field's value.
  5998. func (s *MLModel) SetAlgorithm(v string) *MLModel {
  5999. s.Algorithm = &v
  6000. return s
  6001. }
  6002. // SetComputeTime sets the ComputeTime field's value.
  6003. func (s *MLModel) SetComputeTime(v int64) *MLModel {
  6004. s.ComputeTime = &v
  6005. return s
  6006. }
  6007. // SetCreatedAt sets the CreatedAt field's value.
  6008. func (s *MLModel) SetCreatedAt(v time.Time) *MLModel {
  6009. s.CreatedAt = &v
  6010. return s
  6011. }
  6012. // SetCreatedByIamUser sets the CreatedByIamUser field's value.
  6013. func (s *MLModel) SetCreatedByIamUser(v string) *MLModel {
  6014. s.CreatedByIamUser = &v
  6015. return s
  6016. }
  6017. // SetEndpointInfo sets the EndpointInfo field's value.
  6018. func (s *MLModel) SetEndpointInfo(v *RealtimeEndpointInfo) *MLModel {
  6019. s.EndpointInfo = v
  6020. return s
  6021. }
  6022. // SetFinishedAt sets the FinishedAt field's value.
  6023. func (s *MLModel) SetFinishedAt(v time.Time) *MLModel {
  6024. s.FinishedAt = &v
  6025. return s
  6026. }
  6027. // SetInputDataLocationS3 sets the InputDataLocationS3 field's value.
  6028. func (s *MLModel) SetInputDataLocationS3(v string) *MLModel {
  6029. s.InputDataLocationS3 = &v
  6030. return s
  6031. }
  6032. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  6033. func (s *MLModel) SetLastUpdatedAt(v time.Time) *MLModel {
  6034. s.LastUpdatedAt = &v
  6035. return s
  6036. }
  6037. // SetMLModelId sets the MLModelId field's value.
  6038. func (s *MLModel) SetMLModelId(v string) *MLModel {
  6039. s.MLModelId = &v
  6040. return s
  6041. }
  6042. // SetMLModelType sets the MLModelType field's value.
  6043. func (s *MLModel) SetMLModelType(v string) *MLModel {
  6044. s.MLModelType = &v
  6045. return s
  6046. }
  6047. // SetMessage sets the Message field's value.
  6048. func (s *MLModel) SetMessage(v string) *MLModel {
  6049. s.Message = &v
  6050. return s
  6051. }
  6052. // SetName sets the Name field's value.
  6053. func (s *MLModel) SetName(v string) *MLModel {
  6054. s.Name = &v
  6055. return s
  6056. }
  6057. // SetScoreThreshold sets the ScoreThreshold field's value.
  6058. func (s *MLModel) SetScoreThreshold(v float64) *MLModel {
  6059. s.ScoreThreshold = &v
  6060. return s
  6061. }
  6062. // SetScoreThresholdLastUpdatedAt sets the ScoreThresholdLastUpdatedAt field's value.
  6063. func (s *MLModel) SetScoreThresholdLastUpdatedAt(v time.Time) *MLModel {
  6064. s.ScoreThresholdLastUpdatedAt = &v
  6065. return s
  6066. }
  6067. // SetSizeInBytes sets the SizeInBytes field's value.
  6068. func (s *MLModel) SetSizeInBytes(v int64) *MLModel {
  6069. s.SizeInBytes = &v
  6070. return s
  6071. }
  6072. // SetStartedAt sets the StartedAt field's value.
  6073. func (s *MLModel) SetStartedAt(v time.Time) *MLModel {
  6074. s.StartedAt = &v
  6075. return s
  6076. }
  6077. // SetStatus sets the Status field's value.
  6078. func (s *MLModel) SetStatus(v string) *MLModel {
  6079. s.Status = &v
  6080. return s
  6081. }
  6082. // SetTrainingDataSourceId sets the TrainingDataSourceId field's value.
  6083. func (s *MLModel) SetTrainingDataSourceId(v string) *MLModel {
  6084. s.TrainingDataSourceId = &v
  6085. return s
  6086. }
  6087. // SetTrainingParameters sets the TrainingParameters field's value.
  6088. func (s *MLModel) SetTrainingParameters(v map[string]*string) *MLModel {
  6089. s.TrainingParameters = v
  6090. return s
  6091. }
  6092. // Measurements of how well the MLModel performed on known observations. One
  6093. // of the following metrics is returned, based on the type of the MLModel:
  6094. //
  6095. // * BinaryAUC: The binary MLModel uses the Area Under the Curve (AUC) technique
  6096. // to measure performance.
  6097. //
  6098. // * RegressionRMSE: The regression MLModel uses the Root Mean Square Error
  6099. // (RMSE) technique to measure performance. RMSE measures the difference
  6100. // between predicted and actual values for a single variable.
  6101. //
  6102. // * MulticlassAvgFScore: The multiclass MLModel uses the F1 score technique
  6103. // to measure performance.
  6104. //
  6105. // For more information about performance metrics, please see the Amazon Machine
  6106. // Learning Developer Guide (http://docs.aws.amazon.com/machine-learning/latest/dg).
  6107. type PerformanceMetrics struct {
  6108. _ struct{} `type:"structure"`
  6109. Properties map[string]*string `type:"map"`
  6110. }
  6111. // String returns the string representation
  6112. func (s PerformanceMetrics) String() string {
  6113. return awsutil.Prettify(s)
  6114. }
  6115. // GoString returns the string representation
  6116. func (s PerformanceMetrics) GoString() string {
  6117. return s.String()
  6118. }
  6119. // SetProperties sets the Properties field's value.
  6120. func (s *PerformanceMetrics) SetProperties(v map[string]*string) *PerformanceMetrics {
  6121. s.Properties = v
  6122. return s
  6123. }
  6124. type PredictInput struct {
  6125. _ struct{} `type:"structure"`
  6126. // A unique identifier of the MLModel.
  6127. //
  6128. // MLModelId is a required field
  6129. MLModelId *string `min:"1" type:"string" required:"true"`
  6130. // PredictEndpoint is a required field
  6131. PredictEndpoint *string `type:"string" required:"true"`
  6132. // A map of variable name-value pairs that represent an observation.
  6133. //
  6134. // Record is a required field
  6135. Record map[string]*string `type:"map" required:"true"`
  6136. }
  6137. // String returns the string representation
  6138. func (s PredictInput) String() string {
  6139. return awsutil.Prettify(s)
  6140. }
  6141. // GoString returns the string representation
  6142. func (s PredictInput) GoString() string {
  6143. return s.String()
  6144. }
  6145. // Validate inspects the fields of the type to determine if they are valid.
  6146. func (s *PredictInput) Validate() error {
  6147. invalidParams := request.ErrInvalidParams{Context: "PredictInput"}
  6148. if s.MLModelId == nil {
  6149. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  6150. }
  6151. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  6152. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  6153. }
  6154. if s.PredictEndpoint == nil {
  6155. invalidParams.Add(request.NewErrParamRequired("PredictEndpoint"))
  6156. }
  6157. if s.Record == nil {
  6158. invalidParams.Add(request.NewErrParamRequired("Record"))
  6159. }
  6160. if invalidParams.Len() > 0 {
  6161. return invalidParams
  6162. }
  6163. return nil
  6164. }
  6165. // SetMLModelId sets the MLModelId field's value.
  6166. func (s *PredictInput) SetMLModelId(v string) *PredictInput {
  6167. s.MLModelId = &v
  6168. return s
  6169. }
  6170. // SetPredictEndpoint sets the PredictEndpoint field's value.
  6171. func (s *PredictInput) SetPredictEndpoint(v string) *PredictInput {
  6172. s.PredictEndpoint = &v
  6173. return s
  6174. }
  6175. // SetRecord sets the Record field's value.
  6176. func (s *PredictInput) SetRecord(v map[string]*string) *PredictInput {
  6177. s.Record = v
  6178. return s
  6179. }
  6180. type PredictOutput struct {
  6181. _ struct{} `type:"structure"`
  6182. // The output from a Predict operation:
  6183. //
  6184. // * Details - Contains the following attributes: DetailsAttributes.PREDICTIVE_MODEL_TYPE
  6185. // - REGRESSION | BINARY | MULTICLASSDetailsAttributes.ALGORITHM - SGD
  6186. //
  6187. // * PredictedLabel - Present for either a BINARY or MULTICLASSMLModel request.
  6188. //
  6189. //
  6190. // * PredictedScores - Contains the raw classification score corresponding
  6191. // to each label.
  6192. //
  6193. // * PredictedValue - Present for a REGRESSIONMLModel request.
  6194. Prediction *Prediction `type:"structure"`
  6195. }
  6196. // String returns the string representation
  6197. func (s PredictOutput) String() string {
  6198. return awsutil.Prettify(s)
  6199. }
  6200. // GoString returns the string representation
  6201. func (s PredictOutput) GoString() string {
  6202. return s.String()
  6203. }
  6204. // SetPrediction sets the Prediction field's value.
  6205. func (s *PredictOutput) SetPrediction(v *Prediction) *PredictOutput {
  6206. s.Prediction = v
  6207. return s
  6208. }
  6209. // The output from a Predict operation:
  6210. //
  6211. // * Details - Contains the following attributes: DetailsAttributes.PREDICTIVE_MODEL_TYPE
  6212. // - REGRESSION | BINARY | MULTICLASSDetailsAttributes.ALGORITHM - SGD
  6213. //
  6214. // * PredictedLabel - Present for either a BINARY or MULTICLASSMLModel request.
  6215. //
  6216. //
  6217. // * PredictedScores - Contains the raw classification score corresponding
  6218. // to each label.
  6219. //
  6220. // * PredictedValue - Present for a REGRESSIONMLModel request.
  6221. type Prediction struct {
  6222. _ struct{} `type:"structure"`
  6223. // Provides any additional details regarding the prediction.
  6224. Details map[string]*string `locationName:"details" type:"map"`
  6225. // The prediction label for either a BINARY or MULTICLASSMLModel.
  6226. PredictedLabel *string `locationName:"predictedLabel" min:"1" type:"string"`
  6227. // Provides the raw classification score corresponding to each label.
  6228. PredictedScores map[string]*float64 `locationName:"predictedScores" type:"map"`
  6229. // The prediction value for REGRESSIONMLModel
  6230. PredictedValue *float64 `locationName:"predictedValue" type:"float"`
  6231. }
  6232. // String returns the string representation
  6233. func (s Prediction) String() string {
  6234. return awsutil.Prettify(s)
  6235. }
  6236. // GoString returns the string representation
  6237. func (s Prediction) GoString() string {
  6238. return s.String()
  6239. }
  6240. // SetDetails sets the Details field's value.
  6241. func (s *Prediction) SetDetails(v map[string]*string) *Prediction {
  6242. s.Details = v
  6243. return s
  6244. }
  6245. // SetPredictedLabel sets the PredictedLabel field's value.
  6246. func (s *Prediction) SetPredictedLabel(v string) *Prediction {
  6247. s.PredictedLabel = &v
  6248. return s
  6249. }
  6250. // SetPredictedScores sets the PredictedScores field's value.
  6251. func (s *Prediction) SetPredictedScores(v map[string]*float64) *Prediction {
  6252. s.PredictedScores = v
  6253. return s
  6254. }
  6255. // SetPredictedValue sets the PredictedValue field's value.
  6256. func (s *Prediction) SetPredictedValue(v float64) *Prediction {
  6257. s.PredictedValue = &v
  6258. return s
  6259. }
  6260. // The data specification of an Amazon Relational Database Service (Amazon RDS)
  6261. // DataSource.
  6262. type RDSDataSpec struct {
  6263. _ struct{} `type:"structure"`
  6264. // A JSON string that represents the splitting and rearrangement processing
  6265. // to be applied to a DataSource. If the DataRearrangement parameter is not
  6266. // provided, all of the input data is used to create the Datasource.
  6267. //
  6268. // There are multiple parameters that control what data is used to create a
  6269. // datasource:
  6270. //
  6271. // * percentBegin
  6272. //
  6273. // Use percentBegin to indicate the beginning of the range of the data used
  6274. // to create the Datasource. If you do not include percentBegin and percentEnd,
  6275. // Amazon ML includes all of the data when creating the datasource.
  6276. //
  6277. // * percentEnd
  6278. //
  6279. // Use percentEnd to indicate the end of the range of the data used to create
  6280. // the Datasource. If you do not include percentBegin and percentEnd, Amazon
  6281. // ML includes all of the data when creating the datasource.
  6282. //
  6283. // * complement
  6284. //
  6285. // The complement parameter instructs Amazon ML to use the data that is not
  6286. // included in the range of percentBegin to percentEnd to create a datasource.
  6287. // The complement parameter is useful if you need to create complementary
  6288. // datasources for training and evaluation. To create a complementary datasource,
  6289. // use the same values for percentBegin and percentEnd, along with the complement
  6290. // parameter.
  6291. //
  6292. // For example, the following two datasources do not share any data, and can
  6293. // be used to train and evaluate a model. The first datasource has 25 percent
  6294. // of the data, and the second one has 75 percent of the data.
  6295. //
  6296. // Datasource for evaluation: {"splitting":{"percentBegin":0, "percentEnd":25}}
  6297. //
  6298. // Datasource for training: {"splitting":{"percentBegin":0, "percentEnd":25,
  6299. // "complement":"true"}}
  6300. //
  6301. // * strategy
  6302. //
  6303. // To change how Amazon ML splits the data for a datasource, use the strategy
  6304. // parameter.
  6305. //
  6306. // The default value for the strategy parameter is sequential, meaning that
  6307. // Amazon ML takes all of the data records between the percentBegin and percentEnd
  6308. // parameters for the datasource, in the order that the records appear in
  6309. // the input data.
  6310. //
  6311. // The following two DataRearrangement lines are examples of sequentially ordered
  6312. // training and evaluation datasources:
  6313. //
  6314. // Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100,
  6315. // "strategy":"sequential"}}
  6316. //
  6317. // Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100,
  6318. // "strategy":"sequential", "complement":"true"}}
  6319. //
  6320. // To randomly split the input data into the proportions indicated by the percentBegin
  6321. // and percentEnd parameters, set the strategy parameter to random and provide
  6322. // a string that is used as the seed value for the random data splitting
  6323. // (for example, you can use the S3 path to your data as the random seed
  6324. // string). If you choose the random split strategy, Amazon ML assigns each
  6325. // row of data a pseudo-random number between 0 and 100, and then selects
  6326. // the rows that have an assigned number between percentBegin and percentEnd.
  6327. // Pseudo-random numbers are assigned using both the input seed string value
  6328. // and the byte offset as a seed, so changing the data results in a different
  6329. // split. Any existing ordering is preserved. The random splitting strategy
  6330. // ensures that variables in the training and evaluation data are distributed
  6331. // similarly. It is useful in the cases where the input data may have an
  6332. // implicit sort order, which would otherwise result in training and evaluation
  6333. // datasources containing non-similar data records.
  6334. //
  6335. // The following two DataRearrangement lines are examples of non-sequentially
  6336. // ordered training and evaluation datasources:
  6337. //
  6338. // Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100,
  6339. // "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv"}}
  6340. //
  6341. // Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100,
  6342. // "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv", "complement":"true"}}
  6343. DataRearrangement *string `type:"string"`
  6344. // A JSON string that represents the schema for an Amazon RDS DataSource. The
  6345. // DataSchema defines the structure of the observation data in the data file(s)
  6346. // referenced in the DataSource.
  6347. //
  6348. // A DataSchema is not required if you specify a DataSchemaUri
  6349. //
  6350. // Define your DataSchema as a series of key-value pairs. attributes and excludedVariableNames
  6351. // have an array of key-value pairs for their value. Use the following format
  6352. // to define your DataSchema.
  6353. //
  6354. // { "version": "1.0",
  6355. //
  6356. // "recordAnnotationFieldName": "F1",
  6357. //
  6358. // "recordWeightFieldName": "F2",
  6359. //
  6360. // "targetFieldName": "F3",
  6361. //
  6362. // "dataFormat": "CSV",
  6363. //
  6364. // "dataFileContainsHeader": true,
  6365. //
  6366. // "attributes": [
  6367. //
  6368. // { "fieldName": "F1", "fieldType": "TEXT" }, { "fieldName": "F2", "fieldType":
  6369. // "NUMERIC" }, { "fieldName": "F3", "fieldType": "CATEGORICAL" }, { "fieldName":
  6370. // "F4", "fieldType": "NUMERIC" }, { "fieldName": "F5", "fieldType": "CATEGORICAL"
  6371. // }, { "fieldName": "F6", "fieldType": "TEXT" }, { "fieldName": "F7", "fieldType":
  6372. // "WEIGHTED_INT_SEQUENCE" }, { "fieldName": "F8", "fieldType": "WEIGHTED_STRING_SEQUENCE"
  6373. // } ],
  6374. //
  6375. // "excludedVariableNames": [ "F6" ] }
  6376. DataSchema *string `type:"string"`
  6377. // The Amazon S3 location of the DataSchema.
  6378. DataSchemaUri *string `type:"string"`
  6379. // The AWS Identity and Access Management (IAM) credentials that are used connect
  6380. // to the Amazon RDS database.
  6381. //
  6382. // DatabaseCredentials is a required field
  6383. DatabaseCredentials *RDSDatabaseCredentials `type:"structure" required:"true"`
  6384. // Describes the DatabaseName and InstanceIdentifier of an Amazon RDS database.
  6385. //
  6386. // DatabaseInformation is a required field
  6387. DatabaseInformation *RDSDatabase `type:"structure" required:"true"`
  6388. // The role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic Compute
  6389. // Cloud (Amazon EC2) instance to carry out the copy operation from Amazon RDS
  6390. // to an Amazon S3 task. For more information, see Role templates (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html)
  6391. // for data pipelines.
  6392. //
  6393. // ResourceRole is a required field
  6394. ResourceRole *string `min:"1" type:"string" required:"true"`
  6395. // The Amazon S3 location for staging Amazon RDS data. The data retrieved from
  6396. // Amazon RDS using SelectSqlQuery is stored in this location.
  6397. //
  6398. // S3StagingLocation is a required field
  6399. S3StagingLocation *string `type:"string" required:"true"`
  6400. // The security group IDs to be used to access a VPC-based RDS DB instance.
  6401. // Ensure that there are appropriate ingress rules set up to allow access to
  6402. // the RDS DB instance. This attribute is used by Data Pipeline to carry out
  6403. // the copy operation from Amazon RDS to an Amazon S3 task.
  6404. //
  6405. // SecurityGroupIds is a required field
  6406. SecurityGroupIds []*string `type:"list" required:"true"`
  6407. // The query that is used to retrieve the observation data for the DataSource.
  6408. //
  6409. // SelectSqlQuery is a required field
  6410. SelectSqlQuery *string `min:"1" type:"string" required:"true"`
  6411. // The role (DataPipelineDefaultRole) assumed by AWS Data Pipeline service to
  6412. // monitor the progress of the copy task from Amazon RDS to Amazon S3. For more
  6413. // information, see Role templates (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html)
  6414. // for data pipelines.
  6415. //
  6416. // ServiceRole is a required field
  6417. ServiceRole *string `min:"1" type:"string" required:"true"`
  6418. // The subnet ID to be used to access a VPC-based RDS DB instance. This attribute
  6419. // is used by Data Pipeline to carry out the copy task from Amazon RDS to Amazon
  6420. // S3.
  6421. //
  6422. // SubnetId is a required field
  6423. SubnetId *string `min:"1" type:"string" required:"true"`
  6424. }
  6425. // String returns the string representation
  6426. func (s RDSDataSpec) String() string {
  6427. return awsutil.Prettify(s)
  6428. }
  6429. // GoString returns the string representation
  6430. func (s RDSDataSpec) GoString() string {
  6431. return s.String()
  6432. }
  6433. // Validate inspects the fields of the type to determine if they are valid.
  6434. func (s *RDSDataSpec) Validate() error {
  6435. invalidParams := request.ErrInvalidParams{Context: "RDSDataSpec"}
  6436. if s.DatabaseCredentials == nil {
  6437. invalidParams.Add(request.NewErrParamRequired("DatabaseCredentials"))
  6438. }
  6439. if s.DatabaseInformation == nil {
  6440. invalidParams.Add(request.NewErrParamRequired("DatabaseInformation"))
  6441. }
  6442. if s.ResourceRole == nil {
  6443. invalidParams.Add(request.NewErrParamRequired("ResourceRole"))
  6444. }
  6445. if s.ResourceRole != nil && len(*s.ResourceRole) < 1 {
  6446. invalidParams.Add(request.NewErrParamMinLen("ResourceRole", 1))
  6447. }
  6448. if s.S3StagingLocation == nil {
  6449. invalidParams.Add(request.NewErrParamRequired("S3StagingLocation"))
  6450. }
  6451. if s.SecurityGroupIds == nil {
  6452. invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds"))
  6453. }
  6454. if s.SelectSqlQuery == nil {
  6455. invalidParams.Add(request.NewErrParamRequired("SelectSqlQuery"))
  6456. }
  6457. if s.SelectSqlQuery != nil && len(*s.SelectSqlQuery) < 1 {
  6458. invalidParams.Add(request.NewErrParamMinLen("SelectSqlQuery", 1))
  6459. }
  6460. if s.ServiceRole == nil {
  6461. invalidParams.Add(request.NewErrParamRequired("ServiceRole"))
  6462. }
  6463. if s.ServiceRole != nil && len(*s.ServiceRole) < 1 {
  6464. invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1))
  6465. }
  6466. if s.SubnetId == nil {
  6467. invalidParams.Add(request.NewErrParamRequired("SubnetId"))
  6468. }
  6469. if s.SubnetId != nil && len(*s.SubnetId) < 1 {
  6470. invalidParams.Add(request.NewErrParamMinLen("SubnetId", 1))
  6471. }
  6472. if s.DatabaseCredentials != nil {
  6473. if err := s.DatabaseCredentials.Validate(); err != nil {
  6474. invalidParams.AddNested("DatabaseCredentials", err.(request.ErrInvalidParams))
  6475. }
  6476. }
  6477. if s.DatabaseInformation != nil {
  6478. if err := s.DatabaseInformation.Validate(); err != nil {
  6479. invalidParams.AddNested("DatabaseInformation", err.(request.ErrInvalidParams))
  6480. }
  6481. }
  6482. if invalidParams.Len() > 0 {
  6483. return invalidParams
  6484. }
  6485. return nil
  6486. }
  6487. // SetDataRearrangement sets the DataRearrangement field's value.
  6488. func (s *RDSDataSpec) SetDataRearrangement(v string) *RDSDataSpec {
  6489. s.DataRearrangement = &v
  6490. return s
  6491. }
  6492. // SetDataSchema sets the DataSchema field's value.
  6493. func (s *RDSDataSpec) SetDataSchema(v string) *RDSDataSpec {
  6494. s.DataSchema = &v
  6495. return s
  6496. }
  6497. // SetDataSchemaUri sets the DataSchemaUri field's value.
  6498. func (s *RDSDataSpec) SetDataSchemaUri(v string) *RDSDataSpec {
  6499. s.DataSchemaUri = &v
  6500. return s
  6501. }
  6502. // SetDatabaseCredentials sets the DatabaseCredentials field's value.
  6503. func (s *RDSDataSpec) SetDatabaseCredentials(v *RDSDatabaseCredentials) *RDSDataSpec {
  6504. s.DatabaseCredentials = v
  6505. return s
  6506. }
  6507. // SetDatabaseInformation sets the DatabaseInformation field's value.
  6508. func (s *RDSDataSpec) SetDatabaseInformation(v *RDSDatabase) *RDSDataSpec {
  6509. s.DatabaseInformation = v
  6510. return s
  6511. }
  6512. // SetResourceRole sets the ResourceRole field's value.
  6513. func (s *RDSDataSpec) SetResourceRole(v string) *RDSDataSpec {
  6514. s.ResourceRole = &v
  6515. return s
  6516. }
  6517. // SetS3StagingLocation sets the S3StagingLocation field's value.
  6518. func (s *RDSDataSpec) SetS3StagingLocation(v string) *RDSDataSpec {
  6519. s.S3StagingLocation = &v
  6520. return s
  6521. }
  6522. // SetSecurityGroupIds sets the SecurityGroupIds field's value.
  6523. func (s *RDSDataSpec) SetSecurityGroupIds(v []*string) *RDSDataSpec {
  6524. s.SecurityGroupIds = v
  6525. return s
  6526. }
  6527. // SetSelectSqlQuery sets the SelectSqlQuery field's value.
  6528. func (s *RDSDataSpec) SetSelectSqlQuery(v string) *RDSDataSpec {
  6529. s.SelectSqlQuery = &v
  6530. return s
  6531. }
  6532. // SetServiceRole sets the ServiceRole field's value.
  6533. func (s *RDSDataSpec) SetServiceRole(v string) *RDSDataSpec {
  6534. s.ServiceRole = &v
  6535. return s
  6536. }
  6537. // SetSubnetId sets the SubnetId field's value.
  6538. func (s *RDSDataSpec) SetSubnetId(v string) *RDSDataSpec {
  6539. s.SubnetId = &v
  6540. return s
  6541. }
  6542. // The database details of an Amazon RDS database.
  6543. type RDSDatabase struct {
  6544. _ struct{} `type:"structure"`
  6545. // The name of a database hosted on an RDS DB instance.
  6546. //
  6547. // DatabaseName is a required field
  6548. DatabaseName *string `min:"1" type:"string" required:"true"`
  6549. // The ID of an RDS DB instance.
  6550. //
  6551. // InstanceIdentifier is a required field
  6552. InstanceIdentifier *string `min:"1" type:"string" required:"true"`
  6553. }
  6554. // String returns the string representation
  6555. func (s RDSDatabase) String() string {
  6556. return awsutil.Prettify(s)
  6557. }
  6558. // GoString returns the string representation
  6559. func (s RDSDatabase) GoString() string {
  6560. return s.String()
  6561. }
  6562. // Validate inspects the fields of the type to determine if they are valid.
  6563. func (s *RDSDatabase) Validate() error {
  6564. invalidParams := request.ErrInvalidParams{Context: "RDSDatabase"}
  6565. if s.DatabaseName == nil {
  6566. invalidParams.Add(request.NewErrParamRequired("DatabaseName"))
  6567. }
  6568. if s.DatabaseName != nil && len(*s.DatabaseName) < 1 {
  6569. invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1))
  6570. }
  6571. if s.InstanceIdentifier == nil {
  6572. invalidParams.Add(request.NewErrParamRequired("InstanceIdentifier"))
  6573. }
  6574. if s.InstanceIdentifier != nil && len(*s.InstanceIdentifier) < 1 {
  6575. invalidParams.Add(request.NewErrParamMinLen("InstanceIdentifier", 1))
  6576. }
  6577. if invalidParams.Len() > 0 {
  6578. return invalidParams
  6579. }
  6580. return nil
  6581. }
  6582. // SetDatabaseName sets the DatabaseName field's value.
  6583. func (s *RDSDatabase) SetDatabaseName(v string) *RDSDatabase {
  6584. s.DatabaseName = &v
  6585. return s
  6586. }
  6587. // SetInstanceIdentifier sets the InstanceIdentifier field's value.
  6588. func (s *RDSDatabase) SetInstanceIdentifier(v string) *RDSDatabase {
  6589. s.InstanceIdentifier = &v
  6590. return s
  6591. }
  6592. // The database credentials to connect to a database on an RDS DB instance.
  6593. type RDSDatabaseCredentials struct {
  6594. _ struct{} `type:"structure"`
  6595. // The password to be used by Amazon ML to connect to a database on an RDS DB
  6596. // instance. The password should have sufficient permissions to execute the
  6597. // RDSSelectQuery query.
  6598. //
  6599. // Password is a required field
  6600. Password *string `min:"8" type:"string" required:"true"`
  6601. // The username to be used by Amazon ML to connect to database on an Amazon
  6602. // RDS instance. The username should have sufficient permissions to execute
  6603. // an RDSSelectSqlQuery query.
  6604. //
  6605. // Username is a required field
  6606. Username *string `min:"1" type:"string" required:"true"`
  6607. }
  6608. // String returns the string representation
  6609. func (s RDSDatabaseCredentials) String() string {
  6610. return awsutil.Prettify(s)
  6611. }
  6612. // GoString returns the string representation
  6613. func (s RDSDatabaseCredentials) GoString() string {
  6614. return s.String()
  6615. }
  6616. // Validate inspects the fields of the type to determine if they are valid.
  6617. func (s *RDSDatabaseCredentials) Validate() error {
  6618. invalidParams := request.ErrInvalidParams{Context: "RDSDatabaseCredentials"}
  6619. if s.Password == nil {
  6620. invalidParams.Add(request.NewErrParamRequired("Password"))
  6621. }
  6622. if s.Password != nil && len(*s.Password) < 8 {
  6623. invalidParams.Add(request.NewErrParamMinLen("Password", 8))
  6624. }
  6625. if s.Username == nil {
  6626. invalidParams.Add(request.NewErrParamRequired("Username"))
  6627. }
  6628. if s.Username != nil && len(*s.Username) < 1 {
  6629. invalidParams.Add(request.NewErrParamMinLen("Username", 1))
  6630. }
  6631. if invalidParams.Len() > 0 {
  6632. return invalidParams
  6633. }
  6634. return nil
  6635. }
  6636. // SetPassword sets the Password field's value.
  6637. func (s *RDSDatabaseCredentials) SetPassword(v string) *RDSDatabaseCredentials {
  6638. s.Password = &v
  6639. return s
  6640. }
  6641. // SetUsername sets the Username field's value.
  6642. func (s *RDSDatabaseCredentials) SetUsername(v string) *RDSDatabaseCredentials {
  6643. s.Username = &v
  6644. return s
  6645. }
  6646. // The datasource details that are specific to Amazon RDS.
  6647. type RDSMetadata struct {
  6648. _ struct{} `type:"structure"`
  6649. // The ID of the Data Pipeline instance that is used to carry to copy data from
  6650. // Amazon RDS to Amazon S3. You can use the ID to find details about the instance
  6651. // in the Data Pipeline console.
  6652. DataPipelineId *string `min:"1" type:"string"`
  6653. // The database details required to connect to an Amazon RDS.
  6654. Database *RDSDatabase `type:"structure"`
  6655. // The username to be used by Amazon ML to connect to database on an Amazon
  6656. // RDS instance. The username should have sufficient permissions to execute
  6657. // an RDSSelectSqlQuery query.
  6658. DatabaseUserName *string `min:"1" type:"string"`
  6659. // The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance
  6660. // to carry out the copy task from Amazon RDS to Amazon S3. For more information,
  6661. // see Role templates (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html)
  6662. // for data pipelines.
  6663. ResourceRole *string `min:"1" type:"string"`
  6664. // The SQL query that is supplied during CreateDataSourceFromRDS. Returns only
  6665. // if Verbose is true in GetDataSourceInput.
  6666. SelectSqlQuery *string `min:"1" type:"string"`
  6667. // The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to
  6668. // monitor the progress of the copy task from Amazon RDS to Amazon S3. For more
  6669. // information, see Role templates (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html)
  6670. // for data pipelines.
  6671. ServiceRole *string `min:"1" type:"string"`
  6672. }
  6673. // String returns the string representation
  6674. func (s RDSMetadata) String() string {
  6675. return awsutil.Prettify(s)
  6676. }
  6677. // GoString returns the string representation
  6678. func (s RDSMetadata) GoString() string {
  6679. return s.String()
  6680. }
  6681. // SetDataPipelineId sets the DataPipelineId field's value.
  6682. func (s *RDSMetadata) SetDataPipelineId(v string) *RDSMetadata {
  6683. s.DataPipelineId = &v
  6684. return s
  6685. }
  6686. // SetDatabase sets the Database field's value.
  6687. func (s *RDSMetadata) SetDatabase(v *RDSDatabase) *RDSMetadata {
  6688. s.Database = v
  6689. return s
  6690. }
  6691. // SetDatabaseUserName sets the DatabaseUserName field's value.
  6692. func (s *RDSMetadata) SetDatabaseUserName(v string) *RDSMetadata {
  6693. s.DatabaseUserName = &v
  6694. return s
  6695. }
  6696. // SetResourceRole sets the ResourceRole field's value.
  6697. func (s *RDSMetadata) SetResourceRole(v string) *RDSMetadata {
  6698. s.ResourceRole = &v
  6699. return s
  6700. }
  6701. // SetSelectSqlQuery sets the SelectSqlQuery field's value.
  6702. func (s *RDSMetadata) SetSelectSqlQuery(v string) *RDSMetadata {
  6703. s.SelectSqlQuery = &v
  6704. return s
  6705. }
  6706. // SetServiceRole sets the ServiceRole field's value.
  6707. func (s *RDSMetadata) SetServiceRole(v string) *RDSMetadata {
  6708. s.ServiceRole = &v
  6709. return s
  6710. }
  6711. // Describes the real-time endpoint information for an MLModel.
  6712. type RealtimeEndpointInfo struct {
  6713. _ struct{} `type:"structure"`
  6714. // The time that the request to create the real-time endpoint for the MLModel
  6715. // was received. The time is expressed in epoch time.
  6716. CreatedAt *time.Time `type:"timestamp"`
  6717. // The current status of the real-time endpoint for the MLModel. This element
  6718. // can have one of the following values:
  6719. //
  6720. // * NONE - Endpoint does not exist or was previously deleted.
  6721. // * READY - Endpoint is ready to be used for real-time predictions.
  6722. // * UPDATING - Updating/creating the endpoint.
  6723. EndpointStatus *string `type:"string" enum:"RealtimeEndpointStatus"`
  6724. // The URI that specifies where to send real-time prediction requests for the
  6725. // MLModel.
  6726. //
  6727. // NoteThe application must wait until the real-time endpoint is ready before
  6728. // using this URI.
  6729. EndpointUrl *string `type:"string"`
  6730. // The maximum processing rate for the real-time endpoint for MLModel, measured
  6731. // in incoming requests per second.
  6732. PeakRequestsPerSecond *int64 `type:"integer"`
  6733. }
  6734. // String returns the string representation
  6735. func (s RealtimeEndpointInfo) String() string {
  6736. return awsutil.Prettify(s)
  6737. }
  6738. // GoString returns the string representation
  6739. func (s RealtimeEndpointInfo) GoString() string {
  6740. return s.String()
  6741. }
  6742. // SetCreatedAt sets the CreatedAt field's value.
  6743. func (s *RealtimeEndpointInfo) SetCreatedAt(v time.Time) *RealtimeEndpointInfo {
  6744. s.CreatedAt = &v
  6745. return s
  6746. }
  6747. // SetEndpointStatus sets the EndpointStatus field's value.
  6748. func (s *RealtimeEndpointInfo) SetEndpointStatus(v string) *RealtimeEndpointInfo {
  6749. s.EndpointStatus = &v
  6750. return s
  6751. }
  6752. // SetEndpointUrl sets the EndpointUrl field's value.
  6753. func (s *RealtimeEndpointInfo) SetEndpointUrl(v string) *RealtimeEndpointInfo {
  6754. s.EndpointUrl = &v
  6755. return s
  6756. }
  6757. // SetPeakRequestsPerSecond sets the PeakRequestsPerSecond field's value.
  6758. func (s *RealtimeEndpointInfo) SetPeakRequestsPerSecond(v int64) *RealtimeEndpointInfo {
  6759. s.PeakRequestsPerSecond = &v
  6760. return s
  6761. }
  6762. // Describes the data specification of an Amazon Redshift DataSource.
  6763. type RedshiftDataSpec struct {
  6764. _ struct{} `type:"structure"`
  6765. // A JSON string that represents the splitting and rearrangement processing
  6766. // to be applied to a DataSource. If the DataRearrangement parameter is not
  6767. // provided, all of the input data is used to create the Datasource.
  6768. //
  6769. // There are multiple parameters that control what data is used to create a
  6770. // datasource:
  6771. //
  6772. // * percentBegin
  6773. //
  6774. // Use percentBegin to indicate the beginning of the range of the data used
  6775. // to create the Datasource. If you do not include percentBegin and percentEnd,
  6776. // Amazon ML includes all of the data when creating the datasource.
  6777. //
  6778. // * percentEnd
  6779. //
  6780. // Use percentEnd to indicate the end of the range of the data used to create
  6781. // the Datasource. If you do not include percentBegin and percentEnd, Amazon
  6782. // ML includes all of the data when creating the datasource.
  6783. //
  6784. // * complement
  6785. //
  6786. // The complement parameter instructs Amazon ML to use the data that is not
  6787. // included in the range of percentBegin to percentEnd to create a datasource.
  6788. // The complement parameter is useful if you need to create complementary
  6789. // datasources for training and evaluation. To create a complementary datasource,
  6790. // use the same values for percentBegin and percentEnd, along with the complement
  6791. // parameter.
  6792. //
  6793. // For example, the following two datasources do not share any data, and can
  6794. // be used to train and evaluate a model. The first datasource has 25 percent
  6795. // of the data, and the second one has 75 percent of the data.
  6796. //
  6797. // Datasource for evaluation: {"splitting":{"percentBegin":0, "percentEnd":25}}
  6798. //
  6799. // Datasource for training: {"splitting":{"percentBegin":0, "percentEnd":25,
  6800. // "complement":"true"}}
  6801. //
  6802. // * strategy
  6803. //
  6804. // To change how Amazon ML splits the data for a datasource, use the strategy
  6805. // parameter.
  6806. //
  6807. // The default value for the strategy parameter is sequential, meaning that
  6808. // Amazon ML takes all of the data records between the percentBegin and percentEnd
  6809. // parameters for the datasource, in the order that the records appear in
  6810. // the input data.
  6811. //
  6812. // The following two DataRearrangement lines are examples of sequentially ordered
  6813. // training and evaluation datasources:
  6814. //
  6815. // Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100,
  6816. // "strategy":"sequential"}}
  6817. //
  6818. // Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100,
  6819. // "strategy":"sequential", "complement":"true"}}
  6820. //
  6821. // To randomly split the input data into the proportions indicated by the percentBegin
  6822. // and percentEnd parameters, set the strategy parameter to random and provide
  6823. // a string that is used as the seed value for the random data splitting
  6824. // (for example, you can use the S3 path to your data as the random seed
  6825. // string). If you choose the random split strategy, Amazon ML assigns each
  6826. // row of data a pseudo-random number between 0 and 100, and then selects
  6827. // the rows that have an assigned number between percentBegin and percentEnd.
  6828. // Pseudo-random numbers are assigned using both the input seed string value
  6829. // and the byte offset as a seed, so changing the data results in a different
  6830. // split. Any existing ordering is preserved. The random splitting strategy
  6831. // ensures that variables in the training and evaluation data are distributed
  6832. // similarly. It is useful in the cases where the input data may have an
  6833. // implicit sort order, which would otherwise result in training and evaluation
  6834. // datasources containing non-similar data records.
  6835. //
  6836. // The following two DataRearrangement lines are examples of non-sequentially
  6837. // ordered training and evaluation datasources:
  6838. //
  6839. // Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100,
  6840. // "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv"}}
  6841. //
  6842. // Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100,
  6843. // "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv", "complement":"true"}}
  6844. DataRearrangement *string `type:"string"`
  6845. // A JSON string that represents the schema for an Amazon Redshift DataSource.
  6846. // The DataSchema defines the structure of the observation data in the data
  6847. // file(s) referenced in the DataSource.
  6848. //
  6849. // A DataSchema is not required if you specify a DataSchemaUri.
  6850. //
  6851. // Define your DataSchema as a series of key-value pairs. attributes and excludedVariableNames
  6852. // have an array of key-value pairs for their value. Use the following format
  6853. // to define your DataSchema.
  6854. //
  6855. // { "version": "1.0",
  6856. //
  6857. // "recordAnnotationFieldName": "F1",
  6858. //
  6859. // "recordWeightFieldName": "F2",
  6860. //
  6861. // "targetFieldName": "F3",
  6862. //
  6863. // "dataFormat": "CSV",
  6864. //
  6865. // "dataFileContainsHeader": true,
  6866. //
  6867. // "attributes": [
  6868. //
  6869. // { "fieldName": "F1", "fieldType": "TEXT" }, { "fieldName": "F2", "fieldType":
  6870. // "NUMERIC" }, { "fieldName": "F3", "fieldType": "CATEGORICAL" }, { "fieldName":
  6871. // "F4", "fieldType": "NUMERIC" }, { "fieldName": "F5", "fieldType": "CATEGORICAL"
  6872. // }, { "fieldName": "F6", "fieldType": "TEXT" }, { "fieldName": "F7", "fieldType":
  6873. // "WEIGHTED_INT_SEQUENCE" }, { "fieldName": "F8", "fieldType": "WEIGHTED_STRING_SEQUENCE"
  6874. // } ],
  6875. //
  6876. // "excludedVariableNames": [ "F6" ] }
  6877. DataSchema *string `type:"string"`
  6878. // Describes the schema location for an Amazon Redshift DataSource.
  6879. DataSchemaUri *string `type:"string"`
  6880. // Describes AWS Identity and Access Management (IAM) credentials that are used
  6881. // connect to the Amazon Redshift database.
  6882. //
  6883. // DatabaseCredentials is a required field
  6884. DatabaseCredentials *RedshiftDatabaseCredentials `type:"structure" required:"true"`
  6885. // Describes the DatabaseName and ClusterIdentifier for an Amazon Redshift DataSource.
  6886. //
  6887. // DatabaseInformation is a required field
  6888. DatabaseInformation *RedshiftDatabase `type:"structure" required:"true"`
  6889. // Describes an Amazon S3 location to store the result set of the SelectSqlQuery
  6890. // query.
  6891. //
  6892. // S3StagingLocation is a required field
  6893. S3StagingLocation *string `type:"string" required:"true"`
  6894. // Describes the SQL Query to execute on an Amazon Redshift database for an
  6895. // Amazon Redshift DataSource.
  6896. //
  6897. // SelectSqlQuery is a required field
  6898. SelectSqlQuery *string `min:"1" type:"string" required:"true"`
  6899. }
  6900. // String returns the string representation
  6901. func (s RedshiftDataSpec) String() string {
  6902. return awsutil.Prettify(s)
  6903. }
  6904. // GoString returns the string representation
  6905. func (s RedshiftDataSpec) GoString() string {
  6906. return s.String()
  6907. }
  6908. // Validate inspects the fields of the type to determine if they are valid.
  6909. func (s *RedshiftDataSpec) Validate() error {
  6910. invalidParams := request.ErrInvalidParams{Context: "RedshiftDataSpec"}
  6911. if s.DatabaseCredentials == nil {
  6912. invalidParams.Add(request.NewErrParamRequired("DatabaseCredentials"))
  6913. }
  6914. if s.DatabaseInformation == nil {
  6915. invalidParams.Add(request.NewErrParamRequired("DatabaseInformation"))
  6916. }
  6917. if s.S3StagingLocation == nil {
  6918. invalidParams.Add(request.NewErrParamRequired("S3StagingLocation"))
  6919. }
  6920. if s.SelectSqlQuery == nil {
  6921. invalidParams.Add(request.NewErrParamRequired("SelectSqlQuery"))
  6922. }
  6923. if s.SelectSqlQuery != nil && len(*s.SelectSqlQuery) < 1 {
  6924. invalidParams.Add(request.NewErrParamMinLen("SelectSqlQuery", 1))
  6925. }
  6926. if s.DatabaseCredentials != nil {
  6927. if err := s.DatabaseCredentials.Validate(); err != nil {
  6928. invalidParams.AddNested("DatabaseCredentials", err.(request.ErrInvalidParams))
  6929. }
  6930. }
  6931. if s.DatabaseInformation != nil {
  6932. if err := s.DatabaseInformation.Validate(); err != nil {
  6933. invalidParams.AddNested("DatabaseInformation", err.(request.ErrInvalidParams))
  6934. }
  6935. }
  6936. if invalidParams.Len() > 0 {
  6937. return invalidParams
  6938. }
  6939. return nil
  6940. }
  6941. // SetDataRearrangement sets the DataRearrangement field's value.
  6942. func (s *RedshiftDataSpec) SetDataRearrangement(v string) *RedshiftDataSpec {
  6943. s.DataRearrangement = &v
  6944. return s
  6945. }
  6946. // SetDataSchema sets the DataSchema field's value.
  6947. func (s *RedshiftDataSpec) SetDataSchema(v string) *RedshiftDataSpec {
  6948. s.DataSchema = &v
  6949. return s
  6950. }
  6951. // SetDataSchemaUri sets the DataSchemaUri field's value.
  6952. func (s *RedshiftDataSpec) SetDataSchemaUri(v string) *RedshiftDataSpec {
  6953. s.DataSchemaUri = &v
  6954. return s
  6955. }
  6956. // SetDatabaseCredentials sets the DatabaseCredentials field's value.
  6957. func (s *RedshiftDataSpec) SetDatabaseCredentials(v *RedshiftDatabaseCredentials) *RedshiftDataSpec {
  6958. s.DatabaseCredentials = v
  6959. return s
  6960. }
  6961. // SetDatabaseInformation sets the DatabaseInformation field's value.
  6962. func (s *RedshiftDataSpec) SetDatabaseInformation(v *RedshiftDatabase) *RedshiftDataSpec {
  6963. s.DatabaseInformation = v
  6964. return s
  6965. }
  6966. // SetS3StagingLocation sets the S3StagingLocation field's value.
  6967. func (s *RedshiftDataSpec) SetS3StagingLocation(v string) *RedshiftDataSpec {
  6968. s.S3StagingLocation = &v
  6969. return s
  6970. }
  6971. // SetSelectSqlQuery sets the SelectSqlQuery field's value.
  6972. func (s *RedshiftDataSpec) SetSelectSqlQuery(v string) *RedshiftDataSpec {
  6973. s.SelectSqlQuery = &v
  6974. return s
  6975. }
  6976. // Describes the database details required to connect to an Amazon Redshift
  6977. // database.
  6978. type RedshiftDatabase struct {
  6979. _ struct{} `type:"structure"`
  6980. // The ID of an Amazon Redshift cluster.
  6981. //
  6982. // ClusterIdentifier is a required field
  6983. ClusterIdentifier *string `min:"1" type:"string" required:"true"`
  6984. // The name of a database hosted on an Amazon Redshift cluster.
  6985. //
  6986. // DatabaseName is a required field
  6987. DatabaseName *string `min:"1" type:"string" required:"true"`
  6988. }
  6989. // String returns the string representation
  6990. func (s RedshiftDatabase) String() string {
  6991. return awsutil.Prettify(s)
  6992. }
  6993. // GoString returns the string representation
  6994. func (s RedshiftDatabase) GoString() string {
  6995. return s.String()
  6996. }
  6997. // Validate inspects the fields of the type to determine if they are valid.
  6998. func (s *RedshiftDatabase) Validate() error {
  6999. invalidParams := request.ErrInvalidParams{Context: "RedshiftDatabase"}
  7000. if s.ClusterIdentifier == nil {
  7001. invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier"))
  7002. }
  7003. if s.ClusterIdentifier != nil && len(*s.ClusterIdentifier) < 1 {
  7004. invalidParams.Add(request.NewErrParamMinLen("ClusterIdentifier", 1))
  7005. }
  7006. if s.DatabaseName == nil {
  7007. invalidParams.Add(request.NewErrParamRequired("DatabaseName"))
  7008. }
  7009. if s.DatabaseName != nil && len(*s.DatabaseName) < 1 {
  7010. invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1))
  7011. }
  7012. if invalidParams.Len() > 0 {
  7013. return invalidParams
  7014. }
  7015. return nil
  7016. }
  7017. // SetClusterIdentifier sets the ClusterIdentifier field's value.
  7018. func (s *RedshiftDatabase) SetClusterIdentifier(v string) *RedshiftDatabase {
  7019. s.ClusterIdentifier = &v
  7020. return s
  7021. }
  7022. // SetDatabaseName sets the DatabaseName field's value.
  7023. func (s *RedshiftDatabase) SetDatabaseName(v string) *RedshiftDatabase {
  7024. s.DatabaseName = &v
  7025. return s
  7026. }
  7027. // Describes the database credentials for connecting to a database on an Amazon
  7028. // Redshift cluster.
  7029. type RedshiftDatabaseCredentials struct {
  7030. _ struct{} `type:"structure"`
  7031. // A password to be used by Amazon ML to connect to a database on an Amazon
  7032. // Redshift cluster. The password should have sufficient permissions to execute
  7033. // a RedshiftSelectSqlQuery query. The password should be valid for an Amazon
  7034. // Redshift USER (http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_USER.html).
  7035. //
  7036. // Password is a required field
  7037. Password *string `min:"8" type:"string" required:"true"`
  7038. // A username to be used by Amazon Machine Learning (Amazon ML)to connect to
  7039. // a database on an Amazon Redshift cluster. The username should have sufficient
  7040. // permissions to execute the RedshiftSelectSqlQuery query. The username should
  7041. // be valid for an Amazon Redshift USER (http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_USER.html).
  7042. //
  7043. // Username is a required field
  7044. Username *string `min:"1" type:"string" required:"true"`
  7045. }
  7046. // String returns the string representation
  7047. func (s RedshiftDatabaseCredentials) String() string {
  7048. return awsutil.Prettify(s)
  7049. }
  7050. // GoString returns the string representation
  7051. func (s RedshiftDatabaseCredentials) GoString() string {
  7052. return s.String()
  7053. }
  7054. // Validate inspects the fields of the type to determine if they are valid.
  7055. func (s *RedshiftDatabaseCredentials) Validate() error {
  7056. invalidParams := request.ErrInvalidParams{Context: "RedshiftDatabaseCredentials"}
  7057. if s.Password == nil {
  7058. invalidParams.Add(request.NewErrParamRequired("Password"))
  7059. }
  7060. if s.Password != nil && len(*s.Password) < 8 {
  7061. invalidParams.Add(request.NewErrParamMinLen("Password", 8))
  7062. }
  7063. if s.Username == nil {
  7064. invalidParams.Add(request.NewErrParamRequired("Username"))
  7065. }
  7066. if s.Username != nil && len(*s.Username) < 1 {
  7067. invalidParams.Add(request.NewErrParamMinLen("Username", 1))
  7068. }
  7069. if invalidParams.Len() > 0 {
  7070. return invalidParams
  7071. }
  7072. return nil
  7073. }
  7074. // SetPassword sets the Password field's value.
  7075. func (s *RedshiftDatabaseCredentials) SetPassword(v string) *RedshiftDatabaseCredentials {
  7076. s.Password = &v
  7077. return s
  7078. }
  7079. // SetUsername sets the Username field's value.
  7080. func (s *RedshiftDatabaseCredentials) SetUsername(v string) *RedshiftDatabaseCredentials {
  7081. s.Username = &v
  7082. return s
  7083. }
  7084. // Describes the DataSource details specific to Amazon Redshift.
  7085. type RedshiftMetadata struct {
  7086. _ struct{} `type:"structure"`
  7087. // A username to be used by Amazon Machine Learning (Amazon ML)to connect to
  7088. // a database on an Amazon Redshift cluster. The username should have sufficient
  7089. // permissions to execute the RedshiftSelectSqlQuery query. The username should
  7090. // be valid for an Amazon Redshift USER (http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_USER.html).
  7091. DatabaseUserName *string `min:"1" type:"string"`
  7092. // Describes the database details required to connect to an Amazon Redshift
  7093. // database.
  7094. RedshiftDatabase *RedshiftDatabase `type:"structure"`
  7095. // The SQL query that is specified during CreateDataSourceFromRedshift. Returns
  7096. // only if Verbose is true in GetDataSourceInput.
  7097. SelectSqlQuery *string `min:"1" type:"string"`
  7098. }
  7099. // String returns the string representation
  7100. func (s RedshiftMetadata) String() string {
  7101. return awsutil.Prettify(s)
  7102. }
  7103. // GoString returns the string representation
  7104. func (s RedshiftMetadata) GoString() string {
  7105. return s.String()
  7106. }
  7107. // SetDatabaseUserName sets the DatabaseUserName field's value.
  7108. func (s *RedshiftMetadata) SetDatabaseUserName(v string) *RedshiftMetadata {
  7109. s.DatabaseUserName = &v
  7110. return s
  7111. }
  7112. // SetRedshiftDatabase sets the RedshiftDatabase field's value.
  7113. func (s *RedshiftMetadata) SetRedshiftDatabase(v *RedshiftDatabase) *RedshiftMetadata {
  7114. s.RedshiftDatabase = v
  7115. return s
  7116. }
  7117. // SetSelectSqlQuery sets the SelectSqlQuery field's value.
  7118. func (s *RedshiftMetadata) SetSelectSqlQuery(v string) *RedshiftMetadata {
  7119. s.SelectSqlQuery = &v
  7120. return s
  7121. }
  7122. // Describes the data specification of a DataSource.
  7123. type S3DataSpec struct {
  7124. _ struct{} `type:"structure"`
  7125. // The location of the data file(s) used by a DataSource. The URI specifies
  7126. // a data file or an Amazon Simple Storage Service (Amazon S3) directory or
  7127. // bucket containing data files.
  7128. //
  7129. // DataLocationS3 is a required field
  7130. DataLocationS3 *string `type:"string" required:"true"`
  7131. // A JSON string that represents the splitting and rearrangement processing
  7132. // to be applied to a DataSource. If the DataRearrangement parameter is not
  7133. // provided, all of the input data is used to create the Datasource.
  7134. //
  7135. // There are multiple parameters that control what data is used to create a
  7136. // datasource:
  7137. //
  7138. // * percentBegin
  7139. //
  7140. // Use percentBegin to indicate the beginning of the range of the data used
  7141. // to create the Datasource. If you do not include percentBegin and percentEnd,
  7142. // Amazon ML includes all of the data when creating the datasource.
  7143. //
  7144. // * percentEnd
  7145. //
  7146. // Use percentEnd to indicate the end of the range of the data used to create
  7147. // the Datasource. If you do not include percentBegin and percentEnd, Amazon
  7148. // ML includes all of the data when creating the datasource.
  7149. //
  7150. // * complement
  7151. //
  7152. // The complement parameter instructs Amazon ML to use the data that is not
  7153. // included in the range of percentBegin to percentEnd to create a datasource.
  7154. // The complement parameter is useful if you need to create complementary
  7155. // datasources for training and evaluation. To create a complementary datasource,
  7156. // use the same values for percentBegin and percentEnd, along with the complement
  7157. // parameter.
  7158. //
  7159. // For example, the following two datasources do not share any data, and can
  7160. // be used to train and evaluate a model. The first datasource has 25 percent
  7161. // of the data, and the second one has 75 percent of the data.
  7162. //
  7163. // Datasource for evaluation: {"splitting":{"percentBegin":0, "percentEnd":25}}
  7164. //
  7165. // Datasource for training: {"splitting":{"percentBegin":0, "percentEnd":25,
  7166. // "complement":"true"}}
  7167. //
  7168. // * strategy
  7169. //
  7170. // To change how Amazon ML splits the data for a datasource, use the strategy
  7171. // parameter.
  7172. //
  7173. // The default value for the strategy parameter is sequential, meaning that
  7174. // Amazon ML takes all of the data records between the percentBegin and percentEnd
  7175. // parameters for the datasource, in the order that the records appear in
  7176. // the input data.
  7177. //
  7178. // The following two DataRearrangement lines are examples of sequentially ordered
  7179. // training and evaluation datasources:
  7180. //
  7181. // Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100,
  7182. // "strategy":"sequential"}}
  7183. //
  7184. // Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100,
  7185. // "strategy":"sequential", "complement":"true"}}
  7186. //
  7187. // To randomly split the input data into the proportions indicated by the percentBegin
  7188. // and percentEnd parameters, set the strategy parameter to random and provide
  7189. // a string that is used as the seed value for the random data splitting
  7190. // (for example, you can use the S3 path to your data as the random seed
  7191. // string). If you choose the random split strategy, Amazon ML assigns each
  7192. // row of data a pseudo-random number between 0 and 100, and then selects
  7193. // the rows that have an assigned number between percentBegin and percentEnd.
  7194. // Pseudo-random numbers are assigned using both the input seed string value
  7195. // and the byte offset as a seed, so changing the data results in a different
  7196. // split. Any existing ordering is preserved. The random splitting strategy
  7197. // ensures that variables in the training and evaluation data are distributed
  7198. // similarly. It is useful in the cases where the input data may have an
  7199. // implicit sort order, which would otherwise result in training and evaluation
  7200. // datasources containing non-similar data records.
  7201. //
  7202. // The following two DataRearrangement lines are examples of non-sequentially
  7203. // ordered training and evaluation datasources:
  7204. //
  7205. // Datasource for evaluation: {"splitting":{"percentBegin":70, "percentEnd":100,
  7206. // "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv"}}
  7207. //
  7208. // Datasource for training: {"splitting":{"percentBegin":70, "percentEnd":100,
  7209. // "strategy":"random", "randomSeed"="s3://my_s3_path/bucket/file.csv", "complement":"true"}}
  7210. DataRearrangement *string `type:"string"`
  7211. // A JSON string that represents the schema for an Amazon S3 DataSource. The
  7212. // DataSchema defines the structure of the observation data in the data file(s)
  7213. // referenced in the DataSource.
  7214. //
  7215. // You must provide either the DataSchema or the DataSchemaLocationS3.
  7216. //
  7217. // Define your DataSchema as a series of key-value pairs. attributes and excludedVariableNames
  7218. // have an array of key-value pairs for their value. Use the following format
  7219. // to define your DataSchema.
  7220. //
  7221. // { "version": "1.0",
  7222. //
  7223. // "recordAnnotationFieldName": "F1",
  7224. //
  7225. // "recordWeightFieldName": "F2",
  7226. //
  7227. // "targetFieldName": "F3",
  7228. //
  7229. // "dataFormat": "CSV",
  7230. //
  7231. // "dataFileContainsHeader": true,
  7232. //
  7233. // "attributes": [
  7234. //
  7235. // { "fieldName": "F1", "fieldType": "TEXT" }, { "fieldName": "F2", "fieldType":
  7236. // "NUMERIC" }, { "fieldName": "F3", "fieldType": "CATEGORICAL" }, { "fieldName":
  7237. // "F4", "fieldType": "NUMERIC" }, { "fieldName": "F5", "fieldType": "CATEGORICAL"
  7238. // }, { "fieldName": "F6", "fieldType": "TEXT" }, { "fieldName": "F7", "fieldType":
  7239. // "WEIGHTED_INT_SEQUENCE" }, { "fieldName": "F8", "fieldType": "WEIGHTED_STRING_SEQUENCE"
  7240. // } ],
  7241. //
  7242. // "excludedVariableNames": [ "F6" ] }
  7243. DataSchema *string `type:"string"`
  7244. // Describes the schema location in Amazon S3. You must provide either the DataSchema
  7245. // or the DataSchemaLocationS3.
  7246. DataSchemaLocationS3 *string `type:"string"`
  7247. }
  7248. // String returns the string representation
  7249. func (s S3DataSpec) String() string {
  7250. return awsutil.Prettify(s)
  7251. }
  7252. // GoString returns the string representation
  7253. func (s S3DataSpec) GoString() string {
  7254. return s.String()
  7255. }
  7256. // Validate inspects the fields of the type to determine if they are valid.
  7257. func (s *S3DataSpec) Validate() error {
  7258. invalidParams := request.ErrInvalidParams{Context: "S3DataSpec"}
  7259. if s.DataLocationS3 == nil {
  7260. invalidParams.Add(request.NewErrParamRequired("DataLocationS3"))
  7261. }
  7262. if invalidParams.Len() > 0 {
  7263. return invalidParams
  7264. }
  7265. return nil
  7266. }
  7267. // SetDataLocationS3 sets the DataLocationS3 field's value.
  7268. func (s *S3DataSpec) SetDataLocationS3(v string) *S3DataSpec {
  7269. s.DataLocationS3 = &v
  7270. return s
  7271. }
  7272. // SetDataRearrangement sets the DataRearrangement field's value.
  7273. func (s *S3DataSpec) SetDataRearrangement(v string) *S3DataSpec {
  7274. s.DataRearrangement = &v
  7275. return s
  7276. }
  7277. // SetDataSchema sets the DataSchema field's value.
  7278. func (s *S3DataSpec) SetDataSchema(v string) *S3DataSpec {
  7279. s.DataSchema = &v
  7280. return s
  7281. }
  7282. // SetDataSchemaLocationS3 sets the DataSchemaLocationS3 field's value.
  7283. func (s *S3DataSpec) SetDataSchemaLocationS3(v string) *S3DataSpec {
  7284. s.DataSchemaLocationS3 = &v
  7285. return s
  7286. }
  7287. // A custom key-value pair associated with an ML object, such as an ML model.
  7288. type Tag struct {
  7289. _ struct{} `type:"structure"`
  7290. // A unique identifier for the tag. Valid characters include Unicode letters,
  7291. // digits, white space, _, ., /, =, +, -, %, and @.
  7292. Key *string `min:"1" type:"string"`
  7293. // An optional string, typically used to describe or define the tag. Valid characters
  7294. // include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.
  7295. Value *string `type:"string"`
  7296. }
  7297. // String returns the string representation
  7298. func (s Tag) String() string {
  7299. return awsutil.Prettify(s)
  7300. }
  7301. // GoString returns the string representation
  7302. func (s Tag) GoString() string {
  7303. return s.String()
  7304. }
  7305. // Validate inspects the fields of the type to determine if they are valid.
  7306. func (s *Tag) Validate() error {
  7307. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  7308. if s.Key != nil && len(*s.Key) < 1 {
  7309. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7310. }
  7311. if invalidParams.Len() > 0 {
  7312. return invalidParams
  7313. }
  7314. return nil
  7315. }
  7316. // SetKey sets the Key field's value.
  7317. func (s *Tag) SetKey(v string) *Tag {
  7318. s.Key = &v
  7319. return s
  7320. }
  7321. // SetValue sets the Value field's value.
  7322. func (s *Tag) SetValue(v string) *Tag {
  7323. s.Value = &v
  7324. return s
  7325. }
  7326. type UpdateBatchPredictionInput struct {
  7327. _ struct{} `type:"structure"`
  7328. // The ID assigned to the BatchPrediction during creation.
  7329. //
  7330. // BatchPredictionId is a required field
  7331. BatchPredictionId *string `min:"1" type:"string" required:"true"`
  7332. // A new user-supplied name or description of the BatchPrediction.
  7333. //
  7334. // BatchPredictionName is a required field
  7335. BatchPredictionName *string `type:"string" required:"true"`
  7336. }
  7337. // String returns the string representation
  7338. func (s UpdateBatchPredictionInput) String() string {
  7339. return awsutil.Prettify(s)
  7340. }
  7341. // GoString returns the string representation
  7342. func (s UpdateBatchPredictionInput) GoString() string {
  7343. return s.String()
  7344. }
  7345. // Validate inspects the fields of the type to determine if they are valid.
  7346. func (s *UpdateBatchPredictionInput) Validate() error {
  7347. invalidParams := request.ErrInvalidParams{Context: "UpdateBatchPredictionInput"}
  7348. if s.BatchPredictionId == nil {
  7349. invalidParams.Add(request.NewErrParamRequired("BatchPredictionId"))
  7350. }
  7351. if s.BatchPredictionId != nil && len(*s.BatchPredictionId) < 1 {
  7352. invalidParams.Add(request.NewErrParamMinLen("BatchPredictionId", 1))
  7353. }
  7354. if s.BatchPredictionName == nil {
  7355. invalidParams.Add(request.NewErrParamRequired("BatchPredictionName"))
  7356. }
  7357. if invalidParams.Len() > 0 {
  7358. return invalidParams
  7359. }
  7360. return nil
  7361. }
  7362. // SetBatchPredictionId sets the BatchPredictionId field's value.
  7363. func (s *UpdateBatchPredictionInput) SetBatchPredictionId(v string) *UpdateBatchPredictionInput {
  7364. s.BatchPredictionId = &v
  7365. return s
  7366. }
  7367. // SetBatchPredictionName sets the BatchPredictionName field's value.
  7368. func (s *UpdateBatchPredictionInput) SetBatchPredictionName(v string) *UpdateBatchPredictionInput {
  7369. s.BatchPredictionName = &v
  7370. return s
  7371. }
  7372. // Represents the output of an UpdateBatchPrediction operation.
  7373. //
  7374. // You can see the updated content by using the GetBatchPrediction operation.
  7375. type UpdateBatchPredictionOutput struct {
  7376. _ struct{} `type:"structure"`
  7377. // The ID assigned to the BatchPrediction during creation. This value should
  7378. // be identical to the value of the BatchPredictionId in the request.
  7379. BatchPredictionId *string `min:"1" type:"string"`
  7380. }
  7381. // String returns the string representation
  7382. func (s UpdateBatchPredictionOutput) String() string {
  7383. return awsutil.Prettify(s)
  7384. }
  7385. // GoString returns the string representation
  7386. func (s UpdateBatchPredictionOutput) GoString() string {
  7387. return s.String()
  7388. }
  7389. // SetBatchPredictionId sets the BatchPredictionId field's value.
  7390. func (s *UpdateBatchPredictionOutput) SetBatchPredictionId(v string) *UpdateBatchPredictionOutput {
  7391. s.BatchPredictionId = &v
  7392. return s
  7393. }
  7394. type UpdateDataSourceInput struct {
  7395. _ struct{} `type:"structure"`
  7396. // The ID assigned to the DataSource during creation.
  7397. //
  7398. // DataSourceId is a required field
  7399. DataSourceId *string `min:"1" type:"string" required:"true"`
  7400. // A new user-supplied name or description of the DataSource that will replace
  7401. // the current description.
  7402. //
  7403. // DataSourceName is a required field
  7404. DataSourceName *string `type:"string" required:"true"`
  7405. }
  7406. // String returns the string representation
  7407. func (s UpdateDataSourceInput) String() string {
  7408. return awsutil.Prettify(s)
  7409. }
  7410. // GoString returns the string representation
  7411. func (s UpdateDataSourceInput) GoString() string {
  7412. return s.String()
  7413. }
  7414. // Validate inspects the fields of the type to determine if they are valid.
  7415. func (s *UpdateDataSourceInput) Validate() error {
  7416. invalidParams := request.ErrInvalidParams{Context: "UpdateDataSourceInput"}
  7417. if s.DataSourceId == nil {
  7418. invalidParams.Add(request.NewErrParamRequired("DataSourceId"))
  7419. }
  7420. if s.DataSourceId != nil && len(*s.DataSourceId) < 1 {
  7421. invalidParams.Add(request.NewErrParamMinLen("DataSourceId", 1))
  7422. }
  7423. if s.DataSourceName == nil {
  7424. invalidParams.Add(request.NewErrParamRequired("DataSourceName"))
  7425. }
  7426. if invalidParams.Len() > 0 {
  7427. return invalidParams
  7428. }
  7429. return nil
  7430. }
  7431. // SetDataSourceId sets the DataSourceId field's value.
  7432. func (s *UpdateDataSourceInput) SetDataSourceId(v string) *UpdateDataSourceInput {
  7433. s.DataSourceId = &v
  7434. return s
  7435. }
  7436. // SetDataSourceName sets the DataSourceName field's value.
  7437. func (s *UpdateDataSourceInput) SetDataSourceName(v string) *UpdateDataSourceInput {
  7438. s.DataSourceName = &v
  7439. return s
  7440. }
  7441. // Represents the output of an UpdateDataSource operation.
  7442. //
  7443. // You can see the updated content by using the GetBatchPrediction operation.
  7444. type UpdateDataSourceOutput struct {
  7445. _ struct{} `type:"structure"`
  7446. // The ID assigned to the DataSource during creation. This value should be identical
  7447. // to the value of the DataSourceID in the request.
  7448. DataSourceId *string `min:"1" type:"string"`
  7449. }
  7450. // String returns the string representation
  7451. func (s UpdateDataSourceOutput) String() string {
  7452. return awsutil.Prettify(s)
  7453. }
  7454. // GoString returns the string representation
  7455. func (s UpdateDataSourceOutput) GoString() string {
  7456. return s.String()
  7457. }
  7458. // SetDataSourceId sets the DataSourceId field's value.
  7459. func (s *UpdateDataSourceOutput) SetDataSourceId(v string) *UpdateDataSourceOutput {
  7460. s.DataSourceId = &v
  7461. return s
  7462. }
  7463. type UpdateEvaluationInput struct {
  7464. _ struct{} `type:"structure"`
  7465. // The ID assigned to the Evaluation during creation.
  7466. //
  7467. // EvaluationId is a required field
  7468. EvaluationId *string `min:"1" type:"string" required:"true"`
  7469. // A new user-supplied name or description of the Evaluation that will replace
  7470. // the current content.
  7471. //
  7472. // EvaluationName is a required field
  7473. EvaluationName *string `type:"string" required:"true"`
  7474. }
  7475. // String returns the string representation
  7476. func (s UpdateEvaluationInput) String() string {
  7477. return awsutil.Prettify(s)
  7478. }
  7479. // GoString returns the string representation
  7480. func (s UpdateEvaluationInput) GoString() string {
  7481. return s.String()
  7482. }
  7483. // Validate inspects the fields of the type to determine if they are valid.
  7484. func (s *UpdateEvaluationInput) Validate() error {
  7485. invalidParams := request.ErrInvalidParams{Context: "UpdateEvaluationInput"}
  7486. if s.EvaluationId == nil {
  7487. invalidParams.Add(request.NewErrParamRequired("EvaluationId"))
  7488. }
  7489. if s.EvaluationId != nil && len(*s.EvaluationId) < 1 {
  7490. invalidParams.Add(request.NewErrParamMinLen("EvaluationId", 1))
  7491. }
  7492. if s.EvaluationName == nil {
  7493. invalidParams.Add(request.NewErrParamRequired("EvaluationName"))
  7494. }
  7495. if invalidParams.Len() > 0 {
  7496. return invalidParams
  7497. }
  7498. return nil
  7499. }
  7500. // SetEvaluationId sets the EvaluationId field's value.
  7501. func (s *UpdateEvaluationInput) SetEvaluationId(v string) *UpdateEvaluationInput {
  7502. s.EvaluationId = &v
  7503. return s
  7504. }
  7505. // SetEvaluationName sets the EvaluationName field's value.
  7506. func (s *UpdateEvaluationInput) SetEvaluationName(v string) *UpdateEvaluationInput {
  7507. s.EvaluationName = &v
  7508. return s
  7509. }
  7510. // Represents the output of an UpdateEvaluation operation.
  7511. //
  7512. // You can see the updated content by using the GetEvaluation operation.
  7513. type UpdateEvaluationOutput struct {
  7514. _ struct{} `type:"structure"`
  7515. // The ID assigned to the Evaluation during creation. This value should be identical
  7516. // to the value of the Evaluation in the request.
  7517. EvaluationId *string `min:"1" type:"string"`
  7518. }
  7519. // String returns the string representation
  7520. func (s UpdateEvaluationOutput) String() string {
  7521. return awsutil.Prettify(s)
  7522. }
  7523. // GoString returns the string representation
  7524. func (s UpdateEvaluationOutput) GoString() string {
  7525. return s.String()
  7526. }
  7527. // SetEvaluationId sets the EvaluationId field's value.
  7528. func (s *UpdateEvaluationOutput) SetEvaluationId(v string) *UpdateEvaluationOutput {
  7529. s.EvaluationId = &v
  7530. return s
  7531. }
  7532. type UpdateMLModelInput struct {
  7533. _ struct{} `type:"structure"`
  7534. // The ID assigned to the MLModel during creation.
  7535. //
  7536. // MLModelId is a required field
  7537. MLModelId *string `min:"1" type:"string" required:"true"`
  7538. // A user-supplied name or description of the MLModel.
  7539. MLModelName *string `type:"string"`
  7540. // The ScoreThreshold used in binary classification MLModel that marks the boundary
  7541. // between a positive prediction and a negative prediction.
  7542. //
  7543. // Output values greater than or equal to the ScoreThreshold receive a positive
  7544. // result from the MLModel, such as true. Output values less than the ScoreThreshold
  7545. // receive a negative response from the MLModel, such as false.
  7546. ScoreThreshold *float64 `type:"float"`
  7547. }
  7548. // String returns the string representation
  7549. func (s UpdateMLModelInput) String() string {
  7550. return awsutil.Prettify(s)
  7551. }
  7552. // GoString returns the string representation
  7553. func (s UpdateMLModelInput) GoString() string {
  7554. return s.String()
  7555. }
  7556. // Validate inspects the fields of the type to determine if they are valid.
  7557. func (s *UpdateMLModelInput) Validate() error {
  7558. invalidParams := request.ErrInvalidParams{Context: "UpdateMLModelInput"}
  7559. if s.MLModelId == nil {
  7560. invalidParams.Add(request.NewErrParamRequired("MLModelId"))
  7561. }
  7562. if s.MLModelId != nil && len(*s.MLModelId) < 1 {
  7563. invalidParams.Add(request.NewErrParamMinLen("MLModelId", 1))
  7564. }
  7565. if invalidParams.Len() > 0 {
  7566. return invalidParams
  7567. }
  7568. return nil
  7569. }
  7570. // SetMLModelId sets the MLModelId field's value.
  7571. func (s *UpdateMLModelInput) SetMLModelId(v string) *UpdateMLModelInput {
  7572. s.MLModelId = &v
  7573. return s
  7574. }
  7575. // SetMLModelName sets the MLModelName field's value.
  7576. func (s *UpdateMLModelInput) SetMLModelName(v string) *UpdateMLModelInput {
  7577. s.MLModelName = &v
  7578. return s
  7579. }
  7580. // SetScoreThreshold sets the ScoreThreshold field's value.
  7581. func (s *UpdateMLModelInput) SetScoreThreshold(v float64) *UpdateMLModelInput {
  7582. s.ScoreThreshold = &v
  7583. return s
  7584. }
  7585. // Represents the output of an UpdateMLModel operation.
  7586. //
  7587. // You can see the updated content by using the GetMLModel operation.
  7588. type UpdateMLModelOutput struct {
  7589. _ struct{} `type:"structure"`
  7590. // The ID assigned to the MLModel during creation. This value should be identical
  7591. // to the value of the MLModelID in the request.
  7592. MLModelId *string `min:"1" type:"string"`
  7593. }
  7594. // String returns the string representation
  7595. func (s UpdateMLModelOutput) String() string {
  7596. return awsutil.Prettify(s)
  7597. }
  7598. // GoString returns the string representation
  7599. func (s UpdateMLModelOutput) GoString() string {
  7600. return s.String()
  7601. }
  7602. // SetMLModelId sets the MLModelId field's value.
  7603. func (s *UpdateMLModelOutput) SetMLModelId(v string) *UpdateMLModelOutput {
  7604. s.MLModelId = &v
  7605. return s
  7606. }
  7607. // The function used to train an MLModel. Training choices supported by Amazon
  7608. // ML include the following:
  7609. //
  7610. // * SGD - Stochastic Gradient Descent.
  7611. // * RandomForest - Random forest of decision trees.
  7612. const (
  7613. // AlgorithmSgd is a Algorithm enum value
  7614. AlgorithmSgd = "sgd"
  7615. )
  7616. // A list of the variables to use in searching or filtering BatchPrediction.
  7617. //
  7618. // * CreatedAt - Sets the search criteria to BatchPrediction creation date.
  7619. //
  7620. // * Status - Sets the search criteria to BatchPrediction status.
  7621. // * Name - Sets the search criteria to the contents of BatchPredictionName.
  7622. //
  7623. // * IAMUser - Sets the search criteria to the user account that invoked
  7624. // the BatchPrediction creation.
  7625. // * MLModelId - Sets the search criteria to the MLModel used in the BatchPrediction.
  7626. //
  7627. // * DataSourceId - Sets the search criteria to the DataSource used in the
  7628. // BatchPrediction.
  7629. // * DataURI - Sets the search criteria to the data file(s) used in the BatchPrediction.
  7630. // The URL can identify either a file or an Amazon Simple Storage Service
  7631. // (Amazon S3) bucket or directory.
  7632. const (
  7633. // BatchPredictionFilterVariableCreatedAt is a BatchPredictionFilterVariable enum value
  7634. BatchPredictionFilterVariableCreatedAt = "CreatedAt"
  7635. // BatchPredictionFilterVariableLastUpdatedAt is a BatchPredictionFilterVariable enum value
  7636. BatchPredictionFilterVariableLastUpdatedAt = "LastUpdatedAt"
  7637. // BatchPredictionFilterVariableStatus is a BatchPredictionFilterVariable enum value
  7638. BatchPredictionFilterVariableStatus = "Status"
  7639. // BatchPredictionFilterVariableName is a BatchPredictionFilterVariable enum value
  7640. BatchPredictionFilterVariableName = "Name"
  7641. // BatchPredictionFilterVariableIamuser is a BatchPredictionFilterVariable enum value
  7642. BatchPredictionFilterVariableIamuser = "IAMUser"
  7643. // BatchPredictionFilterVariableMlmodelId is a BatchPredictionFilterVariable enum value
  7644. BatchPredictionFilterVariableMlmodelId = "MLModelId"
  7645. // BatchPredictionFilterVariableDataSourceId is a BatchPredictionFilterVariable enum value
  7646. BatchPredictionFilterVariableDataSourceId = "DataSourceId"
  7647. // BatchPredictionFilterVariableDataUri is a BatchPredictionFilterVariable enum value
  7648. BatchPredictionFilterVariableDataUri = "DataURI"
  7649. )
  7650. // A list of the variables to use in searching or filtering DataSource.
  7651. //
  7652. // * CreatedAt - Sets the search criteria to DataSource creation date.
  7653. // * Status - Sets the search criteria to DataSource status.
  7654. // * Name - Sets the search criteria to the contents of DataSourceName.
  7655. // * DataUri - Sets the search criteria to the URI of data files used to
  7656. // create the DataSource. The URI can identify either a file or an Amazon
  7657. // Simple Storage Service (Amazon S3) bucket or directory.
  7658. // * IAMUser - Sets the search criteria to the user account that invoked
  7659. // the DataSource creation.
  7660. // NoteThe variable names should match the variable names in the DataSource.
  7661. const (
  7662. // DataSourceFilterVariableCreatedAt is a DataSourceFilterVariable enum value
  7663. DataSourceFilterVariableCreatedAt = "CreatedAt"
  7664. // DataSourceFilterVariableLastUpdatedAt is a DataSourceFilterVariable enum value
  7665. DataSourceFilterVariableLastUpdatedAt = "LastUpdatedAt"
  7666. // DataSourceFilterVariableStatus is a DataSourceFilterVariable enum value
  7667. DataSourceFilterVariableStatus = "Status"
  7668. // DataSourceFilterVariableName is a DataSourceFilterVariable enum value
  7669. DataSourceFilterVariableName = "Name"
  7670. // DataSourceFilterVariableDataLocationS3 is a DataSourceFilterVariable enum value
  7671. DataSourceFilterVariableDataLocationS3 = "DataLocationS3"
  7672. // DataSourceFilterVariableIamuser is a DataSourceFilterVariable enum value
  7673. DataSourceFilterVariableIamuser = "IAMUser"
  7674. )
  7675. // Contains the key values of DetailsMap: PredictiveModelType- Indicates the type of the MLModel. Algorithm- Indicates the algorithm that was used for the MLModel
  7676. const (
  7677. // DetailsAttributesPredictiveModelType is a DetailsAttributes enum value
  7678. DetailsAttributesPredictiveModelType = "PredictiveModelType"
  7679. // DetailsAttributesAlgorithm is a DetailsAttributes enum value
  7680. DetailsAttributesAlgorithm = "Algorithm"
  7681. )
  7682. // Object status with the following possible values:
  7683. //
  7684. // * PENDING
  7685. // * INPROGRESS
  7686. // * FAILED
  7687. // * COMPLETED
  7688. // * DELETED
  7689. const (
  7690. // EntityStatusPending is a EntityStatus enum value
  7691. EntityStatusPending = "PENDING"
  7692. // EntityStatusInprogress is a EntityStatus enum value
  7693. EntityStatusInprogress = "INPROGRESS"
  7694. // EntityStatusFailed is a EntityStatus enum value
  7695. EntityStatusFailed = "FAILED"
  7696. // EntityStatusCompleted is a EntityStatus enum value
  7697. EntityStatusCompleted = "COMPLETED"
  7698. // EntityStatusDeleted is a EntityStatus enum value
  7699. EntityStatusDeleted = "DELETED"
  7700. )
  7701. // A list of the variables to use in searching or filtering Evaluation.
  7702. //
  7703. // * CreatedAt - Sets the search criteria to Evaluation creation date.
  7704. // * Status - Sets the search criteria to Evaluation status.
  7705. // * Name - Sets the search criteria to the contents of EvaluationName.
  7706. // * IAMUser - Sets the search criteria to the user account that invoked
  7707. // an evaluation.
  7708. // * MLModelId - Sets the search criteria to the Predictor that was evaluated.
  7709. //
  7710. // * DataSourceId - Sets the search criteria to the DataSource used in evaluation.
  7711. //
  7712. // * DataUri - Sets the search criteria to the data file(s) used in evaluation.
  7713. // The URL can identify either a file or an Amazon Simple Storage Service
  7714. // (Amazon S3) bucket or directory.
  7715. const (
  7716. // EvaluationFilterVariableCreatedAt is a EvaluationFilterVariable enum value
  7717. EvaluationFilterVariableCreatedAt = "CreatedAt"
  7718. // EvaluationFilterVariableLastUpdatedAt is a EvaluationFilterVariable enum value
  7719. EvaluationFilterVariableLastUpdatedAt = "LastUpdatedAt"
  7720. // EvaluationFilterVariableStatus is a EvaluationFilterVariable enum value
  7721. EvaluationFilterVariableStatus = "Status"
  7722. // EvaluationFilterVariableName is a EvaluationFilterVariable enum value
  7723. EvaluationFilterVariableName = "Name"
  7724. // EvaluationFilterVariableIamuser is a EvaluationFilterVariable enum value
  7725. EvaluationFilterVariableIamuser = "IAMUser"
  7726. // EvaluationFilterVariableMlmodelId is a EvaluationFilterVariable enum value
  7727. EvaluationFilterVariableMlmodelId = "MLModelId"
  7728. // EvaluationFilterVariableDataSourceId is a EvaluationFilterVariable enum value
  7729. EvaluationFilterVariableDataSourceId = "DataSourceId"
  7730. // EvaluationFilterVariableDataUri is a EvaluationFilterVariable enum value
  7731. EvaluationFilterVariableDataUri = "DataURI"
  7732. )
  7733. const (
  7734. // MLModelFilterVariableCreatedAt is a MLModelFilterVariable enum value
  7735. MLModelFilterVariableCreatedAt = "CreatedAt"
  7736. // MLModelFilterVariableLastUpdatedAt is a MLModelFilterVariable enum value
  7737. MLModelFilterVariableLastUpdatedAt = "LastUpdatedAt"
  7738. // MLModelFilterVariableStatus is a MLModelFilterVariable enum value
  7739. MLModelFilterVariableStatus = "Status"
  7740. // MLModelFilterVariableName is a MLModelFilterVariable enum value
  7741. MLModelFilterVariableName = "Name"
  7742. // MLModelFilterVariableIamuser is a MLModelFilterVariable enum value
  7743. MLModelFilterVariableIamuser = "IAMUser"
  7744. // MLModelFilterVariableTrainingDataSourceId is a MLModelFilterVariable enum value
  7745. MLModelFilterVariableTrainingDataSourceId = "TrainingDataSourceId"
  7746. // MLModelFilterVariableRealtimeEndpointStatus is a MLModelFilterVariable enum value
  7747. MLModelFilterVariableRealtimeEndpointStatus = "RealtimeEndpointStatus"
  7748. // MLModelFilterVariableMlmodelType is a MLModelFilterVariable enum value
  7749. MLModelFilterVariableMlmodelType = "MLModelType"
  7750. // MLModelFilterVariableAlgorithm is a MLModelFilterVariable enum value
  7751. MLModelFilterVariableAlgorithm = "Algorithm"
  7752. // MLModelFilterVariableTrainingDataUri is a MLModelFilterVariable enum value
  7753. MLModelFilterVariableTrainingDataUri = "TrainingDataURI"
  7754. )
  7755. const (
  7756. // MLModelTypeRegression is a MLModelType enum value
  7757. MLModelTypeRegression = "REGRESSION"
  7758. // MLModelTypeBinary is a MLModelType enum value
  7759. MLModelTypeBinary = "BINARY"
  7760. // MLModelTypeMulticlass is a MLModelType enum value
  7761. MLModelTypeMulticlass = "MULTICLASS"
  7762. )
  7763. const (
  7764. // RealtimeEndpointStatusNone is a RealtimeEndpointStatus enum value
  7765. RealtimeEndpointStatusNone = "NONE"
  7766. // RealtimeEndpointStatusReady is a RealtimeEndpointStatus enum value
  7767. RealtimeEndpointStatusReady = "READY"
  7768. // RealtimeEndpointStatusUpdating is a RealtimeEndpointStatus enum value
  7769. RealtimeEndpointStatusUpdating = "UPDATING"
  7770. // RealtimeEndpointStatusFailed is a RealtimeEndpointStatus enum value
  7771. RealtimeEndpointStatusFailed = "FAILED"
  7772. )
  7773. // The sort order specified in a listing condition. Possible values include
  7774. // the following:
  7775. //
  7776. // * asc - Present the information in ascending order (from A-Z).
  7777. // * dsc - Present the information in descending order (from Z-A).
  7778. const (
  7779. // SortOrderAsc is a SortOrder enum value
  7780. SortOrderAsc = "asc"
  7781. // SortOrderDsc is a SortOrder enum value
  7782. SortOrderDsc = "dsc"
  7783. )
  7784. const (
  7785. // TaggableResourceTypeBatchPrediction is a TaggableResourceType enum value
  7786. TaggableResourceTypeBatchPrediction = "BatchPrediction"
  7787. // TaggableResourceTypeDataSource is a TaggableResourceType enum value
  7788. TaggableResourceTypeDataSource = "DataSource"
  7789. // TaggableResourceTypeEvaluation is a TaggableResourceType enum value
  7790. TaggableResourceTypeEvaluation = "Evaluation"
  7791. // TaggableResourceTypeMlmodel is a TaggableResourceType enum value
  7792. TaggableResourceTypeMlmodel = "MLModel"
  7793. )