| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875 |
- // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
- package comprehend
- import (
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- )
- const opBatchDetectDominantLanguage = "BatchDetectDominantLanguage"
- // BatchDetectDominantLanguageRequest generates a "aws/request.Request" representing the
- // client's request for the BatchDetectDominantLanguage operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See BatchDetectDominantLanguage for more information on using the BatchDetectDominantLanguage
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the BatchDetectDominantLanguageRequest method.
- // req, resp := client.BatchDetectDominantLanguageRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguage
- func (c *Comprehend) BatchDetectDominantLanguageRequest(input *BatchDetectDominantLanguageInput) (req *request.Request, output *BatchDetectDominantLanguageOutput) {
- op := &request.Operation{
- Name: opBatchDetectDominantLanguage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &BatchDetectDominantLanguageInput{}
- }
- output = &BatchDetectDominantLanguageOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // BatchDetectDominantLanguage API operation for Amazon Comprehend.
- //
- // Determines the dominant language of the input text for a batch of documents.
- // For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend
- // Supported Languages (http://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation BatchDetectDominantLanguage for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
- // The number of documents in the request exceeds the limit of 25. Try your
- // request again with fewer documents.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguage
- func (c *Comprehend) BatchDetectDominantLanguage(input *BatchDetectDominantLanguageInput) (*BatchDetectDominantLanguageOutput, error) {
- req, out := c.BatchDetectDominantLanguageRequest(input)
- return out, req.Send()
- }
- // BatchDetectDominantLanguageWithContext is the same as BatchDetectDominantLanguage with the addition of
- // the ability to pass a context and additional request options.
- //
- // See BatchDetectDominantLanguage for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) BatchDetectDominantLanguageWithContext(ctx aws.Context, input *BatchDetectDominantLanguageInput, opts ...request.Option) (*BatchDetectDominantLanguageOutput, error) {
- req, out := c.BatchDetectDominantLanguageRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opBatchDetectEntities = "BatchDetectEntities"
- // BatchDetectEntitiesRequest generates a "aws/request.Request" representing the
- // client's request for the BatchDetectEntities operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See BatchDetectEntities for more information on using the BatchDetectEntities
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the BatchDetectEntitiesRequest method.
- // req, resp := client.BatchDetectEntitiesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntities
- func (c *Comprehend) BatchDetectEntitiesRequest(input *BatchDetectEntitiesInput) (req *request.Request, output *BatchDetectEntitiesOutput) {
- op := &request.Operation{
- Name: opBatchDetectEntities,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &BatchDetectEntitiesInput{}
- }
- output = &BatchDetectEntitiesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // BatchDetectEntities API operation for Amazon Comprehend.
- //
- // Inspects the text of a batch of documents for named entities and returns
- // information about them. For more information about named entities, see how-entities
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation BatchDetectEntities for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
- // The number of documents in the request exceeds the limit of 25. Try your
- // request again with fewer documents.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntities
- func (c *Comprehend) BatchDetectEntities(input *BatchDetectEntitiesInput) (*BatchDetectEntitiesOutput, error) {
- req, out := c.BatchDetectEntitiesRequest(input)
- return out, req.Send()
- }
- // BatchDetectEntitiesWithContext is the same as BatchDetectEntities with the addition of
- // the ability to pass a context and additional request options.
- //
- // See BatchDetectEntities for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) BatchDetectEntitiesWithContext(ctx aws.Context, input *BatchDetectEntitiesInput, opts ...request.Option) (*BatchDetectEntitiesOutput, error) {
- req, out := c.BatchDetectEntitiesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opBatchDetectKeyPhrases = "BatchDetectKeyPhrases"
- // BatchDetectKeyPhrasesRequest generates a "aws/request.Request" representing the
- // client's request for the BatchDetectKeyPhrases operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See BatchDetectKeyPhrases for more information on using the BatchDetectKeyPhrases
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the BatchDetectKeyPhrasesRequest method.
- // req, resp := client.BatchDetectKeyPhrasesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrases
- func (c *Comprehend) BatchDetectKeyPhrasesRequest(input *BatchDetectKeyPhrasesInput) (req *request.Request, output *BatchDetectKeyPhrasesOutput) {
- op := &request.Operation{
- Name: opBatchDetectKeyPhrases,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &BatchDetectKeyPhrasesInput{}
- }
- output = &BatchDetectKeyPhrasesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // BatchDetectKeyPhrases API operation for Amazon Comprehend.
- //
- // Detects the key noun phrases found in a batch of documents.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation BatchDetectKeyPhrases for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
- // The number of documents in the request exceeds the limit of 25. Try your
- // request again with fewer documents.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrases
- func (c *Comprehend) BatchDetectKeyPhrases(input *BatchDetectKeyPhrasesInput) (*BatchDetectKeyPhrasesOutput, error) {
- req, out := c.BatchDetectKeyPhrasesRequest(input)
- return out, req.Send()
- }
- // BatchDetectKeyPhrasesWithContext is the same as BatchDetectKeyPhrases with the addition of
- // the ability to pass a context and additional request options.
- //
- // See BatchDetectKeyPhrases for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) BatchDetectKeyPhrasesWithContext(ctx aws.Context, input *BatchDetectKeyPhrasesInput, opts ...request.Option) (*BatchDetectKeyPhrasesOutput, error) {
- req, out := c.BatchDetectKeyPhrasesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opBatchDetectSentiment = "BatchDetectSentiment"
- // BatchDetectSentimentRequest generates a "aws/request.Request" representing the
- // client's request for the BatchDetectSentiment operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See BatchDetectSentiment for more information on using the BatchDetectSentiment
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the BatchDetectSentimentRequest method.
- // req, resp := client.BatchDetectSentimentRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentiment
- func (c *Comprehend) BatchDetectSentimentRequest(input *BatchDetectSentimentInput) (req *request.Request, output *BatchDetectSentimentOutput) {
- op := &request.Operation{
- Name: opBatchDetectSentiment,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &BatchDetectSentimentInput{}
- }
- output = &BatchDetectSentimentOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // BatchDetectSentiment API operation for Amazon Comprehend.
- //
- // Inspects a batch of documents and returns an inference of the prevailing
- // sentiment, POSITIVE, NEUTRAL, MIXED, or NEGATIVE, in each one.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation BatchDetectSentiment for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
- // The number of documents in the request exceeds the limit of 25. Try your
- // request again with fewer documents.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentiment
- func (c *Comprehend) BatchDetectSentiment(input *BatchDetectSentimentInput) (*BatchDetectSentimentOutput, error) {
- req, out := c.BatchDetectSentimentRequest(input)
- return out, req.Send()
- }
- // BatchDetectSentimentWithContext is the same as BatchDetectSentiment with the addition of
- // the ability to pass a context and additional request options.
- //
- // See BatchDetectSentiment for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) BatchDetectSentimentWithContext(ctx aws.Context, input *BatchDetectSentimentInput, opts ...request.Option) (*BatchDetectSentimentOutput, error) {
- req, out := c.BatchDetectSentimentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opBatchDetectSyntax = "BatchDetectSyntax"
- // BatchDetectSyntaxRequest generates a "aws/request.Request" representing the
- // client's request for the BatchDetectSyntax operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See BatchDetectSyntax for more information on using the BatchDetectSyntax
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the BatchDetectSyntaxRequest method.
- // req, resp := client.BatchDetectSyntaxRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSyntax
- func (c *Comprehend) BatchDetectSyntaxRequest(input *BatchDetectSyntaxInput) (req *request.Request, output *BatchDetectSyntaxOutput) {
- op := &request.Operation{
- Name: opBatchDetectSyntax,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &BatchDetectSyntaxInput{}
- }
- output = &BatchDetectSyntaxOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // BatchDetectSyntax API operation for Amazon Comprehend.
- //
- // Inspects the text of a batch of documents for the syntax and part of speech
- // of the words in the document and returns information about them. For more
- // information, see how-syntax.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation BatchDetectSyntax for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeBatchSizeLimitExceededException "BatchSizeLimitExceededException"
- // The number of documents in the request exceeds the limit of 25. Try your
- // request again with fewer documents.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSyntax
- func (c *Comprehend) BatchDetectSyntax(input *BatchDetectSyntaxInput) (*BatchDetectSyntaxOutput, error) {
- req, out := c.BatchDetectSyntaxRequest(input)
- return out, req.Send()
- }
- // BatchDetectSyntaxWithContext is the same as BatchDetectSyntax with the addition of
- // the ability to pass a context and additional request options.
- //
- // See BatchDetectSyntax for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) BatchDetectSyntaxWithContext(ctx aws.Context, input *BatchDetectSyntaxInput, opts ...request.Option) (*BatchDetectSyntaxOutput, error) {
- req, out := c.BatchDetectSyntaxRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCreateDocumentClassifier = "CreateDocumentClassifier"
- // CreateDocumentClassifierRequest generates a "aws/request.Request" representing the
- // client's request for the CreateDocumentClassifier operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateDocumentClassifier for more information on using the CreateDocumentClassifier
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateDocumentClassifierRequest method.
- // req, resp := client.CreateDocumentClassifierRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateDocumentClassifier
- func (c *Comprehend) CreateDocumentClassifierRequest(input *CreateDocumentClassifierInput) (req *request.Request, output *CreateDocumentClassifierOutput) {
- op := &request.Operation{
- Name: opCreateDocumentClassifier,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateDocumentClassifierInput{}
- }
- output = &CreateDocumentClassifierOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // CreateDocumentClassifier API operation for Amazon Comprehend.
- //
- // Creates a new document classifier that you can use to categorize documents.
- // To create a classifier you provide a set of training documents that labeled
- // with the categories that you want to use. After the classifier is trained
- // you can use it to categorize a set of labeled documents into the categories.
- // For more information, see how-document-classification.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation CreateDocumentClassifier for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeResourceInUseException "ResourceInUseException"
- // The specified name is already in use. Use a different name and try your request
- // again.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
- // The maximum number of recognizers per account has been exceeded. Review the
- // recognizers, perform cleanup, and then try your request again.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateDocumentClassifier
- func (c *Comprehend) CreateDocumentClassifier(input *CreateDocumentClassifierInput) (*CreateDocumentClassifierOutput, error) {
- req, out := c.CreateDocumentClassifierRequest(input)
- return out, req.Send()
- }
- // CreateDocumentClassifierWithContext is the same as CreateDocumentClassifier with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateDocumentClassifier for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) CreateDocumentClassifierWithContext(ctx aws.Context, input *CreateDocumentClassifierInput, opts ...request.Option) (*CreateDocumentClassifierOutput, error) {
- req, out := c.CreateDocumentClassifierRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCreateEntityRecognizer = "CreateEntityRecognizer"
- // CreateEntityRecognizerRequest generates a "aws/request.Request" representing the
- // client's request for the CreateEntityRecognizer operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateEntityRecognizer for more information on using the CreateEntityRecognizer
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateEntityRecognizerRequest method.
- // req, resp := client.CreateEntityRecognizerRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEntityRecognizer
- func (c *Comprehend) CreateEntityRecognizerRequest(input *CreateEntityRecognizerInput) (req *request.Request, output *CreateEntityRecognizerOutput) {
- op := &request.Operation{
- Name: opCreateEntityRecognizer,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateEntityRecognizerInput{}
- }
- output = &CreateEntityRecognizerOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // CreateEntityRecognizer API operation for Amazon Comprehend.
- //
- // Creates an entity recognizer using submitted files. After your CreateEntityRecognizer
- // request is submitted, you can check job status using the API.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation CreateEntityRecognizer for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeResourceInUseException "ResourceInUseException"
- // The specified name is already in use. Use a different name and try your request
- // again.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceLimitExceededException "ResourceLimitExceededException"
- // The maximum number of recognizers per account has been exceeded. Review the
- // recognizers, perform cleanup, and then try your request again.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEntityRecognizer
- func (c *Comprehend) CreateEntityRecognizer(input *CreateEntityRecognizerInput) (*CreateEntityRecognizerOutput, error) {
- req, out := c.CreateEntityRecognizerRequest(input)
- return out, req.Send()
- }
- // CreateEntityRecognizerWithContext is the same as CreateEntityRecognizer with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateEntityRecognizer for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) CreateEntityRecognizerWithContext(ctx aws.Context, input *CreateEntityRecognizerInput, opts ...request.Option) (*CreateEntityRecognizerOutput, error) {
- req, out := c.CreateEntityRecognizerRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteDocumentClassifier = "DeleteDocumentClassifier"
- // DeleteDocumentClassifierRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteDocumentClassifier operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteDocumentClassifier for more information on using the DeleteDocumentClassifier
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteDocumentClassifierRequest method.
- // req, resp := client.DeleteDocumentClassifierRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteDocumentClassifier
- func (c *Comprehend) DeleteDocumentClassifierRequest(input *DeleteDocumentClassifierInput) (req *request.Request, output *DeleteDocumentClassifierOutput) {
- op := &request.Operation{
- Name: opDeleteDocumentClassifier,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteDocumentClassifierInput{}
- }
- output = &DeleteDocumentClassifierOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteDocumentClassifier API operation for Amazon Comprehend.
- //
- // Deletes a previously created document classifier
- //
- // Only those classifiers that are in terminated states (IN_ERROR, TRAINED)
- // will be deleted. If an active inference job is using the model, a ResourceInUseException
- // will be returned.
- //
- // This is an asynchronous action that puts the classifier into a DELETING state,
- // and it is then removed by a background job. Once removed, the classifier
- // disappears from your account and is no longer available for use.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DeleteDocumentClassifier for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource ARN was not found. Check the ARN and try your request
- // again.
- //
- // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
- // The specified resource is not available. Check to see if the resource is
- // in the TRAINED state and try your request again.
- //
- // * ErrCodeResourceInUseException "ResourceInUseException"
- // The specified name is already in use. Use a different name and try your request
- // again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteDocumentClassifier
- func (c *Comprehend) DeleteDocumentClassifier(input *DeleteDocumentClassifierInput) (*DeleteDocumentClassifierOutput, error) {
- req, out := c.DeleteDocumentClassifierRequest(input)
- return out, req.Send()
- }
- // DeleteDocumentClassifierWithContext is the same as DeleteDocumentClassifier with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteDocumentClassifier for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DeleteDocumentClassifierWithContext(ctx aws.Context, input *DeleteDocumentClassifierInput, opts ...request.Option) (*DeleteDocumentClassifierOutput, error) {
- req, out := c.DeleteDocumentClassifierRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteEntityRecognizer = "DeleteEntityRecognizer"
- // DeleteEntityRecognizerRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteEntityRecognizer operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteEntityRecognizer for more information on using the DeleteEntityRecognizer
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteEntityRecognizerRequest method.
- // req, resp := client.DeleteEntityRecognizerRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteEntityRecognizer
- func (c *Comprehend) DeleteEntityRecognizerRequest(input *DeleteEntityRecognizerInput) (req *request.Request, output *DeleteEntityRecognizerOutput) {
- op := &request.Operation{
- Name: opDeleteEntityRecognizer,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteEntityRecognizerInput{}
- }
- output = &DeleteEntityRecognizerOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteEntityRecognizer API operation for Amazon Comprehend.
- //
- // Deletes an entity recognizer.
- //
- // Only those recognizers that are in terminated states (IN_ERROR, TRAINED)
- // will be deleted. If an active inference job is using the model, a ResourceInUseException
- // will be returned.
- //
- // This is an asynchronous action that puts the recognizer into a DELETING state,
- // and it is then removed by a background job. Once removed, the recognizer
- // disappears from your account and is no longer available for use.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DeleteEntityRecognizer for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource ARN was not found. Check the ARN and try your request
- // again.
- //
- // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
- // The specified resource is not available. Check to see if the resource is
- // in the TRAINED state and try your request again.
- //
- // * ErrCodeResourceInUseException "ResourceInUseException"
- // The specified name is already in use. Use a different name and try your request
- // again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteEntityRecognizer
- func (c *Comprehend) DeleteEntityRecognizer(input *DeleteEntityRecognizerInput) (*DeleteEntityRecognizerOutput, error) {
- req, out := c.DeleteEntityRecognizerRequest(input)
- return out, req.Send()
- }
- // DeleteEntityRecognizerWithContext is the same as DeleteEntityRecognizer with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteEntityRecognizer for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DeleteEntityRecognizerWithContext(ctx aws.Context, input *DeleteEntityRecognizerInput, opts ...request.Option) (*DeleteEntityRecognizerOutput, error) {
- req, out := c.DeleteEntityRecognizerRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeDocumentClassificationJob = "DescribeDocumentClassificationJob"
- // DescribeDocumentClassificationJobRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeDocumentClassificationJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeDocumentClassificationJob for more information on using the DescribeDocumentClassificationJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeDocumentClassificationJobRequest method.
- // req, resp := client.DescribeDocumentClassificationJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassificationJob
- func (c *Comprehend) DescribeDocumentClassificationJobRequest(input *DescribeDocumentClassificationJobInput) (req *request.Request, output *DescribeDocumentClassificationJobOutput) {
- op := &request.Operation{
- Name: opDescribeDocumentClassificationJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeDocumentClassificationJobInput{}
- }
- output = &DescribeDocumentClassificationJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeDocumentClassificationJob API operation for Amazon Comprehend.
- //
- // Gets the properties associated with a document classification job. Use this
- // operation to get the status of a classification job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DescribeDocumentClassificationJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassificationJob
- func (c *Comprehend) DescribeDocumentClassificationJob(input *DescribeDocumentClassificationJobInput) (*DescribeDocumentClassificationJobOutput, error) {
- req, out := c.DescribeDocumentClassificationJobRequest(input)
- return out, req.Send()
- }
- // DescribeDocumentClassificationJobWithContext is the same as DescribeDocumentClassificationJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeDocumentClassificationJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DescribeDocumentClassificationJobWithContext(ctx aws.Context, input *DescribeDocumentClassificationJobInput, opts ...request.Option) (*DescribeDocumentClassificationJobOutput, error) {
- req, out := c.DescribeDocumentClassificationJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeDocumentClassifier = "DescribeDocumentClassifier"
- // DescribeDocumentClassifierRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeDocumentClassifier operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeDocumentClassifier for more information on using the DescribeDocumentClassifier
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeDocumentClassifierRequest method.
- // req, resp := client.DescribeDocumentClassifierRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier
- func (c *Comprehend) DescribeDocumentClassifierRequest(input *DescribeDocumentClassifierInput) (req *request.Request, output *DescribeDocumentClassifierOutput) {
- op := &request.Operation{
- Name: opDescribeDocumentClassifier,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeDocumentClassifierInput{}
- }
- output = &DescribeDocumentClassifierOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeDocumentClassifier API operation for Amazon Comprehend.
- //
- // Gets the properties associated with a document classifier.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DescribeDocumentClassifier for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource ARN was not found. Check the ARN and try your request
- // again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier
- func (c *Comprehend) DescribeDocumentClassifier(input *DescribeDocumentClassifierInput) (*DescribeDocumentClassifierOutput, error) {
- req, out := c.DescribeDocumentClassifierRequest(input)
- return out, req.Send()
- }
- // DescribeDocumentClassifierWithContext is the same as DescribeDocumentClassifier with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeDocumentClassifier for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DescribeDocumentClassifierWithContext(ctx aws.Context, input *DescribeDocumentClassifierInput, opts ...request.Option) (*DescribeDocumentClassifierOutput, error) {
- req, out := c.DescribeDocumentClassifierRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeDominantLanguageDetectionJob = "DescribeDominantLanguageDetectionJob"
- // DescribeDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeDominantLanguageDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeDominantLanguageDetectionJob for more information on using the DescribeDominantLanguageDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeDominantLanguageDetectionJobRequest method.
- // req, resp := client.DescribeDominantLanguageDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDominantLanguageDetectionJob
- func (c *Comprehend) DescribeDominantLanguageDetectionJobRequest(input *DescribeDominantLanguageDetectionJobInput) (req *request.Request, output *DescribeDominantLanguageDetectionJobOutput) {
- op := &request.Operation{
- Name: opDescribeDominantLanguageDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeDominantLanguageDetectionJobInput{}
- }
- output = &DescribeDominantLanguageDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeDominantLanguageDetectionJob API operation for Amazon Comprehend.
- //
- // Gets the properties associated with a dominant language detection job. Use
- // this operation to get the status of a detection job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DescribeDominantLanguageDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDominantLanguageDetectionJob
- func (c *Comprehend) DescribeDominantLanguageDetectionJob(input *DescribeDominantLanguageDetectionJobInput) (*DescribeDominantLanguageDetectionJobOutput, error) {
- req, out := c.DescribeDominantLanguageDetectionJobRequest(input)
- return out, req.Send()
- }
- // DescribeDominantLanguageDetectionJobWithContext is the same as DescribeDominantLanguageDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeDominantLanguageDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DescribeDominantLanguageDetectionJobWithContext(ctx aws.Context, input *DescribeDominantLanguageDetectionJobInput, opts ...request.Option) (*DescribeDominantLanguageDetectionJobOutput, error) {
- req, out := c.DescribeDominantLanguageDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeEntitiesDetectionJob = "DescribeEntitiesDetectionJob"
- // DescribeEntitiesDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeEntitiesDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeEntitiesDetectionJob for more information on using the DescribeEntitiesDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeEntitiesDetectionJobRequest method.
- // req, resp := client.DescribeEntitiesDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntitiesDetectionJob
- func (c *Comprehend) DescribeEntitiesDetectionJobRequest(input *DescribeEntitiesDetectionJobInput) (req *request.Request, output *DescribeEntitiesDetectionJobOutput) {
- op := &request.Operation{
- Name: opDescribeEntitiesDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeEntitiesDetectionJobInput{}
- }
- output = &DescribeEntitiesDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeEntitiesDetectionJob API operation for Amazon Comprehend.
- //
- // Gets the properties associated with an entities detection job. Use this operation
- // to get the status of a detection job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DescribeEntitiesDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntitiesDetectionJob
- func (c *Comprehend) DescribeEntitiesDetectionJob(input *DescribeEntitiesDetectionJobInput) (*DescribeEntitiesDetectionJobOutput, error) {
- req, out := c.DescribeEntitiesDetectionJobRequest(input)
- return out, req.Send()
- }
- // DescribeEntitiesDetectionJobWithContext is the same as DescribeEntitiesDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeEntitiesDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DescribeEntitiesDetectionJobWithContext(ctx aws.Context, input *DescribeEntitiesDetectionJobInput, opts ...request.Option) (*DescribeEntitiesDetectionJobOutput, error) {
- req, out := c.DescribeEntitiesDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeEntityRecognizer = "DescribeEntityRecognizer"
- // DescribeEntityRecognizerRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeEntityRecognizer operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeEntityRecognizer for more information on using the DescribeEntityRecognizer
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeEntityRecognizerRequest method.
- // req, resp := client.DescribeEntityRecognizerRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer
- func (c *Comprehend) DescribeEntityRecognizerRequest(input *DescribeEntityRecognizerInput) (req *request.Request, output *DescribeEntityRecognizerOutput) {
- op := &request.Operation{
- Name: opDescribeEntityRecognizer,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeEntityRecognizerInput{}
- }
- output = &DescribeEntityRecognizerOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeEntityRecognizer API operation for Amazon Comprehend.
- //
- // Provides details about an entity recognizer including status, S3 buckets
- // containing training data, recognizer metadata, metrics, and so on.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DescribeEntityRecognizer for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource ARN was not found. Check the ARN and try your request
- // again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer
- func (c *Comprehend) DescribeEntityRecognizer(input *DescribeEntityRecognizerInput) (*DescribeEntityRecognizerOutput, error) {
- req, out := c.DescribeEntityRecognizerRequest(input)
- return out, req.Send()
- }
- // DescribeEntityRecognizerWithContext is the same as DescribeEntityRecognizer with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeEntityRecognizer for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DescribeEntityRecognizerWithContext(ctx aws.Context, input *DescribeEntityRecognizerInput, opts ...request.Option) (*DescribeEntityRecognizerOutput, error) {
- req, out := c.DescribeEntityRecognizerRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeKeyPhrasesDetectionJob = "DescribeKeyPhrasesDetectionJob"
- // DescribeKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeKeyPhrasesDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeKeyPhrasesDetectionJob for more information on using the DescribeKeyPhrasesDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeKeyPhrasesDetectionJobRequest method.
- // req, resp := client.DescribeKeyPhrasesDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeKeyPhrasesDetectionJob
- func (c *Comprehend) DescribeKeyPhrasesDetectionJobRequest(input *DescribeKeyPhrasesDetectionJobInput) (req *request.Request, output *DescribeKeyPhrasesDetectionJobOutput) {
- op := &request.Operation{
- Name: opDescribeKeyPhrasesDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeKeyPhrasesDetectionJobInput{}
- }
- output = &DescribeKeyPhrasesDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeKeyPhrasesDetectionJob API operation for Amazon Comprehend.
- //
- // Gets the properties associated with a key phrases detection job. Use this
- // operation to get the status of a detection job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DescribeKeyPhrasesDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeKeyPhrasesDetectionJob
- func (c *Comprehend) DescribeKeyPhrasesDetectionJob(input *DescribeKeyPhrasesDetectionJobInput) (*DescribeKeyPhrasesDetectionJobOutput, error) {
- req, out := c.DescribeKeyPhrasesDetectionJobRequest(input)
- return out, req.Send()
- }
- // DescribeKeyPhrasesDetectionJobWithContext is the same as DescribeKeyPhrasesDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeKeyPhrasesDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DescribeKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *DescribeKeyPhrasesDetectionJobInput, opts ...request.Option) (*DescribeKeyPhrasesDetectionJobOutput, error) {
- req, out := c.DescribeKeyPhrasesDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeSentimentDetectionJob = "DescribeSentimentDetectionJob"
- // DescribeSentimentDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeSentimentDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeSentimentDetectionJob for more information on using the DescribeSentimentDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeSentimentDetectionJobRequest method.
- // req, resp := client.DescribeSentimentDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeSentimentDetectionJob
- func (c *Comprehend) DescribeSentimentDetectionJobRequest(input *DescribeSentimentDetectionJobInput) (req *request.Request, output *DescribeSentimentDetectionJobOutput) {
- op := &request.Operation{
- Name: opDescribeSentimentDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeSentimentDetectionJobInput{}
- }
- output = &DescribeSentimentDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeSentimentDetectionJob API operation for Amazon Comprehend.
- //
- // Gets the properties associated with a sentiment detection job. Use this operation
- // to get the status of a detection job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DescribeSentimentDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeSentimentDetectionJob
- func (c *Comprehend) DescribeSentimentDetectionJob(input *DescribeSentimentDetectionJobInput) (*DescribeSentimentDetectionJobOutput, error) {
- req, out := c.DescribeSentimentDetectionJobRequest(input)
- return out, req.Send()
- }
- // DescribeSentimentDetectionJobWithContext is the same as DescribeSentimentDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeSentimentDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DescribeSentimentDetectionJobWithContext(ctx aws.Context, input *DescribeSentimentDetectionJobInput, opts ...request.Option) (*DescribeSentimentDetectionJobOutput, error) {
- req, out := c.DescribeSentimentDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeTopicsDetectionJob = "DescribeTopicsDetectionJob"
- // DescribeTopicsDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeTopicsDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeTopicsDetectionJob for more information on using the DescribeTopicsDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeTopicsDetectionJobRequest method.
- // req, resp := client.DescribeTopicsDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeTopicsDetectionJob
- func (c *Comprehend) DescribeTopicsDetectionJobRequest(input *DescribeTopicsDetectionJobInput) (req *request.Request, output *DescribeTopicsDetectionJobOutput) {
- op := &request.Operation{
- Name: opDescribeTopicsDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeTopicsDetectionJobInput{}
- }
- output = &DescribeTopicsDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeTopicsDetectionJob API operation for Amazon Comprehend.
- //
- // Gets the properties associated with a topic detection job. Use this operation
- // to get the status of a detection job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DescribeTopicsDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeTopicsDetectionJob
- func (c *Comprehend) DescribeTopicsDetectionJob(input *DescribeTopicsDetectionJobInput) (*DescribeTopicsDetectionJobOutput, error) {
- req, out := c.DescribeTopicsDetectionJobRequest(input)
- return out, req.Send()
- }
- // DescribeTopicsDetectionJobWithContext is the same as DescribeTopicsDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeTopicsDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DescribeTopicsDetectionJobWithContext(ctx aws.Context, input *DescribeTopicsDetectionJobInput, opts ...request.Option) (*DescribeTopicsDetectionJobOutput, error) {
- req, out := c.DescribeTopicsDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDetectDominantLanguage = "DetectDominantLanguage"
- // DetectDominantLanguageRequest generates a "aws/request.Request" representing the
- // client's request for the DetectDominantLanguage operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DetectDominantLanguage for more information on using the DetectDominantLanguage
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DetectDominantLanguageRequest method.
- // req, resp := client.DetectDominantLanguageRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectDominantLanguage
- func (c *Comprehend) DetectDominantLanguageRequest(input *DetectDominantLanguageInput) (req *request.Request, output *DetectDominantLanguageOutput) {
- op := &request.Operation{
- Name: opDetectDominantLanguage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DetectDominantLanguageInput{}
- }
- output = &DetectDominantLanguageOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DetectDominantLanguage API operation for Amazon Comprehend.
- //
- // Determines the dominant language of the input text. For a list of languages
- // that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages
- // (http://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DetectDominantLanguage for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectDominantLanguage
- func (c *Comprehend) DetectDominantLanguage(input *DetectDominantLanguageInput) (*DetectDominantLanguageOutput, error) {
- req, out := c.DetectDominantLanguageRequest(input)
- return out, req.Send()
- }
- // DetectDominantLanguageWithContext is the same as DetectDominantLanguage with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DetectDominantLanguage for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DetectDominantLanguageWithContext(ctx aws.Context, input *DetectDominantLanguageInput, opts ...request.Option) (*DetectDominantLanguageOutput, error) {
- req, out := c.DetectDominantLanguageRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDetectEntities = "DetectEntities"
- // DetectEntitiesRequest generates a "aws/request.Request" representing the
- // client's request for the DetectEntities operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DetectEntities for more information on using the DetectEntities
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DetectEntitiesRequest method.
- // req, resp := client.DetectEntitiesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectEntities
- func (c *Comprehend) DetectEntitiesRequest(input *DetectEntitiesInput) (req *request.Request, output *DetectEntitiesOutput) {
- op := &request.Operation{
- Name: opDetectEntities,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DetectEntitiesInput{}
- }
- output = &DetectEntitiesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DetectEntities API operation for Amazon Comprehend.
- //
- // Inspects text for named entities, and returns information about them. For
- // more information, about named entities, see how-entities.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DetectEntities for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectEntities
- func (c *Comprehend) DetectEntities(input *DetectEntitiesInput) (*DetectEntitiesOutput, error) {
- req, out := c.DetectEntitiesRequest(input)
- return out, req.Send()
- }
- // DetectEntitiesWithContext is the same as DetectEntities with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DetectEntities for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DetectEntitiesWithContext(ctx aws.Context, input *DetectEntitiesInput, opts ...request.Option) (*DetectEntitiesOutput, error) {
- req, out := c.DetectEntitiesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDetectKeyPhrases = "DetectKeyPhrases"
- // DetectKeyPhrasesRequest generates a "aws/request.Request" representing the
- // client's request for the DetectKeyPhrases operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DetectKeyPhrases for more information on using the DetectKeyPhrases
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DetectKeyPhrasesRequest method.
- // req, resp := client.DetectKeyPhrasesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectKeyPhrases
- func (c *Comprehend) DetectKeyPhrasesRequest(input *DetectKeyPhrasesInput) (req *request.Request, output *DetectKeyPhrasesOutput) {
- op := &request.Operation{
- Name: opDetectKeyPhrases,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DetectKeyPhrasesInput{}
- }
- output = &DetectKeyPhrasesOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DetectKeyPhrases API operation for Amazon Comprehend.
- //
- // Detects the key noun phrases found in the text.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DetectKeyPhrases for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectKeyPhrases
- func (c *Comprehend) DetectKeyPhrases(input *DetectKeyPhrasesInput) (*DetectKeyPhrasesOutput, error) {
- req, out := c.DetectKeyPhrasesRequest(input)
- return out, req.Send()
- }
- // DetectKeyPhrasesWithContext is the same as DetectKeyPhrases with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DetectKeyPhrases for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DetectKeyPhrasesWithContext(ctx aws.Context, input *DetectKeyPhrasesInput, opts ...request.Option) (*DetectKeyPhrasesOutput, error) {
- req, out := c.DetectKeyPhrasesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDetectSentiment = "DetectSentiment"
- // DetectSentimentRequest generates a "aws/request.Request" representing the
- // client's request for the DetectSentiment operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DetectSentiment for more information on using the DetectSentiment
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DetectSentimentRequest method.
- // req, resp := client.DetectSentimentRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSentiment
- func (c *Comprehend) DetectSentimentRequest(input *DetectSentimentInput) (req *request.Request, output *DetectSentimentOutput) {
- op := &request.Operation{
- Name: opDetectSentiment,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DetectSentimentInput{}
- }
- output = &DetectSentimentOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DetectSentiment API operation for Amazon Comprehend.
- //
- // Inspects text and returns an inference of the prevailing sentiment (POSITIVE,
- // NEUTRAL, MIXED, or NEGATIVE).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DetectSentiment for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSentiment
- func (c *Comprehend) DetectSentiment(input *DetectSentimentInput) (*DetectSentimentOutput, error) {
- req, out := c.DetectSentimentRequest(input)
- return out, req.Send()
- }
- // DetectSentimentWithContext is the same as DetectSentiment with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DetectSentiment for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DetectSentimentWithContext(ctx aws.Context, input *DetectSentimentInput, opts ...request.Option) (*DetectSentimentOutput, error) {
- req, out := c.DetectSentimentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDetectSyntax = "DetectSyntax"
- // DetectSyntaxRequest generates a "aws/request.Request" representing the
- // client's request for the DetectSyntax operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DetectSyntax for more information on using the DetectSyntax
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DetectSyntaxRequest method.
- // req, resp := client.DetectSyntaxRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSyntax
- func (c *Comprehend) DetectSyntaxRequest(input *DetectSyntaxInput) (req *request.Request, output *DetectSyntaxOutput) {
- op := &request.Operation{
- Name: opDetectSyntax,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DetectSyntaxInput{}
- }
- output = &DetectSyntaxOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DetectSyntax API operation for Amazon Comprehend.
- //
- // Inspects text for syntax and the part of speech of words in the document.
- // For more information, how-syntax.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation DetectSyntax for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException"
- // The size of the input text exceeds the limit. Use a smaller document.
- //
- // * ErrCodeUnsupportedLanguageException "UnsupportedLanguageException"
- // Amazon Comprehend can't process the language of the input text. For all custom
- // entity recognition APIs (such as CreateEntityRecognizer), only English is
- // accepted. For most other APIs, Amazon Comprehend accepts only English or
- // Spanish text.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSyntax
- func (c *Comprehend) DetectSyntax(input *DetectSyntaxInput) (*DetectSyntaxOutput, error) {
- req, out := c.DetectSyntaxRequest(input)
- return out, req.Send()
- }
- // DetectSyntaxWithContext is the same as DetectSyntax with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DetectSyntax for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) DetectSyntaxWithContext(ctx aws.Context, input *DetectSyntaxInput, opts ...request.Option) (*DetectSyntaxOutput, error) {
- req, out := c.DetectSyntaxRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListDocumentClassificationJobs = "ListDocumentClassificationJobs"
- // ListDocumentClassificationJobsRequest generates a "aws/request.Request" representing the
- // client's request for the ListDocumentClassificationJobs operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListDocumentClassificationJobs for more information on using the ListDocumentClassificationJobs
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListDocumentClassificationJobsRequest method.
- // req, resp := client.ListDocumentClassificationJobsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassificationJobs
- func (c *Comprehend) ListDocumentClassificationJobsRequest(input *ListDocumentClassificationJobsInput) (req *request.Request, output *ListDocumentClassificationJobsOutput) {
- op := &request.Operation{
- Name: opListDocumentClassificationJobs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListDocumentClassificationJobsInput{}
- }
- output = &ListDocumentClassificationJobsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListDocumentClassificationJobs API operation for Amazon Comprehend.
- //
- // Gets a list of the documentation classification jobs that you have submitted.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation ListDocumentClassificationJobs for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInvalidFilterException "InvalidFilterException"
- // The filter specified for the ListDocumentClassificationJobs operation is
- // invalid. Specify a different filter.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassificationJobs
- func (c *Comprehend) ListDocumentClassificationJobs(input *ListDocumentClassificationJobsInput) (*ListDocumentClassificationJobsOutput, error) {
- req, out := c.ListDocumentClassificationJobsRequest(input)
- return out, req.Send()
- }
- // ListDocumentClassificationJobsWithContext is the same as ListDocumentClassificationJobs with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListDocumentClassificationJobs for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListDocumentClassificationJobsWithContext(ctx aws.Context, input *ListDocumentClassificationJobsInput, opts ...request.Option) (*ListDocumentClassificationJobsOutput, error) {
- req, out := c.ListDocumentClassificationJobsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListDocumentClassifiers = "ListDocumentClassifiers"
- // ListDocumentClassifiersRequest generates a "aws/request.Request" representing the
- // client's request for the ListDocumentClassifiers operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListDocumentClassifiers for more information on using the ListDocumentClassifiers
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListDocumentClassifiersRequest method.
- // req, resp := client.ListDocumentClassifiersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers
- func (c *Comprehend) ListDocumentClassifiersRequest(input *ListDocumentClassifiersInput) (req *request.Request, output *ListDocumentClassifiersOutput) {
- op := &request.Operation{
- Name: opListDocumentClassifiers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListDocumentClassifiersInput{}
- }
- output = &ListDocumentClassifiersOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListDocumentClassifiers API operation for Amazon Comprehend.
- //
- // Gets a list of the document classifiers that you have created.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation ListDocumentClassifiers for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInvalidFilterException "InvalidFilterException"
- // The filter specified for the ListDocumentClassificationJobs operation is
- // invalid. Specify a different filter.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers
- func (c *Comprehend) ListDocumentClassifiers(input *ListDocumentClassifiersInput) (*ListDocumentClassifiersOutput, error) {
- req, out := c.ListDocumentClassifiersRequest(input)
- return out, req.Send()
- }
- // ListDocumentClassifiersWithContext is the same as ListDocumentClassifiers with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListDocumentClassifiers for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListDocumentClassifiersWithContext(ctx aws.Context, input *ListDocumentClassifiersInput, opts ...request.Option) (*ListDocumentClassifiersOutput, error) {
- req, out := c.ListDocumentClassifiersRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListDominantLanguageDetectionJobs = "ListDominantLanguageDetectionJobs"
- // ListDominantLanguageDetectionJobsRequest generates a "aws/request.Request" representing the
- // client's request for the ListDominantLanguageDetectionJobs operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListDominantLanguageDetectionJobs for more information on using the ListDominantLanguageDetectionJobs
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListDominantLanguageDetectionJobsRequest method.
- // req, resp := client.ListDominantLanguageDetectionJobsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDominantLanguageDetectionJobs
- func (c *Comprehend) ListDominantLanguageDetectionJobsRequest(input *ListDominantLanguageDetectionJobsInput) (req *request.Request, output *ListDominantLanguageDetectionJobsOutput) {
- op := &request.Operation{
- Name: opListDominantLanguageDetectionJobs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListDominantLanguageDetectionJobsInput{}
- }
- output = &ListDominantLanguageDetectionJobsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListDominantLanguageDetectionJobs API operation for Amazon Comprehend.
- //
- // Gets a list of the dominant language detection jobs that you have submitted.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation ListDominantLanguageDetectionJobs for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInvalidFilterException "InvalidFilterException"
- // The filter specified for the ListDocumentClassificationJobs operation is
- // invalid. Specify a different filter.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDominantLanguageDetectionJobs
- func (c *Comprehend) ListDominantLanguageDetectionJobs(input *ListDominantLanguageDetectionJobsInput) (*ListDominantLanguageDetectionJobsOutput, error) {
- req, out := c.ListDominantLanguageDetectionJobsRequest(input)
- return out, req.Send()
- }
- // ListDominantLanguageDetectionJobsWithContext is the same as ListDominantLanguageDetectionJobs with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListDominantLanguageDetectionJobs for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListDominantLanguageDetectionJobsWithContext(ctx aws.Context, input *ListDominantLanguageDetectionJobsInput, opts ...request.Option) (*ListDominantLanguageDetectionJobsOutput, error) {
- req, out := c.ListDominantLanguageDetectionJobsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListDominantLanguageDetectionJobsPages iterates over the pages of a ListDominantLanguageDetectionJobs operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListDominantLanguageDetectionJobs method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListDominantLanguageDetectionJobs operation.
- // pageNum := 0
- // err := client.ListDominantLanguageDetectionJobsPages(params,
- // func(page *ListDominantLanguageDetectionJobsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Comprehend) ListDominantLanguageDetectionJobsPages(input *ListDominantLanguageDetectionJobsInput, fn func(*ListDominantLanguageDetectionJobsOutput, bool) bool) error {
- return c.ListDominantLanguageDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListDominantLanguageDetectionJobsPagesWithContext same as ListDominantLanguageDetectionJobsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListDominantLanguageDetectionJobsPagesWithContext(ctx aws.Context, input *ListDominantLanguageDetectionJobsInput, fn func(*ListDominantLanguageDetectionJobsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListDominantLanguageDetectionJobsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListDominantLanguageDetectionJobsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListDominantLanguageDetectionJobsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListEntitiesDetectionJobs = "ListEntitiesDetectionJobs"
- // ListEntitiesDetectionJobsRequest generates a "aws/request.Request" representing the
- // client's request for the ListEntitiesDetectionJobs operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListEntitiesDetectionJobs for more information on using the ListEntitiesDetectionJobs
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListEntitiesDetectionJobsRequest method.
- // req, resp := client.ListEntitiesDetectionJobsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntitiesDetectionJobs
- func (c *Comprehend) ListEntitiesDetectionJobsRequest(input *ListEntitiesDetectionJobsInput) (req *request.Request, output *ListEntitiesDetectionJobsOutput) {
- op := &request.Operation{
- Name: opListEntitiesDetectionJobs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListEntitiesDetectionJobsInput{}
- }
- output = &ListEntitiesDetectionJobsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListEntitiesDetectionJobs API operation for Amazon Comprehend.
- //
- // Gets a list of the entity detection jobs that you have submitted.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation ListEntitiesDetectionJobs for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInvalidFilterException "InvalidFilterException"
- // The filter specified for the ListDocumentClassificationJobs operation is
- // invalid. Specify a different filter.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntitiesDetectionJobs
- func (c *Comprehend) ListEntitiesDetectionJobs(input *ListEntitiesDetectionJobsInput) (*ListEntitiesDetectionJobsOutput, error) {
- req, out := c.ListEntitiesDetectionJobsRequest(input)
- return out, req.Send()
- }
- // ListEntitiesDetectionJobsWithContext is the same as ListEntitiesDetectionJobs with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListEntitiesDetectionJobs for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListEntitiesDetectionJobsWithContext(ctx aws.Context, input *ListEntitiesDetectionJobsInput, opts ...request.Option) (*ListEntitiesDetectionJobsOutput, error) {
- req, out := c.ListEntitiesDetectionJobsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListEntitiesDetectionJobsPages iterates over the pages of a ListEntitiesDetectionJobs operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListEntitiesDetectionJobs method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListEntitiesDetectionJobs operation.
- // pageNum := 0
- // err := client.ListEntitiesDetectionJobsPages(params,
- // func(page *ListEntitiesDetectionJobsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Comprehend) ListEntitiesDetectionJobsPages(input *ListEntitiesDetectionJobsInput, fn func(*ListEntitiesDetectionJobsOutput, bool) bool) error {
- return c.ListEntitiesDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListEntitiesDetectionJobsPagesWithContext same as ListEntitiesDetectionJobsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListEntitiesDetectionJobsPagesWithContext(ctx aws.Context, input *ListEntitiesDetectionJobsInput, fn func(*ListEntitiesDetectionJobsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListEntitiesDetectionJobsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListEntitiesDetectionJobsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListEntitiesDetectionJobsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListEntityRecognizers = "ListEntityRecognizers"
- // ListEntityRecognizersRequest generates a "aws/request.Request" representing the
- // client's request for the ListEntityRecognizers operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListEntityRecognizers for more information on using the ListEntityRecognizers
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListEntityRecognizersRequest method.
- // req, resp := client.ListEntityRecognizersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers
- func (c *Comprehend) ListEntityRecognizersRequest(input *ListEntityRecognizersInput) (req *request.Request, output *ListEntityRecognizersOutput) {
- op := &request.Operation{
- Name: opListEntityRecognizers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListEntityRecognizersInput{}
- }
- output = &ListEntityRecognizersOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListEntityRecognizers API operation for Amazon Comprehend.
- //
- // Gets a list of the properties of all entity recognizers that you created,
- // including recognizers currently in training. Allows you to filter the list
- // of recognizers based on criteria such as status and submission time. This
- // call returns up to 500 entity recognizers in the list, with a default number
- // of 100 recognizers in the list.
- //
- // The results of this list are not in any particular order. Please get the
- // list and sort locally if needed.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation ListEntityRecognizers for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInvalidFilterException "InvalidFilterException"
- // The filter specified for the ListDocumentClassificationJobs operation is
- // invalid. Specify a different filter.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers
- func (c *Comprehend) ListEntityRecognizers(input *ListEntityRecognizersInput) (*ListEntityRecognizersOutput, error) {
- req, out := c.ListEntityRecognizersRequest(input)
- return out, req.Send()
- }
- // ListEntityRecognizersWithContext is the same as ListEntityRecognizers with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListEntityRecognizers for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListEntityRecognizersWithContext(ctx aws.Context, input *ListEntityRecognizersInput, opts ...request.Option) (*ListEntityRecognizersOutput, error) {
- req, out := c.ListEntityRecognizersRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListKeyPhrasesDetectionJobs = "ListKeyPhrasesDetectionJobs"
- // ListKeyPhrasesDetectionJobsRequest generates a "aws/request.Request" representing the
- // client's request for the ListKeyPhrasesDetectionJobs operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListKeyPhrasesDetectionJobs for more information on using the ListKeyPhrasesDetectionJobs
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListKeyPhrasesDetectionJobsRequest method.
- // req, resp := client.ListKeyPhrasesDetectionJobsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListKeyPhrasesDetectionJobs
- func (c *Comprehend) ListKeyPhrasesDetectionJobsRequest(input *ListKeyPhrasesDetectionJobsInput) (req *request.Request, output *ListKeyPhrasesDetectionJobsOutput) {
- op := &request.Operation{
- Name: opListKeyPhrasesDetectionJobs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListKeyPhrasesDetectionJobsInput{}
- }
- output = &ListKeyPhrasesDetectionJobsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListKeyPhrasesDetectionJobs API operation for Amazon Comprehend.
- //
- // Get a list of key phrase detection jobs that you have submitted.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation ListKeyPhrasesDetectionJobs for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInvalidFilterException "InvalidFilterException"
- // The filter specified for the ListDocumentClassificationJobs operation is
- // invalid. Specify a different filter.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListKeyPhrasesDetectionJobs
- func (c *Comprehend) ListKeyPhrasesDetectionJobs(input *ListKeyPhrasesDetectionJobsInput) (*ListKeyPhrasesDetectionJobsOutput, error) {
- req, out := c.ListKeyPhrasesDetectionJobsRequest(input)
- return out, req.Send()
- }
- // ListKeyPhrasesDetectionJobsWithContext is the same as ListKeyPhrasesDetectionJobs with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListKeyPhrasesDetectionJobs for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListKeyPhrasesDetectionJobsWithContext(ctx aws.Context, input *ListKeyPhrasesDetectionJobsInput, opts ...request.Option) (*ListKeyPhrasesDetectionJobsOutput, error) {
- req, out := c.ListKeyPhrasesDetectionJobsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListKeyPhrasesDetectionJobsPages iterates over the pages of a ListKeyPhrasesDetectionJobs operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListKeyPhrasesDetectionJobs method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListKeyPhrasesDetectionJobs operation.
- // pageNum := 0
- // err := client.ListKeyPhrasesDetectionJobsPages(params,
- // func(page *ListKeyPhrasesDetectionJobsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Comprehend) ListKeyPhrasesDetectionJobsPages(input *ListKeyPhrasesDetectionJobsInput, fn func(*ListKeyPhrasesDetectionJobsOutput, bool) bool) error {
- return c.ListKeyPhrasesDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListKeyPhrasesDetectionJobsPagesWithContext same as ListKeyPhrasesDetectionJobsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListKeyPhrasesDetectionJobsPagesWithContext(ctx aws.Context, input *ListKeyPhrasesDetectionJobsInput, fn func(*ListKeyPhrasesDetectionJobsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListKeyPhrasesDetectionJobsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListKeyPhrasesDetectionJobsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListKeyPhrasesDetectionJobsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListSentimentDetectionJobs = "ListSentimentDetectionJobs"
- // ListSentimentDetectionJobsRequest generates a "aws/request.Request" representing the
- // client's request for the ListSentimentDetectionJobs operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListSentimentDetectionJobs for more information on using the ListSentimentDetectionJobs
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListSentimentDetectionJobsRequest method.
- // req, resp := client.ListSentimentDetectionJobsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListSentimentDetectionJobs
- func (c *Comprehend) ListSentimentDetectionJobsRequest(input *ListSentimentDetectionJobsInput) (req *request.Request, output *ListSentimentDetectionJobsOutput) {
- op := &request.Operation{
- Name: opListSentimentDetectionJobs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListSentimentDetectionJobsInput{}
- }
- output = &ListSentimentDetectionJobsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListSentimentDetectionJobs API operation for Amazon Comprehend.
- //
- // Gets a list of sentiment detection jobs that you have submitted.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation ListSentimentDetectionJobs for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInvalidFilterException "InvalidFilterException"
- // The filter specified for the ListDocumentClassificationJobs operation is
- // invalid. Specify a different filter.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListSentimentDetectionJobs
- func (c *Comprehend) ListSentimentDetectionJobs(input *ListSentimentDetectionJobsInput) (*ListSentimentDetectionJobsOutput, error) {
- req, out := c.ListSentimentDetectionJobsRequest(input)
- return out, req.Send()
- }
- // ListSentimentDetectionJobsWithContext is the same as ListSentimentDetectionJobs with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListSentimentDetectionJobs for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListSentimentDetectionJobsWithContext(ctx aws.Context, input *ListSentimentDetectionJobsInput, opts ...request.Option) (*ListSentimentDetectionJobsOutput, error) {
- req, out := c.ListSentimentDetectionJobsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListSentimentDetectionJobsPages iterates over the pages of a ListSentimentDetectionJobs operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListSentimentDetectionJobs method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListSentimentDetectionJobs operation.
- // pageNum := 0
- // err := client.ListSentimentDetectionJobsPages(params,
- // func(page *ListSentimentDetectionJobsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Comprehend) ListSentimentDetectionJobsPages(input *ListSentimentDetectionJobsInput, fn func(*ListSentimentDetectionJobsOutput, bool) bool) error {
- return c.ListSentimentDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListSentimentDetectionJobsPagesWithContext same as ListSentimentDetectionJobsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListSentimentDetectionJobsPagesWithContext(ctx aws.Context, input *ListSentimentDetectionJobsInput, fn func(*ListSentimentDetectionJobsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListSentimentDetectionJobsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListSentimentDetectionJobsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListSentimentDetectionJobsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opListTopicsDetectionJobs = "ListTopicsDetectionJobs"
- // ListTopicsDetectionJobsRequest generates a "aws/request.Request" representing the
- // client's request for the ListTopicsDetectionJobs operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListTopicsDetectionJobs for more information on using the ListTopicsDetectionJobs
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListTopicsDetectionJobsRequest method.
- // req, resp := client.ListTopicsDetectionJobsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTopicsDetectionJobs
- func (c *Comprehend) ListTopicsDetectionJobsRequest(input *ListTopicsDetectionJobsInput) (req *request.Request, output *ListTopicsDetectionJobsOutput) {
- op := &request.Operation{
- Name: opListTopicsDetectionJobs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &ListTopicsDetectionJobsInput{}
- }
- output = &ListTopicsDetectionJobsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListTopicsDetectionJobs API operation for Amazon Comprehend.
- //
- // Gets a list of the topic detection jobs that you have submitted.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation ListTopicsDetectionJobs for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInvalidFilterException "InvalidFilterException"
- // The filter specified for the ListDocumentClassificationJobs operation is
- // invalid. Specify a different filter.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTopicsDetectionJobs
- func (c *Comprehend) ListTopicsDetectionJobs(input *ListTopicsDetectionJobsInput) (*ListTopicsDetectionJobsOutput, error) {
- req, out := c.ListTopicsDetectionJobsRequest(input)
- return out, req.Send()
- }
- // ListTopicsDetectionJobsWithContext is the same as ListTopicsDetectionJobs with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListTopicsDetectionJobs for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListTopicsDetectionJobsWithContext(ctx aws.Context, input *ListTopicsDetectionJobsInput, opts ...request.Option) (*ListTopicsDetectionJobsOutput, error) {
- req, out := c.ListTopicsDetectionJobsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // ListTopicsDetectionJobsPages iterates over the pages of a ListTopicsDetectionJobs operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See ListTopicsDetectionJobs method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a ListTopicsDetectionJobs operation.
- // pageNum := 0
- // err := client.ListTopicsDetectionJobsPages(params,
- // func(page *ListTopicsDetectionJobsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *Comprehend) ListTopicsDetectionJobsPages(input *ListTopicsDetectionJobsInput, fn func(*ListTopicsDetectionJobsOutput, bool) bool) error {
- return c.ListTopicsDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // ListTopicsDetectionJobsPagesWithContext same as ListTopicsDetectionJobsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) ListTopicsDetectionJobsPagesWithContext(ctx aws.Context, input *ListTopicsDetectionJobsInput, fn func(*ListTopicsDetectionJobsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListTopicsDetectionJobsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListTopicsDetectionJobsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*ListTopicsDetectionJobsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opStartDocumentClassificationJob = "StartDocumentClassificationJob"
- // StartDocumentClassificationJobRequest generates a "aws/request.Request" representing the
- // client's request for the StartDocumentClassificationJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartDocumentClassificationJob for more information on using the StartDocumentClassificationJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartDocumentClassificationJobRequest method.
- // req, resp := client.StartDocumentClassificationJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDocumentClassificationJob
- func (c *Comprehend) StartDocumentClassificationJobRequest(input *StartDocumentClassificationJobInput) (req *request.Request, output *StartDocumentClassificationJobOutput) {
- op := &request.Operation{
- Name: opStartDocumentClassificationJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StartDocumentClassificationJobInput{}
- }
- output = &StartDocumentClassificationJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartDocumentClassificationJob API operation for Amazon Comprehend.
- //
- // Starts an asynchronous document classification job. Use the operation to
- // track the progress of the job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StartDocumentClassificationJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource ARN was not found. Check the ARN and try your request
- // again.
- //
- // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
- // The specified resource is not available. Check to see if the resource is
- // in the TRAINED state and try your request again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDocumentClassificationJob
- func (c *Comprehend) StartDocumentClassificationJob(input *StartDocumentClassificationJobInput) (*StartDocumentClassificationJobOutput, error) {
- req, out := c.StartDocumentClassificationJobRequest(input)
- return out, req.Send()
- }
- // StartDocumentClassificationJobWithContext is the same as StartDocumentClassificationJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartDocumentClassificationJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StartDocumentClassificationJobWithContext(ctx aws.Context, input *StartDocumentClassificationJobInput, opts ...request.Option) (*StartDocumentClassificationJobOutput, error) {
- req, out := c.StartDocumentClassificationJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartDominantLanguageDetectionJob = "StartDominantLanguageDetectionJob"
- // StartDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StartDominantLanguageDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartDominantLanguageDetectionJob for more information on using the StartDominantLanguageDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartDominantLanguageDetectionJobRequest method.
- // req, resp := client.StartDominantLanguageDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDominantLanguageDetectionJob
- func (c *Comprehend) StartDominantLanguageDetectionJobRequest(input *StartDominantLanguageDetectionJobInput) (req *request.Request, output *StartDominantLanguageDetectionJobOutput) {
- op := &request.Operation{
- Name: opStartDominantLanguageDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StartDominantLanguageDetectionJobInput{}
- }
- output = &StartDominantLanguageDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartDominantLanguageDetectionJob API operation for Amazon Comprehend.
- //
- // Starts an asynchronous dominant language detection job for a collection of
- // documents. Use the operation to track the status of a job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StartDominantLanguageDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDominantLanguageDetectionJob
- func (c *Comprehend) StartDominantLanguageDetectionJob(input *StartDominantLanguageDetectionJobInput) (*StartDominantLanguageDetectionJobOutput, error) {
- req, out := c.StartDominantLanguageDetectionJobRequest(input)
- return out, req.Send()
- }
- // StartDominantLanguageDetectionJobWithContext is the same as StartDominantLanguageDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartDominantLanguageDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StartDominantLanguageDetectionJobWithContext(ctx aws.Context, input *StartDominantLanguageDetectionJobInput, opts ...request.Option) (*StartDominantLanguageDetectionJobOutput, error) {
- req, out := c.StartDominantLanguageDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartEntitiesDetectionJob = "StartEntitiesDetectionJob"
- // StartEntitiesDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StartEntitiesDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartEntitiesDetectionJob for more information on using the StartEntitiesDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartEntitiesDetectionJobRequest method.
- // req, resp := client.StartEntitiesDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartEntitiesDetectionJob
- func (c *Comprehend) StartEntitiesDetectionJobRequest(input *StartEntitiesDetectionJobInput) (req *request.Request, output *StartEntitiesDetectionJobOutput) {
- op := &request.Operation{
- Name: opStartEntitiesDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StartEntitiesDetectionJobInput{}
- }
- output = &StartEntitiesDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartEntitiesDetectionJob API operation for Amazon Comprehend.
- //
- // Starts an asynchronous entity detection job for a collection of documents.
- // Use the operation to track the status of a job.
- //
- // This API can be used for either standard entity detection or custom entity
- // recognition. In order to be used for custom entity recognition, the optional
- // EntityRecognizerArn must be used in order to provide access to the recognizer
- // being used to detect the custom entity.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StartEntitiesDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource ARN was not found. Check the ARN and try your request
- // again.
- //
- // * ErrCodeResourceUnavailableException "ResourceUnavailableException"
- // The specified resource is not available. Check to see if the resource is
- // in the TRAINED state and try your request again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartEntitiesDetectionJob
- func (c *Comprehend) StartEntitiesDetectionJob(input *StartEntitiesDetectionJobInput) (*StartEntitiesDetectionJobOutput, error) {
- req, out := c.StartEntitiesDetectionJobRequest(input)
- return out, req.Send()
- }
- // StartEntitiesDetectionJobWithContext is the same as StartEntitiesDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartEntitiesDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StartEntitiesDetectionJobWithContext(ctx aws.Context, input *StartEntitiesDetectionJobInput, opts ...request.Option) (*StartEntitiesDetectionJobOutput, error) {
- req, out := c.StartEntitiesDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartKeyPhrasesDetectionJob = "StartKeyPhrasesDetectionJob"
- // StartKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StartKeyPhrasesDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartKeyPhrasesDetectionJob for more information on using the StartKeyPhrasesDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartKeyPhrasesDetectionJobRequest method.
- // req, resp := client.StartKeyPhrasesDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartKeyPhrasesDetectionJob
- func (c *Comprehend) StartKeyPhrasesDetectionJobRequest(input *StartKeyPhrasesDetectionJobInput) (req *request.Request, output *StartKeyPhrasesDetectionJobOutput) {
- op := &request.Operation{
- Name: opStartKeyPhrasesDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StartKeyPhrasesDetectionJobInput{}
- }
- output = &StartKeyPhrasesDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartKeyPhrasesDetectionJob API operation for Amazon Comprehend.
- //
- // Starts an asynchronous key phrase detection job for a collection of documents.
- // Use the operation to track the status of a job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StartKeyPhrasesDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartKeyPhrasesDetectionJob
- func (c *Comprehend) StartKeyPhrasesDetectionJob(input *StartKeyPhrasesDetectionJobInput) (*StartKeyPhrasesDetectionJobOutput, error) {
- req, out := c.StartKeyPhrasesDetectionJobRequest(input)
- return out, req.Send()
- }
- // StartKeyPhrasesDetectionJobWithContext is the same as StartKeyPhrasesDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartKeyPhrasesDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StartKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *StartKeyPhrasesDetectionJobInput, opts ...request.Option) (*StartKeyPhrasesDetectionJobOutput, error) {
- req, out := c.StartKeyPhrasesDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartSentimentDetectionJob = "StartSentimentDetectionJob"
- // StartSentimentDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StartSentimentDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartSentimentDetectionJob for more information on using the StartSentimentDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartSentimentDetectionJobRequest method.
- // req, resp := client.StartSentimentDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartSentimentDetectionJob
- func (c *Comprehend) StartSentimentDetectionJobRequest(input *StartSentimentDetectionJobInput) (req *request.Request, output *StartSentimentDetectionJobOutput) {
- op := &request.Operation{
- Name: opStartSentimentDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StartSentimentDetectionJobInput{}
- }
- output = &StartSentimentDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartSentimentDetectionJob API operation for Amazon Comprehend.
- //
- // Starts an asynchronous sentiment detection job for a collection of documents.
- // use the operation to track the status of a job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StartSentimentDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartSentimentDetectionJob
- func (c *Comprehend) StartSentimentDetectionJob(input *StartSentimentDetectionJobInput) (*StartSentimentDetectionJobOutput, error) {
- req, out := c.StartSentimentDetectionJobRequest(input)
- return out, req.Send()
- }
- // StartSentimentDetectionJobWithContext is the same as StartSentimentDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartSentimentDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StartSentimentDetectionJobWithContext(ctx aws.Context, input *StartSentimentDetectionJobInput, opts ...request.Option) (*StartSentimentDetectionJobOutput, error) {
- req, out := c.StartSentimentDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartTopicsDetectionJob = "StartTopicsDetectionJob"
- // StartTopicsDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StartTopicsDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartTopicsDetectionJob for more information on using the StartTopicsDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartTopicsDetectionJobRequest method.
- // req, resp := client.StartTopicsDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJob
- func (c *Comprehend) StartTopicsDetectionJobRequest(input *StartTopicsDetectionJobInput) (req *request.Request, output *StartTopicsDetectionJobOutput) {
- op := &request.Operation{
- Name: opStartTopicsDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StartTopicsDetectionJobInput{}
- }
- output = &StartTopicsDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StartTopicsDetectionJob API operation for Amazon Comprehend.
- //
- // Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob
- // operation to track the status of a job.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StartTopicsDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJob
- func (c *Comprehend) StartTopicsDetectionJob(input *StartTopicsDetectionJobInput) (*StartTopicsDetectionJobOutput, error) {
- req, out := c.StartTopicsDetectionJobRequest(input)
- return out, req.Send()
- }
- // StartTopicsDetectionJobWithContext is the same as StartTopicsDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartTopicsDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StartTopicsDetectionJobWithContext(ctx aws.Context, input *StartTopicsDetectionJobInput, opts ...request.Option) (*StartTopicsDetectionJobOutput, error) {
- req, out := c.StartTopicsDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopDominantLanguageDetectionJob = "StopDominantLanguageDetectionJob"
- // StopDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StopDominantLanguageDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopDominantLanguageDetectionJob for more information on using the StopDominantLanguageDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopDominantLanguageDetectionJobRequest method.
- // req, resp := client.StopDominantLanguageDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopDominantLanguageDetectionJob
- func (c *Comprehend) StopDominantLanguageDetectionJobRequest(input *StopDominantLanguageDetectionJobInput) (req *request.Request, output *StopDominantLanguageDetectionJobOutput) {
- op := &request.Operation{
- Name: opStopDominantLanguageDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StopDominantLanguageDetectionJobInput{}
- }
- output = &StopDominantLanguageDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StopDominantLanguageDetectionJob API operation for Amazon Comprehend.
- //
- // Stops a dominant language detection job in progress.
- //
- // If the job state is IN_PROGRESS the job is marked for termination and put
- // into the STOP_REQUESTED state. If the job completes before it can be stopped,
- // it is put into the COMPLETED state; otherwise the job is stopped and put
- // into the STOPPED state.
- //
- // If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob
- // operation, the operation returns a 400 Internal Request Exception.
- //
- // When a job is stopped, any documents already processed are written to the
- // output location.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StopDominantLanguageDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopDominantLanguageDetectionJob
- func (c *Comprehend) StopDominantLanguageDetectionJob(input *StopDominantLanguageDetectionJobInput) (*StopDominantLanguageDetectionJobOutput, error) {
- req, out := c.StopDominantLanguageDetectionJobRequest(input)
- return out, req.Send()
- }
- // StopDominantLanguageDetectionJobWithContext is the same as StopDominantLanguageDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopDominantLanguageDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StopDominantLanguageDetectionJobWithContext(ctx aws.Context, input *StopDominantLanguageDetectionJobInput, opts ...request.Option) (*StopDominantLanguageDetectionJobOutput, error) {
- req, out := c.StopDominantLanguageDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopEntitiesDetectionJob = "StopEntitiesDetectionJob"
- // StopEntitiesDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StopEntitiesDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopEntitiesDetectionJob for more information on using the StopEntitiesDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopEntitiesDetectionJobRequest method.
- // req, resp := client.StopEntitiesDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopEntitiesDetectionJob
- func (c *Comprehend) StopEntitiesDetectionJobRequest(input *StopEntitiesDetectionJobInput) (req *request.Request, output *StopEntitiesDetectionJobOutput) {
- op := &request.Operation{
- Name: opStopEntitiesDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StopEntitiesDetectionJobInput{}
- }
- output = &StopEntitiesDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StopEntitiesDetectionJob API operation for Amazon Comprehend.
- //
- // Stops an entities detection job in progress.
- //
- // If the job state is IN_PROGRESS the job is marked for termination and put
- // into the STOP_REQUESTED state. If the job completes before it can be stopped,
- // it is put into the COMPLETED state; otherwise the job is stopped and put
- // into the STOPPED state.
- //
- // If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob
- // operation, the operation returns a 400 Internal Request Exception.
- //
- // When a job is stopped, any documents already processed are written to the
- // output location.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StopEntitiesDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopEntitiesDetectionJob
- func (c *Comprehend) StopEntitiesDetectionJob(input *StopEntitiesDetectionJobInput) (*StopEntitiesDetectionJobOutput, error) {
- req, out := c.StopEntitiesDetectionJobRequest(input)
- return out, req.Send()
- }
- // StopEntitiesDetectionJobWithContext is the same as StopEntitiesDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopEntitiesDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StopEntitiesDetectionJobWithContext(ctx aws.Context, input *StopEntitiesDetectionJobInput, opts ...request.Option) (*StopEntitiesDetectionJobOutput, error) {
- req, out := c.StopEntitiesDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopKeyPhrasesDetectionJob = "StopKeyPhrasesDetectionJob"
- // StopKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StopKeyPhrasesDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopKeyPhrasesDetectionJob for more information on using the StopKeyPhrasesDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopKeyPhrasesDetectionJobRequest method.
- // req, resp := client.StopKeyPhrasesDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopKeyPhrasesDetectionJob
- func (c *Comprehend) StopKeyPhrasesDetectionJobRequest(input *StopKeyPhrasesDetectionJobInput) (req *request.Request, output *StopKeyPhrasesDetectionJobOutput) {
- op := &request.Operation{
- Name: opStopKeyPhrasesDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StopKeyPhrasesDetectionJobInput{}
- }
- output = &StopKeyPhrasesDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StopKeyPhrasesDetectionJob API operation for Amazon Comprehend.
- //
- // Stops a key phrases detection job in progress.
- //
- // If the job state is IN_PROGRESS the job is marked for termination and put
- // into the STOP_REQUESTED state. If the job completes before it can be stopped,
- // it is put into the COMPLETED state; otherwise the job is stopped and put
- // into the STOPPED state.
- //
- // If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob
- // operation, the operation returns a 400 Internal Request Exception.
- //
- // When a job is stopped, any documents already processed are written to the
- // output location.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StopKeyPhrasesDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopKeyPhrasesDetectionJob
- func (c *Comprehend) StopKeyPhrasesDetectionJob(input *StopKeyPhrasesDetectionJobInput) (*StopKeyPhrasesDetectionJobOutput, error) {
- req, out := c.StopKeyPhrasesDetectionJobRequest(input)
- return out, req.Send()
- }
- // StopKeyPhrasesDetectionJobWithContext is the same as StopKeyPhrasesDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopKeyPhrasesDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StopKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *StopKeyPhrasesDetectionJobInput, opts ...request.Option) (*StopKeyPhrasesDetectionJobOutput, error) {
- req, out := c.StopKeyPhrasesDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopSentimentDetectionJob = "StopSentimentDetectionJob"
- // StopSentimentDetectionJobRequest generates a "aws/request.Request" representing the
- // client's request for the StopSentimentDetectionJob operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopSentimentDetectionJob for more information on using the StopSentimentDetectionJob
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopSentimentDetectionJobRequest method.
- // req, resp := client.StopSentimentDetectionJobRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopSentimentDetectionJob
- func (c *Comprehend) StopSentimentDetectionJobRequest(input *StopSentimentDetectionJobInput) (req *request.Request, output *StopSentimentDetectionJobOutput) {
- op := &request.Operation{
- Name: opStopSentimentDetectionJob,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StopSentimentDetectionJobInput{}
- }
- output = &StopSentimentDetectionJobOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // StopSentimentDetectionJob API operation for Amazon Comprehend.
- //
- // Stops a sentiment detection job in progress.
- //
- // If the job state is IN_PROGRESS the job is marked for termination and put
- // into the STOP_REQUESTED state. If the job completes before it can be stopped,
- // it is put into the COMPLETED state; otherwise the job is be stopped and put
- // into the STOPPED state.
- //
- // If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob
- // operation, the operation returns a 400 Internal Request Exception.
- //
- // When a job is stopped, any documents already processed are written to the
- // output location.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StopSentimentDetectionJob for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeJobNotFoundException "JobNotFoundException"
- // The specified job was not found. Check the job ID and try again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopSentimentDetectionJob
- func (c *Comprehend) StopSentimentDetectionJob(input *StopSentimentDetectionJobInput) (*StopSentimentDetectionJobOutput, error) {
- req, out := c.StopSentimentDetectionJobRequest(input)
- return out, req.Send()
- }
- // StopSentimentDetectionJobWithContext is the same as StopSentimentDetectionJob with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopSentimentDetectionJob for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StopSentimentDetectionJobWithContext(ctx aws.Context, input *StopSentimentDetectionJobInput, opts ...request.Option) (*StopSentimentDetectionJobOutput, error) {
- req, out := c.StopSentimentDetectionJobRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopTrainingDocumentClassifier = "StopTrainingDocumentClassifier"
- // StopTrainingDocumentClassifierRequest generates a "aws/request.Request" representing the
- // client's request for the StopTrainingDocumentClassifier operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopTrainingDocumentClassifier for more information on using the StopTrainingDocumentClassifier
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopTrainingDocumentClassifierRequest method.
- // req, resp := client.StopTrainingDocumentClassifierRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingDocumentClassifier
- func (c *Comprehend) StopTrainingDocumentClassifierRequest(input *StopTrainingDocumentClassifierInput) (req *request.Request, output *StopTrainingDocumentClassifierOutput) {
- op := &request.Operation{
- Name: opStopTrainingDocumentClassifier,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StopTrainingDocumentClassifierInput{}
- }
- output = &StopTrainingDocumentClassifierOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // StopTrainingDocumentClassifier API operation for Amazon Comprehend.
- //
- // Stops a document classifier training job while in progress.
- //
- // If the training job state is TRAINING, the job is marked for termination
- // and put into the STOP_REQUESTED state. If the training job completes before
- // it can be stopped, it is put into the TRAINED; otherwise the training job
- // is stopped and put into the STOPPED state and the service sends back an HTTP
- // 200 response with an empty HTTP body.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StopTrainingDocumentClassifier for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource ARN was not found. Check the ARN and try your request
- // again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingDocumentClassifier
- func (c *Comprehend) StopTrainingDocumentClassifier(input *StopTrainingDocumentClassifierInput) (*StopTrainingDocumentClassifierOutput, error) {
- req, out := c.StopTrainingDocumentClassifierRequest(input)
- return out, req.Send()
- }
- // StopTrainingDocumentClassifierWithContext is the same as StopTrainingDocumentClassifier with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopTrainingDocumentClassifier for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StopTrainingDocumentClassifierWithContext(ctx aws.Context, input *StopTrainingDocumentClassifierInput, opts ...request.Option) (*StopTrainingDocumentClassifierOutput, error) {
- req, out := c.StopTrainingDocumentClassifierRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopTrainingEntityRecognizer = "StopTrainingEntityRecognizer"
- // StopTrainingEntityRecognizerRequest generates a "aws/request.Request" representing the
- // client's request for the StopTrainingEntityRecognizer operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopTrainingEntityRecognizer for more information on using the StopTrainingEntityRecognizer
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopTrainingEntityRecognizerRequest method.
- // req, resp := client.StopTrainingEntityRecognizerRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingEntityRecognizer
- func (c *Comprehend) StopTrainingEntityRecognizerRequest(input *StopTrainingEntityRecognizerInput) (req *request.Request, output *StopTrainingEntityRecognizerOutput) {
- op := &request.Operation{
- Name: opStopTrainingEntityRecognizer,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StopTrainingEntityRecognizerInput{}
- }
- output = &StopTrainingEntityRecognizerOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // StopTrainingEntityRecognizer API operation for Amazon Comprehend.
- //
- // Stops an entity recognizer training job while in progress.
- //
- // If the training job state is TRAINING, the job is marked for termination
- // and put into the STOP_REQUESTED state. If the training job completes before
- // it can be stopped, it is put into the TRAINED; otherwise the training job
- // is stopped and putted into the STOPPED state and the service sends back an
- // HTTP 200 response with an empty HTTP body.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for Amazon Comprehend's
- // API operation StopTrainingEntityRecognizer for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidRequestException "InvalidRequestException"
- // The request is invalid.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // The number of requests exceeds the limit. Resubmit your request later.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The specified resource ARN was not found. Check the ARN and try your request
- // again.
- //
- // * ErrCodeInternalServerException "InternalServerException"
- // An internal server error occurred. Retry your request.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingEntityRecognizer
- func (c *Comprehend) StopTrainingEntityRecognizer(input *StopTrainingEntityRecognizerInput) (*StopTrainingEntityRecognizerOutput, error) {
- req, out := c.StopTrainingEntityRecognizerRequest(input)
- return out, req.Send()
- }
- // StopTrainingEntityRecognizerWithContext is the same as StopTrainingEntityRecognizer with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopTrainingEntityRecognizer for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *Comprehend) StopTrainingEntityRecognizerWithContext(ctx aws.Context, input *StopTrainingEntityRecognizerInput, opts ...request.Option) (*StopTrainingEntityRecognizerOutput, error) {
- req, out := c.StopTrainingEntityRecognizerRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- type BatchDetectDominantLanguageInput struct {
- _ struct{} `type:"structure"`
- // A list containing the text of the input documents. The list can contain a
- // maximum of 25 documents. Each document should contain at least 20 characters
- // and must contain fewer than 5,000 bytes of UTF-8 encoded characters.
- //
- // TextList is a required field
- TextList []*string `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectDominantLanguageInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectDominantLanguageInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *BatchDetectDominantLanguageInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BatchDetectDominantLanguageInput"}
- if s.TextList == nil {
- invalidParams.Add(request.NewErrParamRequired("TextList"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetTextList sets the TextList field's value.
- func (s *BatchDetectDominantLanguageInput) SetTextList(v []*string) *BatchDetectDominantLanguageInput {
- s.TextList = v
- return s
- }
- // The result of calling the operation. The operation returns one object for
- // each document that is successfully processed by the operation.
- type BatchDetectDominantLanguageItemResult struct {
- _ struct{} `type:"structure"`
- // The zero-based index of the document in the input list.
- Index *int64 `type:"integer"`
- // One or more DominantLanguage objects describing the dominant languages in
- // the document.
- Languages []*DominantLanguage `type:"list"`
- }
- // String returns the string representation
- func (s BatchDetectDominantLanguageItemResult) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectDominantLanguageItemResult) GoString() string {
- return s.String()
- }
- // SetIndex sets the Index field's value.
- func (s *BatchDetectDominantLanguageItemResult) SetIndex(v int64) *BatchDetectDominantLanguageItemResult {
- s.Index = &v
- return s
- }
- // SetLanguages sets the Languages field's value.
- func (s *BatchDetectDominantLanguageItemResult) SetLanguages(v []*DominantLanguage) *BatchDetectDominantLanguageItemResult {
- s.Languages = v
- return s
- }
- type BatchDetectDominantLanguageOutput struct {
- _ struct{} `type:"structure"`
- // A list containing one object for each document that contained an error. The
- // results are sorted in ascending order by the Index field and match the order
- // of the documents in the input list. If there are no errors in the batch,
- // the ErrorList is empty.
- //
- // ErrorList is a required field
- ErrorList []*BatchItemError `type:"list" required:"true"`
- // A list of objects containing the results of the operation. The results are
- // sorted in ascending order by the Index field and match the order of the documents
- // in the input list. If all of the documents contain an error, the ResultList
- // is empty.
- //
- // ResultList is a required field
- ResultList []*BatchDetectDominantLanguageItemResult `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectDominantLanguageOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectDominantLanguageOutput) GoString() string {
- return s.String()
- }
- // SetErrorList sets the ErrorList field's value.
- func (s *BatchDetectDominantLanguageOutput) SetErrorList(v []*BatchItemError) *BatchDetectDominantLanguageOutput {
- s.ErrorList = v
- return s
- }
- // SetResultList sets the ResultList field's value.
- func (s *BatchDetectDominantLanguageOutput) SetResultList(v []*BatchDetectDominantLanguageItemResult) *BatchDetectDominantLanguageOutput {
- s.ResultList = v
- return s
- }
- type BatchDetectEntitiesInput struct {
- _ struct{} `type:"structure"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // A list containing the text of the input documents. The list can contain a
- // maximum of 25 documents. Each document must contain fewer than 5,000 bytes
- // of UTF-8 encoded characters.
- //
- // TextList is a required field
- TextList []*string `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectEntitiesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectEntitiesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *BatchDetectEntitiesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BatchDetectEntitiesInput"}
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.TextList == nil {
- invalidParams.Add(request.NewErrParamRequired("TextList"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *BatchDetectEntitiesInput) SetLanguageCode(v string) *BatchDetectEntitiesInput {
- s.LanguageCode = &v
- return s
- }
- // SetTextList sets the TextList field's value.
- func (s *BatchDetectEntitiesInput) SetTextList(v []*string) *BatchDetectEntitiesInput {
- s.TextList = v
- return s
- }
- // The result of calling the operation. The operation returns one object for
- // each document that is successfully processed by the operation.
- type BatchDetectEntitiesItemResult struct {
- _ struct{} `type:"structure"`
- // One or more Entity objects, one for each entity detected in the document.
- Entities []*Entity `type:"list"`
- // The zero-based index of the document in the input list.
- Index *int64 `type:"integer"`
- }
- // String returns the string representation
- func (s BatchDetectEntitiesItemResult) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectEntitiesItemResult) GoString() string {
- return s.String()
- }
- // SetEntities sets the Entities field's value.
- func (s *BatchDetectEntitiesItemResult) SetEntities(v []*Entity) *BatchDetectEntitiesItemResult {
- s.Entities = v
- return s
- }
- // SetIndex sets the Index field's value.
- func (s *BatchDetectEntitiesItemResult) SetIndex(v int64) *BatchDetectEntitiesItemResult {
- s.Index = &v
- return s
- }
- type BatchDetectEntitiesOutput struct {
- _ struct{} `type:"structure"`
- // A list containing one object for each document that contained an error. The
- // results are sorted in ascending order by the Index field and match the order
- // of the documents in the input list. If there are no errors in the batch,
- // the ErrorList is empty.
- //
- // ErrorList is a required field
- ErrorList []*BatchItemError `type:"list" required:"true"`
- // A list of objects containing the results of the operation. The results are
- // sorted in ascending order by the Index field and match the order of the documents
- // in the input list. If all of the documents contain an error, the ResultList
- // is empty.
- //
- // ResultList is a required field
- ResultList []*BatchDetectEntitiesItemResult `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectEntitiesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectEntitiesOutput) GoString() string {
- return s.String()
- }
- // SetErrorList sets the ErrorList field's value.
- func (s *BatchDetectEntitiesOutput) SetErrorList(v []*BatchItemError) *BatchDetectEntitiesOutput {
- s.ErrorList = v
- return s
- }
- // SetResultList sets the ResultList field's value.
- func (s *BatchDetectEntitiesOutput) SetResultList(v []*BatchDetectEntitiesItemResult) *BatchDetectEntitiesOutput {
- s.ResultList = v
- return s
- }
- type BatchDetectKeyPhrasesInput struct {
- _ struct{} `type:"structure"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // A list containing the text of the input documents. The list can contain a
- // maximum of 25 documents. Each document must contain fewer that 5,000 bytes
- // of UTF-8 encoded characters.
- //
- // TextList is a required field
- TextList []*string `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectKeyPhrasesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectKeyPhrasesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *BatchDetectKeyPhrasesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BatchDetectKeyPhrasesInput"}
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.TextList == nil {
- invalidParams.Add(request.NewErrParamRequired("TextList"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *BatchDetectKeyPhrasesInput) SetLanguageCode(v string) *BatchDetectKeyPhrasesInput {
- s.LanguageCode = &v
- return s
- }
- // SetTextList sets the TextList field's value.
- func (s *BatchDetectKeyPhrasesInput) SetTextList(v []*string) *BatchDetectKeyPhrasesInput {
- s.TextList = v
- return s
- }
- // The result of calling the operation. The operation returns one object for
- // each document that is successfully processed by the operation.
- type BatchDetectKeyPhrasesItemResult struct {
- _ struct{} `type:"structure"`
- // The zero-based index of the document in the input list.
- Index *int64 `type:"integer"`
- // One or more KeyPhrase objects, one for each key phrase detected in the document.
- KeyPhrases []*KeyPhrase `type:"list"`
- }
- // String returns the string representation
- func (s BatchDetectKeyPhrasesItemResult) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectKeyPhrasesItemResult) GoString() string {
- return s.String()
- }
- // SetIndex sets the Index field's value.
- func (s *BatchDetectKeyPhrasesItemResult) SetIndex(v int64) *BatchDetectKeyPhrasesItemResult {
- s.Index = &v
- return s
- }
- // SetKeyPhrases sets the KeyPhrases field's value.
- func (s *BatchDetectKeyPhrasesItemResult) SetKeyPhrases(v []*KeyPhrase) *BatchDetectKeyPhrasesItemResult {
- s.KeyPhrases = v
- return s
- }
- type BatchDetectKeyPhrasesOutput struct {
- _ struct{} `type:"structure"`
- // A list containing one object for each document that contained an error. The
- // results are sorted in ascending order by the Index field and match the order
- // of the documents in the input list. If there are no errors in the batch,
- // the ErrorList is empty.
- //
- // ErrorList is a required field
- ErrorList []*BatchItemError `type:"list" required:"true"`
- // A list of objects containing the results of the operation. The results are
- // sorted in ascending order by the Index field and match the order of the documents
- // in the input list. If all of the documents contain an error, the ResultList
- // is empty.
- //
- // ResultList is a required field
- ResultList []*BatchDetectKeyPhrasesItemResult `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectKeyPhrasesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectKeyPhrasesOutput) GoString() string {
- return s.String()
- }
- // SetErrorList sets the ErrorList field's value.
- func (s *BatchDetectKeyPhrasesOutput) SetErrorList(v []*BatchItemError) *BatchDetectKeyPhrasesOutput {
- s.ErrorList = v
- return s
- }
- // SetResultList sets the ResultList field's value.
- func (s *BatchDetectKeyPhrasesOutput) SetResultList(v []*BatchDetectKeyPhrasesItemResult) *BatchDetectKeyPhrasesOutput {
- s.ResultList = v
- return s
- }
- type BatchDetectSentimentInput struct {
- _ struct{} `type:"structure"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // A list containing the text of the input documents. The list can contain a
- // maximum of 25 documents. Each document must contain fewer that 5,000 bytes
- // of UTF-8 encoded characters.
- //
- // TextList is a required field
- TextList []*string `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectSentimentInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectSentimentInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *BatchDetectSentimentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BatchDetectSentimentInput"}
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.TextList == nil {
- invalidParams.Add(request.NewErrParamRequired("TextList"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *BatchDetectSentimentInput) SetLanguageCode(v string) *BatchDetectSentimentInput {
- s.LanguageCode = &v
- return s
- }
- // SetTextList sets the TextList field's value.
- func (s *BatchDetectSentimentInput) SetTextList(v []*string) *BatchDetectSentimentInput {
- s.TextList = v
- return s
- }
- // The result of calling the operation. The operation returns one object for
- // each document that is successfully processed by the operation.
- type BatchDetectSentimentItemResult struct {
- _ struct{} `type:"structure"`
- // The zero-based index of the document in the input list.
- Index *int64 `type:"integer"`
- // The sentiment detected in the document.
- Sentiment *string `type:"string" enum:"SentimentType"`
- // The level of confidence that Amazon Comprehend has in the accuracy of its
- // sentiment detection.
- SentimentScore *SentimentScore `type:"structure"`
- }
- // String returns the string representation
- func (s BatchDetectSentimentItemResult) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectSentimentItemResult) GoString() string {
- return s.String()
- }
- // SetIndex sets the Index field's value.
- func (s *BatchDetectSentimentItemResult) SetIndex(v int64) *BatchDetectSentimentItemResult {
- s.Index = &v
- return s
- }
- // SetSentiment sets the Sentiment field's value.
- func (s *BatchDetectSentimentItemResult) SetSentiment(v string) *BatchDetectSentimentItemResult {
- s.Sentiment = &v
- return s
- }
- // SetSentimentScore sets the SentimentScore field's value.
- func (s *BatchDetectSentimentItemResult) SetSentimentScore(v *SentimentScore) *BatchDetectSentimentItemResult {
- s.SentimentScore = v
- return s
- }
- type BatchDetectSentimentOutput struct {
- _ struct{} `type:"structure"`
- // A list containing one object for each document that contained an error. The
- // results are sorted in ascending order by the Index field and match the order
- // of the documents in the input list. If there are no errors in the batch,
- // the ErrorList is empty.
- //
- // ErrorList is a required field
- ErrorList []*BatchItemError `type:"list" required:"true"`
- // A list of objects containing the results of the operation. The results are
- // sorted in ascending order by the Index field and match the order of the documents
- // in the input list. If all of the documents contain an error, the ResultList
- // is empty.
- //
- // ResultList is a required field
- ResultList []*BatchDetectSentimentItemResult `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectSentimentOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectSentimentOutput) GoString() string {
- return s.String()
- }
- // SetErrorList sets the ErrorList field's value.
- func (s *BatchDetectSentimentOutput) SetErrorList(v []*BatchItemError) *BatchDetectSentimentOutput {
- s.ErrorList = v
- return s
- }
- // SetResultList sets the ResultList field's value.
- func (s *BatchDetectSentimentOutput) SetResultList(v []*BatchDetectSentimentItemResult) *BatchDetectSentimentOutput {
- s.ResultList = v
- return s
- }
- type BatchDetectSyntaxInput struct {
- _ struct{} `type:"structure"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"SyntaxLanguageCode"`
- // A list containing the text of the input documents. The list can contain a
- // maximum of 25 documents. Each document must contain fewer that 5,000 bytes
- // of UTF-8 encoded characters.
- //
- // TextList is a required field
- TextList []*string `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectSyntaxInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectSyntaxInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *BatchDetectSyntaxInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BatchDetectSyntaxInput"}
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.TextList == nil {
- invalidParams.Add(request.NewErrParamRequired("TextList"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *BatchDetectSyntaxInput) SetLanguageCode(v string) *BatchDetectSyntaxInput {
- s.LanguageCode = &v
- return s
- }
- // SetTextList sets the TextList field's value.
- func (s *BatchDetectSyntaxInput) SetTextList(v []*string) *BatchDetectSyntaxInput {
- s.TextList = v
- return s
- }
- // The result of calling the operation. The operation returns one object that
- // is successfully processed by the operation.
- type BatchDetectSyntaxItemResult struct {
- _ struct{} `type:"structure"`
- // The zero-based index of the document in the input list.
- Index *int64 `type:"integer"`
- // The syntax tokens for the words in the document, one token for each word.
- SyntaxTokens []*SyntaxToken `type:"list"`
- }
- // String returns the string representation
- func (s BatchDetectSyntaxItemResult) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectSyntaxItemResult) GoString() string {
- return s.String()
- }
- // SetIndex sets the Index field's value.
- func (s *BatchDetectSyntaxItemResult) SetIndex(v int64) *BatchDetectSyntaxItemResult {
- s.Index = &v
- return s
- }
- // SetSyntaxTokens sets the SyntaxTokens field's value.
- func (s *BatchDetectSyntaxItemResult) SetSyntaxTokens(v []*SyntaxToken) *BatchDetectSyntaxItemResult {
- s.SyntaxTokens = v
- return s
- }
- type BatchDetectSyntaxOutput struct {
- _ struct{} `type:"structure"`
- // A list containing one object for each document that contained an error. The
- // results are sorted in ascending order by the Index field and match the order
- // of the documents in the input list. If there are no errors in the batch,
- // the ErrorList is empty.
- //
- // ErrorList is a required field
- ErrorList []*BatchItemError `type:"list" required:"true"`
- // A list of objects containing the results of the operation. The results are
- // sorted in ascending order by the Index field and match the order of the documents
- // in the input list. If all of the documents contain an error, the ResultList
- // is empty.
- //
- // ResultList is a required field
- ResultList []*BatchDetectSyntaxItemResult `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s BatchDetectSyntaxOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchDetectSyntaxOutput) GoString() string {
- return s.String()
- }
- // SetErrorList sets the ErrorList field's value.
- func (s *BatchDetectSyntaxOutput) SetErrorList(v []*BatchItemError) *BatchDetectSyntaxOutput {
- s.ErrorList = v
- return s
- }
- // SetResultList sets the ResultList field's value.
- func (s *BatchDetectSyntaxOutput) SetResultList(v []*BatchDetectSyntaxItemResult) *BatchDetectSyntaxOutput {
- s.ResultList = v
- return s
- }
- // Describes an error that occurred while processing a document in a batch.
- // The operation returns on BatchItemError object for each document that contained
- // an error.
- type BatchItemError struct {
- _ struct{} `type:"structure"`
- // The numeric error code of the error.
- ErrorCode *string `min:"1" type:"string"`
- // A text description of the error.
- ErrorMessage *string `min:"1" type:"string"`
- // The zero-based index of the document in the input list.
- Index *int64 `type:"integer"`
- }
- // String returns the string representation
- func (s BatchItemError) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s BatchItemError) GoString() string {
- return s.String()
- }
- // SetErrorCode sets the ErrorCode field's value.
- func (s *BatchItemError) SetErrorCode(v string) *BatchItemError {
- s.ErrorCode = &v
- return s
- }
- // SetErrorMessage sets the ErrorMessage field's value.
- func (s *BatchItemError) SetErrorMessage(v string) *BatchItemError {
- s.ErrorMessage = &v
- return s
- }
- // SetIndex sets the Index field's value.
- func (s *BatchItemError) SetIndex(v int64) *BatchItemError {
- s.Index = &v
- return s
- }
- // Describes the result metrics for the test data associated with an documentation
- // classifier.
- type ClassifierEvaluationMetrics struct {
- _ struct{} `type:"structure"`
- // The fraction of the labels that were correct recognized. It is computed by
- // dividing the number of labels in the test documents that were correctly recognized
- // by the total number of labels in the test documents.
- Accuracy *float64 `type:"double"`
- // A measure of how accurate the classifier results are for the test data. It
- // is derived from the Precision and Recall values. The F1Score is the harmonic
- // average of the two scores. The highest score is 1, and the worst score is
- // 0.
- F1Score *float64 `type:"double"`
- // A measure of the usefulness of the classifier results in the test data. High
- // precision means that the classifier returned substantially more relevant
- // results than irrelevant ones.
- Precision *float64 `type:"double"`
- // A measure of how complete the classifier results are for the test data. High
- // recall means that the classifier returned most of the relevant results.
- Recall *float64 `type:"double"`
- }
- // String returns the string representation
- func (s ClassifierEvaluationMetrics) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ClassifierEvaluationMetrics) GoString() string {
- return s.String()
- }
- // SetAccuracy sets the Accuracy field's value.
- func (s *ClassifierEvaluationMetrics) SetAccuracy(v float64) *ClassifierEvaluationMetrics {
- s.Accuracy = &v
- return s
- }
- // SetF1Score sets the F1Score field's value.
- func (s *ClassifierEvaluationMetrics) SetF1Score(v float64) *ClassifierEvaluationMetrics {
- s.F1Score = &v
- return s
- }
- // SetPrecision sets the Precision field's value.
- func (s *ClassifierEvaluationMetrics) SetPrecision(v float64) *ClassifierEvaluationMetrics {
- s.Precision = &v
- return s
- }
- // SetRecall sets the Recall field's value.
- func (s *ClassifierEvaluationMetrics) SetRecall(v float64) *ClassifierEvaluationMetrics {
- s.Recall = &v
- return s
- }
- // Provides information about a document classifier.
- type ClassifierMetadata struct {
- _ struct{} `type:"structure"`
- // Describes the result metrics for the test data associated with an documentation
- // classifier.
- EvaluationMetrics *ClassifierEvaluationMetrics `type:"structure"`
- // The number of labels in the input data.
- NumberOfLabels *int64 `type:"integer"`
- // The number of documents in the input data that were used to test the classifier.
- // Typically this is 10 to 20 percent of the input documents.
- NumberOfTestDocuments *int64 `type:"integer"`
- // The number of documents in the input data that were used to train the classifier.
- // Typically this is 80 to 90 percent of the input documents.
- NumberOfTrainedDocuments *int64 `type:"integer"`
- }
- // String returns the string representation
- func (s ClassifierMetadata) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ClassifierMetadata) GoString() string {
- return s.String()
- }
- // SetEvaluationMetrics sets the EvaluationMetrics field's value.
- func (s *ClassifierMetadata) SetEvaluationMetrics(v *ClassifierEvaluationMetrics) *ClassifierMetadata {
- s.EvaluationMetrics = v
- return s
- }
- // SetNumberOfLabels sets the NumberOfLabels field's value.
- func (s *ClassifierMetadata) SetNumberOfLabels(v int64) *ClassifierMetadata {
- s.NumberOfLabels = &v
- return s
- }
- // SetNumberOfTestDocuments sets the NumberOfTestDocuments field's value.
- func (s *ClassifierMetadata) SetNumberOfTestDocuments(v int64) *ClassifierMetadata {
- s.NumberOfTestDocuments = &v
- return s
- }
- // SetNumberOfTrainedDocuments sets the NumberOfTrainedDocuments field's value.
- func (s *ClassifierMetadata) SetNumberOfTrainedDocuments(v int64) *ClassifierMetadata {
- s.NumberOfTrainedDocuments = &v
- return s
- }
- type CreateDocumentClassifierInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the request. If you don't set the client request
- // token, Amazon Comprehend generates one.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role
- // that grants Amazon Comprehend read access to your input data.
- //
- // DataAccessRoleArn is a required field
- DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
- // The name of the document classifier.
- //
- // DocumentClassifierName is a required field
- DocumentClassifierName *string `type:"string" required:"true"`
- // Specifies the format and location of the input data for the job.
- //
- // InputDataConfig is a required field
- InputDataConfig *DocumentClassifierInputDataConfig `type:"structure" required:"true"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- }
- // String returns the string representation
- func (s CreateDocumentClassifierInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateDocumentClassifierInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateDocumentClassifierInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateDocumentClassifierInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.DataAccessRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
- }
- if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
- }
- if s.DocumentClassifierName == nil {
- invalidParams.Add(request.NewErrParamRequired("DocumentClassifierName"))
- }
- if s.InputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
- }
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.InputDataConfig != nil {
- if err := s.InputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetClientRequestToken sets the ClientRequestToken field's value.
- func (s *CreateDocumentClassifierInput) SetClientRequestToken(v string) *CreateDocumentClassifierInput {
- s.ClientRequestToken = &v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *CreateDocumentClassifierInput) SetDataAccessRoleArn(v string) *CreateDocumentClassifierInput {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetDocumentClassifierName sets the DocumentClassifierName field's value.
- func (s *CreateDocumentClassifierInput) SetDocumentClassifierName(v string) *CreateDocumentClassifierInput {
- s.DocumentClassifierName = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *CreateDocumentClassifierInput) SetInputDataConfig(v *DocumentClassifierInputDataConfig) *CreateDocumentClassifierInput {
- s.InputDataConfig = v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *CreateDocumentClassifierInput) SetLanguageCode(v string) *CreateDocumentClassifierInput {
- s.LanguageCode = &v
- return s
- }
- type CreateDocumentClassifierOutput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that identifies the document classifier.
- DocumentClassifierArn *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateDocumentClassifierOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateDocumentClassifierOutput) GoString() string {
- return s.String()
- }
- // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
- func (s *CreateDocumentClassifierOutput) SetDocumentClassifierArn(v string) *CreateDocumentClassifierOutput {
- s.DocumentClassifierArn = &v
- return s
- }
- type CreateEntityRecognizerInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the request. If you don't set the client request
- // token, Amazon Comprehend generates one.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role
- // that grants Amazon Comprehend read access to your input data.
- //
- // DataAccessRoleArn is a required field
- DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
- // Specifies the format and location of the input data. The S3 bucket containing
- // the input data must be located in the same region as the entity recognizer
- // being created.
- //
- // InputDataConfig is a required field
- InputDataConfig *EntityRecognizerInputDataConfig `type:"structure" required:"true"`
- // The language of the input documents. All documents must be in the same language.
- // Only English ("en") is currently supported.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // The name given to the newly created recognizer. Recognizer names can be a
- // maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores
- // (_) are allowed. The name must be unique in the account/region.
- //
- // RecognizerName is a required field
- RecognizerName *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateEntityRecognizerInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateEntityRecognizerInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateEntityRecognizerInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateEntityRecognizerInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.DataAccessRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
- }
- if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
- }
- if s.InputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
- }
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.RecognizerName == nil {
- invalidParams.Add(request.NewErrParamRequired("RecognizerName"))
- }
- if s.InputDataConfig != nil {
- if err := s.InputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetClientRequestToken sets the ClientRequestToken field's value.
- func (s *CreateEntityRecognizerInput) SetClientRequestToken(v string) *CreateEntityRecognizerInput {
- s.ClientRequestToken = &v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *CreateEntityRecognizerInput) SetDataAccessRoleArn(v string) *CreateEntityRecognizerInput {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *CreateEntityRecognizerInput) SetInputDataConfig(v *EntityRecognizerInputDataConfig) *CreateEntityRecognizerInput {
- s.InputDataConfig = v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *CreateEntityRecognizerInput) SetLanguageCode(v string) *CreateEntityRecognizerInput {
- s.LanguageCode = &v
- return s
- }
- // SetRecognizerName sets the RecognizerName field's value.
- func (s *CreateEntityRecognizerInput) SetRecognizerName(v string) *CreateEntityRecognizerInput {
- s.RecognizerName = &v
- return s
- }
- type CreateEntityRecognizerOutput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that identifies the entity recognizer.
- EntityRecognizerArn *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateEntityRecognizerOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateEntityRecognizerOutput) GoString() string {
- return s.String()
- }
- // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
- func (s *CreateEntityRecognizerOutput) SetEntityRecognizerArn(v string) *CreateEntityRecognizerOutput {
- s.EntityRecognizerArn = &v
- return s
- }
- type DeleteDocumentClassifierInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that identifies the document classifier.
- //
- // DocumentClassifierArn is a required field
- DocumentClassifierArn *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteDocumentClassifierInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteDocumentClassifierInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteDocumentClassifierInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentClassifierInput"}
- if s.DocumentClassifierArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
- func (s *DeleteDocumentClassifierInput) SetDocumentClassifierArn(v string) *DeleteDocumentClassifierInput {
- s.DocumentClassifierArn = &v
- return s
- }
- type DeleteDocumentClassifierOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteDocumentClassifierOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteDocumentClassifierOutput) GoString() string {
- return s.String()
- }
- type DeleteEntityRecognizerInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that identifies the entity recognizer.
- //
- // EntityRecognizerArn is a required field
- EntityRecognizerArn *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteEntityRecognizerInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteEntityRecognizerInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteEntityRecognizerInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteEntityRecognizerInput"}
- if s.EntityRecognizerArn == nil {
- invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
- func (s *DeleteEntityRecognizerInput) SetEntityRecognizerArn(v string) *DeleteEntityRecognizerInput {
- s.EntityRecognizerArn = &v
- return s
- }
- type DeleteEntityRecognizerOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteEntityRecognizerOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteEntityRecognizerOutput) GoString() string {
- return s.String()
- }
- type DescribeDocumentClassificationJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier that Amazon Comprehend generated for the job. The operation
- // returns this identifier in its response.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeDocumentClassificationJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeDocumentClassificationJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeDocumentClassificationJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentClassificationJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *DescribeDocumentClassificationJobInput) SetJobId(v string) *DescribeDocumentClassificationJobInput {
- s.JobId = &v
- return s
- }
- type DescribeDocumentClassificationJobOutput struct {
- _ struct{} `type:"structure"`
- // An object that describes the properties associated with the document classification
- // job.
- DocumentClassificationJobProperties *DocumentClassificationJobProperties `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeDocumentClassificationJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeDocumentClassificationJobOutput) GoString() string {
- return s.String()
- }
- // SetDocumentClassificationJobProperties sets the DocumentClassificationJobProperties field's value.
- func (s *DescribeDocumentClassificationJobOutput) SetDocumentClassificationJobProperties(v *DocumentClassificationJobProperties) *DescribeDocumentClassificationJobOutput {
- s.DocumentClassificationJobProperties = v
- return s
- }
- type DescribeDocumentClassifierInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that identifies the document classifier. The
- // operation returns this identifier in its response.
- //
- // DocumentClassifierArn is a required field
- DocumentClassifierArn *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeDocumentClassifierInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeDocumentClassifierInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeDocumentClassifierInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentClassifierInput"}
- if s.DocumentClassifierArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
- func (s *DescribeDocumentClassifierInput) SetDocumentClassifierArn(v string) *DescribeDocumentClassifierInput {
- s.DocumentClassifierArn = &v
- return s
- }
- type DescribeDocumentClassifierOutput struct {
- _ struct{} `type:"structure"`
- // An object that contains the properties associated with a document classifier.
- DocumentClassifierProperties *DocumentClassifierProperties `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeDocumentClassifierOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeDocumentClassifierOutput) GoString() string {
- return s.String()
- }
- // SetDocumentClassifierProperties sets the DocumentClassifierProperties field's value.
- func (s *DescribeDocumentClassifierOutput) SetDocumentClassifierProperties(v *DocumentClassifierProperties) *DescribeDocumentClassifierOutput {
- s.DocumentClassifierProperties = v
- return s
- }
- type DescribeDominantLanguageDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier that Amazon Comprehend generated for the job. The operation
- // returns this identifier in its response.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeDominantLanguageDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeDominantLanguageDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeDominantLanguageDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeDominantLanguageDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *DescribeDominantLanguageDetectionJobInput) SetJobId(v string) *DescribeDominantLanguageDetectionJobInput {
- s.JobId = &v
- return s
- }
- type DescribeDominantLanguageDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // An object that contains the properties associated with a dominant language
- // detection job.
- DominantLanguageDetectionJobProperties *DominantLanguageDetectionJobProperties `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeDominantLanguageDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeDominantLanguageDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetDominantLanguageDetectionJobProperties sets the DominantLanguageDetectionJobProperties field's value.
- func (s *DescribeDominantLanguageDetectionJobOutput) SetDominantLanguageDetectionJobProperties(v *DominantLanguageDetectionJobProperties) *DescribeDominantLanguageDetectionJobOutput {
- s.DominantLanguageDetectionJobProperties = v
- return s
- }
- type DescribeEntitiesDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier that Amazon Comprehend generated for the job. The operation
- // returns this identifier in its response.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeEntitiesDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeEntitiesDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeEntitiesDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeEntitiesDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *DescribeEntitiesDetectionJobInput) SetJobId(v string) *DescribeEntitiesDetectionJobInput {
- s.JobId = &v
- return s
- }
- type DescribeEntitiesDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // An object that contains the properties associated with an entities detection
- // job.
- EntitiesDetectionJobProperties *EntitiesDetectionJobProperties `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeEntitiesDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeEntitiesDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetEntitiesDetectionJobProperties sets the EntitiesDetectionJobProperties field's value.
- func (s *DescribeEntitiesDetectionJobOutput) SetEntitiesDetectionJobProperties(v *EntitiesDetectionJobProperties) *DescribeEntitiesDetectionJobOutput {
- s.EntitiesDetectionJobProperties = v
- return s
- }
- type DescribeEntityRecognizerInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that identifies the entity recognizer.
- //
- // EntityRecognizerArn is a required field
- EntityRecognizerArn *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeEntityRecognizerInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeEntityRecognizerInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeEntityRecognizerInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeEntityRecognizerInput"}
- if s.EntityRecognizerArn == nil {
- invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
- func (s *DescribeEntityRecognizerInput) SetEntityRecognizerArn(v string) *DescribeEntityRecognizerInput {
- s.EntityRecognizerArn = &v
- return s
- }
- type DescribeEntityRecognizerOutput struct {
- _ struct{} `type:"structure"`
- // Describes information associated with an entity recognizer.
- EntityRecognizerProperties *EntityRecognizerProperties `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeEntityRecognizerOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeEntityRecognizerOutput) GoString() string {
- return s.String()
- }
- // SetEntityRecognizerProperties sets the EntityRecognizerProperties field's value.
- func (s *DescribeEntityRecognizerOutput) SetEntityRecognizerProperties(v *EntityRecognizerProperties) *DescribeEntityRecognizerOutput {
- s.EntityRecognizerProperties = v
- return s
- }
- type DescribeKeyPhrasesDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier that Amazon Comprehend generated for the job. The operation
- // returns this identifier in its response.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeKeyPhrasesDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeKeyPhrasesDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeKeyPhrasesDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeKeyPhrasesDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *DescribeKeyPhrasesDetectionJobInput) SetJobId(v string) *DescribeKeyPhrasesDetectionJobInput {
- s.JobId = &v
- return s
- }
- type DescribeKeyPhrasesDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // An object that contains the properties associated with a key phrases detection
- // job.
- KeyPhrasesDetectionJobProperties *KeyPhrasesDetectionJobProperties `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeKeyPhrasesDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeKeyPhrasesDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetKeyPhrasesDetectionJobProperties sets the KeyPhrasesDetectionJobProperties field's value.
- func (s *DescribeKeyPhrasesDetectionJobOutput) SetKeyPhrasesDetectionJobProperties(v *KeyPhrasesDetectionJobProperties) *DescribeKeyPhrasesDetectionJobOutput {
- s.KeyPhrasesDetectionJobProperties = v
- return s
- }
- type DescribeSentimentDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier that Amazon Comprehend generated for the job. The operation
- // returns this identifier in its response.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeSentimentDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeSentimentDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeSentimentDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeSentimentDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *DescribeSentimentDetectionJobInput) SetJobId(v string) *DescribeSentimentDetectionJobInput {
- s.JobId = &v
- return s
- }
- type DescribeSentimentDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // An object that contains the properties associated with a sentiment detection
- // job.
- SentimentDetectionJobProperties *SentimentDetectionJobProperties `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeSentimentDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeSentimentDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetSentimentDetectionJobProperties sets the SentimentDetectionJobProperties field's value.
- func (s *DescribeSentimentDetectionJobOutput) SetSentimentDetectionJobProperties(v *SentimentDetectionJobProperties) *DescribeSentimentDetectionJobOutput {
- s.SentimentDetectionJobProperties = v
- return s
- }
- type DescribeTopicsDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier assigned by the user to the detection job.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DescribeTopicsDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeTopicsDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeTopicsDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeTopicsDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *DescribeTopicsDetectionJobInput) SetJobId(v string) *DescribeTopicsDetectionJobInput {
- s.JobId = &v
- return s
- }
- type DescribeTopicsDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The list of properties for the requested job.
- TopicsDetectionJobProperties *TopicsDetectionJobProperties `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeTopicsDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeTopicsDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetTopicsDetectionJobProperties sets the TopicsDetectionJobProperties field's value.
- func (s *DescribeTopicsDetectionJobOutput) SetTopicsDetectionJobProperties(v *TopicsDetectionJobProperties) *DescribeTopicsDetectionJobOutput {
- s.TopicsDetectionJobProperties = v
- return s
- }
- type DetectDominantLanguageInput struct {
- _ struct{} `type:"structure"`
- // A UTF-8 text string. Each string should contain at least 20 characters and
- // must contain fewer that 5,000 bytes of UTF-8 encoded characters.
- //
- // Text is a required field
- Text *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DetectDominantLanguageInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectDominantLanguageInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DetectDominantLanguageInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DetectDominantLanguageInput"}
- if s.Text == nil {
- invalidParams.Add(request.NewErrParamRequired("Text"))
- }
- if s.Text != nil && len(*s.Text) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Text", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetText sets the Text field's value.
- func (s *DetectDominantLanguageInput) SetText(v string) *DetectDominantLanguageInput {
- s.Text = &v
- return s
- }
- type DetectDominantLanguageOutput struct {
- _ struct{} `type:"structure"`
- // The languages that Amazon Comprehend detected in the input text. For each
- // language, the response returns the RFC 5646 language code and the level of
- // confidence that Amazon Comprehend has in the accuracy of its inference. For
- // more information about RFC 5646, see Tags for Identifying Languages (https://tools.ietf.org/html/rfc5646)
- // on the IETF Tools web site.
- Languages []*DominantLanguage `type:"list"`
- }
- // String returns the string representation
- func (s DetectDominantLanguageOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectDominantLanguageOutput) GoString() string {
- return s.String()
- }
- // SetLanguages sets the Languages field's value.
- func (s *DetectDominantLanguageOutput) SetLanguages(v []*DominantLanguage) *DetectDominantLanguageOutput {
- s.Languages = v
- return s
- }
- type DetectEntitiesInput struct {
- _ struct{} `type:"structure"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8
- // encoded characters.
- //
- // Text is a required field
- Text *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DetectEntitiesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectEntitiesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DetectEntitiesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DetectEntitiesInput"}
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.Text == nil {
- invalidParams.Add(request.NewErrParamRequired("Text"))
- }
- if s.Text != nil && len(*s.Text) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Text", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *DetectEntitiesInput) SetLanguageCode(v string) *DetectEntitiesInput {
- s.LanguageCode = &v
- return s
- }
- // SetText sets the Text field's value.
- func (s *DetectEntitiesInput) SetText(v string) *DetectEntitiesInput {
- s.Text = &v
- return s
- }
- type DetectEntitiesOutput struct {
- _ struct{} `type:"structure"`
- // A collection of entities identified in the input text. For each entity, the
- // response provides the entity text, entity type, where the entity text begins
- // and ends, and the level of confidence that Amazon Comprehend has in the detection.
- // For a list of entity types, see how-entities.
- Entities []*Entity `type:"list"`
- }
- // String returns the string representation
- func (s DetectEntitiesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectEntitiesOutput) GoString() string {
- return s.String()
- }
- // SetEntities sets the Entities field's value.
- func (s *DetectEntitiesOutput) SetEntities(v []*Entity) *DetectEntitiesOutput {
- s.Entities = v
- return s
- }
- type DetectKeyPhrasesInput struct {
- _ struct{} `type:"structure"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8
- // encoded characters.
- //
- // Text is a required field
- Text *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DetectKeyPhrasesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectKeyPhrasesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DetectKeyPhrasesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DetectKeyPhrasesInput"}
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.Text == nil {
- invalidParams.Add(request.NewErrParamRequired("Text"))
- }
- if s.Text != nil && len(*s.Text) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Text", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *DetectKeyPhrasesInput) SetLanguageCode(v string) *DetectKeyPhrasesInput {
- s.LanguageCode = &v
- return s
- }
- // SetText sets the Text field's value.
- func (s *DetectKeyPhrasesInput) SetText(v string) *DetectKeyPhrasesInput {
- s.Text = &v
- return s
- }
- type DetectKeyPhrasesOutput struct {
- _ struct{} `type:"structure"`
- // A collection of key phrases that Amazon Comprehend identified in the input
- // text. For each key phrase, the response provides the text of the key phrase,
- // where the key phrase begins and ends, and the level of confidence that Amazon
- // Comprehend has in the accuracy of the detection.
- KeyPhrases []*KeyPhrase `type:"list"`
- }
- // String returns the string representation
- func (s DetectKeyPhrasesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectKeyPhrasesOutput) GoString() string {
- return s.String()
- }
- // SetKeyPhrases sets the KeyPhrases field's value.
- func (s *DetectKeyPhrasesOutput) SetKeyPhrases(v []*KeyPhrase) *DetectKeyPhrasesOutput {
- s.KeyPhrases = v
- return s
- }
- type DetectSentimentInput struct {
- _ struct{} `type:"structure"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8
- // encoded characters.
- //
- // Text is a required field
- Text *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DetectSentimentInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectSentimentInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DetectSentimentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DetectSentimentInput"}
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.Text == nil {
- invalidParams.Add(request.NewErrParamRequired("Text"))
- }
- if s.Text != nil && len(*s.Text) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Text", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *DetectSentimentInput) SetLanguageCode(v string) *DetectSentimentInput {
- s.LanguageCode = &v
- return s
- }
- // SetText sets the Text field's value.
- func (s *DetectSentimentInput) SetText(v string) *DetectSentimentInput {
- s.Text = &v
- return s
- }
- type DetectSentimentOutput struct {
- _ struct{} `type:"structure"`
- // The inferred sentiment that Amazon Comprehend has the highest level of confidence
- // in.
- Sentiment *string `type:"string" enum:"SentimentType"`
- // An object that lists the sentiments, and their corresponding confidence levels.
- SentimentScore *SentimentScore `type:"structure"`
- }
- // String returns the string representation
- func (s DetectSentimentOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectSentimentOutput) GoString() string {
- return s.String()
- }
- // SetSentiment sets the Sentiment field's value.
- func (s *DetectSentimentOutput) SetSentiment(v string) *DetectSentimentOutput {
- s.Sentiment = &v
- return s
- }
- // SetSentimentScore sets the SentimentScore field's value.
- func (s *DetectSentimentOutput) SetSentimentScore(v *SentimentScore) *DetectSentimentOutput {
- s.SentimentScore = v
- return s
- }
- type DetectSyntaxInput struct {
- _ struct{} `type:"structure"`
- // The language code of the input documents. You can specify English ("en")
- // or Spanish ("es").
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"SyntaxLanguageCode"`
- // A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF encoded
- // characters.
- //
- // Text is a required field
- Text *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DetectSyntaxInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectSyntaxInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DetectSyntaxInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DetectSyntaxInput"}
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.Text == nil {
- invalidParams.Add(request.NewErrParamRequired("Text"))
- }
- if s.Text != nil && len(*s.Text) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Text", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *DetectSyntaxInput) SetLanguageCode(v string) *DetectSyntaxInput {
- s.LanguageCode = &v
- return s
- }
- // SetText sets the Text field's value.
- func (s *DetectSyntaxInput) SetText(v string) *DetectSyntaxInput {
- s.Text = &v
- return s
- }
- type DetectSyntaxOutput struct {
- _ struct{} `type:"structure"`
- // A collection of syntax tokens describing the text. For each token, the response
- // provides the text, the token type, where the text begins and ends, and the
- // level of confidence that Amazon Comprehend has that the token is correct.
- // For a list of token types, see how-syntax.
- SyntaxTokens []*SyntaxToken `type:"list"`
- }
- // String returns the string representation
- func (s DetectSyntaxOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DetectSyntaxOutput) GoString() string {
- return s.String()
- }
- // SetSyntaxTokens sets the SyntaxTokens field's value.
- func (s *DetectSyntaxOutput) SetSyntaxTokens(v []*SyntaxToken) *DetectSyntaxOutput {
- s.SyntaxTokens = v
- return s
- }
- // Provides information for filtering a list of document classification jobs.
- // For more information, see the operation. You can provide only one filter
- // parameter in each request.
- type DocumentClassificationJobFilter struct {
- _ struct{} `type:"structure"`
- // Filters on the name of the job.
- JobName *string `min:"1" type:"string"`
- // Filters the list based on job status. Returns only jobs with the specified
- // status.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted before the specified time. Jobs are
- // returned in descending order, newest to oldest.
- SubmitTimeAfter *time.Time `type:"timestamp"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted after the specified time. Jobs are
- // returned in ascending order, oldest to newest.
- SubmitTimeBefore *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s DocumentClassificationJobFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DocumentClassificationJobFilter) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DocumentClassificationJobFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DocumentClassificationJobFilter"}
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobName sets the JobName field's value.
- func (s *DocumentClassificationJobFilter) SetJobName(v string) *DocumentClassificationJobFilter {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *DocumentClassificationJobFilter) SetJobStatus(v string) *DocumentClassificationJobFilter {
- s.JobStatus = &v
- return s
- }
- // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
- func (s *DocumentClassificationJobFilter) SetSubmitTimeAfter(v time.Time) *DocumentClassificationJobFilter {
- s.SubmitTimeAfter = &v
- return s
- }
- // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
- func (s *DocumentClassificationJobFilter) SetSubmitTimeBefore(v time.Time) *DocumentClassificationJobFilter {
- s.SubmitTimeBefore = &v
- return s
- }
- // Provides information about a document classification job.
- type DocumentClassificationJobProperties struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the AWS identity and Access Management
- // (IAM) role that grants Amazon Comprehend read access to your input data.
- DataAccessRoleArn *string `min:"20" type:"string"`
- // The Amazon Resource Name (ARN) that identifies the document classifier.
- DocumentClassifierArn *string `type:"string"`
- // The time that the document classification job completed.
- EndTime *time.Time `type:"timestamp"`
- // The input data configuration that you supplied when you created the document
- // classification job.
- InputDataConfig *InputDataConfig `type:"structure"`
- // The identifier assigned to the document classification job.
- JobId *string `min:"1" type:"string"`
- // The name that you assigned to the document classification job.
- JobName *string `min:"1" type:"string"`
- // The current status of the document classification job. If the status is FAILED,
- // the Message field shows the reason for the failure.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // A description of the status of the job.
- Message *string `type:"string"`
- // The output data configuration that you supplied when you created the document
- // classification job.
- OutputDataConfig *OutputDataConfig `type:"structure"`
- // The time that the document classification job was submitted for processing.
- SubmitTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s DocumentClassificationJobProperties) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DocumentClassificationJobProperties) GoString() string {
- return s.String()
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *DocumentClassificationJobProperties) SetDataAccessRoleArn(v string) *DocumentClassificationJobProperties {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
- func (s *DocumentClassificationJobProperties) SetDocumentClassifierArn(v string) *DocumentClassificationJobProperties {
- s.DocumentClassifierArn = &v
- return s
- }
- // SetEndTime sets the EndTime field's value.
- func (s *DocumentClassificationJobProperties) SetEndTime(v time.Time) *DocumentClassificationJobProperties {
- s.EndTime = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *DocumentClassificationJobProperties) SetInputDataConfig(v *InputDataConfig) *DocumentClassificationJobProperties {
- s.InputDataConfig = v
- return s
- }
- // SetJobId sets the JobId field's value.
- func (s *DocumentClassificationJobProperties) SetJobId(v string) *DocumentClassificationJobProperties {
- s.JobId = &v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *DocumentClassificationJobProperties) SetJobName(v string) *DocumentClassificationJobProperties {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *DocumentClassificationJobProperties) SetJobStatus(v string) *DocumentClassificationJobProperties {
- s.JobStatus = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *DocumentClassificationJobProperties) SetMessage(v string) *DocumentClassificationJobProperties {
- s.Message = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *DocumentClassificationJobProperties) SetOutputDataConfig(v *OutputDataConfig) *DocumentClassificationJobProperties {
- s.OutputDataConfig = v
- return s
- }
- // SetSubmitTime sets the SubmitTime field's value.
- func (s *DocumentClassificationJobProperties) SetSubmitTime(v time.Time) *DocumentClassificationJobProperties {
- s.SubmitTime = &v
- return s
- }
- // Provides information for filtering a list of document classifiers. You can
- // only specify one filtering parameter in a request. For more information,
- // see the operation.
- type DocumentClassifierFilter struct {
- _ struct{} `type:"structure"`
- // Filters the list of classifiers based on status.
- Status *string `type:"string" enum:"ModelStatus"`
- // Filters the list of classifiers based on the time that the classifier was
- // submitted for processing. Returns only classifiers submitted after the specified
- // time. Classifiers are returned in descending order, newest to oldest.
- SubmitTimeAfter *time.Time `type:"timestamp"`
- // Filters the list of classifiers based on the time that the classifier was
- // submitted for processing. Returns only classifiers submitted before the specified
- // time. Classifiers are returned in ascending order, oldest to newest.
- SubmitTimeBefore *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s DocumentClassifierFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DocumentClassifierFilter) GoString() string {
- return s.String()
- }
- // SetStatus sets the Status field's value.
- func (s *DocumentClassifierFilter) SetStatus(v string) *DocumentClassifierFilter {
- s.Status = &v
- return s
- }
- // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
- func (s *DocumentClassifierFilter) SetSubmitTimeAfter(v time.Time) *DocumentClassifierFilter {
- s.SubmitTimeAfter = &v
- return s
- }
- // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
- func (s *DocumentClassifierFilter) SetSubmitTimeBefore(v time.Time) *DocumentClassifierFilter {
- s.SubmitTimeBefore = &v
- return s
- }
- // The input properties for training a document classifier.
- //
- // For more information on how the input file is formatted, see how-document-classification-training-data.
- type DocumentClassifierInputDataConfig struct {
- _ struct{} `type:"structure"`
- // The Amazon S3 URI for the input data. The S3 bucket must be in the same region
- // as the API endpoint that you are calling. The URI can point to a single input
- // file or it can provide the prefix for a collection of input files.
- //
- // For example, if you use the URI S3://bucketName/prefix, if the prefix is
- // a single file, Amazon Comprehend uses that file as input. If more than one
- // file begins with the prefix, Amazon Comprehend uses all of them as input.
- //
- // S3Uri is a required field
- S3Uri *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DocumentClassifierInputDataConfig) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DocumentClassifierInputDataConfig) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DocumentClassifierInputDataConfig) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DocumentClassifierInputDataConfig"}
- if s.S3Uri == nil {
- invalidParams.Add(request.NewErrParamRequired("S3Uri"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetS3Uri sets the S3Uri field's value.
- func (s *DocumentClassifierInputDataConfig) SetS3Uri(v string) *DocumentClassifierInputDataConfig {
- s.S3Uri = &v
- return s
- }
- // Provides information about a document classifier.
- type DocumentClassifierProperties struct {
- _ struct{} `type:"structure"`
- // Information about the document classifier, including the number of documents
- // used for training the classifier, the number of documents used for test the
- // classifier, and an accuracy rating.
- ClassifierMetadata *ClassifierMetadata `type:"structure"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role
- // that grants Amazon Comprehend read access to your input data.
- DataAccessRoleArn *string `min:"20" type:"string"`
- // The Amazon Resource Name (ARN) that identifies the document classifier.
- DocumentClassifierArn *string `type:"string"`
- // The time that training the document classifier completed.
- EndTime *time.Time `type:"timestamp"`
- // The input data configuration that you supplied when you created the document
- // classifier for training.
- InputDataConfig *DocumentClassifierInputDataConfig `type:"structure"`
- // The language code for the language of the documents that the classifier was
- // trained on.
- LanguageCode *string `type:"string" enum:"LanguageCode"`
- // Additional information about the status of the classifier.
- Message *string `type:"string"`
- // The status of the document classifier. If the status is TRAINED the classifier
- // is ready to use. If the status is FAILED you can see additional information
- // about why the classifier wasn't trained in the Message field.
- Status *string `type:"string" enum:"ModelStatus"`
- // The time that the document classifier was submitted for training.
- SubmitTime *time.Time `type:"timestamp"`
- // The time that training of the document classifier was completed. Indicates
- // the time when the training completes on documentation classifiers. You are
- // billed for the time interval between this time and the value of TrainingStartTime.
- TrainingEndTime *time.Time `type:"timestamp"`
- // Indicates the time when the training starts on documentation classifiers.
- // You are billed for the time interval between this time and the value of TrainingEndTime.
- TrainingStartTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s DocumentClassifierProperties) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DocumentClassifierProperties) GoString() string {
- return s.String()
- }
- // SetClassifierMetadata sets the ClassifierMetadata field's value.
- func (s *DocumentClassifierProperties) SetClassifierMetadata(v *ClassifierMetadata) *DocumentClassifierProperties {
- s.ClassifierMetadata = v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *DocumentClassifierProperties) SetDataAccessRoleArn(v string) *DocumentClassifierProperties {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
- func (s *DocumentClassifierProperties) SetDocumentClassifierArn(v string) *DocumentClassifierProperties {
- s.DocumentClassifierArn = &v
- return s
- }
- // SetEndTime sets the EndTime field's value.
- func (s *DocumentClassifierProperties) SetEndTime(v time.Time) *DocumentClassifierProperties {
- s.EndTime = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *DocumentClassifierProperties) SetInputDataConfig(v *DocumentClassifierInputDataConfig) *DocumentClassifierProperties {
- s.InputDataConfig = v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *DocumentClassifierProperties) SetLanguageCode(v string) *DocumentClassifierProperties {
- s.LanguageCode = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *DocumentClassifierProperties) SetMessage(v string) *DocumentClassifierProperties {
- s.Message = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *DocumentClassifierProperties) SetStatus(v string) *DocumentClassifierProperties {
- s.Status = &v
- return s
- }
- // SetSubmitTime sets the SubmitTime field's value.
- func (s *DocumentClassifierProperties) SetSubmitTime(v time.Time) *DocumentClassifierProperties {
- s.SubmitTime = &v
- return s
- }
- // SetTrainingEndTime sets the TrainingEndTime field's value.
- func (s *DocumentClassifierProperties) SetTrainingEndTime(v time.Time) *DocumentClassifierProperties {
- s.TrainingEndTime = &v
- return s
- }
- // SetTrainingStartTime sets the TrainingStartTime field's value.
- func (s *DocumentClassifierProperties) SetTrainingStartTime(v time.Time) *DocumentClassifierProperties {
- s.TrainingStartTime = &v
- return s
- }
- // Returns the code for the dominant language in the input text and the level
- // of confidence that Amazon Comprehend has in the accuracy of the detection.
- type DominantLanguage struct {
- _ struct{} `type:"structure"`
- // The RFC 5646 language code for the dominant language. For more information
- // about RFC 5646, see Tags for Identifying Languages (https://tools.ietf.org/html/rfc5646)
- // on the IETF Tools web site.
- LanguageCode *string `min:"1" type:"string"`
- // The level of confidence that Amazon Comprehend has in the accuracy of the
- // detection.
- Score *float64 `type:"float"`
- }
- // String returns the string representation
- func (s DominantLanguage) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DominantLanguage) GoString() string {
- return s.String()
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *DominantLanguage) SetLanguageCode(v string) *DominantLanguage {
- s.LanguageCode = &v
- return s
- }
- // SetScore sets the Score field's value.
- func (s *DominantLanguage) SetScore(v float64) *DominantLanguage {
- s.Score = &v
- return s
- }
- // Provides information for filtering a list of dominant language detection
- // jobs. For more information, see the operation.
- type DominantLanguageDetectionJobFilter struct {
- _ struct{} `type:"structure"`
- // Filters on the name of the job.
- JobName *string `min:"1" type:"string"`
- // Filters the list of jobs based on job status. Returns only jobs with the
- // specified status.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted after the specified time. Jobs are
- // returned in descending order, newest to oldest.
- SubmitTimeAfter *time.Time `type:"timestamp"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted before the specified time. Jobs are
- // returned in ascending order, oldest to newest.
- SubmitTimeBefore *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s DominantLanguageDetectionJobFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DominantLanguageDetectionJobFilter) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DominantLanguageDetectionJobFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DominantLanguageDetectionJobFilter"}
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobName sets the JobName field's value.
- func (s *DominantLanguageDetectionJobFilter) SetJobName(v string) *DominantLanguageDetectionJobFilter {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *DominantLanguageDetectionJobFilter) SetJobStatus(v string) *DominantLanguageDetectionJobFilter {
- s.JobStatus = &v
- return s
- }
- // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
- func (s *DominantLanguageDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *DominantLanguageDetectionJobFilter {
- s.SubmitTimeAfter = &v
- return s
- }
- // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
- func (s *DominantLanguageDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *DominantLanguageDetectionJobFilter {
- s.SubmitTimeBefore = &v
- return s
- }
- // Provides information about a dominant language detection job.
- type DominantLanguageDetectionJobProperties struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to
- // your input data.
- DataAccessRoleArn *string `min:"20" type:"string"`
- // The time that the dominant language detection job completed.
- EndTime *time.Time `type:"timestamp"`
- // The input data configuration that you supplied when you created the dominant
- // language detection job.
- InputDataConfig *InputDataConfig `type:"structure"`
- // The identifier assigned to the dominant language detection job.
- JobId *string `min:"1" type:"string"`
- // The name that you assigned to the dominant language detection job.
- JobName *string `min:"1" type:"string"`
- // The current status of the dominant language detection job. If the status
- // is FAILED, the Message field shows the reason for the failure.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // A description for the status of a job.
- Message *string `type:"string"`
- // The output data configuration that you supplied when you created the dominant
- // language detection job.
- OutputDataConfig *OutputDataConfig `type:"structure"`
- // The time that the dominant language detection job was submitted for processing.
- SubmitTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s DominantLanguageDetectionJobProperties) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DominantLanguageDetectionJobProperties) GoString() string {
- return s.String()
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *DominantLanguageDetectionJobProperties) SetDataAccessRoleArn(v string) *DominantLanguageDetectionJobProperties {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetEndTime sets the EndTime field's value.
- func (s *DominantLanguageDetectionJobProperties) SetEndTime(v time.Time) *DominantLanguageDetectionJobProperties {
- s.EndTime = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *DominantLanguageDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *DominantLanguageDetectionJobProperties {
- s.InputDataConfig = v
- return s
- }
- // SetJobId sets the JobId field's value.
- func (s *DominantLanguageDetectionJobProperties) SetJobId(v string) *DominantLanguageDetectionJobProperties {
- s.JobId = &v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *DominantLanguageDetectionJobProperties) SetJobName(v string) *DominantLanguageDetectionJobProperties {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *DominantLanguageDetectionJobProperties) SetJobStatus(v string) *DominantLanguageDetectionJobProperties {
- s.JobStatus = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *DominantLanguageDetectionJobProperties) SetMessage(v string) *DominantLanguageDetectionJobProperties {
- s.Message = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *DominantLanguageDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *DominantLanguageDetectionJobProperties {
- s.OutputDataConfig = v
- return s
- }
- // SetSubmitTime sets the SubmitTime field's value.
- func (s *DominantLanguageDetectionJobProperties) SetSubmitTime(v time.Time) *DominantLanguageDetectionJobProperties {
- s.SubmitTime = &v
- return s
- }
- // Provides information for filtering a list of dominant language detection
- // jobs. For more information, see the operation.
- type EntitiesDetectionJobFilter struct {
- _ struct{} `type:"structure"`
- // Filters on the name of the job.
- JobName *string `min:"1" type:"string"`
- // Filters the list of jobs based on job status. Returns only jobs with the
- // specified status.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted after the specified time. Jobs are
- // returned in descending order, newest to oldest.
- SubmitTimeAfter *time.Time `type:"timestamp"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted before the specified time. Jobs are
- // returned in ascending order, oldest to newest.
- SubmitTimeBefore *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s EntitiesDetectionJobFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntitiesDetectionJobFilter) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *EntitiesDetectionJobFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EntitiesDetectionJobFilter"}
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobName sets the JobName field's value.
- func (s *EntitiesDetectionJobFilter) SetJobName(v string) *EntitiesDetectionJobFilter {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *EntitiesDetectionJobFilter) SetJobStatus(v string) *EntitiesDetectionJobFilter {
- s.JobStatus = &v
- return s
- }
- // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
- func (s *EntitiesDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *EntitiesDetectionJobFilter {
- s.SubmitTimeAfter = &v
- return s
- }
- // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
- func (s *EntitiesDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *EntitiesDetectionJobFilter {
- s.SubmitTimeBefore = &v
- return s
- }
- // Provides information about an entities detection job.
- type EntitiesDetectionJobProperties struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to
- // your input data.
- DataAccessRoleArn *string `min:"20" type:"string"`
- // The time that the entities detection job completed
- EndTime *time.Time `type:"timestamp"`
- // The Amazon Resource Name (ARN) that identifies the entity recognizer.
- EntityRecognizerArn *string `type:"string"`
- // The input data configuration that you supplied when you created the entities
- // detection job.
- InputDataConfig *InputDataConfig `type:"structure"`
- // The identifier assigned to the entities detection job.
- JobId *string `min:"1" type:"string"`
- // The name that you assigned the entities detection job.
- JobName *string `min:"1" type:"string"`
- // The current status of the entities detection job. If the status is FAILED,
- // the Message field shows the reason for the failure.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // The language code of the input documents.
- LanguageCode *string `type:"string" enum:"LanguageCode"`
- // A description of the status of a job.
- Message *string `type:"string"`
- // The output data configuration that you supplied when you created the entities
- // detection job.
- OutputDataConfig *OutputDataConfig `type:"structure"`
- // The time that the entities detection job was submitted for processing.
- SubmitTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s EntitiesDetectionJobProperties) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntitiesDetectionJobProperties) GoString() string {
- return s.String()
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *EntitiesDetectionJobProperties) SetDataAccessRoleArn(v string) *EntitiesDetectionJobProperties {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetEndTime sets the EndTime field's value.
- func (s *EntitiesDetectionJobProperties) SetEndTime(v time.Time) *EntitiesDetectionJobProperties {
- s.EndTime = &v
- return s
- }
- // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
- func (s *EntitiesDetectionJobProperties) SetEntityRecognizerArn(v string) *EntitiesDetectionJobProperties {
- s.EntityRecognizerArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *EntitiesDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *EntitiesDetectionJobProperties {
- s.InputDataConfig = v
- return s
- }
- // SetJobId sets the JobId field's value.
- func (s *EntitiesDetectionJobProperties) SetJobId(v string) *EntitiesDetectionJobProperties {
- s.JobId = &v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *EntitiesDetectionJobProperties) SetJobName(v string) *EntitiesDetectionJobProperties {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *EntitiesDetectionJobProperties) SetJobStatus(v string) *EntitiesDetectionJobProperties {
- s.JobStatus = &v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *EntitiesDetectionJobProperties) SetLanguageCode(v string) *EntitiesDetectionJobProperties {
- s.LanguageCode = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *EntitiesDetectionJobProperties) SetMessage(v string) *EntitiesDetectionJobProperties {
- s.Message = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *EntitiesDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *EntitiesDetectionJobProperties {
- s.OutputDataConfig = v
- return s
- }
- // SetSubmitTime sets the SubmitTime field's value.
- func (s *EntitiesDetectionJobProperties) SetSubmitTime(v time.Time) *EntitiesDetectionJobProperties {
- s.SubmitTime = &v
- return s
- }
- // Provides information about an entity.
- type Entity struct {
- _ struct{} `type:"structure"`
- // A character offset in the input text that shows where the entity begins (the
- // first character is at position 0). The offset returns the position of each
- // UTF-8 code point in the string. A code point is the abstract character from
- // a particular graphical representation. For example, a multi-byte UTF-8 character
- // maps to a single code point.
- BeginOffset *int64 `type:"integer"`
- // A character offset in the input text that shows where the entity ends. The
- // offset returns the position of each UTF-8 code point in the string. A code
- // point is the abstract character from a particular graphical representation.
- // For example, a multi-byte UTF-8 character maps to a single code point.
- EndOffset *int64 `type:"integer"`
- // The level of confidence that Amazon Comprehend has in the accuracy of the
- // detection.
- Score *float64 `type:"float"`
- // The text of the entity.
- Text *string `min:"1" type:"string"`
- // The entity's type.
- Type *string `type:"string" enum:"EntityType"`
- }
- // String returns the string representation
- func (s Entity) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Entity) GoString() string {
- return s.String()
- }
- // SetBeginOffset sets the BeginOffset field's value.
- func (s *Entity) SetBeginOffset(v int64) *Entity {
- s.BeginOffset = &v
- return s
- }
- // SetEndOffset sets the EndOffset field's value.
- func (s *Entity) SetEndOffset(v int64) *Entity {
- s.EndOffset = &v
- return s
- }
- // SetScore sets the Score field's value.
- func (s *Entity) SetScore(v float64) *Entity {
- s.Score = &v
- return s
- }
- // SetText sets the Text field's value.
- func (s *Entity) SetText(v string) *Entity {
- s.Text = &v
- return s
- }
- // SetType sets the Type field's value.
- func (s *Entity) SetType(v string) *Entity {
- s.Type = &v
- return s
- }
- // Describes the annotations associated with a entity recognizer.
- type EntityRecognizerAnnotations struct {
- _ struct{} `type:"structure"`
- // Specifies the Amazon S3 location where the annotations for an entity recognizer
- // are located. The URI must be in the same region as the API endpoint that
- // you are calling.
- //
- // S3Uri is a required field
- S3Uri *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s EntityRecognizerAnnotations) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerAnnotations) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *EntityRecognizerAnnotations) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerAnnotations"}
- if s.S3Uri == nil {
- invalidParams.Add(request.NewErrParamRequired("S3Uri"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetS3Uri sets the S3Uri field's value.
- func (s *EntityRecognizerAnnotations) SetS3Uri(v string) *EntityRecognizerAnnotations {
- s.S3Uri = &v
- return s
- }
- // Describes the training documents submitted with an entity recognizer.
- type EntityRecognizerDocuments struct {
- _ struct{} `type:"structure"`
- // Specifies the Amazon S3 location where the training documents for an entity
- // recognizer are located. The URI must be in the same region as the API endpoint
- // that you are calling.
- //
- // S3Uri is a required field
- S3Uri *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s EntityRecognizerDocuments) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerDocuments) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *EntityRecognizerDocuments) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerDocuments"}
- if s.S3Uri == nil {
- invalidParams.Add(request.NewErrParamRequired("S3Uri"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetS3Uri sets the S3Uri field's value.
- func (s *EntityRecognizerDocuments) SetS3Uri(v string) *EntityRecognizerDocuments {
- s.S3Uri = &v
- return s
- }
- // Describes the entity recognizer submitted with an entity recognizer.
- type EntityRecognizerEntityList struct {
- _ struct{} `type:"structure"`
- // Specifies the Amazon S3 location where the entity list is located. The URI
- // must be in the same region as the API endpoint that you are calling.
- //
- // S3Uri is a required field
- S3Uri *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s EntityRecognizerEntityList) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerEntityList) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *EntityRecognizerEntityList) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerEntityList"}
- if s.S3Uri == nil {
- invalidParams.Add(request.NewErrParamRequired("S3Uri"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetS3Uri sets the S3Uri field's value.
- func (s *EntityRecognizerEntityList) SetS3Uri(v string) *EntityRecognizerEntityList {
- s.S3Uri = &v
- return s
- }
- // Detailed information about the accuracy of an entity recognizer.
- type EntityRecognizerEvaluationMetrics struct {
- _ struct{} `type:"structure"`
- // A measure of how accurate the recognizer results are for the test data. It
- // is derived from the Precision and Recall values. The F1Score is the harmonic
- // average of the two scores. The highest score is 1, and the worst score is
- // 0.
- F1Score *float64 `type:"double"`
- // A measure of the usefulness of the recognizer results in the test data. High
- // precision means that the recognizer returned substantially more relevant
- // results than irrelevant ones.
- Precision *float64 `type:"double"`
- // A measure of how complete the recognizer results are for the test data. High
- // recall means that the recognizer returned most of the relevant results.
- Recall *float64 `type:"double"`
- }
- // String returns the string representation
- func (s EntityRecognizerEvaluationMetrics) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerEvaluationMetrics) GoString() string {
- return s.String()
- }
- // SetF1Score sets the F1Score field's value.
- func (s *EntityRecognizerEvaluationMetrics) SetF1Score(v float64) *EntityRecognizerEvaluationMetrics {
- s.F1Score = &v
- return s
- }
- // SetPrecision sets the Precision field's value.
- func (s *EntityRecognizerEvaluationMetrics) SetPrecision(v float64) *EntityRecognizerEvaluationMetrics {
- s.Precision = &v
- return s
- }
- // SetRecall sets the Recall field's value.
- func (s *EntityRecognizerEvaluationMetrics) SetRecall(v float64) *EntityRecognizerEvaluationMetrics {
- s.Recall = &v
- return s
- }
- // Provides information for filtering a list of entity recognizers. You can
- // only specify one filtering parameter in a request. For more information,
- // see the operation./>
- type EntityRecognizerFilter struct {
- _ struct{} `type:"structure"`
- // The status of an entity recognizer.
- Status *string `type:"string" enum:"ModelStatus"`
- // Filters the list of entities based on the time that the list was submitted
- // for processing. Returns only jobs submitted after the specified time. Jobs
- // are returned in ascending order, oldest to newest.
- SubmitTimeAfter *time.Time `type:"timestamp"`
- // Filters the list of entities based on the time that the list was submitted
- // for processing. Returns only jobs submitted before the specified time. Jobs
- // are returned in descending order, newest to oldest.
- SubmitTimeBefore *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s EntityRecognizerFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerFilter) GoString() string {
- return s.String()
- }
- // SetStatus sets the Status field's value.
- func (s *EntityRecognizerFilter) SetStatus(v string) *EntityRecognizerFilter {
- s.Status = &v
- return s
- }
- // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
- func (s *EntityRecognizerFilter) SetSubmitTimeAfter(v time.Time) *EntityRecognizerFilter {
- s.SubmitTimeAfter = &v
- return s
- }
- // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
- func (s *EntityRecognizerFilter) SetSubmitTimeBefore(v time.Time) *EntityRecognizerFilter {
- s.SubmitTimeBefore = &v
- return s
- }
- // Specifies the format and location of the input data.
- type EntityRecognizerInputDataConfig struct {
- _ struct{} `type:"structure"`
- // S3 location of the annotations file for an entity recognizer.
- Annotations *EntityRecognizerAnnotations `type:"structure"`
- // S3 location of the documents folder for an entity recognizer
- //
- // Documents is a required field
- Documents *EntityRecognizerDocuments `type:"structure" required:"true"`
- // S3 location of the entity list for an entity recognizer.
- EntityList *EntityRecognizerEntityList `type:"structure"`
- // The entity types in the input data for an entity recognizer.
- //
- // EntityTypes is a required field
- EntityTypes []*EntityTypesListItem `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s EntityRecognizerInputDataConfig) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerInputDataConfig) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *EntityRecognizerInputDataConfig) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerInputDataConfig"}
- if s.Documents == nil {
- invalidParams.Add(request.NewErrParamRequired("Documents"))
- }
- if s.EntityTypes == nil {
- invalidParams.Add(request.NewErrParamRequired("EntityTypes"))
- }
- if s.Annotations != nil {
- if err := s.Annotations.Validate(); err != nil {
- invalidParams.AddNested("Annotations", err.(request.ErrInvalidParams))
- }
- }
- if s.Documents != nil {
- if err := s.Documents.Validate(); err != nil {
- invalidParams.AddNested("Documents", err.(request.ErrInvalidParams))
- }
- }
- if s.EntityList != nil {
- if err := s.EntityList.Validate(); err != nil {
- invalidParams.AddNested("EntityList", err.(request.ErrInvalidParams))
- }
- }
- if s.EntityTypes != nil {
- for i, v := range s.EntityTypes {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EntityTypes", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetAnnotations sets the Annotations field's value.
- func (s *EntityRecognizerInputDataConfig) SetAnnotations(v *EntityRecognizerAnnotations) *EntityRecognizerInputDataConfig {
- s.Annotations = v
- return s
- }
- // SetDocuments sets the Documents field's value.
- func (s *EntityRecognizerInputDataConfig) SetDocuments(v *EntityRecognizerDocuments) *EntityRecognizerInputDataConfig {
- s.Documents = v
- return s
- }
- // SetEntityList sets the EntityList field's value.
- func (s *EntityRecognizerInputDataConfig) SetEntityList(v *EntityRecognizerEntityList) *EntityRecognizerInputDataConfig {
- s.EntityList = v
- return s
- }
- // SetEntityTypes sets the EntityTypes field's value.
- func (s *EntityRecognizerInputDataConfig) SetEntityTypes(v []*EntityTypesListItem) *EntityRecognizerInputDataConfig {
- s.EntityTypes = v
- return s
- }
- // Detailed information about an entity recognizer.
- type EntityRecognizerMetadata struct {
- _ struct{} `type:"structure"`
- // Entity types from the metadata of an entity recognizer.
- EntityTypes []*EntityRecognizerMetadataEntityTypesListItem `type:"list"`
- // Detailed information about the accuracy of an entity recognizer.
- EvaluationMetrics *EntityRecognizerEvaluationMetrics `type:"structure"`
- // The number of documents in the input data that were used to test the entity
- // recognizer. Typically this is 10 to 20 percent of the input documents.
- NumberOfTestDocuments *int64 `type:"integer"`
- // The number of documents in the input data that were used to train the entity
- // recognizer. Typically this is 80 to 90 percent of the input documents.
- NumberOfTrainedDocuments *int64 `type:"integer"`
- }
- // String returns the string representation
- func (s EntityRecognizerMetadata) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerMetadata) GoString() string {
- return s.String()
- }
- // SetEntityTypes sets the EntityTypes field's value.
- func (s *EntityRecognizerMetadata) SetEntityTypes(v []*EntityRecognizerMetadataEntityTypesListItem) *EntityRecognizerMetadata {
- s.EntityTypes = v
- return s
- }
- // SetEvaluationMetrics sets the EvaluationMetrics field's value.
- func (s *EntityRecognizerMetadata) SetEvaluationMetrics(v *EntityRecognizerEvaluationMetrics) *EntityRecognizerMetadata {
- s.EvaluationMetrics = v
- return s
- }
- // SetNumberOfTestDocuments sets the NumberOfTestDocuments field's value.
- func (s *EntityRecognizerMetadata) SetNumberOfTestDocuments(v int64) *EntityRecognizerMetadata {
- s.NumberOfTestDocuments = &v
- return s
- }
- // SetNumberOfTrainedDocuments sets the NumberOfTrainedDocuments field's value.
- func (s *EntityRecognizerMetadata) SetNumberOfTrainedDocuments(v int64) *EntityRecognizerMetadata {
- s.NumberOfTrainedDocuments = &v
- return s
- }
- // Individual item from the list of entity types in the metadata of an entity
- // recognizer.
- type EntityRecognizerMetadataEntityTypesListItem struct {
- _ struct{} `type:"structure"`
- // Type of entity from the list of entity types in the metadata of an entity
- // recognizer.
- Type *string `type:"string"`
- }
- // String returns the string representation
- func (s EntityRecognizerMetadataEntityTypesListItem) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerMetadataEntityTypesListItem) GoString() string {
- return s.String()
- }
- // SetType sets the Type field's value.
- func (s *EntityRecognizerMetadataEntityTypesListItem) SetType(v string) *EntityRecognizerMetadataEntityTypesListItem {
- s.Type = &v
- return s
- }
- // Describes information about an entity recognizer.
- type EntityRecognizerProperties struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role
- // that grants Amazon Comprehend read access to your input data.
- DataAccessRoleArn *string `min:"20" type:"string"`
- // The time that the recognizer creation completed.
- EndTime *time.Time `type:"timestamp"`
- // The Amazon Resource Name (ARN) that identifies the entity recognizer.
- EntityRecognizerArn *string `type:"string"`
- // The input data properties of an entity recognizer.
- InputDataConfig *EntityRecognizerInputDataConfig `type:"structure"`
- // The language of the input documents. All documents must be in the same language.
- // Only English ("en") is currently supported.
- LanguageCode *string `type:"string" enum:"LanguageCode"`
- // A description of the status of the recognizer.
- Message *string `type:"string"`
- // Provides information about an entity recognizer.
- RecognizerMetadata *EntityRecognizerMetadata `type:"structure"`
- // Provides the status of the entity recognizer.
- Status *string `type:"string" enum:"ModelStatus"`
- // The time that the recognizer was submitted for processing.
- SubmitTime *time.Time `type:"timestamp"`
- // The time that training of the entity recognizer was completed.
- TrainingEndTime *time.Time `type:"timestamp"`
- // The time that training of the entity recognizer started.
- TrainingStartTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s EntityRecognizerProperties) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityRecognizerProperties) GoString() string {
- return s.String()
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *EntityRecognizerProperties) SetDataAccessRoleArn(v string) *EntityRecognizerProperties {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetEndTime sets the EndTime field's value.
- func (s *EntityRecognizerProperties) SetEndTime(v time.Time) *EntityRecognizerProperties {
- s.EndTime = &v
- return s
- }
- // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
- func (s *EntityRecognizerProperties) SetEntityRecognizerArn(v string) *EntityRecognizerProperties {
- s.EntityRecognizerArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *EntityRecognizerProperties) SetInputDataConfig(v *EntityRecognizerInputDataConfig) *EntityRecognizerProperties {
- s.InputDataConfig = v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *EntityRecognizerProperties) SetLanguageCode(v string) *EntityRecognizerProperties {
- s.LanguageCode = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *EntityRecognizerProperties) SetMessage(v string) *EntityRecognizerProperties {
- s.Message = &v
- return s
- }
- // SetRecognizerMetadata sets the RecognizerMetadata field's value.
- func (s *EntityRecognizerProperties) SetRecognizerMetadata(v *EntityRecognizerMetadata) *EntityRecognizerProperties {
- s.RecognizerMetadata = v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *EntityRecognizerProperties) SetStatus(v string) *EntityRecognizerProperties {
- s.Status = &v
- return s
- }
- // SetSubmitTime sets the SubmitTime field's value.
- func (s *EntityRecognizerProperties) SetSubmitTime(v time.Time) *EntityRecognizerProperties {
- s.SubmitTime = &v
- return s
- }
- // SetTrainingEndTime sets the TrainingEndTime field's value.
- func (s *EntityRecognizerProperties) SetTrainingEndTime(v time.Time) *EntityRecognizerProperties {
- s.TrainingEndTime = &v
- return s
- }
- // SetTrainingStartTime sets the TrainingStartTime field's value.
- func (s *EntityRecognizerProperties) SetTrainingStartTime(v time.Time) *EntityRecognizerProperties {
- s.TrainingStartTime = &v
- return s
- }
- // Information about an individual item on a list of entity types.
- type EntityTypesListItem struct {
- _ struct{} `type:"structure"`
- // Entity type of an item on an entity type list.
- //
- // Type is a required field
- Type *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s EntityTypesListItem) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EntityTypesListItem) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *EntityTypesListItem) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EntityTypesListItem"}
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetType sets the Type field's value.
- func (s *EntityTypesListItem) SetType(v string) *EntityTypesListItem {
- s.Type = &v
- return s
- }
- // The input properties for a topic detection job.
- type InputDataConfig struct {
- _ struct{} `type:"structure"`
- // Specifies how the text in an input file should be processed:
- //
- // * ONE_DOC_PER_FILE - Each file is considered a separate document. Use
- // this option when you are processing large documents, such as newspaper
- // articles or scientific papers.
- //
- // * ONE_DOC_PER_LINE - Each line in a file is considered a separate document.
- // Use this option when you are processing many short documents, such as
- // text messages.
- InputFormat *string `type:"string" enum:"InputFormat"`
- // The Amazon S3 URI for the input data. The URI must be in same region as the
- // API endpoint that you are calling. The URI can point to a single input file
- // or it can provide the prefix for a collection of data files.
- //
- // For example, if you use the URI S3://bucketName/prefix, if the prefix is
- // a single file, Amazon Comprehend uses that file as input. If more than one
- // file begins with the prefix, Amazon Comprehend uses all of them as input.
- //
- // S3Uri is a required field
- S3Uri *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s InputDataConfig) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s InputDataConfig) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *InputDataConfig) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InputDataConfig"}
- if s.S3Uri == nil {
- invalidParams.Add(request.NewErrParamRequired("S3Uri"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetInputFormat sets the InputFormat field's value.
- func (s *InputDataConfig) SetInputFormat(v string) *InputDataConfig {
- s.InputFormat = &v
- return s
- }
- // SetS3Uri sets the S3Uri field's value.
- func (s *InputDataConfig) SetS3Uri(v string) *InputDataConfig {
- s.S3Uri = &v
- return s
- }
- // Describes a key noun phrase.
- type KeyPhrase struct {
- _ struct{} `type:"structure"`
- // A character offset in the input text that shows where the key phrase begins
- // (the first character is at position 0). The offset returns the position of
- // each UTF-8 code point in the string. A code point is the abstract character
- // from a particular graphical representation. For example, a multi-byte UTF-8
- // character maps to a single code point.
- BeginOffset *int64 `type:"integer"`
- // A character offset in the input text where the key phrase ends. The offset
- // returns the position of each UTF-8 code point in the string. A code point
- // is the abstract character from a particular graphical representation. For
- // example, a multi-byte UTF-8 character maps to a single code point.
- EndOffset *int64 `type:"integer"`
- // The level of confidence that Amazon Comprehend has in the accuracy of the
- // detection.
- Score *float64 `type:"float"`
- // The text of a key noun phrase.
- Text *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s KeyPhrase) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s KeyPhrase) GoString() string {
- return s.String()
- }
- // SetBeginOffset sets the BeginOffset field's value.
- func (s *KeyPhrase) SetBeginOffset(v int64) *KeyPhrase {
- s.BeginOffset = &v
- return s
- }
- // SetEndOffset sets the EndOffset field's value.
- func (s *KeyPhrase) SetEndOffset(v int64) *KeyPhrase {
- s.EndOffset = &v
- return s
- }
- // SetScore sets the Score field's value.
- func (s *KeyPhrase) SetScore(v float64) *KeyPhrase {
- s.Score = &v
- return s
- }
- // SetText sets the Text field's value.
- func (s *KeyPhrase) SetText(v string) *KeyPhrase {
- s.Text = &v
- return s
- }
- // Provides information for filtering a list of dominant language detection
- // jobs. For more information, see the operation.
- type KeyPhrasesDetectionJobFilter struct {
- _ struct{} `type:"structure"`
- // Filters on the name of the job.
- JobName *string `min:"1" type:"string"`
- // Filters the list of jobs based on job status. Returns only jobs with the
- // specified status.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted after the specified time. Jobs are
- // returned in descending order, newest to oldest.
- SubmitTimeAfter *time.Time `type:"timestamp"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted before the specified time. Jobs are
- // returned in ascending order, oldest to newest.
- SubmitTimeBefore *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s KeyPhrasesDetectionJobFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s KeyPhrasesDetectionJobFilter) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *KeyPhrasesDetectionJobFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "KeyPhrasesDetectionJobFilter"}
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobName sets the JobName field's value.
- func (s *KeyPhrasesDetectionJobFilter) SetJobName(v string) *KeyPhrasesDetectionJobFilter {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *KeyPhrasesDetectionJobFilter) SetJobStatus(v string) *KeyPhrasesDetectionJobFilter {
- s.JobStatus = &v
- return s
- }
- // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
- func (s *KeyPhrasesDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *KeyPhrasesDetectionJobFilter {
- s.SubmitTimeAfter = &v
- return s
- }
- // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
- func (s *KeyPhrasesDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *KeyPhrasesDetectionJobFilter {
- s.SubmitTimeBefore = &v
- return s
- }
- // Provides information about a key phrases detection job.
- type KeyPhrasesDetectionJobProperties struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to
- // your input data.
- DataAccessRoleArn *string `min:"20" type:"string"`
- // The time that the key phrases detection job completed.
- EndTime *time.Time `type:"timestamp"`
- // The input data configuration that you supplied when you created the key phrases
- // detection job.
- InputDataConfig *InputDataConfig `type:"structure"`
- // The identifier assigned to the key phrases detection job.
- JobId *string `min:"1" type:"string"`
- // The name that you assigned the key phrases detection job.
- JobName *string `min:"1" type:"string"`
- // The current status of the key phrases detection job. If the status is FAILED,
- // the Message field shows the reason for the failure.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // The language code of the input documents.
- LanguageCode *string `type:"string" enum:"LanguageCode"`
- // A description of the status of a job.
- Message *string `type:"string"`
- // The output data configuration that you supplied when you created the key
- // phrases detection job.
- OutputDataConfig *OutputDataConfig `type:"structure"`
- // The time that the key phrases detection job was submitted for processing.
- SubmitTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s KeyPhrasesDetectionJobProperties) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s KeyPhrasesDetectionJobProperties) GoString() string {
- return s.String()
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetDataAccessRoleArn(v string) *KeyPhrasesDetectionJobProperties {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetEndTime sets the EndTime field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetEndTime(v time.Time) *KeyPhrasesDetectionJobProperties {
- s.EndTime = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *KeyPhrasesDetectionJobProperties {
- s.InputDataConfig = v
- return s
- }
- // SetJobId sets the JobId field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetJobId(v string) *KeyPhrasesDetectionJobProperties {
- s.JobId = &v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetJobName(v string) *KeyPhrasesDetectionJobProperties {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetJobStatus(v string) *KeyPhrasesDetectionJobProperties {
- s.JobStatus = &v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetLanguageCode(v string) *KeyPhrasesDetectionJobProperties {
- s.LanguageCode = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetMessage(v string) *KeyPhrasesDetectionJobProperties {
- s.Message = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *KeyPhrasesDetectionJobProperties {
- s.OutputDataConfig = v
- return s
- }
- // SetSubmitTime sets the SubmitTime field's value.
- func (s *KeyPhrasesDetectionJobProperties) SetSubmitTime(v time.Time) *KeyPhrasesDetectionJobProperties {
- s.SubmitTime = &v
- return s
- }
- type ListDocumentClassificationJobsInput struct {
- _ struct{} `type:"structure"`
- // Filters the jobs that are returned. You can filter jobs on their names, status,
- // or the date and time that they were submitted. You can only set one filter
- // at a time.
- Filter *DocumentClassificationJobFilter `type:"structure"`
- // The maximum number of results to return in each page. The default is 100.
- MaxResults *int64 `min:"1" type:"integer"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListDocumentClassificationJobsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListDocumentClassificationJobsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListDocumentClassificationJobsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListDocumentClassificationJobsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilter sets the Filter field's value.
- func (s *ListDocumentClassificationJobsInput) SetFilter(v *DocumentClassificationJobFilter) *ListDocumentClassificationJobsInput {
- s.Filter = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListDocumentClassificationJobsInput) SetMaxResults(v int64) *ListDocumentClassificationJobsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListDocumentClassificationJobsInput) SetNextToken(v string) *ListDocumentClassificationJobsInput {
- s.NextToken = &v
- return s
- }
- type ListDocumentClassificationJobsOutput struct {
- _ struct{} `type:"structure"`
- // A list containing the properties of each job returned.
- DocumentClassificationJobPropertiesList []*DocumentClassificationJobProperties `type:"list"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListDocumentClassificationJobsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListDocumentClassificationJobsOutput) GoString() string {
- return s.String()
- }
- // SetDocumentClassificationJobPropertiesList sets the DocumentClassificationJobPropertiesList field's value.
- func (s *ListDocumentClassificationJobsOutput) SetDocumentClassificationJobPropertiesList(v []*DocumentClassificationJobProperties) *ListDocumentClassificationJobsOutput {
- s.DocumentClassificationJobPropertiesList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListDocumentClassificationJobsOutput) SetNextToken(v string) *ListDocumentClassificationJobsOutput {
- s.NextToken = &v
- return s
- }
- type ListDocumentClassifiersInput struct {
- _ struct{} `type:"structure"`
- // Filters the jobs that are returned. You can filter jobs on their name, status,
- // or the date and time that they were submitted. You can only set one filter
- // at a time.
- Filter *DocumentClassifierFilter `type:"structure"`
- // The maximum number of results to return in each page. The default is 100.
- MaxResults *int64 `min:"1" type:"integer"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListDocumentClassifiersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListDocumentClassifiersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListDocumentClassifiersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListDocumentClassifiersInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilter sets the Filter field's value.
- func (s *ListDocumentClassifiersInput) SetFilter(v *DocumentClassifierFilter) *ListDocumentClassifiersInput {
- s.Filter = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListDocumentClassifiersInput) SetMaxResults(v int64) *ListDocumentClassifiersInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListDocumentClassifiersInput) SetNextToken(v string) *ListDocumentClassifiersInput {
- s.NextToken = &v
- return s
- }
- type ListDocumentClassifiersOutput struct {
- _ struct{} `type:"structure"`
- // A list containing the properties of each job returned.
- DocumentClassifierPropertiesList []*DocumentClassifierProperties `type:"list"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListDocumentClassifiersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListDocumentClassifiersOutput) GoString() string {
- return s.String()
- }
- // SetDocumentClassifierPropertiesList sets the DocumentClassifierPropertiesList field's value.
- func (s *ListDocumentClassifiersOutput) SetDocumentClassifierPropertiesList(v []*DocumentClassifierProperties) *ListDocumentClassifiersOutput {
- s.DocumentClassifierPropertiesList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListDocumentClassifiersOutput) SetNextToken(v string) *ListDocumentClassifiersOutput {
- s.NextToken = &v
- return s
- }
- type ListDominantLanguageDetectionJobsInput struct {
- _ struct{} `type:"structure"`
- // Filters that jobs that are returned. You can filter jobs on their name, status,
- // or the date and time that they were submitted. You can only set one filter
- // at a time.
- Filter *DominantLanguageDetectionJobFilter `type:"structure"`
- // The maximum number of results to return in each page. The default is 100.
- MaxResults *int64 `min:"1" type:"integer"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListDominantLanguageDetectionJobsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListDominantLanguageDetectionJobsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListDominantLanguageDetectionJobsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListDominantLanguageDetectionJobsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilter sets the Filter field's value.
- func (s *ListDominantLanguageDetectionJobsInput) SetFilter(v *DominantLanguageDetectionJobFilter) *ListDominantLanguageDetectionJobsInput {
- s.Filter = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListDominantLanguageDetectionJobsInput) SetMaxResults(v int64) *ListDominantLanguageDetectionJobsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListDominantLanguageDetectionJobsInput) SetNextToken(v string) *ListDominantLanguageDetectionJobsInput {
- s.NextToken = &v
- return s
- }
- type ListDominantLanguageDetectionJobsOutput struct {
- _ struct{} `type:"structure"`
- // A list containing the properties of each job that is returned.
- DominantLanguageDetectionJobPropertiesList []*DominantLanguageDetectionJobProperties `type:"list"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListDominantLanguageDetectionJobsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListDominantLanguageDetectionJobsOutput) GoString() string {
- return s.String()
- }
- // SetDominantLanguageDetectionJobPropertiesList sets the DominantLanguageDetectionJobPropertiesList field's value.
- func (s *ListDominantLanguageDetectionJobsOutput) SetDominantLanguageDetectionJobPropertiesList(v []*DominantLanguageDetectionJobProperties) *ListDominantLanguageDetectionJobsOutput {
- s.DominantLanguageDetectionJobPropertiesList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListDominantLanguageDetectionJobsOutput) SetNextToken(v string) *ListDominantLanguageDetectionJobsOutput {
- s.NextToken = &v
- return s
- }
- type ListEntitiesDetectionJobsInput struct {
- _ struct{} `type:"structure"`
- // Filters the jobs that are returned. You can filter jobs on their name, status,
- // or the date and time that they were submitted. You can only set one filter
- // at a time.
- Filter *EntitiesDetectionJobFilter `type:"structure"`
- // The maximum number of results to return in each page. The default is 100.
- MaxResults *int64 `min:"1" type:"integer"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListEntitiesDetectionJobsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListEntitiesDetectionJobsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListEntitiesDetectionJobsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListEntitiesDetectionJobsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilter sets the Filter field's value.
- func (s *ListEntitiesDetectionJobsInput) SetFilter(v *EntitiesDetectionJobFilter) *ListEntitiesDetectionJobsInput {
- s.Filter = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListEntitiesDetectionJobsInput) SetMaxResults(v int64) *ListEntitiesDetectionJobsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListEntitiesDetectionJobsInput) SetNextToken(v string) *ListEntitiesDetectionJobsInput {
- s.NextToken = &v
- return s
- }
- type ListEntitiesDetectionJobsOutput struct {
- _ struct{} `type:"structure"`
- // A list containing the properties of each job that is returned.
- EntitiesDetectionJobPropertiesList []*EntitiesDetectionJobProperties `type:"list"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListEntitiesDetectionJobsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListEntitiesDetectionJobsOutput) GoString() string {
- return s.String()
- }
- // SetEntitiesDetectionJobPropertiesList sets the EntitiesDetectionJobPropertiesList field's value.
- func (s *ListEntitiesDetectionJobsOutput) SetEntitiesDetectionJobPropertiesList(v []*EntitiesDetectionJobProperties) *ListEntitiesDetectionJobsOutput {
- s.EntitiesDetectionJobPropertiesList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListEntitiesDetectionJobsOutput) SetNextToken(v string) *ListEntitiesDetectionJobsOutput {
- s.NextToken = &v
- return s
- }
- type ListEntityRecognizersInput struct {
- _ struct{} `type:"structure"`
- // Filters the list of entities returned. You can filter on Status, SubmitTimeBefore,
- // or SubmitTimeAfter. You can only set one filter at a time.
- Filter *EntityRecognizerFilter `type:"structure"`
- // The maximum number of results to return on each page. The default is 100.
- MaxResults *int64 `min:"1" type:"integer"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListEntityRecognizersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListEntityRecognizersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListEntityRecognizersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListEntityRecognizersInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilter sets the Filter field's value.
- func (s *ListEntityRecognizersInput) SetFilter(v *EntityRecognizerFilter) *ListEntityRecognizersInput {
- s.Filter = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListEntityRecognizersInput) SetMaxResults(v int64) *ListEntityRecognizersInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListEntityRecognizersInput) SetNextToken(v string) *ListEntityRecognizersInput {
- s.NextToken = &v
- return s
- }
- type ListEntityRecognizersOutput struct {
- _ struct{} `type:"structure"`
- // The list of properties of an entity recognizer.
- EntityRecognizerPropertiesList []*EntityRecognizerProperties `type:"list"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListEntityRecognizersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListEntityRecognizersOutput) GoString() string {
- return s.String()
- }
- // SetEntityRecognizerPropertiesList sets the EntityRecognizerPropertiesList field's value.
- func (s *ListEntityRecognizersOutput) SetEntityRecognizerPropertiesList(v []*EntityRecognizerProperties) *ListEntityRecognizersOutput {
- s.EntityRecognizerPropertiesList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListEntityRecognizersOutput) SetNextToken(v string) *ListEntityRecognizersOutput {
- s.NextToken = &v
- return s
- }
- type ListKeyPhrasesDetectionJobsInput struct {
- _ struct{} `type:"structure"`
- // Filters the jobs that are returned. You can filter jobs on their name, status,
- // or the date and time that they were submitted. You can only set one filter
- // at a time.
- Filter *KeyPhrasesDetectionJobFilter `type:"structure"`
- // The maximum number of results to return in each page. The default is 100.
- MaxResults *int64 `min:"1" type:"integer"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListKeyPhrasesDetectionJobsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListKeyPhrasesDetectionJobsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListKeyPhrasesDetectionJobsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListKeyPhrasesDetectionJobsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilter sets the Filter field's value.
- func (s *ListKeyPhrasesDetectionJobsInput) SetFilter(v *KeyPhrasesDetectionJobFilter) *ListKeyPhrasesDetectionJobsInput {
- s.Filter = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListKeyPhrasesDetectionJobsInput) SetMaxResults(v int64) *ListKeyPhrasesDetectionJobsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListKeyPhrasesDetectionJobsInput) SetNextToken(v string) *ListKeyPhrasesDetectionJobsInput {
- s.NextToken = &v
- return s
- }
- type ListKeyPhrasesDetectionJobsOutput struct {
- _ struct{} `type:"structure"`
- // A list containing the properties of each job that is returned.
- KeyPhrasesDetectionJobPropertiesList []*KeyPhrasesDetectionJobProperties `type:"list"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListKeyPhrasesDetectionJobsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListKeyPhrasesDetectionJobsOutput) GoString() string {
- return s.String()
- }
- // SetKeyPhrasesDetectionJobPropertiesList sets the KeyPhrasesDetectionJobPropertiesList field's value.
- func (s *ListKeyPhrasesDetectionJobsOutput) SetKeyPhrasesDetectionJobPropertiesList(v []*KeyPhrasesDetectionJobProperties) *ListKeyPhrasesDetectionJobsOutput {
- s.KeyPhrasesDetectionJobPropertiesList = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListKeyPhrasesDetectionJobsOutput) SetNextToken(v string) *ListKeyPhrasesDetectionJobsOutput {
- s.NextToken = &v
- return s
- }
- type ListSentimentDetectionJobsInput struct {
- _ struct{} `type:"structure"`
- // Filters the jobs that are returned. You can filter jobs on their name, status,
- // or the date and time that they were submitted. You can only set one filter
- // at a time.
- Filter *SentimentDetectionJobFilter `type:"structure"`
- // The maximum number of results to return in each page. The default is 100.
- MaxResults *int64 `min:"1" type:"integer"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListSentimentDetectionJobsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListSentimentDetectionJobsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListSentimentDetectionJobsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListSentimentDetectionJobsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilter sets the Filter field's value.
- func (s *ListSentimentDetectionJobsInput) SetFilter(v *SentimentDetectionJobFilter) *ListSentimentDetectionJobsInput {
- s.Filter = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListSentimentDetectionJobsInput) SetMaxResults(v int64) *ListSentimentDetectionJobsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListSentimentDetectionJobsInput) SetNextToken(v string) *ListSentimentDetectionJobsInput {
- s.NextToken = &v
- return s
- }
- type ListSentimentDetectionJobsOutput struct {
- _ struct{} `type:"structure"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- // A list containing the properties of each job that is returned.
- SentimentDetectionJobPropertiesList []*SentimentDetectionJobProperties `type:"list"`
- }
- // String returns the string representation
- func (s ListSentimentDetectionJobsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListSentimentDetectionJobsOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListSentimentDetectionJobsOutput) SetNextToken(v string) *ListSentimentDetectionJobsOutput {
- s.NextToken = &v
- return s
- }
- // SetSentimentDetectionJobPropertiesList sets the SentimentDetectionJobPropertiesList field's value.
- func (s *ListSentimentDetectionJobsOutput) SetSentimentDetectionJobPropertiesList(v []*SentimentDetectionJobProperties) *ListSentimentDetectionJobsOutput {
- s.SentimentDetectionJobPropertiesList = v
- return s
- }
- type ListTopicsDetectionJobsInput struct {
- _ struct{} `type:"structure"`
- // Filters the jobs that are returned. Jobs can be filtered on their name, status,
- // or the date and time that they were submitted. You can set only one filter
- // at a time.
- Filter *TopicsDetectionJobFilter `type:"structure"`
- // The maximum number of results to return in each page. The default is 100.
- MaxResults *int64 `min:"1" type:"integer"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListTopicsDetectionJobsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListTopicsDetectionJobsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListTopicsDetectionJobsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListTopicsDetectionJobsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFilter sets the Filter field's value.
- func (s *ListTopicsDetectionJobsInput) SetFilter(v *TopicsDetectionJobFilter) *ListTopicsDetectionJobsInput {
- s.Filter = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListTopicsDetectionJobsInput) SetMaxResults(v int64) *ListTopicsDetectionJobsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListTopicsDetectionJobsInput) SetNextToken(v string) *ListTopicsDetectionJobsInput {
- s.NextToken = &v
- return s
- }
- type ListTopicsDetectionJobsOutput struct {
- _ struct{} `type:"structure"`
- // Identifies the next page of results to return.
- NextToken *string `min:"1" type:"string"`
- // A list containing the properties of each job that is returned.
- TopicsDetectionJobPropertiesList []*TopicsDetectionJobProperties `type:"list"`
- }
- // String returns the string representation
- func (s ListTopicsDetectionJobsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListTopicsDetectionJobsOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListTopicsDetectionJobsOutput) SetNextToken(v string) *ListTopicsDetectionJobsOutput {
- s.NextToken = &v
- return s
- }
- // SetTopicsDetectionJobPropertiesList sets the TopicsDetectionJobPropertiesList field's value.
- func (s *ListTopicsDetectionJobsOutput) SetTopicsDetectionJobPropertiesList(v []*TopicsDetectionJobProperties) *ListTopicsDetectionJobsOutput {
- s.TopicsDetectionJobPropertiesList = v
- return s
- }
- // Provides configuration parameters for the output of topic detection jobs.
- type OutputDataConfig struct {
- _ struct{} `type:"structure"`
- // When you use the OutputDataConfig object with asynchronous operations, you
- // specify the Amazon S3 location where you want to write the output data. The
- // URI must be in the same region as the API endpoint that you are calling.
- // The location is used as the prefix for the actual location of the output
- // file.
- //
- // When the topic detection job is finished, the service creates an output file
- // in a directory specific to the job. The S3Uri field contains the location
- // of the output file, called output.tar.gz. It is a compressed archive that
- // contains the ouput of the operation.
- //
- // S3Uri is a required field
- S3Uri *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s OutputDataConfig) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s OutputDataConfig) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *OutputDataConfig) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"}
- if s.S3Uri == nil {
- invalidParams.Add(request.NewErrParamRequired("S3Uri"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetS3Uri sets the S3Uri field's value.
- func (s *OutputDataConfig) SetS3Uri(v string) *OutputDataConfig {
- s.S3Uri = &v
- return s
- }
- // Identifies the part of speech represented by the token and gives the confidence
- // that Amazon Comprehend has that the part of speech was correctly identified.
- // For more information about the parts of speech that Amazon Comprehend can
- // identify, see how-syntax.
- type PartOfSpeechTag struct {
- _ struct{} `type:"structure"`
- // The confidence that Amazon Comprehend has that the part of speech was correctly
- // identified.
- Score *float64 `type:"float"`
- // Identifies the part of speech that the token represents.
- Tag *string `type:"string" enum:"PartOfSpeechTagType"`
- }
- // String returns the string representation
- func (s PartOfSpeechTag) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PartOfSpeechTag) GoString() string {
- return s.String()
- }
- // SetScore sets the Score field's value.
- func (s *PartOfSpeechTag) SetScore(v float64) *PartOfSpeechTag {
- s.Score = &v
- return s
- }
- // SetTag sets the Tag field's value.
- func (s *PartOfSpeechTag) SetTag(v string) *PartOfSpeechTag {
- s.Tag = &v
- return s
- }
- // Provides information for filtering a list of dominant language detection
- // jobs. For more information, see the operation.
- type SentimentDetectionJobFilter struct {
- _ struct{} `type:"structure"`
- // Filters on the name of the job.
- JobName *string `min:"1" type:"string"`
- // Filters the list of jobs based on job status. Returns only jobs with the
- // specified status.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted after the specified time. Jobs are
- // returned in descending order, newest to oldest.
- SubmitTimeAfter *time.Time `type:"timestamp"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Returns only jobs submitted before the specified time. Jobs are
- // returned in ascending order, oldest to newest.
- SubmitTimeBefore *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s SentimentDetectionJobFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SentimentDetectionJobFilter) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *SentimentDetectionJobFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SentimentDetectionJobFilter"}
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobName sets the JobName field's value.
- func (s *SentimentDetectionJobFilter) SetJobName(v string) *SentimentDetectionJobFilter {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *SentimentDetectionJobFilter) SetJobStatus(v string) *SentimentDetectionJobFilter {
- s.JobStatus = &v
- return s
- }
- // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
- func (s *SentimentDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *SentimentDetectionJobFilter {
- s.SubmitTimeAfter = &v
- return s
- }
- // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
- func (s *SentimentDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *SentimentDetectionJobFilter {
- s.SubmitTimeBefore = &v
- return s
- }
- // Provides information about a sentiment detection job.
- type SentimentDetectionJobProperties struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to
- // your input data.
- DataAccessRoleArn *string `min:"20" type:"string"`
- // The time that the sentiment detection job ended.
- EndTime *time.Time `type:"timestamp"`
- // The input data configuration that you supplied when you created the sentiment
- // detection job.
- InputDataConfig *InputDataConfig `type:"structure"`
- // The identifier assigned to the sentiment detection job.
- JobId *string `min:"1" type:"string"`
- // The name that you assigned to the sentiment detection job
- JobName *string `min:"1" type:"string"`
- // The current status of the sentiment detection job. If the status is FAILED,
- // the Messages field shows the reason for the failure.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // The language code of the input documents.
- LanguageCode *string `type:"string" enum:"LanguageCode"`
- // A description of the status of a job.
- Message *string `type:"string"`
- // The output data configuration that you supplied when you created the sentiment
- // detection job.
- OutputDataConfig *OutputDataConfig `type:"structure"`
- // The time that the sentiment detection job was submitted for processing.
- SubmitTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s SentimentDetectionJobProperties) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SentimentDetectionJobProperties) GoString() string {
- return s.String()
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *SentimentDetectionJobProperties) SetDataAccessRoleArn(v string) *SentimentDetectionJobProperties {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetEndTime sets the EndTime field's value.
- func (s *SentimentDetectionJobProperties) SetEndTime(v time.Time) *SentimentDetectionJobProperties {
- s.EndTime = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *SentimentDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *SentimentDetectionJobProperties {
- s.InputDataConfig = v
- return s
- }
- // SetJobId sets the JobId field's value.
- func (s *SentimentDetectionJobProperties) SetJobId(v string) *SentimentDetectionJobProperties {
- s.JobId = &v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *SentimentDetectionJobProperties) SetJobName(v string) *SentimentDetectionJobProperties {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *SentimentDetectionJobProperties) SetJobStatus(v string) *SentimentDetectionJobProperties {
- s.JobStatus = &v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *SentimentDetectionJobProperties) SetLanguageCode(v string) *SentimentDetectionJobProperties {
- s.LanguageCode = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *SentimentDetectionJobProperties) SetMessage(v string) *SentimentDetectionJobProperties {
- s.Message = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *SentimentDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *SentimentDetectionJobProperties {
- s.OutputDataConfig = v
- return s
- }
- // SetSubmitTime sets the SubmitTime field's value.
- func (s *SentimentDetectionJobProperties) SetSubmitTime(v time.Time) *SentimentDetectionJobProperties {
- s.SubmitTime = &v
- return s
- }
- // Describes the level of confidence that Amazon Comprehend has in the accuracy
- // of its detection of sentiments.
- type SentimentScore struct {
- _ struct{} `type:"structure"`
- // The level of confidence that Amazon Comprehend has in the accuracy of its
- // detection of the MIXED sentiment.
- Mixed *float64 `type:"float"`
- // The level of confidence that Amazon Comprehend has in the accuracy of its
- // detection of the NEGATIVE sentiment.
- Negative *float64 `type:"float"`
- // The level of confidence that Amazon Comprehend has in the accuracy of its
- // detection of the NEUTRAL sentiment.
- Neutral *float64 `type:"float"`
- // The level of confidence that Amazon Comprehend has in the accuracy of its
- // detection of the POSITIVE sentiment.
- Positive *float64 `type:"float"`
- }
- // String returns the string representation
- func (s SentimentScore) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SentimentScore) GoString() string {
- return s.String()
- }
- // SetMixed sets the Mixed field's value.
- func (s *SentimentScore) SetMixed(v float64) *SentimentScore {
- s.Mixed = &v
- return s
- }
- // SetNegative sets the Negative field's value.
- func (s *SentimentScore) SetNegative(v float64) *SentimentScore {
- s.Negative = &v
- return s
- }
- // SetNeutral sets the Neutral field's value.
- func (s *SentimentScore) SetNeutral(v float64) *SentimentScore {
- s.Neutral = &v
- return s
- }
- // SetPositive sets the Positive field's value.
- func (s *SentimentScore) SetPositive(v float64) *SentimentScore {
- s.Positive = &v
- return s
- }
- type StartDocumentClassificationJobInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the request. If you do not set the client request
- // token, Amazon Comprehend generates one.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
- // (IAM) role that grants Amazon Comprehend read access to your input data.
- //
- // DataAccessRoleArn is a required field
- DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
- // The Amazon Resource Name (ARN) of the document classifier to use to process
- // the job.
- //
- // DocumentClassifierArn is a required field
- DocumentClassifierArn *string `type:"string" required:"true"`
- // Specifies the format and location of the input data for the job.
- //
- // InputDataConfig is a required field
- InputDataConfig *InputDataConfig `type:"structure" required:"true"`
- // The identifier of the job.
- JobName *string `min:"1" type:"string"`
- // Specifies where to send the output files.
- //
- // OutputDataConfig is a required field
- OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s StartDocumentClassificationJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartDocumentClassificationJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartDocumentClassificationJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartDocumentClassificationJobInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.DataAccessRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
- }
- if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
- }
- if s.DocumentClassifierArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn"))
- }
- if s.InputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
- }
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if s.OutputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
- }
- if s.InputDataConfig != nil {
- if err := s.InputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if s.OutputDataConfig != nil {
- if err := s.OutputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetClientRequestToken sets the ClientRequestToken field's value.
- func (s *StartDocumentClassificationJobInput) SetClientRequestToken(v string) *StartDocumentClassificationJobInput {
- s.ClientRequestToken = &v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *StartDocumentClassificationJobInput) SetDataAccessRoleArn(v string) *StartDocumentClassificationJobInput {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
- func (s *StartDocumentClassificationJobInput) SetDocumentClassifierArn(v string) *StartDocumentClassificationJobInput {
- s.DocumentClassifierArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *StartDocumentClassificationJobInput) SetInputDataConfig(v *InputDataConfig) *StartDocumentClassificationJobInput {
- s.InputDataConfig = v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *StartDocumentClassificationJobInput) SetJobName(v string) *StartDocumentClassificationJobInput {
- s.JobName = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *StartDocumentClassificationJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartDocumentClassificationJobInput {
- s.OutputDataConfig = v
- return s
- }
- type StartDocumentClassificationJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier generated for the job. To get the status of the job, use this
- // identifier with the operation.
- JobId *string `min:"1" type:"string"`
- // The status of the job:
- //
- // * SUBMITTED - The job has been received and queued for processing.
- //
- // * IN_PROGRESS - Amazon Comprehend is processing the job.
- //
- // * COMPLETED - The job was successfully completed and the output is available.
- //
- // * FAILED - The job did not complete. For details, use the operation.
- //
- // * STOP_REQUESTED - Amazon Comprehend has received a stop request for the
- // job and is processing the request.
- //
- // * STOPPED - The job was successfully stopped without completing.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StartDocumentClassificationJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartDocumentClassificationJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StartDocumentClassificationJobOutput) SetJobId(v string) *StartDocumentClassificationJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StartDocumentClassificationJobOutput) SetJobStatus(v string) *StartDocumentClassificationJobOutput {
- s.JobStatus = &v
- return s
- }
- type StartDominantLanguageDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the request. If you do not set the client request
- // token, Amazon Comprehend generates one.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
- // (IAM) role that grants Amazon Comprehend read access to your input data.
- // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
- // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
- //
- // DataAccessRoleArn is a required field
- DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
- // Specifies the format and location of the input data for the job.
- //
- // InputDataConfig is a required field
- InputDataConfig *InputDataConfig `type:"structure" required:"true"`
- // An identifier for the job.
- JobName *string `min:"1" type:"string"`
- // Specifies where to send the output files.
- //
- // OutputDataConfig is a required field
- OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s StartDominantLanguageDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartDominantLanguageDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartDominantLanguageDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartDominantLanguageDetectionJobInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.DataAccessRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
- }
- if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
- }
- if s.InputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
- }
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if s.OutputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
- }
- if s.InputDataConfig != nil {
- if err := s.InputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if s.OutputDataConfig != nil {
- if err := s.OutputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetClientRequestToken sets the ClientRequestToken field's value.
- func (s *StartDominantLanguageDetectionJobInput) SetClientRequestToken(v string) *StartDominantLanguageDetectionJobInput {
- s.ClientRequestToken = &v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *StartDominantLanguageDetectionJobInput) SetDataAccessRoleArn(v string) *StartDominantLanguageDetectionJobInput {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *StartDominantLanguageDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartDominantLanguageDetectionJobInput {
- s.InputDataConfig = v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *StartDominantLanguageDetectionJobInput) SetJobName(v string) *StartDominantLanguageDetectionJobInput {
- s.JobName = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *StartDominantLanguageDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartDominantLanguageDetectionJobInput {
- s.OutputDataConfig = v
- return s
- }
- type StartDominantLanguageDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier generated for the job. To get the status of a job, use this
- // identifier with the operation.
- JobId *string `min:"1" type:"string"`
- // The status of the job.
- //
- // * SUBMITTED - The job has been received and is queued for processing.
- //
- // * IN_PROGRESS - Amazon Comprehend is processing the job.
- //
- // * COMPLETED - The job was successfully completed and the output is available.
- //
- // * FAILED - The job did not complete. To get details, use the operation.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StartDominantLanguageDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartDominantLanguageDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StartDominantLanguageDetectionJobOutput) SetJobId(v string) *StartDominantLanguageDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StartDominantLanguageDetectionJobOutput) SetJobStatus(v string) *StartDominantLanguageDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StartEntitiesDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the request. If you don't set the client request
- // token, Amazon Comprehend generates one.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
- // (IAM) role that grants Amazon Comprehend read access to your input data.
- // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
- // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
- //
- // DataAccessRoleArn is a required field
- DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
- // The Amazon Resource Name (ARN) that identifies the specific entity recognizer
- // to be used by the StartEntitiesDetectionJob. This ARN is optional and is
- // only used for a custom entity recognition job.
- EntityRecognizerArn *string `type:"string"`
- // Specifies the format and location of the input data for the job.
- //
- // InputDataConfig is a required field
- InputDataConfig *InputDataConfig `type:"structure" required:"true"`
- // The identifier of the job.
- JobName *string `min:"1" type:"string"`
- // The language of the input documents. All documents must be in the same language.
- // You can specify any of the languages supported by Amazon Comprehend: English
- // ("en"), Spanish ("es"), French ("fr"), German ("de"), Italian ("it"), or
- // Portuguese ("pt"). If custom entities recognition is used, this parameter
- // is ignored and the language used for training the model is used instead.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // Specifies where to send the output files.
- //
- // OutputDataConfig is a required field
- OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s StartEntitiesDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartEntitiesDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartEntitiesDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartEntitiesDetectionJobInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.DataAccessRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
- }
- if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
- }
- if s.InputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
- }
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.OutputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
- }
- if s.InputDataConfig != nil {
- if err := s.InputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if s.OutputDataConfig != nil {
- if err := s.OutputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetClientRequestToken sets the ClientRequestToken field's value.
- func (s *StartEntitiesDetectionJobInput) SetClientRequestToken(v string) *StartEntitiesDetectionJobInput {
- s.ClientRequestToken = &v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *StartEntitiesDetectionJobInput) SetDataAccessRoleArn(v string) *StartEntitiesDetectionJobInput {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
- func (s *StartEntitiesDetectionJobInput) SetEntityRecognizerArn(v string) *StartEntitiesDetectionJobInput {
- s.EntityRecognizerArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *StartEntitiesDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartEntitiesDetectionJobInput {
- s.InputDataConfig = v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *StartEntitiesDetectionJobInput) SetJobName(v string) *StartEntitiesDetectionJobInput {
- s.JobName = &v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *StartEntitiesDetectionJobInput) SetLanguageCode(v string) *StartEntitiesDetectionJobInput {
- s.LanguageCode = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *StartEntitiesDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartEntitiesDetectionJobInput {
- s.OutputDataConfig = v
- return s
- }
- type StartEntitiesDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier generated for the job. To get the status of job, use this
- // identifier with the operation.
- JobId *string `min:"1" type:"string"`
- // The status of the job.
- //
- // * SUBMITTED - The job has been received and is queued for processing.
- //
- // * IN_PROGRESS - Amazon Comprehend is processing the job.
- //
- // * COMPLETED - The job was successfully completed and the output is available.
- //
- // * FAILED - The job did not complete. To get details, use the operation.
- //
- // * STOP_REQUESTED - Amazon Comprehend has received a stop request for the
- // job and is processing the request.
- //
- // * STOPPED - The job was successfully stopped without completing.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StartEntitiesDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartEntitiesDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StartEntitiesDetectionJobOutput) SetJobId(v string) *StartEntitiesDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StartEntitiesDetectionJobOutput) SetJobStatus(v string) *StartEntitiesDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StartKeyPhrasesDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the request. If you don't set the client request
- // token, Amazon Comprehend generates one.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
- // (IAM) role that grants Amazon Comprehend read access to your input data.
- // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
- // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
- //
- // DataAccessRoleArn is a required field
- DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
- // Specifies the format and location of the input data for the job.
- //
- // InputDataConfig is a required field
- InputDataConfig *InputDataConfig `type:"structure" required:"true"`
- // The identifier of the job.
- JobName *string `min:"1" type:"string"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // Specifies where to send the output files.
- //
- // OutputDataConfig is a required field
- OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s StartKeyPhrasesDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartKeyPhrasesDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartKeyPhrasesDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartKeyPhrasesDetectionJobInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.DataAccessRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
- }
- if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
- }
- if s.InputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
- }
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.OutputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
- }
- if s.InputDataConfig != nil {
- if err := s.InputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if s.OutputDataConfig != nil {
- if err := s.OutputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetClientRequestToken sets the ClientRequestToken field's value.
- func (s *StartKeyPhrasesDetectionJobInput) SetClientRequestToken(v string) *StartKeyPhrasesDetectionJobInput {
- s.ClientRequestToken = &v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *StartKeyPhrasesDetectionJobInput) SetDataAccessRoleArn(v string) *StartKeyPhrasesDetectionJobInput {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *StartKeyPhrasesDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartKeyPhrasesDetectionJobInput {
- s.InputDataConfig = v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *StartKeyPhrasesDetectionJobInput) SetJobName(v string) *StartKeyPhrasesDetectionJobInput {
- s.JobName = &v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *StartKeyPhrasesDetectionJobInput) SetLanguageCode(v string) *StartKeyPhrasesDetectionJobInput {
- s.LanguageCode = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *StartKeyPhrasesDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartKeyPhrasesDetectionJobInput {
- s.OutputDataConfig = v
- return s
- }
- type StartKeyPhrasesDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier generated for the job. To get the status of a job, use this
- // identifier with the operation.
- JobId *string `min:"1" type:"string"`
- // The status of the job.
- //
- // * SUBMITTED - The job has been received and is queued for processing.
- //
- // * IN_PROGRESS - Amazon Comprehend is processing the job.
- //
- // * COMPLETED - The job was successfully completed and the output is available.
- //
- // * FAILED - The job did not complete. To get details, use the operation.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StartKeyPhrasesDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartKeyPhrasesDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StartKeyPhrasesDetectionJobOutput) SetJobId(v string) *StartKeyPhrasesDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StartKeyPhrasesDetectionJobOutput) SetJobStatus(v string) *StartKeyPhrasesDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StartSentimentDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the request. If you don't set the client request
- // token, Amazon Comprehend generates one.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
- // (IAM) role that grants Amazon Comprehend read access to your input data.
- // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
- // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
- //
- // DataAccessRoleArn is a required field
- DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
- // Specifies the format and location of the input data for the job.
- //
- // InputDataConfig is a required field
- InputDataConfig *InputDataConfig `type:"structure" required:"true"`
- // The identifier of the job.
- JobName *string `min:"1" type:"string"`
- // The language of the input documents. You can specify English ("en") or Spanish
- // ("es"). All documents must be in the same language.
- //
- // LanguageCode is a required field
- LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
- // Specifies where to send the output files.
- //
- // OutputDataConfig is a required field
- OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s StartSentimentDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartSentimentDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartSentimentDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartSentimentDetectionJobInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.DataAccessRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
- }
- if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
- }
- if s.InputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
- }
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if s.LanguageCode == nil {
- invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
- }
- if s.OutputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
- }
- if s.InputDataConfig != nil {
- if err := s.InputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if s.OutputDataConfig != nil {
- if err := s.OutputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetClientRequestToken sets the ClientRequestToken field's value.
- func (s *StartSentimentDetectionJobInput) SetClientRequestToken(v string) *StartSentimentDetectionJobInput {
- s.ClientRequestToken = &v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *StartSentimentDetectionJobInput) SetDataAccessRoleArn(v string) *StartSentimentDetectionJobInput {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *StartSentimentDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartSentimentDetectionJobInput {
- s.InputDataConfig = v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *StartSentimentDetectionJobInput) SetJobName(v string) *StartSentimentDetectionJobInput {
- s.JobName = &v
- return s
- }
- // SetLanguageCode sets the LanguageCode field's value.
- func (s *StartSentimentDetectionJobInput) SetLanguageCode(v string) *StartSentimentDetectionJobInput {
- s.LanguageCode = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *StartSentimentDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartSentimentDetectionJobInput {
- s.OutputDataConfig = v
- return s
- }
- type StartSentimentDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier generated for the job. To get the status of a job, use this
- // identifier with the operation.
- JobId *string `min:"1" type:"string"`
- // The status of the job.
- //
- // * SUBMITTED - The job has been received and is queued for processing.
- //
- // * IN_PROGRESS - Amazon Comprehend is processing the job.
- //
- // * COMPLETED - The job was successfully completed and the output is available.
- //
- // * FAILED - The job did not complete. To get details, use the operation.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StartSentimentDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartSentimentDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StartSentimentDetectionJobOutput) SetJobId(v string) *StartSentimentDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StartSentimentDetectionJobOutput) SetJobStatus(v string) *StartSentimentDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StartTopicsDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the request. If you do not set the client request
- // token, Amazon Comprehend generates one.
- ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
- // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
- // (IAM) role that grants Amazon Comprehend read access to your input data.
- // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions
- // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions).
- //
- // DataAccessRoleArn is a required field
- DataAccessRoleArn *string `min:"20" type:"string" required:"true"`
- // Specifies the format and location of the input data for the job.
- //
- // InputDataConfig is a required field
- InputDataConfig *InputDataConfig `type:"structure" required:"true"`
- // The identifier of the job.
- JobName *string `min:"1" type:"string"`
- // The number of topics to detect.
- NumberOfTopics *int64 `min:"1" type:"integer"`
- // Specifies where to send the output files. The output is a compressed archive
- // with two files, topic-terms.csv that lists the terms associated with each
- // topic, and doc-topics.csv that lists the documents associated with each topic
- //
- // OutputDataConfig is a required field
- OutputDataConfig *OutputDataConfig `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s StartTopicsDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartTopicsDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartTopicsDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartTopicsDetectionJobInput"}
- if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
- }
- if s.DataAccessRoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn"))
- }
- if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20))
- }
- if s.InputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("InputDataConfig"))
- }
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if s.NumberOfTopics != nil && *s.NumberOfTopics < 1 {
- invalidParams.Add(request.NewErrParamMinValue("NumberOfTopics", 1))
- }
- if s.OutputDataConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputDataConfig"))
- }
- if s.InputDataConfig != nil {
- if err := s.InputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if s.OutputDataConfig != nil {
- if err := s.OutputDataConfig.Validate(); err != nil {
- invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetClientRequestToken sets the ClientRequestToken field's value.
- func (s *StartTopicsDetectionJobInput) SetClientRequestToken(v string) *StartTopicsDetectionJobInput {
- s.ClientRequestToken = &v
- return s
- }
- // SetDataAccessRoleArn sets the DataAccessRoleArn field's value.
- func (s *StartTopicsDetectionJobInput) SetDataAccessRoleArn(v string) *StartTopicsDetectionJobInput {
- s.DataAccessRoleArn = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *StartTopicsDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartTopicsDetectionJobInput {
- s.InputDataConfig = v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *StartTopicsDetectionJobInput) SetJobName(v string) *StartTopicsDetectionJobInput {
- s.JobName = &v
- return s
- }
- // SetNumberOfTopics sets the NumberOfTopics field's value.
- func (s *StartTopicsDetectionJobInput) SetNumberOfTopics(v int64) *StartTopicsDetectionJobInput {
- s.NumberOfTopics = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *StartTopicsDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartTopicsDetectionJobInput {
- s.OutputDataConfig = v
- return s
- }
- type StartTopicsDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier generated for the job. To get the status of the job, use this
- // identifier with the DescribeTopicDetectionJob operation.
- JobId *string `min:"1" type:"string"`
- // The status of the job:
- //
- // * SUBMITTED - The job has been received and is queued for processing.
- //
- // * IN_PROGRESS - Amazon Comprehend is processing the job.
- //
- // * COMPLETED - The job was successfully completed and the output is available.
- //
- // * FAILED - The job did not complete. To get details, use the DescribeTopicDetectionJob
- // operation.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StartTopicsDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartTopicsDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StartTopicsDetectionJobOutput) SetJobId(v string) *StartTopicsDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StartTopicsDetectionJobOutput) SetJobStatus(v string) *StartTopicsDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StopDominantLanguageDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier of the dominant language detection job to stop.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopDominantLanguageDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopDominantLanguageDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopDominantLanguageDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopDominantLanguageDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *StopDominantLanguageDetectionJobInput) SetJobId(v string) *StopDominantLanguageDetectionJobInput {
- s.JobId = &v
- return s
- }
- type StopDominantLanguageDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier of the dominant language detection job to stop.
- JobId *string `min:"1" type:"string"`
- // Either STOP_REQUESTED if the job is currently running, or STOPPED if the
- // job was previously stopped with the StopDominantLanguageDetectionJob operation.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StopDominantLanguageDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopDominantLanguageDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StopDominantLanguageDetectionJobOutput) SetJobId(v string) *StopDominantLanguageDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StopDominantLanguageDetectionJobOutput) SetJobStatus(v string) *StopDominantLanguageDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StopEntitiesDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier of the entities detection job to stop.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopEntitiesDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopEntitiesDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopEntitiesDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopEntitiesDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *StopEntitiesDetectionJobInput) SetJobId(v string) *StopEntitiesDetectionJobInput {
- s.JobId = &v
- return s
- }
- type StopEntitiesDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier of the entities detection job to stop.
- JobId *string `min:"1" type:"string"`
- // Either STOP_REQUESTED if the job is currently running, or STOPPED if the
- // job was previously stopped with the StopEntitiesDetectionJob operation.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StopEntitiesDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopEntitiesDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StopEntitiesDetectionJobOutput) SetJobId(v string) *StopEntitiesDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StopEntitiesDetectionJobOutput) SetJobStatus(v string) *StopEntitiesDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StopKeyPhrasesDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier of the key phrases detection job to stop.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopKeyPhrasesDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopKeyPhrasesDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopKeyPhrasesDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopKeyPhrasesDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *StopKeyPhrasesDetectionJobInput) SetJobId(v string) *StopKeyPhrasesDetectionJobInput {
- s.JobId = &v
- return s
- }
- type StopKeyPhrasesDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier of the key phrases detection job to stop.
- JobId *string `min:"1" type:"string"`
- // Either STOP_REQUESTED if the job is currently running, or STOPPED if the
- // job was previously stopped with the StopKeyPhrasesDetectionJob operation.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StopKeyPhrasesDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopKeyPhrasesDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StopKeyPhrasesDetectionJobOutput) SetJobId(v string) *StopKeyPhrasesDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StopKeyPhrasesDetectionJobOutput) SetJobStatus(v string) *StopKeyPhrasesDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StopSentimentDetectionJobInput struct {
- _ struct{} `type:"structure"`
- // The identifier of the sentiment detection job to stop.
- //
- // JobId is a required field
- JobId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopSentimentDetectionJobInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopSentimentDetectionJobInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopSentimentDetectionJobInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopSentimentDetectionJobInput"}
- if s.JobId == nil {
- invalidParams.Add(request.NewErrParamRequired("JobId"))
- }
- if s.JobId != nil && len(*s.JobId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobId sets the JobId field's value.
- func (s *StopSentimentDetectionJobInput) SetJobId(v string) *StopSentimentDetectionJobInput {
- s.JobId = &v
- return s
- }
- type StopSentimentDetectionJobOutput struct {
- _ struct{} `type:"structure"`
- // The identifier of the sentiment detection job to stop.
- JobId *string `min:"1" type:"string"`
- // Either STOP_REQUESTED if the job is currently running, or STOPPED if the
- // job was previously stopped with the StopSentimentDetectionJob operation.
- JobStatus *string `type:"string" enum:"JobStatus"`
- }
- // String returns the string representation
- func (s StopSentimentDetectionJobOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopSentimentDetectionJobOutput) GoString() string {
- return s.String()
- }
- // SetJobId sets the JobId field's value.
- func (s *StopSentimentDetectionJobOutput) SetJobId(v string) *StopSentimentDetectionJobOutput {
- s.JobId = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *StopSentimentDetectionJobOutput) SetJobStatus(v string) *StopSentimentDetectionJobOutput {
- s.JobStatus = &v
- return s
- }
- type StopTrainingDocumentClassifierInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that identifies the document classifier currently
- // being trained.
- //
- // DocumentClassifierArn is a required field
- DocumentClassifierArn *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopTrainingDocumentClassifierInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopTrainingDocumentClassifierInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopTrainingDocumentClassifierInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopTrainingDocumentClassifierInput"}
- if s.DocumentClassifierArn == nil {
- invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetDocumentClassifierArn sets the DocumentClassifierArn field's value.
- func (s *StopTrainingDocumentClassifierInput) SetDocumentClassifierArn(v string) *StopTrainingDocumentClassifierInput {
- s.DocumentClassifierArn = &v
- return s
- }
- type StopTrainingDocumentClassifierOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s StopTrainingDocumentClassifierOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopTrainingDocumentClassifierOutput) GoString() string {
- return s.String()
- }
- type StopTrainingEntityRecognizerInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) that identifies the entity recognizer currently
- // being trained.
- //
- // EntityRecognizerArn is a required field
- EntityRecognizerArn *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopTrainingEntityRecognizerInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopTrainingEntityRecognizerInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopTrainingEntityRecognizerInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopTrainingEntityRecognizerInput"}
- if s.EntityRecognizerArn == nil {
- invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetEntityRecognizerArn sets the EntityRecognizerArn field's value.
- func (s *StopTrainingEntityRecognizerInput) SetEntityRecognizerArn(v string) *StopTrainingEntityRecognizerInput {
- s.EntityRecognizerArn = &v
- return s
- }
- type StopTrainingEntityRecognizerOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s StopTrainingEntityRecognizerOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopTrainingEntityRecognizerOutput) GoString() string {
- return s.String()
- }
- // Represents a work in the input text that was recognized and assigned a part
- // of speech. There is one syntax token record for each word in the source text.
- type SyntaxToken struct {
- _ struct{} `type:"structure"`
- // The zero-based offset from the beginning of the source text to the first
- // character in the word.
- BeginOffset *int64 `type:"integer"`
- // The zero-based offset from the beginning of the source text to the last character
- // in the word.
- EndOffset *int64 `type:"integer"`
- // Provides the part of speech label and the confidence level that Amazon Comprehend
- // has that the part of speech was correctly identified. For more information,
- // see how-syntax.
- PartOfSpeech *PartOfSpeechTag `type:"structure"`
- // The word that was recognized in the source text.
- Text *string `min:"1" type:"string"`
- // A unique identifier for a token.
- TokenId *int64 `type:"integer"`
- }
- // String returns the string representation
- func (s SyntaxToken) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SyntaxToken) GoString() string {
- return s.String()
- }
- // SetBeginOffset sets the BeginOffset field's value.
- func (s *SyntaxToken) SetBeginOffset(v int64) *SyntaxToken {
- s.BeginOffset = &v
- return s
- }
- // SetEndOffset sets the EndOffset field's value.
- func (s *SyntaxToken) SetEndOffset(v int64) *SyntaxToken {
- s.EndOffset = &v
- return s
- }
- // SetPartOfSpeech sets the PartOfSpeech field's value.
- func (s *SyntaxToken) SetPartOfSpeech(v *PartOfSpeechTag) *SyntaxToken {
- s.PartOfSpeech = v
- return s
- }
- // SetText sets the Text field's value.
- func (s *SyntaxToken) SetText(v string) *SyntaxToken {
- s.Text = &v
- return s
- }
- // SetTokenId sets the TokenId field's value.
- func (s *SyntaxToken) SetTokenId(v int64) *SyntaxToken {
- s.TokenId = &v
- return s
- }
- // Provides information for filtering topic detection jobs. For more information,
- // see .
- type TopicsDetectionJobFilter struct {
- _ struct{} `type:"structure"`
- JobName *string `min:"1" type:"string"`
- // Filters the list of topic detection jobs based on job status. Returns only
- // jobs with the specified status.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Only returns jobs submitted after the specified time. Jobs are
- // returned in ascending order, oldest to newest.
- SubmitTimeAfter *time.Time `type:"timestamp"`
- // Filters the list of jobs based on the time that the job was submitted for
- // processing. Only returns jobs submitted before the specified time. Jobs are
- // returned in descending order, newest to oldest.
- SubmitTimeBefore *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s TopicsDetectionJobFilter) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TopicsDetectionJobFilter) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *TopicsDetectionJobFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TopicsDetectionJobFilter"}
- if s.JobName != nil && len(*s.JobName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("JobName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetJobName sets the JobName field's value.
- func (s *TopicsDetectionJobFilter) SetJobName(v string) *TopicsDetectionJobFilter {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *TopicsDetectionJobFilter) SetJobStatus(v string) *TopicsDetectionJobFilter {
- s.JobStatus = &v
- return s
- }
- // SetSubmitTimeAfter sets the SubmitTimeAfter field's value.
- func (s *TopicsDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *TopicsDetectionJobFilter {
- s.SubmitTimeAfter = &v
- return s
- }
- // SetSubmitTimeBefore sets the SubmitTimeBefore field's value.
- func (s *TopicsDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *TopicsDetectionJobFilter {
- s.SubmitTimeBefore = &v
- return s
- }
- // Provides information about a topic detection job.
- type TopicsDetectionJobProperties struct {
- _ struct{} `type:"structure"`
- // The time that the topic detection job was completed.
- EndTime *time.Time `type:"timestamp"`
- // The input data configuration supplied when you created the topic detection
- // job.
- InputDataConfig *InputDataConfig `type:"structure"`
- // The identifier assigned to the topic detection job.
- JobId *string `min:"1" type:"string"`
- // The name of the topic detection job.
- JobName *string `min:"1" type:"string"`
- // The current status of the topic detection job. If the status is Failed, the
- // reason for the failure is shown in the Message field.
- JobStatus *string `type:"string" enum:"JobStatus"`
- // A description for the status of a job.
- Message *string `type:"string"`
- // The number of topics to detect supplied when you created the topic detection
- // job. The default is 10.
- NumberOfTopics *int64 `type:"integer"`
- // The output data configuration supplied when you created the topic detection
- // job.
- OutputDataConfig *OutputDataConfig `type:"structure"`
- // The time that the topic detection job was submitted for processing.
- SubmitTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s TopicsDetectionJobProperties) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TopicsDetectionJobProperties) GoString() string {
- return s.String()
- }
- // SetEndTime sets the EndTime field's value.
- func (s *TopicsDetectionJobProperties) SetEndTime(v time.Time) *TopicsDetectionJobProperties {
- s.EndTime = &v
- return s
- }
- // SetInputDataConfig sets the InputDataConfig field's value.
- func (s *TopicsDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *TopicsDetectionJobProperties {
- s.InputDataConfig = v
- return s
- }
- // SetJobId sets the JobId field's value.
- func (s *TopicsDetectionJobProperties) SetJobId(v string) *TopicsDetectionJobProperties {
- s.JobId = &v
- return s
- }
- // SetJobName sets the JobName field's value.
- func (s *TopicsDetectionJobProperties) SetJobName(v string) *TopicsDetectionJobProperties {
- s.JobName = &v
- return s
- }
- // SetJobStatus sets the JobStatus field's value.
- func (s *TopicsDetectionJobProperties) SetJobStatus(v string) *TopicsDetectionJobProperties {
- s.JobStatus = &v
- return s
- }
- // SetMessage sets the Message field's value.
- func (s *TopicsDetectionJobProperties) SetMessage(v string) *TopicsDetectionJobProperties {
- s.Message = &v
- return s
- }
- // SetNumberOfTopics sets the NumberOfTopics field's value.
- func (s *TopicsDetectionJobProperties) SetNumberOfTopics(v int64) *TopicsDetectionJobProperties {
- s.NumberOfTopics = &v
- return s
- }
- // SetOutputDataConfig sets the OutputDataConfig field's value.
- func (s *TopicsDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *TopicsDetectionJobProperties {
- s.OutputDataConfig = v
- return s
- }
- // SetSubmitTime sets the SubmitTime field's value.
- func (s *TopicsDetectionJobProperties) SetSubmitTime(v time.Time) *TopicsDetectionJobProperties {
- s.SubmitTime = &v
- return s
- }
- const (
- // EntityTypePerson is a EntityType enum value
- EntityTypePerson = "PERSON"
- // EntityTypeLocation is a EntityType enum value
- EntityTypeLocation = "LOCATION"
- // EntityTypeOrganization is a EntityType enum value
- EntityTypeOrganization = "ORGANIZATION"
- // EntityTypeCommercialItem is a EntityType enum value
- EntityTypeCommercialItem = "COMMERCIAL_ITEM"
- // EntityTypeEvent is a EntityType enum value
- EntityTypeEvent = "EVENT"
- // EntityTypeDate is a EntityType enum value
- EntityTypeDate = "DATE"
- // EntityTypeQuantity is a EntityType enum value
- EntityTypeQuantity = "QUANTITY"
- // EntityTypeTitle is a EntityType enum value
- EntityTypeTitle = "TITLE"
- // EntityTypeOther is a EntityType enum value
- EntityTypeOther = "OTHER"
- )
- const (
- // InputFormatOneDocPerFile is a InputFormat enum value
- InputFormatOneDocPerFile = "ONE_DOC_PER_FILE"
- // InputFormatOneDocPerLine is a InputFormat enum value
- InputFormatOneDocPerLine = "ONE_DOC_PER_LINE"
- )
- const (
- // JobStatusSubmitted is a JobStatus enum value
- JobStatusSubmitted = "SUBMITTED"
- // JobStatusInProgress is a JobStatus enum value
- JobStatusInProgress = "IN_PROGRESS"
- // JobStatusCompleted is a JobStatus enum value
- JobStatusCompleted = "COMPLETED"
- // JobStatusFailed is a JobStatus enum value
- JobStatusFailed = "FAILED"
- // JobStatusStopRequested is a JobStatus enum value
- JobStatusStopRequested = "STOP_REQUESTED"
- // JobStatusStopped is a JobStatus enum value
- JobStatusStopped = "STOPPED"
- )
- const (
- // LanguageCodeEn is a LanguageCode enum value
- LanguageCodeEn = "en"
- // LanguageCodeEs is a LanguageCode enum value
- LanguageCodeEs = "es"
- // LanguageCodeFr is a LanguageCode enum value
- LanguageCodeFr = "fr"
- // LanguageCodeDe is a LanguageCode enum value
- LanguageCodeDe = "de"
- // LanguageCodeIt is a LanguageCode enum value
- LanguageCodeIt = "it"
- // LanguageCodePt is a LanguageCode enum value
- LanguageCodePt = "pt"
- )
- const (
- // ModelStatusSubmitted is a ModelStatus enum value
- ModelStatusSubmitted = "SUBMITTED"
- // ModelStatusTraining is a ModelStatus enum value
- ModelStatusTraining = "TRAINING"
- // ModelStatusDeleting is a ModelStatus enum value
- ModelStatusDeleting = "DELETING"
- // ModelStatusStopRequested is a ModelStatus enum value
- ModelStatusStopRequested = "STOP_REQUESTED"
- // ModelStatusStopped is a ModelStatus enum value
- ModelStatusStopped = "STOPPED"
- // ModelStatusInError is a ModelStatus enum value
- ModelStatusInError = "IN_ERROR"
- // ModelStatusTrained is a ModelStatus enum value
- ModelStatusTrained = "TRAINED"
- )
- const (
- // PartOfSpeechTagTypeAdj is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeAdj = "ADJ"
- // PartOfSpeechTagTypeAdp is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeAdp = "ADP"
- // PartOfSpeechTagTypeAdv is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeAdv = "ADV"
- // PartOfSpeechTagTypeAux is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeAux = "AUX"
- // PartOfSpeechTagTypeConj is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeConj = "CONJ"
- // PartOfSpeechTagTypeCconj is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeCconj = "CCONJ"
- // PartOfSpeechTagTypeDet is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeDet = "DET"
- // PartOfSpeechTagTypeIntj is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeIntj = "INTJ"
- // PartOfSpeechTagTypeNoun is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeNoun = "NOUN"
- // PartOfSpeechTagTypeNum is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeNum = "NUM"
- // PartOfSpeechTagTypeO is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeO = "O"
- // PartOfSpeechTagTypePart is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypePart = "PART"
- // PartOfSpeechTagTypePron is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypePron = "PRON"
- // PartOfSpeechTagTypePropn is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypePropn = "PROPN"
- // PartOfSpeechTagTypePunct is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypePunct = "PUNCT"
- // PartOfSpeechTagTypeSconj is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeSconj = "SCONJ"
- // PartOfSpeechTagTypeSym is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeSym = "SYM"
- // PartOfSpeechTagTypeVerb is a PartOfSpeechTagType enum value
- PartOfSpeechTagTypeVerb = "VERB"
- )
- const (
- // SentimentTypePositive is a SentimentType enum value
- SentimentTypePositive = "POSITIVE"
- // SentimentTypeNegative is a SentimentType enum value
- SentimentTypeNegative = "NEGATIVE"
- // SentimentTypeNeutral is a SentimentType enum value
- SentimentTypeNeutral = "NEUTRAL"
- // SentimentTypeMixed is a SentimentType enum value
- SentimentTypeMixed = "MIXED"
- )
- const (
- // SyntaxLanguageCodeEn is a SyntaxLanguageCode enum value
- SyntaxLanguageCodeEn = "en"
- // SyntaxLanguageCodeEs is a SyntaxLanguageCode enum value
- SyntaxLanguageCodeEs = "es"
- // SyntaxLanguageCodeFr is a SyntaxLanguageCode enum value
- SyntaxLanguageCodeFr = "fr"
- // SyntaxLanguageCodeDe is a SyntaxLanguageCode enum value
- SyntaxLanguageCodeDe = "de"
- // SyntaxLanguageCodeIt is a SyntaxLanguageCode enum value
- SyntaxLanguageCodeIt = "it"
- // SyntaxLanguageCodePt is a SyntaxLanguageCode enum value
- SyntaxLanguageCodePt = "pt"
- )
|