api.go 386 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package comprehend
  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. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opBatchDetectDominantLanguage = "BatchDetectDominantLanguage"
  13. // BatchDetectDominantLanguageRequest generates a "aws/request.Request" representing the
  14. // client's request for the BatchDetectDominantLanguage operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See BatchDetectDominantLanguage for more information on using the BatchDetectDominantLanguage
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the BatchDetectDominantLanguageRequest method.
  29. // req, resp := client.BatchDetectDominantLanguageRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguage
  37. func (c *Comprehend) BatchDetectDominantLanguageRequest(input *BatchDetectDominantLanguageInput) (req *request.Request, output *BatchDetectDominantLanguageOutput) {
  38. op := &request.Operation{
  39. Name: opBatchDetectDominantLanguage,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &BatchDetectDominantLanguageInput{}
  45. }
  46. output = &BatchDetectDominantLanguageOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // BatchDetectDominantLanguage API operation for Amazon Comprehend.
  51. //
  52. // Determines the dominant language of the input text for a batch of documents.
  53. // For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend
  54. // Supported Languages (http://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html).
  55. //
  56. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  57. // with awserr.Error's Code and Message methods to get detailed information about
  58. // the error.
  59. //
  60. // See the AWS API reference guide for Amazon Comprehend's
  61. // API operation BatchDetectDominantLanguage for usage and error information.
  62. //
  63. // Returned Error Codes:
  64. // * ErrCodeInvalidRequestException "InvalidRequestException"
  65. // The request is invalid.
  66. //
  67. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  68. // The size of the input text exceeds the limit. Use a smaller document.
  69. //
  70. // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
  71. // The number of documents in the request exceeds the limit of 25. Try your
  72. // request again with fewer documents.
  73. //
  74. // * ErrCodeInternalServerException "InternalServerException"
  75. // An internal server error occurred. Retry your request.
  76. //
  77. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguage
  78. func (c *Comprehend) BatchDetectDominantLanguage(input *BatchDetectDominantLanguageInput) (*BatchDetectDominantLanguageOutput, error) {
  79. req, out := c.BatchDetectDominantLanguageRequest(input)
  80. return out, req.Send()
  81. }
  82. // BatchDetectDominantLanguageWithContext is the same as BatchDetectDominantLanguage with the addition of
  83. // the ability to pass a context and additional request options.
  84. //
  85. // See BatchDetectDominantLanguage for details on how to use this API operation.
  86. //
  87. // The context must be non-nil and will be used for request cancellation. If
  88. // the context is nil a panic will occur. In the future the SDK may create
  89. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  90. // for more information on using Contexts.
  91. func (c *Comprehend) BatchDetectDominantLanguageWithContext(ctx aws.Context, input *BatchDetectDominantLanguageInput, opts ...request.Option) (*BatchDetectDominantLanguageOutput, error) {
  92. req, out := c.BatchDetectDominantLanguageRequest(input)
  93. req.SetContext(ctx)
  94. req.ApplyOptions(opts...)
  95. return out, req.Send()
  96. }
  97. const opBatchDetectEntities = "BatchDetectEntities"
  98. // BatchDetectEntitiesRequest generates a "aws/request.Request" representing the
  99. // client's request for the BatchDetectEntities operation. The "output" return
  100. // value will be populated with the request's response once the request completes
  101. // successfully.
  102. //
  103. // Use "Send" method on the returned Request to send the API call to the service.
  104. // the "output" return value is not valid until after Send returns without error.
  105. //
  106. // See BatchDetectEntities for more information on using the BatchDetectEntities
  107. // API call, and error handling.
  108. //
  109. // This method is useful when you want to inject custom logic or configuration
  110. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  111. //
  112. //
  113. // // Example sending a request using the BatchDetectEntitiesRequest method.
  114. // req, resp := client.BatchDetectEntitiesRequest(params)
  115. //
  116. // err := req.Send()
  117. // if err == nil { // resp is now filled
  118. // fmt.Println(resp)
  119. // }
  120. //
  121. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntities
  122. func (c *Comprehend) BatchDetectEntitiesRequest(input *BatchDetectEntitiesInput) (req *request.Request, output *BatchDetectEntitiesOutput) {
  123. op := &request.Operation{
  124. Name: opBatchDetectEntities,
  125. HTTPMethod: "POST",
  126. HTTPPath: "/",
  127. }
  128. if input == nil {
  129. input = &BatchDetectEntitiesInput{}
  130. }
  131. output = &BatchDetectEntitiesOutput{}
  132. req = c.newRequest(op, input, output)
  133. return
  134. }
  135. // BatchDetectEntities API operation for Amazon Comprehend.
  136. //
  137. // Inspects the text of a batch of documents for named entities and returns
  138. // information about them. For more information about named entities, see how-entities
  139. //
  140. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  141. // with awserr.Error's Code and Message methods to get detailed information about
  142. // the error.
  143. //
  144. // See the AWS API reference guide for Amazon Comprehend's
  145. // API operation BatchDetectEntities for usage and error information.
  146. //
  147. // Returned Error Codes:
  148. // * ErrCodeInvalidRequestException "InvalidRequestException"
  149. // The request is invalid.
  150. //
  151. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  152. // The size of the input text exceeds the limit. Use a smaller document.
  153. //
  154. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  155. // Amazon Comprehend can't process the language of the input text. For all custom
  156. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  157. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  158. // Spanish text.
  159. //
  160. // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
  161. // The number of documents in the request exceeds the limit of 25. Try your
  162. // request again with fewer documents.
  163. //
  164. // * ErrCodeInternalServerException "InternalServerException"
  165. // An internal server error occurred. Retry your request.
  166. //
  167. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntities
  168. func (c *Comprehend) BatchDetectEntities(input *BatchDetectEntitiesInput) (*BatchDetectEntitiesOutput, error) {
  169. req, out := c.BatchDetectEntitiesRequest(input)
  170. return out, req.Send()
  171. }
  172. // BatchDetectEntitiesWithContext is the same as BatchDetectEntities with the addition of
  173. // the ability to pass a context and additional request options.
  174. //
  175. // See BatchDetectEntities for details on how to use this API operation.
  176. //
  177. // The context must be non-nil and will be used for request cancellation. If
  178. // the context is nil a panic will occur. In the future the SDK may create
  179. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  180. // for more information on using Contexts.
  181. func (c *Comprehend) BatchDetectEntitiesWithContext(ctx aws.Context, input *BatchDetectEntitiesInput, opts ...request.Option) (*BatchDetectEntitiesOutput, error) {
  182. req, out := c.BatchDetectEntitiesRequest(input)
  183. req.SetContext(ctx)
  184. req.ApplyOptions(opts...)
  185. return out, req.Send()
  186. }
  187. const opBatchDetectKeyPhrases = "BatchDetectKeyPhrases"
  188. // BatchDetectKeyPhrasesRequest generates a "aws/request.Request" representing the
  189. // client's request for the BatchDetectKeyPhrases operation. The "output" return
  190. // value will be populated with the request's response once the request completes
  191. // successfully.
  192. //
  193. // Use "Send" method on the returned Request to send the API call to the service.
  194. // the "output" return value is not valid until after Send returns without error.
  195. //
  196. // See BatchDetectKeyPhrases for more information on using the BatchDetectKeyPhrases
  197. // API call, and error handling.
  198. //
  199. // This method is useful when you want to inject custom logic or configuration
  200. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  201. //
  202. //
  203. // // Example sending a request using the BatchDetectKeyPhrasesRequest method.
  204. // req, resp := client.BatchDetectKeyPhrasesRequest(params)
  205. //
  206. // err := req.Send()
  207. // if err == nil { // resp is now filled
  208. // fmt.Println(resp)
  209. // }
  210. //
  211. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrases
  212. func (c *Comprehend) BatchDetectKeyPhrasesRequest(input *BatchDetectKeyPhrasesInput) (req *request.Request, output *BatchDetectKeyPhrasesOutput) {
  213. op := &request.Operation{
  214. Name: opBatchDetectKeyPhrases,
  215. HTTPMethod: "POST",
  216. HTTPPath: "/",
  217. }
  218. if input == nil {
  219. input = &BatchDetectKeyPhrasesInput{}
  220. }
  221. output = &BatchDetectKeyPhrasesOutput{}
  222. req = c.newRequest(op, input, output)
  223. return
  224. }
  225. // BatchDetectKeyPhrases API operation for Amazon Comprehend.
  226. //
  227. // Detects the key noun phrases found in a batch of documents.
  228. //
  229. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  230. // with awserr.Error's Code and Message methods to get detailed information about
  231. // the error.
  232. //
  233. // See the AWS API reference guide for Amazon Comprehend's
  234. // API operation BatchDetectKeyPhrases for usage and error information.
  235. //
  236. // Returned Error Codes:
  237. // * ErrCodeInvalidRequestException "InvalidRequestException"
  238. // The request is invalid.
  239. //
  240. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  241. // The size of the input text exceeds the limit. Use a smaller document.
  242. //
  243. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  244. // Amazon Comprehend can't process the language of the input text. For all custom
  245. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  246. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  247. // Spanish text.
  248. //
  249. // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
  250. // The number of documents in the request exceeds the limit of 25. Try your
  251. // request again with fewer documents.
  252. //
  253. // * ErrCodeInternalServerException "InternalServerException"
  254. // An internal server error occurred. Retry your request.
  255. //
  256. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrases
  257. func (c *Comprehend) BatchDetectKeyPhrases(input *BatchDetectKeyPhrasesInput) (*BatchDetectKeyPhrasesOutput, error) {
  258. req, out := c.BatchDetectKeyPhrasesRequest(input)
  259. return out, req.Send()
  260. }
  261. // BatchDetectKeyPhrasesWithContext is the same as BatchDetectKeyPhrases with the addition of
  262. // the ability to pass a context and additional request options.
  263. //
  264. // See BatchDetectKeyPhrases for details on how to use this API operation.
  265. //
  266. // The context must be non-nil and will be used for request cancellation. If
  267. // the context is nil a panic will occur. In the future the SDK may create
  268. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  269. // for more information on using Contexts.
  270. func (c *Comprehend) BatchDetectKeyPhrasesWithContext(ctx aws.Context, input *BatchDetectKeyPhrasesInput, opts ...request.Option) (*BatchDetectKeyPhrasesOutput, error) {
  271. req, out := c.BatchDetectKeyPhrasesRequest(input)
  272. req.SetContext(ctx)
  273. req.ApplyOptions(opts...)
  274. return out, req.Send()
  275. }
  276. const opBatchDetectSentiment = "BatchDetectSentiment"
  277. // BatchDetectSentimentRequest generates a "aws/request.Request" representing the
  278. // client's request for the BatchDetectSentiment operation. The "output" return
  279. // value will be populated with the request's response once the request completes
  280. // successfully.
  281. //
  282. // Use "Send" method on the returned Request to send the API call to the service.
  283. // the "output" return value is not valid until after Send returns without error.
  284. //
  285. // See BatchDetectSentiment for more information on using the BatchDetectSentiment
  286. // API call, and error handling.
  287. //
  288. // This method is useful when you want to inject custom logic or configuration
  289. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  290. //
  291. //
  292. // // Example sending a request using the BatchDetectSentimentRequest method.
  293. // req, resp := client.BatchDetectSentimentRequest(params)
  294. //
  295. // err := req.Send()
  296. // if err == nil { // resp is now filled
  297. // fmt.Println(resp)
  298. // }
  299. //
  300. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentiment
  301. func (c *Comprehend) BatchDetectSentimentRequest(input *BatchDetectSentimentInput) (req *request.Request, output *BatchDetectSentimentOutput) {
  302. op := &request.Operation{
  303. Name: opBatchDetectSentiment,
  304. HTTPMethod: "POST",
  305. HTTPPath: "/",
  306. }
  307. if input == nil {
  308. input = &BatchDetectSentimentInput{}
  309. }
  310. output = &BatchDetectSentimentOutput{}
  311. req = c.newRequest(op, input, output)
  312. return
  313. }
  314. // BatchDetectSentiment API operation for Amazon Comprehend.
  315. //
  316. // Inspects a batch of documents and returns an inference of the prevailing
  317. // sentiment, POSITIVE, NEUTRAL, MIXED, or NEGATIVE, in each one.
  318. //
  319. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  320. // with awserr.Error's Code and Message methods to get detailed information about
  321. // the error.
  322. //
  323. // See the AWS API reference guide for Amazon Comprehend's
  324. // API operation BatchDetectSentiment for usage and error information.
  325. //
  326. // Returned Error Codes:
  327. // * ErrCodeInvalidRequestException "InvalidRequestException"
  328. // The request is invalid.
  329. //
  330. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  331. // The size of the input text exceeds the limit. Use a smaller document.
  332. //
  333. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  334. // Amazon Comprehend can't process the language of the input text. For all custom
  335. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  336. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  337. // Spanish text.
  338. //
  339. // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
  340. // The number of documents in the request exceeds the limit of 25. Try your
  341. // request again with fewer documents.
  342. //
  343. // * ErrCodeInternalServerException "InternalServerException"
  344. // An internal server error occurred. Retry your request.
  345. //
  346. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentiment
  347. func (c *Comprehend) BatchDetectSentiment(input *BatchDetectSentimentInput) (*BatchDetectSentimentOutput, error) {
  348. req, out := c.BatchDetectSentimentRequest(input)
  349. return out, req.Send()
  350. }
  351. // BatchDetectSentimentWithContext is the same as BatchDetectSentiment with the addition of
  352. // the ability to pass a context and additional request options.
  353. //
  354. // See BatchDetectSentiment for details on how to use this API operation.
  355. //
  356. // The context must be non-nil and will be used for request cancellation. If
  357. // the context is nil a panic will occur. In the future the SDK may create
  358. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  359. // for more information on using Contexts.
  360. func (c *Comprehend) BatchDetectSentimentWithContext(ctx aws.Context, input *BatchDetectSentimentInput, opts ...request.Option) (*BatchDetectSentimentOutput, error) {
  361. req, out := c.BatchDetectSentimentRequest(input)
  362. req.SetContext(ctx)
  363. req.ApplyOptions(opts...)
  364. return out, req.Send()
  365. }
  366. const opBatchDetectSyntax = "BatchDetectSyntax"
  367. // BatchDetectSyntaxRequest generates a "aws/request.Request" representing the
  368. // client's request for the BatchDetectSyntax operation. The "output" return
  369. // value will be populated with the request's response once the request completes
  370. // successfully.
  371. //
  372. // Use "Send" method on the returned Request to send the API call to the service.
  373. // the "output" return value is not valid until after Send returns without error.
  374. //
  375. // See BatchDetectSyntax for more information on using the BatchDetectSyntax
  376. // API call, and error handling.
  377. //
  378. // This method is useful when you want to inject custom logic or configuration
  379. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  380. //
  381. //
  382. // // Example sending a request using the BatchDetectSyntaxRequest method.
  383. // req, resp := client.BatchDetectSyntaxRequest(params)
  384. //
  385. // err := req.Send()
  386. // if err == nil { // resp is now filled
  387. // fmt.Println(resp)
  388. // }
  389. //
  390. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSyntax
  391. func (c *Comprehend) BatchDetectSyntaxRequest(input *BatchDetectSyntaxInput) (req *request.Request, output *BatchDetectSyntaxOutput) {
  392. op := &request.Operation{
  393. Name: opBatchDetectSyntax,
  394. HTTPMethod: "POST",
  395. HTTPPath: "/",
  396. }
  397. if input == nil {
  398. input = &BatchDetectSyntaxInput{}
  399. }
  400. output = &BatchDetectSyntaxOutput{}
  401. req = c.newRequest(op, input, output)
  402. return
  403. }
  404. // BatchDetectSyntax API operation for Amazon Comprehend.
  405. //
  406. // Inspects the text of a batch of documents for the syntax and part of speech
  407. // of the words in the document and returns information about them. For more
  408. // information, see how-syntax.
  409. //
  410. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  411. // with awserr.Error's Code and Message methods to get detailed information about
  412. // the error.
  413. //
  414. // See the AWS API reference guide for Amazon Comprehend's
  415. // API operation BatchDetectSyntax for usage and error information.
  416. //
  417. // Returned Error Codes:
  418. // * ErrCodeInvalidRequestException "InvalidRequestException"
  419. // The request is invalid.
  420. //
  421. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  422. // The size of the input text exceeds the limit. Use a smaller document.
  423. //
  424. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  425. // Amazon Comprehend can't process the language of the input text. For all custom
  426. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  427. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  428. // Spanish text.
  429. //
  430. // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
  431. // The number of documents in the request exceeds the limit of 25. Try your
  432. // request again with fewer documents.
  433. //
  434. // * ErrCodeInternalServerException "InternalServerException"
  435. // An internal server error occurred. Retry your request.
  436. //
  437. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSyntax
  438. func (c *Comprehend) BatchDetectSyntax(input *BatchDetectSyntaxInput) (*BatchDetectSyntaxOutput, error) {
  439. req, out := c.BatchDetectSyntaxRequest(input)
  440. return out, req.Send()
  441. }
  442. // BatchDetectSyntaxWithContext is the same as BatchDetectSyntax with the addition of
  443. // the ability to pass a context and additional request options.
  444. //
  445. // See BatchDetectSyntax for details on how to use this API operation.
  446. //
  447. // The context must be non-nil and will be used for request cancellation. If
  448. // the context is nil a panic will occur. In the future the SDK may create
  449. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  450. // for more information on using Contexts.
  451. func (c *Comprehend) BatchDetectSyntaxWithContext(ctx aws.Context, input *BatchDetectSyntaxInput, opts ...request.Option) (*BatchDetectSyntaxOutput, error) {
  452. req, out := c.BatchDetectSyntaxRequest(input)
  453. req.SetContext(ctx)
  454. req.ApplyOptions(opts...)
  455. return out, req.Send()
  456. }
  457. const opCreateDocumentClassifier = "CreateDocumentClassifier"
  458. // CreateDocumentClassifierRequest generates a "aws/request.Request" representing the
  459. // client's request for the CreateDocumentClassifier operation. The "output" return
  460. // value will be populated with the request's response once the request completes
  461. // successfully.
  462. //
  463. // Use "Send" method on the returned Request to send the API call to the service.
  464. // the "output" return value is not valid until after Send returns without error.
  465. //
  466. // See CreateDocumentClassifier for more information on using the CreateDocumentClassifier
  467. // API call, and error handling.
  468. //
  469. // This method is useful when you want to inject custom logic or configuration
  470. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  471. //
  472. //
  473. // // Example sending a request using the CreateDocumentClassifierRequest method.
  474. // req, resp := client.CreateDocumentClassifierRequest(params)
  475. //
  476. // err := req.Send()
  477. // if err == nil { // resp is now filled
  478. // fmt.Println(resp)
  479. // }
  480. //
  481. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateDocumentClassifier
  482. func (c *Comprehend) CreateDocumentClassifierRequest(input *CreateDocumentClassifierInput) (req *request.Request, output *CreateDocumentClassifierOutput) {
  483. op := &request.Operation{
  484. Name: opCreateDocumentClassifier,
  485. HTTPMethod: "POST",
  486. HTTPPath: "/",
  487. }
  488. if input == nil {
  489. input = &CreateDocumentClassifierInput{}
  490. }
  491. output = &CreateDocumentClassifierOutput{}
  492. req = c.newRequest(op, input, output)
  493. return
  494. }
  495. // CreateDocumentClassifier API operation for Amazon Comprehend.
  496. //
  497. // Creates a new document classifier that you can use to categorize documents.
  498. // To create a classifier you provide a set of training documents that labeled
  499. // with the categories that you want to use. After the classifier is trained
  500. // you can use it to categorize a set of labeled documents into the categories.
  501. // For more information, see how-document-classification.
  502. //
  503. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  504. // with awserr.Error's Code and Message methods to get detailed information about
  505. // the error.
  506. //
  507. // See the AWS API reference guide for Amazon Comprehend's
  508. // API operation CreateDocumentClassifier for usage and error information.
  509. //
  510. // Returned Error Codes:
  511. // * ErrCodeInvalidRequestException "InvalidRequestException"
  512. // The request is invalid.
  513. //
  514. // * ErrCodeResourceInUseException "ResourceInUseException"
  515. // The specified name is already in use. Use a different name and try your request
  516. // again.
  517. //
  518. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  519. // The number of requests exceeds the limit. Resubmit your request later.
  520. //
  521. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  522. // The maximum number of recognizers per account has been exceeded. Review the
  523. // recognizers, perform cleanup, and then try your request again.
  524. //
  525. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  526. // Amazon Comprehend can't process the language of the input text. For all custom
  527. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  528. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  529. // Spanish text.
  530. //
  531. // * ErrCodeInternalServerException "InternalServerException"
  532. // An internal server error occurred. Retry your request.
  533. //
  534. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateDocumentClassifier
  535. func (c *Comprehend) CreateDocumentClassifier(input *CreateDocumentClassifierInput) (*CreateDocumentClassifierOutput, error) {
  536. req, out := c.CreateDocumentClassifierRequest(input)
  537. return out, req.Send()
  538. }
  539. // CreateDocumentClassifierWithContext is the same as CreateDocumentClassifier with the addition of
  540. // the ability to pass a context and additional request options.
  541. //
  542. // See CreateDocumentClassifier for details on how to use this API operation.
  543. //
  544. // The context must be non-nil and will be used for request cancellation. If
  545. // the context is nil a panic will occur. In the future the SDK may create
  546. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  547. // for more information on using Contexts.
  548. func (c *Comprehend) CreateDocumentClassifierWithContext(ctx aws.Context, input *CreateDocumentClassifierInput, opts ...request.Option) (*CreateDocumentClassifierOutput, error) {
  549. req, out := c.CreateDocumentClassifierRequest(input)
  550. req.SetContext(ctx)
  551. req.ApplyOptions(opts...)
  552. return out, req.Send()
  553. }
  554. const opCreateEntityRecognizer = "CreateEntityRecognizer"
  555. // CreateEntityRecognizerRequest generates a "aws/request.Request" representing the
  556. // client's request for the CreateEntityRecognizer operation. The "output" return
  557. // value will be populated with the request's response once the request completes
  558. // successfully.
  559. //
  560. // Use "Send" method on the returned Request to send the API call to the service.
  561. // the "output" return value is not valid until after Send returns without error.
  562. //
  563. // See CreateEntityRecognizer for more information on using the CreateEntityRecognizer
  564. // API call, and error handling.
  565. //
  566. // This method is useful when you want to inject custom logic or configuration
  567. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  568. //
  569. //
  570. // // Example sending a request using the CreateEntityRecognizerRequest method.
  571. // req, resp := client.CreateEntityRecognizerRequest(params)
  572. //
  573. // err := req.Send()
  574. // if err == nil { // resp is now filled
  575. // fmt.Println(resp)
  576. // }
  577. //
  578. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEntityRecognizer
  579. func (c *Comprehend) CreateEntityRecognizerRequest(input *CreateEntityRecognizerInput) (req *request.Request, output *CreateEntityRecognizerOutput) {
  580. op := &request.Operation{
  581. Name: opCreateEntityRecognizer,
  582. HTTPMethod: "POST",
  583. HTTPPath: "/",
  584. }
  585. if input == nil {
  586. input = &CreateEntityRecognizerInput{}
  587. }
  588. output = &CreateEntityRecognizerOutput{}
  589. req = c.newRequest(op, input, output)
  590. return
  591. }
  592. // CreateEntityRecognizer API operation for Amazon Comprehend.
  593. //
  594. // Creates an entity recognizer using submitted files. After your CreateEntityRecognizer
  595. // request is submitted, you can check job status using the API.
  596. //
  597. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  598. // with awserr.Error's Code and Message methods to get detailed information about
  599. // the error.
  600. //
  601. // See the AWS API reference guide for Amazon Comprehend's
  602. // API operation CreateEntityRecognizer for usage and error information.
  603. //
  604. // Returned Error Codes:
  605. // * ErrCodeInvalidRequestException "InvalidRequestException"
  606. // The request is invalid.
  607. //
  608. // * ErrCodeResourceInUseException "ResourceInUseException"
  609. // The specified name is already in use. Use a different name and try your request
  610. // again.
  611. //
  612. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  613. // The number of requests exceeds the limit. Resubmit your request later.
  614. //
  615. // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
  616. // The maximum number of recognizers per account has been exceeded. Review the
  617. // recognizers, perform cleanup, and then try your request again.
  618. //
  619. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  620. // Amazon Comprehend can't process the language of the input text. For all custom
  621. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  622. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  623. // Spanish text.
  624. //
  625. // * ErrCodeInternalServerException "InternalServerException"
  626. // An internal server error occurred. Retry your request.
  627. //
  628. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEntityRecognizer
  629. func (c *Comprehend) CreateEntityRecognizer(input *CreateEntityRecognizerInput) (*CreateEntityRecognizerOutput, error) {
  630. req, out := c.CreateEntityRecognizerRequest(input)
  631. return out, req.Send()
  632. }
  633. // CreateEntityRecognizerWithContext is the same as CreateEntityRecognizer with the addition of
  634. // the ability to pass a context and additional request options.
  635. //
  636. // See CreateEntityRecognizer for details on how to use this API operation.
  637. //
  638. // The context must be non-nil and will be used for request cancellation. If
  639. // the context is nil a panic will occur. In the future the SDK may create
  640. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  641. // for more information on using Contexts.
  642. func (c *Comprehend) CreateEntityRecognizerWithContext(ctx aws.Context, input *CreateEntityRecognizerInput, opts ...request.Option) (*CreateEntityRecognizerOutput, error) {
  643. req, out := c.CreateEntityRecognizerRequest(input)
  644. req.SetContext(ctx)
  645. req.ApplyOptions(opts...)
  646. return out, req.Send()
  647. }
  648. const opDeleteDocumentClassifier = "DeleteDocumentClassifier"
  649. // DeleteDocumentClassifierRequest generates a "aws/request.Request" representing the
  650. // client's request for the DeleteDocumentClassifier operation. The "output" return
  651. // value will be populated with the request's response once the request completes
  652. // successfully.
  653. //
  654. // Use "Send" method on the returned Request to send the API call to the service.
  655. // the "output" return value is not valid until after Send returns without error.
  656. //
  657. // See DeleteDocumentClassifier for more information on using the DeleteDocumentClassifier
  658. // API call, and error handling.
  659. //
  660. // This method is useful when you want to inject custom logic or configuration
  661. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  662. //
  663. //
  664. // // Example sending a request using the DeleteDocumentClassifierRequest method.
  665. // req, resp := client.DeleteDocumentClassifierRequest(params)
  666. //
  667. // err := req.Send()
  668. // if err == nil { // resp is now filled
  669. // fmt.Println(resp)
  670. // }
  671. //
  672. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteDocumentClassifier
  673. func (c *Comprehend) DeleteDocumentClassifierRequest(input *DeleteDocumentClassifierInput) (req *request.Request, output *DeleteDocumentClassifierOutput) {
  674. op := &request.Operation{
  675. Name: opDeleteDocumentClassifier,
  676. HTTPMethod: "POST",
  677. HTTPPath: "/",
  678. }
  679. if input == nil {
  680. input = &DeleteDocumentClassifierInput{}
  681. }
  682. output = &DeleteDocumentClassifierOutput{}
  683. req = c.newRequest(op, input, output)
  684. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  685. return
  686. }
  687. // DeleteDocumentClassifier API operation for Amazon Comprehend.
  688. //
  689. // Deletes a previously created document classifier
  690. //
  691. // Only those classifiers that are in terminated states (IN_ERROR, TRAINED)
  692. // will be deleted. If an active inference job is using the model, a ResourceInUseException
  693. // will be returned.
  694. //
  695. // This is an asynchronous action that puts the classifier into a DELETING state,
  696. // and it is then removed by a background job. Once removed, the classifier
  697. // disappears from your account and is no longer available for use.
  698. //
  699. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  700. // with awserr.Error's Code and Message methods to get detailed information about
  701. // the error.
  702. //
  703. // See the AWS API reference guide for Amazon Comprehend's
  704. // API operation DeleteDocumentClassifier for usage and error information.
  705. //
  706. // Returned Error Codes:
  707. // * ErrCodeInvalidRequestException "InvalidRequestException"
  708. // The request is invalid.
  709. //
  710. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  711. // The number of requests exceeds the limit. Resubmit your request later.
  712. //
  713. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  714. // The specified resource ARN was not found. Check the ARN and try your request
  715. // again.
  716. //
  717. // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
  718. // The specified resource is not available. Check to see if the resource is
  719. // in the TRAINED state and try your request again.
  720. //
  721. // * ErrCodeResourceInUseException "ResourceInUseException"
  722. // The specified name is already in use. Use a different name and try your request
  723. // again.
  724. //
  725. // * ErrCodeInternalServerException "InternalServerException"
  726. // An internal server error occurred. Retry your request.
  727. //
  728. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteDocumentClassifier
  729. func (c *Comprehend) DeleteDocumentClassifier(input *DeleteDocumentClassifierInput) (*DeleteDocumentClassifierOutput, error) {
  730. req, out := c.DeleteDocumentClassifierRequest(input)
  731. return out, req.Send()
  732. }
  733. // DeleteDocumentClassifierWithContext is the same as DeleteDocumentClassifier with the addition of
  734. // the ability to pass a context and additional request options.
  735. //
  736. // See DeleteDocumentClassifier for details on how to use this API operation.
  737. //
  738. // The context must be non-nil and will be used for request cancellation. If
  739. // the context is nil a panic will occur. In the future the SDK may create
  740. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  741. // for more information on using Contexts.
  742. func (c *Comprehend) DeleteDocumentClassifierWithContext(ctx aws.Context, input *DeleteDocumentClassifierInput, opts ...request.Option) (*DeleteDocumentClassifierOutput, error) {
  743. req, out := c.DeleteDocumentClassifierRequest(input)
  744. req.SetContext(ctx)
  745. req.ApplyOptions(opts...)
  746. return out, req.Send()
  747. }
  748. const opDeleteEntityRecognizer = "DeleteEntityRecognizer"
  749. // DeleteEntityRecognizerRequest generates a "aws/request.Request" representing the
  750. // client's request for the DeleteEntityRecognizer operation. The "output" return
  751. // value will be populated with the request's response once the request completes
  752. // successfully.
  753. //
  754. // Use "Send" method on the returned Request to send the API call to the service.
  755. // the "output" return value is not valid until after Send returns without error.
  756. //
  757. // See DeleteEntityRecognizer for more information on using the DeleteEntityRecognizer
  758. // API call, and error handling.
  759. //
  760. // This method is useful when you want to inject custom logic or configuration
  761. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  762. //
  763. //
  764. // // Example sending a request using the DeleteEntityRecognizerRequest method.
  765. // req, resp := client.DeleteEntityRecognizerRequest(params)
  766. //
  767. // err := req.Send()
  768. // if err == nil { // resp is now filled
  769. // fmt.Println(resp)
  770. // }
  771. //
  772. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteEntityRecognizer
  773. func (c *Comprehend) DeleteEntityRecognizerRequest(input *DeleteEntityRecognizerInput) (req *request.Request, output *DeleteEntityRecognizerOutput) {
  774. op := &request.Operation{
  775. Name: opDeleteEntityRecognizer,
  776. HTTPMethod: "POST",
  777. HTTPPath: "/",
  778. }
  779. if input == nil {
  780. input = &DeleteEntityRecognizerInput{}
  781. }
  782. output = &DeleteEntityRecognizerOutput{}
  783. req = c.newRequest(op, input, output)
  784. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  785. return
  786. }
  787. // DeleteEntityRecognizer API operation for Amazon Comprehend.
  788. //
  789. // Deletes an entity recognizer.
  790. //
  791. // Only those recognizers that are in terminated states (IN_ERROR, TRAINED)
  792. // will be deleted. If an active inference job is using the model, a ResourceInUseException
  793. // will be returned.
  794. //
  795. // This is an asynchronous action that puts the recognizer into a DELETING state,
  796. // and it is then removed by a background job. Once removed, the recognizer
  797. // disappears from your account and is no longer available for use.
  798. //
  799. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  800. // with awserr.Error's Code and Message methods to get detailed information about
  801. // the error.
  802. //
  803. // See the AWS API reference guide for Amazon Comprehend's
  804. // API operation DeleteEntityRecognizer for usage and error information.
  805. //
  806. // Returned Error Codes:
  807. // * ErrCodeInvalidRequestException "InvalidRequestException"
  808. // The request is invalid.
  809. //
  810. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  811. // The number of requests exceeds the limit. Resubmit your request later.
  812. //
  813. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  814. // The specified resource ARN was not found. Check the ARN and try your request
  815. // again.
  816. //
  817. // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
  818. // The specified resource is not available. Check to see if the resource is
  819. // in the TRAINED state and try your request again.
  820. //
  821. // * ErrCodeResourceInUseException "ResourceInUseException"
  822. // The specified name is already in use. Use a different name and try your request
  823. // again.
  824. //
  825. // * ErrCodeInternalServerException "InternalServerException"
  826. // An internal server error occurred. Retry your request.
  827. //
  828. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteEntityRecognizer
  829. func (c *Comprehend) DeleteEntityRecognizer(input *DeleteEntityRecognizerInput) (*DeleteEntityRecognizerOutput, error) {
  830. req, out := c.DeleteEntityRecognizerRequest(input)
  831. return out, req.Send()
  832. }
  833. // DeleteEntityRecognizerWithContext is the same as DeleteEntityRecognizer with the addition of
  834. // the ability to pass a context and additional request options.
  835. //
  836. // See DeleteEntityRecognizer for details on how to use this API operation.
  837. //
  838. // The context must be non-nil and will be used for request cancellation. If
  839. // the context is nil a panic will occur. In the future the SDK may create
  840. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  841. // for more information on using Contexts.
  842. func (c *Comprehend) DeleteEntityRecognizerWithContext(ctx aws.Context, input *DeleteEntityRecognizerInput, opts ...request.Option) (*DeleteEntityRecognizerOutput, error) {
  843. req, out := c.DeleteEntityRecognizerRequest(input)
  844. req.SetContext(ctx)
  845. req.ApplyOptions(opts...)
  846. return out, req.Send()
  847. }
  848. const opDescribeDocumentClassificationJob = "DescribeDocumentClassificationJob"
  849. // DescribeDocumentClassificationJobRequest generates a "aws/request.Request" representing the
  850. // client's request for the DescribeDocumentClassificationJob operation. The "output" return
  851. // value will be populated with the request's response once the request completes
  852. // successfully.
  853. //
  854. // Use "Send" method on the returned Request to send the API call to the service.
  855. // the "output" return value is not valid until after Send returns without error.
  856. //
  857. // See DescribeDocumentClassificationJob for more information on using the DescribeDocumentClassificationJob
  858. // API call, and error handling.
  859. //
  860. // This method is useful when you want to inject custom logic or configuration
  861. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  862. //
  863. //
  864. // // Example sending a request using the DescribeDocumentClassificationJobRequest method.
  865. // req, resp := client.DescribeDocumentClassificationJobRequest(params)
  866. //
  867. // err := req.Send()
  868. // if err == nil { // resp is now filled
  869. // fmt.Println(resp)
  870. // }
  871. //
  872. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassificationJob
  873. func (c *Comprehend) DescribeDocumentClassificationJobRequest(input *DescribeDocumentClassificationJobInput) (req *request.Request, output *DescribeDocumentClassificationJobOutput) {
  874. op := &request.Operation{
  875. Name: opDescribeDocumentClassificationJob,
  876. HTTPMethod: "POST",
  877. HTTPPath: "/",
  878. }
  879. if input == nil {
  880. input = &DescribeDocumentClassificationJobInput{}
  881. }
  882. output = &DescribeDocumentClassificationJobOutput{}
  883. req = c.newRequest(op, input, output)
  884. return
  885. }
  886. // DescribeDocumentClassificationJob API operation for Amazon Comprehend.
  887. //
  888. // Gets the properties associated with a document classification job. Use this
  889. // operation to get the status of a classification job.
  890. //
  891. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  892. // with awserr.Error's Code and Message methods to get detailed information about
  893. // the error.
  894. //
  895. // See the AWS API reference guide for Amazon Comprehend's
  896. // API operation DescribeDocumentClassificationJob for usage and error information.
  897. //
  898. // Returned Error Codes:
  899. // * ErrCodeInvalidRequestException "InvalidRequestException"
  900. // The request is invalid.
  901. //
  902. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  903. // The number of requests exceeds the limit. Resubmit your request later.
  904. //
  905. // * ErrCodeJobNotFoundException "JobNotFoundException"
  906. // The specified job was not found. Check the job ID and try again.
  907. //
  908. // * ErrCodeInternalServerException "InternalServerException"
  909. // An internal server error occurred. Retry your request.
  910. //
  911. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassificationJob
  912. func (c *Comprehend) DescribeDocumentClassificationJob(input *DescribeDocumentClassificationJobInput) (*DescribeDocumentClassificationJobOutput, error) {
  913. req, out := c.DescribeDocumentClassificationJobRequest(input)
  914. return out, req.Send()
  915. }
  916. // DescribeDocumentClassificationJobWithContext is the same as DescribeDocumentClassificationJob with the addition of
  917. // the ability to pass a context and additional request options.
  918. //
  919. // See DescribeDocumentClassificationJob for details on how to use this API operation.
  920. //
  921. // The context must be non-nil and will be used for request cancellation. If
  922. // the context is nil a panic will occur. In the future the SDK may create
  923. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  924. // for more information on using Contexts.
  925. func (c *Comprehend) DescribeDocumentClassificationJobWithContext(ctx aws.Context, input *DescribeDocumentClassificationJobInput, opts ...request.Option) (*DescribeDocumentClassificationJobOutput, error) {
  926. req, out := c.DescribeDocumentClassificationJobRequest(input)
  927. req.SetContext(ctx)
  928. req.ApplyOptions(opts...)
  929. return out, req.Send()
  930. }
  931. const opDescribeDocumentClassifier = "DescribeDocumentClassifier"
  932. // DescribeDocumentClassifierRequest generates a "aws/request.Request" representing the
  933. // client's request for the DescribeDocumentClassifier operation. The "output" return
  934. // value will be populated with the request's response once the request completes
  935. // successfully.
  936. //
  937. // Use "Send" method on the returned Request to send the API call to the service.
  938. // the "output" return value is not valid until after Send returns without error.
  939. //
  940. // See DescribeDocumentClassifier for more information on using the DescribeDocumentClassifier
  941. // API call, and error handling.
  942. //
  943. // This method is useful when you want to inject custom logic or configuration
  944. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  945. //
  946. //
  947. // // Example sending a request using the DescribeDocumentClassifierRequest method.
  948. // req, resp := client.DescribeDocumentClassifierRequest(params)
  949. //
  950. // err := req.Send()
  951. // if err == nil { // resp is now filled
  952. // fmt.Println(resp)
  953. // }
  954. //
  955. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier
  956. func (c *Comprehend) DescribeDocumentClassifierRequest(input *DescribeDocumentClassifierInput) (req *request.Request, output *DescribeDocumentClassifierOutput) {
  957. op := &request.Operation{
  958. Name: opDescribeDocumentClassifier,
  959. HTTPMethod: "POST",
  960. HTTPPath: "/",
  961. }
  962. if input == nil {
  963. input = &DescribeDocumentClassifierInput{}
  964. }
  965. output = &DescribeDocumentClassifierOutput{}
  966. req = c.newRequest(op, input, output)
  967. return
  968. }
  969. // DescribeDocumentClassifier API operation for Amazon Comprehend.
  970. //
  971. // Gets the properties associated with a document classifier.
  972. //
  973. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  974. // with awserr.Error's Code and Message methods to get detailed information about
  975. // the error.
  976. //
  977. // See the AWS API reference guide for Amazon Comprehend's
  978. // API operation DescribeDocumentClassifier for usage and error information.
  979. //
  980. // Returned Error Codes:
  981. // * ErrCodeInvalidRequestException "InvalidRequestException"
  982. // The request is invalid.
  983. //
  984. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  985. // The number of requests exceeds the limit. Resubmit your request later.
  986. //
  987. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  988. // The specified resource ARN was not found. Check the ARN and try your request
  989. // again.
  990. //
  991. // * ErrCodeInternalServerException "InternalServerException"
  992. // An internal server error occurred. Retry your request.
  993. //
  994. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier
  995. func (c *Comprehend) DescribeDocumentClassifier(input *DescribeDocumentClassifierInput) (*DescribeDocumentClassifierOutput, error) {
  996. req, out := c.DescribeDocumentClassifierRequest(input)
  997. return out, req.Send()
  998. }
  999. // DescribeDocumentClassifierWithContext is the same as DescribeDocumentClassifier with the addition of
  1000. // the ability to pass a context and additional request options.
  1001. //
  1002. // See DescribeDocumentClassifier for details on how to use this API operation.
  1003. //
  1004. // The context must be non-nil and will be used for request cancellation. If
  1005. // the context is nil a panic will occur. In the future the SDK may create
  1006. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1007. // for more information on using Contexts.
  1008. func (c *Comprehend) DescribeDocumentClassifierWithContext(ctx aws.Context, input *DescribeDocumentClassifierInput, opts ...request.Option) (*DescribeDocumentClassifierOutput, error) {
  1009. req, out := c.DescribeDocumentClassifierRequest(input)
  1010. req.SetContext(ctx)
  1011. req.ApplyOptions(opts...)
  1012. return out, req.Send()
  1013. }
  1014. const opDescribeDominantLanguageDetectionJob = "DescribeDominantLanguageDetectionJob"
  1015. // DescribeDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the
  1016. // client's request for the DescribeDominantLanguageDetectionJob operation. The "output" return
  1017. // value will be populated with the request's response once the request completes
  1018. // successfully.
  1019. //
  1020. // Use "Send" method on the returned Request to send the API call to the service.
  1021. // the "output" return value is not valid until after Send returns without error.
  1022. //
  1023. // See DescribeDominantLanguageDetectionJob for more information on using the DescribeDominantLanguageDetectionJob
  1024. // API call, and error handling.
  1025. //
  1026. // This method is useful when you want to inject custom logic or configuration
  1027. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1028. //
  1029. //
  1030. // // Example sending a request using the DescribeDominantLanguageDetectionJobRequest method.
  1031. // req, resp := client.DescribeDominantLanguageDetectionJobRequest(params)
  1032. //
  1033. // err := req.Send()
  1034. // if err == nil { // resp is now filled
  1035. // fmt.Println(resp)
  1036. // }
  1037. //
  1038. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDominantLanguageDetectionJob
  1039. func (c *Comprehend) DescribeDominantLanguageDetectionJobRequest(input *DescribeDominantLanguageDetectionJobInput) (req *request.Request, output *DescribeDominantLanguageDetectionJobOutput) {
  1040. op := &request.Operation{
  1041. Name: opDescribeDominantLanguageDetectionJob,
  1042. HTTPMethod: "POST",
  1043. HTTPPath: "/",
  1044. }
  1045. if input == nil {
  1046. input = &DescribeDominantLanguageDetectionJobInput{}
  1047. }
  1048. output = &DescribeDominantLanguageDetectionJobOutput{}
  1049. req = c.newRequest(op, input, output)
  1050. return
  1051. }
  1052. // DescribeDominantLanguageDetectionJob API operation for Amazon Comprehend.
  1053. //
  1054. // Gets the properties associated with a dominant language detection job. Use
  1055. // this operation to get the status of a detection job.
  1056. //
  1057. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1058. // with awserr.Error's Code and Message methods to get detailed information about
  1059. // the error.
  1060. //
  1061. // See the AWS API reference guide for Amazon Comprehend's
  1062. // API operation DescribeDominantLanguageDetectionJob for usage and error information.
  1063. //
  1064. // Returned Error Codes:
  1065. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1066. // The request is invalid.
  1067. //
  1068. // * ErrCodeJobNotFoundException "JobNotFoundException"
  1069. // The specified job was not found. Check the job ID and try again.
  1070. //
  1071. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1072. // The number of requests exceeds the limit. Resubmit your request later.
  1073. //
  1074. // * ErrCodeInternalServerException "InternalServerException"
  1075. // An internal server error occurred. Retry your request.
  1076. //
  1077. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDominantLanguageDetectionJob
  1078. func (c *Comprehend) DescribeDominantLanguageDetectionJob(input *DescribeDominantLanguageDetectionJobInput) (*DescribeDominantLanguageDetectionJobOutput, error) {
  1079. req, out := c.DescribeDominantLanguageDetectionJobRequest(input)
  1080. return out, req.Send()
  1081. }
  1082. // DescribeDominantLanguageDetectionJobWithContext is the same as DescribeDominantLanguageDetectionJob with the addition of
  1083. // the ability to pass a context and additional request options.
  1084. //
  1085. // See DescribeDominantLanguageDetectionJob for details on how to use this API operation.
  1086. //
  1087. // The context must be non-nil and will be used for request cancellation. If
  1088. // the context is nil a panic will occur. In the future the SDK may create
  1089. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1090. // for more information on using Contexts.
  1091. func (c *Comprehend) DescribeDominantLanguageDetectionJobWithContext(ctx aws.Context, input *DescribeDominantLanguageDetectionJobInput, opts ...request.Option) (*DescribeDominantLanguageDetectionJobOutput, error) {
  1092. req, out := c.DescribeDominantLanguageDetectionJobRequest(input)
  1093. req.SetContext(ctx)
  1094. req.ApplyOptions(opts...)
  1095. return out, req.Send()
  1096. }
  1097. const opDescribeEntitiesDetectionJob = "DescribeEntitiesDetectionJob"
  1098. // DescribeEntitiesDetectionJobRequest generates a "aws/request.Request" representing the
  1099. // client's request for the DescribeEntitiesDetectionJob operation. The "output" return
  1100. // value will be populated with the request's response once the request completes
  1101. // successfully.
  1102. //
  1103. // Use "Send" method on the returned Request to send the API call to the service.
  1104. // the "output" return value is not valid until after Send returns without error.
  1105. //
  1106. // See DescribeEntitiesDetectionJob for more information on using the DescribeEntitiesDetectionJob
  1107. // API call, and error handling.
  1108. //
  1109. // This method is useful when you want to inject custom logic or configuration
  1110. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1111. //
  1112. //
  1113. // // Example sending a request using the DescribeEntitiesDetectionJobRequest method.
  1114. // req, resp := client.DescribeEntitiesDetectionJobRequest(params)
  1115. //
  1116. // err := req.Send()
  1117. // if err == nil { // resp is now filled
  1118. // fmt.Println(resp)
  1119. // }
  1120. //
  1121. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntitiesDetectionJob
  1122. func (c *Comprehend) DescribeEntitiesDetectionJobRequest(input *DescribeEntitiesDetectionJobInput) (req *request.Request, output *DescribeEntitiesDetectionJobOutput) {
  1123. op := &request.Operation{
  1124. Name: opDescribeEntitiesDetectionJob,
  1125. HTTPMethod: "POST",
  1126. HTTPPath: "/",
  1127. }
  1128. if input == nil {
  1129. input = &DescribeEntitiesDetectionJobInput{}
  1130. }
  1131. output = &DescribeEntitiesDetectionJobOutput{}
  1132. req = c.newRequest(op, input, output)
  1133. return
  1134. }
  1135. // DescribeEntitiesDetectionJob API operation for Amazon Comprehend.
  1136. //
  1137. // Gets the properties associated with an entities detection job. Use this operation
  1138. // to get the status of a detection job.
  1139. //
  1140. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1141. // with awserr.Error's Code and Message methods to get detailed information about
  1142. // the error.
  1143. //
  1144. // See the AWS API reference guide for Amazon Comprehend's
  1145. // API operation DescribeEntitiesDetectionJob for usage and error information.
  1146. //
  1147. // Returned Error Codes:
  1148. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1149. // The request is invalid.
  1150. //
  1151. // * ErrCodeJobNotFoundException "JobNotFoundException"
  1152. // The specified job was not found. Check the job ID and try again.
  1153. //
  1154. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1155. // The number of requests exceeds the limit. Resubmit your request later.
  1156. //
  1157. // * ErrCodeInternalServerException "InternalServerException"
  1158. // An internal server error occurred. Retry your request.
  1159. //
  1160. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntitiesDetectionJob
  1161. func (c *Comprehend) DescribeEntitiesDetectionJob(input *DescribeEntitiesDetectionJobInput) (*DescribeEntitiesDetectionJobOutput, error) {
  1162. req, out := c.DescribeEntitiesDetectionJobRequest(input)
  1163. return out, req.Send()
  1164. }
  1165. // DescribeEntitiesDetectionJobWithContext is the same as DescribeEntitiesDetectionJob with the addition of
  1166. // the ability to pass a context and additional request options.
  1167. //
  1168. // See DescribeEntitiesDetectionJob for details on how to use this API operation.
  1169. //
  1170. // The context must be non-nil and will be used for request cancellation. If
  1171. // the context is nil a panic will occur. In the future the SDK may create
  1172. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1173. // for more information on using Contexts.
  1174. func (c *Comprehend) DescribeEntitiesDetectionJobWithContext(ctx aws.Context, input *DescribeEntitiesDetectionJobInput, opts ...request.Option) (*DescribeEntitiesDetectionJobOutput, error) {
  1175. req, out := c.DescribeEntitiesDetectionJobRequest(input)
  1176. req.SetContext(ctx)
  1177. req.ApplyOptions(opts...)
  1178. return out, req.Send()
  1179. }
  1180. const opDescribeEntityRecognizer = "DescribeEntityRecognizer"
  1181. // DescribeEntityRecognizerRequest generates a "aws/request.Request" representing the
  1182. // client's request for the DescribeEntityRecognizer operation. The "output" return
  1183. // value will be populated with the request's response once the request completes
  1184. // successfully.
  1185. //
  1186. // Use "Send" method on the returned Request to send the API call to the service.
  1187. // the "output" return value is not valid until after Send returns without error.
  1188. //
  1189. // See DescribeEntityRecognizer for more information on using the DescribeEntityRecognizer
  1190. // API call, and error handling.
  1191. //
  1192. // This method is useful when you want to inject custom logic or configuration
  1193. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1194. //
  1195. //
  1196. // // Example sending a request using the DescribeEntityRecognizerRequest method.
  1197. // req, resp := client.DescribeEntityRecognizerRequest(params)
  1198. //
  1199. // err := req.Send()
  1200. // if err == nil { // resp is now filled
  1201. // fmt.Println(resp)
  1202. // }
  1203. //
  1204. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer
  1205. func (c *Comprehend) DescribeEntityRecognizerRequest(input *DescribeEntityRecognizerInput) (req *request.Request, output *DescribeEntityRecognizerOutput) {
  1206. op := &request.Operation{
  1207. Name: opDescribeEntityRecognizer,
  1208. HTTPMethod: "POST",
  1209. HTTPPath: "/",
  1210. }
  1211. if input == nil {
  1212. input = &DescribeEntityRecognizerInput{}
  1213. }
  1214. output = &DescribeEntityRecognizerOutput{}
  1215. req = c.newRequest(op, input, output)
  1216. return
  1217. }
  1218. // DescribeEntityRecognizer API operation for Amazon Comprehend.
  1219. //
  1220. // Provides details about an entity recognizer including status, S3 buckets
  1221. // containing training data, recognizer metadata, metrics, and so on.
  1222. //
  1223. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1224. // with awserr.Error's Code and Message methods to get detailed information about
  1225. // the error.
  1226. //
  1227. // See the AWS API reference guide for Amazon Comprehend's
  1228. // API operation DescribeEntityRecognizer for usage and error information.
  1229. //
  1230. // Returned Error Codes:
  1231. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1232. // The request is invalid.
  1233. //
  1234. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1235. // The number of requests exceeds the limit. Resubmit your request later.
  1236. //
  1237. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1238. // The specified resource ARN was not found. Check the ARN and try your request
  1239. // again.
  1240. //
  1241. // * ErrCodeInternalServerException "InternalServerException"
  1242. // An internal server error occurred. Retry your request.
  1243. //
  1244. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer
  1245. func (c *Comprehend) DescribeEntityRecognizer(input *DescribeEntityRecognizerInput) (*DescribeEntityRecognizerOutput, error) {
  1246. req, out := c.DescribeEntityRecognizerRequest(input)
  1247. return out, req.Send()
  1248. }
  1249. // DescribeEntityRecognizerWithContext is the same as DescribeEntityRecognizer with the addition of
  1250. // the ability to pass a context and additional request options.
  1251. //
  1252. // See DescribeEntityRecognizer for details on how to use this API operation.
  1253. //
  1254. // The context must be non-nil and will be used for request cancellation. If
  1255. // the context is nil a panic will occur. In the future the SDK may create
  1256. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1257. // for more information on using Contexts.
  1258. func (c *Comprehend) DescribeEntityRecognizerWithContext(ctx aws.Context, input *DescribeEntityRecognizerInput, opts ...request.Option) (*DescribeEntityRecognizerOutput, error) {
  1259. req, out := c.DescribeEntityRecognizerRequest(input)
  1260. req.SetContext(ctx)
  1261. req.ApplyOptions(opts...)
  1262. return out, req.Send()
  1263. }
  1264. const opDescribeKeyPhrasesDetectionJob = "DescribeKeyPhrasesDetectionJob"
  1265. // DescribeKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the
  1266. // client's request for the DescribeKeyPhrasesDetectionJob operation. The "output" return
  1267. // value will be populated with the request's response once the request completes
  1268. // successfully.
  1269. //
  1270. // Use "Send" method on the returned Request to send the API call to the service.
  1271. // the "output" return value is not valid until after Send returns without error.
  1272. //
  1273. // See DescribeKeyPhrasesDetectionJob for more information on using the DescribeKeyPhrasesDetectionJob
  1274. // API call, and error handling.
  1275. //
  1276. // This method is useful when you want to inject custom logic or configuration
  1277. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1278. //
  1279. //
  1280. // // Example sending a request using the DescribeKeyPhrasesDetectionJobRequest method.
  1281. // req, resp := client.DescribeKeyPhrasesDetectionJobRequest(params)
  1282. //
  1283. // err := req.Send()
  1284. // if err == nil { // resp is now filled
  1285. // fmt.Println(resp)
  1286. // }
  1287. //
  1288. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeKeyPhrasesDetectionJob
  1289. func (c *Comprehend) DescribeKeyPhrasesDetectionJobRequest(input *DescribeKeyPhrasesDetectionJobInput) (req *request.Request, output *DescribeKeyPhrasesDetectionJobOutput) {
  1290. op := &request.Operation{
  1291. Name: opDescribeKeyPhrasesDetectionJob,
  1292. HTTPMethod: "POST",
  1293. HTTPPath: "/",
  1294. }
  1295. if input == nil {
  1296. input = &DescribeKeyPhrasesDetectionJobInput{}
  1297. }
  1298. output = &DescribeKeyPhrasesDetectionJobOutput{}
  1299. req = c.newRequest(op, input, output)
  1300. return
  1301. }
  1302. // DescribeKeyPhrasesDetectionJob API operation for Amazon Comprehend.
  1303. //
  1304. // Gets the properties associated with a key phrases detection job. Use this
  1305. // operation to get the status of a detection job.
  1306. //
  1307. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1308. // with awserr.Error's Code and Message methods to get detailed information about
  1309. // the error.
  1310. //
  1311. // See the AWS API reference guide for Amazon Comprehend's
  1312. // API operation DescribeKeyPhrasesDetectionJob for usage and error information.
  1313. //
  1314. // Returned Error Codes:
  1315. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1316. // The request is invalid.
  1317. //
  1318. // * ErrCodeJobNotFoundException "JobNotFoundException"
  1319. // The specified job was not found. Check the job ID and try again.
  1320. //
  1321. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1322. // The number of requests exceeds the limit. Resubmit your request later.
  1323. //
  1324. // * ErrCodeInternalServerException "InternalServerException"
  1325. // An internal server error occurred. Retry your request.
  1326. //
  1327. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeKeyPhrasesDetectionJob
  1328. func (c *Comprehend) DescribeKeyPhrasesDetectionJob(input *DescribeKeyPhrasesDetectionJobInput) (*DescribeKeyPhrasesDetectionJobOutput, error) {
  1329. req, out := c.DescribeKeyPhrasesDetectionJobRequest(input)
  1330. return out, req.Send()
  1331. }
  1332. // DescribeKeyPhrasesDetectionJobWithContext is the same as DescribeKeyPhrasesDetectionJob with the addition of
  1333. // the ability to pass a context and additional request options.
  1334. //
  1335. // See DescribeKeyPhrasesDetectionJob for details on how to use this API operation.
  1336. //
  1337. // The context must be non-nil and will be used for request cancellation. If
  1338. // the context is nil a panic will occur. In the future the SDK may create
  1339. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1340. // for more information on using Contexts.
  1341. func (c *Comprehend) DescribeKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *DescribeKeyPhrasesDetectionJobInput, opts ...request.Option) (*DescribeKeyPhrasesDetectionJobOutput, error) {
  1342. req, out := c.DescribeKeyPhrasesDetectionJobRequest(input)
  1343. req.SetContext(ctx)
  1344. req.ApplyOptions(opts...)
  1345. return out, req.Send()
  1346. }
  1347. const opDescribeSentimentDetectionJob = "DescribeSentimentDetectionJob"
  1348. // DescribeSentimentDetectionJobRequest generates a "aws/request.Request" representing the
  1349. // client's request for the DescribeSentimentDetectionJob operation. The "output" return
  1350. // value will be populated with the request's response once the request completes
  1351. // successfully.
  1352. //
  1353. // Use "Send" method on the returned Request to send the API call to the service.
  1354. // the "output" return value is not valid until after Send returns without error.
  1355. //
  1356. // See DescribeSentimentDetectionJob for more information on using the DescribeSentimentDetectionJob
  1357. // API call, and error handling.
  1358. //
  1359. // This method is useful when you want to inject custom logic or configuration
  1360. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1361. //
  1362. //
  1363. // // Example sending a request using the DescribeSentimentDetectionJobRequest method.
  1364. // req, resp := client.DescribeSentimentDetectionJobRequest(params)
  1365. //
  1366. // err := req.Send()
  1367. // if err == nil { // resp is now filled
  1368. // fmt.Println(resp)
  1369. // }
  1370. //
  1371. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeSentimentDetectionJob
  1372. func (c *Comprehend) DescribeSentimentDetectionJobRequest(input *DescribeSentimentDetectionJobInput) (req *request.Request, output *DescribeSentimentDetectionJobOutput) {
  1373. op := &request.Operation{
  1374. Name: opDescribeSentimentDetectionJob,
  1375. HTTPMethod: "POST",
  1376. HTTPPath: "/",
  1377. }
  1378. if input == nil {
  1379. input = &DescribeSentimentDetectionJobInput{}
  1380. }
  1381. output = &DescribeSentimentDetectionJobOutput{}
  1382. req = c.newRequest(op, input, output)
  1383. return
  1384. }
  1385. // DescribeSentimentDetectionJob API operation for Amazon Comprehend.
  1386. //
  1387. // Gets the properties associated with a sentiment detection job. Use this operation
  1388. // to get the status of a detection job.
  1389. //
  1390. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1391. // with awserr.Error's Code and Message methods to get detailed information about
  1392. // the error.
  1393. //
  1394. // See the AWS API reference guide for Amazon Comprehend's
  1395. // API operation DescribeSentimentDetectionJob for usage and error information.
  1396. //
  1397. // Returned Error Codes:
  1398. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1399. // The request is invalid.
  1400. //
  1401. // * ErrCodeJobNotFoundException "JobNotFoundException"
  1402. // The specified job was not found. Check the job ID and try again.
  1403. //
  1404. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1405. // The number of requests exceeds the limit. Resubmit your request later.
  1406. //
  1407. // * ErrCodeInternalServerException "InternalServerException"
  1408. // An internal server error occurred. Retry your request.
  1409. //
  1410. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeSentimentDetectionJob
  1411. func (c *Comprehend) DescribeSentimentDetectionJob(input *DescribeSentimentDetectionJobInput) (*DescribeSentimentDetectionJobOutput, error) {
  1412. req, out := c.DescribeSentimentDetectionJobRequest(input)
  1413. return out, req.Send()
  1414. }
  1415. // DescribeSentimentDetectionJobWithContext is the same as DescribeSentimentDetectionJob with the addition of
  1416. // the ability to pass a context and additional request options.
  1417. //
  1418. // See DescribeSentimentDetectionJob for details on how to use this API operation.
  1419. //
  1420. // The context must be non-nil and will be used for request cancellation. If
  1421. // the context is nil a panic will occur. In the future the SDK may create
  1422. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1423. // for more information on using Contexts.
  1424. func (c *Comprehend) DescribeSentimentDetectionJobWithContext(ctx aws.Context, input *DescribeSentimentDetectionJobInput, opts ...request.Option) (*DescribeSentimentDetectionJobOutput, error) {
  1425. req, out := c.DescribeSentimentDetectionJobRequest(input)
  1426. req.SetContext(ctx)
  1427. req.ApplyOptions(opts...)
  1428. return out, req.Send()
  1429. }
  1430. const opDescribeTopicsDetectionJob = "DescribeTopicsDetectionJob"
  1431. // DescribeTopicsDetectionJobRequest generates a "aws/request.Request" representing the
  1432. // client's request for the DescribeTopicsDetectionJob operation. The "output" return
  1433. // value will be populated with the request's response once the request completes
  1434. // successfully.
  1435. //
  1436. // Use "Send" method on the returned Request to send the API call to the service.
  1437. // the "output" return value is not valid until after Send returns without error.
  1438. //
  1439. // See DescribeTopicsDetectionJob for more information on using the DescribeTopicsDetectionJob
  1440. // API call, and error handling.
  1441. //
  1442. // This method is useful when you want to inject custom logic or configuration
  1443. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1444. //
  1445. //
  1446. // // Example sending a request using the DescribeTopicsDetectionJobRequest method.
  1447. // req, resp := client.DescribeTopicsDetectionJobRequest(params)
  1448. //
  1449. // err := req.Send()
  1450. // if err == nil { // resp is now filled
  1451. // fmt.Println(resp)
  1452. // }
  1453. //
  1454. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeTopicsDetectionJob
  1455. func (c *Comprehend) DescribeTopicsDetectionJobRequest(input *DescribeTopicsDetectionJobInput) (req *request.Request, output *DescribeTopicsDetectionJobOutput) {
  1456. op := &request.Operation{
  1457. Name: opDescribeTopicsDetectionJob,
  1458. HTTPMethod: "POST",
  1459. HTTPPath: "/",
  1460. }
  1461. if input == nil {
  1462. input = &DescribeTopicsDetectionJobInput{}
  1463. }
  1464. output = &DescribeTopicsDetectionJobOutput{}
  1465. req = c.newRequest(op, input, output)
  1466. return
  1467. }
  1468. // DescribeTopicsDetectionJob API operation for Amazon Comprehend.
  1469. //
  1470. // Gets the properties associated with a topic detection job. Use this operation
  1471. // to get the status of a detection job.
  1472. //
  1473. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1474. // with awserr.Error's Code and Message methods to get detailed information about
  1475. // the error.
  1476. //
  1477. // See the AWS API reference guide for Amazon Comprehend's
  1478. // API operation DescribeTopicsDetectionJob for usage and error information.
  1479. //
  1480. // Returned Error Codes:
  1481. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1482. // The request is invalid.
  1483. //
  1484. // * ErrCodeJobNotFoundException "JobNotFoundException"
  1485. // The specified job was not found. Check the job ID and try again.
  1486. //
  1487. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1488. // The number of requests exceeds the limit. Resubmit your request later.
  1489. //
  1490. // * ErrCodeInternalServerException "InternalServerException"
  1491. // An internal server error occurred. Retry your request.
  1492. //
  1493. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeTopicsDetectionJob
  1494. func (c *Comprehend) DescribeTopicsDetectionJob(input *DescribeTopicsDetectionJobInput) (*DescribeTopicsDetectionJobOutput, error) {
  1495. req, out := c.DescribeTopicsDetectionJobRequest(input)
  1496. return out, req.Send()
  1497. }
  1498. // DescribeTopicsDetectionJobWithContext is the same as DescribeTopicsDetectionJob with the addition of
  1499. // the ability to pass a context and additional request options.
  1500. //
  1501. // See DescribeTopicsDetectionJob for details on how to use this API operation.
  1502. //
  1503. // The context must be non-nil and will be used for request cancellation. If
  1504. // the context is nil a panic will occur. In the future the SDK may create
  1505. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1506. // for more information on using Contexts.
  1507. func (c *Comprehend) DescribeTopicsDetectionJobWithContext(ctx aws.Context, input *DescribeTopicsDetectionJobInput, opts ...request.Option) (*DescribeTopicsDetectionJobOutput, error) {
  1508. req, out := c.DescribeTopicsDetectionJobRequest(input)
  1509. req.SetContext(ctx)
  1510. req.ApplyOptions(opts...)
  1511. return out, req.Send()
  1512. }
  1513. const opDetectDominantLanguage = "DetectDominantLanguage"
  1514. // DetectDominantLanguageRequest generates a "aws/request.Request" representing the
  1515. // client's request for the DetectDominantLanguage operation. The "output" return
  1516. // value will be populated with the request's response once the request completes
  1517. // successfully.
  1518. //
  1519. // Use "Send" method on the returned Request to send the API call to the service.
  1520. // the "output" return value is not valid until after Send returns without error.
  1521. //
  1522. // See DetectDominantLanguage for more information on using the DetectDominantLanguage
  1523. // API call, and error handling.
  1524. //
  1525. // This method is useful when you want to inject custom logic or configuration
  1526. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1527. //
  1528. //
  1529. // // Example sending a request using the DetectDominantLanguageRequest method.
  1530. // req, resp := client.DetectDominantLanguageRequest(params)
  1531. //
  1532. // err := req.Send()
  1533. // if err == nil { // resp is now filled
  1534. // fmt.Println(resp)
  1535. // }
  1536. //
  1537. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectDominantLanguage
  1538. func (c *Comprehend) DetectDominantLanguageRequest(input *DetectDominantLanguageInput) (req *request.Request, output *DetectDominantLanguageOutput) {
  1539. op := &request.Operation{
  1540. Name: opDetectDominantLanguage,
  1541. HTTPMethod: "POST",
  1542. HTTPPath: "/",
  1543. }
  1544. if input == nil {
  1545. input = &DetectDominantLanguageInput{}
  1546. }
  1547. output = &DetectDominantLanguageOutput{}
  1548. req = c.newRequest(op, input, output)
  1549. return
  1550. }
  1551. // DetectDominantLanguage API operation for Amazon Comprehend.
  1552. //
  1553. // Determines the dominant language of the input text. For a list of languages
  1554. // that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages
  1555. // (http://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html).
  1556. //
  1557. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1558. // with awserr.Error's Code and Message methods to get detailed information about
  1559. // the error.
  1560. //
  1561. // See the AWS API reference guide for Amazon Comprehend's
  1562. // API operation DetectDominantLanguage for usage and error information.
  1563. //
  1564. // Returned Error Codes:
  1565. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1566. // The request is invalid.
  1567. //
  1568. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  1569. // The size of the input text exceeds the limit. Use a smaller document.
  1570. //
  1571. // * ErrCodeInternalServerException "InternalServerException"
  1572. // An internal server error occurred. Retry your request.
  1573. //
  1574. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectDominantLanguage
  1575. func (c *Comprehend) DetectDominantLanguage(input *DetectDominantLanguageInput) (*DetectDominantLanguageOutput, error) {
  1576. req, out := c.DetectDominantLanguageRequest(input)
  1577. return out, req.Send()
  1578. }
  1579. // DetectDominantLanguageWithContext is the same as DetectDominantLanguage with the addition of
  1580. // the ability to pass a context and additional request options.
  1581. //
  1582. // See DetectDominantLanguage for details on how to use this API operation.
  1583. //
  1584. // The context must be non-nil and will be used for request cancellation. If
  1585. // the context is nil a panic will occur. In the future the SDK may create
  1586. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1587. // for more information on using Contexts.
  1588. func (c *Comprehend) DetectDominantLanguageWithContext(ctx aws.Context, input *DetectDominantLanguageInput, opts ...request.Option) (*DetectDominantLanguageOutput, error) {
  1589. req, out := c.DetectDominantLanguageRequest(input)
  1590. req.SetContext(ctx)
  1591. req.ApplyOptions(opts...)
  1592. return out, req.Send()
  1593. }
  1594. const opDetectEntities = "DetectEntities"
  1595. // DetectEntitiesRequest generates a "aws/request.Request" representing the
  1596. // client's request for the DetectEntities operation. The "output" return
  1597. // value will be populated with the request's response once the request completes
  1598. // successfully.
  1599. //
  1600. // Use "Send" method on the returned Request to send the API call to the service.
  1601. // the "output" return value is not valid until after Send returns without error.
  1602. //
  1603. // See DetectEntities for more information on using the DetectEntities
  1604. // API call, and error handling.
  1605. //
  1606. // This method is useful when you want to inject custom logic or configuration
  1607. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1608. //
  1609. //
  1610. // // Example sending a request using the DetectEntitiesRequest method.
  1611. // req, resp := client.DetectEntitiesRequest(params)
  1612. //
  1613. // err := req.Send()
  1614. // if err == nil { // resp is now filled
  1615. // fmt.Println(resp)
  1616. // }
  1617. //
  1618. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectEntities
  1619. func (c *Comprehend) DetectEntitiesRequest(input *DetectEntitiesInput) (req *request.Request, output *DetectEntitiesOutput) {
  1620. op := &request.Operation{
  1621. Name: opDetectEntities,
  1622. HTTPMethod: "POST",
  1623. HTTPPath: "/",
  1624. }
  1625. if input == nil {
  1626. input = &DetectEntitiesInput{}
  1627. }
  1628. output = &DetectEntitiesOutput{}
  1629. req = c.newRequest(op, input, output)
  1630. return
  1631. }
  1632. // DetectEntities API operation for Amazon Comprehend.
  1633. //
  1634. // Inspects text for named entities, and returns information about them. For
  1635. // more information, about named entities, see how-entities.
  1636. //
  1637. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1638. // with awserr.Error's Code and Message methods to get detailed information about
  1639. // the error.
  1640. //
  1641. // See the AWS API reference guide for Amazon Comprehend's
  1642. // API operation DetectEntities for usage and error information.
  1643. //
  1644. // Returned Error Codes:
  1645. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1646. // The request is invalid.
  1647. //
  1648. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  1649. // The size of the input text exceeds the limit. Use a smaller document.
  1650. //
  1651. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  1652. // Amazon Comprehend can't process the language of the input text. For all custom
  1653. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  1654. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  1655. // Spanish text.
  1656. //
  1657. // * ErrCodeInternalServerException "InternalServerException"
  1658. // An internal server error occurred. Retry your request.
  1659. //
  1660. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectEntities
  1661. func (c *Comprehend) DetectEntities(input *DetectEntitiesInput) (*DetectEntitiesOutput, error) {
  1662. req, out := c.DetectEntitiesRequest(input)
  1663. return out, req.Send()
  1664. }
  1665. // DetectEntitiesWithContext is the same as DetectEntities with the addition of
  1666. // the ability to pass a context and additional request options.
  1667. //
  1668. // See DetectEntities for details on how to use this API operation.
  1669. //
  1670. // The context must be non-nil and will be used for request cancellation. If
  1671. // the context is nil a panic will occur. In the future the SDK may create
  1672. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1673. // for more information on using Contexts.
  1674. func (c *Comprehend) DetectEntitiesWithContext(ctx aws.Context, input *DetectEntitiesInput, opts ...request.Option) (*DetectEntitiesOutput, error) {
  1675. req, out := c.DetectEntitiesRequest(input)
  1676. req.SetContext(ctx)
  1677. req.ApplyOptions(opts...)
  1678. return out, req.Send()
  1679. }
  1680. const opDetectKeyPhrases = "DetectKeyPhrases"
  1681. // DetectKeyPhrasesRequest generates a "aws/request.Request" representing the
  1682. // client's request for the DetectKeyPhrases operation. The "output" return
  1683. // value will be populated with the request's response once the request completes
  1684. // successfully.
  1685. //
  1686. // Use "Send" method on the returned Request to send the API call to the service.
  1687. // the "output" return value is not valid until after Send returns without error.
  1688. //
  1689. // See DetectKeyPhrases for more information on using the DetectKeyPhrases
  1690. // API call, and error handling.
  1691. //
  1692. // This method is useful when you want to inject custom logic or configuration
  1693. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1694. //
  1695. //
  1696. // // Example sending a request using the DetectKeyPhrasesRequest method.
  1697. // req, resp := client.DetectKeyPhrasesRequest(params)
  1698. //
  1699. // err := req.Send()
  1700. // if err == nil { // resp is now filled
  1701. // fmt.Println(resp)
  1702. // }
  1703. //
  1704. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectKeyPhrases
  1705. func (c *Comprehend) DetectKeyPhrasesRequest(input *DetectKeyPhrasesInput) (req *request.Request, output *DetectKeyPhrasesOutput) {
  1706. op := &request.Operation{
  1707. Name: opDetectKeyPhrases,
  1708. HTTPMethod: "POST",
  1709. HTTPPath: "/",
  1710. }
  1711. if input == nil {
  1712. input = &DetectKeyPhrasesInput{}
  1713. }
  1714. output = &DetectKeyPhrasesOutput{}
  1715. req = c.newRequest(op, input, output)
  1716. return
  1717. }
  1718. // DetectKeyPhrases API operation for Amazon Comprehend.
  1719. //
  1720. // Detects the key noun phrases found in the text.
  1721. //
  1722. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1723. // with awserr.Error's Code and Message methods to get detailed information about
  1724. // the error.
  1725. //
  1726. // See the AWS API reference guide for Amazon Comprehend's
  1727. // API operation DetectKeyPhrases for usage and error information.
  1728. //
  1729. // Returned Error Codes:
  1730. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1731. // The request is invalid.
  1732. //
  1733. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  1734. // The size of the input text exceeds the limit. Use a smaller document.
  1735. //
  1736. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  1737. // Amazon Comprehend can't process the language of the input text. For all custom
  1738. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  1739. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  1740. // Spanish text.
  1741. //
  1742. // * ErrCodeInternalServerException "InternalServerException"
  1743. // An internal server error occurred. Retry your request.
  1744. //
  1745. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectKeyPhrases
  1746. func (c *Comprehend) DetectKeyPhrases(input *DetectKeyPhrasesInput) (*DetectKeyPhrasesOutput, error) {
  1747. req, out := c.DetectKeyPhrasesRequest(input)
  1748. return out, req.Send()
  1749. }
  1750. // DetectKeyPhrasesWithContext is the same as DetectKeyPhrases with the addition of
  1751. // the ability to pass a context and additional request options.
  1752. //
  1753. // See DetectKeyPhrases for details on how to use this API operation.
  1754. //
  1755. // The context must be non-nil and will be used for request cancellation. If
  1756. // the context is nil a panic will occur. In the future the SDK may create
  1757. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1758. // for more information on using Contexts.
  1759. func (c *Comprehend) DetectKeyPhrasesWithContext(ctx aws.Context, input *DetectKeyPhrasesInput, opts ...request.Option) (*DetectKeyPhrasesOutput, error) {
  1760. req, out := c.DetectKeyPhrasesRequest(input)
  1761. req.SetContext(ctx)
  1762. req.ApplyOptions(opts...)
  1763. return out, req.Send()
  1764. }
  1765. const opDetectSentiment = "DetectSentiment"
  1766. // DetectSentimentRequest generates a "aws/request.Request" representing the
  1767. // client's request for the DetectSentiment operation. The "output" return
  1768. // value will be populated with the request's response once the request completes
  1769. // successfully.
  1770. //
  1771. // Use "Send" method on the returned Request to send the API call to the service.
  1772. // the "output" return value is not valid until after Send returns without error.
  1773. //
  1774. // See DetectSentiment for more information on using the DetectSentiment
  1775. // API call, and error handling.
  1776. //
  1777. // This method is useful when you want to inject custom logic or configuration
  1778. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1779. //
  1780. //
  1781. // // Example sending a request using the DetectSentimentRequest method.
  1782. // req, resp := client.DetectSentimentRequest(params)
  1783. //
  1784. // err := req.Send()
  1785. // if err == nil { // resp is now filled
  1786. // fmt.Println(resp)
  1787. // }
  1788. //
  1789. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSentiment
  1790. func (c *Comprehend) DetectSentimentRequest(input *DetectSentimentInput) (req *request.Request, output *DetectSentimentOutput) {
  1791. op := &request.Operation{
  1792. Name: opDetectSentiment,
  1793. HTTPMethod: "POST",
  1794. HTTPPath: "/",
  1795. }
  1796. if input == nil {
  1797. input = &DetectSentimentInput{}
  1798. }
  1799. output = &DetectSentimentOutput{}
  1800. req = c.newRequest(op, input, output)
  1801. return
  1802. }
  1803. // DetectSentiment API operation for Amazon Comprehend.
  1804. //
  1805. // Inspects text and returns an inference of the prevailing sentiment (POSITIVE,
  1806. // NEUTRAL, MIXED, or NEGATIVE).
  1807. //
  1808. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1809. // with awserr.Error's Code and Message methods to get detailed information about
  1810. // the error.
  1811. //
  1812. // See the AWS API reference guide for Amazon Comprehend's
  1813. // API operation DetectSentiment for usage and error information.
  1814. //
  1815. // Returned Error Codes:
  1816. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1817. // The request is invalid.
  1818. //
  1819. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  1820. // The size of the input text exceeds the limit. Use a smaller document.
  1821. //
  1822. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  1823. // Amazon Comprehend can't process the language of the input text. For all custom
  1824. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  1825. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  1826. // Spanish text.
  1827. //
  1828. // * ErrCodeInternalServerException "InternalServerException"
  1829. // An internal server error occurred. Retry your request.
  1830. //
  1831. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSentiment
  1832. func (c *Comprehend) DetectSentiment(input *DetectSentimentInput) (*DetectSentimentOutput, error) {
  1833. req, out := c.DetectSentimentRequest(input)
  1834. return out, req.Send()
  1835. }
  1836. // DetectSentimentWithContext is the same as DetectSentiment with the addition of
  1837. // the ability to pass a context and additional request options.
  1838. //
  1839. // See DetectSentiment for details on how to use this API operation.
  1840. //
  1841. // The context must be non-nil and will be used for request cancellation. If
  1842. // the context is nil a panic will occur. In the future the SDK may create
  1843. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1844. // for more information on using Contexts.
  1845. func (c *Comprehend) DetectSentimentWithContext(ctx aws.Context, input *DetectSentimentInput, opts ...request.Option) (*DetectSentimentOutput, error) {
  1846. req, out := c.DetectSentimentRequest(input)
  1847. req.SetContext(ctx)
  1848. req.ApplyOptions(opts...)
  1849. return out, req.Send()
  1850. }
  1851. const opDetectSyntax = "DetectSyntax"
  1852. // DetectSyntaxRequest generates a "aws/request.Request" representing the
  1853. // client's request for the DetectSyntax operation. The "output" return
  1854. // value will be populated with the request's response once the request completes
  1855. // successfully.
  1856. //
  1857. // Use "Send" method on the returned Request to send the API call to the service.
  1858. // the "output" return value is not valid until after Send returns without error.
  1859. //
  1860. // See DetectSyntax for more information on using the DetectSyntax
  1861. // API call, and error handling.
  1862. //
  1863. // This method is useful when you want to inject custom logic or configuration
  1864. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1865. //
  1866. //
  1867. // // Example sending a request using the DetectSyntaxRequest method.
  1868. // req, resp := client.DetectSyntaxRequest(params)
  1869. //
  1870. // err := req.Send()
  1871. // if err == nil { // resp is now filled
  1872. // fmt.Println(resp)
  1873. // }
  1874. //
  1875. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSyntax
  1876. func (c *Comprehend) DetectSyntaxRequest(input *DetectSyntaxInput) (req *request.Request, output *DetectSyntaxOutput) {
  1877. op := &request.Operation{
  1878. Name: opDetectSyntax,
  1879. HTTPMethod: "POST",
  1880. HTTPPath: "/",
  1881. }
  1882. if input == nil {
  1883. input = &DetectSyntaxInput{}
  1884. }
  1885. output = &DetectSyntaxOutput{}
  1886. req = c.newRequest(op, input, output)
  1887. return
  1888. }
  1889. // DetectSyntax API operation for Amazon Comprehend.
  1890. //
  1891. // Inspects text for syntax and the part of speech of words in the document.
  1892. // For more information, how-syntax.
  1893. //
  1894. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1895. // with awserr.Error's Code and Message methods to get detailed information about
  1896. // the error.
  1897. //
  1898. // See the AWS API reference guide for Amazon Comprehend's
  1899. // API operation DetectSyntax for usage and error information.
  1900. //
  1901. // Returned Error Codes:
  1902. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1903. // The request is invalid.
  1904. //
  1905. // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
  1906. // The size of the input text exceeds the limit. Use a smaller document.
  1907. //
  1908. // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
  1909. // Amazon Comprehend can't process the language of the input text. For all custom
  1910. // entity recognition APIs (such as CreateEntityRecognizer), only English is
  1911. // accepted. For most other APIs, Amazon Comprehend accepts only English or
  1912. // Spanish text.
  1913. //
  1914. // * ErrCodeInternalServerException "InternalServerException"
  1915. // An internal server error occurred. Retry your request.
  1916. //
  1917. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSyntax
  1918. func (c *Comprehend) DetectSyntax(input *DetectSyntaxInput) (*DetectSyntaxOutput, error) {
  1919. req, out := c.DetectSyntaxRequest(input)
  1920. return out, req.Send()
  1921. }
  1922. // DetectSyntaxWithContext is the same as DetectSyntax with the addition of
  1923. // the ability to pass a context and additional request options.
  1924. //
  1925. // See DetectSyntax for details on how to use this API operation.
  1926. //
  1927. // The context must be non-nil and will be used for request cancellation. If
  1928. // the context is nil a panic will occur. In the future the SDK may create
  1929. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1930. // for more information on using Contexts.
  1931. func (c *Comprehend) DetectSyntaxWithContext(ctx aws.Context, input *DetectSyntaxInput, opts ...request.Option) (*DetectSyntaxOutput, error) {
  1932. req, out := c.DetectSyntaxRequest(input)
  1933. req.SetContext(ctx)
  1934. req.ApplyOptions(opts...)
  1935. return out, req.Send()
  1936. }
  1937. const opListDocumentClassificationJobs = "ListDocumentClassificationJobs"
  1938. // ListDocumentClassificationJobsRequest generates a "aws/request.Request" representing the
  1939. // client's request for the ListDocumentClassificationJobs operation. The "output" return
  1940. // value will be populated with the request's response once the request completes
  1941. // successfully.
  1942. //
  1943. // Use "Send" method on the returned Request to send the API call to the service.
  1944. // the "output" return value is not valid until after Send returns without error.
  1945. //
  1946. // See ListDocumentClassificationJobs for more information on using the ListDocumentClassificationJobs
  1947. // API call, and error handling.
  1948. //
  1949. // This method is useful when you want to inject custom logic or configuration
  1950. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1951. //
  1952. //
  1953. // // Example sending a request using the ListDocumentClassificationJobsRequest method.
  1954. // req, resp := client.ListDocumentClassificationJobsRequest(params)
  1955. //
  1956. // err := req.Send()
  1957. // if err == nil { // resp is now filled
  1958. // fmt.Println(resp)
  1959. // }
  1960. //
  1961. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassificationJobs
  1962. func (c *Comprehend) ListDocumentClassificationJobsRequest(input *ListDocumentClassificationJobsInput) (req *request.Request, output *ListDocumentClassificationJobsOutput) {
  1963. op := &request.Operation{
  1964. Name: opListDocumentClassificationJobs,
  1965. HTTPMethod: "POST",
  1966. HTTPPath: "/",
  1967. }
  1968. if input == nil {
  1969. input = &ListDocumentClassificationJobsInput{}
  1970. }
  1971. output = &ListDocumentClassificationJobsOutput{}
  1972. req = c.newRequest(op, input, output)
  1973. return
  1974. }
  1975. // ListDocumentClassificationJobs API operation for Amazon Comprehend.
  1976. //
  1977. // Gets a list of the documentation classification jobs that you have submitted.
  1978. //
  1979. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1980. // with awserr.Error's Code and Message methods to get detailed information about
  1981. // the error.
  1982. //
  1983. // See the AWS API reference guide for Amazon Comprehend's
  1984. // API operation ListDocumentClassificationJobs for usage and error information.
  1985. //
  1986. // Returned Error Codes:
  1987. // * ErrCodeInvalidRequestException "InvalidRequestException"
  1988. // The request is invalid.
  1989. //
  1990. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1991. // The number of requests exceeds the limit. Resubmit your request later.
  1992. //
  1993. // * ErrCodeInvalidFilterException "InvalidFilterException"
  1994. // The filter specified for the ListDocumentClassificationJobs operation is
  1995. // invalid. Specify a different filter.
  1996. //
  1997. // * ErrCodeInternalServerException "InternalServerException"
  1998. // An internal server error occurred. Retry your request.
  1999. //
  2000. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassificationJobs
  2001. func (c *Comprehend) ListDocumentClassificationJobs(input *ListDocumentClassificationJobsInput) (*ListDocumentClassificationJobsOutput, error) {
  2002. req, out := c.ListDocumentClassificationJobsRequest(input)
  2003. return out, req.Send()
  2004. }
  2005. // ListDocumentClassificationJobsWithContext is the same as ListDocumentClassificationJobs with the addition of
  2006. // the ability to pass a context and additional request options.
  2007. //
  2008. // See ListDocumentClassificationJobs for details on how to use this API operation.
  2009. //
  2010. // The context must be non-nil and will be used for request cancellation. If
  2011. // the context is nil a panic will occur. In the future the SDK may create
  2012. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2013. // for more information on using Contexts.
  2014. func (c *Comprehend) ListDocumentClassificationJobsWithContext(ctx aws.Context, input *ListDocumentClassificationJobsInput, opts ...request.Option) (*ListDocumentClassificationJobsOutput, error) {
  2015. req, out := c.ListDocumentClassificationJobsRequest(input)
  2016. req.SetContext(ctx)
  2017. req.ApplyOptions(opts...)
  2018. return out, req.Send()
  2019. }
  2020. const opListDocumentClassifiers = "ListDocumentClassifiers"
  2021. // ListDocumentClassifiersRequest generates a "aws/request.Request" representing the
  2022. // client's request for the ListDocumentClassifiers operation. The "output" return
  2023. // value will be populated with the request's response once the request completes
  2024. // successfully.
  2025. //
  2026. // Use "Send" method on the returned Request to send the API call to the service.
  2027. // the "output" return value is not valid until after Send returns without error.
  2028. //
  2029. // See ListDocumentClassifiers for more information on using the ListDocumentClassifiers
  2030. // API call, and error handling.
  2031. //
  2032. // This method is useful when you want to inject custom logic or configuration
  2033. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2034. //
  2035. //
  2036. // // Example sending a request using the ListDocumentClassifiersRequest method.
  2037. // req, resp := client.ListDocumentClassifiersRequest(params)
  2038. //
  2039. // err := req.Send()
  2040. // if err == nil { // resp is now filled
  2041. // fmt.Println(resp)
  2042. // }
  2043. //
  2044. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers
  2045. func (c *Comprehend) ListDocumentClassifiersRequest(input *ListDocumentClassifiersInput) (req *request.Request, output *ListDocumentClassifiersOutput) {
  2046. op := &request.Operation{
  2047. Name: opListDocumentClassifiers,
  2048. HTTPMethod: "POST",
  2049. HTTPPath: "/",
  2050. }
  2051. if input == nil {
  2052. input = &ListDocumentClassifiersInput{}
  2053. }
  2054. output = &ListDocumentClassifiersOutput{}
  2055. req = c.newRequest(op, input, output)
  2056. return
  2057. }
  2058. // ListDocumentClassifiers API operation for Amazon Comprehend.
  2059. //
  2060. // Gets a list of the document classifiers that you have created.
  2061. //
  2062. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2063. // with awserr.Error's Code and Message methods to get detailed information about
  2064. // the error.
  2065. //
  2066. // See the AWS API reference guide for Amazon Comprehend's
  2067. // API operation ListDocumentClassifiers for usage and error information.
  2068. //
  2069. // Returned Error Codes:
  2070. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2071. // The request is invalid.
  2072. //
  2073. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2074. // The number of requests exceeds the limit. Resubmit your request later.
  2075. //
  2076. // * ErrCodeInvalidFilterException "InvalidFilterException"
  2077. // The filter specified for the ListDocumentClassificationJobs operation is
  2078. // invalid. Specify a different filter.
  2079. //
  2080. // * ErrCodeInternalServerException "InternalServerException"
  2081. // An internal server error occurred. Retry your request.
  2082. //
  2083. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers
  2084. func (c *Comprehend) ListDocumentClassifiers(input *ListDocumentClassifiersInput) (*ListDocumentClassifiersOutput, error) {
  2085. req, out := c.ListDocumentClassifiersRequest(input)
  2086. return out, req.Send()
  2087. }
  2088. // ListDocumentClassifiersWithContext is the same as ListDocumentClassifiers with the addition of
  2089. // the ability to pass a context and additional request options.
  2090. //
  2091. // See ListDocumentClassifiers for details on how to use this API operation.
  2092. //
  2093. // The context must be non-nil and will be used for request cancellation. If
  2094. // the context is nil a panic will occur. In the future the SDK may create
  2095. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2096. // for more information on using Contexts.
  2097. func (c *Comprehend) ListDocumentClassifiersWithContext(ctx aws.Context, input *ListDocumentClassifiersInput, opts ...request.Option) (*ListDocumentClassifiersOutput, error) {
  2098. req, out := c.ListDocumentClassifiersRequest(input)
  2099. req.SetContext(ctx)
  2100. req.ApplyOptions(opts...)
  2101. return out, req.Send()
  2102. }
  2103. const opListDominantLanguageDetectionJobs = "ListDominantLanguageDetectionJobs"
  2104. // ListDominantLanguageDetectionJobsRequest generates a "aws/request.Request" representing the
  2105. // client's request for the ListDominantLanguageDetectionJobs operation. The "output" return
  2106. // value will be populated with the request's response once the request completes
  2107. // successfully.
  2108. //
  2109. // Use "Send" method on the returned Request to send the API call to the service.
  2110. // the "output" return value is not valid until after Send returns without error.
  2111. //
  2112. // See ListDominantLanguageDetectionJobs for more information on using the ListDominantLanguageDetectionJobs
  2113. // API call, and error handling.
  2114. //
  2115. // This method is useful when you want to inject custom logic or configuration
  2116. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2117. //
  2118. //
  2119. // // Example sending a request using the ListDominantLanguageDetectionJobsRequest method.
  2120. // req, resp := client.ListDominantLanguageDetectionJobsRequest(params)
  2121. //
  2122. // err := req.Send()
  2123. // if err == nil { // resp is now filled
  2124. // fmt.Println(resp)
  2125. // }
  2126. //
  2127. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDominantLanguageDetectionJobs
  2128. func (c *Comprehend) ListDominantLanguageDetectionJobsRequest(input *ListDominantLanguageDetectionJobsInput) (req *request.Request, output *ListDominantLanguageDetectionJobsOutput) {
  2129. op := &request.Operation{
  2130. Name: opListDominantLanguageDetectionJobs,
  2131. HTTPMethod: "POST",
  2132. HTTPPath: "/",
  2133. Paginator: &request.Paginator{
  2134. InputTokens: []string{"NextToken"},
  2135. OutputTokens: []string{"NextToken"},
  2136. LimitToken: "MaxResults",
  2137. TruncationToken: "",
  2138. },
  2139. }
  2140. if input == nil {
  2141. input = &ListDominantLanguageDetectionJobsInput{}
  2142. }
  2143. output = &ListDominantLanguageDetectionJobsOutput{}
  2144. req = c.newRequest(op, input, output)
  2145. return
  2146. }
  2147. // ListDominantLanguageDetectionJobs API operation for Amazon Comprehend.
  2148. //
  2149. // Gets a list of the dominant language detection jobs that you have submitted.
  2150. //
  2151. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2152. // with awserr.Error's Code and Message methods to get detailed information about
  2153. // the error.
  2154. //
  2155. // See the AWS API reference guide for Amazon Comprehend's
  2156. // API operation ListDominantLanguageDetectionJobs for usage and error information.
  2157. //
  2158. // Returned Error Codes:
  2159. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2160. // The request is invalid.
  2161. //
  2162. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2163. // The number of requests exceeds the limit. Resubmit your request later.
  2164. //
  2165. // * ErrCodeInvalidFilterException "InvalidFilterException"
  2166. // The filter specified for the ListDocumentClassificationJobs operation is
  2167. // invalid. Specify a different filter.
  2168. //
  2169. // * ErrCodeInternalServerException "InternalServerException"
  2170. // An internal server error occurred. Retry your request.
  2171. //
  2172. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDominantLanguageDetectionJobs
  2173. func (c *Comprehend) ListDominantLanguageDetectionJobs(input *ListDominantLanguageDetectionJobsInput) (*ListDominantLanguageDetectionJobsOutput, error) {
  2174. req, out := c.ListDominantLanguageDetectionJobsRequest(input)
  2175. return out, req.Send()
  2176. }
  2177. // ListDominantLanguageDetectionJobsWithContext is the same as ListDominantLanguageDetectionJobs with the addition of
  2178. // the ability to pass a context and additional request options.
  2179. //
  2180. // See ListDominantLanguageDetectionJobs for details on how to use this API operation.
  2181. //
  2182. // The context must be non-nil and will be used for request cancellation. If
  2183. // the context is nil a panic will occur. In the future the SDK may create
  2184. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2185. // for more information on using Contexts.
  2186. func (c *Comprehend) ListDominantLanguageDetectionJobsWithContext(ctx aws.Context, input *ListDominantLanguageDetectionJobsInput, opts ...request.Option) (*ListDominantLanguageDetectionJobsOutput, error) {
  2187. req, out := c.ListDominantLanguageDetectionJobsRequest(input)
  2188. req.SetContext(ctx)
  2189. req.ApplyOptions(opts...)
  2190. return out, req.Send()
  2191. }
  2192. // ListDominantLanguageDetectionJobsPages iterates over the pages of a ListDominantLanguageDetectionJobs operation,
  2193. // calling the "fn" function with the response data for each page. To stop
  2194. // iterating, return false from the fn function.
  2195. //
  2196. // See ListDominantLanguageDetectionJobs method for more information on how to use this operation.
  2197. //
  2198. // Note: This operation can generate multiple requests to a service.
  2199. //
  2200. // // Example iterating over at most 3 pages of a ListDominantLanguageDetectionJobs operation.
  2201. // pageNum := 0
  2202. // err := client.ListDominantLanguageDetectionJobsPages(params,
  2203. // func(page *ListDominantLanguageDetectionJobsOutput, lastPage bool) bool {
  2204. // pageNum++
  2205. // fmt.Println(page)
  2206. // return pageNum <= 3
  2207. // })
  2208. //
  2209. func (c *Comprehend) ListDominantLanguageDetectionJobsPages(input *ListDominantLanguageDetectionJobsInput, fn func(*ListDominantLanguageDetectionJobsOutput, bool) bool) error {
  2210. return c.ListDominantLanguageDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
  2211. }
  2212. // ListDominantLanguageDetectionJobsPagesWithContext same as ListDominantLanguageDetectionJobsPages except
  2213. // it takes a Context and allows setting request options on the pages.
  2214. //
  2215. // The context must be non-nil and will be used for request cancellation. If
  2216. // the context is nil a panic will occur. In the future the SDK may create
  2217. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2218. // for more information on using Contexts.
  2219. func (c *Comprehend) ListDominantLanguageDetectionJobsPagesWithContext(ctx aws.Context, input *ListDominantLanguageDetectionJobsInput, fn func(*ListDominantLanguageDetectionJobsOutput, bool) bool, opts ...request.Option) error {
  2220. p := request.Pagination{
  2221. NewRequest: func() (*request.Request, error) {
  2222. var inCpy *ListDominantLanguageDetectionJobsInput
  2223. if input != nil {
  2224. tmp := *input
  2225. inCpy = &tmp
  2226. }
  2227. req, _ := c.ListDominantLanguageDetectionJobsRequest(inCpy)
  2228. req.SetContext(ctx)
  2229. req.ApplyOptions(opts...)
  2230. return req, nil
  2231. },
  2232. }
  2233. cont := true
  2234. for p.Next() && cont {
  2235. cont = fn(p.Page().(*ListDominantLanguageDetectionJobsOutput), !p.HasNextPage())
  2236. }
  2237. return p.Err()
  2238. }
  2239. const opListEntitiesDetectionJobs = "ListEntitiesDetectionJobs"
  2240. // ListEntitiesDetectionJobsRequest generates a "aws/request.Request" representing the
  2241. // client's request for the ListEntitiesDetectionJobs operation. The "output" return
  2242. // value will be populated with the request's response once the request completes
  2243. // successfully.
  2244. //
  2245. // Use "Send" method on the returned Request to send the API call to the service.
  2246. // the "output" return value is not valid until after Send returns without error.
  2247. //
  2248. // See ListEntitiesDetectionJobs for more information on using the ListEntitiesDetectionJobs
  2249. // API call, and error handling.
  2250. //
  2251. // This method is useful when you want to inject custom logic or configuration
  2252. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2253. //
  2254. //
  2255. // // Example sending a request using the ListEntitiesDetectionJobsRequest method.
  2256. // req, resp := client.ListEntitiesDetectionJobsRequest(params)
  2257. //
  2258. // err := req.Send()
  2259. // if err == nil { // resp is now filled
  2260. // fmt.Println(resp)
  2261. // }
  2262. //
  2263. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntitiesDetectionJobs
  2264. func (c *Comprehend) ListEntitiesDetectionJobsRequest(input *ListEntitiesDetectionJobsInput) (req *request.Request, output *ListEntitiesDetectionJobsOutput) {
  2265. op := &request.Operation{
  2266. Name: opListEntitiesDetectionJobs,
  2267. HTTPMethod: "POST",
  2268. HTTPPath: "/",
  2269. Paginator: &request.Paginator{
  2270. InputTokens: []string{"NextToken"},
  2271. OutputTokens: []string{"NextToken"},
  2272. LimitToken: "MaxResults",
  2273. TruncationToken: "",
  2274. },
  2275. }
  2276. if input == nil {
  2277. input = &ListEntitiesDetectionJobsInput{}
  2278. }
  2279. output = &ListEntitiesDetectionJobsOutput{}
  2280. req = c.newRequest(op, input, output)
  2281. return
  2282. }
  2283. // ListEntitiesDetectionJobs API operation for Amazon Comprehend.
  2284. //
  2285. // Gets a list of the entity detection jobs that you have submitted.
  2286. //
  2287. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2288. // with awserr.Error's Code and Message methods to get detailed information about
  2289. // the error.
  2290. //
  2291. // See the AWS API reference guide for Amazon Comprehend's
  2292. // API operation ListEntitiesDetectionJobs for usage and error information.
  2293. //
  2294. // Returned Error Codes:
  2295. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2296. // The request is invalid.
  2297. //
  2298. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2299. // The number of requests exceeds the limit. Resubmit your request later.
  2300. //
  2301. // * ErrCodeInvalidFilterException "InvalidFilterException"
  2302. // The filter specified for the ListDocumentClassificationJobs operation is
  2303. // invalid. Specify a different filter.
  2304. //
  2305. // * ErrCodeInternalServerException "InternalServerException"
  2306. // An internal server error occurred. Retry your request.
  2307. //
  2308. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntitiesDetectionJobs
  2309. func (c *Comprehend) ListEntitiesDetectionJobs(input *ListEntitiesDetectionJobsInput) (*ListEntitiesDetectionJobsOutput, error) {
  2310. req, out := c.ListEntitiesDetectionJobsRequest(input)
  2311. return out, req.Send()
  2312. }
  2313. // ListEntitiesDetectionJobsWithContext is the same as ListEntitiesDetectionJobs with the addition of
  2314. // the ability to pass a context and additional request options.
  2315. //
  2316. // See ListEntitiesDetectionJobs for details on how to use this API operation.
  2317. //
  2318. // The context must be non-nil and will be used for request cancellation. If
  2319. // the context is nil a panic will occur. In the future the SDK may create
  2320. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2321. // for more information on using Contexts.
  2322. func (c *Comprehend) ListEntitiesDetectionJobsWithContext(ctx aws.Context, input *ListEntitiesDetectionJobsInput, opts ...request.Option) (*ListEntitiesDetectionJobsOutput, error) {
  2323. req, out := c.ListEntitiesDetectionJobsRequest(input)
  2324. req.SetContext(ctx)
  2325. req.ApplyOptions(opts...)
  2326. return out, req.Send()
  2327. }
  2328. // ListEntitiesDetectionJobsPages iterates over the pages of a ListEntitiesDetectionJobs operation,
  2329. // calling the "fn" function with the response data for each page. To stop
  2330. // iterating, return false from the fn function.
  2331. //
  2332. // See ListEntitiesDetectionJobs method for more information on how to use this operation.
  2333. //
  2334. // Note: This operation can generate multiple requests to a service.
  2335. //
  2336. // // Example iterating over at most 3 pages of a ListEntitiesDetectionJobs operation.
  2337. // pageNum := 0
  2338. // err := client.ListEntitiesDetectionJobsPages(params,
  2339. // func(page *ListEntitiesDetectionJobsOutput, lastPage bool) bool {
  2340. // pageNum++
  2341. // fmt.Println(page)
  2342. // return pageNum <= 3
  2343. // })
  2344. //
  2345. func (c *Comprehend) ListEntitiesDetectionJobsPages(input *ListEntitiesDetectionJobsInput, fn func(*ListEntitiesDetectionJobsOutput, bool) bool) error {
  2346. return c.ListEntitiesDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
  2347. }
  2348. // ListEntitiesDetectionJobsPagesWithContext same as ListEntitiesDetectionJobsPages except
  2349. // it takes a Context and allows setting request options on the pages.
  2350. //
  2351. // The context must be non-nil and will be used for request cancellation. If
  2352. // the context is nil a panic will occur. In the future the SDK may create
  2353. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2354. // for more information on using Contexts.
  2355. func (c *Comprehend) ListEntitiesDetectionJobsPagesWithContext(ctx aws.Context, input *ListEntitiesDetectionJobsInput, fn func(*ListEntitiesDetectionJobsOutput, bool) bool, opts ...request.Option) error {
  2356. p := request.Pagination{
  2357. NewRequest: func() (*request.Request, error) {
  2358. var inCpy *ListEntitiesDetectionJobsInput
  2359. if input != nil {
  2360. tmp := *input
  2361. inCpy = &tmp
  2362. }
  2363. req, _ := c.ListEntitiesDetectionJobsRequest(inCpy)
  2364. req.SetContext(ctx)
  2365. req.ApplyOptions(opts...)
  2366. return req, nil
  2367. },
  2368. }
  2369. cont := true
  2370. for p.Next() && cont {
  2371. cont = fn(p.Page().(*ListEntitiesDetectionJobsOutput), !p.HasNextPage())
  2372. }
  2373. return p.Err()
  2374. }
  2375. const opListEntityRecognizers = "ListEntityRecognizers"
  2376. // ListEntityRecognizersRequest generates a "aws/request.Request" representing the
  2377. // client's request for the ListEntityRecognizers operation. The "output" return
  2378. // value will be populated with the request's response once the request completes
  2379. // successfully.
  2380. //
  2381. // Use "Send" method on the returned Request to send the API call to the service.
  2382. // the "output" return value is not valid until after Send returns without error.
  2383. //
  2384. // See ListEntityRecognizers for more information on using the ListEntityRecognizers
  2385. // API call, and error handling.
  2386. //
  2387. // This method is useful when you want to inject custom logic or configuration
  2388. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2389. //
  2390. //
  2391. // // Example sending a request using the ListEntityRecognizersRequest method.
  2392. // req, resp := client.ListEntityRecognizersRequest(params)
  2393. //
  2394. // err := req.Send()
  2395. // if err == nil { // resp is now filled
  2396. // fmt.Println(resp)
  2397. // }
  2398. //
  2399. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers
  2400. func (c *Comprehend) ListEntityRecognizersRequest(input *ListEntityRecognizersInput) (req *request.Request, output *ListEntityRecognizersOutput) {
  2401. op := &request.Operation{
  2402. Name: opListEntityRecognizers,
  2403. HTTPMethod: "POST",
  2404. HTTPPath: "/",
  2405. }
  2406. if input == nil {
  2407. input = &ListEntityRecognizersInput{}
  2408. }
  2409. output = &ListEntityRecognizersOutput{}
  2410. req = c.newRequest(op, input, output)
  2411. return
  2412. }
  2413. // ListEntityRecognizers API operation for Amazon Comprehend.
  2414. //
  2415. // Gets a list of the properties of all entity recognizers that you created,
  2416. // including recognizers currently in training. Allows you to filter the list
  2417. // of recognizers based on criteria such as status and submission time. This
  2418. // call returns up to 500 entity recognizers in the list, with a default number
  2419. // of 100 recognizers in the list.
  2420. //
  2421. // The results of this list are not in any particular order. Please get the
  2422. // list and sort locally if needed.
  2423. //
  2424. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2425. // with awserr.Error's Code and Message methods to get detailed information about
  2426. // the error.
  2427. //
  2428. // See the AWS API reference guide for Amazon Comprehend's
  2429. // API operation ListEntityRecognizers for usage and error information.
  2430. //
  2431. // Returned Error Codes:
  2432. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2433. // The request is invalid.
  2434. //
  2435. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2436. // The number of requests exceeds the limit. Resubmit your request later.
  2437. //
  2438. // * ErrCodeInvalidFilterException "InvalidFilterException"
  2439. // The filter specified for the ListDocumentClassificationJobs operation is
  2440. // invalid. Specify a different filter.
  2441. //
  2442. // * ErrCodeInternalServerException "InternalServerException"
  2443. // An internal server error occurred. Retry your request.
  2444. //
  2445. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers
  2446. func (c *Comprehend) ListEntityRecognizers(input *ListEntityRecognizersInput) (*ListEntityRecognizersOutput, error) {
  2447. req, out := c.ListEntityRecognizersRequest(input)
  2448. return out, req.Send()
  2449. }
  2450. // ListEntityRecognizersWithContext is the same as ListEntityRecognizers with the addition of
  2451. // the ability to pass a context and additional request options.
  2452. //
  2453. // See ListEntityRecognizers for details on how to use this API operation.
  2454. //
  2455. // The context must be non-nil and will be used for request cancellation. If
  2456. // the context is nil a panic will occur. In the future the SDK may create
  2457. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2458. // for more information on using Contexts.
  2459. func (c *Comprehend) ListEntityRecognizersWithContext(ctx aws.Context, input *ListEntityRecognizersInput, opts ...request.Option) (*ListEntityRecognizersOutput, error) {
  2460. req, out := c.ListEntityRecognizersRequest(input)
  2461. req.SetContext(ctx)
  2462. req.ApplyOptions(opts...)
  2463. return out, req.Send()
  2464. }
  2465. const opListKeyPhrasesDetectionJobs = "ListKeyPhrasesDetectionJobs"
  2466. // ListKeyPhrasesDetectionJobsRequest generates a "aws/request.Request" representing the
  2467. // client's request for the ListKeyPhrasesDetectionJobs operation. The "output" return
  2468. // value will be populated with the request's response once the request completes
  2469. // successfully.
  2470. //
  2471. // Use "Send" method on the returned Request to send the API call to the service.
  2472. // the "output" return value is not valid until after Send returns without error.
  2473. //
  2474. // See ListKeyPhrasesDetectionJobs for more information on using the ListKeyPhrasesDetectionJobs
  2475. // API call, and error handling.
  2476. //
  2477. // This method is useful when you want to inject custom logic or configuration
  2478. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2479. //
  2480. //
  2481. // // Example sending a request using the ListKeyPhrasesDetectionJobsRequest method.
  2482. // req, resp := client.ListKeyPhrasesDetectionJobsRequest(params)
  2483. //
  2484. // err := req.Send()
  2485. // if err == nil { // resp is now filled
  2486. // fmt.Println(resp)
  2487. // }
  2488. //
  2489. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListKeyPhrasesDetectionJobs
  2490. func (c *Comprehend) ListKeyPhrasesDetectionJobsRequest(input *ListKeyPhrasesDetectionJobsInput) (req *request.Request, output *ListKeyPhrasesDetectionJobsOutput) {
  2491. op := &request.Operation{
  2492. Name: opListKeyPhrasesDetectionJobs,
  2493. HTTPMethod: "POST",
  2494. HTTPPath: "/",
  2495. Paginator: &request.Paginator{
  2496. InputTokens: []string{"NextToken"},
  2497. OutputTokens: []string{"NextToken"},
  2498. LimitToken: "MaxResults",
  2499. TruncationToken: "",
  2500. },
  2501. }
  2502. if input == nil {
  2503. input = &ListKeyPhrasesDetectionJobsInput{}
  2504. }
  2505. output = &ListKeyPhrasesDetectionJobsOutput{}
  2506. req = c.newRequest(op, input, output)
  2507. return
  2508. }
  2509. // ListKeyPhrasesDetectionJobs API operation for Amazon Comprehend.
  2510. //
  2511. // Get a list of key phrase detection jobs that you have submitted.
  2512. //
  2513. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2514. // with awserr.Error's Code and Message methods to get detailed information about
  2515. // the error.
  2516. //
  2517. // See the AWS API reference guide for Amazon Comprehend's
  2518. // API operation ListKeyPhrasesDetectionJobs for usage and error information.
  2519. //
  2520. // Returned Error Codes:
  2521. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2522. // The request is invalid.
  2523. //
  2524. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2525. // The number of requests exceeds the limit. Resubmit your request later.
  2526. //
  2527. // * ErrCodeInvalidFilterException "InvalidFilterException"
  2528. // The filter specified for the ListDocumentClassificationJobs operation is
  2529. // invalid. Specify a different filter.
  2530. //
  2531. // * ErrCodeInternalServerException "InternalServerException"
  2532. // An internal server error occurred. Retry your request.
  2533. //
  2534. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListKeyPhrasesDetectionJobs
  2535. func (c *Comprehend) ListKeyPhrasesDetectionJobs(input *ListKeyPhrasesDetectionJobsInput) (*ListKeyPhrasesDetectionJobsOutput, error) {
  2536. req, out := c.ListKeyPhrasesDetectionJobsRequest(input)
  2537. return out, req.Send()
  2538. }
  2539. // ListKeyPhrasesDetectionJobsWithContext is the same as ListKeyPhrasesDetectionJobs with the addition of
  2540. // the ability to pass a context and additional request options.
  2541. //
  2542. // See ListKeyPhrasesDetectionJobs for details on how to use this API operation.
  2543. //
  2544. // The context must be non-nil and will be used for request cancellation. If
  2545. // the context is nil a panic will occur. In the future the SDK may create
  2546. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2547. // for more information on using Contexts.
  2548. func (c *Comprehend) ListKeyPhrasesDetectionJobsWithContext(ctx aws.Context, input *ListKeyPhrasesDetectionJobsInput, opts ...request.Option) (*ListKeyPhrasesDetectionJobsOutput, error) {
  2549. req, out := c.ListKeyPhrasesDetectionJobsRequest(input)
  2550. req.SetContext(ctx)
  2551. req.ApplyOptions(opts...)
  2552. return out, req.Send()
  2553. }
  2554. // ListKeyPhrasesDetectionJobsPages iterates over the pages of a ListKeyPhrasesDetectionJobs operation,
  2555. // calling the "fn" function with the response data for each page. To stop
  2556. // iterating, return false from the fn function.
  2557. //
  2558. // See ListKeyPhrasesDetectionJobs method for more information on how to use this operation.
  2559. //
  2560. // Note: This operation can generate multiple requests to a service.
  2561. //
  2562. // // Example iterating over at most 3 pages of a ListKeyPhrasesDetectionJobs operation.
  2563. // pageNum := 0
  2564. // err := client.ListKeyPhrasesDetectionJobsPages(params,
  2565. // func(page *ListKeyPhrasesDetectionJobsOutput, lastPage bool) bool {
  2566. // pageNum++
  2567. // fmt.Println(page)
  2568. // return pageNum <= 3
  2569. // })
  2570. //
  2571. func (c *Comprehend) ListKeyPhrasesDetectionJobsPages(input *ListKeyPhrasesDetectionJobsInput, fn func(*ListKeyPhrasesDetectionJobsOutput, bool) bool) error {
  2572. return c.ListKeyPhrasesDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
  2573. }
  2574. // ListKeyPhrasesDetectionJobsPagesWithContext same as ListKeyPhrasesDetectionJobsPages except
  2575. // it takes a Context and allows setting request options on the pages.
  2576. //
  2577. // The context must be non-nil and will be used for request cancellation. If
  2578. // the context is nil a panic will occur. In the future the SDK may create
  2579. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2580. // for more information on using Contexts.
  2581. func (c *Comprehend) ListKeyPhrasesDetectionJobsPagesWithContext(ctx aws.Context, input *ListKeyPhrasesDetectionJobsInput, fn func(*ListKeyPhrasesDetectionJobsOutput, bool) bool, opts ...request.Option) error {
  2582. p := request.Pagination{
  2583. NewRequest: func() (*request.Request, error) {
  2584. var inCpy *ListKeyPhrasesDetectionJobsInput
  2585. if input != nil {
  2586. tmp := *input
  2587. inCpy = &tmp
  2588. }
  2589. req, _ := c.ListKeyPhrasesDetectionJobsRequest(inCpy)
  2590. req.SetContext(ctx)
  2591. req.ApplyOptions(opts...)
  2592. return req, nil
  2593. },
  2594. }
  2595. cont := true
  2596. for p.Next() && cont {
  2597. cont = fn(p.Page().(*ListKeyPhrasesDetectionJobsOutput), !p.HasNextPage())
  2598. }
  2599. return p.Err()
  2600. }
  2601. const opListSentimentDetectionJobs = "ListSentimentDetectionJobs"
  2602. // ListSentimentDetectionJobsRequest generates a "aws/request.Request" representing the
  2603. // client's request for the ListSentimentDetectionJobs operation. The "output" return
  2604. // value will be populated with the request's response once the request completes
  2605. // successfully.
  2606. //
  2607. // Use "Send" method on the returned Request to send the API call to the service.
  2608. // the "output" return value is not valid until after Send returns without error.
  2609. //
  2610. // See ListSentimentDetectionJobs for more information on using the ListSentimentDetectionJobs
  2611. // API call, and error handling.
  2612. //
  2613. // This method is useful when you want to inject custom logic or configuration
  2614. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2615. //
  2616. //
  2617. // // Example sending a request using the ListSentimentDetectionJobsRequest method.
  2618. // req, resp := client.ListSentimentDetectionJobsRequest(params)
  2619. //
  2620. // err := req.Send()
  2621. // if err == nil { // resp is now filled
  2622. // fmt.Println(resp)
  2623. // }
  2624. //
  2625. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListSentimentDetectionJobs
  2626. func (c *Comprehend) ListSentimentDetectionJobsRequest(input *ListSentimentDetectionJobsInput) (req *request.Request, output *ListSentimentDetectionJobsOutput) {
  2627. op := &request.Operation{
  2628. Name: opListSentimentDetectionJobs,
  2629. HTTPMethod: "POST",
  2630. HTTPPath: "/",
  2631. Paginator: &request.Paginator{
  2632. InputTokens: []string{"NextToken"},
  2633. OutputTokens: []string{"NextToken"},
  2634. LimitToken: "MaxResults",
  2635. TruncationToken: "",
  2636. },
  2637. }
  2638. if input == nil {
  2639. input = &ListSentimentDetectionJobsInput{}
  2640. }
  2641. output = &ListSentimentDetectionJobsOutput{}
  2642. req = c.newRequest(op, input, output)
  2643. return
  2644. }
  2645. // ListSentimentDetectionJobs API operation for Amazon Comprehend.
  2646. //
  2647. // Gets a list of sentiment detection jobs that you have submitted.
  2648. //
  2649. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2650. // with awserr.Error's Code and Message methods to get detailed information about
  2651. // the error.
  2652. //
  2653. // See the AWS API reference guide for Amazon Comprehend's
  2654. // API operation ListSentimentDetectionJobs for usage and error information.
  2655. //
  2656. // Returned Error Codes:
  2657. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2658. // The request is invalid.
  2659. //
  2660. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2661. // The number of requests exceeds the limit. Resubmit your request later.
  2662. //
  2663. // * ErrCodeInvalidFilterException "InvalidFilterException"
  2664. // The filter specified for the ListDocumentClassificationJobs operation is
  2665. // invalid. Specify a different filter.
  2666. //
  2667. // * ErrCodeInternalServerException "InternalServerException"
  2668. // An internal server error occurred. Retry your request.
  2669. //
  2670. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListSentimentDetectionJobs
  2671. func (c *Comprehend) ListSentimentDetectionJobs(input *ListSentimentDetectionJobsInput) (*ListSentimentDetectionJobsOutput, error) {
  2672. req, out := c.ListSentimentDetectionJobsRequest(input)
  2673. return out, req.Send()
  2674. }
  2675. // ListSentimentDetectionJobsWithContext is the same as ListSentimentDetectionJobs with the addition of
  2676. // the ability to pass a context and additional request options.
  2677. //
  2678. // See ListSentimentDetectionJobs for details on how to use this API operation.
  2679. //
  2680. // The context must be non-nil and will be used for request cancellation. If
  2681. // the context is nil a panic will occur. In the future the SDK may create
  2682. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2683. // for more information on using Contexts.
  2684. func (c *Comprehend) ListSentimentDetectionJobsWithContext(ctx aws.Context, input *ListSentimentDetectionJobsInput, opts ...request.Option) (*ListSentimentDetectionJobsOutput, error) {
  2685. req, out := c.ListSentimentDetectionJobsRequest(input)
  2686. req.SetContext(ctx)
  2687. req.ApplyOptions(opts...)
  2688. return out, req.Send()
  2689. }
  2690. // ListSentimentDetectionJobsPages iterates over the pages of a ListSentimentDetectionJobs operation,
  2691. // calling the "fn" function with the response data for each page. To stop
  2692. // iterating, return false from the fn function.
  2693. //
  2694. // See ListSentimentDetectionJobs method for more information on how to use this operation.
  2695. //
  2696. // Note: This operation can generate multiple requests to a service.
  2697. //
  2698. // // Example iterating over at most 3 pages of a ListSentimentDetectionJobs operation.
  2699. // pageNum := 0
  2700. // err := client.ListSentimentDetectionJobsPages(params,
  2701. // func(page *ListSentimentDetectionJobsOutput, lastPage bool) bool {
  2702. // pageNum++
  2703. // fmt.Println(page)
  2704. // return pageNum <= 3
  2705. // })
  2706. //
  2707. func (c *Comprehend) ListSentimentDetectionJobsPages(input *ListSentimentDetectionJobsInput, fn func(*ListSentimentDetectionJobsOutput, bool) bool) error {
  2708. return c.ListSentimentDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
  2709. }
  2710. // ListSentimentDetectionJobsPagesWithContext same as ListSentimentDetectionJobsPages except
  2711. // it takes a Context and allows setting request options on the pages.
  2712. //
  2713. // The context must be non-nil and will be used for request cancellation. If
  2714. // the context is nil a panic will occur. In the future the SDK may create
  2715. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2716. // for more information on using Contexts.
  2717. func (c *Comprehend) ListSentimentDetectionJobsPagesWithContext(ctx aws.Context, input *ListSentimentDetectionJobsInput, fn func(*ListSentimentDetectionJobsOutput, bool) bool, opts ...request.Option) error {
  2718. p := request.Pagination{
  2719. NewRequest: func() (*request.Request, error) {
  2720. var inCpy *ListSentimentDetectionJobsInput
  2721. if input != nil {
  2722. tmp := *input
  2723. inCpy = &tmp
  2724. }
  2725. req, _ := c.ListSentimentDetectionJobsRequest(inCpy)
  2726. req.SetContext(ctx)
  2727. req.ApplyOptions(opts...)
  2728. return req, nil
  2729. },
  2730. }
  2731. cont := true
  2732. for p.Next() && cont {
  2733. cont = fn(p.Page().(*ListSentimentDetectionJobsOutput), !p.HasNextPage())
  2734. }
  2735. return p.Err()
  2736. }
  2737. const opListTopicsDetectionJobs = "ListTopicsDetectionJobs"
  2738. // ListTopicsDetectionJobsRequest generates a "aws/request.Request" representing the
  2739. // client's request for the ListTopicsDetectionJobs operation. The "output" return
  2740. // value will be populated with the request's response once the request completes
  2741. // successfully.
  2742. //
  2743. // Use "Send" method on the returned Request to send the API call to the service.
  2744. // the "output" return value is not valid until after Send returns without error.
  2745. //
  2746. // See ListTopicsDetectionJobs for more information on using the ListTopicsDetectionJobs
  2747. // API call, and error handling.
  2748. //
  2749. // This method is useful when you want to inject custom logic or configuration
  2750. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2751. //
  2752. //
  2753. // // Example sending a request using the ListTopicsDetectionJobsRequest method.
  2754. // req, resp := client.ListTopicsDetectionJobsRequest(params)
  2755. //
  2756. // err := req.Send()
  2757. // if err == nil { // resp is now filled
  2758. // fmt.Println(resp)
  2759. // }
  2760. //
  2761. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTopicsDetectionJobs
  2762. func (c *Comprehend) ListTopicsDetectionJobsRequest(input *ListTopicsDetectionJobsInput) (req *request.Request, output *ListTopicsDetectionJobsOutput) {
  2763. op := &request.Operation{
  2764. Name: opListTopicsDetectionJobs,
  2765. HTTPMethod: "POST",
  2766. HTTPPath: "/",
  2767. Paginator: &request.Paginator{
  2768. InputTokens: []string{"NextToken"},
  2769. OutputTokens: []string{"NextToken"},
  2770. LimitToken: "MaxResults",
  2771. TruncationToken: "",
  2772. },
  2773. }
  2774. if input == nil {
  2775. input = &ListTopicsDetectionJobsInput{}
  2776. }
  2777. output = &ListTopicsDetectionJobsOutput{}
  2778. req = c.newRequest(op, input, output)
  2779. return
  2780. }
  2781. // ListTopicsDetectionJobs API operation for Amazon Comprehend.
  2782. //
  2783. // Gets a list of the topic detection jobs that you have submitted.
  2784. //
  2785. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2786. // with awserr.Error's Code and Message methods to get detailed information about
  2787. // the error.
  2788. //
  2789. // See the AWS API reference guide for Amazon Comprehend's
  2790. // API operation ListTopicsDetectionJobs for usage and error information.
  2791. //
  2792. // Returned Error Codes:
  2793. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2794. // The request is invalid.
  2795. //
  2796. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2797. // The number of requests exceeds the limit. Resubmit your request later.
  2798. //
  2799. // * ErrCodeInvalidFilterException "InvalidFilterException"
  2800. // The filter specified for the ListDocumentClassificationJobs operation is
  2801. // invalid. Specify a different filter.
  2802. //
  2803. // * ErrCodeInternalServerException "InternalServerException"
  2804. // An internal server error occurred. Retry your request.
  2805. //
  2806. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTopicsDetectionJobs
  2807. func (c *Comprehend) ListTopicsDetectionJobs(input *ListTopicsDetectionJobsInput) (*ListTopicsDetectionJobsOutput, error) {
  2808. req, out := c.ListTopicsDetectionJobsRequest(input)
  2809. return out, req.Send()
  2810. }
  2811. // ListTopicsDetectionJobsWithContext is the same as ListTopicsDetectionJobs with the addition of
  2812. // the ability to pass a context and additional request options.
  2813. //
  2814. // See ListTopicsDetectionJobs for details on how to use this API operation.
  2815. //
  2816. // The context must be non-nil and will be used for request cancellation. If
  2817. // the context is nil a panic will occur. In the future the SDK may create
  2818. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2819. // for more information on using Contexts.
  2820. func (c *Comprehend) ListTopicsDetectionJobsWithContext(ctx aws.Context, input *ListTopicsDetectionJobsInput, opts ...request.Option) (*ListTopicsDetectionJobsOutput, error) {
  2821. req, out := c.ListTopicsDetectionJobsRequest(input)
  2822. req.SetContext(ctx)
  2823. req.ApplyOptions(opts...)
  2824. return out, req.Send()
  2825. }
  2826. // ListTopicsDetectionJobsPages iterates over the pages of a ListTopicsDetectionJobs operation,
  2827. // calling the "fn" function with the response data for each page. To stop
  2828. // iterating, return false from the fn function.
  2829. //
  2830. // See ListTopicsDetectionJobs method for more information on how to use this operation.
  2831. //
  2832. // Note: This operation can generate multiple requests to a service.
  2833. //
  2834. // // Example iterating over at most 3 pages of a ListTopicsDetectionJobs operation.
  2835. // pageNum := 0
  2836. // err := client.ListTopicsDetectionJobsPages(params,
  2837. // func(page *ListTopicsDetectionJobsOutput, lastPage bool) bool {
  2838. // pageNum++
  2839. // fmt.Println(page)
  2840. // return pageNum <= 3
  2841. // })
  2842. //
  2843. func (c *Comprehend) ListTopicsDetectionJobsPages(input *ListTopicsDetectionJobsInput, fn func(*ListTopicsDetectionJobsOutput, bool) bool) error {
  2844. return c.ListTopicsDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
  2845. }
  2846. // ListTopicsDetectionJobsPagesWithContext same as ListTopicsDetectionJobsPages except
  2847. // it takes a Context and allows setting request options on the pages.
  2848. //
  2849. // The context must be non-nil and will be used for request cancellation. If
  2850. // the context is nil a panic will occur. In the future the SDK may create
  2851. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2852. // for more information on using Contexts.
  2853. func (c *Comprehend) ListTopicsDetectionJobsPagesWithContext(ctx aws.Context, input *ListTopicsDetectionJobsInput, fn func(*ListTopicsDetectionJobsOutput, bool) bool, opts ...request.Option) error {
  2854. p := request.Pagination{
  2855. NewRequest: func() (*request.Request, error) {
  2856. var inCpy *ListTopicsDetectionJobsInput
  2857. if input != nil {
  2858. tmp := *input
  2859. inCpy = &tmp
  2860. }
  2861. req, _ := c.ListTopicsDetectionJobsRequest(inCpy)
  2862. req.SetContext(ctx)
  2863. req.ApplyOptions(opts...)
  2864. return req, nil
  2865. },
  2866. }
  2867. cont := true
  2868. for p.Next() && cont {
  2869. cont = fn(p.Page().(*ListTopicsDetectionJobsOutput), !p.HasNextPage())
  2870. }
  2871. return p.Err()
  2872. }
  2873. const opStartDocumentClassificationJob = "StartDocumentClassificationJob"
  2874. // StartDocumentClassificationJobRequest generates a "aws/request.Request" representing the
  2875. // client's request for the StartDocumentClassificationJob operation. The "output" return
  2876. // value will be populated with the request's response once the request completes
  2877. // successfully.
  2878. //
  2879. // Use "Send" method on the returned Request to send the API call to the service.
  2880. // the "output" return value is not valid until after Send returns without error.
  2881. //
  2882. // See StartDocumentClassificationJob for more information on using the StartDocumentClassificationJob
  2883. // API call, and error handling.
  2884. //
  2885. // This method is useful when you want to inject custom logic or configuration
  2886. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2887. //
  2888. //
  2889. // // Example sending a request using the StartDocumentClassificationJobRequest method.
  2890. // req, resp := client.StartDocumentClassificationJobRequest(params)
  2891. //
  2892. // err := req.Send()
  2893. // if err == nil { // resp is now filled
  2894. // fmt.Println(resp)
  2895. // }
  2896. //
  2897. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDocumentClassificationJob
  2898. func (c *Comprehend) StartDocumentClassificationJobRequest(input *StartDocumentClassificationJobInput) (req *request.Request, output *StartDocumentClassificationJobOutput) {
  2899. op := &request.Operation{
  2900. Name: opStartDocumentClassificationJob,
  2901. HTTPMethod: "POST",
  2902. HTTPPath: "/",
  2903. }
  2904. if input == nil {
  2905. input = &StartDocumentClassificationJobInput{}
  2906. }
  2907. output = &StartDocumentClassificationJobOutput{}
  2908. req = c.newRequest(op, input, output)
  2909. return
  2910. }
  2911. // StartDocumentClassificationJob API operation for Amazon Comprehend.
  2912. //
  2913. // Starts an asynchronous document classification job. Use the operation to
  2914. // track the progress of the job.
  2915. //
  2916. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2917. // with awserr.Error's Code and Message methods to get detailed information about
  2918. // the error.
  2919. //
  2920. // See the AWS API reference guide for Amazon Comprehend's
  2921. // API operation StartDocumentClassificationJob for usage and error information.
  2922. //
  2923. // Returned Error Codes:
  2924. // * ErrCodeInvalidRequestException "InvalidRequestException"
  2925. // The request is invalid.
  2926. //
  2927. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2928. // The number of requests exceeds the limit. Resubmit your request later.
  2929. //
  2930. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2931. // The specified resource ARN was not found. Check the ARN and try your request
  2932. // again.
  2933. //
  2934. // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
  2935. // The specified resource is not available. Check to see if the resource is
  2936. // in the TRAINED state and try your request again.
  2937. //
  2938. // * ErrCodeInternalServerException "InternalServerException"
  2939. // An internal server error occurred. Retry your request.
  2940. //
  2941. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDocumentClassificationJob
  2942. func (c *Comprehend) StartDocumentClassificationJob(input *StartDocumentClassificationJobInput) (*StartDocumentClassificationJobOutput, error) {
  2943. req, out := c.StartDocumentClassificationJobRequest(input)
  2944. return out, req.Send()
  2945. }
  2946. // StartDocumentClassificationJobWithContext is the same as StartDocumentClassificationJob with the addition of
  2947. // the ability to pass a context and additional request options.
  2948. //
  2949. // See StartDocumentClassificationJob for details on how to use this API operation.
  2950. //
  2951. // The context must be non-nil and will be used for request cancellation. If
  2952. // the context is nil a panic will occur. In the future the SDK may create
  2953. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2954. // for more information on using Contexts.
  2955. func (c *Comprehend) StartDocumentClassificationJobWithContext(ctx aws.Context, input *StartDocumentClassificationJobInput, opts ...request.Option) (*StartDocumentClassificationJobOutput, error) {
  2956. req, out := c.StartDocumentClassificationJobRequest(input)
  2957. req.SetContext(ctx)
  2958. req.ApplyOptions(opts...)
  2959. return out, req.Send()
  2960. }
  2961. const opStartDominantLanguageDetectionJob = "StartDominantLanguageDetectionJob"
  2962. // StartDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the
  2963. // client's request for the StartDominantLanguageDetectionJob operation. The "output" return
  2964. // value will be populated with the request's response once the request completes
  2965. // successfully.
  2966. //
  2967. // Use "Send" method on the returned Request to send the API call to the service.
  2968. // the "output" return value is not valid until after Send returns without error.
  2969. //
  2970. // See StartDominantLanguageDetectionJob for more information on using the StartDominantLanguageDetectionJob
  2971. // API call, and error handling.
  2972. //
  2973. // This method is useful when you want to inject custom logic or configuration
  2974. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2975. //
  2976. //
  2977. // // Example sending a request using the StartDominantLanguageDetectionJobRequest method.
  2978. // req, resp := client.StartDominantLanguageDetectionJobRequest(params)
  2979. //
  2980. // err := req.Send()
  2981. // if err == nil { // resp is now filled
  2982. // fmt.Println(resp)
  2983. // }
  2984. //
  2985. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDominantLanguageDetectionJob
  2986. func (c *Comprehend) StartDominantLanguageDetectionJobRequest(input *StartDominantLanguageDetectionJobInput) (req *request.Request, output *StartDominantLanguageDetectionJobOutput) {
  2987. op := &request.Operation{
  2988. Name: opStartDominantLanguageDetectionJob,
  2989. HTTPMethod: "POST",
  2990. HTTPPath: "/",
  2991. }
  2992. if input == nil {
  2993. input = &StartDominantLanguageDetectionJobInput{}
  2994. }
  2995. output = &StartDominantLanguageDetectionJobOutput{}
  2996. req = c.newRequest(op, input, output)
  2997. return
  2998. }
  2999. // StartDominantLanguageDetectionJob API operation for Amazon Comprehend.
  3000. //
  3001. // Starts an asynchronous dominant language detection job for a collection of
  3002. // documents. Use the operation to track the status of a job.
  3003. //
  3004. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3005. // with awserr.Error's Code and Message methods to get detailed information about
  3006. // the error.
  3007. //
  3008. // See the AWS API reference guide for Amazon Comprehend's
  3009. // API operation StartDominantLanguageDetectionJob for usage and error information.
  3010. //
  3011. // Returned Error Codes:
  3012. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3013. // The request is invalid.
  3014. //
  3015. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3016. // The number of requests exceeds the limit. Resubmit your request later.
  3017. //
  3018. // * ErrCodeInternalServerException "InternalServerException"
  3019. // An internal server error occurred. Retry your request.
  3020. //
  3021. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDominantLanguageDetectionJob
  3022. func (c *Comprehend) StartDominantLanguageDetectionJob(input *StartDominantLanguageDetectionJobInput) (*StartDominantLanguageDetectionJobOutput, error) {
  3023. req, out := c.StartDominantLanguageDetectionJobRequest(input)
  3024. return out, req.Send()
  3025. }
  3026. // StartDominantLanguageDetectionJobWithContext is the same as StartDominantLanguageDetectionJob with the addition of
  3027. // the ability to pass a context and additional request options.
  3028. //
  3029. // See StartDominantLanguageDetectionJob for details on how to use this API operation.
  3030. //
  3031. // The context must be non-nil and will be used for request cancellation. If
  3032. // the context is nil a panic will occur. In the future the SDK may create
  3033. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3034. // for more information on using Contexts.
  3035. func (c *Comprehend) StartDominantLanguageDetectionJobWithContext(ctx aws.Context, input *StartDominantLanguageDetectionJobInput, opts ...request.Option) (*StartDominantLanguageDetectionJobOutput, error) {
  3036. req, out := c.StartDominantLanguageDetectionJobRequest(input)
  3037. req.SetContext(ctx)
  3038. req.ApplyOptions(opts...)
  3039. return out, req.Send()
  3040. }
  3041. const opStartEntitiesDetectionJob = "StartEntitiesDetectionJob"
  3042. // StartEntitiesDetectionJobRequest generates a "aws/request.Request" representing the
  3043. // client's request for the StartEntitiesDetectionJob operation. The "output" return
  3044. // value will be populated with the request's response once the request completes
  3045. // successfully.
  3046. //
  3047. // Use "Send" method on the returned Request to send the API call to the service.
  3048. // the "output" return value is not valid until after Send returns without error.
  3049. //
  3050. // See StartEntitiesDetectionJob for more information on using the StartEntitiesDetectionJob
  3051. // API call, and error handling.
  3052. //
  3053. // This method is useful when you want to inject custom logic or configuration
  3054. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3055. //
  3056. //
  3057. // // Example sending a request using the StartEntitiesDetectionJobRequest method.
  3058. // req, resp := client.StartEntitiesDetectionJobRequest(params)
  3059. //
  3060. // err := req.Send()
  3061. // if err == nil { // resp is now filled
  3062. // fmt.Println(resp)
  3063. // }
  3064. //
  3065. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartEntitiesDetectionJob
  3066. func (c *Comprehend) StartEntitiesDetectionJobRequest(input *StartEntitiesDetectionJobInput) (req *request.Request, output *StartEntitiesDetectionJobOutput) {
  3067. op := &request.Operation{
  3068. Name: opStartEntitiesDetectionJob,
  3069. HTTPMethod: "POST",
  3070. HTTPPath: "/",
  3071. }
  3072. if input == nil {
  3073. input = &StartEntitiesDetectionJobInput{}
  3074. }
  3075. output = &StartEntitiesDetectionJobOutput{}
  3076. req = c.newRequest(op, input, output)
  3077. return
  3078. }
  3079. // StartEntitiesDetectionJob API operation for Amazon Comprehend.
  3080. //
  3081. // Starts an asynchronous entity detection job for a collection of documents.
  3082. // Use the operation to track the status of a job.
  3083. //
  3084. // This API can be used for either standard entity detection or custom entity
  3085. // recognition. In order to be used for custom entity recognition, the optional
  3086. // EntityRecognizerArn must be used in order to provide access to the recognizer
  3087. // being used to detect the custom entity.
  3088. //
  3089. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3090. // with awserr.Error's Code and Message methods to get detailed information about
  3091. // the error.
  3092. //
  3093. // See the AWS API reference guide for Amazon Comprehend's
  3094. // API operation StartEntitiesDetectionJob for usage and error information.
  3095. //
  3096. // Returned Error Codes:
  3097. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3098. // The request is invalid.
  3099. //
  3100. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3101. // The number of requests exceeds the limit. Resubmit your request later.
  3102. //
  3103. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3104. // The specified resource ARN was not found. Check the ARN and try your request
  3105. // again.
  3106. //
  3107. // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
  3108. // The specified resource is not available. Check to see if the resource is
  3109. // in the TRAINED state and try your request again.
  3110. //
  3111. // * ErrCodeInternalServerException "InternalServerException"
  3112. // An internal server error occurred. Retry your request.
  3113. //
  3114. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartEntitiesDetectionJob
  3115. func (c *Comprehend) StartEntitiesDetectionJob(input *StartEntitiesDetectionJobInput) (*StartEntitiesDetectionJobOutput, error) {
  3116. req, out := c.StartEntitiesDetectionJobRequest(input)
  3117. return out, req.Send()
  3118. }
  3119. // StartEntitiesDetectionJobWithContext is the same as StartEntitiesDetectionJob with the addition of
  3120. // the ability to pass a context and additional request options.
  3121. //
  3122. // See StartEntitiesDetectionJob for details on how to use this API operation.
  3123. //
  3124. // The context must be non-nil and will be used for request cancellation. If
  3125. // the context is nil a panic will occur. In the future the SDK may create
  3126. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3127. // for more information on using Contexts.
  3128. func (c *Comprehend) StartEntitiesDetectionJobWithContext(ctx aws.Context, input *StartEntitiesDetectionJobInput, opts ...request.Option) (*StartEntitiesDetectionJobOutput, error) {
  3129. req, out := c.StartEntitiesDetectionJobRequest(input)
  3130. req.SetContext(ctx)
  3131. req.ApplyOptions(opts...)
  3132. return out, req.Send()
  3133. }
  3134. const opStartKeyPhrasesDetectionJob = "StartKeyPhrasesDetectionJob"
  3135. // StartKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the
  3136. // client's request for the StartKeyPhrasesDetectionJob operation. The "output" return
  3137. // value will be populated with the request's response once the request completes
  3138. // successfully.
  3139. //
  3140. // Use "Send" method on the returned Request to send the API call to the service.
  3141. // the "output" return value is not valid until after Send returns without error.
  3142. //
  3143. // See StartKeyPhrasesDetectionJob for more information on using the StartKeyPhrasesDetectionJob
  3144. // API call, and error handling.
  3145. //
  3146. // This method is useful when you want to inject custom logic or configuration
  3147. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3148. //
  3149. //
  3150. // // Example sending a request using the StartKeyPhrasesDetectionJobRequest method.
  3151. // req, resp := client.StartKeyPhrasesDetectionJobRequest(params)
  3152. //
  3153. // err := req.Send()
  3154. // if err == nil { // resp is now filled
  3155. // fmt.Println(resp)
  3156. // }
  3157. //
  3158. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartKeyPhrasesDetectionJob
  3159. func (c *Comprehend) StartKeyPhrasesDetectionJobRequest(input *StartKeyPhrasesDetectionJobInput) (req *request.Request, output *StartKeyPhrasesDetectionJobOutput) {
  3160. op := &request.Operation{
  3161. Name: opStartKeyPhrasesDetectionJob,
  3162. HTTPMethod: "POST",
  3163. HTTPPath: "/",
  3164. }
  3165. if input == nil {
  3166. input = &StartKeyPhrasesDetectionJobInput{}
  3167. }
  3168. output = &StartKeyPhrasesDetectionJobOutput{}
  3169. req = c.newRequest(op, input, output)
  3170. return
  3171. }
  3172. // StartKeyPhrasesDetectionJob API operation for Amazon Comprehend.
  3173. //
  3174. // Starts an asynchronous key phrase detection job for a collection of documents.
  3175. // Use the operation to track the status of a job.
  3176. //
  3177. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3178. // with awserr.Error's Code and Message methods to get detailed information about
  3179. // the error.
  3180. //
  3181. // See the AWS API reference guide for Amazon Comprehend's
  3182. // API operation StartKeyPhrasesDetectionJob for usage and error information.
  3183. //
  3184. // Returned Error Codes:
  3185. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3186. // The request is invalid.
  3187. //
  3188. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3189. // The number of requests exceeds the limit. Resubmit your request later.
  3190. //
  3191. // * ErrCodeInternalServerException "InternalServerException"
  3192. // An internal server error occurred. Retry your request.
  3193. //
  3194. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartKeyPhrasesDetectionJob
  3195. func (c *Comprehend) StartKeyPhrasesDetectionJob(input *StartKeyPhrasesDetectionJobInput) (*StartKeyPhrasesDetectionJobOutput, error) {
  3196. req, out := c.StartKeyPhrasesDetectionJobRequest(input)
  3197. return out, req.Send()
  3198. }
  3199. // StartKeyPhrasesDetectionJobWithContext is the same as StartKeyPhrasesDetectionJob with the addition of
  3200. // the ability to pass a context and additional request options.
  3201. //
  3202. // See StartKeyPhrasesDetectionJob for details on how to use this API operation.
  3203. //
  3204. // The context must be non-nil and will be used for request cancellation. If
  3205. // the context is nil a panic will occur. In the future the SDK may create
  3206. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3207. // for more information on using Contexts.
  3208. func (c *Comprehend) StartKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *StartKeyPhrasesDetectionJobInput, opts ...request.Option) (*StartKeyPhrasesDetectionJobOutput, error) {
  3209. req, out := c.StartKeyPhrasesDetectionJobRequest(input)
  3210. req.SetContext(ctx)
  3211. req.ApplyOptions(opts...)
  3212. return out, req.Send()
  3213. }
  3214. const opStartSentimentDetectionJob = "StartSentimentDetectionJob"
  3215. // StartSentimentDetectionJobRequest generates a "aws/request.Request" representing the
  3216. // client's request for the StartSentimentDetectionJob operation. The "output" return
  3217. // value will be populated with the request's response once the request completes
  3218. // successfully.
  3219. //
  3220. // Use "Send" method on the returned Request to send the API call to the service.
  3221. // the "output" return value is not valid until after Send returns without error.
  3222. //
  3223. // See StartSentimentDetectionJob for more information on using the StartSentimentDetectionJob
  3224. // API call, and error handling.
  3225. //
  3226. // This method is useful when you want to inject custom logic or configuration
  3227. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3228. //
  3229. //
  3230. // // Example sending a request using the StartSentimentDetectionJobRequest method.
  3231. // req, resp := client.StartSentimentDetectionJobRequest(params)
  3232. //
  3233. // err := req.Send()
  3234. // if err == nil { // resp is now filled
  3235. // fmt.Println(resp)
  3236. // }
  3237. //
  3238. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartSentimentDetectionJob
  3239. func (c *Comprehend) StartSentimentDetectionJobRequest(input *StartSentimentDetectionJobInput) (req *request.Request, output *StartSentimentDetectionJobOutput) {
  3240. op := &request.Operation{
  3241. Name: opStartSentimentDetectionJob,
  3242. HTTPMethod: "POST",
  3243. HTTPPath: "/",
  3244. }
  3245. if input == nil {
  3246. input = &StartSentimentDetectionJobInput{}
  3247. }
  3248. output = &StartSentimentDetectionJobOutput{}
  3249. req = c.newRequest(op, input, output)
  3250. return
  3251. }
  3252. // StartSentimentDetectionJob API operation for Amazon Comprehend.
  3253. //
  3254. // Starts an asynchronous sentiment detection job for a collection of documents.
  3255. // use the operation to track the status of a job.
  3256. //
  3257. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3258. // with awserr.Error's Code and Message methods to get detailed information about
  3259. // the error.
  3260. //
  3261. // See the AWS API reference guide for Amazon Comprehend's
  3262. // API operation StartSentimentDetectionJob for usage and error information.
  3263. //
  3264. // Returned Error Codes:
  3265. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3266. // The request is invalid.
  3267. //
  3268. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3269. // The number of requests exceeds the limit. Resubmit your request later.
  3270. //
  3271. // * ErrCodeInternalServerException "InternalServerException"
  3272. // An internal server error occurred. Retry your request.
  3273. //
  3274. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartSentimentDetectionJob
  3275. func (c *Comprehend) StartSentimentDetectionJob(input *StartSentimentDetectionJobInput) (*StartSentimentDetectionJobOutput, error) {
  3276. req, out := c.StartSentimentDetectionJobRequest(input)
  3277. return out, req.Send()
  3278. }
  3279. // StartSentimentDetectionJobWithContext is the same as StartSentimentDetectionJob with the addition of
  3280. // the ability to pass a context and additional request options.
  3281. //
  3282. // See StartSentimentDetectionJob for details on how to use this API operation.
  3283. //
  3284. // The context must be non-nil and will be used for request cancellation. If
  3285. // the context is nil a panic will occur. In the future the SDK may create
  3286. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3287. // for more information on using Contexts.
  3288. func (c *Comprehend) StartSentimentDetectionJobWithContext(ctx aws.Context, input *StartSentimentDetectionJobInput, opts ...request.Option) (*StartSentimentDetectionJobOutput, error) {
  3289. req, out := c.StartSentimentDetectionJobRequest(input)
  3290. req.SetContext(ctx)
  3291. req.ApplyOptions(opts...)
  3292. return out, req.Send()
  3293. }
  3294. const opStartTopicsDetectionJob = "StartTopicsDetectionJob"
  3295. // StartTopicsDetectionJobRequest generates a "aws/request.Request" representing the
  3296. // client's request for the StartTopicsDetectionJob operation. The "output" return
  3297. // value will be populated with the request's response once the request completes
  3298. // successfully.
  3299. //
  3300. // Use "Send" method on the returned Request to send the API call to the service.
  3301. // the "output" return value is not valid until after Send returns without error.
  3302. //
  3303. // See StartTopicsDetectionJob for more information on using the StartTopicsDetectionJob
  3304. // API call, and error handling.
  3305. //
  3306. // This method is useful when you want to inject custom logic or configuration
  3307. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3308. //
  3309. //
  3310. // // Example sending a request using the StartTopicsDetectionJobRequest method.
  3311. // req, resp := client.StartTopicsDetectionJobRequest(params)
  3312. //
  3313. // err := req.Send()
  3314. // if err == nil { // resp is now filled
  3315. // fmt.Println(resp)
  3316. // }
  3317. //
  3318. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJob
  3319. func (c *Comprehend) StartTopicsDetectionJobRequest(input *StartTopicsDetectionJobInput) (req *request.Request, output *StartTopicsDetectionJobOutput) {
  3320. op := &request.Operation{
  3321. Name: opStartTopicsDetectionJob,
  3322. HTTPMethod: "POST",
  3323. HTTPPath: "/",
  3324. }
  3325. if input == nil {
  3326. input = &StartTopicsDetectionJobInput{}
  3327. }
  3328. output = &StartTopicsDetectionJobOutput{}
  3329. req = c.newRequest(op, input, output)
  3330. return
  3331. }
  3332. // StartTopicsDetectionJob API operation for Amazon Comprehend.
  3333. //
  3334. // Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob
  3335. // operation to track the status of a job.
  3336. //
  3337. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3338. // with awserr.Error's Code and Message methods to get detailed information about
  3339. // the error.
  3340. //
  3341. // See the AWS API reference guide for Amazon Comprehend's
  3342. // API operation StartTopicsDetectionJob for usage and error information.
  3343. //
  3344. // Returned Error Codes:
  3345. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3346. // The request is invalid.
  3347. //
  3348. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3349. // The number of requests exceeds the limit. Resubmit your request later.
  3350. //
  3351. // * ErrCodeInternalServerException "InternalServerException"
  3352. // An internal server error occurred. Retry your request.
  3353. //
  3354. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJob
  3355. func (c *Comprehend) StartTopicsDetectionJob(input *StartTopicsDetectionJobInput) (*StartTopicsDetectionJobOutput, error) {
  3356. req, out := c.StartTopicsDetectionJobRequest(input)
  3357. return out, req.Send()
  3358. }
  3359. // StartTopicsDetectionJobWithContext is the same as StartTopicsDetectionJob with the addition of
  3360. // the ability to pass a context and additional request options.
  3361. //
  3362. // See StartTopicsDetectionJob for details on how to use this API operation.
  3363. //
  3364. // The context must be non-nil and will be used for request cancellation. If
  3365. // the context is nil a panic will occur. In the future the SDK may create
  3366. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3367. // for more information on using Contexts.
  3368. func (c *Comprehend) StartTopicsDetectionJobWithContext(ctx aws.Context, input *StartTopicsDetectionJobInput, opts ...request.Option) (*StartTopicsDetectionJobOutput, error) {
  3369. req, out := c.StartTopicsDetectionJobRequest(input)
  3370. req.SetContext(ctx)
  3371. req.ApplyOptions(opts...)
  3372. return out, req.Send()
  3373. }
  3374. const opStopDominantLanguageDetectionJob = "StopDominantLanguageDetectionJob"
  3375. // StopDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the
  3376. // client's request for the StopDominantLanguageDetectionJob operation. The "output" return
  3377. // value will be populated with the request's response once the request completes
  3378. // successfully.
  3379. //
  3380. // Use "Send" method on the returned Request to send the API call to the service.
  3381. // the "output" return value is not valid until after Send returns without error.
  3382. //
  3383. // See StopDominantLanguageDetectionJob for more information on using the StopDominantLanguageDetectionJob
  3384. // API call, and error handling.
  3385. //
  3386. // This method is useful when you want to inject custom logic or configuration
  3387. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3388. //
  3389. //
  3390. // // Example sending a request using the StopDominantLanguageDetectionJobRequest method.
  3391. // req, resp := client.StopDominantLanguageDetectionJobRequest(params)
  3392. //
  3393. // err := req.Send()
  3394. // if err == nil { // resp is now filled
  3395. // fmt.Println(resp)
  3396. // }
  3397. //
  3398. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopDominantLanguageDetectionJob
  3399. func (c *Comprehend) StopDominantLanguageDetectionJobRequest(input *StopDominantLanguageDetectionJobInput) (req *request.Request, output *StopDominantLanguageDetectionJobOutput) {
  3400. op := &request.Operation{
  3401. Name: opStopDominantLanguageDetectionJob,
  3402. HTTPMethod: "POST",
  3403. HTTPPath: "/",
  3404. }
  3405. if input == nil {
  3406. input = &StopDominantLanguageDetectionJobInput{}
  3407. }
  3408. output = &StopDominantLanguageDetectionJobOutput{}
  3409. req = c.newRequest(op, input, output)
  3410. return
  3411. }
  3412. // StopDominantLanguageDetectionJob API operation for Amazon Comprehend.
  3413. //
  3414. // Stops a dominant language detection job in progress.
  3415. //
  3416. // If the job state is IN_PROGRESS the job is marked for termination and put
  3417. // into the STOP_REQUESTED state. If the job completes before it can be stopped,
  3418. // it is put into the COMPLETED state; otherwise the job is stopped and put
  3419. // into the STOPPED state.
  3420. //
  3421. // If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob
  3422. // operation, the operation returns a 400 Internal Request Exception.
  3423. //
  3424. // When a job is stopped, any documents already processed are written to the
  3425. // output location.
  3426. //
  3427. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3428. // with awserr.Error's Code and Message methods to get detailed information about
  3429. // the error.
  3430. //
  3431. // See the AWS API reference guide for Amazon Comprehend's
  3432. // API operation StopDominantLanguageDetectionJob for usage and error information.
  3433. //
  3434. // Returned Error Codes:
  3435. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3436. // The request is invalid.
  3437. //
  3438. // * ErrCodeJobNotFoundException "JobNotFoundException"
  3439. // The specified job was not found. Check the job ID and try again.
  3440. //
  3441. // * ErrCodeInternalServerException "InternalServerException"
  3442. // An internal server error occurred. Retry your request.
  3443. //
  3444. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopDominantLanguageDetectionJob
  3445. func (c *Comprehend) StopDominantLanguageDetectionJob(input *StopDominantLanguageDetectionJobInput) (*StopDominantLanguageDetectionJobOutput, error) {
  3446. req, out := c.StopDominantLanguageDetectionJobRequest(input)
  3447. return out, req.Send()
  3448. }
  3449. // StopDominantLanguageDetectionJobWithContext is the same as StopDominantLanguageDetectionJob with the addition of
  3450. // the ability to pass a context and additional request options.
  3451. //
  3452. // See StopDominantLanguageDetectionJob for details on how to use this API operation.
  3453. //
  3454. // The context must be non-nil and will be used for request cancellation. If
  3455. // the context is nil a panic will occur. In the future the SDK may create
  3456. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3457. // for more information on using Contexts.
  3458. func (c *Comprehend) StopDominantLanguageDetectionJobWithContext(ctx aws.Context, input *StopDominantLanguageDetectionJobInput, opts ...request.Option) (*StopDominantLanguageDetectionJobOutput, error) {
  3459. req, out := c.StopDominantLanguageDetectionJobRequest(input)
  3460. req.SetContext(ctx)
  3461. req.ApplyOptions(opts...)
  3462. return out, req.Send()
  3463. }
  3464. const opStopEntitiesDetectionJob = "StopEntitiesDetectionJob"
  3465. // StopEntitiesDetectionJobRequest generates a "aws/request.Request" representing the
  3466. // client's request for the StopEntitiesDetectionJob operation. The "output" return
  3467. // value will be populated with the request's response once the request completes
  3468. // successfully.
  3469. //
  3470. // Use "Send" method on the returned Request to send the API call to the service.
  3471. // the "output" return value is not valid until after Send returns without error.
  3472. //
  3473. // See StopEntitiesDetectionJob for more information on using the StopEntitiesDetectionJob
  3474. // API call, and error handling.
  3475. //
  3476. // This method is useful when you want to inject custom logic or configuration
  3477. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3478. //
  3479. //
  3480. // // Example sending a request using the StopEntitiesDetectionJobRequest method.
  3481. // req, resp := client.StopEntitiesDetectionJobRequest(params)
  3482. //
  3483. // err := req.Send()
  3484. // if err == nil { // resp is now filled
  3485. // fmt.Println(resp)
  3486. // }
  3487. //
  3488. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopEntitiesDetectionJob
  3489. func (c *Comprehend) StopEntitiesDetectionJobRequest(input *StopEntitiesDetectionJobInput) (req *request.Request, output *StopEntitiesDetectionJobOutput) {
  3490. op := &request.Operation{
  3491. Name: opStopEntitiesDetectionJob,
  3492. HTTPMethod: "POST",
  3493. HTTPPath: "/",
  3494. }
  3495. if input == nil {
  3496. input = &StopEntitiesDetectionJobInput{}
  3497. }
  3498. output = &StopEntitiesDetectionJobOutput{}
  3499. req = c.newRequest(op, input, output)
  3500. return
  3501. }
  3502. // StopEntitiesDetectionJob API operation for Amazon Comprehend.
  3503. //
  3504. // Stops an entities detection job in progress.
  3505. //
  3506. // If the job state is IN_PROGRESS the job is marked for termination and put
  3507. // into the STOP_REQUESTED state. If the job completes before it can be stopped,
  3508. // it is put into the COMPLETED state; otherwise the job is stopped and put
  3509. // into the STOPPED state.
  3510. //
  3511. // If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob
  3512. // operation, the operation returns a 400 Internal Request Exception.
  3513. //
  3514. // When a job is stopped, any documents already processed are written to the
  3515. // output location.
  3516. //
  3517. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3518. // with awserr.Error's Code and Message methods to get detailed information about
  3519. // the error.
  3520. //
  3521. // See the AWS API reference guide for Amazon Comprehend's
  3522. // API operation StopEntitiesDetectionJob for usage and error information.
  3523. //
  3524. // Returned Error Codes:
  3525. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3526. // The request is invalid.
  3527. //
  3528. // * ErrCodeJobNotFoundException "JobNotFoundException"
  3529. // The specified job was not found. Check the job ID and try again.
  3530. //
  3531. // * ErrCodeInternalServerException "InternalServerException"
  3532. // An internal server error occurred. Retry your request.
  3533. //
  3534. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopEntitiesDetectionJob
  3535. func (c *Comprehend) StopEntitiesDetectionJob(input *StopEntitiesDetectionJobInput) (*StopEntitiesDetectionJobOutput, error) {
  3536. req, out := c.StopEntitiesDetectionJobRequest(input)
  3537. return out, req.Send()
  3538. }
  3539. // StopEntitiesDetectionJobWithContext is the same as StopEntitiesDetectionJob with the addition of
  3540. // the ability to pass a context and additional request options.
  3541. //
  3542. // See StopEntitiesDetectionJob for details on how to use this API operation.
  3543. //
  3544. // The context must be non-nil and will be used for request cancellation. If
  3545. // the context is nil a panic will occur. In the future the SDK may create
  3546. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3547. // for more information on using Contexts.
  3548. func (c *Comprehend) StopEntitiesDetectionJobWithContext(ctx aws.Context, input *StopEntitiesDetectionJobInput, opts ...request.Option) (*StopEntitiesDetectionJobOutput, error) {
  3549. req, out := c.StopEntitiesDetectionJobRequest(input)
  3550. req.SetContext(ctx)
  3551. req.ApplyOptions(opts...)
  3552. return out, req.Send()
  3553. }
  3554. const opStopKeyPhrasesDetectionJob = "StopKeyPhrasesDetectionJob"
  3555. // StopKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the
  3556. // client's request for the StopKeyPhrasesDetectionJob operation. The "output" return
  3557. // value will be populated with the request's response once the request completes
  3558. // successfully.
  3559. //
  3560. // Use "Send" method on the returned Request to send the API call to the service.
  3561. // the "output" return value is not valid until after Send returns without error.
  3562. //
  3563. // See StopKeyPhrasesDetectionJob for more information on using the StopKeyPhrasesDetectionJob
  3564. // API call, and error handling.
  3565. //
  3566. // This method is useful when you want to inject custom logic or configuration
  3567. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3568. //
  3569. //
  3570. // // Example sending a request using the StopKeyPhrasesDetectionJobRequest method.
  3571. // req, resp := client.StopKeyPhrasesDetectionJobRequest(params)
  3572. //
  3573. // err := req.Send()
  3574. // if err == nil { // resp is now filled
  3575. // fmt.Println(resp)
  3576. // }
  3577. //
  3578. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopKeyPhrasesDetectionJob
  3579. func (c *Comprehend) StopKeyPhrasesDetectionJobRequest(input *StopKeyPhrasesDetectionJobInput) (req *request.Request, output *StopKeyPhrasesDetectionJobOutput) {
  3580. op := &request.Operation{
  3581. Name: opStopKeyPhrasesDetectionJob,
  3582. HTTPMethod: "POST",
  3583. HTTPPath: "/",
  3584. }
  3585. if input == nil {
  3586. input = &StopKeyPhrasesDetectionJobInput{}
  3587. }
  3588. output = &StopKeyPhrasesDetectionJobOutput{}
  3589. req = c.newRequest(op, input, output)
  3590. return
  3591. }
  3592. // StopKeyPhrasesDetectionJob API operation for Amazon Comprehend.
  3593. //
  3594. // Stops a key phrases detection job in progress.
  3595. //
  3596. // If the job state is IN_PROGRESS the job is marked for termination and put
  3597. // into the STOP_REQUESTED state. If the job completes before it can be stopped,
  3598. // it is put into the COMPLETED state; otherwise the job is stopped and put
  3599. // into the STOPPED state.
  3600. //
  3601. // If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob
  3602. // operation, the operation returns a 400 Internal Request Exception.
  3603. //
  3604. // When a job is stopped, any documents already processed are written to the
  3605. // output location.
  3606. //
  3607. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3608. // with awserr.Error's Code and Message methods to get detailed information about
  3609. // the error.
  3610. //
  3611. // See the AWS API reference guide for Amazon Comprehend's
  3612. // API operation StopKeyPhrasesDetectionJob for usage and error information.
  3613. //
  3614. // Returned Error Codes:
  3615. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3616. // The request is invalid.
  3617. //
  3618. // * ErrCodeJobNotFoundException "JobNotFoundException"
  3619. // The specified job was not found. Check the job ID and try again.
  3620. //
  3621. // * ErrCodeInternalServerException "InternalServerException"
  3622. // An internal server error occurred. Retry your request.
  3623. //
  3624. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopKeyPhrasesDetectionJob
  3625. func (c *Comprehend) StopKeyPhrasesDetectionJob(input *StopKeyPhrasesDetectionJobInput) (*StopKeyPhrasesDetectionJobOutput, error) {
  3626. req, out := c.StopKeyPhrasesDetectionJobRequest(input)
  3627. return out, req.Send()
  3628. }
  3629. // StopKeyPhrasesDetectionJobWithContext is the same as StopKeyPhrasesDetectionJob with the addition of
  3630. // the ability to pass a context and additional request options.
  3631. //
  3632. // See StopKeyPhrasesDetectionJob for details on how to use this API operation.
  3633. //
  3634. // The context must be non-nil and will be used for request cancellation. If
  3635. // the context is nil a panic will occur. In the future the SDK may create
  3636. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3637. // for more information on using Contexts.
  3638. func (c *Comprehend) StopKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *StopKeyPhrasesDetectionJobInput, opts ...request.Option) (*StopKeyPhrasesDetectionJobOutput, error) {
  3639. req, out := c.StopKeyPhrasesDetectionJobRequest(input)
  3640. req.SetContext(ctx)
  3641. req.ApplyOptions(opts...)
  3642. return out, req.Send()
  3643. }
  3644. const opStopSentimentDetectionJob = "StopSentimentDetectionJob"
  3645. // StopSentimentDetectionJobRequest generates a "aws/request.Request" representing the
  3646. // client's request for the StopSentimentDetectionJob operation. The "output" return
  3647. // value will be populated with the request's response once the request completes
  3648. // successfully.
  3649. //
  3650. // Use "Send" method on the returned Request to send the API call to the service.
  3651. // the "output" return value is not valid until after Send returns without error.
  3652. //
  3653. // See StopSentimentDetectionJob for more information on using the StopSentimentDetectionJob
  3654. // API call, and error handling.
  3655. //
  3656. // This method is useful when you want to inject custom logic or configuration
  3657. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3658. //
  3659. //
  3660. // // Example sending a request using the StopSentimentDetectionJobRequest method.
  3661. // req, resp := client.StopSentimentDetectionJobRequest(params)
  3662. //
  3663. // err := req.Send()
  3664. // if err == nil { // resp is now filled
  3665. // fmt.Println(resp)
  3666. // }
  3667. //
  3668. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopSentimentDetectionJob
  3669. func (c *Comprehend) StopSentimentDetectionJobRequest(input *StopSentimentDetectionJobInput) (req *request.Request, output *StopSentimentDetectionJobOutput) {
  3670. op := &request.Operation{
  3671. Name: opStopSentimentDetectionJob,
  3672. HTTPMethod: "POST",
  3673. HTTPPath: "/",
  3674. }
  3675. if input == nil {
  3676. input = &StopSentimentDetectionJobInput{}
  3677. }
  3678. output = &StopSentimentDetectionJobOutput{}
  3679. req = c.newRequest(op, input, output)
  3680. return
  3681. }
  3682. // StopSentimentDetectionJob API operation for Amazon Comprehend.
  3683. //
  3684. // Stops a sentiment detection job in progress.
  3685. //
  3686. // If the job state is IN_PROGRESS the job is marked for termination and put
  3687. // into the STOP_REQUESTED state. If the job completes before it can be stopped,
  3688. // it is put into the COMPLETED state; otherwise the job is be stopped and put
  3689. // into the STOPPED state.
  3690. //
  3691. // If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob
  3692. // operation, the operation returns a 400 Internal Request Exception.
  3693. //
  3694. // When a job is stopped, any documents already processed are written to the
  3695. // output location.
  3696. //
  3697. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3698. // with awserr.Error's Code and Message methods to get detailed information about
  3699. // the error.
  3700. //
  3701. // See the AWS API reference guide for Amazon Comprehend's
  3702. // API operation StopSentimentDetectionJob for usage and error information.
  3703. //
  3704. // Returned Error Codes:
  3705. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3706. // The request is invalid.
  3707. //
  3708. // * ErrCodeJobNotFoundException "JobNotFoundException"
  3709. // The specified job was not found. Check the job ID and try again.
  3710. //
  3711. // * ErrCodeInternalServerException "InternalServerException"
  3712. // An internal server error occurred. Retry your request.
  3713. //
  3714. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopSentimentDetectionJob
  3715. func (c *Comprehend) StopSentimentDetectionJob(input *StopSentimentDetectionJobInput) (*StopSentimentDetectionJobOutput, error) {
  3716. req, out := c.StopSentimentDetectionJobRequest(input)
  3717. return out, req.Send()
  3718. }
  3719. // StopSentimentDetectionJobWithContext is the same as StopSentimentDetectionJob with the addition of
  3720. // the ability to pass a context and additional request options.
  3721. //
  3722. // See StopSentimentDetectionJob for details on how to use this API operation.
  3723. //
  3724. // The context must be non-nil and will be used for request cancellation. If
  3725. // the context is nil a panic will occur. In the future the SDK may create
  3726. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3727. // for more information on using Contexts.
  3728. func (c *Comprehend) StopSentimentDetectionJobWithContext(ctx aws.Context, input *StopSentimentDetectionJobInput, opts ...request.Option) (*StopSentimentDetectionJobOutput, error) {
  3729. req, out := c.StopSentimentDetectionJobRequest(input)
  3730. req.SetContext(ctx)
  3731. req.ApplyOptions(opts...)
  3732. return out, req.Send()
  3733. }
  3734. const opStopTrainingDocumentClassifier = "StopTrainingDocumentClassifier"
  3735. // StopTrainingDocumentClassifierRequest generates a "aws/request.Request" representing the
  3736. // client's request for the StopTrainingDocumentClassifier operation. The "output" return
  3737. // value will be populated with the request's response once the request completes
  3738. // successfully.
  3739. //
  3740. // Use "Send" method on the returned Request to send the API call to the service.
  3741. // the "output" return value is not valid until after Send returns without error.
  3742. //
  3743. // See StopTrainingDocumentClassifier for more information on using the StopTrainingDocumentClassifier
  3744. // API call, and error handling.
  3745. //
  3746. // This method is useful when you want to inject custom logic or configuration
  3747. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3748. //
  3749. //
  3750. // // Example sending a request using the StopTrainingDocumentClassifierRequest method.
  3751. // req, resp := client.StopTrainingDocumentClassifierRequest(params)
  3752. //
  3753. // err := req.Send()
  3754. // if err == nil { // resp is now filled
  3755. // fmt.Println(resp)
  3756. // }
  3757. //
  3758. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingDocumentClassifier
  3759. func (c *Comprehend) StopTrainingDocumentClassifierRequest(input *StopTrainingDocumentClassifierInput) (req *request.Request, output *StopTrainingDocumentClassifierOutput) {
  3760. op := &request.Operation{
  3761. Name: opStopTrainingDocumentClassifier,
  3762. HTTPMethod: "POST",
  3763. HTTPPath: "/",
  3764. }
  3765. if input == nil {
  3766. input = &StopTrainingDocumentClassifierInput{}
  3767. }
  3768. output = &StopTrainingDocumentClassifierOutput{}
  3769. req = c.newRequest(op, input, output)
  3770. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3771. return
  3772. }
  3773. // StopTrainingDocumentClassifier API operation for Amazon Comprehend.
  3774. //
  3775. // Stops a document classifier training job while in progress.
  3776. //
  3777. // If the training job state is TRAINING, the job is marked for termination
  3778. // and put into the STOP_REQUESTED state. If the training job completes before
  3779. // it can be stopped, it is put into the TRAINED; otherwise the training job
  3780. // is stopped and put into the STOPPED state and the service sends back an HTTP
  3781. // 200 response with an empty HTTP body.
  3782. //
  3783. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3784. // with awserr.Error's Code and Message methods to get detailed information about
  3785. // the error.
  3786. //
  3787. // See the AWS API reference guide for Amazon Comprehend's
  3788. // API operation StopTrainingDocumentClassifier for usage and error information.
  3789. //
  3790. // Returned Error Codes:
  3791. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3792. // The request is invalid.
  3793. //
  3794. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3795. // The number of requests exceeds the limit. Resubmit your request later.
  3796. //
  3797. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3798. // The specified resource ARN was not found. Check the ARN and try your request
  3799. // again.
  3800. //
  3801. // * ErrCodeInternalServerException "InternalServerException"
  3802. // An internal server error occurred. Retry your request.
  3803. //
  3804. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingDocumentClassifier
  3805. func (c *Comprehend) StopTrainingDocumentClassifier(input *StopTrainingDocumentClassifierInput) (*StopTrainingDocumentClassifierOutput, error) {
  3806. req, out := c.StopTrainingDocumentClassifierRequest(input)
  3807. return out, req.Send()
  3808. }
  3809. // StopTrainingDocumentClassifierWithContext is the same as StopTrainingDocumentClassifier with the addition of
  3810. // the ability to pass a context and additional request options.
  3811. //
  3812. // See StopTrainingDocumentClassifier for details on how to use this API operation.
  3813. //
  3814. // The context must be non-nil and will be used for request cancellation. If
  3815. // the context is nil a panic will occur. In the future the SDK may create
  3816. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3817. // for more information on using Contexts.
  3818. func (c *Comprehend) StopTrainingDocumentClassifierWithContext(ctx aws.Context, input *StopTrainingDocumentClassifierInput, opts ...request.Option) (*StopTrainingDocumentClassifierOutput, error) {
  3819. req, out := c.StopTrainingDocumentClassifierRequest(input)
  3820. req.SetContext(ctx)
  3821. req.ApplyOptions(opts...)
  3822. return out, req.Send()
  3823. }
  3824. const opStopTrainingEntityRecognizer = "StopTrainingEntityRecognizer"
  3825. // StopTrainingEntityRecognizerRequest generates a "aws/request.Request" representing the
  3826. // client's request for the StopTrainingEntityRecognizer operation. The "output" return
  3827. // value will be populated with the request's response once the request completes
  3828. // successfully.
  3829. //
  3830. // Use "Send" method on the returned Request to send the API call to the service.
  3831. // the "output" return value is not valid until after Send returns without error.
  3832. //
  3833. // See StopTrainingEntityRecognizer for more information on using the StopTrainingEntityRecognizer
  3834. // API call, and error handling.
  3835. //
  3836. // This method is useful when you want to inject custom logic or configuration
  3837. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3838. //
  3839. //
  3840. // // Example sending a request using the StopTrainingEntityRecognizerRequest method.
  3841. // req, resp := client.StopTrainingEntityRecognizerRequest(params)
  3842. //
  3843. // err := req.Send()
  3844. // if err == nil { // resp is now filled
  3845. // fmt.Println(resp)
  3846. // }
  3847. //
  3848. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingEntityRecognizer
  3849. func (c *Comprehend) StopTrainingEntityRecognizerRequest(input *StopTrainingEntityRecognizerInput) (req *request.Request, output *StopTrainingEntityRecognizerOutput) {
  3850. op := &request.Operation{
  3851. Name: opStopTrainingEntityRecognizer,
  3852. HTTPMethod: "POST",
  3853. HTTPPath: "/",
  3854. }
  3855. if input == nil {
  3856. input = &StopTrainingEntityRecognizerInput{}
  3857. }
  3858. output = &StopTrainingEntityRecognizerOutput{}
  3859. req = c.newRequest(op, input, output)
  3860. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3861. return
  3862. }
  3863. // StopTrainingEntityRecognizer API operation for Amazon Comprehend.
  3864. //
  3865. // Stops an entity recognizer training job while in progress.
  3866. //
  3867. // If the training job state is TRAINING, the job is marked for termination
  3868. // and put into the STOP_REQUESTED state. If the training job completes before
  3869. // it can be stopped, it is put into the TRAINED; otherwise the training job
  3870. // is stopped and putted into the STOPPED state and the service sends back an
  3871. // HTTP 200 response with an empty HTTP body.
  3872. //
  3873. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3874. // with awserr.Error's Code and Message methods to get detailed information about
  3875. // the error.
  3876. //
  3877. // See the AWS API reference guide for Amazon Comprehend's
  3878. // API operation StopTrainingEntityRecognizer for usage and error information.
  3879. //
  3880. // Returned Error Codes:
  3881. // * ErrCodeInvalidRequestException "InvalidRequestException"
  3882. // The request is invalid.
  3883. //
  3884. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3885. // The number of requests exceeds the limit. Resubmit your request later.
  3886. //
  3887. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3888. // The specified resource ARN was not found. Check the ARN and try your request
  3889. // again.
  3890. //
  3891. // * ErrCodeInternalServerException "InternalServerException"
  3892. // An internal server error occurred. Retry your request.
  3893. //
  3894. // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingEntityRecognizer
  3895. func (c *Comprehend) StopTrainingEntityRecognizer(input *StopTrainingEntityRecognizerInput) (*StopTrainingEntityRecognizerOutput, error) {
  3896. req, out := c.StopTrainingEntityRecognizerRequest(input)
  3897. return out, req.Send()
  3898. }
  3899. // StopTrainingEntityRecognizerWithContext is the same as StopTrainingEntityRecognizer with the addition of
  3900. // the ability to pass a context and additional request options.
  3901. //
  3902. // See StopTrainingEntityRecognizer for details on how to use this API operation.
  3903. //
  3904. // The context must be non-nil and will be used for request cancellation. If
  3905. // the context is nil a panic will occur. In the future the SDK may create
  3906. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3907. // for more information on using Contexts.
  3908. func (c *Comprehend) StopTrainingEntityRecognizerWithContext(ctx aws.Context, input *StopTrainingEntityRecognizerInput, opts ...request.Option) (*StopTrainingEntityRecognizerOutput, error) {
  3909. req, out := c.StopTrainingEntityRecognizerRequest(input)
  3910. req.SetContext(ctx)
  3911. req.ApplyOptions(opts...)
  3912. return out, req.Send()
  3913. }
  3914. type BatchDetectDominantLanguageInput struct {
  3915. _ struct{} `type:"structure"`
  3916. // A list containing the text of the input documents. The list can contain a
  3917. // maximum of 25 documents. Each document should contain at least 20 characters
  3918. // and must contain fewer than 5,000 bytes of UTF-8 encoded characters.
  3919. //
  3920. // TextList is a required field
  3921. TextList []*string `type:"list" required:"true"`
  3922. }
  3923. // String returns the string representation
  3924. func (s BatchDetectDominantLanguageInput) String() string {
  3925. return awsutil.Prettify(s)
  3926. }
  3927. // GoString returns the string representation
  3928. func (s BatchDetectDominantLanguageInput) GoString() string {
  3929. return s.String()
  3930. }
  3931. // Validate inspects the fields of the type to determine if they are valid.
  3932. func (s *BatchDetectDominantLanguageInput) Validate() error {
  3933. invalidParams := request.ErrInvalidParams{Context: "BatchDetectDominantLanguageInput"}
  3934. if s.TextList == nil {
  3935. invalidParams.Add(request.NewErrParamRequired("TextList"))
  3936. }
  3937. if invalidParams.Len() > 0 {
  3938. return invalidParams
  3939. }
  3940. return nil
  3941. }
  3942. // SetTextList sets the TextList field's value.
  3943. func (s *BatchDetectDominantLanguageInput) SetTextList(v []*string) *BatchDetectDominantLanguageInput {
  3944. s.TextList = v
  3945. return s
  3946. }
  3947. // The result of calling the operation. The operation returns one object for
  3948. // each document that is successfully processed by the operation.
  3949. type BatchDetectDominantLanguageItemResult struct {
  3950. _ struct{} `type:"structure"`
  3951. // The zero-based index of the document in the input list.
  3952. Index *int64 `type:"integer"`
  3953. // One or more DominantLanguage objects describing the dominant languages in
  3954. // the document.
  3955. Languages []*DominantLanguage `type:"list"`
  3956. }
  3957. // String returns the string representation
  3958. func (s BatchDetectDominantLanguageItemResult) String() string {
  3959. return awsutil.Prettify(s)
  3960. }
  3961. // GoString returns the string representation
  3962. func (s BatchDetectDominantLanguageItemResult) GoString() string {
  3963. return s.String()
  3964. }
  3965. // SetIndex sets the Index field's value.
  3966. func (s *BatchDetectDominantLanguageItemResult) SetIndex(v int64) *BatchDetectDominantLanguageItemResult {
  3967. s.Index = &v
  3968. return s
  3969. }
  3970. // SetLanguages sets the Languages field's value.
  3971. func (s *BatchDetectDominantLanguageItemResult) SetLanguages(v []*DominantLanguage) *BatchDetectDominantLanguageItemResult {
  3972. s.Languages = v
  3973. return s
  3974. }
  3975. type BatchDetectDominantLanguageOutput struct {
  3976. _ struct{} `type:"structure"`
  3977. // A list containing one object for each document that contained an error. The
  3978. // results are sorted in ascending order by the Index field and match the order
  3979. // of the documents in the input list. If there are no errors in the batch,
  3980. // the ErrorList is empty.
  3981. //
  3982. // ErrorList is a required field
  3983. ErrorList []*BatchItemError `type:"list" required:"true"`
  3984. // A list of objects containing the results of the operation. The results are
  3985. // sorted in ascending order by the Index field and match the order of the documents
  3986. // in the input list. If all of the documents contain an error, the ResultList
  3987. // is empty.
  3988. //
  3989. // ResultList is a required field
  3990. ResultList []*BatchDetectDominantLanguageItemResult `type:"list" required:"true"`
  3991. }
  3992. // String returns the string representation
  3993. func (s BatchDetectDominantLanguageOutput) String() string {
  3994. return awsutil.Prettify(s)
  3995. }
  3996. // GoString returns the string representation
  3997. func (s BatchDetectDominantLanguageOutput) GoString() string {
  3998. return s.String()
  3999. }
  4000. // SetErrorList sets the ErrorList field's value.
  4001. func (s *BatchDetectDominantLanguageOutput) SetErrorList(v []*BatchItemError) *BatchDetectDominantLanguageOutput {
  4002. s.ErrorList = v
  4003. return s
  4004. }
  4005. // SetResultList sets the ResultList field's value.
  4006. func (s *BatchDetectDominantLanguageOutput) SetResultList(v []*BatchDetectDominantLanguageItemResult) *BatchDetectDominantLanguageOutput {
  4007. s.ResultList = v
  4008. return s
  4009. }
  4010. type BatchDetectEntitiesInput struct {
  4011. _ struct{} `type:"structure"`
  4012. // The language of the input documents. You can specify English ("en") or Spanish
  4013. // ("es"). All documents must be in the same language.
  4014. //
  4015. // LanguageCode is a required field
  4016. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  4017. // A list containing the text of the input documents. The list can contain a
  4018. // maximum of 25 documents. Each document must contain fewer than 5,000 bytes
  4019. // of UTF-8 encoded characters.
  4020. //
  4021. // TextList is a required field
  4022. TextList []*string `type:"list" required:"true"`
  4023. }
  4024. // String returns the string representation
  4025. func (s BatchDetectEntitiesInput) String() string {
  4026. return awsutil.Prettify(s)
  4027. }
  4028. // GoString returns the string representation
  4029. func (s BatchDetectEntitiesInput) GoString() string {
  4030. return s.String()
  4031. }
  4032. // Validate inspects the fields of the type to determine if they are valid.
  4033. func (s *BatchDetectEntitiesInput) Validate() error {
  4034. invalidParams := request.ErrInvalidParams{Context: "BatchDetectEntitiesInput"}
  4035. if s.LanguageCode == nil {
  4036. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  4037. }
  4038. if s.TextList == nil {
  4039. invalidParams.Add(request.NewErrParamRequired("TextList"))
  4040. }
  4041. if invalidParams.Len() > 0 {
  4042. return invalidParams
  4043. }
  4044. return nil
  4045. }
  4046. // SetLanguageCode sets the LanguageCode field's value.
  4047. func (s *BatchDetectEntitiesInput) SetLanguageCode(v string) *BatchDetectEntitiesInput {
  4048. s.LanguageCode = &v
  4049. return s
  4050. }
  4051. // SetTextList sets the TextList field's value.
  4052. func (s *BatchDetectEntitiesInput) SetTextList(v []*string) *BatchDetectEntitiesInput {
  4053. s.TextList = v
  4054. return s
  4055. }
  4056. // The result of calling the operation. The operation returns one object for
  4057. // each document that is successfully processed by the operation.
  4058. type BatchDetectEntitiesItemResult struct {
  4059. _ struct{} `type:"structure"`
  4060. // One or more Entity objects, one for each entity detected in the document.
  4061. Entities []*Entity `type:"list"`
  4062. // The zero-based index of the document in the input list.
  4063. Index *int64 `type:"integer"`
  4064. }
  4065. // String returns the string representation
  4066. func (s BatchDetectEntitiesItemResult) String() string {
  4067. return awsutil.Prettify(s)
  4068. }
  4069. // GoString returns the string representation
  4070. func (s BatchDetectEntitiesItemResult) GoString() string {
  4071. return s.String()
  4072. }
  4073. // SetEntities sets the Entities field's value.
  4074. func (s *BatchDetectEntitiesItemResult) SetEntities(v []*Entity) *BatchDetectEntitiesItemResult {
  4075. s.Entities = v
  4076. return s
  4077. }
  4078. // SetIndex sets the Index field's value.
  4079. func (s *BatchDetectEntitiesItemResult) SetIndex(v int64) *BatchDetectEntitiesItemResult {
  4080. s.Index = &v
  4081. return s
  4082. }
  4083. type BatchDetectEntitiesOutput struct {
  4084. _ struct{} `type:"structure"`
  4085. // A list containing one object for each document that contained an error. The
  4086. // results are sorted in ascending order by the Index field and match the order
  4087. // of the documents in the input list. If there are no errors in the batch,
  4088. // the ErrorList is empty.
  4089. //
  4090. // ErrorList is a required field
  4091. ErrorList []*BatchItemError `type:"list" required:"true"`
  4092. // A list of objects containing the results of the operation. The results are
  4093. // sorted in ascending order by the Index field and match the order of the documents
  4094. // in the input list. If all of the documents contain an error, the ResultList
  4095. // is empty.
  4096. //
  4097. // ResultList is a required field
  4098. ResultList []*BatchDetectEntitiesItemResult `type:"list" required:"true"`
  4099. }
  4100. // String returns the string representation
  4101. func (s BatchDetectEntitiesOutput) String() string {
  4102. return awsutil.Prettify(s)
  4103. }
  4104. // GoString returns the string representation
  4105. func (s BatchDetectEntitiesOutput) GoString() string {
  4106. return s.String()
  4107. }
  4108. // SetErrorList sets the ErrorList field's value.
  4109. func (s *BatchDetectEntitiesOutput) SetErrorList(v []*BatchItemError) *BatchDetectEntitiesOutput {
  4110. s.ErrorList = v
  4111. return s
  4112. }
  4113. // SetResultList sets the ResultList field's value.
  4114. func (s *BatchDetectEntitiesOutput) SetResultList(v []*BatchDetectEntitiesItemResult) *BatchDetectEntitiesOutput {
  4115. s.ResultList = v
  4116. return s
  4117. }
  4118. type BatchDetectKeyPhrasesInput struct {
  4119. _ struct{} `type:"structure"`
  4120. // The language of the input documents. You can specify English ("en") or Spanish
  4121. // ("es"). All documents must be in the same language.
  4122. //
  4123. // LanguageCode is a required field
  4124. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  4125. // A list containing the text of the input documents. The list can contain a
  4126. // maximum of 25 documents. Each document must contain fewer that 5,000 bytes
  4127. // of UTF-8 encoded characters.
  4128. //
  4129. // TextList is a required field
  4130. TextList []*string `type:"list" required:"true"`
  4131. }
  4132. // String returns the string representation
  4133. func (s BatchDetectKeyPhrasesInput) String() string {
  4134. return awsutil.Prettify(s)
  4135. }
  4136. // GoString returns the string representation
  4137. func (s BatchDetectKeyPhrasesInput) GoString() string {
  4138. return s.String()
  4139. }
  4140. // Validate inspects the fields of the type to determine if they are valid.
  4141. func (s *BatchDetectKeyPhrasesInput) Validate() error {
  4142. invalidParams := request.ErrInvalidParams{Context: "BatchDetectKeyPhrasesInput"}
  4143. if s.LanguageCode == nil {
  4144. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  4145. }
  4146. if s.TextList == nil {
  4147. invalidParams.Add(request.NewErrParamRequired("TextList"))
  4148. }
  4149. if invalidParams.Len() > 0 {
  4150. return invalidParams
  4151. }
  4152. return nil
  4153. }
  4154. // SetLanguageCode sets the LanguageCode field's value.
  4155. func (s *BatchDetectKeyPhrasesInput) SetLanguageCode(v string) *BatchDetectKeyPhrasesInput {
  4156. s.LanguageCode = &v
  4157. return s
  4158. }
  4159. // SetTextList sets the TextList field's value.
  4160. func (s *BatchDetectKeyPhrasesInput) SetTextList(v []*string) *BatchDetectKeyPhrasesInput {
  4161. s.TextList = v
  4162. return s
  4163. }
  4164. // The result of calling the operation. The operation returns one object for
  4165. // each document that is successfully processed by the operation.
  4166. type BatchDetectKeyPhrasesItemResult struct {
  4167. _ struct{} `type:"structure"`
  4168. // The zero-based index of the document in the input list.
  4169. Index *int64 `type:"integer"`
  4170. // One or more KeyPhrase objects, one for each key phrase detected in the document.
  4171. KeyPhrases []*KeyPhrase `type:"list"`
  4172. }
  4173. // String returns the string representation
  4174. func (s BatchDetectKeyPhrasesItemResult) String() string {
  4175. return awsutil.Prettify(s)
  4176. }
  4177. // GoString returns the string representation
  4178. func (s BatchDetectKeyPhrasesItemResult) GoString() string {
  4179. return s.String()
  4180. }
  4181. // SetIndex sets the Index field's value.
  4182. func (s *BatchDetectKeyPhrasesItemResult) SetIndex(v int64) *BatchDetectKeyPhrasesItemResult {
  4183. s.Index = &v
  4184. return s
  4185. }
  4186. // SetKeyPhrases sets the KeyPhrases field's value.
  4187. func (s *BatchDetectKeyPhrasesItemResult) SetKeyPhrases(v []*KeyPhrase) *BatchDetectKeyPhrasesItemResult {
  4188. s.KeyPhrases = v
  4189. return s
  4190. }
  4191. type BatchDetectKeyPhrasesOutput struct {
  4192. _ struct{} `type:"structure"`
  4193. // A list containing one object for each document that contained an error. The
  4194. // results are sorted in ascending order by the Index field and match the order
  4195. // of the documents in the input list. If there are no errors in the batch,
  4196. // the ErrorList is empty.
  4197. //
  4198. // ErrorList is a required field
  4199. ErrorList []*BatchItemError `type:"list" required:"true"`
  4200. // A list of objects containing the results of the operation. The results are
  4201. // sorted in ascending order by the Index field and match the order of the documents
  4202. // in the input list. If all of the documents contain an error, the ResultList
  4203. // is empty.
  4204. //
  4205. // ResultList is a required field
  4206. ResultList []*BatchDetectKeyPhrasesItemResult `type:"list" required:"true"`
  4207. }
  4208. // String returns the string representation
  4209. func (s BatchDetectKeyPhrasesOutput) String() string {
  4210. return awsutil.Prettify(s)
  4211. }
  4212. // GoString returns the string representation
  4213. func (s BatchDetectKeyPhrasesOutput) GoString() string {
  4214. return s.String()
  4215. }
  4216. // SetErrorList sets the ErrorList field's value.
  4217. func (s *BatchDetectKeyPhrasesOutput) SetErrorList(v []*BatchItemError) *BatchDetectKeyPhrasesOutput {
  4218. s.ErrorList = v
  4219. return s
  4220. }
  4221. // SetResultList sets the ResultList field's value.
  4222. func (s *BatchDetectKeyPhrasesOutput) SetResultList(v []*BatchDetectKeyPhrasesItemResult) *BatchDetectKeyPhrasesOutput {
  4223. s.ResultList = v
  4224. return s
  4225. }
  4226. type BatchDetectSentimentInput struct {
  4227. _ struct{} `type:"structure"`
  4228. // The language of the input documents. You can specify English ("en") or Spanish
  4229. // ("es"). All documents must be in the same language.
  4230. //
  4231. // LanguageCode is a required field
  4232. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  4233. // A list containing the text of the input documents. The list can contain a
  4234. // maximum of 25 documents. Each document must contain fewer that 5,000 bytes
  4235. // of UTF-8 encoded characters.
  4236. //
  4237. // TextList is a required field
  4238. TextList []*string `type:"list" required:"true"`
  4239. }
  4240. // String returns the string representation
  4241. func (s BatchDetectSentimentInput) String() string {
  4242. return awsutil.Prettify(s)
  4243. }
  4244. // GoString returns the string representation
  4245. func (s BatchDetectSentimentInput) GoString() string {
  4246. return s.String()
  4247. }
  4248. // Validate inspects the fields of the type to determine if they are valid.
  4249. func (s *BatchDetectSentimentInput) Validate() error {
  4250. invalidParams := request.ErrInvalidParams{Context: "BatchDetectSentimentInput"}
  4251. if s.LanguageCode == nil {
  4252. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  4253. }
  4254. if s.TextList == nil {
  4255. invalidParams.Add(request.NewErrParamRequired("TextList"))
  4256. }
  4257. if invalidParams.Len() > 0 {
  4258. return invalidParams
  4259. }
  4260. return nil
  4261. }
  4262. // SetLanguageCode sets the LanguageCode field's value.
  4263. func (s *BatchDetectSentimentInput) SetLanguageCode(v string) *BatchDetectSentimentInput {
  4264. s.LanguageCode = &v
  4265. return s
  4266. }
  4267. // SetTextList sets the TextList field's value.
  4268. func (s *BatchDetectSentimentInput) SetTextList(v []*string) *BatchDetectSentimentInput {
  4269. s.TextList = v
  4270. return s
  4271. }
  4272. // The result of calling the operation. The operation returns one object for
  4273. // each document that is successfully processed by the operation.
  4274. type BatchDetectSentimentItemResult struct {
  4275. _ struct{} `type:"structure"`
  4276. // The zero-based index of the document in the input list.
  4277. Index *int64 `type:"integer"`
  4278. // The sentiment detected in the document.
  4279. Sentiment *string `type:"string" enum:"SentimentType"`
  4280. // The level of confidence that Amazon Comprehend has in the accuracy of its
  4281. // sentiment detection.
  4282. SentimentScore *SentimentScore `type:"structure"`
  4283. }
  4284. // String returns the string representation
  4285. func (s BatchDetectSentimentItemResult) String() string {
  4286. return awsutil.Prettify(s)
  4287. }
  4288. // GoString returns the string representation
  4289. func (s BatchDetectSentimentItemResult) GoString() string {
  4290. return s.String()
  4291. }
  4292. // SetIndex sets the Index field's value.
  4293. func (s *BatchDetectSentimentItemResult) SetIndex(v int64) *BatchDetectSentimentItemResult {
  4294. s.Index = &v
  4295. return s
  4296. }
  4297. // SetSentiment sets the Sentiment field's value.
  4298. func (s *BatchDetectSentimentItemResult) SetSentiment(v string) *BatchDetectSentimentItemResult {
  4299. s.Sentiment = &v
  4300. return s
  4301. }
  4302. // SetSentimentScore sets the SentimentScore field's value.
  4303. func (s *BatchDetectSentimentItemResult) SetSentimentScore(v *SentimentScore) *BatchDetectSentimentItemResult {
  4304. s.SentimentScore = v
  4305. return s
  4306. }
  4307. type BatchDetectSentimentOutput struct {
  4308. _ struct{} `type:"structure"`
  4309. // A list containing one object for each document that contained an error. The
  4310. // results are sorted in ascending order by the Index field and match the order
  4311. // of the documents in the input list. If there are no errors in the batch,
  4312. // the ErrorList is empty.
  4313. //
  4314. // ErrorList is a required field
  4315. ErrorList []*BatchItemError `type:"list" required:"true"`
  4316. // A list of objects containing the results of the operation. The results are
  4317. // sorted in ascending order by the Index field and match the order of the documents
  4318. // in the input list. If all of the documents contain an error, the ResultList
  4319. // is empty.
  4320. //
  4321. // ResultList is a required field
  4322. ResultList []*BatchDetectSentimentItemResult `type:"list" required:"true"`
  4323. }
  4324. // String returns the string representation
  4325. func (s BatchDetectSentimentOutput) String() string {
  4326. return awsutil.Prettify(s)
  4327. }
  4328. // GoString returns the string representation
  4329. func (s BatchDetectSentimentOutput) GoString() string {
  4330. return s.String()
  4331. }
  4332. // SetErrorList sets the ErrorList field's value.
  4333. func (s *BatchDetectSentimentOutput) SetErrorList(v []*BatchItemError) *BatchDetectSentimentOutput {
  4334. s.ErrorList = v
  4335. return s
  4336. }
  4337. // SetResultList sets the ResultList field's value.
  4338. func (s *BatchDetectSentimentOutput) SetResultList(v []*BatchDetectSentimentItemResult) *BatchDetectSentimentOutput {
  4339. s.ResultList = v
  4340. return s
  4341. }
  4342. type BatchDetectSyntaxInput struct {
  4343. _ struct{} `type:"structure"`
  4344. // The language of the input documents. You can specify English ("en") or Spanish
  4345. // ("es"). All documents must be in the same language.
  4346. //
  4347. // LanguageCode is a required field
  4348. LanguageCode *string `type:"string" required:"true" enum:"SyntaxLanguageCode"`
  4349. // A list containing the text of the input documents. The list can contain a
  4350. // maximum of 25 documents. Each document must contain fewer that 5,000 bytes
  4351. // of UTF-8 encoded characters.
  4352. //
  4353. // TextList is a required field
  4354. TextList []*string `type:"list" required:"true"`
  4355. }
  4356. // String returns the string representation
  4357. func (s BatchDetectSyntaxInput) String() string {
  4358. return awsutil.Prettify(s)
  4359. }
  4360. // GoString returns the string representation
  4361. func (s BatchDetectSyntaxInput) GoString() string {
  4362. return s.String()
  4363. }
  4364. // Validate inspects the fields of the type to determine if they are valid.
  4365. func (s *BatchDetectSyntaxInput) Validate() error {
  4366. invalidParams := request.ErrInvalidParams{Context: "BatchDetectSyntaxInput"}
  4367. if s.LanguageCode == nil {
  4368. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  4369. }
  4370. if s.TextList == nil {
  4371. invalidParams.Add(request.NewErrParamRequired("TextList"))
  4372. }
  4373. if invalidParams.Len() > 0 {
  4374. return invalidParams
  4375. }
  4376. return nil
  4377. }
  4378. // SetLanguageCode sets the LanguageCode field's value.
  4379. func (s *BatchDetectSyntaxInput) SetLanguageCode(v string) *BatchDetectSyntaxInput {
  4380. s.LanguageCode = &v
  4381. return s
  4382. }
  4383. // SetTextList sets the TextList field's value.
  4384. func (s *BatchDetectSyntaxInput) SetTextList(v []*string) *BatchDetectSyntaxInput {
  4385. s.TextList = v
  4386. return s
  4387. }
  4388. // The result of calling the operation. The operation returns one object that
  4389. // is successfully processed by the operation.
  4390. type BatchDetectSyntaxItemResult struct {
  4391. _ struct{} `type:"structure"`
  4392. // The zero-based index of the document in the input list.
  4393. Index *int64 `type:"integer"`
  4394. // The syntax tokens for the words in the document, one token for each word.
  4395. SyntaxTokens []*SyntaxToken `type:"list"`
  4396. }
  4397. // String returns the string representation
  4398. func (s BatchDetectSyntaxItemResult) String() string {
  4399. return awsutil.Prettify(s)
  4400. }
  4401. // GoString returns the string representation
  4402. func (s BatchDetectSyntaxItemResult) GoString() string {
  4403. return s.String()
  4404. }
  4405. // SetIndex sets the Index field's value.
  4406. func (s *BatchDetectSyntaxItemResult) SetIndex(v int64) *BatchDetectSyntaxItemResult {
  4407. s.Index = &v
  4408. return s
  4409. }
  4410. // SetSyntaxTokens sets the SyntaxTokens field's value.
  4411. func (s *BatchDetectSyntaxItemResult) SetSyntaxTokens(v []*SyntaxToken) *BatchDetectSyntaxItemResult {
  4412. s.SyntaxTokens = v
  4413. return s
  4414. }
  4415. type BatchDetectSyntaxOutput struct {
  4416. _ struct{} `type:"structure"`
  4417. // A list containing one object for each document that contained an error. The
  4418. // results are sorted in ascending order by the Index field and match the order
  4419. // of the documents in the input list. If there are no errors in the batch,
  4420. // the ErrorList is empty.
  4421. //
  4422. // ErrorList is a required field
  4423. ErrorList []*BatchItemError `type:"list" required:"true"`
  4424. // A list of objects containing the results of the operation. The results are
  4425. // sorted in ascending order by the Index field and match the order of the documents
  4426. // in the input list. If all of the documents contain an error, the ResultList
  4427. // is empty.
  4428. //
  4429. // ResultList is a required field
  4430. ResultList []*BatchDetectSyntaxItemResult `type:"list" required:"true"`
  4431. }
  4432. // String returns the string representation
  4433. func (s BatchDetectSyntaxOutput) String() string {
  4434. return awsutil.Prettify(s)
  4435. }
  4436. // GoString returns the string representation
  4437. func (s BatchDetectSyntaxOutput) GoString() string {
  4438. return s.String()
  4439. }
  4440. // SetErrorList sets the ErrorList field's value.
  4441. func (s *BatchDetectSyntaxOutput) SetErrorList(v []*BatchItemError) *BatchDetectSyntaxOutput {
  4442. s.ErrorList = v
  4443. return s
  4444. }
  4445. // SetResultList sets the ResultList field's value.
  4446. func (s *BatchDetectSyntaxOutput) SetResultList(v []*BatchDetectSyntaxItemResult) *BatchDetectSyntaxOutput {
  4447. s.ResultList = v
  4448. return s
  4449. }
  4450. // Describes an error that occurred while processing a document in a batch.
  4451. // The operation returns on BatchItemError object for each document that contained
  4452. // an error.
  4453. type BatchItemError struct {
  4454. _ struct{} `type:"structure"`
  4455. // The numeric error code of the error.
  4456. ErrorCode *string `min:"1" type:"string"`
  4457. // A text description of the error.
  4458. ErrorMessage *string `min:"1" type:"string"`
  4459. // The zero-based index of the document in the input list.
  4460. Index *int64 `type:"integer"`
  4461. }
  4462. // String returns the string representation
  4463. func (s BatchItemError) String() string {
  4464. return awsutil.Prettify(s)
  4465. }
  4466. // GoString returns the string representation
  4467. func (s BatchItemError) GoString() string {
  4468. return s.String()
  4469. }
  4470. // SetErrorCode sets the ErrorCode field's value.
  4471. func (s *BatchItemError) SetErrorCode(v string) *BatchItemError {
  4472. s.ErrorCode = &v
  4473. return s
  4474. }
  4475. // SetErrorMessage sets the ErrorMessage field's value.
  4476. func (s *BatchItemError) SetErrorMessage(v string) *BatchItemError {
  4477. s.ErrorMessage = &v
  4478. return s
  4479. }
  4480. // SetIndex sets the Index field's value.
  4481. func (s *BatchItemError) SetIndex(v int64) *BatchItemError {
  4482. s.Index = &v
  4483. return s
  4484. }
  4485. // Describes the result metrics for the test data associated with an documentation
  4486. // classifier.
  4487. type ClassifierEvaluationMetrics struct {
  4488. _ struct{} `type:"structure"`
  4489. // The fraction of the labels that were correct recognized. It is computed by
  4490. // dividing the number of labels in the test documents that were correctly recognized
  4491. // by the total number of labels in the test documents.
  4492. Accuracy *float64 `type:"double"`
  4493. // A measure of how accurate the classifier results are for the test data. It
  4494. // is derived from the Precision and Recall values. The F1Score is the harmonic
  4495. // average of the two scores. The highest score is 1, and the worst score is
  4496. // 0.
  4497. F1Score *float64 `type:"double"`
  4498. // A measure of the usefulness of the classifier results in the test data. High
  4499. // precision means that the classifier returned substantially more relevant
  4500. // results than irrelevant ones.
  4501. Precision *float64 `type:"double"`
  4502. // A measure of how complete the classifier results are for the test data. High
  4503. // recall means that the classifier returned most of the relevant results.
  4504. Recall *float64 `type:"double"`
  4505. }
  4506. // String returns the string representation
  4507. func (s ClassifierEvaluationMetrics) String() string {
  4508. return awsutil.Prettify(s)
  4509. }
  4510. // GoString returns the string representation
  4511. func (s ClassifierEvaluationMetrics) GoString() string {
  4512. return s.String()
  4513. }
  4514. // SetAccuracy sets the Accuracy field's value.
  4515. func (s *ClassifierEvaluationMetrics) SetAccuracy(v float64) *ClassifierEvaluationMetrics {
  4516. s.Accuracy = &v
  4517. return s
  4518. }
  4519. // SetF1Score sets the F1Score field's value.
  4520. func (s *ClassifierEvaluationMetrics) SetF1Score(v float64) *ClassifierEvaluationMetrics {
  4521. s.F1Score = &v
  4522. return s
  4523. }
  4524. // SetPrecision sets the Precision field's value.
  4525. func (s *ClassifierEvaluationMetrics) SetPrecision(v float64) *ClassifierEvaluationMetrics {
  4526. s.Precision = &v
  4527. return s
  4528. }
  4529. // SetRecall sets the Recall field's value.
  4530. func (s *ClassifierEvaluationMetrics) SetRecall(v float64) *ClassifierEvaluationMetrics {
  4531. s.Recall = &v
  4532. return s
  4533. }
  4534. // Provides information about a document classifier.
  4535. type ClassifierMetadata struct {
  4536. _ struct{} `type:"structure"`
  4537. // Describes the result metrics for the test data associated with an documentation
  4538. // classifier.
  4539. EvaluationMetrics *ClassifierEvaluationMetrics `type:"structure"`
  4540. // The number of labels in the input data.
  4541. NumberOfLabels *int64 `type:"integer"`
  4542. // The number of documents in the input data that were used to test the classifier.
  4543. // Typically this is 10 to 20 percent of the input documents.
  4544. NumberOfTestDocuments *int64 `type:"integer"`
  4545. // The number of documents in the input data that were used to train the classifier.
  4546. // Typically this is 80 to 90 percent of the input documents.
  4547. NumberOfTrainedDocuments *int64 `type:"integer"`
  4548. }
  4549. // String returns the string representation
  4550. func (s ClassifierMetadata) String() string {
  4551. return awsutil.Prettify(s)
  4552. }
  4553. // GoString returns the string representation
  4554. func (s ClassifierMetadata) GoString() string {
  4555. return s.String()
  4556. }
  4557. // SetEvaluationMetrics sets the EvaluationMetrics field's value.
  4558. func (s *ClassifierMetadata) SetEvaluationMetrics(v *ClassifierEvaluationMetrics) *ClassifierMetadata {
  4559. s.EvaluationMetrics = v
  4560. return s
  4561. }
  4562. // SetNumberOfLabels sets the NumberOfLabels field's value.
  4563. func (s *ClassifierMetadata) SetNumberOfLabels(v int64) *ClassifierMetadata {
  4564. s.NumberOfLabels = &v
  4565. return s
  4566. }
  4567. // SetNumberOfTestDocuments sets the NumberOfTestDocuments field's value.
  4568. func (s *ClassifierMetadata) SetNumberOfTestDocuments(v int64) *ClassifierMetadata {
  4569. s.NumberOfTestDocuments = &v
  4570. return s
  4571. }
  4572. // SetNumberOfTrainedDocuments sets the NumberOfTrainedDocuments field's value.
  4573. func (s *ClassifierMetadata) SetNumberOfTrainedDocuments(v int64) *ClassifierMetadata {
  4574. s.NumberOfTrainedDocuments = &v
  4575. return s
  4576. }
  4577. type CreateDocumentClassifierInput struct {
  4578. _ struct{} `type:"structure"`
  4579. // A unique identifier for the request. If you don't set the client request
  4580. // token, Amazon Comprehend generates one.
  4581. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  4582. // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role
  4583. // that grants Amazon Comprehend read access to your input data.
  4584. //
  4585. // DataAccessRoleArn is a required field
  4586. DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
  4587. // The name of the document classifier.
  4588. //
  4589. // DocumentClassifierName is a required field
  4590. DocumentClassifierName *string `type:"string" required:"true"`
  4591. // Specifies the format and location of the input data for the job.
  4592. //
  4593. // InputDataConfig is a required field
  4594. InputDataConfig *DocumentClassifierInputDataConfig `type:"structure" required:"true"`
  4595. // The language of the input documents. You can specify English ("en") or Spanish
  4596. // ("es"). All documents must be in the same language.
  4597. //
  4598. // LanguageCode is a required field
  4599. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  4600. }
  4601. // String returns the string representation
  4602. func (s CreateDocumentClassifierInput) String() string {
  4603. return awsutil.Prettify(s)
  4604. }
  4605. // GoString returns the string representation
  4606. func (s CreateDocumentClassifierInput) GoString() string {
  4607. return s.String()
  4608. }
  4609. // Validate inspects the fields of the type to determine if they are valid.
  4610. func (s *CreateDocumentClassifierInput) Validate() error {
  4611. invalidParams := request.ErrInvalidParams{Context: "CreateDocumentClassifierInput"}
  4612. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  4613. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  4614. }
  4615. if s.DataAccessRoleArn == nil {
  4616. invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
  4617. }
  4618. if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
  4619. invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
  4620. }
  4621. if s.DocumentClassifierName == nil {
  4622. invalidParams.Add(request.NewErrParamRequired("DocumentClassifierName"))
  4623. }
  4624. if s.InputDataConfig == nil {
  4625. invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
  4626. }
  4627. if s.LanguageCode == nil {
  4628. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  4629. }
  4630. if s.InputDataConfig != nil {
  4631. if err := s.InputDataConfig.Validate(); err != nil {
  4632. invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
  4633. }
  4634. }
  4635. if invalidParams.Len() > 0 {
  4636. return invalidParams
  4637. }
  4638. return nil
  4639. }
  4640. // SetClientRequestToken sets the ClientRequestToken field's value.
  4641. func (s *CreateDocumentClassifierInput) SetClientRequestToken(v string) *CreateDocumentClassifierInput {
  4642. s.ClientRequestToken = &v
  4643. return s
  4644. }
  4645. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  4646. func (s *CreateDocumentClassifierInput) SetDataAccessRoleArn(v string) *CreateDocumentClassifierInput {
  4647. s.DataAccessRoleArn = &v
  4648. return s
  4649. }
  4650. // SetDocumentClassifierName sets the DocumentClassifierName field's value.
  4651. func (s *CreateDocumentClassifierInput) SetDocumentClassifierName(v string) *CreateDocumentClassifierInput {
  4652. s.DocumentClassifierName = &v
  4653. return s
  4654. }
  4655. // SetInputDataConfig sets the InputDataConfig field's value.
  4656. func (s *CreateDocumentClassifierInput) SetInputDataConfig(v *DocumentClassifierInputDataConfig) *CreateDocumentClassifierInput {
  4657. s.InputDataConfig = v
  4658. return s
  4659. }
  4660. // SetLanguageCode sets the LanguageCode field's value.
  4661. func (s *CreateDocumentClassifierInput) SetLanguageCode(v string) *CreateDocumentClassifierInput {
  4662. s.LanguageCode = &v
  4663. return s
  4664. }
  4665. type CreateDocumentClassifierOutput struct {
  4666. _ struct{} `type:"structure"`
  4667. // The Amazon Resource Name (ARN) that identifies the document classifier.
  4668. DocumentClassifierArn *string `type:"string"`
  4669. }
  4670. // String returns the string representation
  4671. func (s CreateDocumentClassifierOutput) String() string {
  4672. return awsutil.Prettify(s)
  4673. }
  4674. // GoString returns the string representation
  4675. func (s CreateDocumentClassifierOutput) GoString() string {
  4676. return s.String()
  4677. }
  4678. // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
  4679. func (s *CreateDocumentClassifierOutput) SetDocumentClassifierArn(v string) *CreateDocumentClassifierOutput {
  4680. s.DocumentClassifierArn = &v
  4681. return s
  4682. }
  4683. type CreateEntityRecognizerInput struct {
  4684. _ struct{} `type:"structure"`
  4685. // A unique identifier for the request. If you don't set the client request
  4686. // token, Amazon Comprehend generates one.
  4687. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  4688. // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role
  4689. // that grants Amazon Comprehend read access to your input data.
  4690. //
  4691. // DataAccessRoleArn is a required field
  4692. DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
  4693. // Specifies the format and location of the input data. The S3 bucket containing
  4694. // the input data must be located in the same region as the entity recognizer
  4695. // being created.
  4696. //
  4697. // InputDataConfig is a required field
  4698. InputDataConfig *EntityRecognizerInputDataConfig `type:"structure" required:"true"`
  4699. // The language of the input documents. All documents must be in the same language.
  4700. // Only English ("en") is currently supported.
  4701. //
  4702. // LanguageCode is a required field
  4703. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  4704. // The name given to the newly created recognizer. Recognizer names can be a
  4705. // maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores
  4706. // (_) are allowed. The name must be unique in the account/region.
  4707. //
  4708. // RecognizerName is a required field
  4709. RecognizerName *string `type:"string" required:"true"`
  4710. }
  4711. // String returns the string representation
  4712. func (s CreateEntityRecognizerInput) String() string {
  4713. return awsutil.Prettify(s)
  4714. }
  4715. // GoString returns the string representation
  4716. func (s CreateEntityRecognizerInput) GoString() string {
  4717. return s.String()
  4718. }
  4719. // Validate inspects the fields of the type to determine if they are valid.
  4720. func (s *CreateEntityRecognizerInput) Validate() error {
  4721. invalidParams := request.ErrInvalidParams{Context: "CreateEntityRecognizerInput"}
  4722. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  4723. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  4724. }
  4725. if s.DataAccessRoleArn == nil {
  4726. invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
  4727. }
  4728. if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
  4729. invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
  4730. }
  4731. if s.InputDataConfig == nil {
  4732. invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
  4733. }
  4734. if s.LanguageCode == nil {
  4735. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  4736. }
  4737. if s.RecognizerName == nil {
  4738. invalidParams.Add(request.NewErrParamRequired("RecognizerName"))
  4739. }
  4740. if s.InputDataConfig != nil {
  4741. if err := s.InputDataConfig.Validate(); err != nil {
  4742. invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
  4743. }
  4744. }
  4745. if invalidParams.Len() > 0 {
  4746. return invalidParams
  4747. }
  4748. return nil
  4749. }
  4750. // SetClientRequestToken sets the ClientRequestToken field's value.
  4751. func (s *CreateEntityRecognizerInput) SetClientRequestToken(v string) *CreateEntityRecognizerInput {
  4752. s.ClientRequestToken = &v
  4753. return s
  4754. }
  4755. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  4756. func (s *CreateEntityRecognizerInput) SetDataAccessRoleArn(v string) *CreateEntityRecognizerInput {
  4757. s.DataAccessRoleArn = &v
  4758. return s
  4759. }
  4760. // SetInputDataConfig sets the InputDataConfig field's value.
  4761. func (s *CreateEntityRecognizerInput) SetInputDataConfig(v *EntityRecognizerInputDataConfig) *CreateEntityRecognizerInput {
  4762. s.InputDataConfig = v
  4763. return s
  4764. }
  4765. // SetLanguageCode sets the LanguageCode field's value.
  4766. func (s *CreateEntityRecognizerInput) SetLanguageCode(v string) *CreateEntityRecognizerInput {
  4767. s.LanguageCode = &v
  4768. return s
  4769. }
  4770. // SetRecognizerName sets the RecognizerName field's value.
  4771. func (s *CreateEntityRecognizerInput) SetRecognizerName(v string) *CreateEntityRecognizerInput {
  4772. s.RecognizerName = &v
  4773. return s
  4774. }
  4775. type CreateEntityRecognizerOutput struct {
  4776. _ struct{} `type:"structure"`
  4777. // The Amazon Resource Name (ARN) that identifies the entity recognizer.
  4778. EntityRecognizerArn *string `type:"string"`
  4779. }
  4780. // String returns the string representation
  4781. func (s CreateEntityRecognizerOutput) String() string {
  4782. return awsutil.Prettify(s)
  4783. }
  4784. // GoString returns the string representation
  4785. func (s CreateEntityRecognizerOutput) GoString() string {
  4786. return s.String()
  4787. }
  4788. // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
  4789. func (s *CreateEntityRecognizerOutput) SetEntityRecognizerArn(v string) *CreateEntityRecognizerOutput {
  4790. s.EntityRecognizerArn = &v
  4791. return s
  4792. }
  4793. type DeleteDocumentClassifierInput struct {
  4794. _ struct{} `type:"structure"`
  4795. // The Amazon Resource Name (ARN) that identifies the document classifier.
  4796. //
  4797. // DocumentClassifierArn is a required field
  4798. DocumentClassifierArn *string `type:"string" required:"true"`
  4799. }
  4800. // String returns the string representation
  4801. func (s DeleteDocumentClassifierInput) String() string {
  4802. return awsutil.Prettify(s)
  4803. }
  4804. // GoString returns the string representation
  4805. func (s DeleteDocumentClassifierInput) GoString() string {
  4806. return s.String()
  4807. }
  4808. // Validate inspects the fields of the type to determine if they are valid.
  4809. func (s *DeleteDocumentClassifierInput) Validate() error {
  4810. invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentClassifierInput"}
  4811. if s.DocumentClassifierArn == nil {
  4812. invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn"))
  4813. }
  4814. if invalidParams.Len() > 0 {
  4815. return invalidParams
  4816. }
  4817. return nil
  4818. }
  4819. // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
  4820. func (s *DeleteDocumentClassifierInput) SetDocumentClassifierArn(v string) *DeleteDocumentClassifierInput {
  4821. s.DocumentClassifierArn = &v
  4822. return s
  4823. }
  4824. type DeleteDocumentClassifierOutput struct {
  4825. _ struct{} `type:"structure"`
  4826. }
  4827. // String returns the string representation
  4828. func (s DeleteDocumentClassifierOutput) String() string {
  4829. return awsutil.Prettify(s)
  4830. }
  4831. // GoString returns the string representation
  4832. func (s DeleteDocumentClassifierOutput) GoString() string {
  4833. return s.String()
  4834. }
  4835. type DeleteEntityRecognizerInput struct {
  4836. _ struct{} `type:"structure"`
  4837. // The Amazon Resource Name (ARN) that identifies the entity recognizer.
  4838. //
  4839. // EntityRecognizerArn is a required field
  4840. EntityRecognizerArn *string `type:"string" required:"true"`
  4841. }
  4842. // String returns the string representation
  4843. func (s DeleteEntityRecognizerInput) String() string {
  4844. return awsutil.Prettify(s)
  4845. }
  4846. // GoString returns the string representation
  4847. func (s DeleteEntityRecognizerInput) GoString() string {
  4848. return s.String()
  4849. }
  4850. // Validate inspects the fields of the type to determine if they are valid.
  4851. func (s *DeleteEntityRecognizerInput) Validate() error {
  4852. invalidParams := request.ErrInvalidParams{Context: "DeleteEntityRecognizerInput"}
  4853. if s.EntityRecognizerArn == nil {
  4854. invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn"))
  4855. }
  4856. if invalidParams.Len() > 0 {
  4857. return invalidParams
  4858. }
  4859. return nil
  4860. }
  4861. // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
  4862. func (s *DeleteEntityRecognizerInput) SetEntityRecognizerArn(v string) *DeleteEntityRecognizerInput {
  4863. s.EntityRecognizerArn = &v
  4864. return s
  4865. }
  4866. type DeleteEntityRecognizerOutput struct {
  4867. _ struct{} `type:"structure"`
  4868. }
  4869. // String returns the string representation
  4870. func (s DeleteEntityRecognizerOutput) String() string {
  4871. return awsutil.Prettify(s)
  4872. }
  4873. // GoString returns the string representation
  4874. func (s DeleteEntityRecognizerOutput) GoString() string {
  4875. return s.String()
  4876. }
  4877. type DescribeDocumentClassificationJobInput struct {
  4878. _ struct{} `type:"structure"`
  4879. // The identifier that Amazon Comprehend generated for the job. The operation
  4880. // returns this identifier in its response.
  4881. //
  4882. // JobId is a required field
  4883. JobId *string `min:"1" type:"string" required:"true"`
  4884. }
  4885. // String returns the string representation
  4886. func (s DescribeDocumentClassificationJobInput) String() string {
  4887. return awsutil.Prettify(s)
  4888. }
  4889. // GoString returns the string representation
  4890. func (s DescribeDocumentClassificationJobInput) GoString() string {
  4891. return s.String()
  4892. }
  4893. // Validate inspects the fields of the type to determine if they are valid.
  4894. func (s *DescribeDocumentClassificationJobInput) Validate() error {
  4895. invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentClassificationJobInput"}
  4896. if s.JobId == nil {
  4897. invalidParams.Add(request.NewErrParamRequired("JobId"))
  4898. }
  4899. if s.JobId != nil && len(*s.JobId) < 1 {
  4900. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  4901. }
  4902. if invalidParams.Len() > 0 {
  4903. return invalidParams
  4904. }
  4905. return nil
  4906. }
  4907. // SetJobId sets the JobId field's value.
  4908. func (s *DescribeDocumentClassificationJobInput) SetJobId(v string) *DescribeDocumentClassificationJobInput {
  4909. s.JobId = &v
  4910. return s
  4911. }
  4912. type DescribeDocumentClassificationJobOutput struct {
  4913. _ struct{} `type:"structure"`
  4914. // An object that describes the properties associated with the document classification
  4915. // job.
  4916. DocumentClassificationJobProperties *DocumentClassificationJobProperties `type:"structure"`
  4917. }
  4918. // String returns the string representation
  4919. func (s DescribeDocumentClassificationJobOutput) String() string {
  4920. return awsutil.Prettify(s)
  4921. }
  4922. // GoString returns the string representation
  4923. func (s DescribeDocumentClassificationJobOutput) GoString() string {
  4924. return s.String()
  4925. }
  4926. // SetDocumentClassificationJobProperties sets the DocumentClassificationJobProperties field's value.
  4927. func (s *DescribeDocumentClassificationJobOutput) SetDocumentClassificationJobProperties(v *DocumentClassificationJobProperties) *DescribeDocumentClassificationJobOutput {
  4928. s.DocumentClassificationJobProperties = v
  4929. return s
  4930. }
  4931. type DescribeDocumentClassifierInput struct {
  4932. _ struct{} `type:"structure"`
  4933. // The Amazon Resource Name (ARN) that identifies the document classifier. The
  4934. // operation returns this identifier in its response.
  4935. //
  4936. // DocumentClassifierArn is a required field
  4937. DocumentClassifierArn *string `type:"string" required:"true"`
  4938. }
  4939. // String returns the string representation
  4940. func (s DescribeDocumentClassifierInput) String() string {
  4941. return awsutil.Prettify(s)
  4942. }
  4943. // GoString returns the string representation
  4944. func (s DescribeDocumentClassifierInput) GoString() string {
  4945. return s.String()
  4946. }
  4947. // Validate inspects the fields of the type to determine if they are valid.
  4948. func (s *DescribeDocumentClassifierInput) Validate() error {
  4949. invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentClassifierInput"}
  4950. if s.DocumentClassifierArn == nil {
  4951. invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn"))
  4952. }
  4953. if invalidParams.Len() > 0 {
  4954. return invalidParams
  4955. }
  4956. return nil
  4957. }
  4958. // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
  4959. func (s *DescribeDocumentClassifierInput) SetDocumentClassifierArn(v string) *DescribeDocumentClassifierInput {
  4960. s.DocumentClassifierArn = &v
  4961. return s
  4962. }
  4963. type DescribeDocumentClassifierOutput struct {
  4964. _ struct{} `type:"structure"`
  4965. // An object that contains the properties associated with a document classifier.
  4966. DocumentClassifierProperties *DocumentClassifierProperties `type:"structure"`
  4967. }
  4968. // String returns the string representation
  4969. func (s DescribeDocumentClassifierOutput) String() string {
  4970. return awsutil.Prettify(s)
  4971. }
  4972. // GoString returns the string representation
  4973. func (s DescribeDocumentClassifierOutput) GoString() string {
  4974. return s.String()
  4975. }
  4976. // SetDocumentClassifierProperties sets the DocumentClassifierProperties field's value.
  4977. func (s *DescribeDocumentClassifierOutput) SetDocumentClassifierProperties(v *DocumentClassifierProperties) *DescribeDocumentClassifierOutput {
  4978. s.DocumentClassifierProperties = v
  4979. return s
  4980. }
  4981. type DescribeDominantLanguageDetectionJobInput struct {
  4982. _ struct{} `type:"structure"`
  4983. // The identifier that Amazon Comprehend generated for the job. The operation
  4984. // returns this identifier in its response.
  4985. //
  4986. // JobId is a required field
  4987. JobId *string `min:"1" type:"string" required:"true"`
  4988. }
  4989. // String returns the string representation
  4990. func (s DescribeDominantLanguageDetectionJobInput) String() string {
  4991. return awsutil.Prettify(s)
  4992. }
  4993. // GoString returns the string representation
  4994. func (s DescribeDominantLanguageDetectionJobInput) GoString() string {
  4995. return s.String()
  4996. }
  4997. // Validate inspects the fields of the type to determine if they are valid.
  4998. func (s *DescribeDominantLanguageDetectionJobInput) Validate() error {
  4999. invalidParams := request.ErrInvalidParams{Context: "DescribeDominantLanguageDetectionJobInput"}
  5000. if s.JobId == nil {
  5001. invalidParams.Add(request.NewErrParamRequired("JobId"))
  5002. }
  5003. if s.JobId != nil && len(*s.JobId) < 1 {
  5004. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  5005. }
  5006. if invalidParams.Len() > 0 {
  5007. return invalidParams
  5008. }
  5009. return nil
  5010. }
  5011. // SetJobId sets the JobId field's value.
  5012. func (s *DescribeDominantLanguageDetectionJobInput) SetJobId(v string) *DescribeDominantLanguageDetectionJobInput {
  5013. s.JobId = &v
  5014. return s
  5015. }
  5016. type DescribeDominantLanguageDetectionJobOutput struct {
  5017. _ struct{} `type:"structure"`
  5018. // An object that contains the properties associated with a dominant language
  5019. // detection job.
  5020. DominantLanguageDetectionJobProperties *DominantLanguageDetectionJobProperties `type:"structure"`
  5021. }
  5022. // String returns the string representation
  5023. func (s DescribeDominantLanguageDetectionJobOutput) String() string {
  5024. return awsutil.Prettify(s)
  5025. }
  5026. // GoString returns the string representation
  5027. func (s DescribeDominantLanguageDetectionJobOutput) GoString() string {
  5028. return s.String()
  5029. }
  5030. // SetDominantLanguageDetectionJobProperties sets the DominantLanguageDetectionJobProperties field's value.
  5031. func (s *DescribeDominantLanguageDetectionJobOutput) SetDominantLanguageDetectionJobProperties(v *DominantLanguageDetectionJobProperties) *DescribeDominantLanguageDetectionJobOutput {
  5032. s.DominantLanguageDetectionJobProperties = v
  5033. return s
  5034. }
  5035. type DescribeEntitiesDetectionJobInput struct {
  5036. _ struct{} `type:"structure"`
  5037. // The identifier that Amazon Comprehend generated for the job. The operation
  5038. // returns this identifier in its response.
  5039. //
  5040. // JobId is a required field
  5041. JobId *string `min:"1" type:"string" required:"true"`
  5042. }
  5043. // String returns the string representation
  5044. func (s DescribeEntitiesDetectionJobInput) String() string {
  5045. return awsutil.Prettify(s)
  5046. }
  5047. // GoString returns the string representation
  5048. func (s DescribeEntitiesDetectionJobInput) GoString() string {
  5049. return s.String()
  5050. }
  5051. // Validate inspects the fields of the type to determine if they are valid.
  5052. func (s *DescribeEntitiesDetectionJobInput) Validate() error {
  5053. invalidParams := request.ErrInvalidParams{Context: "DescribeEntitiesDetectionJobInput"}
  5054. if s.JobId == nil {
  5055. invalidParams.Add(request.NewErrParamRequired("JobId"))
  5056. }
  5057. if s.JobId != nil && len(*s.JobId) < 1 {
  5058. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  5059. }
  5060. if invalidParams.Len() > 0 {
  5061. return invalidParams
  5062. }
  5063. return nil
  5064. }
  5065. // SetJobId sets the JobId field's value.
  5066. func (s *DescribeEntitiesDetectionJobInput) SetJobId(v string) *DescribeEntitiesDetectionJobInput {
  5067. s.JobId = &v
  5068. return s
  5069. }
  5070. type DescribeEntitiesDetectionJobOutput struct {
  5071. _ struct{} `type:"structure"`
  5072. // An object that contains the properties associated with an entities detection
  5073. // job.
  5074. EntitiesDetectionJobProperties *EntitiesDetectionJobProperties `type:"structure"`
  5075. }
  5076. // String returns the string representation
  5077. func (s DescribeEntitiesDetectionJobOutput) String() string {
  5078. return awsutil.Prettify(s)
  5079. }
  5080. // GoString returns the string representation
  5081. func (s DescribeEntitiesDetectionJobOutput) GoString() string {
  5082. return s.String()
  5083. }
  5084. // SetEntitiesDetectionJobProperties sets the EntitiesDetectionJobProperties field's value.
  5085. func (s *DescribeEntitiesDetectionJobOutput) SetEntitiesDetectionJobProperties(v *EntitiesDetectionJobProperties) *DescribeEntitiesDetectionJobOutput {
  5086. s.EntitiesDetectionJobProperties = v
  5087. return s
  5088. }
  5089. type DescribeEntityRecognizerInput struct {
  5090. _ struct{} `type:"structure"`
  5091. // The Amazon Resource Name (ARN) that identifies the entity recognizer.
  5092. //
  5093. // EntityRecognizerArn is a required field
  5094. EntityRecognizerArn *string `type:"string" required:"true"`
  5095. }
  5096. // String returns the string representation
  5097. func (s DescribeEntityRecognizerInput) String() string {
  5098. return awsutil.Prettify(s)
  5099. }
  5100. // GoString returns the string representation
  5101. func (s DescribeEntityRecognizerInput) GoString() string {
  5102. return s.String()
  5103. }
  5104. // Validate inspects the fields of the type to determine if they are valid.
  5105. func (s *DescribeEntityRecognizerInput) Validate() error {
  5106. invalidParams := request.ErrInvalidParams{Context: "DescribeEntityRecognizerInput"}
  5107. if s.EntityRecognizerArn == nil {
  5108. invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn"))
  5109. }
  5110. if invalidParams.Len() > 0 {
  5111. return invalidParams
  5112. }
  5113. return nil
  5114. }
  5115. // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
  5116. func (s *DescribeEntityRecognizerInput) SetEntityRecognizerArn(v string) *DescribeEntityRecognizerInput {
  5117. s.EntityRecognizerArn = &v
  5118. return s
  5119. }
  5120. type DescribeEntityRecognizerOutput struct {
  5121. _ struct{} `type:"structure"`
  5122. // Describes information associated with an entity recognizer.
  5123. EntityRecognizerProperties *EntityRecognizerProperties `type:"structure"`
  5124. }
  5125. // String returns the string representation
  5126. func (s DescribeEntityRecognizerOutput) String() string {
  5127. return awsutil.Prettify(s)
  5128. }
  5129. // GoString returns the string representation
  5130. func (s DescribeEntityRecognizerOutput) GoString() string {
  5131. return s.String()
  5132. }
  5133. // SetEntityRecognizerProperties sets the EntityRecognizerProperties field's value.
  5134. func (s *DescribeEntityRecognizerOutput) SetEntityRecognizerProperties(v *EntityRecognizerProperties) *DescribeEntityRecognizerOutput {
  5135. s.EntityRecognizerProperties = v
  5136. return s
  5137. }
  5138. type DescribeKeyPhrasesDetectionJobInput struct {
  5139. _ struct{} `type:"structure"`
  5140. // The identifier that Amazon Comprehend generated for the job. The operation
  5141. // returns this identifier in its response.
  5142. //
  5143. // JobId is a required field
  5144. JobId *string `min:"1" type:"string" required:"true"`
  5145. }
  5146. // String returns the string representation
  5147. func (s DescribeKeyPhrasesDetectionJobInput) String() string {
  5148. return awsutil.Prettify(s)
  5149. }
  5150. // GoString returns the string representation
  5151. func (s DescribeKeyPhrasesDetectionJobInput) GoString() string {
  5152. return s.String()
  5153. }
  5154. // Validate inspects the fields of the type to determine if they are valid.
  5155. func (s *DescribeKeyPhrasesDetectionJobInput) Validate() error {
  5156. invalidParams := request.ErrInvalidParams{Context: "DescribeKeyPhrasesDetectionJobInput"}
  5157. if s.JobId == nil {
  5158. invalidParams.Add(request.NewErrParamRequired("JobId"))
  5159. }
  5160. if s.JobId != nil && len(*s.JobId) < 1 {
  5161. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  5162. }
  5163. if invalidParams.Len() > 0 {
  5164. return invalidParams
  5165. }
  5166. return nil
  5167. }
  5168. // SetJobId sets the JobId field's value.
  5169. func (s *DescribeKeyPhrasesDetectionJobInput) SetJobId(v string) *DescribeKeyPhrasesDetectionJobInput {
  5170. s.JobId = &v
  5171. return s
  5172. }
  5173. type DescribeKeyPhrasesDetectionJobOutput struct {
  5174. _ struct{} `type:"structure"`
  5175. // An object that contains the properties associated with a key phrases detection
  5176. // job.
  5177. KeyPhrasesDetectionJobProperties *KeyPhrasesDetectionJobProperties `type:"structure"`
  5178. }
  5179. // String returns the string representation
  5180. func (s DescribeKeyPhrasesDetectionJobOutput) String() string {
  5181. return awsutil.Prettify(s)
  5182. }
  5183. // GoString returns the string representation
  5184. func (s DescribeKeyPhrasesDetectionJobOutput) GoString() string {
  5185. return s.String()
  5186. }
  5187. // SetKeyPhrasesDetectionJobProperties sets the KeyPhrasesDetectionJobProperties field's value.
  5188. func (s *DescribeKeyPhrasesDetectionJobOutput) SetKeyPhrasesDetectionJobProperties(v *KeyPhrasesDetectionJobProperties) *DescribeKeyPhrasesDetectionJobOutput {
  5189. s.KeyPhrasesDetectionJobProperties = v
  5190. return s
  5191. }
  5192. type DescribeSentimentDetectionJobInput struct {
  5193. _ struct{} `type:"structure"`
  5194. // The identifier that Amazon Comprehend generated for the job. The operation
  5195. // returns this identifier in its response.
  5196. //
  5197. // JobId is a required field
  5198. JobId *string `min:"1" type:"string" required:"true"`
  5199. }
  5200. // String returns the string representation
  5201. func (s DescribeSentimentDetectionJobInput) String() string {
  5202. return awsutil.Prettify(s)
  5203. }
  5204. // GoString returns the string representation
  5205. func (s DescribeSentimentDetectionJobInput) GoString() string {
  5206. return s.String()
  5207. }
  5208. // Validate inspects the fields of the type to determine if they are valid.
  5209. func (s *DescribeSentimentDetectionJobInput) Validate() error {
  5210. invalidParams := request.ErrInvalidParams{Context: "DescribeSentimentDetectionJobInput"}
  5211. if s.JobId == nil {
  5212. invalidParams.Add(request.NewErrParamRequired("JobId"))
  5213. }
  5214. if s.JobId != nil && len(*s.JobId) < 1 {
  5215. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  5216. }
  5217. if invalidParams.Len() > 0 {
  5218. return invalidParams
  5219. }
  5220. return nil
  5221. }
  5222. // SetJobId sets the JobId field's value.
  5223. func (s *DescribeSentimentDetectionJobInput) SetJobId(v string) *DescribeSentimentDetectionJobInput {
  5224. s.JobId = &v
  5225. return s
  5226. }
  5227. type DescribeSentimentDetectionJobOutput struct {
  5228. _ struct{} `type:"structure"`
  5229. // An object that contains the properties associated with a sentiment detection
  5230. // job.
  5231. SentimentDetectionJobProperties *SentimentDetectionJobProperties `type:"structure"`
  5232. }
  5233. // String returns the string representation
  5234. func (s DescribeSentimentDetectionJobOutput) String() string {
  5235. return awsutil.Prettify(s)
  5236. }
  5237. // GoString returns the string representation
  5238. func (s DescribeSentimentDetectionJobOutput) GoString() string {
  5239. return s.String()
  5240. }
  5241. // SetSentimentDetectionJobProperties sets the SentimentDetectionJobProperties field's value.
  5242. func (s *DescribeSentimentDetectionJobOutput) SetSentimentDetectionJobProperties(v *SentimentDetectionJobProperties) *DescribeSentimentDetectionJobOutput {
  5243. s.SentimentDetectionJobProperties = v
  5244. return s
  5245. }
  5246. type DescribeTopicsDetectionJobInput struct {
  5247. _ struct{} `type:"structure"`
  5248. // The identifier assigned by the user to the detection job.
  5249. //
  5250. // JobId is a required field
  5251. JobId *string `min:"1" type:"string" required:"true"`
  5252. }
  5253. // String returns the string representation
  5254. func (s DescribeTopicsDetectionJobInput) String() string {
  5255. return awsutil.Prettify(s)
  5256. }
  5257. // GoString returns the string representation
  5258. func (s DescribeTopicsDetectionJobInput) GoString() string {
  5259. return s.String()
  5260. }
  5261. // Validate inspects the fields of the type to determine if they are valid.
  5262. func (s *DescribeTopicsDetectionJobInput) Validate() error {
  5263. invalidParams := request.ErrInvalidParams{Context: "DescribeTopicsDetectionJobInput"}
  5264. if s.JobId == nil {
  5265. invalidParams.Add(request.NewErrParamRequired("JobId"))
  5266. }
  5267. if s.JobId != nil && len(*s.JobId) < 1 {
  5268. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  5269. }
  5270. if invalidParams.Len() > 0 {
  5271. return invalidParams
  5272. }
  5273. return nil
  5274. }
  5275. // SetJobId sets the JobId field's value.
  5276. func (s *DescribeTopicsDetectionJobInput) SetJobId(v string) *DescribeTopicsDetectionJobInput {
  5277. s.JobId = &v
  5278. return s
  5279. }
  5280. type DescribeTopicsDetectionJobOutput struct {
  5281. _ struct{} `type:"structure"`
  5282. // The list of properties for the requested job.
  5283. TopicsDetectionJobProperties *TopicsDetectionJobProperties `type:"structure"`
  5284. }
  5285. // String returns the string representation
  5286. func (s DescribeTopicsDetectionJobOutput) String() string {
  5287. return awsutil.Prettify(s)
  5288. }
  5289. // GoString returns the string representation
  5290. func (s DescribeTopicsDetectionJobOutput) GoString() string {
  5291. return s.String()
  5292. }
  5293. // SetTopicsDetectionJobProperties sets the TopicsDetectionJobProperties field's value.
  5294. func (s *DescribeTopicsDetectionJobOutput) SetTopicsDetectionJobProperties(v *TopicsDetectionJobProperties) *DescribeTopicsDetectionJobOutput {
  5295. s.TopicsDetectionJobProperties = v
  5296. return s
  5297. }
  5298. type DetectDominantLanguageInput struct {
  5299. _ struct{} `type:"structure"`
  5300. // A UTF-8 text string. Each string should contain at least 20 characters and
  5301. // must contain fewer that 5,000 bytes of UTF-8 encoded characters.
  5302. //
  5303. // Text is a required field
  5304. Text *string `min:"1" type:"string" required:"true"`
  5305. }
  5306. // String returns the string representation
  5307. func (s DetectDominantLanguageInput) String() string {
  5308. return awsutil.Prettify(s)
  5309. }
  5310. // GoString returns the string representation
  5311. func (s DetectDominantLanguageInput) GoString() string {
  5312. return s.String()
  5313. }
  5314. // Validate inspects the fields of the type to determine if they are valid.
  5315. func (s *DetectDominantLanguageInput) Validate() error {
  5316. invalidParams := request.ErrInvalidParams{Context: "DetectDominantLanguageInput"}
  5317. if s.Text == nil {
  5318. invalidParams.Add(request.NewErrParamRequired("Text"))
  5319. }
  5320. if s.Text != nil && len(*s.Text) < 1 {
  5321. invalidParams.Add(request.NewErrParamMinLen("Text", 1))
  5322. }
  5323. if invalidParams.Len() > 0 {
  5324. return invalidParams
  5325. }
  5326. return nil
  5327. }
  5328. // SetText sets the Text field's value.
  5329. func (s *DetectDominantLanguageInput) SetText(v string) *DetectDominantLanguageInput {
  5330. s.Text = &v
  5331. return s
  5332. }
  5333. type DetectDominantLanguageOutput struct {
  5334. _ struct{} `type:"structure"`
  5335. // The languages that Amazon Comprehend detected in the input text. For each
  5336. // language, the response returns the RFC 5646 language code and the level of
  5337. // confidence that Amazon Comprehend has in the accuracy of its inference. For
  5338. // more information about RFC 5646, see Tags for Identifying Languages (https://tools.ietf.org/html/rfc5646)
  5339. // on the IETF Tools web site.
  5340. Languages []*DominantLanguage `type:"list"`
  5341. }
  5342. // String returns the string representation
  5343. func (s DetectDominantLanguageOutput) String() string {
  5344. return awsutil.Prettify(s)
  5345. }
  5346. // GoString returns the string representation
  5347. func (s DetectDominantLanguageOutput) GoString() string {
  5348. return s.String()
  5349. }
  5350. // SetLanguages sets the Languages field's value.
  5351. func (s *DetectDominantLanguageOutput) SetLanguages(v []*DominantLanguage) *DetectDominantLanguageOutput {
  5352. s.Languages = v
  5353. return s
  5354. }
  5355. type DetectEntitiesInput struct {
  5356. _ struct{} `type:"structure"`
  5357. // The language of the input documents. You can specify English ("en") or Spanish
  5358. // ("es"). All documents must be in the same language.
  5359. //
  5360. // LanguageCode is a required field
  5361. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  5362. // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8
  5363. // encoded characters.
  5364. //
  5365. // Text is a required field
  5366. Text *string `min:"1" type:"string" required:"true"`
  5367. }
  5368. // String returns the string representation
  5369. func (s DetectEntitiesInput) String() string {
  5370. return awsutil.Prettify(s)
  5371. }
  5372. // GoString returns the string representation
  5373. func (s DetectEntitiesInput) GoString() string {
  5374. return s.String()
  5375. }
  5376. // Validate inspects the fields of the type to determine if they are valid.
  5377. func (s *DetectEntitiesInput) Validate() error {
  5378. invalidParams := request.ErrInvalidParams{Context: "DetectEntitiesInput"}
  5379. if s.LanguageCode == nil {
  5380. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  5381. }
  5382. if s.Text == nil {
  5383. invalidParams.Add(request.NewErrParamRequired("Text"))
  5384. }
  5385. if s.Text != nil && len(*s.Text) < 1 {
  5386. invalidParams.Add(request.NewErrParamMinLen("Text", 1))
  5387. }
  5388. if invalidParams.Len() > 0 {
  5389. return invalidParams
  5390. }
  5391. return nil
  5392. }
  5393. // SetLanguageCode sets the LanguageCode field's value.
  5394. func (s *DetectEntitiesInput) SetLanguageCode(v string) *DetectEntitiesInput {
  5395. s.LanguageCode = &v
  5396. return s
  5397. }
  5398. // SetText sets the Text field's value.
  5399. func (s *DetectEntitiesInput) SetText(v string) *DetectEntitiesInput {
  5400. s.Text = &v
  5401. return s
  5402. }
  5403. type DetectEntitiesOutput struct {
  5404. _ struct{} `type:"structure"`
  5405. // A collection of entities identified in the input text. For each entity, the
  5406. // response provides the entity text, entity type, where the entity text begins
  5407. // and ends, and the level of confidence that Amazon Comprehend has in the detection.
  5408. // For a list of entity types, see how-entities.
  5409. Entities []*Entity `type:"list"`
  5410. }
  5411. // String returns the string representation
  5412. func (s DetectEntitiesOutput) String() string {
  5413. return awsutil.Prettify(s)
  5414. }
  5415. // GoString returns the string representation
  5416. func (s DetectEntitiesOutput) GoString() string {
  5417. return s.String()
  5418. }
  5419. // SetEntities sets the Entities field's value.
  5420. func (s *DetectEntitiesOutput) SetEntities(v []*Entity) *DetectEntitiesOutput {
  5421. s.Entities = v
  5422. return s
  5423. }
  5424. type DetectKeyPhrasesInput struct {
  5425. _ struct{} `type:"structure"`
  5426. // The language of the input documents. You can specify English ("en") or Spanish
  5427. // ("es"). All documents must be in the same language.
  5428. //
  5429. // LanguageCode is a required field
  5430. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  5431. // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8
  5432. // encoded characters.
  5433. //
  5434. // Text is a required field
  5435. Text *string `min:"1" type:"string" required:"true"`
  5436. }
  5437. // String returns the string representation
  5438. func (s DetectKeyPhrasesInput) String() string {
  5439. return awsutil.Prettify(s)
  5440. }
  5441. // GoString returns the string representation
  5442. func (s DetectKeyPhrasesInput) GoString() string {
  5443. return s.String()
  5444. }
  5445. // Validate inspects the fields of the type to determine if they are valid.
  5446. func (s *DetectKeyPhrasesInput) Validate() error {
  5447. invalidParams := request.ErrInvalidParams{Context: "DetectKeyPhrasesInput"}
  5448. if s.LanguageCode == nil {
  5449. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  5450. }
  5451. if s.Text == nil {
  5452. invalidParams.Add(request.NewErrParamRequired("Text"))
  5453. }
  5454. if s.Text != nil && len(*s.Text) < 1 {
  5455. invalidParams.Add(request.NewErrParamMinLen("Text", 1))
  5456. }
  5457. if invalidParams.Len() > 0 {
  5458. return invalidParams
  5459. }
  5460. return nil
  5461. }
  5462. // SetLanguageCode sets the LanguageCode field's value.
  5463. func (s *DetectKeyPhrasesInput) SetLanguageCode(v string) *DetectKeyPhrasesInput {
  5464. s.LanguageCode = &v
  5465. return s
  5466. }
  5467. // SetText sets the Text field's value.
  5468. func (s *DetectKeyPhrasesInput) SetText(v string) *DetectKeyPhrasesInput {
  5469. s.Text = &v
  5470. return s
  5471. }
  5472. type DetectKeyPhrasesOutput struct {
  5473. _ struct{} `type:"structure"`
  5474. // A collection of key phrases that Amazon Comprehend identified in the input
  5475. // text. For each key phrase, the response provides the text of the key phrase,
  5476. // where the key phrase begins and ends, and the level of confidence that Amazon
  5477. // Comprehend has in the accuracy of the detection.
  5478. KeyPhrases []*KeyPhrase `type:"list"`
  5479. }
  5480. // String returns the string representation
  5481. func (s DetectKeyPhrasesOutput) String() string {
  5482. return awsutil.Prettify(s)
  5483. }
  5484. // GoString returns the string representation
  5485. func (s DetectKeyPhrasesOutput) GoString() string {
  5486. return s.String()
  5487. }
  5488. // SetKeyPhrases sets the KeyPhrases field's value.
  5489. func (s *DetectKeyPhrasesOutput) SetKeyPhrases(v []*KeyPhrase) *DetectKeyPhrasesOutput {
  5490. s.KeyPhrases = v
  5491. return s
  5492. }
  5493. type DetectSentimentInput struct {
  5494. _ struct{} `type:"structure"`
  5495. // The language of the input documents. You can specify English ("en") or Spanish
  5496. // ("es"). All documents must be in the same language.
  5497. //
  5498. // LanguageCode is a required field
  5499. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  5500. // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8
  5501. // encoded characters.
  5502. //
  5503. // Text is a required field
  5504. Text *string `min:"1" type:"string" required:"true"`
  5505. }
  5506. // String returns the string representation
  5507. func (s DetectSentimentInput) String() string {
  5508. return awsutil.Prettify(s)
  5509. }
  5510. // GoString returns the string representation
  5511. func (s DetectSentimentInput) GoString() string {
  5512. return s.String()
  5513. }
  5514. // Validate inspects the fields of the type to determine if they are valid.
  5515. func (s *DetectSentimentInput) Validate() error {
  5516. invalidParams := request.ErrInvalidParams{Context: "DetectSentimentInput"}
  5517. if s.LanguageCode == nil {
  5518. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  5519. }
  5520. if s.Text == nil {
  5521. invalidParams.Add(request.NewErrParamRequired("Text"))
  5522. }
  5523. if s.Text != nil && len(*s.Text) < 1 {
  5524. invalidParams.Add(request.NewErrParamMinLen("Text", 1))
  5525. }
  5526. if invalidParams.Len() > 0 {
  5527. return invalidParams
  5528. }
  5529. return nil
  5530. }
  5531. // SetLanguageCode sets the LanguageCode field's value.
  5532. func (s *DetectSentimentInput) SetLanguageCode(v string) *DetectSentimentInput {
  5533. s.LanguageCode = &v
  5534. return s
  5535. }
  5536. // SetText sets the Text field's value.
  5537. func (s *DetectSentimentInput) SetText(v string) *DetectSentimentInput {
  5538. s.Text = &v
  5539. return s
  5540. }
  5541. type DetectSentimentOutput struct {
  5542. _ struct{} `type:"structure"`
  5543. // The inferred sentiment that Amazon Comprehend has the highest level of confidence
  5544. // in.
  5545. Sentiment *string `type:"string" enum:"SentimentType"`
  5546. // An object that lists the sentiments, and their corresponding confidence levels.
  5547. SentimentScore *SentimentScore `type:"structure"`
  5548. }
  5549. // String returns the string representation
  5550. func (s DetectSentimentOutput) String() string {
  5551. return awsutil.Prettify(s)
  5552. }
  5553. // GoString returns the string representation
  5554. func (s DetectSentimentOutput) GoString() string {
  5555. return s.String()
  5556. }
  5557. // SetSentiment sets the Sentiment field's value.
  5558. func (s *DetectSentimentOutput) SetSentiment(v string) *DetectSentimentOutput {
  5559. s.Sentiment = &v
  5560. return s
  5561. }
  5562. // SetSentimentScore sets the SentimentScore field's value.
  5563. func (s *DetectSentimentOutput) SetSentimentScore(v *SentimentScore) *DetectSentimentOutput {
  5564. s.SentimentScore = v
  5565. return s
  5566. }
  5567. type DetectSyntaxInput struct {
  5568. _ struct{} `type:"structure"`
  5569. // The language code of the input documents. You can specify English ("en")
  5570. // or Spanish ("es").
  5571. //
  5572. // LanguageCode is a required field
  5573. LanguageCode *string `type:"string" required:"true" enum:"SyntaxLanguageCode"`
  5574. // A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF encoded
  5575. // characters.
  5576. //
  5577. // Text is a required field
  5578. Text *string `min:"1" type:"string" required:"true"`
  5579. }
  5580. // String returns the string representation
  5581. func (s DetectSyntaxInput) String() string {
  5582. return awsutil.Prettify(s)
  5583. }
  5584. // GoString returns the string representation
  5585. func (s DetectSyntaxInput) GoString() string {
  5586. return s.String()
  5587. }
  5588. // Validate inspects the fields of the type to determine if they are valid.
  5589. func (s *DetectSyntaxInput) Validate() error {
  5590. invalidParams := request.ErrInvalidParams{Context: "DetectSyntaxInput"}
  5591. if s.LanguageCode == nil {
  5592. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  5593. }
  5594. if s.Text == nil {
  5595. invalidParams.Add(request.NewErrParamRequired("Text"))
  5596. }
  5597. if s.Text != nil && len(*s.Text) < 1 {
  5598. invalidParams.Add(request.NewErrParamMinLen("Text", 1))
  5599. }
  5600. if invalidParams.Len() > 0 {
  5601. return invalidParams
  5602. }
  5603. return nil
  5604. }
  5605. // SetLanguageCode sets the LanguageCode field's value.
  5606. func (s *DetectSyntaxInput) SetLanguageCode(v string) *DetectSyntaxInput {
  5607. s.LanguageCode = &v
  5608. return s
  5609. }
  5610. // SetText sets the Text field's value.
  5611. func (s *DetectSyntaxInput) SetText(v string) *DetectSyntaxInput {
  5612. s.Text = &v
  5613. return s
  5614. }
  5615. type DetectSyntaxOutput struct {
  5616. _ struct{} `type:"structure"`
  5617. // A collection of syntax tokens describing the text. For each token, the response
  5618. // provides the text, the token type, where the text begins and ends, and the
  5619. // level of confidence that Amazon Comprehend has that the token is correct.
  5620. // For a list of token types, see how-syntax.
  5621. SyntaxTokens []*SyntaxToken `type:"list"`
  5622. }
  5623. // String returns the string representation
  5624. func (s DetectSyntaxOutput) String() string {
  5625. return awsutil.Prettify(s)
  5626. }
  5627. // GoString returns the string representation
  5628. func (s DetectSyntaxOutput) GoString() string {
  5629. return s.String()
  5630. }
  5631. // SetSyntaxTokens sets the SyntaxTokens field's value.
  5632. func (s *DetectSyntaxOutput) SetSyntaxTokens(v []*SyntaxToken) *DetectSyntaxOutput {
  5633. s.SyntaxTokens = v
  5634. return s
  5635. }
  5636. // Provides information for filtering a list of document classification jobs.
  5637. // For more information, see the operation. You can provide only one filter
  5638. // parameter in each request.
  5639. type DocumentClassificationJobFilter struct {
  5640. _ struct{} `type:"structure"`
  5641. // Filters on the name of the job.
  5642. JobName *string `min:"1" type:"string"`
  5643. // Filters the list based on job status. Returns only jobs with the specified
  5644. // status.
  5645. JobStatus *string `type:"string" enum:"JobStatus"`
  5646. // Filters the list of jobs based on the time that the job was submitted for
  5647. // processing. Returns only jobs submitted before the specified time. Jobs are
  5648. // returned in descending order, newest to oldest.
  5649. SubmitTimeAfter *time.Time `type:"timestamp"`
  5650. // Filters the list of jobs based on the time that the job was submitted for
  5651. // processing. Returns only jobs submitted after the specified time. Jobs are
  5652. // returned in ascending order, oldest to newest.
  5653. SubmitTimeBefore *time.Time `type:"timestamp"`
  5654. }
  5655. // String returns the string representation
  5656. func (s DocumentClassificationJobFilter) String() string {
  5657. return awsutil.Prettify(s)
  5658. }
  5659. // GoString returns the string representation
  5660. func (s DocumentClassificationJobFilter) GoString() string {
  5661. return s.String()
  5662. }
  5663. // Validate inspects the fields of the type to determine if they are valid.
  5664. func (s *DocumentClassificationJobFilter) Validate() error {
  5665. invalidParams := request.ErrInvalidParams{Context: "DocumentClassificationJobFilter"}
  5666. if s.JobName != nil && len(*s.JobName) < 1 {
  5667. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  5668. }
  5669. if invalidParams.Len() > 0 {
  5670. return invalidParams
  5671. }
  5672. return nil
  5673. }
  5674. // SetJobName sets the JobName field's value.
  5675. func (s *DocumentClassificationJobFilter) SetJobName(v string) *DocumentClassificationJobFilter {
  5676. s.JobName = &v
  5677. return s
  5678. }
  5679. // SetJobStatus sets the JobStatus field's value.
  5680. func (s *DocumentClassificationJobFilter) SetJobStatus(v string) *DocumentClassificationJobFilter {
  5681. s.JobStatus = &v
  5682. return s
  5683. }
  5684. // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
  5685. func (s *DocumentClassificationJobFilter) SetSubmitTimeAfter(v time.Time) *DocumentClassificationJobFilter {
  5686. s.SubmitTimeAfter = &v
  5687. return s
  5688. }
  5689. // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
  5690. func (s *DocumentClassificationJobFilter) SetSubmitTimeBefore(v time.Time) *DocumentClassificationJobFilter {
  5691. s.SubmitTimeBefore = &v
  5692. return s
  5693. }
  5694. // Provides information about a document classification job.
  5695. type DocumentClassificationJobProperties struct {
  5696. _ struct{} `type:"structure"`
  5697. // The Amazon Resource Name (ARN) of the AWS identity and Access Management
  5698. // (IAM) role that grants Amazon Comprehend read access to your input data.
  5699. DataAccessRoleArn *string `min:"20" type:"string"`
  5700. // The Amazon Resource Name (ARN) that identifies the document classifier.
  5701. DocumentClassifierArn *string `type:"string"`
  5702. // The time that the document classification job completed.
  5703. EndTime *time.Time `type:"timestamp"`
  5704. // The input data configuration that you supplied when you created the document
  5705. // classification job.
  5706. InputDataConfig *InputDataConfig `type:"structure"`
  5707. // The identifier assigned to the document classification job.
  5708. JobId *string `min:"1" type:"string"`
  5709. // The name that you assigned to the document classification job.
  5710. JobName *string `min:"1" type:"string"`
  5711. // The current status of the document classification job. If the status is FAILED,
  5712. // the Message field shows the reason for the failure.
  5713. JobStatus *string `type:"string" enum:"JobStatus"`
  5714. // A description of the status of the job.
  5715. Message *string `type:"string"`
  5716. // The output data configuration that you supplied when you created the document
  5717. // classification job.
  5718. OutputDataConfig *OutputDataConfig `type:"structure"`
  5719. // The time that the document classification job was submitted for processing.
  5720. SubmitTime *time.Time `type:"timestamp"`
  5721. }
  5722. // String returns the string representation
  5723. func (s DocumentClassificationJobProperties) String() string {
  5724. return awsutil.Prettify(s)
  5725. }
  5726. // GoString returns the string representation
  5727. func (s DocumentClassificationJobProperties) GoString() string {
  5728. return s.String()
  5729. }
  5730. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  5731. func (s *DocumentClassificationJobProperties) SetDataAccessRoleArn(v string) *DocumentClassificationJobProperties {
  5732. s.DataAccessRoleArn = &v
  5733. return s
  5734. }
  5735. // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
  5736. func (s *DocumentClassificationJobProperties) SetDocumentClassifierArn(v string) *DocumentClassificationJobProperties {
  5737. s.DocumentClassifierArn = &v
  5738. return s
  5739. }
  5740. // SetEndTime sets the EndTime field's value.
  5741. func (s *DocumentClassificationJobProperties) SetEndTime(v time.Time) *DocumentClassificationJobProperties {
  5742. s.EndTime = &v
  5743. return s
  5744. }
  5745. // SetInputDataConfig sets the InputDataConfig field's value.
  5746. func (s *DocumentClassificationJobProperties) SetInputDataConfig(v *InputDataConfig) *DocumentClassificationJobProperties {
  5747. s.InputDataConfig = v
  5748. return s
  5749. }
  5750. // SetJobId sets the JobId field's value.
  5751. func (s *DocumentClassificationJobProperties) SetJobId(v string) *DocumentClassificationJobProperties {
  5752. s.JobId = &v
  5753. return s
  5754. }
  5755. // SetJobName sets the JobName field's value.
  5756. func (s *DocumentClassificationJobProperties) SetJobName(v string) *DocumentClassificationJobProperties {
  5757. s.JobName = &v
  5758. return s
  5759. }
  5760. // SetJobStatus sets the JobStatus field's value.
  5761. func (s *DocumentClassificationJobProperties) SetJobStatus(v string) *DocumentClassificationJobProperties {
  5762. s.JobStatus = &v
  5763. return s
  5764. }
  5765. // SetMessage sets the Message field's value.
  5766. func (s *DocumentClassificationJobProperties) SetMessage(v string) *DocumentClassificationJobProperties {
  5767. s.Message = &v
  5768. return s
  5769. }
  5770. // SetOutputDataConfig sets the OutputDataConfig field's value.
  5771. func (s *DocumentClassificationJobProperties) SetOutputDataConfig(v *OutputDataConfig) *DocumentClassificationJobProperties {
  5772. s.OutputDataConfig = v
  5773. return s
  5774. }
  5775. // SetSubmitTime sets the SubmitTime field's value.
  5776. func (s *DocumentClassificationJobProperties) SetSubmitTime(v time.Time) *DocumentClassificationJobProperties {
  5777. s.SubmitTime = &v
  5778. return s
  5779. }
  5780. // Provides information for filtering a list of document classifiers. You can
  5781. // only specify one filtering parameter in a request. For more information,
  5782. // see the operation.
  5783. type DocumentClassifierFilter struct {
  5784. _ struct{} `type:"structure"`
  5785. // Filters the list of classifiers based on status.
  5786. Status *string `type:"string" enum:"ModelStatus"`
  5787. // Filters the list of classifiers based on the time that the classifier was
  5788. // submitted for processing. Returns only classifiers submitted after the specified
  5789. // time. Classifiers are returned in descending order, newest to oldest.
  5790. SubmitTimeAfter *time.Time `type:"timestamp"`
  5791. // Filters the list of classifiers based on the time that the classifier was
  5792. // submitted for processing. Returns only classifiers submitted before the specified
  5793. // time. Classifiers are returned in ascending order, oldest to newest.
  5794. SubmitTimeBefore *time.Time `type:"timestamp"`
  5795. }
  5796. // String returns the string representation
  5797. func (s DocumentClassifierFilter) String() string {
  5798. return awsutil.Prettify(s)
  5799. }
  5800. // GoString returns the string representation
  5801. func (s DocumentClassifierFilter) GoString() string {
  5802. return s.String()
  5803. }
  5804. // SetStatus sets the Status field's value.
  5805. func (s *DocumentClassifierFilter) SetStatus(v string) *DocumentClassifierFilter {
  5806. s.Status = &v
  5807. return s
  5808. }
  5809. // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
  5810. func (s *DocumentClassifierFilter) SetSubmitTimeAfter(v time.Time) *DocumentClassifierFilter {
  5811. s.SubmitTimeAfter = &v
  5812. return s
  5813. }
  5814. // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
  5815. func (s *DocumentClassifierFilter) SetSubmitTimeBefore(v time.Time) *DocumentClassifierFilter {
  5816. s.SubmitTimeBefore = &v
  5817. return s
  5818. }
  5819. // The input properties for training a document classifier.
  5820. //
  5821. // For more information on how the input file is formatted, see how-document-classification-training-data.
  5822. type DocumentClassifierInputDataConfig struct {
  5823. _ struct{} `type:"structure"`
  5824. // The Amazon S3 URI for the input data. The S3 bucket must be in the same region
  5825. // as the API endpoint that you are calling. The URI can point to a single input
  5826. // file or it can provide the prefix for a collection of input files.
  5827. //
  5828. // For example, if you use the URI S3://bucketName/prefix, if the prefix is
  5829. // a single file, Amazon Comprehend uses that file as input. If more than one
  5830. // file begins with the prefix, Amazon Comprehend uses all of them as input.
  5831. //
  5832. // S3Uri is a required field
  5833. S3Uri *string `type:"string" required:"true"`
  5834. }
  5835. // String returns the string representation
  5836. func (s DocumentClassifierInputDataConfig) String() string {
  5837. return awsutil.Prettify(s)
  5838. }
  5839. // GoString returns the string representation
  5840. func (s DocumentClassifierInputDataConfig) GoString() string {
  5841. return s.String()
  5842. }
  5843. // Validate inspects the fields of the type to determine if they are valid.
  5844. func (s *DocumentClassifierInputDataConfig) Validate() error {
  5845. invalidParams := request.ErrInvalidParams{Context: "DocumentClassifierInputDataConfig"}
  5846. if s.S3Uri == nil {
  5847. invalidParams.Add(request.NewErrParamRequired("S3Uri"))
  5848. }
  5849. if invalidParams.Len() > 0 {
  5850. return invalidParams
  5851. }
  5852. return nil
  5853. }
  5854. // SetS3Uri sets the S3Uri field's value.
  5855. func (s *DocumentClassifierInputDataConfig) SetS3Uri(v string) *DocumentClassifierInputDataConfig {
  5856. s.S3Uri = &v
  5857. return s
  5858. }
  5859. // Provides information about a document classifier.
  5860. type DocumentClassifierProperties struct {
  5861. _ struct{} `type:"structure"`
  5862. // Information about the document classifier, including the number of documents
  5863. // used for training the classifier, the number of documents used for test the
  5864. // classifier, and an accuracy rating.
  5865. ClassifierMetadata *ClassifierMetadata `type:"structure"`
  5866. // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role
  5867. // that grants Amazon Comprehend read access to your input data.
  5868. DataAccessRoleArn *string `min:"20" type:"string"`
  5869. // The Amazon Resource Name (ARN) that identifies the document classifier.
  5870. DocumentClassifierArn *string `type:"string"`
  5871. // The time that training the document classifier completed.
  5872. EndTime *time.Time `type:"timestamp"`
  5873. // The input data configuration that you supplied when you created the document
  5874. // classifier for training.
  5875. InputDataConfig *DocumentClassifierInputDataConfig `type:"structure"`
  5876. // The language code for the language of the documents that the classifier was
  5877. // trained on.
  5878. LanguageCode *string `type:"string" enum:"LanguageCode"`
  5879. // Additional information about the status of the classifier.
  5880. Message *string `type:"string"`
  5881. // The status of the document classifier. If the status is TRAINED the classifier
  5882. // is ready to use. If the status is FAILED you can see additional information
  5883. // about why the classifier wasn't trained in the Message field.
  5884. Status *string `type:"string" enum:"ModelStatus"`
  5885. // The time that the document classifier was submitted for training.
  5886. SubmitTime *time.Time `type:"timestamp"`
  5887. // The time that training of the document classifier was completed. Indicates
  5888. // the time when the training completes on documentation classifiers. You are
  5889. // billed for the time interval between this time and the value of TrainingStartTime.
  5890. TrainingEndTime *time.Time `type:"timestamp"`
  5891. // Indicates the time when the training starts on documentation classifiers.
  5892. // You are billed for the time interval between this time and the value of TrainingEndTime.
  5893. TrainingStartTime *time.Time `type:"timestamp"`
  5894. }
  5895. // String returns the string representation
  5896. func (s DocumentClassifierProperties) String() string {
  5897. return awsutil.Prettify(s)
  5898. }
  5899. // GoString returns the string representation
  5900. func (s DocumentClassifierProperties) GoString() string {
  5901. return s.String()
  5902. }
  5903. // SetClassifierMetadata sets the ClassifierMetadata field's value.
  5904. func (s *DocumentClassifierProperties) SetClassifierMetadata(v *ClassifierMetadata) *DocumentClassifierProperties {
  5905. s.ClassifierMetadata = v
  5906. return s
  5907. }
  5908. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  5909. func (s *DocumentClassifierProperties) SetDataAccessRoleArn(v string) *DocumentClassifierProperties {
  5910. s.DataAccessRoleArn = &v
  5911. return s
  5912. }
  5913. // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
  5914. func (s *DocumentClassifierProperties) SetDocumentClassifierArn(v string) *DocumentClassifierProperties {
  5915. s.DocumentClassifierArn = &v
  5916. return s
  5917. }
  5918. // SetEndTime sets the EndTime field's value.
  5919. func (s *DocumentClassifierProperties) SetEndTime(v time.Time) *DocumentClassifierProperties {
  5920. s.EndTime = &v
  5921. return s
  5922. }
  5923. // SetInputDataConfig sets the InputDataConfig field's value.
  5924. func (s *DocumentClassifierProperties) SetInputDataConfig(v *DocumentClassifierInputDataConfig) *DocumentClassifierProperties {
  5925. s.InputDataConfig = v
  5926. return s
  5927. }
  5928. // SetLanguageCode sets the LanguageCode field's value.
  5929. func (s *DocumentClassifierProperties) SetLanguageCode(v string) *DocumentClassifierProperties {
  5930. s.LanguageCode = &v
  5931. return s
  5932. }
  5933. // SetMessage sets the Message field's value.
  5934. func (s *DocumentClassifierProperties) SetMessage(v string) *DocumentClassifierProperties {
  5935. s.Message = &v
  5936. return s
  5937. }
  5938. // SetStatus sets the Status field's value.
  5939. func (s *DocumentClassifierProperties) SetStatus(v string) *DocumentClassifierProperties {
  5940. s.Status = &v
  5941. return s
  5942. }
  5943. // SetSubmitTime sets the SubmitTime field's value.
  5944. func (s *DocumentClassifierProperties) SetSubmitTime(v time.Time) *DocumentClassifierProperties {
  5945. s.SubmitTime = &v
  5946. return s
  5947. }
  5948. // SetTrainingEndTime sets the TrainingEndTime field's value.
  5949. func (s *DocumentClassifierProperties) SetTrainingEndTime(v time.Time) *DocumentClassifierProperties {
  5950. s.TrainingEndTime = &v
  5951. return s
  5952. }
  5953. // SetTrainingStartTime sets the TrainingStartTime field's value.
  5954. func (s *DocumentClassifierProperties) SetTrainingStartTime(v time.Time) *DocumentClassifierProperties {
  5955. s.TrainingStartTime = &v
  5956. return s
  5957. }
  5958. // Returns the code for the dominant language in the input text and the level
  5959. // of confidence that Amazon Comprehend has in the accuracy of the detection.
  5960. type DominantLanguage struct {
  5961. _ struct{} `type:"structure"`
  5962. // The RFC 5646 language code for the dominant language. For more information
  5963. // about RFC 5646, see Tags for Identifying Languages (https://tools.ietf.org/html/rfc5646)
  5964. // on the IETF Tools web site.
  5965. LanguageCode *string `min:"1" type:"string"`
  5966. // The level of confidence that Amazon Comprehend has in the accuracy of the
  5967. // detection.
  5968. Score *float64 `type:"float"`
  5969. }
  5970. // String returns the string representation
  5971. func (s DominantLanguage) String() string {
  5972. return awsutil.Prettify(s)
  5973. }
  5974. // GoString returns the string representation
  5975. func (s DominantLanguage) GoString() string {
  5976. return s.String()
  5977. }
  5978. // SetLanguageCode sets the LanguageCode field's value.
  5979. func (s *DominantLanguage) SetLanguageCode(v string) *DominantLanguage {
  5980. s.LanguageCode = &v
  5981. return s
  5982. }
  5983. // SetScore sets the Score field's value.
  5984. func (s *DominantLanguage) SetScore(v float64) *DominantLanguage {
  5985. s.Score = &v
  5986. return s
  5987. }
  5988. // Provides information for filtering a list of dominant language detection
  5989. // jobs. For more information, see the operation.
  5990. type DominantLanguageDetectionJobFilter struct {
  5991. _ struct{} `type:"structure"`
  5992. // Filters on the name of the job.
  5993. JobName *string `min:"1" type:"string"`
  5994. // Filters the list of jobs based on job status. Returns only jobs with the
  5995. // specified status.
  5996. JobStatus *string `type:"string" enum:"JobStatus"`
  5997. // Filters the list of jobs based on the time that the job was submitted for
  5998. // processing. Returns only jobs submitted after the specified time. Jobs are
  5999. // returned in descending order, newest to oldest.
  6000. SubmitTimeAfter *time.Time `type:"timestamp"`
  6001. // Filters the list of jobs based on the time that the job was submitted for
  6002. // processing. Returns only jobs submitted before the specified time. Jobs are
  6003. // returned in ascending order, oldest to newest.
  6004. SubmitTimeBefore *time.Time `type:"timestamp"`
  6005. }
  6006. // String returns the string representation
  6007. func (s DominantLanguageDetectionJobFilter) String() string {
  6008. return awsutil.Prettify(s)
  6009. }
  6010. // GoString returns the string representation
  6011. func (s DominantLanguageDetectionJobFilter) GoString() string {
  6012. return s.String()
  6013. }
  6014. // Validate inspects the fields of the type to determine if they are valid.
  6015. func (s *DominantLanguageDetectionJobFilter) Validate() error {
  6016. invalidParams := request.ErrInvalidParams{Context: "DominantLanguageDetectionJobFilter"}
  6017. if s.JobName != nil && len(*s.JobName) < 1 {
  6018. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  6019. }
  6020. if invalidParams.Len() > 0 {
  6021. return invalidParams
  6022. }
  6023. return nil
  6024. }
  6025. // SetJobName sets the JobName field's value.
  6026. func (s *DominantLanguageDetectionJobFilter) SetJobName(v string) *DominantLanguageDetectionJobFilter {
  6027. s.JobName = &v
  6028. return s
  6029. }
  6030. // SetJobStatus sets the JobStatus field's value.
  6031. func (s *DominantLanguageDetectionJobFilter) SetJobStatus(v string) *DominantLanguageDetectionJobFilter {
  6032. s.JobStatus = &v
  6033. return s
  6034. }
  6035. // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
  6036. func (s *DominantLanguageDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *DominantLanguageDetectionJobFilter {
  6037. s.SubmitTimeAfter = &v
  6038. return s
  6039. }
  6040. // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
  6041. func (s *DominantLanguageDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *DominantLanguageDetectionJobFilter {
  6042. s.SubmitTimeBefore = &v
  6043. return s
  6044. }
  6045. // Provides information about a dominant language detection job.
  6046. type DominantLanguageDetectionJobProperties struct {
  6047. _ struct{} `type:"structure"`
  6048. // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to
  6049. // your input data.
  6050. DataAccessRoleArn *string `min:"20" type:"string"`
  6051. // The time that the dominant language detection job completed.
  6052. EndTime *time.Time `type:"timestamp"`
  6053. // The input data configuration that you supplied when you created the dominant
  6054. // language detection job.
  6055. InputDataConfig *InputDataConfig `type:"structure"`
  6056. // The identifier assigned to the dominant language detection job.
  6057. JobId *string `min:"1" type:"string"`
  6058. // The name that you assigned to the dominant language detection job.
  6059. JobName *string `min:"1" type:"string"`
  6060. // The current status of the dominant language detection job. If the status
  6061. // is FAILED, the Message field shows the reason for the failure.
  6062. JobStatus *string `type:"string" enum:"JobStatus"`
  6063. // A description for the status of a job.
  6064. Message *string `type:"string"`
  6065. // The output data configuration that you supplied when you created the dominant
  6066. // language detection job.
  6067. OutputDataConfig *OutputDataConfig `type:"structure"`
  6068. // The time that the dominant language detection job was submitted for processing.
  6069. SubmitTime *time.Time `type:"timestamp"`
  6070. }
  6071. // String returns the string representation
  6072. func (s DominantLanguageDetectionJobProperties) String() string {
  6073. return awsutil.Prettify(s)
  6074. }
  6075. // GoString returns the string representation
  6076. func (s DominantLanguageDetectionJobProperties) GoString() string {
  6077. return s.String()
  6078. }
  6079. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  6080. func (s *DominantLanguageDetectionJobProperties) SetDataAccessRoleArn(v string) *DominantLanguageDetectionJobProperties {
  6081. s.DataAccessRoleArn = &v
  6082. return s
  6083. }
  6084. // SetEndTime sets the EndTime field's value.
  6085. func (s *DominantLanguageDetectionJobProperties) SetEndTime(v time.Time) *DominantLanguageDetectionJobProperties {
  6086. s.EndTime = &v
  6087. return s
  6088. }
  6089. // SetInputDataConfig sets the InputDataConfig field's value.
  6090. func (s *DominantLanguageDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *DominantLanguageDetectionJobProperties {
  6091. s.InputDataConfig = v
  6092. return s
  6093. }
  6094. // SetJobId sets the JobId field's value.
  6095. func (s *DominantLanguageDetectionJobProperties) SetJobId(v string) *DominantLanguageDetectionJobProperties {
  6096. s.JobId = &v
  6097. return s
  6098. }
  6099. // SetJobName sets the JobName field's value.
  6100. func (s *DominantLanguageDetectionJobProperties) SetJobName(v string) *DominantLanguageDetectionJobProperties {
  6101. s.JobName = &v
  6102. return s
  6103. }
  6104. // SetJobStatus sets the JobStatus field's value.
  6105. func (s *DominantLanguageDetectionJobProperties) SetJobStatus(v string) *DominantLanguageDetectionJobProperties {
  6106. s.JobStatus = &v
  6107. return s
  6108. }
  6109. // SetMessage sets the Message field's value.
  6110. func (s *DominantLanguageDetectionJobProperties) SetMessage(v string) *DominantLanguageDetectionJobProperties {
  6111. s.Message = &v
  6112. return s
  6113. }
  6114. // SetOutputDataConfig sets the OutputDataConfig field's value.
  6115. func (s *DominantLanguageDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *DominantLanguageDetectionJobProperties {
  6116. s.OutputDataConfig = v
  6117. return s
  6118. }
  6119. // SetSubmitTime sets the SubmitTime field's value.
  6120. func (s *DominantLanguageDetectionJobProperties) SetSubmitTime(v time.Time) *DominantLanguageDetectionJobProperties {
  6121. s.SubmitTime = &v
  6122. return s
  6123. }
  6124. // Provides information for filtering a list of dominant language detection
  6125. // jobs. For more information, see the operation.
  6126. type EntitiesDetectionJobFilter struct {
  6127. _ struct{} `type:"structure"`
  6128. // Filters on the name of the job.
  6129. JobName *string `min:"1" type:"string"`
  6130. // Filters the list of jobs based on job status. Returns only jobs with the
  6131. // specified status.
  6132. JobStatus *string `type:"string" enum:"JobStatus"`
  6133. // Filters the list of jobs based on the time that the job was submitted for
  6134. // processing. Returns only jobs submitted after the specified time. Jobs are
  6135. // returned in descending order, newest to oldest.
  6136. SubmitTimeAfter *time.Time `type:"timestamp"`
  6137. // Filters the list of jobs based on the time that the job was submitted for
  6138. // processing. Returns only jobs submitted before the specified time. Jobs are
  6139. // returned in ascending order, oldest to newest.
  6140. SubmitTimeBefore *time.Time `type:"timestamp"`
  6141. }
  6142. // String returns the string representation
  6143. func (s EntitiesDetectionJobFilter) String() string {
  6144. return awsutil.Prettify(s)
  6145. }
  6146. // GoString returns the string representation
  6147. func (s EntitiesDetectionJobFilter) GoString() string {
  6148. return s.String()
  6149. }
  6150. // Validate inspects the fields of the type to determine if they are valid.
  6151. func (s *EntitiesDetectionJobFilter) Validate() error {
  6152. invalidParams := request.ErrInvalidParams{Context: "EntitiesDetectionJobFilter"}
  6153. if s.JobName != nil && len(*s.JobName) < 1 {
  6154. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  6155. }
  6156. if invalidParams.Len() > 0 {
  6157. return invalidParams
  6158. }
  6159. return nil
  6160. }
  6161. // SetJobName sets the JobName field's value.
  6162. func (s *EntitiesDetectionJobFilter) SetJobName(v string) *EntitiesDetectionJobFilter {
  6163. s.JobName = &v
  6164. return s
  6165. }
  6166. // SetJobStatus sets the JobStatus field's value.
  6167. func (s *EntitiesDetectionJobFilter) SetJobStatus(v string) *EntitiesDetectionJobFilter {
  6168. s.JobStatus = &v
  6169. return s
  6170. }
  6171. // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
  6172. func (s *EntitiesDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *EntitiesDetectionJobFilter {
  6173. s.SubmitTimeAfter = &v
  6174. return s
  6175. }
  6176. // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
  6177. func (s *EntitiesDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *EntitiesDetectionJobFilter {
  6178. s.SubmitTimeBefore = &v
  6179. return s
  6180. }
  6181. // Provides information about an entities detection job.
  6182. type EntitiesDetectionJobProperties struct {
  6183. _ struct{} `type:"structure"`
  6184. // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to
  6185. // your input data.
  6186. DataAccessRoleArn *string `min:"20" type:"string"`
  6187. // The time that the entities detection job completed
  6188. EndTime *time.Time `type:"timestamp"`
  6189. // The Amazon Resource Name (ARN) that identifies the entity recognizer.
  6190. EntityRecognizerArn *string `type:"string"`
  6191. // The input data configuration that you supplied when you created the entities
  6192. // detection job.
  6193. InputDataConfig *InputDataConfig `type:"structure"`
  6194. // The identifier assigned to the entities detection job.
  6195. JobId *string `min:"1" type:"string"`
  6196. // The name that you assigned the entities detection job.
  6197. JobName *string `min:"1" type:"string"`
  6198. // The current status of the entities detection job. If the status is FAILED,
  6199. // the Message field shows the reason for the failure.
  6200. JobStatus *string `type:"string" enum:"JobStatus"`
  6201. // The language code of the input documents.
  6202. LanguageCode *string `type:"string" enum:"LanguageCode"`
  6203. // A description of the status of a job.
  6204. Message *string `type:"string"`
  6205. // The output data configuration that you supplied when you created the entities
  6206. // detection job.
  6207. OutputDataConfig *OutputDataConfig `type:"structure"`
  6208. // The time that the entities detection job was submitted for processing.
  6209. SubmitTime *time.Time `type:"timestamp"`
  6210. }
  6211. // String returns the string representation
  6212. func (s EntitiesDetectionJobProperties) String() string {
  6213. return awsutil.Prettify(s)
  6214. }
  6215. // GoString returns the string representation
  6216. func (s EntitiesDetectionJobProperties) GoString() string {
  6217. return s.String()
  6218. }
  6219. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  6220. func (s *EntitiesDetectionJobProperties) SetDataAccessRoleArn(v string) *EntitiesDetectionJobProperties {
  6221. s.DataAccessRoleArn = &v
  6222. return s
  6223. }
  6224. // SetEndTime sets the EndTime field's value.
  6225. func (s *EntitiesDetectionJobProperties) SetEndTime(v time.Time) *EntitiesDetectionJobProperties {
  6226. s.EndTime = &v
  6227. return s
  6228. }
  6229. // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
  6230. func (s *EntitiesDetectionJobProperties) SetEntityRecognizerArn(v string) *EntitiesDetectionJobProperties {
  6231. s.EntityRecognizerArn = &v
  6232. return s
  6233. }
  6234. // SetInputDataConfig sets the InputDataConfig field's value.
  6235. func (s *EntitiesDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *EntitiesDetectionJobProperties {
  6236. s.InputDataConfig = v
  6237. return s
  6238. }
  6239. // SetJobId sets the JobId field's value.
  6240. func (s *EntitiesDetectionJobProperties) SetJobId(v string) *EntitiesDetectionJobProperties {
  6241. s.JobId = &v
  6242. return s
  6243. }
  6244. // SetJobName sets the JobName field's value.
  6245. func (s *EntitiesDetectionJobProperties) SetJobName(v string) *EntitiesDetectionJobProperties {
  6246. s.JobName = &v
  6247. return s
  6248. }
  6249. // SetJobStatus sets the JobStatus field's value.
  6250. func (s *EntitiesDetectionJobProperties) SetJobStatus(v string) *EntitiesDetectionJobProperties {
  6251. s.JobStatus = &v
  6252. return s
  6253. }
  6254. // SetLanguageCode sets the LanguageCode field's value.
  6255. func (s *EntitiesDetectionJobProperties) SetLanguageCode(v string) *EntitiesDetectionJobProperties {
  6256. s.LanguageCode = &v
  6257. return s
  6258. }
  6259. // SetMessage sets the Message field's value.
  6260. func (s *EntitiesDetectionJobProperties) SetMessage(v string) *EntitiesDetectionJobProperties {
  6261. s.Message = &v
  6262. return s
  6263. }
  6264. // SetOutputDataConfig sets the OutputDataConfig field's value.
  6265. func (s *EntitiesDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *EntitiesDetectionJobProperties {
  6266. s.OutputDataConfig = v
  6267. return s
  6268. }
  6269. // SetSubmitTime sets the SubmitTime field's value.
  6270. func (s *EntitiesDetectionJobProperties) SetSubmitTime(v time.Time) *EntitiesDetectionJobProperties {
  6271. s.SubmitTime = &v
  6272. return s
  6273. }
  6274. // Provides information about an entity.
  6275. type Entity struct {
  6276. _ struct{} `type:"structure"`
  6277. // A character offset in the input text that shows where the entity begins (the
  6278. // first character is at position 0). The offset returns the position of each
  6279. // UTF-8 code point in the string. A code point is the abstract character from
  6280. // a particular graphical representation. For example, a multi-byte UTF-8 character
  6281. // maps to a single code point.
  6282. BeginOffset *int64 `type:"integer"`
  6283. // A character offset in the input text that shows where the entity ends. The
  6284. // offset returns the position of each UTF-8 code point in the string. A code
  6285. // point is the abstract character from a particular graphical representation.
  6286. // For example, a multi-byte UTF-8 character maps to a single code point.
  6287. EndOffset *int64 `type:"integer"`
  6288. // The level of confidence that Amazon Comprehend has in the accuracy of the
  6289. // detection.
  6290. Score *float64 `type:"float"`
  6291. // The text of the entity.
  6292. Text *string `min:"1" type:"string"`
  6293. // The entity's type.
  6294. Type *string `type:"string" enum:"EntityType"`
  6295. }
  6296. // String returns the string representation
  6297. func (s Entity) String() string {
  6298. return awsutil.Prettify(s)
  6299. }
  6300. // GoString returns the string representation
  6301. func (s Entity) GoString() string {
  6302. return s.String()
  6303. }
  6304. // SetBeginOffset sets the BeginOffset field's value.
  6305. func (s *Entity) SetBeginOffset(v int64) *Entity {
  6306. s.BeginOffset = &v
  6307. return s
  6308. }
  6309. // SetEndOffset sets the EndOffset field's value.
  6310. func (s *Entity) SetEndOffset(v int64) *Entity {
  6311. s.EndOffset = &v
  6312. return s
  6313. }
  6314. // SetScore sets the Score field's value.
  6315. func (s *Entity) SetScore(v float64) *Entity {
  6316. s.Score = &v
  6317. return s
  6318. }
  6319. // SetText sets the Text field's value.
  6320. func (s *Entity) SetText(v string) *Entity {
  6321. s.Text = &v
  6322. return s
  6323. }
  6324. // SetType sets the Type field's value.
  6325. func (s *Entity) SetType(v string) *Entity {
  6326. s.Type = &v
  6327. return s
  6328. }
  6329. // Describes the annotations associated with a entity recognizer.
  6330. type EntityRecognizerAnnotations struct {
  6331. _ struct{} `type:"structure"`
  6332. // Specifies the Amazon S3 location where the annotations for an entity recognizer
  6333. // are located. The URI must be in the same region as the API endpoint that
  6334. // you are calling.
  6335. //
  6336. // S3Uri is a required field
  6337. S3Uri *string `type:"string" required:"true"`
  6338. }
  6339. // String returns the string representation
  6340. func (s EntityRecognizerAnnotations) String() string {
  6341. return awsutil.Prettify(s)
  6342. }
  6343. // GoString returns the string representation
  6344. func (s EntityRecognizerAnnotations) GoString() string {
  6345. return s.String()
  6346. }
  6347. // Validate inspects the fields of the type to determine if they are valid.
  6348. func (s *EntityRecognizerAnnotations) Validate() error {
  6349. invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerAnnotations"}
  6350. if s.S3Uri == nil {
  6351. invalidParams.Add(request.NewErrParamRequired("S3Uri"))
  6352. }
  6353. if invalidParams.Len() > 0 {
  6354. return invalidParams
  6355. }
  6356. return nil
  6357. }
  6358. // SetS3Uri sets the S3Uri field's value.
  6359. func (s *EntityRecognizerAnnotations) SetS3Uri(v string) *EntityRecognizerAnnotations {
  6360. s.S3Uri = &v
  6361. return s
  6362. }
  6363. // Describes the training documents submitted with an entity recognizer.
  6364. type EntityRecognizerDocuments struct {
  6365. _ struct{} `type:"structure"`
  6366. // Specifies the Amazon S3 location where the training documents for an entity
  6367. // recognizer are located. The URI must be in the same region as the API endpoint
  6368. // that you are calling.
  6369. //
  6370. // S3Uri is a required field
  6371. S3Uri *string `type:"string" required:"true"`
  6372. }
  6373. // String returns the string representation
  6374. func (s EntityRecognizerDocuments) String() string {
  6375. return awsutil.Prettify(s)
  6376. }
  6377. // GoString returns the string representation
  6378. func (s EntityRecognizerDocuments) GoString() string {
  6379. return s.String()
  6380. }
  6381. // Validate inspects the fields of the type to determine if they are valid.
  6382. func (s *EntityRecognizerDocuments) Validate() error {
  6383. invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerDocuments"}
  6384. if s.S3Uri == nil {
  6385. invalidParams.Add(request.NewErrParamRequired("S3Uri"))
  6386. }
  6387. if invalidParams.Len() > 0 {
  6388. return invalidParams
  6389. }
  6390. return nil
  6391. }
  6392. // SetS3Uri sets the S3Uri field's value.
  6393. func (s *EntityRecognizerDocuments) SetS3Uri(v string) *EntityRecognizerDocuments {
  6394. s.S3Uri = &v
  6395. return s
  6396. }
  6397. // Describes the entity recognizer submitted with an entity recognizer.
  6398. type EntityRecognizerEntityList struct {
  6399. _ struct{} `type:"structure"`
  6400. // Specifies the Amazon S3 location where the entity list is located. The URI
  6401. // must be in the same region as the API endpoint that you are calling.
  6402. //
  6403. // S3Uri is a required field
  6404. S3Uri *string `type:"string" required:"true"`
  6405. }
  6406. // String returns the string representation
  6407. func (s EntityRecognizerEntityList) String() string {
  6408. return awsutil.Prettify(s)
  6409. }
  6410. // GoString returns the string representation
  6411. func (s EntityRecognizerEntityList) GoString() string {
  6412. return s.String()
  6413. }
  6414. // Validate inspects the fields of the type to determine if they are valid.
  6415. func (s *EntityRecognizerEntityList) Validate() error {
  6416. invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerEntityList"}
  6417. if s.S3Uri == nil {
  6418. invalidParams.Add(request.NewErrParamRequired("S3Uri"))
  6419. }
  6420. if invalidParams.Len() > 0 {
  6421. return invalidParams
  6422. }
  6423. return nil
  6424. }
  6425. // SetS3Uri sets the S3Uri field's value.
  6426. func (s *EntityRecognizerEntityList) SetS3Uri(v string) *EntityRecognizerEntityList {
  6427. s.S3Uri = &v
  6428. return s
  6429. }
  6430. // Detailed information about the accuracy of an entity recognizer.
  6431. type EntityRecognizerEvaluationMetrics struct {
  6432. _ struct{} `type:"structure"`
  6433. // A measure of how accurate the recognizer results are for the test data. It
  6434. // is derived from the Precision and Recall values. The F1Score is the harmonic
  6435. // average of the two scores. The highest score is 1, and the worst score is
  6436. // 0.
  6437. F1Score *float64 `type:"double"`
  6438. // A measure of the usefulness of the recognizer results in the test data. High
  6439. // precision means that the recognizer returned substantially more relevant
  6440. // results than irrelevant ones.
  6441. Precision *float64 `type:"double"`
  6442. // A measure of how complete the recognizer results are for the test data. High
  6443. // recall means that the recognizer returned most of the relevant results.
  6444. Recall *float64 `type:"double"`
  6445. }
  6446. // String returns the string representation
  6447. func (s EntityRecognizerEvaluationMetrics) String() string {
  6448. return awsutil.Prettify(s)
  6449. }
  6450. // GoString returns the string representation
  6451. func (s EntityRecognizerEvaluationMetrics) GoString() string {
  6452. return s.String()
  6453. }
  6454. // SetF1Score sets the F1Score field's value.
  6455. func (s *EntityRecognizerEvaluationMetrics) SetF1Score(v float64) *EntityRecognizerEvaluationMetrics {
  6456. s.F1Score = &v
  6457. return s
  6458. }
  6459. // SetPrecision sets the Precision field's value.
  6460. func (s *EntityRecognizerEvaluationMetrics) SetPrecision(v float64) *EntityRecognizerEvaluationMetrics {
  6461. s.Precision = &v
  6462. return s
  6463. }
  6464. // SetRecall sets the Recall field's value.
  6465. func (s *EntityRecognizerEvaluationMetrics) SetRecall(v float64) *EntityRecognizerEvaluationMetrics {
  6466. s.Recall = &v
  6467. return s
  6468. }
  6469. // Provides information for filtering a list of entity recognizers. You can
  6470. // only specify one filtering parameter in a request. For more information,
  6471. // see the operation./>
  6472. type EntityRecognizerFilter struct {
  6473. _ struct{} `type:"structure"`
  6474. // The status of an entity recognizer.
  6475. Status *string `type:"string" enum:"ModelStatus"`
  6476. // Filters the list of entities based on the time that the list was submitted
  6477. // for processing. Returns only jobs submitted after the specified time. Jobs
  6478. // are returned in ascending order, oldest to newest.
  6479. SubmitTimeAfter *time.Time `type:"timestamp"`
  6480. // Filters the list of entities based on the time that the list was submitted
  6481. // for processing. Returns only jobs submitted before the specified time. Jobs
  6482. // are returned in descending order, newest to oldest.
  6483. SubmitTimeBefore *time.Time `type:"timestamp"`
  6484. }
  6485. // String returns the string representation
  6486. func (s EntityRecognizerFilter) String() string {
  6487. return awsutil.Prettify(s)
  6488. }
  6489. // GoString returns the string representation
  6490. func (s EntityRecognizerFilter) GoString() string {
  6491. return s.String()
  6492. }
  6493. // SetStatus sets the Status field's value.
  6494. func (s *EntityRecognizerFilter) SetStatus(v string) *EntityRecognizerFilter {
  6495. s.Status = &v
  6496. return s
  6497. }
  6498. // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
  6499. func (s *EntityRecognizerFilter) SetSubmitTimeAfter(v time.Time) *EntityRecognizerFilter {
  6500. s.SubmitTimeAfter = &v
  6501. return s
  6502. }
  6503. // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
  6504. func (s *EntityRecognizerFilter) SetSubmitTimeBefore(v time.Time) *EntityRecognizerFilter {
  6505. s.SubmitTimeBefore = &v
  6506. return s
  6507. }
  6508. // Specifies the format and location of the input data.
  6509. type EntityRecognizerInputDataConfig struct {
  6510. _ struct{} `type:"structure"`
  6511. // S3 location of the annotations file for an entity recognizer.
  6512. Annotations *EntityRecognizerAnnotations `type:"structure"`
  6513. // S3 location of the documents folder for an entity recognizer
  6514. //
  6515. // Documents is a required field
  6516. Documents *EntityRecognizerDocuments `type:"structure" required:"true"`
  6517. // S3 location of the entity list for an entity recognizer.
  6518. EntityList *EntityRecognizerEntityList `type:"structure"`
  6519. // The entity types in the input data for an entity recognizer.
  6520. //
  6521. // EntityTypes is a required field
  6522. EntityTypes []*EntityTypesListItem `type:"list" required:"true"`
  6523. }
  6524. // String returns the string representation
  6525. func (s EntityRecognizerInputDataConfig) String() string {
  6526. return awsutil.Prettify(s)
  6527. }
  6528. // GoString returns the string representation
  6529. func (s EntityRecognizerInputDataConfig) GoString() string {
  6530. return s.String()
  6531. }
  6532. // Validate inspects the fields of the type to determine if they are valid.
  6533. func (s *EntityRecognizerInputDataConfig) Validate() error {
  6534. invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerInputDataConfig"}
  6535. if s.Documents == nil {
  6536. invalidParams.Add(request.NewErrParamRequired("Documents"))
  6537. }
  6538. if s.EntityTypes == nil {
  6539. invalidParams.Add(request.NewErrParamRequired("EntityTypes"))
  6540. }
  6541. if s.Annotations != nil {
  6542. if err := s.Annotations.Validate(); err != nil {
  6543. invalidParams.AddNested("Annotations", err.(request.ErrInvalidParams))
  6544. }
  6545. }
  6546. if s.Documents != nil {
  6547. if err := s.Documents.Validate(); err != nil {
  6548. invalidParams.AddNested("Documents", err.(request.ErrInvalidParams))
  6549. }
  6550. }
  6551. if s.EntityList != nil {
  6552. if err := s.EntityList.Validate(); err != nil {
  6553. invalidParams.AddNested("EntityList", err.(request.ErrInvalidParams))
  6554. }
  6555. }
  6556. if s.EntityTypes != nil {
  6557. for i, v := range s.EntityTypes {
  6558. if v == nil {
  6559. continue
  6560. }
  6561. if err := v.Validate(); err != nil {
  6562. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EntityTypes", i), err.(request.ErrInvalidParams))
  6563. }
  6564. }
  6565. }
  6566. if invalidParams.Len() > 0 {
  6567. return invalidParams
  6568. }
  6569. return nil
  6570. }
  6571. // SetAnnotations sets the Annotations field's value.
  6572. func (s *EntityRecognizerInputDataConfig) SetAnnotations(v *EntityRecognizerAnnotations) *EntityRecognizerInputDataConfig {
  6573. s.Annotations = v
  6574. return s
  6575. }
  6576. // SetDocuments sets the Documents field's value.
  6577. func (s *EntityRecognizerInputDataConfig) SetDocuments(v *EntityRecognizerDocuments) *EntityRecognizerInputDataConfig {
  6578. s.Documents = v
  6579. return s
  6580. }
  6581. // SetEntityList sets the EntityList field's value.
  6582. func (s *EntityRecognizerInputDataConfig) SetEntityList(v *EntityRecognizerEntityList) *EntityRecognizerInputDataConfig {
  6583. s.EntityList = v
  6584. return s
  6585. }
  6586. // SetEntityTypes sets the EntityTypes field's value.
  6587. func (s *EntityRecognizerInputDataConfig) SetEntityTypes(v []*EntityTypesListItem) *EntityRecognizerInputDataConfig {
  6588. s.EntityTypes = v
  6589. return s
  6590. }
  6591. // Detailed information about an entity recognizer.
  6592. type EntityRecognizerMetadata struct {
  6593. _ struct{} `type:"structure"`
  6594. // Entity types from the metadata of an entity recognizer.
  6595. EntityTypes []*EntityRecognizerMetadataEntityTypesListItem `type:"list"`
  6596. // Detailed information about the accuracy of an entity recognizer.
  6597. EvaluationMetrics *EntityRecognizerEvaluationMetrics `type:"structure"`
  6598. // The number of documents in the input data that were used to test the entity
  6599. // recognizer. Typically this is 10 to 20 percent of the input documents.
  6600. NumberOfTestDocuments *int64 `type:"integer"`
  6601. // The number of documents in the input data that were used to train the entity
  6602. // recognizer. Typically this is 80 to 90 percent of the input documents.
  6603. NumberOfTrainedDocuments *int64 `type:"integer"`
  6604. }
  6605. // String returns the string representation
  6606. func (s EntityRecognizerMetadata) String() string {
  6607. return awsutil.Prettify(s)
  6608. }
  6609. // GoString returns the string representation
  6610. func (s EntityRecognizerMetadata) GoString() string {
  6611. return s.String()
  6612. }
  6613. // SetEntityTypes sets the EntityTypes field's value.
  6614. func (s *EntityRecognizerMetadata) SetEntityTypes(v []*EntityRecognizerMetadataEntityTypesListItem) *EntityRecognizerMetadata {
  6615. s.EntityTypes = v
  6616. return s
  6617. }
  6618. // SetEvaluationMetrics sets the EvaluationMetrics field's value.
  6619. func (s *EntityRecognizerMetadata) SetEvaluationMetrics(v *EntityRecognizerEvaluationMetrics) *EntityRecognizerMetadata {
  6620. s.EvaluationMetrics = v
  6621. return s
  6622. }
  6623. // SetNumberOfTestDocuments sets the NumberOfTestDocuments field's value.
  6624. func (s *EntityRecognizerMetadata) SetNumberOfTestDocuments(v int64) *EntityRecognizerMetadata {
  6625. s.NumberOfTestDocuments = &v
  6626. return s
  6627. }
  6628. // SetNumberOfTrainedDocuments sets the NumberOfTrainedDocuments field's value.
  6629. func (s *EntityRecognizerMetadata) SetNumberOfTrainedDocuments(v int64) *EntityRecognizerMetadata {
  6630. s.NumberOfTrainedDocuments = &v
  6631. return s
  6632. }
  6633. // Individual item from the list of entity types in the metadata of an entity
  6634. // recognizer.
  6635. type EntityRecognizerMetadataEntityTypesListItem struct {
  6636. _ struct{} `type:"structure"`
  6637. // Type of entity from the list of entity types in the metadata of an entity
  6638. // recognizer.
  6639. Type *string `type:"string"`
  6640. }
  6641. // String returns the string representation
  6642. func (s EntityRecognizerMetadataEntityTypesListItem) String() string {
  6643. return awsutil.Prettify(s)
  6644. }
  6645. // GoString returns the string representation
  6646. func (s EntityRecognizerMetadataEntityTypesListItem) GoString() string {
  6647. return s.String()
  6648. }
  6649. // SetType sets the Type field's value.
  6650. func (s *EntityRecognizerMetadataEntityTypesListItem) SetType(v string) *EntityRecognizerMetadataEntityTypesListItem {
  6651. s.Type = &v
  6652. return s
  6653. }
  6654. // Describes information about an entity recognizer.
  6655. type EntityRecognizerProperties struct {
  6656. _ struct{} `type:"structure"`
  6657. // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role
  6658. // that grants Amazon Comprehend read access to your input data.
  6659. DataAccessRoleArn *string `min:"20" type:"string"`
  6660. // The time that the recognizer creation completed.
  6661. EndTime *time.Time `type:"timestamp"`
  6662. // The Amazon Resource Name (ARN) that identifies the entity recognizer.
  6663. EntityRecognizerArn *string `type:"string"`
  6664. // The input data properties of an entity recognizer.
  6665. InputDataConfig *EntityRecognizerInputDataConfig `type:"structure"`
  6666. // The language of the input documents. All documents must be in the same language.
  6667. // Only English ("en") is currently supported.
  6668. LanguageCode *string `type:"string" enum:"LanguageCode"`
  6669. // A description of the status of the recognizer.
  6670. Message *string `type:"string"`
  6671. // Provides information about an entity recognizer.
  6672. RecognizerMetadata *EntityRecognizerMetadata `type:"structure"`
  6673. // Provides the status of the entity recognizer.
  6674. Status *string `type:"string" enum:"ModelStatus"`
  6675. // The time that the recognizer was submitted for processing.
  6676. SubmitTime *time.Time `type:"timestamp"`
  6677. // The time that training of the entity recognizer was completed.
  6678. TrainingEndTime *time.Time `type:"timestamp"`
  6679. // The time that training of the entity recognizer started.
  6680. TrainingStartTime *time.Time `type:"timestamp"`
  6681. }
  6682. // String returns the string representation
  6683. func (s EntityRecognizerProperties) String() string {
  6684. return awsutil.Prettify(s)
  6685. }
  6686. // GoString returns the string representation
  6687. func (s EntityRecognizerProperties) GoString() string {
  6688. return s.String()
  6689. }
  6690. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  6691. func (s *EntityRecognizerProperties) SetDataAccessRoleArn(v string) *EntityRecognizerProperties {
  6692. s.DataAccessRoleArn = &v
  6693. return s
  6694. }
  6695. // SetEndTime sets the EndTime field's value.
  6696. func (s *EntityRecognizerProperties) SetEndTime(v time.Time) *EntityRecognizerProperties {
  6697. s.EndTime = &v
  6698. return s
  6699. }
  6700. // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
  6701. func (s *EntityRecognizerProperties) SetEntityRecognizerArn(v string) *EntityRecognizerProperties {
  6702. s.EntityRecognizerArn = &v
  6703. return s
  6704. }
  6705. // SetInputDataConfig sets the InputDataConfig field's value.
  6706. func (s *EntityRecognizerProperties) SetInputDataConfig(v *EntityRecognizerInputDataConfig) *EntityRecognizerProperties {
  6707. s.InputDataConfig = v
  6708. return s
  6709. }
  6710. // SetLanguageCode sets the LanguageCode field's value.
  6711. func (s *EntityRecognizerProperties) SetLanguageCode(v string) *EntityRecognizerProperties {
  6712. s.LanguageCode = &v
  6713. return s
  6714. }
  6715. // SetMessage sets the Message field's value.
  6716. func (s *EntityRecognizerProperties) SetMessage(v string) *EntityRecognizerProperties {
  6717. s.Message = &v
  6718. return s
  6719. }
  6720. // SetRecognizerMetadata sets the RecognizerMetadata field's value.
  6721. func (s *EntityRecognizerProperties) SetRecognizerMetadata(v *EntityRecognizerMetadata) *EntityRecognizerProperties {
  6722. s.RecognizerMetadata = v
  6723. return s
  6724. }
  6725. // SetStatus sets the Status field's value.
  6726. func (s *EntityRecognizerProperties) SetStatus(v string) *EntityRecognizerProperties {
  6727. s.Status = &v
  6728. return s
  6729. }
  6730. // SetSubmitTime sets the SubmitTime field's value.
  6731. func (s *EntityRecognizerProperties) SetSubmitTime(v time.Time) *EntityRecognizerProperties {
  6732. s.SubmitTime = &v
  6733. return s
  6734. }
  6735. // SetTrainingEndTime sets the TrainingEndTime field's value.
  6736. func (s *EntityRecognizerProperties) SetTrainingEndTime(v time.Time) *EntityRecognizerProperties {
  6737. s.TrainingEndTime = &v
  6738. return s
  6739. }
  6740. // SetTrainingStartTime sets the TrainingStartTime field's value.
  6741. func (s *EntityRecognizerProperties) SetTrainingStartTime(v time.Time) *EntityRecognizerProperties {
  6742. s.TrainingStartTime = &v
  6743. return s
  6744. }
  6745. // Information about an individual item on a list of entity types.
  6746. type EntityTypesListItem struct {
  6747. _ struct{} `type:"structure"`
  6748. // Entity type of an item on an entity type list.
  6749. //
  6750. // Type is a required field
  6751. Type *string `type:"string" required:"true"`
  6752. }
  6753. // String returns the string representation
  6754. func (s EntityTypesListItem) String() string {
  6755. return awsutil.Prettify(s)
  6756. }
  6757. // GoString returns the string representation
  6758. func (s EntityTypesListItem) GoString() string {
  6759. return s.String()
  6760. }
  6761. // Validate inspects the fields of the type to determine if they are valid.
  6762. func (s *EntityTypesListItem) Validate() error {
  6763. invalidParams := request.ErrInvalidParams{Context: "EntityTypesListItem"}
  6764. if s.Type == nil {
  6765. invalidParams.Add(request.NewErrParamRequired("Type"))
  6766. }
  6767. if invalidParams.Len() > 0 {
  6768. return invalidParams
  6769. }
  6770. return nil
  6771. }
  6772. // SetType sets the Type field's value.
  6773. func (s *EntityTypesListItem) SetType(v string) *EntityTypesListItem {
  6774. s.Type = &v
  6775. return s
  6776. }
  6777. // The input properties for a topic detection job.
  6778. type InputDataConfig struct {
  6779. _ struct{} `type:"structure"`
  6780. // Specifies how the text in an input file should be processed:
  6781. //
  6782. // * ONE_DOC_PER_FILE - Each file is considered a separate document. Use
  6783. // this option when you are processing large documents, such as newspaper
  6784. // articles or scientific papers.
  6785. //
  6786. // * ONE_DOC_PER_LINE - Each line in a file is considered a separate document.
  6787. // Use this option when you are processing many short documents, such as
  6788. // text messages.
  6789. InputFormat *string `type:"string" enum:"InputFormat"`
  6790. // The Amazon S3 URI for the input data. The URI must be in same region as the
  6791. // API endpoint that you are calling. The URI can point to a single input file
  6792. // or it can provide the prefix for a collection of data files.
  6793. //
  6794. // For example, if you use the URI S3://bucketName/prefix, if the prefix is
  6795. // a single file, Amazon Comprehend uses that file as input. If more than one
  6796. // file begins with the prefix, Amazon Comprehend uses all of them as input.
  6797. //
  6798. // S3Uri is a required field
  6799. S3Uri *string `type:"string" required:"true"`
  6800. }
  6801. // String returns the string representation
  6802. func (s InputDataConfig) String() string {
  6803. return awsutil.Prettify(s)
  6804. }
  6805. // GoString returns the string representation
  6806. func (s InputDataConfig) GoString() string {
  6807. return s.String()
  6808. }
  6809. // Validate inspects the fields of the type to determine if they are valid.
  6810. func (s *InputDataConfig) Validate() error {
  6811. invalidParams := request.ErrInvalidParams{Context: "InputDataConfig"}
  6812. if s.S3Uri == nil {
  6813. invalidParams.Add(request.NewErrParamRequired("S3Uri"))
  6814. }
  6815. if invalidParams.Len() > 0 {
  6816. return invalidParams
  6817. }
  6818. return nil
  6819. }
  6820. // SetInputFormat sets the InputFormat field's value.
  6821. func (s *InputDataConfig) SetInputFormat(v string) *InputDataConfig {
  6822. s.InputFormat = &v
  6823. return s
  6824. }
  6825. // SetS3Uri sets the S3Uri field's value.
  6826. func (s *InputDataConfig) SetS3Uri(v string) *InputDataConfig {
  6827. s.S3Uri = &v
  6828. return s
  6829. }
  6830. // Describes a key noun phrase.
  6831. type KeyPhrase struct {
  6832. _ struct{} `type:"structure"`
  6833. // A character offset in the input text that shows where the key phrase begins
  6834. // (the first character is at position 0). The offset returns the position of
  6835. // each UTF-8 code point in the string. A code point is the abstract character
  6836. // from a particular graphical representation. For example, a multi-byte UTF-8
  6837. // character maps to a single code point.
  6838. BeginOffset *int64 `type:"integer"`
  6839. // A character offset in the input text where the key phrase ends. The offset
  6840. // returns the position of each UTF-8 code point in the string. A code point
  6841. // is the abstract character from a particular graphical representation. For
  6842. // example, a multi-byte UTF-8 character maps to a single code point.
  6843. EndOffset *int64 `type:"integer"`
  6844. // The level of confidence that Amazon Comprehend has in the accuracy of the
  6845. // detection.
  6846. Score *float64 `type:"float"`
  6847. // The text of a key noun phrase.
  6848. Text *string `min:"1" type:"string"`
  6849. }
  6850. // String returns the string representation
  6851. func (s KeyPhrase) String() string {
  6852. return awsutil.Prettify(s)
  6853. }
  6854. // GoString returns the string representation
  6855. func (s KeyPhrase) GoString() string {
  6856. return s.String()
  6857. }
  6858. // SetBeginOffset sets the BeginOffset field's value.
  6859. func (s *KeyPhrase) SetBeginOffset(v int64) *KeyPhrase {
  6860. s.BeginOffset = &v
  6861. return s
  6862. }
  6863. // SetEndOffset sets the EndOffset field's value.
  6864. func (s *KeyPhrase) SetEndOffset(v int64) *KeyPhrase {
  6865. s.EndOffset = &v
  6866. return s
  6867. }
  6868. // SetScore sets the Score field's value.
  6869. func (s *KeyPhrase) SetScore(v float64) *KeyPhrase {
  6870. s.Score = &v
  6871. return s
  6872. }
  6873. // SetText sets the Text field's value.
  6874. func (s *KeyPhrase) SetText(v string) *KeyPhrase {
  6875. s.Text = &v
  6876. return s
  6877. }
  6878. // Provides information for filtering a list of dominant language detection
  6879. // jobs. For more information, see the operation.
  6880. type KeyPhrasesDetectionJobFilter struct {
  6881. _ struct{} `type:"structure"`
  6882. // Filters on the name of the job.
  6883. JobName *string `min:"1" type:"string"`
  6884. // Filters the list of jobs based on job status. Returns only jobs with the
  6885. // specified status.
  6886. JobStatus *string `type:"string" enum:"JobStatus"`
  6887. // Filters the list of jobs based on the time that the job was submitted for
  6888. // processing. Returns only jobs submitted after the specified time. Jobs are
  6889. // returned in descending order, newest to oldest.
  6890. SubmitTimeAfter *time.Time `type:"timestamp"`
  6891. // Filters the list of jobs based on the time that the job was submitted for
  6892. // processing. Returns only jobs submitted before the specified time. Jobs are
  6893. // returned in ascending order, oldest to newest.
  6894. SubmitTimeBefore *time.Time `type:"timestamp"`
  6895. }
  6896. // String returns the string representation
  6897. func (s KeyPhrasesDetectionJobFilter) String() string {
  6898. return awsutil.Prettify(s)
  6899. }
  6900. // GoString returns the string representation
  6901. func (s KeyPhrasesDetectionJobFilter) GoString() string {
  6902. return s.String()
  6903. }
  6904. // Validate inspects the fields of the type to determine if they are valid.
  6905. func (s *KeyPhrasesDetectionJobFilter) Validate() error {
  6906. invalidParams := request.ErrInvalidParams{Context: "KeyPhrasesDetectionJobFilter"}
  6907. if s.JobName != nil && len(*s.JobName) < 1 {
  6908. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  6909. }
  6910. if invalidParams.Len() > 0 {
  6911. return invalidParams
  6912. }
  6913. return nil
  6914. }
  6915. // SetJobName sets the JobName field's value.
  6916. func (s *KeyPhrasesDetectionJobFilter) SetJobName(v string) *KeyPhrasesDetectionJobFilter {
  6917. s.JobName = &v
  6918. return s
  6919. }
  6920. // SetJobStatus sets the JobStatus field's value.
  6921. func (s *KeyPhrasesDetectionJobFilter) SetJobStatus(v string) *KeyPhrasesDetectionJobFilter {
  6922. s.JobStatus = &v
  6923. return s
  6924. }
  6925. // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
  6926. func (s *KeyPhrasesDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *KeyPhrasesDetectionJobFilter {
  6927. s.SubmitTimeAfter = &v
  6928. return s
  6929. }
  6930. // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
  6931. func (s *KeyPhrasesDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *KeyPhrasesDetectionJobFilter {
  6932. s.SubmitTimeBefore = &v
  6933. return s
  6934. }
  6935. // Provides information about a key phrases detection job.
  6936. type KeyPhrasesDetectionJobProperties struct {
  6937. _ struct{} `type:"structure"`
  6938. // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to
  6939. // your input data.
  6940. DataAccessRoleArn *string `min:"20" type:"string"`
  6941. // The time that the key phrases detection job completed.
  6942. EndTime *time.Time `type:"timestamp"`
  6943. // The input data configuration that you supplied when you created the key phrases
  6944. // detection job.
  6945. InputDataConfig *InputDataConfig `type:"structure"`
  6946. // The identifier assigned to the key phrases detection job.
  6947. JobId *string `min:"1" type:"string"`
  6948. // The name that you assigned the key phrases detection job.
  6949. JobName *string `min:"1" type:"string"`
  6950. // The current status of the key phrases detection job. If the status is FAILED,
  6951. // the Message field shows the reason for the failure.
  6952. JobStatus *string `type:"string" enum:"JobStatus"`
  6953. // The language code of the input documents.
  6954. LanguageCode *string `type:"string" enum:"LanguageCode"`
  6955. // A description of the status of a job.
  6956. Message *string `type:"string"`
  6957. // The output data configuration that you supplied when you created the key
  6958. // phrases detection job.
  6959. OutputDataConfig *OutputDataConfig `type:"structure"`
  6960. // The time that the key phrases detection job was submitted for processing.
  6961. SubmitTime *time.Time `type:"timestamp"`
  6962. }
  6963. // String returns the string representation
  6964. func (s KeyPhrasesDetectionJobProperties) String() string {
  6965. return awsutil.Prettify(s)
  6966. }
  6967. // GoString returns the string representation
  6968. func (s KeyPhrasesDetectionJobProperties) GoString() string {
  6969. return s.String()
  6970. }
  6971. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  6972. func (s *KeyPhrasesDetectionJobProperties) SetDataAccessRoleArn(v string) *KeyPhrasesDetectionJobProperties {
  6973. s.DataAccessRoleArn = &v
  6974. return s
  6975. }
  6976. // SetEndTime sets the EndTime field's value.
  6977. func (s *KeyPhrasesDetectionJobProperties) SetEndTime(v time.Time) *KeyPhrasesDetectionJobProperties {
  6978. s.EndTime = &v
  6979. return s
  6980. }
  6981. // SetInputDataConfig sets the InputDataConfig field's value.
  6982. func (s *KeyPhrasesDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *KeyPhrasesDetectionJobProperties {
  6983. s.InputDataConfig = v
  6984. return s
  6985. }
  6986. // SetJobId sets the JobId field's value.
  6987. func (s *KeyPhrasesDetectionJobProperties) SetJobId(v string) *KeyPhrasesDetectionJobProperties {
  6988. s.JobId = &v
  6989. return s
  6990. }
  6991. // SetJobName sets the JobName field's value.
  6992. func (s *KeyPhrasesDetectionJobProperties) SetJobName(v string) *KeyPhrasesDetectionJobProperties {
  6993. s.JobName = &v
  6994. return s
  6995. }
  6996. // SetJobStatus sets the JobStatus field's value.
  6997. func (s *KeyPhrasesDetectionJobProperties) SetJobStatus(v string) *KeyPhrasesDetectionJobProperties {
  6998. s.JobStatus = &v
  6999. return s
  7000. }
  7001. // SetLanguageCode sets the LanguageCode field's value.
  7002. func (s *KeyPhrasesDetectionJobProperties) SetLanguageCode(v string) *KeyPhrasesDetectionJobProperties {
  7003. s.LanguageCode = &v
  7004. return s
  7005. }
  7006. // SetMessage sets the Message field's value.
  7007. func (s *KeyPhrasesDetectionJobProperties) SetMessage(v string) *KeyPhrasesDetectionJobProperties {
  7008. s.Message = &v
  7009. return s
  7010. }
  7011. // SetOutputDataConfig sets the OutputDataConfig field's value.
  7012. func (s *KeyPhrasesDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *KeyPhrasesDetectionJobProperties {
  7013. s.OutputDataConfig = v
  7014. return s
  7015. }
  7016. // SetSubmitTime sets the SubmitTime field's value.
  7017. func (s *KeyPhrasesDetectionJobProperties) SetSubmitTime(v time.Time) *KeyPhrasesDetectionJobProperties {
  7018. s.SubmitTime = &v
  7019. return s
  7020. }
  7021. type ListDocumentClassificationJobsInput struct {
  7022. _ struct{} `type:"structure"`
  7023. // Filters the jobs that are returned. You can filter jobs on their names, status,
  7024. // or the date and time that they were submitted. You can only set one filter
  7025. // at a time.
  7026. Filter *DocumentClassificationJobFilter `type:"structure"`
  7027. // The maximum number of results to return in each page. The default is 100.
  7028. MaxResults *int64 `min:"1" type:"integer"`
  7029. // Identifies the next page of results to return.
  7030. NextToken *string `min:"1" type:"string"`
  7031. }
  7032. // String returns the string representation
  7033. func (s ListDocumentClassificationJobsInput) String() string {
  7034. return awsutil.Prettify(s)
  7035. }
  7036. // GoString returns the string representation
  7037. func (s ListDocumentClassificationJobsInput) GoString() string {
  7038. return s.String()
  7039. }
  7040. // Validate inspects the fields of the type to determine if they are valid.
  7041. func (s *ListDocumentClassificationJobsInput) Validate() error {
  7042. invalidParams := request.ErrInvalidParams{Context: "ListDocumentClassificationJobsInput"}
  7043. if s.MaxResults != nil && *s.MaxResults < 1 {
  7044. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7045. }
  7046. if s.NextToken != nil && len(*s.NextToken) < 1 {
  7047. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  7048. }
  7049. if s.Filter != nil {
  7050. if err := s.Filter.Validate(); err != nil {
  7051. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  7052. }
  7053. }
  7054. if invalidParams.Len() > 0 {
  7055. return invalidParams
  7056. }
  7057. return nil
  7058. }
  7059. // SetFilter sets the Filter field's value.
  7060. func (s *ListDocumentClassificationJobsInput) SetFilter(v *DocumentClassificationJobFilter) *ListDocumentClassificationJobsInput {
  7061. s.Filter = v
  7062. return s
  7063. }
  7064. // SetMaxResults sets the MaxResults field's value.
  7065. func (s *ListDocumentClassificationJobsInput) SetMaxResults(v int64) *ListDocumentClassificationJobsInput {
  7066. s.MaxResults = &v
  7067. return s
  7068. }
  7069. // SetNextToken sets the NextToken field's value.
  7070. func (s *ListDocumentClassificationJobsInput) SetNextToken(v string) *ListDocumentClassificationJobsInput {
  7071. s.NextToken = &v
  7072. return s
  7073. }
  7074. type ListDocumentClassificationJobsOutput struct {
  7075. _ struct{} `type:"structure"`
  7076. // A list containing the properties of each job returned.
  7077. DocumentClassificationJobPropertiesList []*DocumentClassificationJobProperties `type:"list"`
  7078. // Identifies the next page of results to return.
  7079. NextToken *string `min:"1" type:"string"`
  7080. }
  7081. // String returns the string representation
  7082. func (s ListDocumentClassificationJobsOutput) String() string {
  7083. return awsutil.Prettify(s)
  7084. }
  7085. // GoString returns the string representation
  7086. func (s ListDocumentClassificationJobsOutput) GoString() string {
  7087. return s.String()
  7088. }
  7089. // SetDocumentClassificationJobPropertiesList sets the DocumentClassificationJobPropertiesList field's value.
  7090. func (s *ListDocumentClassificationJobsOutput) SetDocumentClassificationJobPropertiesList(v []*DocumentClassificationJobProperties) *ListDocumentClassificationJobsOutput {
  7091. s.DocumentClassificationJobPropertiesList = v
  7092. return s
  7093. }
  7094. // SetNextToken sets the NextToken field's value.
  7095. func (s *ListDocumentClassificationJobsOutput) SetNextToken(v string) *ListDocumentClassificationJobsOutput {
  7096. s.NextToken = &v
  7097. return s
  7098. }
  7099. type ListDocumentClassifiersInput struct {
  7100. _ struct{} `type:"structure"`
  7101. // Filters the jobs that are returned. You can filter jobs on their name, status,
  7102. // or the date and time that they were submitted. You can only set one filter
  7103. // at a time.
  7104. Filter *DocumentClassifierFilter `type:"structure"`
  7105. // The maximum number of results to return in each page. The default is 100.
  7106. MaxResults *int64 `min:"1" type:"integer"`
  7107. // Identifies the next page of results to return.
  7108. NextToken *string `min:"1" type:"string"`
  7109. }
  7110. // String returns the string representation
  7111. func (s ListDocumentClassifiersInput) String() string {
  7112. return awsutil.Prettify(s)
  7113. }
  7114. // GoString returns the string representation
  7115. func (s ListDocumentClassifiersInput) GoString() string {
  7116. return s.String()
  7117. }
  7118. // Validate inspects the fields of the type to determine if they are valid.
  7119. func (s *ListDocumentClassifiersInput) Validate() error {
  7120. invalidParams := request.ErrInvalidParams{Context: "ListDocumentClassifiersInput"}
  7121. if s.MaxResults != nil && *s.MaxResults < 1 {
  7122. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7123. }
  7124. if s.NextToken != nil && len(*s.NextToken) < 1 {
  7125. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  7126. }
  7127. if invalidParams.Len() > 0 {
  7128. return invalidParams
  7129. }
  7130. return nil
  7131. }
  7132. // SetFilter sets the Filter field's value.
  7133. func (s *ListDocumentClassifiersInput) SetFilter(v *DocumentClassifierFilter) *ListDocumentClassifiersInput {
  7134. s.Filter = v
  7135. return s
  7136. }
  7137. // SetMaxResults sets the MaxResults field's value.
  7138. func (s *ListDocumentClassifiersInput) SetMaxResults(v int64) *ListDocumentClassifiersInput {
  7139. s.MaxResults = &v
  7140. return s
  7141. }
  7142. // SetNextToken sets the NextToken field's value.
  7143. func (s *ListDocumentClassifiersInput) SetNextToken(v string) *ListDocumentClassifiersInput {
  7144. s.NextToken = &v
  7145. return s
  7146. }
  7147. type ListDocumentClassifiersOutput struct {
  7148. _ struct{} `type:"structure"`
  7149. // A list containing the properties of each job returned.
  7150. DocumentClassifierPropertiesList []*DocumentClassifierProperties `type:"list"`
  7151. // Identifies the next page of results to return.
  7152. NextToken *string `min:"1" type:"string"`
  7153. }
  7154. // String returns the string representation
  7155. func (s ListDocumentClassifiersOutput) String() string {
  7156. return awsutil.Prettify(s)
  7157. }
  7158. // GoString returns the string representation
  7159. func (s ListDocumentClassifiersOutput) GoString() string {
  7160. return s.String()
  7161. }
  7162. // SetDocumentClassifierPropertiesList sets the DocumentClassifierPropertiesList field's value.
  7163. func (s *ListDocumentClassifiersOutput) SetDocumentClassifierPropertiesList(v []*DocumentClassifierProperties) *ListDocumentClassifiersOutput {
  7164. s.DocumentClassifierPropertiesList = v
  7165. return s
  7166. }
  7167. // SetNextToken sets the NextToken field's value.
  7168. func (s *ListDocumentClassifiersOutput) SetNextToken(v string) *ListDocumentClassifiersOutput {
  7169. s.NextToken = &v
  7170. return s
  7171. }
  7172. type ListDominantLanguageDetectionJobsInput struct {
  7173. _ struct{} `type:"structure"`
  7174. // Filters that jobs that are returned. You can filter jobs on their name, status,
  7175. // or the date and time that they were submitted. You can only set one filter
  7176. // at a time.
  7177. Filter *DominantLanguageDetectionJobFilter `type:"structure"`
  7178. // The maximum number of results to return in each page. The default is 100.
  7179. MaxResults *int64 `min:"1" type:"integer"`
  7180. // Identifies the next page of results to return.
  7181. NextToken *string `min:"1" type:"string"`
  7182. }
  7183. // String returns the string representation
  7184. func (s ListDominantLanguageDetectionJobsInput) String() string {
  7185. return awsutil.Prettify(s)
  7186. }
  7187. // GoString returns the string representation
  7188. func (s ListDominantLanguageDetectionJobsInput) GoString() string {
  7189. return s.String()
  7190. }
  7191. // Validate inspects the fields of the type to determine if they are valid.
  7192. func (s *ListDominantLanguageDetectionJobsInput) Validate() error {
  7193. invalidParams := request.ErrInvalidParams{Context: "ListDominantLanguageDetectionJobsInput"}
  7194. if s.MaxResults != nil && *s.MaxResults < 1 {
  7195. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7196. }
  7197. if s.NextToken != nil && len(*s.NextToken) < 1 {
  7198. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  7199. }
  7200. if s.Filter != nil {
  7201. if err := s.Filter.Validate(); err != nil {
  7202. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  7203. }
  7204. }
  7205. if invalidParams.Len() > 0 {
  7206. return invalidParams
  7207. }
  7208. return nil
  7209. }
  7210. // SetFilter sets the Filter field's value.
  7211. func (s *ListDominantLanguageDetectionJobsInput) SetFilter(v *DominantLanguageDetectionJobFilter) *ListDominantLanguageDetectionJobsInput {
  7212. s.Filter = v
  7213. return s
  7214. }
  7215. // SetMaxResults sets the MaxResults field's value.
  7216. func (s *ListDominantLanguageDetectionJobsInput) SetMaxResults(v int64) *ListDominantLanguageDetectionJobsInput {
  7217. s.MaxResults = &v
  7218. return s
  7219. }
  7220. // SetNextToken sets the NextToken field's value.
  7221. func (s *ListDominantLanguageDetectionJobsInput) SetNextToken(v string) *ListDominantLanguageDetectionJobsInput {
  7222. s.NextToken = &v
  7223. return s
  7224. }
  7225. type ListDominantLanguageDetectionJobsOutput struct {
  7226. _ struct{} `type:"structure"`
  7227. // A list containing the properties of each job that is returned.
  7228. DominantLanguageDetectionJobPropertiesList []*DominantLanguageDetectionJobProperties `type:"list"`
  7229. // Identifies the next page of results to return.
  7230. NextToken *string `min:"1" type:"string"`
  7231. }
  7232. // String returns the string representation
  7233. func (s ListDominantLanguageDetectionJobsOutput) String() string {
  7234. return awsutil.Prettify(s)
  7235. }
  7236. // GoString returns the string representation
  7237. func (s ListDominantLanguageDetectionJobsOutput) GoString() string {
  7238. return s.String()
  7239. }
  7240. // SetDominantLanguageDetectionJobPropertiesList sets the DominantLanguageDetectionJobPropertiesList field's value.
  7241. func (s *ListDominantLanguageDetectionJobsOutput) SetDominantLanguageDetectionJobPropertiesList(v []*DominantLanguageDetectionJobProperties) *ListDominantLanguageDetectionJobsOutput {
  7242. s.DominantLanguageDetectionJobPropertiesList = v
  7243. return s
  7244. }
  7245. // SetNextToken sets the NextToken field's value.
  7246. func (s *ListDominantLanguageDetectionJobsOutput) SetNextToken(v string) *ListDominantLanguageDetectionJobsOutput {
  7247. s.NextToken = &v
  7248. return s
  7249. }
  7250. type ListEntitiesDetectionJobsInput struct {
  7251. _ struct{} `type:"structure"`
  7252. // Filters the jobs that are returned. You can filter jobs on their name, status,
  7253. // or the date and time that they were submitted. You can only set one filter
  7254. // at a time.
  7255. Filter *EntitiesDetectionJobFilter `type:"structure"`
  7256. // The maximum number of results to return in each page. The default is 100.
  7257. MaxResults *int64 `min:"1" type:"integer"`
  7258. // Identifies the next page of results to return.
  7259. NextToken *string `min:"1" type:"string"`
  7260. }
  7261. // String returns the string representation
  7262. func (s ListEntitiesDetectionJobsInput) String() string {
  7263. return awsutil.Prettify(s)
  7264. }
  7265. // GoString returns the string representation
  7266. func (s ListEntitiesDetectionJobsInput) GoString() string {
  7267. return s.String()
  7268. }
  7269. // Validate inspects the fields of the type to determine if they are valid.
  7270. func (s *ListEntitiesDetectionJobsInput) Validate() error {
  7271. invalidParams := request.ErrInvalidParams{Context: "ListEntitiesDetectionJobsInput"}
  7272. if s.MaxResults != nil && *s.MaxResults < 1 {
  7273. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7274. }
  7275. if s.NextToken != nil && len(*s.NextToken) < 1 {
  7276. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  7277. }
  7278. if s.Filter != nil {
  7279. if err := s.Filter.Validate(); err != nil {
  7280. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  7281. }
  7282. }
  7283. if invalidParams.Len() > 0 {
  7284. return invalidParams
  7285. }
  7286. return nil
  7287. }
  7288. // SetFilter sets the Filter field's value.
  7289. func (s *ListEntitiesDetectionJobsInput) SetFilter(v *EntitiesDetectionJobFilter) *ListEntitiesDetectionJobsInput {
  7290. s.Filter = v
  7291. return s
  7292. }
  7293. // SetMaxResults sets the MaxResults field's value.
  7294. func (s *ListEntitiesDetectionJobsInput) SetMaxResults(v int64) *ListEntitiesDetectionJobsInput {
  7295. s.MaxResults = &v
  7296. return s
  7297. }
  7298. // SetNextToken sets the NextToken field's value.
  7299. func (s *ListEntitiesDetectionJobsInput) SetNextToken(v string) *ListEntitiesDetectionJobsInput {
  7300. s.NextToken = &v
  7301. return s
  7302. }
  7303. type ListEntitiesDetectionJobsOutput struct {
  7304. _ struct{} `type:"structure"`
  7305. // A list containing the properties of each job that is returned.
  7306. EntitiesDetectionJobPropertiesList []*EntitiesDetectionJobProperties `type:"list"`
  7307. // Identifies the next page of results to return.
  7308. NextToken *string `min:"1" type:"string"`
  7309. }
  7310. // String returns the string representation
  7311. func (s ListEntitiesDetectionJobsOutput) String() string {
  7312. return awsutil.Prettify(s)
  7313. }
  7314. // GoString returns the string representation
  7315. func (s ListEntitiesDetectionJobsOutput) GoString() string {
  7316. return s.String()
  7317. }
  7318. // SetEntitiesDetectionJobPropertiesList sets the EntitiesDetectionJobPropertiesList field's value.
  7319. func (s *ListEntitiesDetectionJobsOutput) SetEntitiesDetectionJobPropertiesList(v []*EntitiesDetectionJobProperties) *ListEntitiesDetectionJobsOutput {
  7320. s.EntitiesDetectionJobPropertiesList = v
  7321. return s
  7322. }
  7323. // SetNextToken sets the NextToken field's value.
  7324. func (s *ListEntitiesDetectionJobsOutput) SetNextToken(v string) *ListEntitiesDetectionJobsOutput {
  7325. s.NextToken = &v
  7326. return s
  7327. }
  7328. type ListEntityRecognizersInput struct {
  7329. _ struct{} `type:"structure"`
  7330. // Filters the list of entities returned. You can filter on Status, SubmitTimeBefore,
  7331. // or SubmitTimeAfter. You can only set one filter at a time.
  7332. Filter *EntityRecognizerFilter `type:"structure"`
  7333. // The maximum number of results to return on each page. The default is 100.
  7334. MaxResults *int64 `min:"1" type:"integer"`
  7335. // Identifies the next page of results to return.
  7336. NextToken *string `min:"1" type:"string"`
  7337. }
  7338. // String returns the string representation
  7339. func (s ListEntityRecognizersInput) String() string {
  7340. return awsutil.Prettify(s)
  7341. }
  7342. // GoString returns the string representation
  7343. func (s ListEntityRecognizersInput) GoString() string {
  7344. return s.String()
  7345. }
  7346. // Validate inspects the fields of the type to determine if they are valid.
  7347. func (s *ListEntityRecognizersInput) Validate() error {
  7348. invalidParams := request.ErrInvalidParams{Context: "ListEntityRecognizersInput"}
  7349. if s.MaxResults != nil && *s.MaxResults < 1 {
  7350. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7351. }
  7352. if s.NextToken != nil && len(*s.NextToken) < 1 {
  7353. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  7354. }
  7355. if invalidParams.Len() > 0 {
  7356. return invalidParams
  7357. }
  7358. return nil
  7359. }
  7360. // SetFilter sets the Filter field's value.
  7361. func (s *ListEntityRecognizersInput) SetFilter(v *EntityRecognizerFilter) *ListEntityRecognizersInput {
  7362. s.Filter = v
  7363. return s
  7364. }
  7365. // SetMaxResults sets the MaxResults field's value.
  7366. func (s *ListEntityRecognizersInput) SetMaxResults(v int64) *ListEntityRecognizersInput {
  7367. s.MaxResults = &v
  7368. return s
  7369. }
  7370. // SetNextToken sets the NextToken field's value.
  7371. func (s *ListEntityRecognizersInput) SetNextToken(v string) *ListEntityRecognizersInput {
  7372. s.NextToken = &v
  7373. return s
  7374. }
  7375. type ListEntityRecognizersOutput struct {
  7376. _ struct{} `type:"structure"`
  7377. // The list of properties of an entity recognizer.
  7378. EntityRecognizerPropertiesList []*EntityRecognizerProperties `type:"list"`
  7379. // Identifies the next page of results to return.
  7380. NextToken *string `min:"1" type:"string"`
  7381. }
  7382. // String returns the string representation
  7383. func (s ListEntityRecognizersOutput) String() string {
  7384. return awsutil.Prettify(s)
  7385. }
  7386. // GoString returns the string representation
  7387. func (s ListEntityRecognizersOutput) GoString() string {
  7388. return s.String()
  7389. }
  7390. // SetEntityRecognizerPropertiesList sets the EntityRecognizerPropertiesList field's value.
  7391. func (s *ListEntityRecognizersOutput) SetEntityRecognizerPropertiesList(v []*EntityRecognizerProperties) *ListEntityRecognizersOutput {
  7392. s.EntityRecognizerPropertiesList = v
  7393. return s
  7394. }
  7395. // SetNextToken sets the NextToken field's value.
  7396. func (s *ListEntityRecognizersOutput) SetNextToken(v string) *ListEntityRecognizersOutput {
  7397. s.NextToken = &v
  7398. return s
  7399. }
  7400. type ListKeyPhrasesDetectionJobsInput struct {
  7401. _ struct{} `type:"structure"`
  7402. // Filters the jobs that are returned. You can filter jobs on their name, status,
  7403. // or the date and time that they were submitted. You can only set one filter
  7404. // at a time.
  7405. Filter *KeyPhrasesDetectionJobFilter `type:"structure"`
  7406. // The maximum number of results to return in each page. The default is 100.
  7407. MaxResults *int64 `min:"1" type:"integer"`
  7408. // Identifies the next page of results to return.
  7409. NextToken *string `min:"1" type:"string"`
  7410. }
  7411. // String returns the string representation
  7412. func (s ListKeyPhrasesDetectionJobsInput) String() string {
  7413. return awsutil.Prettify(s)
  7414. }
  7415. // GoString returns the string representation
  7416. func (s ListKeyPhrasesDetectionJobsInput) GoString() string {
  7417. return s.String()
  7418. }
  7419. // Validate inspects the fields of the type to determine if they are valid.
  7420. func (s *ListKeyPhrasesDetectionJobsInput) Validate() error {
  7421. invalidParams := request.ErrInvalidParams{Context: "ListKeyPhrasesDetectionJobsInput"}
  7422. if s.MaxResults != nil && *s.MaxResults < 1 {
  7423. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7424. }
  7425. if s.NextToken != nil && len(*s.NextToken) < 1 {
  7426. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  7427. }
  7428. if s.Filter != nil {
  7429. if err := s.Filter.Validate(); err != nil {
  7430. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  7431. }
  7432. }
  7433. if invalidParams.Len() > 0 {
  7434. return invalidParams
  7435. }
  7436. return nil
  7437. }
  7438. // SetFilter sets the Filter field's value.
  7439. func (s *ListKeyPhrasesDetectionJobsInput) SetFilter(v *KeyPhrasesDetectionJobFilter) *ListKeyPhrasesDetectionJobsInput {
  7440. s.Filter = v
  7441. return s
  7442. }
  7443. // SetMaxResults sets the MaxResults field's value.
  7444. func (s *ListKeyPhrasesDetectionJobsInput) SetMaxResults(v int64) *ListKeyPhrasesDetectionJobsInput {
  7445. s.MaxResults = &v
  7446. return s
  7447. }
  7448. // SetNextToken sets the NextToken field's value.
  7449. func (s *ListKeyPhrasesDetectionJobsInput) SetNextToken(v string) *ListKeyPhrasesDetectionJobsInput {
  7450. s.NextToken = &v
  7451. return s
  7452. }
  7453. type ListKeyPhrasesDetectionJobsOutput struct {
  7454. _ struct{} `type:"structure"`
  7455. // A list containing the properties of each job that is returned.
  7456. KeyPhrasesDetectionJobPropertiesList []*KeyPhrasesDetectionJobProperties `type:"list"`
  7457. // Identifies the next page of results to return.
  7458. NextToken *string `min:"1" type:"string"`
  7459. }
  7460. // String returns the string representation
  7461. func (s ListKeyPhrasesDetectionJobsOutput) String() string {
  7462. return awsutil.Prettify(s)
  7463. }
  7464. // GoString returns the string representation
  7465. func (s ListKeyPhrasesDetectionJobsOutput) GoString() string {
  7466. return s.String()
  7467. }
  7468. // SetKeyPhrasesDetectionJobPropertiesList sets the KeyPhrasesDetectionJobPropertiesList field's value.
  7469. func (s *ListKeyPhrasesDetectionJobsOutput) SetKeyPhrasesDetectionJobPropertiesList(v []*KeyPhrasesDetectionJobProperties) *ListKeyPhrasesDetectionJobsOutput {
  7470. s.KeyPhrasesDetectionJobPropertiesList = v
  7471. return s
  7472. }
  7473. // SetNextToken sets the NextToken field's value.
  7474. func (s *ListKeyPhrasesDetectionJobsOutput) SetNextToken(v string) *ListKeyPhrasesDetectionJobsOutput {
  7475. s.NextToken = &v
  7476. return s
  7477. }
  7478. type ListSentimentDetectionJobsInput struct {
  7479. _ struct{} `type:"structure"`
  7480. // Filters the jobs that are returned. You can filter jobs on their name, status,
  7481. // or the date and time that they were submitted. You can only set one filter
  7482. // at a time.
  7483. Filter *SentimentDetectionJobFilter `type:"structure"`
  7484. // The maximum number of results to return in each page. The default is 100.
  7485. MaxResults *int64 `min:"1" type:"integer"`
  7486. // Identifies the next page of results to return.
  7487. NextToken *string `min:"1" type:"string"`
  7488. }
  7489. // String returns the string representation
  7490. func (s ListSentimentDetectionJobsInput) String() string {
  7491. return awsutil.Prettify(s)
  7492. }
  7493. // GoString returns the string representation
  7494. func (s ListSentimentDetectionJobsInput) GoString() string {
  7495. return s.String()
  7496. }
  7497. // Validate inspects the fields of the type to determine if they are valid.
  7498. func (s *ListSentimentDetectionJobsInput) Validate() error {
  7499. invalidParams := request.ErrInvalidParams{Context: "ListSentimentDetectionJobsInput"}
  7500. if s.MaxResults != nil && *s.MaxResults < 1 {
  7501. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7502. }
  7503. if s.NextToken != nil && len(*s.NextToken) < 1 {
  7504. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  7505. }
  7506. if s.Filter != nil {
  7507. if err := s.Filter.Validate(); err != nil {
  7508. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  7509. }
  7510. }
  7511. if invalidParams.Len() > 0 {
  7512. return invalidParams
  7513. }
  7514. return nil
  7515. }
  7516. // SetFilter sets the Filter field's value.
  7517. func (s *ListSentimentDetectionJobsInput) SetFilter(v *SentimentDetectionJobFilter) *ListSentimentDetectionJobsInput {
  7518. s.Filter = v
  7519. return s
  7520. }
  7521. // SetMaxResults sets the MaxResults field's value.
  7522. func (s *ListSentimentDetectionJobsInput) SetMaxResults(v int64) *ListSentimentDetectionJobsInput {
  7523. s.MaxResults = &v
  7524. return s
  7525. }
  7526. // SetNextToken sets the NextToken field's value.
  7527. func (s *ListSentimentDetectionJobsInput) SetNextToken(v string) *ListSentimentDetectionJobsInput {
  7528. s.NextToken = &v
  7529. return s
  7530. }
  7531. type ListSentimentDetectionJobsOutput struct {
  7532. _ struct{} `type:"structure"`
  7533. // Identifies the next page of results to return.
  7534. NextToken *string `min:"1" type:"string"`
  7535. // A list containing the properties of each job that is returned.
  7536. SentimentDetectionJobPropertiesList []*SentimentDetectionJobProperties `type:"list"`
  7537. }
  7538. // String returns the string representation
  7539. func (s ListSentimentDetectionJobsOutput) String() string {
  7540. return awsutil.Prettify(s)
  7541. }
  7542. // GoString returns the string representation
  7543. func (s ListSentimentDetectionJobsOutput) GoString() string {
  7544. return s.String()
  7545. }
  7546. // SetNextToken sets the NextToken field's value.
  7547. func (s *ListSentimentDetectionJobsOutput) SetNextToken(v string) *ListSentimentDetectionJobsOutput {
  7548. s.NextToken = &v
  7549. return s
  7550. }
  7551. // SetSentimentDetectionJobPropertiesList sets the SentimentDetectionJobPropertiesList field's value.
  7552. func (s *ListSentimentDetectionJobsOutput) SetSentimentDetectionJobPropertiesList(v []*SentimentDetectionJobProperties) *ListSentimentDetectionJobsOutput {
  7553. s.SentimentDetectionJobPropertiesList = v
  7554. return s
  7555. }
  7556. type ListTopicsDetectionJobsInput struct {
  7557. _ struct{} `type:"structure"`
  7558. // Filters the jobs that are returned. Jobs can be filtered on their name, status,
  7559. // or the date and time that they were submitted. You can set only one filter
  7560. // at a time.
  7561. Filter *TopicsDetectionJobFilter `type:"structure"`
  7562. // The maximum number of results to return in each page. The default is 100.
  7563. MaxResults *int64 `min:"1" type:"integer"`
  7564. // Identifies the next page of results to return.
  7565. NextToken *string `min:"1" type:"string"`
  7566. }
  7567. // String returns the string representation
  7568. func (s ListTopicsDetectionJobsInput) String() string {
  7569. return awsutil.Prettify(s)
  7570. }
  7571. // GoString returns the string representation
  7572. func (s ListTopicsDetectionJobsInput) GoString() string {
  7573. return s.String()
  7574. }
  7575. // Validate inspects the fields of the type to determine if they are valid.
  7576. func (s *ListTopicsDetectionJobsInput) Validate() error {
  7577. invalidParams := request.ErrInvalidParams{Context: "ListTopicsDetectionJobsInput"}
  7578. if s.MaxResults != nil && *s.MaxResults < 1 {
  7579. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  7580. }
  7581. if s.NextToken != nil && len(*s.NextToken) < 1 {
  7582. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  7583. }
  7584. if s.Filter != nil {
  7585. if err := s.Filter.Validate(); err != nil {
  7586. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  7587. }
  7588. }
  7589. if invalidParams.Len() > 0 {
  7590. return invalidParams
  7591. }
  7592. return nil
  7593. }
  7594. // SetFilter sets the Filter field's value.
  7595. func (s *ListTopicsDetectionJobsInput) SetFilter(v *TopicsDetectionJobFilter) *ListTopicsDetectionJobsInput {
  7596. s.Filter = v
  7597. return s
  7598. }
  7599. // SetMaxResults sets the MaxResults field's value.
  7600. func (s *ListTopicsDetectionJobsInput) SetMaxResults(v int64) *ListTopicsDetectionJobsInput {
  7601. s.MaxResults = &v
  7602. return s
  7603. }
  7604. // SetNextToken sets the NextToken field's value.
  7605. func (s *ListTopicsDetectionJobsInput) SetNextToken(v string) *ListTopicsDetectionJobsInput {
  7606. s.NextToken = &v
  7607. return s
  7608. }
  7609. type ListTopicsDetectionJobsOutput struct {
  7610. _ struct{} `type:"structure"`
  7611. // Identifies the next page of results to return.
  7612. NextToken *string `min:"1" type:"string"`
  7613. // A list containing the properties of each job that is returned.
  7614. TopicsDetectionJobPropertiesList []*TopicsDetectionJobProperties `type:"list"`
  7615. }
  7616. // String returns the string representation
  7617. func (s ListTopicsDetectionJobsOutput) String() string {
  7618. return awsutil.Prettify(s)
  7619. }
  7620. // GoString returns the string representation
  7621. func (s ListTopicsDetectionJobsOutput) GoString() string {
  7622. return s.String()
  7623. }
  7624. // SetNextToken sets the NextToken field's value.
  7625. func (s *ListTopicsDetectionJobsOutput) SetNextToken(v string) *ListTopicsDetectionJobsOutput {
  7626. s.NextToken = &v
  7627. return s
  7628. }
  7629. // SetTopicsDetectionJobPropertiesList sets the TopicsDetectionJobPropertiesList field's value.
  7630. func (s *ListTopicsDetectionJobsOutput) SetTopicsDetectionJobPropertiesList(v []*TopicsDetectionJobProperties) *ListTopicsDetectionJobsOutput {
  7631. s.TopicsDetectionJobPropertiesList = v
  7632. return s
  7633. }
  7634. // Provides configuration parameters for the output of topic detection jobs.
  7635. type OutputDataConfig struct {
  7636. _ struct{} `type:"structure"`
  7637. // When you use the OutputDataConfig object with asynchronous operations, you
  7638. // specify the Amazon S3 location where you want to write the output data. The
  7639. // URI must be in the same region as the API endpoint that you are calling.
  7640. // The location is used as the prefix for the actual location of the output
  7641. // file.
  7642. //
  7643. // When the topic detection job is finished, the service creates an output file
  7644. // in a directory specific to the job. The S3Uri field contains the location
  7645. // of the output file, called output.tar.gz. It is a compressed archive that
  7646. // contains the ouput of the operation.
  7647. //
  7648. // S3Uri is a required field
  7649. S3Uri *string `type:"string" required:"true"`
  7650. }
  7651. // String returns the string representation
  7652. func (s OutputDataConfig) String() string {
  7653. return awsutil.Prettify(s)
  7654. }
  7655. // GoString returns the string representation
  7656. func (s OutputDataConfig) GoString() string {
  7657. return s.String()
  7658. }
  7659. // Validate inspects the fields of the type to determine if they are valid.
  7660. func (s *OutputDataConfig) Validate() error {
  7661. invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"}
  7662. if s.S3Uri == nil {
  7663. invalidParams.Add(request.NewErrParamRequired("S3Uri"))
  7664. }
  7665. if invalidParams.Len() > 0 {
  7666. return invalidParams
  7667. }
  7668. return nil
  7669. }
  7670. // SetS3Uri sets the S3Uri field's value.
  7671. func (s *OutputDataConfig) SetS3Uri(v string) *OutputDataConfig {
  7672. s.S3Uri = &v
  7673. return s
  7674. }
  7675. // Identifies the part of speech represented by the token and gives the confidence
  7676. // that Amazon Comprehend has that the part of speech was correctly identified.
  7677. // For more information about the parts of speech that Amazon Comprehend can
  7678. // identify, see how-syntax.
  7679. type PartOfSpeechTag struct {
  7680. _ struct{} `type:"structure"`
  7681. // The confidence that Amazon Comprehend has that the part of speech was correctly
  7682. // identified.
  7683. Score *float64 `type:"float"`
  7684. // Identifies the part of speech that the token represents.
  7685. Tag *string `type:"string" enum:"PartOfSpeechTagType"`
  7686. }
  7687. // String returns the string representation
  7688. func (s PartOfSpeechTag) String() string {
  7689. return awsutil.Prettify(s)
  7690. }
  7691. // GoString returns the string representation
  7692. func (s PartOfSpeechTag) GoString() string {
  7693. return s.String()
  7694. }
  7695. // SetScore sets the Score field's value.
  7696. func (s *PartOfSpeechTag) SetScore(v float64) *PartOfSpeechTag {
  7697. s.Score = &v
  7698. return s
  7699. }
  7700. // SetTag sets the Tag field's value.
  7701. func (s *PartOfSpeechTag) SetTag(v string) *PartOfSpeechTag {
  7702. s.Tag = &v
  7703. return s
  7704. }
  7705. // Provides information for filtering a list of dominant language detection
  7706. // jobs. For more information, see the operation.
  7707. type SentimentDetectionJobFilter struct {
  7708. _ struct{} `type:"structure"`
  7709. // Filters on the name of the job.
  7710. JobName *string `min:"1" type:"string"`
  7711. // Filters the list of jobs based on job status. Returns only jobs with the
  7712. // specified status.
  7713. JobStatus *string `type:"string" enum:"JobStatus"`
  7714. // Filters the list of jobs based on the time that the job was submitted for
  7715. // processing. Returns only jobs submitted after the specified time. Jobs are
  7716. // returned in descending order, newest to oldest.
  7717. SubmitTimeAfter *time.Time `type:"timestamp"`
  7718. // Filters the list of jobs based on the time that the job was submitted for
  7719. // processing. Returns only jobs submitted before the specified time. Jobs are
  7720. // returned in ascending order, oldest to newest.
  7721. SubmitTimeBefore *time.Time `type:"timestamp"`
  7722. }
  7723. // String returns the string representation
  7724. func (s SentimentDetectionJobFilter) String() string {
  7725. return awsutil.Prettify(s)
  7726. }
  7727. // GoString returns the string representation
  7728. func (s SentimentDetectionJobFilter) GoString() string {
  7729. return s.String()
  7730. }
  7731. // Validate inspects the fields of the type to determine if they are valid.
  7732. func (s *SentimentDetectionJobFilter) Validate() error {
  7733. invalidParams := request.ErrInvalidParams{Context: "SentimentDetectionJobFilter"}
  7734. if s.JobName != nil && len(*s.JobName) < 1 {
  7735. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  7736. }
  7737. if invalidParams.Len() > 0 {
  7738. return invalidParams
  7739. }
  7740. return nil
  7741. }
  7742. // SetJobName sets the JobName field's value.
  7743. func (s *SentimentDetectionJobFilter) SetJobName(v string) *SentimentDetectionJobFilter {
  7744. s.JobName = &v
  7745. return s
  7746. }
  7747. // SetJobStatus sets the JobStatus field's value.
  7748. func (s *SentimentDetectionJobFilter) SetJobStatus(v string) *SentimentDetectionJobFilter {
  7749. s.JobStatus = &v
  7750. return s
  7751. }
  7752. // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
  7753. func (s *SentimentDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *SentimentDetectionJobFilter {
  7754. s.SubmitTimeAfter = &v
  7755. return s
  7756. }
  7757. // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
  7758. func (s *SentimentDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *SentimentDetectionJobFilter {
  7759. s.SubmitTimeBefore = &v
  7760. return s
  7761. }
  7762. // Provides information about a sentiment detection job.
  7763. type SentimentDetectionJobProperties struct {
  7764. _ struct{} `type:"structure"`
  7765. // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to
  7766. // your input data.
  7767. DataAccessRoleArn *string `min:"20" type:"string"`
  7768. // The time that the sentiment detection job ended.
  7769. EndTime *time.Time `type:"timestamp"`
  7770. // The input data configuration that you supplied when you created the sentiment
  7771. // detection job.
  7772. InputDataConfig *InputDataConfig `type:"structure"`
  7773. // The identifier assigned to the sentiment detection job.
  7774. JobId *string `min:"1" type:"string"`
  7775. // The name that you assigned to the sentiment detection job
  7776. JobName *string `min:"1" type:"string"`
  7777. // The current status of the sentiment detection job. If the status is FAILED,
  7778. // the Messages field shows the reason for the failure.
  7779. JobStatus *string `type:"string" enum:"JobStatus"`
  7780. // The language code of the input documents.
  7781. LanguageCode *string `type:"string" enum:"LanguageCode"`
  7782. // A description of the status of a job.
  7783. Message *string `type:"string"`
  7784. // The output data configuration that you supplied when you created the sentiment
  7785. // detection job.
  7786. OutputDataConfig *OutputDataConfig `type:"structure"`
  7787. // The time that the sentiment detection job was submitted for processing.
  7788. SubmitTime *time.Time `type:"timestamp"`
  7789. }
  7790. // String returns the string representation
  7791. func (s SentimentDetectionJobProperties) String() string {
  7792. return awsutil.Prettify(s)
  7793. }
  7794. // GoString returns the string representation
  7795. func (s SentimentDetectionJobProperties) GoString() string {
  7796. return s.String()
  7797. }
  7798. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  7799. func (s *SentimentDetectionJobProperties) SetDataAccessRoleArn(v string) *SentimentDetectionJobProperties {
  7800. s.DataAccessRoleArn = &v
  7801. return s
  7802. }
  7803. // SetEndTime sets the EndTime field's value.
  7804. func (s *SentimentDetectionJobProperties) SetEndTime(v time.Time) *SentimentDetectionJobProperties {
  7805. s.EndTime = &v
  7806. return s
  7807. }
  7808. // SetInputDataConfig sets the InputDataConfig field's value.
  7809. func (s *SentimentDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *SentimentDetectionJobProperties {
  7810. s.InputDataConfig = v
  7811. return s
  7812. }
  7813. // SetJobId sets the JobId field's value.
  7814. func (s *SentimentDetectionJobProperties) SetJobId(v string) *SentimentDetectionJobProperties {
  7815. s.JobId = &v
  7816. return s
  7817. }
  7818. // SetJobName sets the JobName field's value.
  7819. func (s *SentimentDetectionJobProperties) SetJobName(v string) *SentimentDetectionJobProperties {
  7820. s.JobName = &v
  7821. return s
  7822. }
  7823. // SetJobStatus sets the JobStatus field's value.
  7824. func (s *SentimentDetectionJobProperties) SetJobStatus(v string) *SentimentDetectionJobProperties {
  7825. s.JobStatus = &v
  7826. return s
  7827. }
  7828. // SetLanguageCode sets the LanguageCode field's value.
  7829. func (s *SentimentDetectionJobProperties) SetLanguageCode(v string) *SentimentDetectionJobProperties {
  7830. s.LanguageCode = &v
  7831. return s
  7832. }
  7833. // SetMessage sets the Message field's value.
  7834. func (s *SentimentDetectionJobProperties) SetMessage(v string) *SentimentDetectionJobProperties {
  7835. s.Message = &v
  7836. return s
  7837. }
  7838. // SetOutputDataConfig sets the OutputDataConfig field's value.
  7839. func (s *SentimentDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *SentimentDetectionJobProperties {
  7840. s.OutputDataConfig = v
  7841. return s
  7842. }
  7843. // SetSubmitTime sets the SubmitTime field's value.
  7844. func (s *SentimentDetectionJobProperties) SetSubmitTime(v time.Time) *SentimentDetectionJobProperties {
  7845. s.SubmitTime = &v
  7846. return s
  7847. }
  7848. // Describes the level of confidence that Amazon Comprehend has in the accuracy
  7849. // of its detection of sentiments.
  7850. type SentimentScore struct {
  7851. _ struct{} `type:"structure"`
  7852. // The level of confidence that Amazon Comprehend has in the accuracy of its
  7853. // detection of the MIXED sentiment.
  7854. Mixed *float64 `type:"float"`
  7855. // The level of confidence that Amazon Comprehend has in the accuracy of its
  7856. // detection of the NEGATIVE sentiment.
  7857. Negative *float64 `type:"float"`
  7858. // The level of confidence that Amazon Comprehend has in the accuracy of its
  7859. // detection of the NEUTRAL sentiment.
  7860. Neutral *float64 `type:"float"`
  7861. // The level of confidence that Amazon Comprehend has in the accuracy of its
  7862. // detection of the POSITIVE sentiment.
  7863. Positive *float64 `type:"float"`
  7864. }
  7865. // String returns the string representation
  7866. func (s SentimentScore) String() string {
  7867. return awsutil.Prettify(s)
  7868. }
  7869. // GoString returns the string representation
  7870. func (s SentimentScore) GoString() string {
  7871. return s.String()
  7872. }
  7873. // SetMixed sets the Mixed field's value.
  7874. func (s *SentimentScore) SetMixed(v float64) *SentimentScore {
  7875. s.Mixed = &v
  7876. return s
  7877. }
  7878. // SetNegative sets the Negative field's value.
  7879. func (s *SentimentScore) SetNegative(v float64) *SentimentScore {
  7880. s.Negative = &v
  7881. return s
  7882. }
  7883. // SetNeutral sets the Neutral field's value.
  7884. func (s *SentimentScore) SetNeutral(v float64) *SentimentScore {
  7885. s.Neutral = &v
  7886. return s
  7887. }
  7888. // SetPositive sets the Positive field's value.
  7889. func (s *SentimentScore) SetPositive(v float64) *SentimentScore {
  7890. s.Positive = &v
  7891. return s
  7892. }
  7893. type StartDocumentClassificationJobInput struct {
  7894. _ struct{} `type:"structure"`
  7895. // A unique identifier for the request. If you do not set the client request
  7896. // token, Amazon Comprehend generates one.
  7897. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  7898. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  7899. // (IAM) role that grants Amazon Comprehend read access to your input data.
  7900. //
  7901. // DataAccessRoleArn is a required field
  7902. DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
  7903. // The Amazon Resource Name (ARN) of the document classifier to use to process
  7904. // the job.
  7905. //
  7906. // DocumentClassifierArn is a required field
  7907. DocumentClassifierArn *string `type:"string" required:"true"`
  7908. // Specifies the format and location of the input data for the job.
  7909. //
  7910. // InputDataConfig is a required field
  7911. InputDataConfig *InputDataConfig `type:"structure" required:"true"`
  7912. // The identifier of the job.
  7913. JobName *string `min:"1" type:"string"`
  7914. // Specifies where to send the output files.
  7915. //
  7916. // OutputDataConfig is a required field
  7917. OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
  7918. }
  7919. // String returns the string representation
  7920. func (s StartDocumentClassificationJobInput) String() string {
  7921. return awsutil.Prettify(s)
  7922. }
  7923. // GoString returns the string representation
  7924. func (s StartDocumentClassificationJobInput) GoString() string {
  7925. return s.String()
  7926. }
  7927. // Validate inspects the fields of the type to determine if they are valid.
  7928. func (s *StartDocumentClassificationJobInput) Validate() error {
  7929. invalidParams := request.ErrInvalidParams{Context: "StartDocumentClassificationJobInput"}
  7930. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  7931. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  7932. }
  7933. if s.DataAccessRoleArn == nil {
  7934. invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
  7935. }
  7936. if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
  7937. invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
  7938. }
  7939. if s.DocumentClassifierArn == nil {
  7940. invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn"))
  7941. }
  7942. if s.InputDataConfig == nil {
  7943. invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
  7944. }
  7945. if s.JobName != nil && len(*s.JobName) < 1 {
  7946. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  7947. }
  7948. if s.OutputDataConfig == nil {
  7949. invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
  7950. }
  7951. if s.InputDataConfig != nil {
  7952. if err := s.InputDataConfig.Validate(); err != nil {
  7953. invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
  7954. }
  7955. }
  7956. if s.OutputDataConfig != nil {
  7957. if err := s.OutputDataConfig.Validate(); err != nil {
  7958. invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
  7959. }
  7960. }
  7961. if invalidParams.Len() > 0 {
  7962. return invalidParams
  7963. }
  7964. return nil
  7965. }
  7966. // SetClientRequestToken sets the ClientRequestToken field's value.
  7967. func (s *StartDocumentClassificationJobInput) SetClientRequestToken(v string) *StartDocumentClassificationJobInput {
  7968. s.ClientRequestToken = &v
  7969. return s
  7970. }
  7971. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  7972. func (s *StartDocumentClassificationJobInput) SetDataAccessRoleArn(v string) *StartDocumentClassificationJobInput {
  7973. s.DataAccessRoleArn = &v
  7974. return s
  7975. }
  7976. // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
  7977. func (s *StartDocumentClassificationJobInput) SetDocumentClassifierArn(v string) *StartDocumentClassificationJobInput {
  7978. s.DocumentClassifierArn = &v
  7979. return s
  7980. }
  7981. // SetInputDataConfig sets the InputDataConfig field's value.
  7982. func (s *StartDocumentClassificationJobInput) SetInputDataConfig(v *InputDataConfig) *StartDocumentClassificationJobInput {
  7983. s.InputDataConfig = v
  7984. return s
  7985. }
  7986. // SetJobName sets the JobName field's value.
  7987. func (s *StartDocumentClassificationJobInput) SetJobName(v string) *StartDocumentClassificationJobInput {
  7988. s.JobName = &v
  7989. return s
  7990. }
  7991. // SetOutputDataConfig sets the OutputDataConfig field's value.
  7992. func (s *StartDocumentClassificationJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartDocumentClassificationJobInput {
  7993. s.OutputDataConfig = v
  7994. return s
  7995. }
  7996. type StartDocumentClassificationJobOutput struct {
  7997. _ struct{} `type:"structure"`
  7998. // The identifier generated for the job. To get the status of the job, use this
  7999. // identifier with the operation.
  8000. JobId *string `min:"1" type:"string"`
  8001. // The status of the job:
  8002. //
  8003. // * SUBMITTED - The job has been received and queued for processing.
  8004. //
  8005. // * IN_PROGRESS - Amazon Comprehend is processing the job.
  8006. //
  8007. // * COMPLETED - The job was successfully completed and the output is available.
  8008. //
  8009. // * FAILED - The job did not complete. For details, use the operation.
  8010. //
  8011. // * STOP_REQUESTED - Amazon Comprehend has received a stop request for the
  8012. // job and is processing the request.
  8013. //
  8014. // * STOPPED - The job was successfully stopped without completing.
  8015. JobStatus *string `type:"string" enum:"JobStatus"`
  8016. }
  8017. // String returns the string representation
  8018. func (s StartDocumentClassificationJobOutput) String() string {
  8019. return awsutil.Prettify(s)
  8020. }
  8021. // GoString returns the string representation
  8022. func (s StartDocumentClassificationJobOutput) GoString() string {
  8023. return s.String()
  8024. }
  8025. // SetJobId sets the JobId field's value.
  8026. func (s *StartDocumentClassificationJobOutput) SetJobId(v string) *StartDocumentClassificationJobOutput {
  8027. s.JobId = &v
  8028. return s
  8029. }
  8030. // SetJobStatus sets the JobStatus field's value.
  8031. func (s *StartDocumentClassificationJobOutput) SetJobStatus(v string) *StartDocumentClassificationJobOutput {
  8032. s.JobStatus = &v
  8033. return s
  8034. }
  8035. type StartDominantLanguageDetectionJobInput struct {
  8036. _ struct{} `type:"structure"`
  8037. // A unique identifier for the request. If you do not set the client request
  8038. // token, Amazon Comprehend generates one.
  8039. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  8040. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  8041. // (IAM) role that grants Amazon Comprehend read access to your input data.
  8042. // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
  8043. // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
  8044. //
  8045. // DataAccessRoleArn is a required field
  8046. DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
  8047. // Specifies the format and location of the input data for the job.
  8048. //
  8049. // InputDataConfig is a required field
  8050. InputDataConfig *InputDataConfig `type:"structure" required:"true"`
  8051. // An identifier for the job.
  8052. JobName *string `min:"1" type:"string"`
  8053. // Specifies where to send the output files.
  8054. //
  8055. // OutputDataConfig is a required field
  8056. OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
  8057. }
  8058. // String returns the string representation
  8059. func (s StartDominantLanguageDetectionJobInput) String() string {
  8060. return awsutil.Prettify(s)
  8061. }
  8062. // GoString returns the string representation
  8063. func (s StartDominantLanguageDetectionJobInput) GoString() string {
  8064. return s.String()
  8065. }
  8066. // Validate inspects the fields of the type to determine if they are valid.
  8067. func (s *StartDominantLanguageDetectionJobInput) Validate() error {
  8068. invalidParams := request.ErrInvalidParams{Context: "StartDominantLanguageDetectionJobInput"}
  8069. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  8070. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  8071. }
  8072. if s.DataAccessRoleArn == nil {
  8073. invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
  8074. }
  8075. if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
  8076. invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
  8077. }
  8078. if s.InputDataConfig == nil {
  8079. invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
  8080. }
  8081. if s.JobName != nil && len(*s.JobName) < 1 {
  8082. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  8083. }
  8084. if s.OutputDataConfig == nil {
  8085. invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
  8086. }
  8087. if s.InputDataConfig != nil {
  8088. if err := s.InputDataConfig.Validate(); err != nil {
  8089. invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
  8090. }
  8091. }
  8092. if s.OutputDataConfig != nil {
  8093. if err := s.OutputDataConfig.Validate(); err != nil {
  8094. invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
  8095. }
  8096. }
  8097. if invalidParams.Len() > 0 {
  8098. return invalidParams
  8099. }
  8100. return nil
  8101. }
  8102. // SetClientRequestToken sets the ClientRequestToken field's value.
  8103. func (s *StartDominantLanguageDetectionJobInput) SetClientRequestToken(v string) *StartDominantLanguageDetectionJobInput {
  8104. s.ClientRequestToken = &v
  8105. return s
  8106. }
  8107. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  8108. func (s *StartDominantLanguageDetectionJobInput) SetDataAccessRoleArn(v string) *StartDominantLanguageDetectionJobInput {
  8109. s.DataAccessRoleArn = &v
  8110. return s
  8111. }
  8112. // SetInputDataConfig sets the InputDataConfig field's value.
  8113. func (s *StartDominantLanguageDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartDominantLanguageDetectionJobInput {
  8114. s.InputDataConfig = v
  8115. return s
  8116. }
  8117. // SetJobName sets the JobName field's value.
  8118. func (s *StartDominantLanguageDetectionJobInput) SetJobName(v string) *StartDominantLanguageDetectionJobInput {
  8119. s.JobName = &v
  8120. return s
  8121. }
  8122. // SetOutputDataConfig sets the OutputDataConfig field's value.
  8123. func (s *StartDominantLanguageDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartDominantLanguageDetectionJobInput {
  8124. s.OutputDataConfig = v
  8125. return s
  8126. }
  8127. type StartDominantLanguageDetectionJobOutput struct {
  8128. _ struct{} `type:"structure"`
  8129. // The identifier generated for the job. To get the status of a job, use this
  8130. // identifier with the operation.
  8131. JobId *string `min:"1" type:"string"`
  8132. // The status of the job.
  8133. //
  8134. // * SUBMITTED - The job has been received and is queued for processing.
  8135. //
  8136. // * IN_PROGRESS - Amazon Comprehend is processing the job.
  8137. //
  8138. // * COMPLETED - The job was successfully completed and the output is available.
  8139. //
  8140. // * FAILED - The job did not complete. To get details, use the operation.
  8141. JobStatus *string `type:"string" enum:"JobStatus"`
  8142. }
  8143. // String returns the string representation
  8144. func (s StartDominantLanguageDetectionJobOutput) String() string {
  8145. return awsutil.Prettify(s)
  8146. }
  8147. // GoString returns the string representation
  8148. func (s StartDominantLanguageDetectionJobOutput) GoString() string {
  8149. return s.String()
  8150. }
  8151. // SetJobId sets the JobId field's value.
  8152. func (s *StartDominantLanguageDetectionJobOutput) SetJobId(v string) *StartDominantLanguageDetectionJobOutput {
  8153. s.JobId = &v
  8154. return s
  8155. }
  8156. // SetJobStatus sets the JobStatus field's value.
  8157. func (s *StartDominantLanguageDetectionJobOutput) SetJobStatus(v string) *StartDominantLanguageDetectionJobOutput {
  8158. s.JobStatus = &v
  8159. return s
  8160. }
  8161. type StartEntitiesDetectionJobInput struct {
  8162. _ struct{} `type:"structure"`
  8163. // A unique identifier for the request. If you don't set the client request
  8164. // token, Amazon Comprehend generates one.
  8165. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  8166. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  8167. // (IAM) role that grants Amazon Comprehend read access to your input data.
  8168. // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
  8169. // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
  8170. //
  8171. // DataAccessRoleArn is a required field
  8172. DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
  8173. // The Amazon Resource Name (ARN) that identifies the specific entity recognizer
  8174. // to be used by the StartEntitiesDetectionJob. This ARN is optional and is
  8175. // only used for a custom entity recognition job.
  8176. EntityRecognizerArn *string `type:"string"`
  8177. // Specifies the format and location of the input data for the job.
  8178. //
  8179. // InputDataConfig is a required field
  8180. InputDataConfig *InputDataConfig `type:"structure" required:"true"`
  8181. // The identifier of the job.
  8182. JobName *string `min:"1" type:"string"`
  8183. // The language of the input documents. All documents must be in the same language.
  8184. // You can specify any of the languages supported by Amazon Comprehend: English
  8185. // ("en"), Spanish ("es"), French ("fr"), German ("de"), Italian ("it"), or
  8186. // Portuguese ("pt"). If custom entities recognition is used, this parameter
  8187. // is ignored and the language used for training the model is used instead.
  8188. //
  8189. // LanguageCode is a required field
  8190. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  8191. // Specifies where to send the output files.
  8192. //
  8193. // OutputDataConfig is a required field
  8194. OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
  8195. }
  8196. // String returns the string representation
  8197. func (s StartEntitiesDetectionJobInput) String() string {
  8198. return awsutil.Prettify(s)
  8199. }
  8200. // GoString returns the string representation
  8201. func (s StartEntitiesDetectionJobInput) GoString() string {
  8202. return s.String()
  8203. }
  8204. // Validate inspects the fields of the type to determine if they are valid.
  8205. func (s *StartEntitiesDetectionJobInput) Validate() error {
  8206. invalidParams := request.ErrInvalidParams{Context: "StartEntitiesDetectionJobInput"}
  8207. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  8208. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  8209. }
  8210. if s.DataAccessRoleArn == nil {
  8211. invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
  8212. }
  8213. if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
  8214. invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
  8215. }
  8216. if s.InputDataConfig == nil {
  8217. invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
  8218. }
  8219. if s.JobName != nil && len(*s.JobName) < 1 {
  8220. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  8221. }
  8222. if s.LanguageCode == nil {
  8223. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  8224. }
  8225. if s.OutputDataConfig == nil {
  8226. invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
  8227. }
  8228. if s.InputDataConfig != nil {
  8229. if err := s.InputDataConfig.Validate(); err != nil {
  8230. invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
  8231. }
  8232. }
  8233. if s.OutputDataConfig != nil {
  8234. if err := s.OutputDataConfig.Validate(); err != nil {
  8235. invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
  8236. }
  8237. }
  8238. if invalidParams.Len() > 0 {
  8239. return invalidParams
  8240. }
  8241. return nil
  8242. }
  8243. // SetClientRequestToken sets the ClientRequestToken field's value.
  8244. func (s *StartEntitiesDetectionJobInput) SetClientRequestToken(v string) *StartEntitiesDetectionJobInput {
  8245. s.ClientRequestToken = &v
  8246. return s
  8247. }
  8248. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  8249. func (s *StartEntitiesDetectionJobInput) SetDataAccessRoleArn(v string) *StartEntitiesDetectionJobInput {
  8250. s.DataAccessRoleArn = &v
  8251. return s
  8252. }
  8253. // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
  8254. func (s *StartEntitiesDetectionJobInput) SetEntityRecognizerArn(v string) *StartEntitiesDetectionJobInput {
  8255. s.EntityRecognizerArn = &v
  8256. return s
  8257. }
  8258. // SetInputDataConfig sets the InputDataConfig field's value.
  8259. func (s *StartEntitiesDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartEntitiesDetectionJobInput {
  8260. s.InputDataConfig = v
  8261. return s
  8262. }
  8263. // SetJobName sets the JobName field's value.
  8264. func (s *StartEntitiesDetectionJobInput) SetJobName(v string) *StartEntitiesDetectionJobInput {
  8265. s.JobName = &v
  8266. return s
  8267. }
  8268. // SetLanguageCode sets the LanguageCode field's value.
  8269. func (s *StartEntitiesDetectionJobInput) SetLanguageCode(v string) *StartEntitiesDetectionJobInput {
  8270. s.LanguageCode = &v
  8271. return s
  8272. }
  8273. // SetOutputDataConfig sets the OutputDataConfig field's value.
  8274. func (s *StartEntitiesDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartEntitiesDetectionJobInput {
  8275. s.OutputDataConfig = v
  8276. return s
  8277. }
  8278. type StartEntitiesDetectionJobOutput struct {
  8279. _ struct{} `type:"structure"`
  8280. // The identifier generated for the job. To get the status of job, use this
  8281. // identifier with the operation.
  8282. JobId *string `min:"1" type:"string"`
  8283. // The status of the job.
  8284. //
  8285. // * SUBMITTED - The job has been received and is queued for processing.
  8286. //
  8287. // * IN_PROGRESS - Amazon Comprehend is processing the job.
  8288. //
  8289. // * COMPLETED - The job was successfully completed and the output is available.
  8290. //
  8291. // * FAILED - The job did not complete. To get details, use the operation.
  8292. //
  8293. // * STOP_REQUESTED - Amazon Comprehend has received a stop request for the
  8294. // job and is processing the request.
  8295. //
  8296. // * STOPPED - The job was successfully stopped without completing.
  8297. JobStatus *string `type:"string" enum:"JobStatus"`
  8298. }
  8299. // String returns the string representation
  8300. func (s StartEntitiesDetectionJobOutput) String() string {
  8301. return awsutil.Prettify(s)
  8302. }
  8303. // GoString returns the string representation
  8304. func (s StartEntitiesDetectionJobOutput) GoString() string {
  8305. return s.String()
  8306. }
  8307. // SetJobId sets the JobId field's value.
  8308. func (s *StartEntitiesDetectionJobOutput) SetJobId(v string) *StartEntitiesDetectionJobOutput {
  8309. s.JobId = &v
  8310. return s
  8311. }
  8312. // SetJobStatus sets the JobStatus field's value.
  8313. func (s *StartEntitiesDetectionJobOutput) SetJobStatus(v string) *StartEntitiesDetectionJobOutput {
  8314. s.JobStatus = &v
  8315. return s
  8316. }
  8317. type StartKeyPhrasesDetectionJobInput struct {
  8318. _ struct{} `type:"structure"`
  8319. // A unique identifier for the request. If you don't set the client request
  8320. // token, Amazon Comprehend generates one.
  8321. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  8322. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  8323. // (IAM) role that grants Amazon Comprehend read access to your input data.
  8324. // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
  8325. // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
  8326. //
  8327. // DataAccessRoleArn is a required field
  8328. DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
  8329. // Specifies the format and location of the input data for the job.
  8330. //
  8331. // InputDataConfig is a required field
  8332. InputDataConfig *InputDataConfig `type:"structure" required:"true"`
  8333. // The identifier of the job.
  8334. JobName *string `min:"1" type:"string"`
  8335. // The language of the input documents. You can specify English ("en") or Spanish
  8336. // ("es"). All documents must be in the same language.
  8337. //
  8338. // LanguageCode is a required field
  8339. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  8340. // Specifies where to send the output files.
  8341. //
  8342. // OutputDataConfig is a required field
  8343. OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
  8344. }
  8345. // String returns the string representation
  8346. func (s StartKeyPhrasesDetectionJobInput) String() string {
  8347. return awsutil.Prettify(s)
  8348. }
  8349. // GoString returns the string representation
  8350. func (s StartKeyPhrasesDetectionJobInput) GoString() string {
  8351. return s.String()
  8352. }
  8353. // Validate inspects the fields of the type to determine if they are valid.
  8354. func (s *StartKeyPhrasesDetectionJobInput) Validate() error {
  8355. invalidParams := request.ErrInvalidParams{Context: "StartKeyPhrasesDetectionJobInput"}
  8356. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  8357. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  8358. }
  8359. if s.DataAccessRoleArn == nil {
  8360. invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
  8361. }
  8362. if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
  8363. invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
  8364. }
  8365. if s.InputDataConfig == nil {
  8366. invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
  8367. }
  8368. if s.JobName != nil && len(*s.JobName) < 1 {
  8369. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  8370. }
  8371. if s.LanguageCode == nil {
  8372. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  8373. }
  8374. if s.OutputDataConfig == nil {
  8375. invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
  8376. }
  8377. if s.InputDataConfig != nil {
  8378. if err := s.InputDataConfig.Validate(); err != nil {
  8379. invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
  8380. }
  8381. }
  8382. if s.OutputDataConfig != nil {
  8383. if err := s.OutputDataConfig.Validate(); err != nil {
  8384. invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
  8385. }
  8386. }
  8387. if invalidParams.Len() > 0 {
  8388. return invalidParams
  8389. }
  8390. return nil
  8391. }
  8392. // SetClientRequestToken sets the ClientRequestToken field's value.
  8393. func (s *StartKeyPhrasesDetectionJobInput) SetClientRequestToken(v string) *StartKeyPhrasesDetectionJobInput {
  8394. s.ClientRequestToken = &v
  8395. return s
  8396. }
  8397. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  8398. func (s *StartKeyPhrasesDetectionJobInput) SetDataAccessRoleArn(v string) *StartKeyPhrasesDetectionJobInput {
  8399. s.DataAccessRoleArn = &v
  8400. return s
  8401. }
  8402. // SetInputDataConfig sets the InputDataConfig field's value.
  8403. func (s *StartKeyPhrasesDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartKeyPhrasesDetectionJobInput {
  8404. s.InputDataConfig = v
  8405. return s
  8406. }
  8407. // SetJobName sets the JobName field's value.
  8408. func (s *StartKeyPhrasesDetectionJobInput) SetJobName(v string) *StartKeyPhrasesDetectionJobInput {
  8409. s.JobName = &v
  8410. return s
  8411. }
  8412. // SetLanguageCode sets the LanguageCode field's value.
  8413. func (s *StartKeyPhrasesDetectionJobInput) SetLanguageCode(v string) *StartKeyPhrasesDetectionJobInput {
  8414. s.LanguageCode = &v
  8415. return s
  8416. }
  8417. // SetOutputDataConfig sets the OutputDataConfig field's value.
  8418. func (s *StartKeyPhrasesDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartKeyPhrasesDetectionJobInput {
  8419. s.OutputDataConfig = v
  8420. return s
  8421. }
  8422. type StartKeyPhrasesDetectionJobOutput struct {
  8423. _ struct{} `type:"structure"`
  8424. // The identifier generated for the job. To get the status of a job, use this
  8425. // identifier with the operation.
  8426. JobId *string `min:"1" type:"string"`
  8427. // The status of the job.
  8428. //
  8429. // * SUBMITTED - The job has been received and is queued for processing.
  8430. //
  8431. // * IN_PROGRESS - Amazon Comprehend is processing the job.
  8432. //
  8433. // * COMPLETED - The job was successfully completed and the output is available.
  8434. //
  8435. // * FAILED - The job did not complete. To get details, use the operation.
  8436. JobStatus *string `type:"string" enum:"JobStatus"`
  8437. }
  8438. // String returns the string representation
  8439. func (s StartKeyPhrasesDetectionJobOutput) String() string {
  8440. return awsutil.Prettify(s)
  8441. }
  8442. // GoString returns the string representation
  8443. func (s StartKeyPhrasesDetectionJobOutput) GoString() string {
  8444. return s.String()
  8445. }
  8446. // SetJobId sets the JobId field's value.
  8447. func (s *StartKeyPhrasesDetectionJobOutput) SetJobId(v string) *StartKeyPhrasesDetectionJobOutput {
  8448. s.JobId = &v
  8449. return s
  8450. }
  8451. // SetJobStatus sets the JobStatus field's value.
  8452. func (s *StartKeyPhrasesDetectionJobOutput) SetJobStatus(v string) *StartKeyPhrasesDetectionJobOutput {
  8453. s.JobStatus = &v
  8454. return s
  8455. }
  8456. type StartSentimentDetectionJobInput struct {
  8457. _ struct{} `type:"structure"`
  8458. // A unique identifier for the request. If you don't set the client request
  8459. // token, Amazon Comprehend generates one.
  8460. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  8461. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  8462. // (IAM) role that grants Amazon Comprehend read access to your input data.
  8463. // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
  8464. // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
  8465. //
  8466. // DataAccessRoleArn is a required field
  8467. DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
  8468. // Specifies the format and location of the input data for the job.
  8469. //
  8470. // InputDataConfig is a required field
  8471. InputDataConfig *InputDataConfig `type:"structure" required:"true"`
  8472. // The identifier of the job.
  8473. JobName *string `min:"1" type:"string"`
  8474. // The language of the input documents. You can specify English ("en") or Spanish
  8475. // ("es"). All documents must be in the same language.
  8476. //
  8477. // LanguageCode is a required field
  8478. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  8479. // Specifies where to send the output files.
  8480. //
  8481. // OutputDataConfig is a required field
  8482. OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
  8483. }
  8484. // String returns the string representation
  8485. func (s StartSentimentDetectionJobInput) String() string {
  8486. return awsutil.Prettify(s)
  8487. }
  8488. // GoString returns the string representation
  8489. func (s StartSentimentDetectionJobInput) GoString() string {
  8490. return s.String()
  8491. }
  8492. // Validate inspects the fields of the type to determine if they are valid.
  8493. func (s *StartSentimentDetectionJobInput) Validate() error {
  8494. invalidParams := request.ErrInvalidParams{Context: "StartSentimentDetectionJobInput"}
  8495. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  8496. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  8497. }
  8498. if s.DataAccessRoleArn == nil {
  8499. invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
  8500. }
  8501. if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
  8502. invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
  8503. }
  8504. if s.InputDataConfig == nil {
  8505. invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
  8506. }
  8507. if s.JobName != nil && len(*s.JobName) < 1 {
  8508. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  8509. }
  8510. if s.LanguageCode == nil {
  8511. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  8512. }
  8513. if s.OutputDataConfig == nil {
  8514. invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
  8515. }
  8516. if s.InputDataConfig != nil {
  8517. if err := s.InputDataConfig.Validate(); err != nil {
  8518. invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
  8519. }
  8520. }
  8521. if s.OutputDataConfig != nil {
  8522. if err := s.OutputDataConfig.Validate(); err != nil {
  8523. invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
  8524. }
  8525. }
  8526. if invalidParams.Len() > 0 {
  8527. return invalidParams
  8528. }
  8529. return nil
  8530. }
  8531. // SetClientRequestToken sets the ClientRequestToken field's value.
  8532. func (s *StartSentimentDetectionJobInput) SetClientRequestToken(v string) *StartSentimentDetectionJobInput {
  8533. s.ClientRequestToken = &v
  8534. return s
  8535. }
  8536. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  8537. func (s *StartSentimentDetectionJobInput) SetDataAccessRoleArn(v string) *StartSentimentDetectionJobInput {
  8538. s.DataAccessRoleArn = &v
  8539. return s
  8540. }
  8541. // SetInputDataConfig sets the InputDataConfig field's value.
  8542. func (s *StartSentimentDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartSentimentDetectionJobInput {
  8543. s.InputDataConfig = v
  8544. return s
  8545. }
  8546. // SetJobName sets the JobName field's value.
  8547. func (s *StartSentimentDetectionJobInput) SetJobName(v string) *StartSentimentDetectionJobInput {
  8548. s.JobName = &v
  8549. return s
  8550. }
  8551. // SetLanguageCode sets the LanguageCode field's value.
  8552. func (s *StartSentimentDetectionJobInput) SetLanguageCode(v string) *StartSentimentDetectionJobInput {
  8553. s.LanguageCode = &v
  8554. return s
  8555. }
  8556. // SetOutputDataConfig sets the OutputDataConfig field's value.
  8557. func (s *StartSentimentDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartSentimentDetectionJobInput {
  8558. s.OutputDataConfig = v
  8559. return s
  8560. }
  8561. type StartSentimentDetectionJobOutput struct {
  8562. _ struct{} `type:"structure"`
  8563. // The identifier generated for the job. To get the status of a job, use this
  8564. // identifier with the operation.
  8565. JobId *string `min:"1" type:"string"`
  8566. // The status of the job.
  8567. //
  8568. // * SUBMITTED - The job has been received and is queued for processing.
  8569. //
  8570. // * IN_PROGRESS - Amazon Comprehend is processing the job.
  8571. //
  8572. // * COMPLETED - The job was successfully completed and the output is available.
  8573. //
  8574. // * FAILED - The job did not complete. To get details, use the operation.
  8575. JobStatus *string `type:"string" enum:"JobStatus"`
  8576. }
  8577. // String returns the string representation
  8578. func (s StartSentimentDetectionJobOutput) String() string {
  8579. return awsutil.Prettify(s)
  8580. }
  8581. // GoString returns the string representation
  8582. func (s StartSentimentDetectionJobOutput) GoString() string {
  8583. return s.String()
  8584. }
  8585. // SetJobId sets the JobId field's value.
  8586. func (s *StartSentimentDetectionJobOutput) SetJobId(v string) *StartSentimentDetectionJobOutput {
  8587. s.JobId = &v
  8588. return s
  8589. }
  8590. // SetJobStatus sets the JobStatus field's value.
  8591. func (s *StartSentimentDetectionJobOutput) SetJobStatus(v string) *StartSentimentDetectionJobOutput {
  8592. s.JobStatus = &v
  8593. return s
  8594. }
  8595. type StartTopicsDetectionJobInput struct {
  8596. _ struct{} `type:"structure"`
  8597. // A unique identifier for the request. If you do not set the client request
  8598. // token, Amazon Comprehend generates one.
  8599. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  8600. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  8601. // (IAM) role that grants Amazon Comprehend read access to your input data.
  8602. // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
  8603. // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
  8604. //
  8605. // DataAccessRoleArn is a required field
  8606. DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
  8607. // Specifies the format and location of the input data for the job.
  8608. //
  8609. // InputDataConfig is a required field
  8610. InputDataConfig *InputDataConfig `type:"structure" required:"true"`
  8611. // The identifier of the job.
  8612. JobName *string `min:"1" type:"string"`
  8613. // The number of topics to detect.
  8614. NumberOfTopics *int64 `min:"1" type:"integer"`
  8615. // Specifies where to send the output files. The output is a compressed archive
  8616. // with two files, topic-terms.csv that lists the terms associated with each
  8617. // topic, and doc-topics.csv that lists the documents associated with each topic
  8618. //
  8619. // OutputDataConfig is a required field
  8620. OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
  8621. }
  8622. // String returns the string representation
  8623. func (s StartTopicsDetectionJobInput) String() string {
  8624. return awsutil.Prettify(s)
  8625. }
  8626. // GoString returns the string representation
  8627. func (s StartTopicsDetectionJobInput) GoString() string {
  8628. return s.String()
  8629. }
  8630. // Validate inspects the fields of the type to determine if they are valid.
  8631. func (s *StartTopicsDetectionJobInput) Validate() error {
  8632. invalidParams := request.ErrInvalidParams{Context: "StartTopicsDetectionJobInput"}
  8633. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  8634. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  8635. }
  8636. if s.DataAccessRoleArn == nil {
  8637. invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
  8638. }
  8639. if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
  8640. invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
  8641. }
  8642. if s.InputDataConfig == nil {
  8643. invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
  8644. }
  8645. if s.JobName != nil && len(*s.JobName) < 1 {
  8646. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  8647. }
  8648. if s.NumberOfTopics != nil && *s.NumberOfTopics < 1 {
  8649. invalidParams.Add(request.NewErrParamMinValue("NumberOfTopics", 1))
  8650. }
  8651. if s.OutputDataConfig == nil {
  8652. invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
  8653. }
  8654. if s.InputDataConfig != nil {
  8655. if err := s.InputDataConfig.Validate(); err != nil {
  8656. invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
  8657. }
  8658. }
  8659. if s.OutputDataConfig != nil {
  8660. if err := s.OutputDataConfig.Validate(); err != nil {
  8661. invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
  8662. }
  8663. }
  8664. if invalidParams.Len() > 0 {
  8665. return invalidParams
  8666. }
  8667. return nil
  8668. }
  8669. // SetClientRequestToken sets the ClientRequestToken field's value.
  8670. func (s *StartTopicsDetectionJobInput) SetClientRequestToken(v string) *StartTopicsDetectionJobInput {
  8671. s.ClientRequestToken = &v
  8672. return s
  8673. }
  8674. // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
  8675. func (s *StartTopicsDetectionJobInput) SetDataAccessRoleArn(v string) *StartTopicsDetectionJobInput {
  8676. s.DataAccessRoleArn = &v
  8677. return s
  8678. }
  8679. // SetInputDataConfig sets the InputDataConfig field's value.
  8680. func (s *StartTopicsDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartTopicsDetectionJobInput {
  8681. s.InputDataConfig = v
  8682. return s
  8683. }
  8684. // SetJobName sets the JobName field's value.
  8685. func (s *StartTopicsDetectionJobInput) SetJobName(v string) *StartTopicsDetectionJobInput {
  8686. s.JobName = &v
  8687. return s
  8688. }
  8689. // SetNumberOfTopics sets the NumberOfTopics field's value.
  8690. func (s *StartTopicsDetectionJobInput) SetNumberOfTopics(v int64) *StartTopicsDetectionJobInput {
  8691. s.NumberOfTopics = &v
  8692. return s
  8693. }
  8694. // SetOutputDataConfig sets the OutputDataConfig field's value.
  8695. func (s *StartTopicsDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartTopicsDetectionJobInput {
  8696. s.OutputDataConfig = v
  8697. return s
  8698. }
  8699. type StartTopicsDetectionJobOutput struct {
  8700. _ struct{} `type:"structure"`
  8701. // The identifier generated for the job. To get the status of the job, use this
  8702. // identifier with the DescribeTopicDetectionJob operation.
  8703. JobId *string `min:"1" type:"string"`
  8704. // The status of the job:
  8705. //
  8706. // * SUBMITTED - The job has been received and is queued for processing.
  8707. //
  8708. // * IN_PROGRESS - Amazon Comprehend is processing the job.
  8709. //
  8710. // * COMPLETED - The job was successfully completed and the output is available.
  8711. //
  8712. // * FAILED - The job did not complete. To get details, use the DescribeTopicDetectionJob
  8713. // operation.
  8714. JobStatus *string `type:"string" enum:"JobStatus"`
  8715. }
  8716. // String returns the string representation
  8717. func (s StartTopicsDetectionJobOutput) String() string {
  8718. return awsutil.Prettify(s)
  8719. }
  8720. // GoString returns the string representation
  8721. func (s StartTopicsDetectionJobOutput) GoString() string {
  8722. return s.String()
  8723. }
  8724. // SetJobId sets the JobId field's value.
  8725. func (s *StartTopicsDetectionJobOutput) SetJobId(v string) *StartTopicsDetectionJobOutput {
  8726. s.JobId = &v
  8727. return s
  8728. }
  8729. // SetJobStatus sets the JobStatus field's value.
  8730. func (s *StartTopicsDetectionJobOutput) SetJobStatus(v string) *StartTopicsDetectionJobOutput {
  8731. s.JobStatus = &v
  8732. return s
  8733. }
  8734. type StopDominantLanguageDetectionJobInput struct {
  8735. _ struct{} `type:"structure"`
  8736. // The identifier of the dominant language detection job to stop.
  8737. //
  8738. // JobId is a required field
  8739. JobId *string `min:"1" type:"string" required:"true"`
  8740. }
  8741. // String returns the string representation
  8742. func (s StopDominantLanguageDetectionJobInput) String() string {
  8743. return awsutil.Prettify(s)
  8744. }
  8745. // GoString returns the string representation
  8746. func (s StopDominantLanguageDetectionJobInput) GoString() string {
  8747. return s.String()
  8748. }
  8749. // Validate inspects the fields of the type to determine if they are valid.
  8750. func (s *StopDominantLanguageDetectionJobInput) Validate() error {
  8751. invalidParams := request.ErrInvalidParams{Context: "StopDominantLanguageDetectionJobInput"}
  8752. if s.JobId == nil {
  8753. invalidParams.Add(request.NewErrParamRequired("JobId"))
  8754. }
  8755. if s.JobId != nil && len(*s.JobId) < 1 {
  8756. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  8757. }
  8758. if invalidParams.Len() > 0 {
  8759. return invalidParams
  8760. }
  8761. return nil
  8762. }
  8763. // SetJobId sets the JobId field's value.
  8764. func (s *StopDominantLanguageDetectionJobInput) SetJobId(v string) *StopDominantLanguageDetectionJobInput {
  8765. s.JobId = &v
  8766. return s
  8767. }
  8768. type StopDominantLanguageDetectionJobOutput struct {
  8769. _ struct{} `type:"structure"`
  8770. // The identifier of the dominant language detection job to stop.
  8771. JobId *string `min:"1" type:"string"`
  8772. // Either STOP_REQUESTED if the job is currently running, or STOPPED if the
  8773. // job was previously stopped with the StopDominantLanguageDetectionJob operation.
  8774. JobStatus *string `type:"string" enum:"JobStatus"`
  8775. }
  8776. // String returns the string representation
  8777. func (s StopDominantLanguageDetectionJobOutput) String() string {
  8778. return awsutil.Prettify(s)
  8779. }
  8780. // GoString returns the string representation
  8781. func (s StopDominantLanguageDetectionJobOutput) GoString() string {
  8782. return s.String()
  8783. }
  8784. // SetJobId sets the JobId field's value.
  8785. func (s *StopDominantLanguageDetectionJobOutput) SetJobId(v string) *StopDominantLanguageDetectionJobOutput {
  8786. s.JobId = &v
  8787. return s
  8788. }
  8789. // SetJobStatus sets the JobStatus field's value.
  8790. func (s *StopDominantLanguageDetectionJobOutput) SetJobStatus(v string) *StopDominantLanguageDetectionJobOutput {
  8791. s.JobStatus = &v
  8792. return s
  8793. }
  8794. type StopEntitiesDetectionJobInput struct {
  8795. _ struct{} `type:"structure"`
  8796. // The identifier of the entities detection job to stop.
  8797. //
  8798. // JobId is a required field
  8799. JobId *string `min:"1" type:"string" required:"true"`
  8800. }
  8801. // String returns the string representation
  8802. func (s StopEntitiesDetectionJobInput) String() string {
  8803. return awsutil.Prettify(s)
  8804. }
  8805. // GoString returns the string representation
  8806. func (s StopEntitiesDetectionJobInput) GoString() string {
  8807. return s.String()
  8808. }
  8809. // Validate inspects the fields of the type to determine if they are valid.
  8810. func (s *StopEntitiesDetectionJobInput) Validate() error {
  8811. invalidParams := request.ErrInvalidParams{Context: "StopEntitiesDetectionJobInput"}
  8812. if s.JobId == nil {
  8813. invalidParams.Add(request.NewErrParamRequired("JobId"))
  8814. }
  8815. if s.JobId != nil && len(*s.JobId) < 1 {
  8816. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  8817. }
  8818. if invalidParams.Len() > 0 {
  8819. return invalidParams
  8820. }
  8821. return nil
  8822. }
  8823. // SetJobId sets the JobId field's value.
  8824. func (s *StopEntitiesDetectionJobInput) SetJobId(v string) *StopEntitiesDetectionJobInput {
  8825. s.JobId = &v
  8826. return s
  8827. }
  8828. type StopEntitiesDetectionJobOutput struct {
  8829. _ struct{} `type:"structure"`
  8830. // The identifier of the entities detection job to stop.
  8831. JobId *string `min:"1" type:"string"`
  8832. // Either STOP_REQUESTED if the job is currently running, or STOPPED if the
  8833. // job was previously stopped with the StopEntitiesDetectionJob operation.
  8834. JobStatus *string `type:"string" enum:"JobStatus"`
  8835. }
  8836. // String returns the string representation
  8837. func (s StopEntitiesDetectionJobOutput) String() string {
  8838. return awsutil.Prettify(s)
  8839. }
  8840. // GoString returns the string representation
  8841. func (s StopEntitiesDetectionJobOutput) GoString() string {
  8842. return s.String()
  8843. }
  8844. // SetJobId sets the JobId field's value.
  8845. func (s *StopEntitiesDetectionJobOutput) SetJobId(v string) *StopEntitiesDetectionJobOutput {
  8846. s.JobId = &v
  8847. return s
  8848. }
  8849. // SetJobStatus sets the JobStatus field's value.
  8850. func (s *StopEntitiesDetectionJobOutput) SetJobStatus(v string) *StopEntitiesDetectionJobOutput {
  8851. s.JobStatus = &v
  8852. return s
  8853. }
  8854. type StopKeyPhrasesDetectionJobInput struct {
  8855. _ struct{} `type:"structure"`
  8856. // The identifier of the key phrases detection job to stop.
  8857. //
  8858. // JobId is a required field
  8859. JobId *string `min:"1" type:"string" required:"true"`
  8860. }
  8861. // String returns the string representation
  8862. func (s StopKeyPhrasesDetectionJobInput) String() string {
  8863. return awsutil.Prettify(s)
  8864. }
  8865. // GoString returns the string representation
  8866. func (s StopKeyPhrasesDetectionJobInput) GoString() string {
  8867. return s.String()
  8868. }
  8869. // Validate inspects the fields of the type to determine if they are valid.
  8870. func (s *StopKeyPhrasesDetectionJobInput) Validate() error {
  8871. invalidParams := request.ErrInvalidParams{Context: "StopKeyPhrasesDetectionJobInput"}
  8872. if s.JobId == nil {
  8873. invalidParams.Add(request.NewErrParamRequired("JobId"))
  8874. }
  8875. if s.JobId != nil && len(*s.JobId) < 1 {
  8876. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  8877. }
  8878. if invalidParams.Len() > 0 {
  8879. return invalidParams
  8880. }
  8881. return nil
  8882. }
  8883. // SetJobId sets the JobId field's value.
  8884. func (s *StopKeyPhrasesDetectionJobInput) SetJobId(v string) *StopKeyPhrasesDetectionJobInput {
  8885. s.JobId = &v
  8886. return s
  8887. }
  8888. type StopKeyPhrasesDetectionJobOutput struct {
  8889. _ struct{} `type:"structure"`
  8890. // The identifier of the key phrases detection job to stop.
  8891. JobId *string `min:"1" type:"string"`
  8892. // Either STOP_REQUESTED if the job is currently running, or STOPPED if the
  8893. // job was previously stopped with the StopKeyPhrasesDetectionJob operation.
  8894. JobStatus *string `type:"string" enum:"JobStatus"`
  8895. }
  8896. // String returns the string representation
  8897. func (s StopKeyPhrasesDetectionJobOutput) String() string {
  8898. return awsutil.Prettify(s)
  8899. }
  8900. // GoString returns the string representation
  8901. func (s StopKeyPhrasesDetectionJobOutput) GoString() string {
  8902. return s.String()
  8903. }
  8904. // SetJobId sets the JobId field's value.
  8905. func (s *StopKeyPhrasesDetectionJobOutput) SetJobId(v string) *StopKeyPhrasesDetectionJobOutput {
  8906. s.JobId = &v
  8907. return s
  8908. }
  8909. // SetJobStatus sets the JobStatus field's value.
  8910. func (s *StopKeyPhrasesDetectionJobOutput) SetJobStatus(v string) *StopKeyPhrasesDetectionJobOutput {
  8911. s.JobStatus = &v
  8912. return s
  8913. }
  8914. type StopSentimentDetectionJobInput struct {
  8915. _ struct{} `type:"structure"`
  8916. // The identifier of the sentiment detection job to stop.
  8917. //
  8918. // JobId is a required field
  8919. JobId *string `min:"1" type:"string" required:"true"`
  8920. }
  8921. // String returns the string representation
  8922. func (s StopSentimentDetectionJobInput) String() string {
  8923. return awsutil.Prettify(s)
  8924. }
  8925. // GoString returns the string representation
  8926. func (s StopSentimentDetectionJobInput) GoString() string {
  8927. return s.String()
  8928. }
  8929. // Validate inspects the fields of the type to determine if they are valid.
  8930. func (s *StopSentimentDetectionJobInput) Validate() error {
  8931. invalidParams := request.ErrInvalidParams{Context: "StopSentimentDetectionJobInput"}
  8932. if s.JobId == nil {
  8933. invalidParams.Add(request.NewErrParamRequired("JobId"))
  8934. }
  8935. if s.JobId != nil && len(*s.JobId) < 1 {
  8936. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  8937. }
  8938. if invalidParams.Len() > 0 {
  8939. return invalidParams
  8940. }
  8941. return nil
  8942. }
  8943. // SetJobId sets the JobId field's value.
  8944. func (s *StopSentimentDetectionJobInput) SetJobId(v string) *StopSentimentDetectionJobInput {
  8945. s.JobId = &v
  8946. return s
  8947. }
  8948. type StopSentimentDetectionJobOutput struct {
  8949. _ struct{} `type:"structure"`
  8950. // The identifier of the sentiment detection job to stop.
  8951. JobId *string `min:"1" type:"string"`
  8952. // Either STOP_REQUESTED if the job is currently running, or STOPPED if the
  8953. // job was previously stopped with the StopSentimentDetectionJob operation.
  8954. JobStatus *string `type:"string" enum:"JobStatus"`
  8955. }
  8956. // String returns the string representation
  8957. func (s StopSentimentDetectionJobOutput) String() string {
  8958. return awsutil.Prettify(s)
  8959. }
  8960. // GoString returns the string representation
  8961. func (s StopSentimentDetectionJobOutput) GoString() string {
  8962. return s.String()
  8963. }
  8964. // SetJobId sets the JobId field's value.
  8965. func (s *StopSentimentDetectionJobOutput) SetJobId(v string) *StopSentimentDetectionJobOutput {
  8966. s.JobId = &v
  8967. return s
  8968. }
  8969. // SetJobStatus sets the JobStatus field's value.
  8970. func (s *StopSentimentDetectionJobOutput) SetJobStatus(v string) *StopSentimentDetectionJobOutput {
  8971. s.JobStatus = &v
  8972. return s
  8973. }
  8974. type StopTrainingDocumentClassifierInput struct {
  8975. _ struct{} `type:"structure"`
  8976. // The Amazon Resource Name (ARN) that identifies the document classifier currently
  8977. // being trained.
  8978. //
  8979. // DocumentClassifierArn is a required field
  8980. DocumentClassifierArn *string `type:"string" required:"true"`
  8981. }
  8982. // String returns the string representation
  8983. func (s StopTrainingDocumentClassifierInput) String() string {
  8984. return awsutil.Prettify(s)
  8985. }
  8986. // GoString returns the string representation
  8987. func (s StopTrainingDocumentClassifierInput) GoString() string {
  8988. return s.String()
  8989. }
  8990. // Validate inspects the fields of the type to determine if they are valid.
  8991. func (s *StopTrainingDocumentClassifierInput) Validate() error {
  8992. invalidParams := request.ErrInvalidParams{Context: "StopTrainingDocumentClassifierInput"}
  8993. if s.DocumentClassifierArn == nil {
  8994. invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn"))
  8995. }
  8996. if invalidParams.Len() > 0 {
  8997. return invalidParams
  8998. }
  8999. return nil
  9000. }
  9001. // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
  9002. func (s *StopTrainingDocumentClassifierInput) SetDocumentClassifierArn(v string) *StopTrainingDocumentClassifierInput {
  9003. s.DocumentClassifierArn = &v
  9004. return s
  9005. }
  9006. type StopTrainingDocumentClassifierOutput struct {
  9007. _ struct{} `type:"structure"`
  9008. }
  9009. // String returns the string representation
  9010. func (s StopTrainingDocumentClassifierOutput) String() string {
  9011. return awsutil.Prettify(s)
  9012. }
  9013. // GoString returns the string representation
  9014. func (s StopTrainingDocumentClassifierOutput) GoString() string {
  9015. return s.String()
  9016. }
  9017. type StopTrainingEntityRecognizerInput struct {
  9018. _ struct{} `type:"structure"`
  9019. // The Amazon Resource Name (ARN) that identifies the entity recognizer currently
  9020. // being trained.
  9021. //
  9022. // EntityRecognizerArn is a required field
  9023. EntityRecognizerArn *string `type:"string" required:"true"`
  9024. }
  9025. // String returns the string representation
  9026. func (s StopTrainingEntityRecognizerInput) String() string {
  9027. return awsutil.Prettify(s)
  9028. }
  9029. // GoString returns the string representation
  9030. func (s StopTrainingEntityRecognizerInput) GoString() string {
  9031. return s.String()
  9032. }
  9033. // Validate inspects the fields of the type to determine if they are valid.
  9034. func (s *StopTrainingEntityRecognizerInput) Validate() error {
  9035. invalidParams := request.ErrInvalidParams{Context: "StopTrainingEntityRecognizerInput"}
  9036. if s.EntityRecognizerArn == nil {
  9037. invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn"))
  9038. }
  9039. if invalidParams.Len() > 0 {
  9040. return invalidParams
  9041. }
  9042. return nil
  9043. }
  9044. // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
  9045. func (s *StopTrainingEntityRecognizerInput) SetEntityRecognizerArn(v string) *StopTrainingEntityRecognizerInput {
  9046. s.EntityRecognizerArn = &v
  9047. return s
  9048. }
  9049. type StopTrainingEntityRecognizerOutput struct {
  9050. _ struct{} `type:"structure"`
  9051. }
  9052. // String returns the string representation
  9053. func (s StopTrainingEntityRecognizerOutput) String() string {
  9054. return awsutil.Prettify(s)
  9055. }
  9056. // GoString returns the string representation
  9057. func (s StopTrainingEntityRecognizerOutput) GoString() string {
  9058. return s.String()
  9059. }
  9060. // Represents a work in the input text that was recognized and assigned a part
  9061. // of speech. There is one syntax token record for each word in the source text.
  9062. type SyntaxToken struct {
  9063. _ struct{} `type:"structure"`
  9064. // The zero-based offset from the beginning of the source text to the first
  9065. // character in the word.
  9066. BeginOffset *int64 `type:"integer"`
  9067. // The zero-based offset from the beginning of the source text to the last character
  9068. // in the word.
  9069. EndOffset *int64 `type:"integer"`
  9070. // Provides the part of speech label and the confidence level that Amazon Comprehend
  9071. // has that the part of speech was correctly identified. For more information,
  9072. // see how-syntax.
  9073. PartOfSpeech *PartOfSpeechTag `type:"structure"`
  9074. // The word that was recognized in the source text.
  9075. Text *string `min:"1" type:"string"`
  9076. // A unique identifier for a token.
  9077. TokenId *int64 `type:"integer"`
  9078. }
  9079. // String returns the string representation
  9080. func (s SyntaxToken) String() string {
  9081. return awsutil.Prettify(s)
  9082. }
  9083. // GoString returns the string representation
  9084. func (s SyntaxToken) GoString() string {
  9085. return s.String()
  9086. }
  9087. // SetBeginOffset sets the BeginOffset field's value.
  9088. func (s *SyntaxToken) SetBeginOffset(v int64) *SyntaxToken {
  9089. s.BeginOffset = &v
  9090. return s
  9091. }
  9092. // SetEndOffset sets the EndOffset field's value.
  9093. func (s *SyntaxToken) SetEndOffset(v int64) *SyntaxToken {
  9094. s.EndOffset = &v
  9095. return s
  9096. }
  9097. // SetPartOfSpeech sets the PartOfSpeech field's value.
  9098. func (s *SyntaxToken) SetPartOfSpeech(v *PartOfSpeechTag) *SyntaxToken {
  9099. s.PartOfSpeech = v
  9100. return s
  9101. }
  9102. // SetText sets the Text field's value.
  9103. func (s *SyntaxToken) SetText(v string) *SyntaxToken {
  9104. s.Text = &v
  9105. return s
  9106. }
  9107. // SetTokenId sets the TokenId field's value.
  9108. func (s *SyntaxToken) SetTokenId(v int64) *SyntaxToken {
  9109. s.TokenId = &v
  9110. return s
  9111. }
  9112. // Provides information for filtering topic detection jobs. For more information,
  9113. // see .
  9114. type TopicsDetectionJobFilter struct {
  9115. _ struct{} `type:"structure"`
  9116. JobName *string `min:"1" type:"string"`
  9117. // Filters the list of topic detection jobs based on job status. Returns only
  9118. // jobs with the specified status.
  9119. JobStatus *string `type:"string" enum:"JobStatus"`
  9120. // Filters the list of jobs based on the time that the job was submitted for
  9121. // processing. Only returns jobs submitted after the specified time. Jobs are
  9122. // returned in ascending order, oldest to newest.
  9123. SubmitTimeAfter *time.Time `type:"timestamp"`
  9124. // Filters the list of jobs based on the time that the job was submitted for
  9125. // processing. Only returns jobs submitted before the specified time. Jobs are
  9126. // returned in descending order, newest to oldest.
  9127. SubmitTimeBefore *time.Time `type:"timestamp"`
  9128. }
  9129. // String returns the string representation
  9130. func (s TopicsDetectionJobFilter) String() string {
  9131. return awsutil.Prettify(s)
  9132. }
  9133. // GoString returns the string representation
  9134. func (s TopicsDetectionJobFilter) GoString() string {
  9135. return s.String()
  9136. }
  9137. // Validate inspects the fields of the type to determine if they are valid.
  9138. func (s *TopicsDetectionJobFilter) Validate() error {
  9139. invalidParams := request.ErrInvalidParams{Context: "TopicsDetectionJobFilter"}
  9140. if s.JobName != nil && len(*s.JobName) < 1 {
  9141. invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
  9142. }
  9143. if invalidParams.Len() > 0 {
  9144. return invalidParams
  9145. }
  9146. return nil
  9147. }
  9148. // SetJobName sets the JobName field's value.
  9149. func (s *TopicsDetectionJobFilter) SetJobName(v string) *TopicsDetectionJobFilter {
  9150. s.JobName = &v
  9151. return s
  9152. }
  9153. // SetJobStatus sets the JobStatus field's value.
  9154. func (s *TopicsDetectionJobFilter) SetJobStatus(v string) *TopicsDetectionJobFilter {
  9155. s.JobStatus = &v
  9156. return s
  9157. }
  9158. // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
  9159. func (s *TopicsDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *TopicsDetectionJobFilter {
  9160. s.SubmitTimeAfter = &v
  9161. return s
  9162. }
  9163. // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
  9164. func (s *TopicsDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *TopicsDetectionJobFilter {
  9165. s.SubmitTimeBefore = &v
  9166. return s
  9167. }
  9168. // Provides information about a topic detection job.
  9169. type TopicsDetectionJobProperties struct {
  9170. _ struct{} `type:"structure"`
  9171. // The time that the topic detection job was completed.
  9172. EndTime *time.Time `type:"timestamp"`
  9173. // The input data configuration supplied when you created the topic detection
  9174. // job.
  9175. InputDataConfig *InputDataConfig `type:"structure"`
  9176. // The identifier assigned to the topic detection job.
  9177. JobId *string `min:"1" type:"string"`
  9178. // The name of the topic detection job.
  9179. JobName *string `min:"1" type:"string"`
  9180. // The current status of the topic detection job. If the status is Failed, the
  9181. // reason for the failure is shown in the Message field.
  9182. JobStatus *string `type:"string" enum:"JobStatus"`
  9183. // A description for the status of a job.
  9184. Message *string `type:"string"`
  9185. // The number of topics to detect supplied when you created the topic detection
  9186. // job. The default is 10.
  9187. NumberOfTopics *int64 `type:"integer"`
  9188. // The output data configuration supplied when you created the topic detection
  9189. // job.
  9190. OutputDataConfig *OutputDataConfig `type:"structure"`
  9191. // The time that the topic detection job was submitted for processing.
  9192. SubmitTime *time.Time `type:"timestamp"`
  9193. }
  9194. // String returns the string representation
  9195. func (s TopicsDetectionJobProperties) String() string {
  9196. return awsutil.Prettify(s)
  9197. }
  9198. // GoString returns the string representation
  9199. func (s TopicsDetectionJobProperties) GoString() string {
  9200. return s.String()
  9201. }
  9202. // SetEndTime sets the EndTime field's value.
  9203. func (s *TopicsDetectionJobProperties) SetEndTime(v time.Time) *TopicsDetectionJobProperties {
  9204. s.EndTime = &v
  9205. return s
  9206. }
  9207. // SetInputDataConfig sets the InputDataConfig field's value.
  9208. func (s *TopicsDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *TopicsDetectionJobProperties {
  9209. s.InputDataConfig = v
  9210. return s
  9211. }
  9212. // SetJobId sets the JobId field's value.
  9213. func (s *TopicsDetectionJobProperties) SetJobId(v string) *TopicsDetectionJobProperties {
  9214. s.JobId = &v
  9215. return s
  9216. }
  9217. // SetJobName sets the JobName field's value.
  9218. func (s *TopicsDetectionJobProperties) SetJobName(v string) *TopicsDetectionJobProperties {
  9219. s.JobName = &v
  9220. return s
  9221. }
  9222. // SetJobStatus sets the JobStatus field's value.
  9223. func (s *TopicsDetectionJobProperties) SetJobStatus(v string) *TopicsDetectionJobProperties {
  9224. s.JobStatus = &v
  9225. return s
  9226. }
  9227. // SetMessage sets the Message field's value.
  9228. func (s *TopicsDetectionJobProperties) SetMessage(v string) *TopicsDetectionJobProperties {
  9229. s.Message = &v
  9230. return s
  9231. }
  9232. // SetNumberOfTopics sets the NumberOfTopics field's value.
  9233. func (s *TopicsDetectionJobProperties) SetNumberOfTopics(v int64) *TopicsDetectionJobProperties {
  9234. s.NumberOfTopics = &v
  9235. return s
  9236. }
  9237. // SetOutputDataConfig sets the OutputDataConfig field's value.
  9238. func (s *TopicsDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *TopicsDetectionJobProperties {
  9239. s.OutputDataConfig = v
  9240. return s
  9241. }
  9242. // SetSubmitTime sets the SubmitTime field's value.
  9243. func (s *TopicsDetectionJobProperties) SetSubmitTime(v time.Time) *TopicsDetectionJobProperties {
  9244. s.SubmitTime = &v
  9245. return s
  9246. }
  9247. const (
  9248. // EntityTypePerson is a EntityType enum value
  9249. EntityTypePerson = "PERSON"
  9250. // EntityTypeLocation is a EntityType enum value
  9251. EntityTypeLocation = "LOCATION"
  9252. // EntityTypeOrganization is a EntityType enum value
  9253. EntityTypeOrganization = "ORGANIZATION"
  9254. // EntityTypeCommercialItem is a EntityType enum value
  9255. EntityTypeCommercialItem = "COMMERCIAL_ITEM"
  9256. // EntityTypeEvent is a EntityType enum value
  9257. EntityTypeEvent = "EVENT"
  9258. // EntityTypeDate is a EntityType enum value
  9259. EntityTypeDate = "DATE"
  9260. // EntityTypeQuantity is a EntityType enum value
  9261. EntityTypeQuantity = "QUANTITY"
  9262. // EntityTypeTitle is a EntityType enum value
  9263. EntityTypeTitle = "TITLE"
  9264. // EntityTypeOther is a EntityType enum value
  9265. EntityTypeOther = "OTHER"
  9266. )
  9267. const (
  9268. // InputFormatOneDocPerFile is a InputFormat enum value
  9269. InputFormatOneDocPerFile = "ONE_DOC_PER_FILE"
  9270. // InputFormatOneDocPerLine is a InputFormat enum value
  9271. InputFormatOneDocPerLine = "ONE_DOC_PER_LINE"
  9272. )
  9273. const (
  9274. // JobStatusSubmitted is a JobStatus enum value
  9275. JobStatusSubmitted = "SUBMITTED"
  9276. // JobStatusInProgress is a JobStatus enum value
  9277. JobStatusInProgress = "IN_PROGRESS"
  9278. // JobStatusCompleted is a JobStatus enum value
  9279. JobStatusCompleted = "COMPLETED"
  9280. // JobStatusFailed is a JobStatus enum value
  9281. JobStatusFailed = "FAILED"
  9282. // JobStatusStopRequested is a JobStatus enum value
  9283. JobStatusStopRequested = "STOP_REQUESTED"
  9284. // JobStatusStopped is a JobStatus enum value
  9285. JobStatusStopped = "STOPPED"
  9286. )
  9287. const (
  9288. // LanguageCodeEn is a LanguageCode enum value
  9289. LanguageCodeEn = "en"
  9290. // LanguageCodeEs is a LanguageCode enum value
  9291. LanguageCodeEs = "es"
  9292. // LanguageCodeFr is a LanguageCode enum value
  9293. LanguageCodeFr = "fr"
  9294. // LanguageCodeDe is a LanguageCode enum value
  9295. LanguageCodeDe = "de"
  9296. // LanguageCodeIt is a LanguageCode enum value
  9297. LanguageCodeIt = "it"
  9298. // LanguageCodePt is a LanguageCode enum value
  9299. LanguageCodePt = "pt"
  9300. )
  9301. const (
  9302. // ModelStatusSubmitted is a ModelStatus enum value
  9303. ModelStatusSubmitted = "SUBMITTED"
  9304. // ModelStatusTraining is a ModelStatus enum value
  9305. ModelStatusTraining = "TRAINING"
  9306. // ModelStatusDeleting is a ModelStatus enum value
  9307. ModelStatusDeleting = "DELETING"
  9308. // ModelStatusStopRequested is a ModelStatus enum value
  9309. ModelStatusStopRequested = "STOP_REQUESTED"
  9310. // ModelStatusStopped is a ModelStatus enum value
  9311. ModelStatusStopped = "STOPPED"
  9312. // ModelStatusInError is a ModelStatus enum value
  9313. ModelStatusInError = "IN_ERROR"
  9314. // ModelStatusTrained is a ModelStatus enum value
  9315. ModelStatusTrained = "TRAINED"
  9316. )
  9317. const (
  9318. // PartOfSpeechTagTypeAdj is a PartOfSpeechTagType enum value
  9319. PartOfSpeechTagTypeAdj = "ADJ"
  9320. // PartOfSpeechTagTypeAdp is a PartOfSpeechTagType enum value
  9321. PartOfSpeechTagTypeAdp = "ADP"
  9322. // PartOfSpeechTagTypeAdv is a PartOfSpeechTagType enum value
  9323. PartOfSpeechTagTypeAdv = "ADV"
  9324. // PartOfSpeechTagTypeAux is a PartOfSpeechTagType enum value
  9325. PartOfSpeechTagTypeAux = "AUX"
  9326. // PartOfSpeechTagTypeConj is a PartOfSpeechTagType enum value
  9327. PartOfSpeechTagTypeConj = "CONJ"
  9328. // PartOfSpeechTagTypeCconj is a PartOfSpeechTagType enum value
  9329. PartOfSpeechTagTypeCconj = "CCONJ"
  9330. // PartOfSpeechTagTypeDet is a PartOfSpeechTagType enum value
  9331. PartOfSpeechTagTypeDet = "DET"
  9332. // PartOfSpeechTagTypeIntj is a PartOfSpeechTagType enum value
  9333. PartOfSpeechTagTypeIntj = "INTJ"
  9334. // PartOfSpeechTagTypeNoun is a PartOfSpeechTagType enum value
  9335. PartOfSpeechTagTypeNoun = "NOUN"
  9336. // PartOfSpeechTagTypeNum is a PartOfSpeechTagType enum value
  9337. PartOfSpeechTagTypeNum = "NUM"
  9338. // PartOfSpeechTagTypeO is a PartOfSpeechTagType enum value
  9339. PartOfSpeechTagTypeO = "O"
  9340. // PartOfSpeechTagTypePart is a PartOfSpeechTagType enum value
  9341. PartOfSpeechTagTypePart = "PART"
  9342. // PartOfSpeechTagTypePron is a PartOfSpeechTagType enum value
  9343. PartOfSpeechTagTypePron = "PRON"
  9344. // PartOfSpeechTagTypePropn is a PartOfSpeechTagType enum value
  9345. PartOfSpeechTagTypePropn = "PROPN"
  9346. // PartOfSpeechTagTypePunct is a PartOfSpeechTagType enum value
  9347. PartOfSpeechTagTypePunct = "PUNCT"
  9348. // PartOfSpeechTagTypeSconj is a PartOfSpeechTagType enum value
  9349. PartOfSpeechTagTypeSconj = "SCONJ"
  9350. // PartOfSpeechTagTypeSym is a PartOfSpeechTagType enum value
  9351. PartOfSpeechTagTypeSym = "SYM"
  9352. // PartOfSpeechTagTypeVerb is a PartOfSpeechTagType enum value
  9353. PartOfSpeechTagTypeVerb = "VERB"
  9354. )
  9355. const (
  9356. // SentimentTypePositive is a SentimentType enum value
  9357. SentimentTypePositive = "POSITIVE"
  9358. // SentimentTypeNegative is a SentimentType enum value
  9359. SentimentTypeNegative = "NEGATIVE"
  9360. // SentimentTypeNeutral is a SentimentType enum value
  9361. SentimentTypeNeutral = "NEUTRAL"
  9362. // SentimentTypeMixed is a SentimentType enum value
  9363. SentimentTypeMixed = "MIXED"
  9364. )
  9365. const (
  9366. // SyntaxLanguageCodeEn is a SyntaxLanguageCode enum value
  9367. SyntaxLanguageCodeEn = "en"
  9368. // SyntaxLanguageCodeEs is a SyntaxLanguageCode enum value
  9369. SyntaxLanguageCodeEs = "es"
  9370. // SyntaxLanguageCodeFr is a SyntaxLanguageCode enum value
  9371. SyntaxLanguageCodeFr = "fr"
  9372. // SyntaxLanguageCodeDe is a SyntaxLanguageCode enum value
  9373. SyntaxLanguageCodeDe = "de"
  9374. // SyntaxLanguageCodeIt is a SyntaxLanguageCode enum value
  9375. SyntaxLanguageCodeIt = "it"
  9376. // SyntaxLanguageCodePt is a SyntaxLanguageCode enum value
  9377. SyntaxLanguageCodePt = "pt"
  9378. )