api.go 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package transcribeservice
  3. import (
  4. "time"
  5. "github.com/aws/aws-sdk-go/aws"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. const opCreateVocabulary = "CreateVocabulary"
  12. // CreateVocabularyRequest generates a "aws/request.Request" representing the
  13. // client's request for the CreateVocabulary operation. The "output" return
  14. // value will be populated with the request's response once the request completes
  15. // successfully.
  16. //
  17. // Use "Send" method on the returned Request to send the API call to the service.
  18. // the "output" return value is not valid until after Send returns without error.
  19. //
  20. // See CreateVocabulary for more information on using the CreateVocabulary
  21. // API call, and error handling.
  22. //
  23. // This method is useful when you want to inject custom logic or configuration
  24. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  25. //
  26. //
  27. // // Example sending a request using the CreateVocabularyRequest method.
  28. // req, resp := client.CreateVocabularyRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateVocabulary
  36. func (c *TranscribeService) CreateVocabularyRequest(input *CreateVocabularyInput) (req *request.Request, output *CreateVocabularyOutput) {
  37. op := &request.Operation{
  38. Name: opCreateVocabulary,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &CreateVocabularyInput{}
  44. }
  45. output = &CreateVocabularyOutput{}
  46. req = c.newRequest(op, input, output)
  47. return
  48. }
  49. // CreateVocabulary API operation for Amazon Transcribe Service.
  50. //
  51. // Creates a new custom vocabulary that you can use to change the way Amazon
  52. // Transcribe handles transcription of an audio file.
  53. //
  54. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  55. // with awserr.Error's Code and Message methods to get detailed information about
  56. // the error.
  57. //
  58. // See the AWS API reference guide for Amazon Transcribe Service's
  59. // API operation CreateVocabulary for usage and error information.
  60. //
  61. // Returned Error Codes:
  62. // * ErrCodeBadRequestException "BadRequestException"
  63. // Your request didn't pass one or more validation tests. For example, if the
  64. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  65. // state (for example, it's "in progress"). See the exception Message field
  66. // for more information.
  67. //
  68. // * ErrCodeLimitExceededException "LimitExceededException"
  69. // Either you have sent too many requests or your input file is too long. Wait
  70. // before you resend your request, or use a smaller file and resend the request.
  71. //
  72. // * ErrCodeInternalFailureException "InternalFailureException"
  73. // There was an internal error. Check the error message and try your request
  74. // again.
  75. //
  76. // * ErrCodeConflictException "ConflictException"
  77. // When you are using the StartTranscriptionJob operation, the JobName field
  78. // is a duplicate of a previously entered job name. Resend your request with
  79. // a different name.
  80. //
  81. // When you are using the UpdateVocabulary operation, there are two jobs running
  82. // at the same time. Resend the second request later.
  83. //
  84. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateVocabulary
  85. func (c *TranscribeService) CreateVocabulary(input *CreateVocabularyInput) (*CreateVocabularyOutput, error) {
  86. req, out := c.CreateVocabularyRequest(input)
  87. return out, req.Send()
  88. }
  89. // CreateVocabularyWithContext is the same as CreateVocabulary with the addition of
  90. // the ability to pass a context and additional request options.
  91. //
  92. // See CreateVocabulary for details on how to use this API operation.
  93. //
  94. // The context must be non-nil and will be used for request cancellation. If
  95. // the context is nil a panic will occur. In the future the SDK may create
  96. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  97. // for more information on using Contexts.
  98. func (c *TranscribeService) CreateVocabularyWithContext(ctx aws.Context, input *CreateVocabularyInput, opts ...request.Option) (*CreateVocabularyOutput, error) {
  99. req, out := c.CreateVocabularyRequest(input)
  100. req.SetContext(ctx)
  101. req.ApplyOptions(opts...)
  102. return out, req.Send()
  103. }
  104. const opDeleteTranscriptionJob = "DeleteTranscriptionJob"
  105. // DeleteTranscriptionJobRequest generates a "aws/request.Request" representing the
  106. // client's request for the DeleteTranscriptionJob operation. The "output" return
  107. // value will be populated with the request's response once the request completes
  108. // successfully.
  109. //
  110. // Use "Send" method on the returned Request to send the API call to the service.
  111. // the "output" return value is not valid until after Send returns without error.
  112. //
  113. // See DeleteTranscriptionJob for more information on using the DeleteTranscriptionJob
  114. // API call, and error handling.
  115. //
  116. // This method is useful when you want to inject custom logic or configuration
  117. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  118. //
  119. //
  120. // // Example sending a request using the DeleteTranscriptionJobRequest method.
  121. // req, resp := client.DeleteTranscriptionJobRequest(params)
  122. //
  123. // err := req.Send()
  124. // if err == nil { // resp is now filled
  125. // fmt.Println(resp)
  126. // }
  127. //
  128. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteTranscriptionJob
  129. func (c *TranscribeService) DeleteTranscriptionJobRequest(input *DeleteTranscriptionJobInput) (req *request.Request, output *DeleteTranscriptionJobOutput) {
  130. op := &request.Operation{
  131. Name: opDeleteTranscriptionJob,
  132. HTTPMethod: "POST",
  133. HTTPPath: "/",
  134. }
  135. if input == nil {
  136. input = &DeleteTranscriptionJobInput{}
  137. }
  138. output = &DeleteTranscriptionJobOutput{}
  139. req = c.newRequest(op, input, output)
  140. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  141. return
  142. }
  143. // DeleteTranscriptionJob API operation for Amazon Transcribe Service.
  144. //
  145. // Deletes a previously submitted transcription job along with any other generated
  146. // results such as the transcription, models, and so on.
  147. //
  148. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  149. // with awserr.Error's Code and Message methods to get detailed information about
  150. // the error.
  151. //
  152. // See the AWS API reference guide for Amazon Transcribe Service's
  153. // API operation DeleteTranscriptionJob for usage and error information.
  154. //
  155. // Returned Error Codes:
  156. // * ErrCodeLimitExceededException "LimitExceededException"
  157. // Either you have sent too many requests or your input file is too long. Wait
  158. // before you resend your request, or use a smaller file and resend the request.
  159. //
  160. // * ErrCodeBadRequestException "BadRequestException"
  161. // Your request didn't pass one or more validation tests. For example, if the
  162. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  163. // state (for example, it's "in progress"). See the exception Message field
  164. // for more information.
  165. //
  166. // * ErrCodeInternalFailureException "InternalFailureException"
  167. // There was an internal error. Check the error message and try your request
  168. // again.
  169. //
  170. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteTranscriptionJob
  171. func (c *TranscribeService) DeleteTranscriptionJob(input *DeleteTranscriptionJobInput) (*DeleteTranscriptionJobOutput, error) {
  172. req, out := c.DeleteTranscriptionJobRequest(input)
  173. return out, req.Send()
  174. }
  175. // DeleteTranscriptionJobWithContext is the same as DeleteTranscriptionJob with the addition of
  176. // the ability to pass a context and additional request options.
  177. //
  178. // See DeleteTranscriptionJob for details on how to use this API operation.
  179. //
  180. // The context must be non-nil and will be used for request cancellation. If
  181. // the context is nil a panic will occur. In the future the SDK may create
  182. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  183. // for more information on using Contexts.
  184. func (c *TranscribeService) DeleteTranscriptionJobWithContext(ctx aws.Context, input *DeleteTranscriptionJobInput, opts ...request.Option) (*DeleteTranscriptionJobOutput, error) {
  185. req, out := c.DeleteTranscriptionJobRequest(input)
  186. req.SetContext(ctx)
  187. req.ApplyOptions(opts...)
  188. return out, req.Send()
  189. }
  190. const opDeleteVocabulary = "DeleteVocabulary"
  191. // DeleteVocabularyRequest generates a "aws/request.Request" representing the
  192. // client's request for the DeleteVocabulary operation. The "output" return
  193. // value will be populated with the request's response once the request completes
  194. // successfully.
  195. //
  196. // Use "Send" method on the returned Request to send the API call to the service.
  197. // the "output" return value is not valid until after Send returns without error.
  198. //
  199. // See DeleteVocabulary for more information on using the DeleteVocabulary
  200. // API call, and error handling.
  201. //
  202. // This method is useful when you want to inject custom logic or configuration
  203. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  204. //
  205. //
  206. // // Example sending a request using the DeleteVocabularyRequest method.
  207. // req, resp := client.DeleteVocabularyRequest(params)
  208. //
  209. // err := req.Send()
  210. // if err == nil { // resp is now filled
  211. // fmt.Println(resp)
  212. // }
  213. //
  214. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteVocabulary
  215. func (c *TranscribeService) DeleteVocabularyRequest(input *DeleteVocabularyInput) (req *request.Request, output *DeleteVocabularyOutput) {
  216. op := &request.Operation{
  217. Name: opDeleteVocabulary,
  218. HTTPMethod: "POST",
  219. HTTPPath: "/",
  220. }
  221. if input == nil {
  222. input = &DeleteVocabularyInput{}
  223. }
  224. output = &DeleteVocabularyOutput{}
  225. req = c.newRequest(op, input, output)
  226. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  227. return
  228. }
  229. // DeleteVocabulary API operation for Amazon Transcribe Service.
  230. //
  231. // Deletes a vocabulary from Amazon Transcribe.
  232. //
  233. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  234. // with awserr.Error's Code and Message methods to get detailed information about
  235. // the error.
  236. //
  237. // See the AWS API reference guide for Amazon Transcribe Service's
  238. // API operation DeleteVocabulary for usage and error information.
  239. //
  240. // Returned Error Codes:
  241. // * ErrCodeNotFoundException "NotFoundException"
  242. // We can't find the requested resource. Check the name and try your request
  243. // again.
  244. //
  245. // * ErrCodeLimitExceededException "LimitExceededException"
  246. // Either you have sent too many requests or your input file is too long. Wait
  247. // before you resend your request, or use a smaller file and resend the request.
  248. //
  249. // * ErrCodeBadRequestException "BadRequestException"
  250. // Your request didn't pass one or more validation tests. For example, if the
  251. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  252. // state (for example, it's "in progress"). See the exception Message field
  253. // for more information.
  254. //
  255. // * ErrCodeInternalFailureException "InternalFailureException"
  256. // There was an internal error. Check the error message and try your request
  257. // again.
  258. //
  259. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteVocabulary
  260. func (c *TranscribeService) DeleteVocabulary(input *DeleteVocabularyInput) (*DeleteVocabularyOutput, error) {
  261. req, out := c.DeleteVocabularyRequest(input)
  262. return out, req.Send()
  263. }
  264. // DeleteVocabularyWithContext is the same as DeleteVocabulary with the addition of
  265. // the ability to pass a context and additional request options.
  266. //
  267. // See DeleteVocabulary for details on how to use this API operation.
  268. //
  269. // The context must be non-nil and will be used for request cancellation. If
  270. // the context is nil a panic will occur. In the future the SDK may create
  271. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  272. // for more information on using Contexts.
  273. func (c *TranscribeService) DeleteVocabularyWithContext(ctx aws.Context, input *DeleteVocabularyInput, opts ...request.Option) (*DeleteVocabularyOutput, error) {
  274. req, out := c.DeleteVocabularyRequest(input)
  275. req.SetContext(ctx)
  276. req.ApplyOptions(opts...)
  277. return out, req.Send()
  278. }
  279. const opGetTranscriptionJob = "GetTranscriptionJob"
  280. // GetTranscriptionJobRequest generates a "aws/request.Request" representing the
  281. // client's request for the GetTranscriptionJob operation. The "output" return
  282. // value will be populated with the request's response once the request completes
  283. // successfully.
  284. //
  285. // Use "Send" method on the returned Request to send the API call to the service.
  286. // the "output" return value is not valid until after Send returns without error.
  287. //
  288. // See GetTranscriptionJob for more information on using the GetTranscriptionJob
  289. // API call, and error handling.
  290. //
  291. // This method is useful when you want to inject custom logic or configuration
  292. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  293. //
  294. //
  295. // // Example sending a request using the GetTranscriptionJobRequest method.
  296. // req, resp := client.GetTranscriptionJobRequest(params)
  297. //
  298. // err := req.Send()
  299. // if err == nil { // resp is now filled
  300. // fmt.Println(resp)
  301. // }
  302. //
  303. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJob
  304. func (c *TranscribeService) GetTranscriptionJobRequest(input *GetTranscriptionJobInput) (req *request.Request, output *GetTranscriptionJobOutput) {
  305. op := &request.Operation{
  306. Name: opGetTranscriptionJob,
  307. HTTPMethod: "POST",
  308. HTTPPath: "/",
  309. }
  310. if input == nil {
  311. input = &GetTranscriptionJobInput{}
  312. }
  313. output = &GetTranscriptionJobOutput{}
  314. req = c.newRequest(op, input, output)
  315. return
  316. }
  317. // GetTranscriptionJob API operation for Amazon Transcribe Service.
  318. //
  319. // Returns information about a transcription job. To see the status of the job,
  320. // check the TranscriptionJobStatus field. If the status is COMPLETED, the job
  321. // is finished and you can find the results at the location specified in the
  322. // TranscriptionFileUri field.
  323. //
  324. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  325. // with awserr.Error's Code and Message methods to get detailed information about
  326. // the error.
  327. //
  328. // See the AWS API reference guide for Amazon Transcribe Service's
  329. // API operation GetTranscriptionJob for usage and error information.
  330. //
  331. // Returned Error Codes:
  332. // * ErrCodeBadRequestException "BadRequestException"
  333. // Your request didn't pass one or more validation tests. For example, if the
  334. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  335. // state (for example, it's "in progress"). See the exception Message field
  336. // for more information.
  337. //
  338. // * ErrCodeLimitExceededException "LimitExceededException"
  339. // Either you have sent too many requests or your input file is too long. Wait
  340. // before you resend your request, or use a smaller file and resend the request.
  341. //
  342. // * ErrCodeInternalFailureException "InternalFailureException"
  343. // There was an internal error. Check the error message and try your request
  344. // again.
  345. //
  346. // * ErrCodeNotFoundException "NotFoundException"
  347. // We can't find the requested resource. Check the name and try your request
  348. // again.
  349. //
  350. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJob
  351. func (c *TranscribeService) GetTranscriptionJob(input *GetTranscriptionJobInput) (*GetTranscriptionJobOutput, error) {
  352. req, out := c.GetTranscriptionJobRequest(input)
  353. return out, req.Send()
  354. }
  355. // GetTranscriptionJobWithContext is the same as GetTranscriptionJob with the addition of
  356. // the ability to pass a context and additional request options.
  357. //
  358. // See GetTranscriptionJob for details on how to use this API operation.
  359. //
  360. // The context must be non-nil and will be used for request cancellation. If
  361. // the context is nil a panic will occur. In the future the SDK may create
  362. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  363. // for more information on using Contexts.
  364. func (c *TranscribeService) GetTranscriptionJobWithContext(ctx aws.Context, input *GetTranscriptionJobInput, opts ...request.Option) (*GetTranscriptionJobOutput, error) {
  365. req, out := c.GetTranscriptionJobRequest(input)
  366. req.SetContext(ctx)
  367. req.ApplyOptions(opts...)
  368. return out, req.Send()
  369. }
  370. const opGetVocabulary = "GetVocabulary"
  371. // GetVocabularyRequest generates a "aws/request.Request" representing the
  372. // client's request for the GetVocabulary operation. The "output" return
  373. // value will be populated with the request's response once the request completes
  374. // successfully.
  375. //
  376. // Use "Send" method on the returned Request to send the API call to the service.
  377. // the "output" return value is not valid until after Send returns without error.
  378. //
  379. // See GetVocabulary for more information on using the GetVocabulary
  380. // API call, and error handling.
  381. //
  382. // This method is useful when you want to inject custom logic or configuration
  383. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  384. //
  385. //
  386. // // Example sending a request using the GetVocabularyRequest method.
  387. // req, resp := client.GetVocabularyRequest(params)
  388. //
  389. // err := req.Send()
  390. // if err == nil { // resp is now filled
  391. // fmt.Println(resp)
  392. // }
  393. //
  394. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetVocabulary
  395. func (c *TranscribeService) GetVocabularyRequest(input *GetVocabularyInput) (req *request.Request, output *GetVocabularyOutput) {
  396. op := &request.Operation{
  397. Name: opGetVocabulary,
  398. HTTPMethod: "POST",
  399. HTTPPath: "/",
  400. }
  401. if input == nil {
  402. input = &GetVocabularyInput{}
  403. }
  404. output = &GetVocabularyOutput{}
  405. req = c.newRequest(op, input, output)
  406. return
  407. }
  408. // GetVocabulary API operation for Amazon Transcribe Service.
  409. //
  410. // Gets information about a vocabulary.
  411. //
  412. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  413. // with awserr.Error's Code and Message methods to get detailed information about
  414. // the error.
  415. //
  416. // See the AWS API reference guide for Amazon Transcribe Service's
  417. // API operation GetVocabulary for usage and error information.
  418. //
  419. // Returned Error Codes:
  420. // * ErrCodeNotFoundException "NotFoundException"
  421. // We can't find the requested resource. Check the name and try your request
  422. // again.
  423. //
  424. // * ErrCodeLimitExceededException "LimitExceededException"
  425. // Either you have sent too many requests or your input file is too long. Wait
  426. // before you resend your request, or use a smaller file and resend the request.
  427. //
  428. // * ErrCodeInternalFailureException "InternalFailureException"
  429. // There was an internal error. Check the error message and try your request
  430. // again.
  431. //
  432. // * ErrCodeBadRequestException "BadRequestException"
  433. // Your request didn't pass one or more validation tests. For example, if the
  434. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  435. // state (for example, it's "in progress"). See the exception Message field
  436. // for more information.
  437. //
  438. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetVocabulary
  439. func (c *TranscribeService) GetVocabulary(input *GetVocabularyInput) (*GetVocabularyOutput, error) {
  440. req, out := c.GetVocabularyRequest(input)
  441. return out, req.Send()
  442. }
  443. // GetVocabularyWithContext is the same as GetVocabulary with the addition of
  444. // the ability to pass a context and additional request options.
  445. //
  446. // See GetVocabulary for details on how to use this API operation.
  447. //
  448. // The context must be non-nil and will be used for request cancellation. If
  449. // the context is nil a panic will occur. In the future the SDK may create
  450. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  451. // for more information on using Contexts.
  452. func (c *TranscribeService) GetVocabularyWithContext(ctx aws.Context, input *GetVocabularyInput, opts ...request.Option) (*GetVocabularyOutput, error) {
  453. req, out := c.GetVocabularyRequest(input)
  454. req.SetContext(ctx)
  455. req.ApplyOptions(opts...)
  456. return out, req.Send()
  457. }
  458. const opListTranscriptionJobs = "ListTranscriptionJobs"
  459. // ListTranscriptionJobsRequest generates a "aws/request.Request" representing the
  460. // client's request for the ListTranscriptionJobs operation. The "output" return
  461. // value will be populated with the request's response once the request completes
  462. // successfully.
  463. //
  464. // Use "Send" method on the returned Request to send the API call to the service.
  465. // the "output" return value is not valid until after Send returns without error.
  466. //
  467. // See ListTranscriptionJobs for more information on using the ListTranscriptionJobs
  468. // API call, and error handling.
  469. //
  470. // This method is useful when you want to inject custom logic or configuration
  471. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  472. //
  473. //
  474. // // Example sending a request using the ListTranscriptionJobsRequest method.
  475. // req, resp := client.ListTranscriptionJobsRequest(params)
  476. //
  477. // err := req.Send()
  478. // if err == nil { // resp is now filled
  479. // fmt.Println(resp)
  480. // }
  481. //
  482. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs
  483. func (c *TranscribeService) ListTranscriptionJobsRequest(input *ListTranscriptionJobsInput) (req *request.Request, output *ListTranscriptionJobsOutput) {
  484. op := &request.Operation{
  485. Name: opListTranscriptionJobs,
  486. HTTPMethod: "POST",
  487. HTTPPath: "/",
  488. Paginator: &request.Paginator{
  489. InputTokens: []string{"NextToken"},
  490. OutputTokens: []string{"NextToken"},
  491. LimitToken: "MaxResults",
  492. TruncationToken: "",
  493. },
  494. }
  495. if input == nil {
  496. input = &ListTranscriptionJobsInput{}
  497. }
  498. output = &ListTranscriptionJobsOutput{}
  499. req = c.newRequest(op, input, output)
  500. return
  501. }
  502. // ListTranscriptionJobs API operation for Amazon Transcribe Service.
  503. //
  504. // Lists transcription jobs with the specified status.
  505. //
  506. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  507. // with awserr.Error's Code and Message methods to get detailed information about
  508. // the error.
  509. //
  510. // See the AWS API reference guide for Amazon Transcribe Service's
  511. // API operation ListTranscriptionJobs for usage and error information.
  512. //
  513. // Returned Error Codes:
  514. // * ErrCodeBadRequestException "BadRequestException"
  515. // Your request didn't pass one or more validation tests. For example, if the
  516. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  517. // state (for example, it's "in progress"). See the exception Message field
  518. // for more information.
  519. //
  520. // * ErrCodeLimitExceededException "LimitExceededException"
  521. // Either you have sent too many requests or your input file is too long. Wait
  522. // before you resend your request, or use a smaller file and resend the request.
  523. //
  524. // * ErrCodeInternalFailureException "InternalFailureException"
  525. // There was an internal error. Check the error message and try your request
  526. // again.
  527. //
  528. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs
  529. func (c *TranscribeService) ListTranscriptionJobs(input *ListTranscriptionJobsInput) (*ListTranscriptionJobsOutput, error) {
  530. req, out := c.ListTranscriptionJobsRequest(input)
  531. return out, req.Send()
  532. }
  533. // ListTranscriptionJobsWithContext is the same as ListTranscriptionJobs with the addition of
  534. // the ability to pass a context and additional request options.
  535. //
  536. // See ListTranscriptionJobs for details on how to use this API operation.
  537. //
  538. // The context must be non-nil and will be used for request cancellation. If
  539. // the context is nil a panic will occur. In the future the SDK may create
  540. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  541. // for more information on using Contexts.
  542. func (c *TranscribeService) ListTranscriptionJobsWithContext(ctx aws.Context, input *ListTranscriptionJobsInput, opts ...request.Option) (*ListTranscriptionJobsOutput, error) {
  543. req, out := c.ListTranscriptionJobsRequest(input)
  544. req.SetContext(ctx)
  545. req.ApplyOptions(opts...)
  546. return out, req.Send()
  547. }
  548. // ListTranscriptionJobsPages iterates over the pages of a ListTranscriptionJobs operation,
  549. // calling the "fn" function with the response data for each page. To stop
  550. // iterating, return false from the fn function.
  551. //
  552. // See ListTranscriptionJobs method for more information on how to use this operation.
  553. //
  554. // Note: This operation can generate multiple requests to a service.
  555. //
  556. // // Example iterating over at most 3 pages of a ListTranscriptionJobs operation.
  557. // pageNum := 0
  558. // err := client.ListTranscriptionJobsPages(params,
  559. // func(page *ListTranscriptionJobsOutput, lastPage bool) bool {
  560. // pageNum++
  561. // fmt.Println(page)
  562. // return pageNum <= 3
  563. // })
  564. //
  565. func (c *TranscribeService) ListTranscriptionJobsPages(input *ListTranscriptionJobsInput, fn func(*ListTranscriptionJobsOutput, bool) bool) error {
  566. return c.ListTranscriptionJobsPagesWithContext(aws.BackgroundContext(), input, fn)
  567. }
  568. // ListTranscriptionJobsPagesWithContext same as ListTranscriptionJobsPages except
  569. // it takes a Context and allows setting request options on the pages.
  570. //
  571. // The context must be non-nil and will be used for request cancellation. If
  572. // the context is nil a panic will occur. In the future the SDK may create
  573. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  574. // for more information on using Contexts.
  575. func (c *TranscribeService) ListTranscriptionJobsPagesWithContext(ctx aws.Context, input *ListTranscriptionJobsInput, fn func(*ListTranscriptionJobsOutput, bool) bool, opts ...request.Option) error {
  576. p := request.Pagination{
  577. NewRequest: func() (*request.Request, error) {
  578. var inCpy *ListTranscriptionJobsInput
  579. if input != nil {
  580. tmp := *input
  581. inCpy = &tmp
  582. }
  583. req, _ := c.ListTranscriptionJobsRequest(inCpy)
  584. req.SetContext(ctx)
  585. req.ApplyOptions(opts...)
  586. return req, nil
  587. },
  588. }
  589. cont := true
  590. for p.Next() && cont {
  591. cont = fn(p.Page().(*ListTranscriptionJobsOutput), !p.HasNextPage())
  592. }
  593. return p.Err()
  594. }
  595. const opListVocabularies = "ListVocabularies"
  596. // ListVocabulariesRequest generates a "aws/request.Request" representing the
  597. // client's request for the ListVocabularies operation. The "output" return
  598. // value will be populated with the request's response once the request completes
  599. // successfully.
  600. //
  601. // Use "Send" method on the returned Request to send the API call to the service.
  602. // the "output" return value is not valid until after Send returns without error.
  603. //
  604. // See ListVocabularies for more information on using the ListVocabularies
  605. // API call, and error handling.
  606. //
  607. // This method is useful when you want to inject custom logic or configuration
  608. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  609. //
  610. //
  611. // // Example sending a request using the ListVocabulariesRequest method.
  612. // req, resp := client.ListVocabulariesRequest(params)
  613. //
  614. // err := req.Send()
  615. // if err == nil { // resp is now filled
  616. // fmt.Println(resp)
  617. // }
  618. //
  619. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListVocabularies
  620. func (c *TranscribeService) ListVocabulariesRequest(input *ListVocabulariesInput) (req *request.Request, output *ListVocabulariesOutput) {
  621. op := &request.Operation{
  622. Name: opListVocabularies,
  623. HTTPMethod: "POST",
  624. HTTPPath: "/",
  625. Paginator: &request.Paginator{
  626. InputTokens: []string{"NextToken"},
  627. OutputTokens: []string{"NextToken"},
  628. LimitToken: "MaxResults",
  629. TruncationToken: "",
  630. },
  631. }
  632. if input == nil {
  633. input = &ListVocabulariesInput{}
  634. }
  635. output = &ListVocabulariesOutput{}
  636. req = c.newRequest(op, input, output)
  637. return
  638. }
  639. // ListVocabularies API operation for Amazon Transcribe Service.
  640. //
  641. // Returns a list of vocabularies that match the specified criteria. If no criteria
  642. // are specified, returns the entire list of vocabularies.
  643. //
  644. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  645. // with awserr.Error's Code and Message methods to get detailed information about
  646. // the error.
  647. //
  648. // See the AWS API reference guide for Amazon Transcribe Service's
  649. // API operation ListVocabularies for usage and error information.
  650. //
  651. // Returned Error Codes:
  652. // * ErrCodeBadRequestException "BadRequestException"
  653. // Your request didn't pass one or more validation tests. For example, if the
  654. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  655. // state (for example, it's "in progress"). See the exception Message field
  656. // for more information.
  657. //
  658. // * ErrCodeLimitExceededException "LimitExceededException"
  659. // Either you have sent too many requests or your input file is too long. Wait
  660. // before you resend your request, or use a smaller file and resend the request.
  661. //
  662. // * ErrCodeInternalFailureException "InternalFailureException"
  663. // There was an internal error. Check the error message and try your request
  664. // again.
  665. //
  666. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListVocabularies
  667. func (c *TranscribeService) ListVocabularies(input *ListVocabulariesInput) (*ListVocabulariesOutput, error) {
  668. req, out := c.ListVocabulariesRequest(input)
  669. return out, req.Send()
  670. }
  671. // ListVocabulariesWithContext is the same as ListVocabularies with the addition of
  672. // the ability to pass a context and additional request options.
  673. //
  674. // See ListVocabularies for details on how to use this API operation.
  675. //
  676. // The context must be non-nil and will be used for request cancellation. If
  677. // the context is nil a panic will occur. In the future the SDK may create
  678. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  679. // for more information on using Contexts.
  680. func (c *TranscribeService) ListVocabulariesWithContext(ctx aws.Context, input *ListVocabulariesInput, opts ...request.Option) (*ListVocabulariesOutput, error) {
  681. req, out := c.ListVocabulariesRequest(input)
  682. req.SetContext(ctx)
  683. req.ApplyOptions(opts...)
  684. return out, req.Send()
  685. }
  686. // ListVocabulariesPages iterates over the pages of a ListVocabularies operation,
  687. // calling the "fn" function with the response data for each page. To stop
  688. // iterating, return false from the fn function.
  689. //
  690. // See ListVocabularies method for more information on how to use this operation.
  691. //
  692. // Note: This operation can generate multiple requests to a service.
  693. //
  694. // // Example iterating over at most 3 pages of a ListVocabularies operation.
  695. // pageNum := 0
  696. // err := client.ListVocabulariesPages(params,
  697. // func(page *ListVocabulariesOutput, lastPage bool) bool {
  698. // pageNum++
  699. // fmt.Println(page)
  700. // return pageNum <= 3
  701. // })
  702. //
  703. func (c *TranscribeService) ListVocabulariesPages(input *ListVocabulariesInput, fn func(*ListVocabulariesOutput, bool) bool) error {
  704. return c.ListVocabulariesPagesWithContext(aws.BackgroundContext(), input, fn)
  705. }
  706. // ListVocabulariesPagesWithContext same as ListVocabulariesPages except
  707. // it takes a Context and allows setting request options on the pages.
  708. //
  709. // The context must be non-nil and will be used for request cancellation. If
  710. // the context is nil a panic will occur. In the future the SDK may create
  711. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  712. // for more information on using Contexts.
  713. func (c *TranscribeService) ListVocabulariesPagesWithContext(ctx aws.Context, input *ListVocabulariesInput, fn func(*ListVocabulariesOutput, bool) bool, opts ...request.Option) error {
  714. p := request.Pagination{
  715. NewRequest: func() (*request.Request, error) {
  716. var inCpy *ListVocabulariesInput
  717. if input != nil {
  718. tmp := *input
  719. inCpy = &tmp
  720. }
  721. req, _ := c.ListVocabulariesRequest(inCpy)
  722. req.SetContext(ctx)
  723. req.ApplyOptions(opts...)
  724. return req, nil
  725. },
  726. }
  727. cont := true
  728. for p.Next() && cont {
  729. cont = fn(p.Page().(*ListVocabulariesOutput), !p.HasNextPage())
  730. }
  731. return p.Err()
  732. }
  733. const opStartTranscriptionJob = "StartTranscriptionJob"
  734. // StartTranscriptionJobRequest generates a "aws/request.Request" representing the
  735. // client's request for the StartTranscriptionJob operation. The "output" return
  736. // value will be populated with the request's response once the request completes
  737. // successfully.
  738. //
  739. // Use "Send" method on the returned Request to send the API call to the service.
  740. // the "output" return value is not valid until after Send returns without error.
  741. //
  742. // See StartTranscriptionJob for more information on using the StartTranscriptionJob
  743. // API call, and error handling.
  744. //
  745. // This method is useful when you want to inject custom logic or configuration
  746. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  747. //
  748. //
  749. // // Example sending a request using the StartTranscriptionJobRequest method.
  750. // req, resp := client.StartTranscriptionJobRequest(params)
  751. //
  752. // err := req.Send()
  753. // if err == nil { // resp is now filled
  754. // fmt.Println(resp)
  755. // }
  756. //
  757. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob
  758. func (c *TranscribeService) StartTranscriptionJobRequest(input *StartTranscriptionJobInput) (req *request.Request, output *StartTranscriptionJobOutput) {
  759. op := &request.Operation{
  760. Name: opStartTranscriptionJob,
  761. HTTPMethod: "POST",
  762. HTTPPath: "/",
  763. }
  764. if input == nil {
  765. input = &StartTranscriptionJobInput{}
  766. }
  767. output = &StartTranscriptionJobOutput{}
  768. req = c.newRequest(op, input, output)
  769. return
  770. }
  771. // StartTranscriptionJob API operation for Amazon Transcribe Service.
  772. //
  773. // Starts an asynchronous job to transcribe speech to text.
  774. //
  775. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  776. // with awserr.Error's Code and Message methods to get detailed information about
  777. // the error.
  778. //
  779. // See the AWS API reference guide for Amazon Transcribe Service's
  780. // API operation StartTranscriptionJob for usage and error information.
  781. //
  782. // Returned Error Codes:
  783. // * ErrCodeBadRequestException "BadRequestException"
  784. // Your request didn't pass one or more validation tests. For example, if the
  785. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  786. // state (for example, it's "in progress"). See the exception Message field
  787. // for more information.
  788. //
  789. // * ErrCodeLimitExceededException "LimitExceededException"
  790. // Either you have sent too many requests or your input file is too long. Wait
  791. // before you resend your request, or use a smaller file and resend the request.
  792. //
  793. // * ErrCodeInternalFailureException "InternalFailureException"
  794. // There was an internal error. Check the error message and try your request
  795. // again.
  796. //
  797. // * ErrCodeConflictException "ConflictException"
  798. // When you are using the StartTranscriptionJob operation, the JobName field
  799. // is a duplicate of a previously entered job name. Resend your request with
  800. // a different name.
  801. //
  802. // When you are using the UpdateVocabulary operation, there are two jobs running
  803. // at the same time. Resend the second request later.
  804. //
  805. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob
  806. func (c *TranscribeService) StartTranscriptionJob(input *StartTranscriptionJobInput) (*StartTranscriptionJobOutput, error) {
  807. req, out := c.StartTranscriptionJobRequest(input)
  808. return out, req.Send()
  809. }
  810. // StartTranscriptionJobWithContext is the same as StartTranscriptionJob with the addition of
  811. // the ability to pass a context and additional request options.
  812. //
  813. // See StartTranscriptionJob for details on how to use this API operation.
  814. //
  815. // The context must be non-nil and will be used for request cancellation. If
  816. // the context is nil a panic will occur. In the future the SDK may create
  817. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  818. // for more information on using Contexts.
  819. func (c *TranscribeService) StartTranscriptionJobWithContext(ctx aws.Context, input *StartTranscriptionJobInput, opts ...request.Option) (*StartTranscriptionJobOutput, error) {
  820. req, out := c.StartTranscriptionJobRequest(input)
  821. req.SetContext(ctx)
  822. req.ApplyOptions(opts...)
  823. return out, req.Send()
  824. }
  825. const opUpdateVocabulary = "UpdateVocabulary"
  826. // UpdateVocabularyRequest generates a "aws/request.Request" representing the
  827. // client's request for the UpdateVocabulary operation. The "output" return
  828. // value will be populated with the request's response once the request completes
  829. // successfully.
  830. //
  831. // Use "Send" method on the returned Request to send the API call to the service.
  832. // the "output" return value is not valid until after Send returns without error.
  833. //
  834. // See UpdateVocabulary for more information on using the UpdateVocabulary
  835. // API call, and error handling.
  836. //
  837. // This method is useful when you want to inject custom logic or configuration
  838. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  839. //
  840. //
  841. // // Example sending a request using the UpdateVocabularyRequest method.
  842. // req, resp := client.UpdateVocabularyRequest(params)
  843. //
  844. // err := req.Send()
  845. // if err == nil { // resp is now filled
  846. // fmt.Println(resp)
  847. // }
  848. //
  849. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/UpdateVocabulary
  850. func (c *TranscribeService) UpdateVocabularyRequest(input *UpdateVocabularyInput) (req *request.Request, output *UpdateVocabularyOutput) {
  851. op := &request.Operation{
  852. Name: opUpdateVocabulary,
  853. HTTPMethod: "POST",
  854. HTTPPath: "/",
  855. }
  856. if input == nil {
  857. input = &UpdateVocabularyInput{}
  858. }
  859. output = &UpdateVocabularyOutput{}
  860. req = c.newRequest(op, input, output)
  861. return
  862. }
  863. // UpdateVocabulary API operation for Amazon Transcribe Service.
  864. //
  865. // Updates an existing vocabulary with new values. The UpdateVocabulary operation
  866. // overwrites all of the existing information with the values that you provide
  867. // in the request.
  868. //
  869. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  870. // with awserr.Error's Code and Message methods to get detailed information about
  871. // the error.
  872. //
  873. // See the AWS API reference guide for Amazon Transcribe Service's
  874. // API operation UpdateVocabulary for usage and error information.
  875. //
  876. // Returned Error Codes:
  877. // * ErrCodeBadRequestException "BadRequestException"
  878. // Your request didn't pass one or more validation tests. For example, if the
  879. // transcription you're trying to delete doesn't exist or if it is in a non-terminal
  880. // state (for example, it's "in progress"). See the exception Message field
  881. // for more information.
  882. //
  883. // * ErrCodeLimitExceededException "LimitExceededException"
  884. // Either you have sent too many requests or your input file is too long. Wait
  885. // before you resend your request, or use a smaller file and resend the request.
  886. //
  887. // * ErrCodeInternalFailureException "InternalFailureException"
  888. // There was an internal error. Check the error message and try your request
  889. // again.
  890. //
  891. // * ErrCodeNotFoundException "NotFoundException"
  892. // We can't find the requested resource. Check the name and try your request
  893. // again.
  894. //
  895. // * ErrCodeConflictException "ConflictException"
  896. // When you are using the StartTranscriptionJob operation, the JobName field
  897. // is a duplicate of a previously entered job name. Resend your request with
  898. // a different name.
  899. //
  900. // When you are using the UpdateVocabulary operation, there are two jobs running
  901. // at the same time. Resend the second request later.
  902. //
  903. // See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/UpdateVocabulary
  904. func (c *TranscribeService) UpdateVocabulary(input *UpdateVocabularyInput) (*UpdateVocabularyOutput, error) {
  905. req, out := c.UpdateVocabularyRequest(input)
  906. return out, req.Send()
  907. }
  908. // UpdateVocabularyWithContext is the same as UpdateVocabulary with the addition of
  909. // the ability to pass a context and additional request options.
  910. //
  911. // See UpdateVocabulary for details on how to use this API operation.
  912. //
  913. // The context must be non-nil and will be used for request cancellation. If
  914. // the context is nil a panic will occur. In the future the SDK may create
  915. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  916. // for more information on using Contexts.
  917. func (c *TranscribeService) UpdateVocabularyWithContext(ctx aws.Context, input *UpdateVocabularyInput, opts ...request.Option) (*UpdateVocabularyOutput, error) {
  918. req, out := c.UpdateVocabularyRequest(input)
  919. req.SetContext(ctx)
  920. req.ApplyOptions(opts...)
  921. return out, req.Send()
  922. }
  923. type CreateVocabularyInput struct {
  924. _ struct{} `type:"structure"`
  925. // The language code of the vocabulary entries.
  926. //
  927. // LanguageCode is a required field
  928. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  929. // An array of strings that contains the vocabulary entries.
  930. //
  931. // Phrases is a required field
  932. Phrases []*string `type:"list" required:"true"`
  933. // The name of the vocabulary. The name must be unique within an AWS account.
  934. // The name is case-sensitive.
  935. //
  936. // VocabularyName is a required field
  937. VocabularyName *string `min:"1" type:"string" required:"true"`
  938. }
  939. // String returns the string representation
  940. func (s CreateVocabularyInput) String() string {
  941. return awsutil.Prettify(s)
  942. }
  943. // GoString returns the string representation
  944. func (s CreateVocabularyInput) GoString() string {
  945. return s.String()
  946. }
  947. // Validate inspects the fields of the type to determine if they are valid.
  948. func (s *CreateVocabularyInput) Validate() error {
  949. invalidParams := request.ErrInvalidParams{Context: "CreateVocabularyInput"}
  950. if s.LanguageCode == nil {
  951. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  952. }
  953. if s.Phrases == nil {
  954. invalidParams.Add(request.NewErrParamRequired("Phrases"))
  955. }
  956. if s.VocabularyName == nil {
  957. invalidParams.Add(request.NewErrParamRequired("VocabularyName"))
  958. }
  959. if s.VocabularyName != nil && len(*s.VocabularyName) < 1 {
  960. invalidParams.Add(request.NewErrParamMinLen("VocabularyName", 1))
  961. }
  962. if invalidParams.Len() > 0 {
  963. return invalidParams
  964. }
  965. return nil
  966. }
  967. // SetLanguageCode sets the LanguageCode field's value.
  968. func (s *CreateVocabularyInput) SetLanguageCode(v string) *CreateVocabularyInput {
  969. s.LanguageCode = &v
  970. return s
  971. }
  972. // SetPhrases sets the Phrases field's value.
  973. func (s *CreateVocabularyInput) SetPhrases(v []*string) *CreateVocabularyInput {
  974. s.Phrases = v
  975. return s
  976. }
  977. // SetVocabularyName sets the VocabularyName field's value.
  978. func (s *CreateVocabularyInput) SetVocabularyName(v string) *CreateVocabularyInput {
  979. s.VocabularyName = &v
  980. return s
  981. }
  982. type CreateVocabularyOutput struct {
  983. _ struct{} `type:"structure"`
  984. // If the VocabularyState field is FAILED, this field contains information about
  985. // why the job failed.
  986. FailureReason *string `type:"string"`
  987. // The language code of the vocabulary entries.
  988. LanguageCode *string `type:"string" enum:"LanguageCode"`
  989. // The date and time that the vocabulary was created.
  990. LastModifiedTime *time.Time `type:"timestamp"`
  991. // The name of the vocabulary.
  992. VocabularyName *string `min:"1" type:"string"`
  993. // The processing state of the vocabulary. When the VocabularyState field contains
  994. // READY the vocabulary is ready to be used in a StartTranscriptionJob request.
  995. VocabularyState *string `type:"string" enum:"VocabularyState"`
  996. }
  997. // String returns the string representation
  998. func (s CreateVocabularyOutput) String() string {
  999. return awsutil.Prettify(s)
  1000. }
  1001. // GoString returns the string representation
  1002. func (s CreateVocabularyOutput) GoString() string {
  1003. return s.String()
  1004. }
  1005. // SetFailureReason sets the FailureReason field's value.
  1006. func (s *CreateVocabularyOutput) SetFailureReason(v string) *CreateVocabularyOutput {
  1007. s.FailureReason = &v
  1008. return s
  1009. }
  1010. // SetLanguageCode sets the LanguageCode field's value.
  1011. func (s *CreateVocabularyOutput) SetLanguageCode(v string) *CreateVocabularyOutput {
  1012. s.LanguageCode = &v
  1013. return s
  1014. }
  1015. // SetLastModifiedTime sets the LastModifiedTime field's value.
  1016. func (s *CreateVocabularyOutput) SetLastModifiedTime(v time.Time) *CreateVocabularyOutput {
  1017. s.LastModifiedTime = &v
  1018. return s
  1019. }
  1020. // SetVocabularyName sets the VocabularyName field's value.
  1021. func (s *CreateVocabularyOutput) SetVocabularyName(v string) *CreateVocabularyOutput {
  1022. s.VocabularyName = &v
  1023. return s
  1024. }
  1025. // SetVocabularyState sets the VocabularyState field's value.
  1026. func (s *CreateVocabularyOutput) SetVocabularyState(v string) *CreateVocabularyOutput {
  1027. s.VocabularyState = &v
  1028. return s
  1029. }
  1030. type DeleteTranscriptionJobInput struct {
  1031. _ struct{} `type:"structure"`
  1032. // The name of the transcription job to be deleted.
  1033. //
  1034. // TranscriptionJobName is a required field
  1035. TranscriptionJobName *string `min:"1" type:"string" required:"true"`
  1036. }
  1037. // String returns the string representation
  1038. func (s DeleteTranscriptionJobInput) String() string {
  1039. return awsutil.Prettify(s)
  1040. }
  1041. // GoString returns the string representation
  1042. func (s DeleteTranscriptionJobInput) GoString() string {
  1043. return s.String()
  1044. }
  1045. // Validate inspects the fields of the type to determine if they are valid.
  1046. func (s *DeleteTranscriptionJobInput) Validate() error {
  1047. invalidParams := request.ErrInvalidParams{Context: "DeleteTranscriptionJobInput"}
  1048. if s.TranscriptionJobName == nil {
  1049. invalidParams.Add(request.NewErrParamRequired("TranscriptionJobName"))
  1050. }
  1051. if s.TranscriptionJobName != nil && len(*s.TranscriptionJobName) < 1 {
  1052. invalidParams.Add(request.NewErrParamMinLen("TranscriptionJobName", 1))
  1053. }
  1054. if invalidParams.Len() > 0 {
  1055. return invalidParams
  1056. }
  1057. return nil
  1058. }
  1059. // SetTranscriptionJobName sets the TranscriptionJobName field's value.
  1060. func (s *DeleteTranscriptionJobInput) SetTranscriptionJobName(v string) *DeleteTranscriptionJobInput {
  1061. s.TranscriptionJobName = &v
  1062. return s
  1063. }
  1064. type DeleteTranscriptionJobOutput struct {
  1065. _ struct{} `type:"structure"`
  1066. }
  1067. // String returns the string representation
  1068. func (s DeleteTranscriptionJobOutput) String() string {
  1069. return awsutil.Prettify(s)
  1070. }
  1071. // GoString returns the string representation
  1072. func (s DeleteTranscriptionJobOutput) GoString() string {
  1073. return s.String()
  1074. }
  1075. type DeleteVocabularyInput struct {
  1076. _ struct{} `type:"structure"`
  1077. // The name of the vocabulary to delete.
  1078. //
  1079. // VocabularyName is a required field
  1080. VocabularyName *string `min:"1" type:"string" required:"true"`
  1081. }
  1082. // String returns the string representation
  1083. func (s DeleteVocabularyInput) String() string {
  1084. return awsutil.Prettify(s)
  1085. }
  1086. // GoString returns the string representation
  1087. func (s DeleteVocabularyInput) GoString() string {
  1088. return s.String()
  1089. }
  1090. // Validate inspects the fields of the type to determine if they are valid.
  1091. func (s *DeleteVocabularyInput) Validate() error {
  1092. invalidParams := request.ErrInvalidParams{Context: "DeleteVocabularyInput"}
  1093. if s.VocabularyName == nil {
  1094. invalidParams.Add(request.NewErrParamRequired("VocabularyName"))
  1095. }
  1096. if s.VocabularyName != nil && len(*s.VocabularyName) < 1 {
  1097. invalidParams.Add(request.NewErrParamMinLen("VocabularyName", 1))
  1098. }
  1099. if invalidParams.Len() > 0 {
  1100. return invalidParams
  1101. }
  1102. return nil
  1103. }
  1104. // SetVocabularyName sets the VocabularyName field's value.
  1105. func (s *DeleteVocabularyInput) SetVocabularyName(v string) *DeleteVocabularyInput {
  1106. s.VocabularyName = &v
  1107. return s
  1108. }
  1109. type DeleteVocabularyOutput struct {
  1110. _ struct{} `type:"structure"`
  1111. }
  1112. // String returns the string representation
  1113. func (s DeleteVocabularyOutput) String() string {
  1114. return awsutil.Prettify(s)
  1115. }
  1116. // GoString returns the string representation
  1117. func (s DeleteVocabularyOutput) GoString() string {
  1118. return s.String()
  1119. }
  1120. type GetTranscriptionJobInput struct {
  1121. _ struct{} `type:"structure"`
  1122. // The name of the job.
  1123. //
  1124. // TranscriptionJobName is a required field
  1125. TranscriptionJobName *string `min:"1" type:"string" required:"true"`
  1126. }
  1127. // String returns the string representation
  1128. func (s GetTranscriptionJobInput) String() string {
  1129. return awsutil.Prettify(s)
  1130. }
  1131. // GoString returns the string representation
  1132. func (s GetTranscriptionJobInput) GoString() string {
  1133. return s.String()
  1134. }
  1135. // Validate inspects the fields of the type to determine if they are valid.
  1136. func (s *GetTranscriptionJobInput) Validate() error {
  1137. invalidParams := request.ErrInvalidParams{Context: "GetTranscriptionJobInput"}
  1138. if s.TranscriptionJobName == nil {
  1139. invalidParams.Add(request.NewErrParamRequired("TranscriptionJobName"))
  1140. }
  1141. if s.TranscriptionJobName != nil && len(*s.TranscriptionJobName) < 1 {
  1142. invalidParams.Add(request.NewErrParamMinLen("TranscriptionJobName", 1))
  1143. }
  1144. if invalidParams.Len() > 0 {
  1145. return invalidParams
  1146. }
  1147. return nil
  1148. }
  1149. // SetTranscriptionJobName sets the TranscriptionJobName field's value.
  1150. func (s *GetTranscriptionJobInput) SetTranscriptionJobName(v string) *GetTranscriptionJobInput {
  1151. s.TranscriptionJobName = &v
  1152. return s
  1153. }
  1154. type GetTranscriptionJobOutput struct {
  1155. _ struct{} `type:"structure"`
  1156. // An object that contains the results of the transcription job.
  1157. TranscriptionJob *TranscriptionJob `type:"structure"`
  1158. }
  1159. // String returns the string representation
  1160. func (s GetTranscriptionJobOutput) String() string {
  1161. return awsutil.Prettify(s)
  1162. }
  1163. // GoString returns the string representation
  1164. func (s GetTranscriptionJobOutput) GoString() string {
  1165. return s.String()
  1166. }
  1167. // SetTranscriptionJob sets the TranscriptionJob field's value.
  1168. func (s *GetTranscriptionJobOutput) SetTranscriptionJob(v *TranscriptionJob) *GetTranscriptionJobOutput {
  1169. s.TranscriptionJob = v
  1170. return s
  1171. }
  1172. type GetVocabularyInput struct {
  1173. _ struct{} `type:"structure"`
  1174. // The name of the vocabulary to return information about. The name is case-sensitive.
  1175. //
  1176. // VocabularyName is a required field
  1177. VocabularyName *string `min:"1" type:"string" required:"true"`
  1178. }
  1179. // String returns the string representation
  1180. func (s GetVocabularyInput) String() string {
  1181. return awsutil.Prettify(s)
  1182. }
  1183. // GoString returns the string representation
  1184. func (s GetVocabularyInput) GoString() string {
  1185. return s.String()
  1186. }
  1187. // Validate inspects the fields of the type to determine if they are valid.
  1188. func (s *GetVocabularyInput) Validate() error {
  1189. invalidParams := request.ErrInvalidParams{Context: "GetVocabularyInput"}
  1190. if s.VocabularyName == nil {
  1191. invalidParams.Add(request.NewErrParamRequired("VocabularyName"))
  1192. }
  1193. if s.VocabularyName != nil && len(*s.VocabularyName) < 1 {
  1194. invalidParams.Add(request.NewErrParamMinLen("VocabularyName", 1))
  1195. }
  1196. if invalidParams.Len() > 0 {
  1197. return invalidParams
  1198. }
  1199. return nil
  1200. }
  1201. // SetVocabularyName sets the VocabularyName field's value.
  1202. func (s *GetVocabularyInput) SetVocabularyName(v string) *GetVocabularyInput {
  1203. s.VocabularyName = &v
  1204. return s
  1205. }
  1206. type GetVocabularyOutput struct {
  1207. _ struct{} `type:"structure"`
  1208. // The S3 location where the vocabulary is stored. Use this URI to get the contents
  1209. // of the vocabulary. The URI is available for a limited time.
  1210. DownloadUri *string `min:"1" type:"string"`
  1211. // If the VocabularyState field is FAILED, this field contains information about
  1212. // why the job failed.
  1213. FailureReason *string `type:"string"`
  1214. // The language code of the vocabulary entries.
  1215. LanguageCode *string `type:"string" enum:"LanguageCode"`
  1216. // The date and time that the vocabulary was last modified.
  1217. LastModifiedTime *time.Time `type:"timestamp"`
  1218. // The name of the vocabulary to return.
  1219. VocabularyName *string `min:"1" type:"string"`
  1220. // The processing state of the vocabulary.
  1221. VocabularyState *string `type:"string" enum:"VocabularyState"`
  1222. }
  1223. // String returns the string representation
  1224. func (s GetVocabularyOutput) String() string {
  1225. return awsutil.Prettify(s)
  1226. }
  1227. // GoString returns the string representation
  1228. func (s GetVocabularyOutput) GoString() string {
  1229. return s.String()
  1230. }
  1231. // SetDownloadUri sets the DownloadUri field's value.
  1232. func (s *GetVocabularyOutput) SetDownloadUri(v string) *GetVocabularyOutput {
  1233. s.DownloadUri = &v
  1234. return s
  1235. }
  1236. // SetFailureReason sets the FailureReason field's value.
  1237. func (s *GetVocabularyOutput) SetFailureReason(v string) *GetVocabularyOutput {
  1238. s.FailureReason = &v
  1239. return s
  1240. }
  1241. // SetLanguageCode sets the LanguageCode field's value.
  1242. func (s *GetVocabularyOutput) SetLanguageCode(v string) *GetVocabularyOutput {
  1243. s.LanguageCode = &v
  1244. return s
  1245. }
  1246. // SetLastModifiedTime sets the LastModifiedTime field's value.
  1247. func (s *GetVocabularyOutput) SetLastModifiedTime(v time.Time) *GetVocabularyOutput {
  1248. s.LastModifiedTime = &v
  1249. return s
  1250. }
  1251. // SetVocabularyName sets the VocabularyName field's value.
  1252. func (s *GetVocabularyOutput) SetVocabularyName(v string) *GetVocabularyOutput {
  1253. s.VocabularyName = &v
  1254. return s
  1255. }
  1256. // SetVocabularyState sets the VocabularyState field's value.
  1257. func (s *GetVocabularyOutput) SetVocabularyState(v string) *GetVocabularyOutput {
  1258. s.VocabularyState = &v
  1259. return s
  1260. }
  1261. type ListTranscriptionJobsInput struct {
  1262. _ struct{} `type:"structure"`
  1263. // When specified, the jobs returned in the list are limited to jobs whose name
  1264. // contains the specified string.
  1265. JobNameContains *string `min:"1" type:"string"`
  1266. // The maximum number of jobs to return in the response. If there are fewer
  1267. // results in the list, this response contains only the actual results.
  1268. MaxResults *int64 `min:"1" type:"integer"`
  1269. // If the result of the previous request to ListTranscriptionJobs was truncated,
  1270. // include the NextToken to fetch the next set of jobs.
  1271. NextToken *string `type:"string"`
  1272. // When specified, returns only transcription jobs with the specified status.
  1273. // Jobs are ordered by creation date, with the newest jobs returned first. If
  1274. // you don’t specify a status, Amazon Transcribe returns all transcription jobs
  1275. // ordered by creation date.
  1276. Status *string `type:"string" enum:"TranscriptionJobStatus"`
  1277. }
  1278. // String returns the string representation
  1279. func (s ListTranscriptionJobsInput) String() string {
  1280. return awsutil.Prettify(s)
  1281. }
  1282. // GoString returns the string representation
  1283. func (s ListTranscriptionJobsInput) GoString() string {
  1284. return s.String()
  1285. }
  1286. // Validate inspects the fields of the type to determine if they are valid.
  1287. func (s *ListTranscriptionJobsInput) Validate() error {
  1288. invalidParams := request.ErrInvalidParams{Context: "ListTranscriptionJobsInput"}
  1289. if s.JobNameContains != nil && len(*s.JobNameContains) < 1 {
  1290. invalidParams.Add(request.NewErrParamMinLen("JobNameContains", 1))
  1291. }
  1292. if s.MaxResults != nil && *s.MaxResults < 1 {
  1293. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1294. }
  1295. if invalidParams.Len() > 0 {
  1296. return invalidParams
  1297. }
  1298. return nil
  1299. }
  1300. // SetJobNameContains sets the JobNameContains field's value.
  1301. func (s *ListTranscriptionJobsInput) SetJobNameContains(v string) *ListTranscriptionJobsInput {
  1302. s.JobNameContains = &v
  1303. return s
  1304. }
  1305. // SetMaxResults sets the MaxResults field's value.
  1306. func (s *ListTranscriptionJobsInput) SetMaxResults(v int64) *ListTranscriptionJobsInput {
  1307. s.MaxResults = &v
  1308. return s
  1309. }
  1310. // SetNextToken sets the NextToken field's value.
  1311. func (s *ListTranscriptionJobsInput) SetNextToken(v string) *ListTranscriptionJobsInput {
  1312. s.NextToken = &v
  1313. return s
  1314. }
  1315. // SetStatus sets the Status field's value.
  1316. func (s *ListTranscriptionJobsInput) SetStatus(v string) *ListTranscriptionJobsInput {
  1317. s.Status = &v
  1318. return s
  1319. }
  1320. type ListTranscriptionJobsOutput struct {
  1321. _ struct{} `type:"structure"`
  1322. // The ListTranscriptionJobs operation returns a page of jobs at a time. The
  1323. // maximum size of the page is set by the MaxResults parameter. If there are
  1324. // more jobs in the list than the page size, Amazon Transcribe returns the NextPage
  1325. // token. Include the token in the next request to the ListTranscriptionJobs
  1326. // operation to return in the next page of jobs.
  1327. NextToken *string `type:"string"`
  1328. // The requested status of the jobs returned.
  1329. Status *string `type:"string" enum:"TranscriptionJobStatus"`
  1330. // A list of objects containing summary information for a transcription job.
  1331. TranscriptionJobSummaries []*TranscriptionJobSummary `type:"list"`
  1332. }
  1333. // String returns the string representation
  1334. func (s ListTranscriptionJobsOutput) String() string {
  1335. return awsutil.Prettify(s)
  1336. }
  1337. // GoString returns the string representation
  1338. func (s ListTranscriptionJobsOutput) GoString() string {
  1339. return s.String()
  1340. }
  1341. // SetNextToken sets the NextToken field's value.
  1342. func (s *ListTranscriptionJobsOutput) SetNextToken(v string) *ListTranscriptionJobsOutput {
  1343. s.NextToken = &v
  1344. return s
  1345. }
  1346. // SetStatus sets the Status field's value.
  1347. func (s *ListTranscriptionJobsOutput) SetStatus(v string) *ListTranscriptionJobsOutput {
  1348. s.Status = &v
  1349. return s
  1350. }
  1351. // SetTranscriptionJobSummaries sets the TranscriptionJobSummaries field's value.
  1352. func (s *ListTranscriptionJobsOutput) SetTranscriptionJobSummaries(v []*TranscriptionJobSummary) *ListTranscriptionJobsOutput {
  1353. s.TranscriptionJobSummaries = v
  1354. return s
  1355. }
  1356. type ListVocabulariesInput struct {
  1357. _ struct{} `type:"structure"`
  1358. // The maximum number of vocabularies to return in the response. If there are
  1359. // fewer results in the list, this response contains only the actual results.
  1360. MaxResults *int64 `min:"1" type:"integer"`
  1361. // When specified, the vocabularies returned in the list are limited to vocabularies
  1362. // whose name contains the specified string. The search is case-insensitive,
  1363. // ListVocabularies will return both "vocabularyname" and "VocabularyName" in
  1364. // the response list.
  1365. NameContains *string `min:"1" type:"string"`
  1366. // If the result of the previous request to ListVocabularies was truncated,
  1367. // include the NextToken to fetch the next set of jobs.
  1368. NextToken *string `type:"string"`
  1369. // When specified, only returns vocabularies with the VocabularyState field
  1370. // equal to the specified state.
  1371. StateEquals *string `type:"string" enum:"VocabularyState"`
  1372. }
  1373. // String returns the string representation
  1374. func (s ListVocabulariesInput) String() string {
  1375. return awsutil.Prettify(s)
  1376. }
  1377. // GoString returns the string representation
  1378. func (s ListVocabulariesInput) GoString() string {
  1379. return s.String()
  1380. }
  1381. // Validate inspects the fields of the type to determine if they are valid.
  1382. func (s *ListVocabulariesInput) Validate() error {
  1383. invalidParams := request.ErrInvalidParams{Context: "ListVocabulariesInput"}
  1384. if s.MaxResults != nil && *s.MaxResults < 1 {
  1385. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1386. }
  1387. if s.NameContains != nil && len(*s.NameContains) < 1 {
  1388. invalidParams.Add(request.NewErrParamMinLen("NameContains", 1))
  1389. }
  1390. if invalidParams.Len() > 0 {
  1391. return invalidParams
  1392. }
  1393. return nil
  1394. }
  1395. // SetMaxResults sets the MaxResults field's value.
  1396. func (s *ListVocabulariesInput) SetMaxResults(v int64) *ListVocabulariesInput {
  1397. s.MaxResults = &v
  1398. return s
  1399. }
  1400. // SetNameContains sets the NameContains field's value.
  1401. func (s *ListVocabulariesInput) SetNameContains(v string) *ListVocabulariesInput {
  1402. s.NameContains = &v
  1403. return s
  1404. }
  1405. // SetNextToken sets the NextToken field's value.
  1406. func (s *ListVocabulariesInput) SetNextToken(v string) *ListVocabulariesInput {
  1407. s.NextToken = &v
  1408. return s
  1409. }
  1410. // SetStateEquals sets the StateEquals field's value.
  1411. func (s *ListVocabulariesInput) SetStateEquals(v string) *ListVocabulariesInput {
  1412. s.StateEquals = &v
  1413. return s
  1414. }
  1415. type ListVocabulariesOutput struct {
  1416. _ struct{} `type:"structure"`
  1417. // The ListVocabularies operation returns a page of vocabularies at a time.
  1418. // The maximum size of the page is set by the MaxResults parameter. If there
  1419. // are more jobs in the list than the page size, Amazon Transcribe returns the
  1420. // NextPage token. Include the token in the next request to the ListVocabularies
  1421. // operation to return in the next page of jobs.
  1422. NextToken *string `type:"string"`
  1423. // The requested vocabulary state.
  1424. Status *string `type:"string" enum:"TranscriptionJobStatus"`
  1425. // A list of objects that describe the vocabularies that match the search criteria
  1426. // in the request.
  1427. Vocabularies []*VocabularyInfo `type:"list"`
  1428. }
  1429. // String returns the string representation
  1430. func (s ListVocabulariesOutput) String() string {
  1431. return awsutil.Prettify(s)
  1432. }
  1433. // GoString returns the string representation
  1434. func (s ListVocabulariesOutput) GoString() string {
  1435. return s.String()
  1436. }
  1437. // SetNextToken sets the NextToken field's value.
  1438. func (s *ListVocabulariesOutput) SetNextToken(v string) *ListVocabulariesOutput {
  1439. s.NextToken = &v
  1440. return s
  1441. }
  1442. // SetStatus sets the Status field's value.
  1443. func (s *ListVocabulariesOutput) SetStatus(v string) *ListVocabulariesOutput {
  1444. s.Status = &v
  1445. return s
  1446. }
  1447. // SetVocabularies sets the Vocabularies field's value.
  1448. func (s *ListVocabulariesOutput) SetVocabularies(v []*VocabularyInfo) *ListVocabulariesOutput {
  1449. s.Vocabularies = v
  1450. return s
  1451. }
  1452. // Describes the input media file in a transcription request.
  1453. type Media struct {
  1454. _ struct{} `type:"structure"`
  1455. // The S3 location of the input media file. The URI must be in the same region
  1456. // as the API endpoint that you are calling. The general form is:
  1457. //
  1458. // https://s3-<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey>
  1459. //
  1460. // For example:
  1461. //
  1462. // https://s3-us-east-1.amazonaws.com/examplebucket/example.mp4
  1463. //
  1464. // https://s3-us-east-1.amazonaws.com/examplebucket/mediadocs/example.mp4
  1465. //
  1466. // For more information about S3 object names, see Object Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys)
  1467. // in the Amazon S3 Developer Guide.
  1468. MediaFileUri *string `min:"1" type:"string"`
  1469. }
  1470. // String returns the string representation
  1471. func (s Media) String() string {
  1472. return awsutil.Prettify(s)
  1473. }
  1474. // GoString returns the string representation
  1475. func (s Media) GoString() string {
  1476. return s.String()
  1477. }
  1478. // Validate inspects the fields of the type to determine if they are valid.
  1479. func (s *Media) Validate() error {
  1480. invalidParams := request.ErrInvalidParams{Context: "Media"}
  1481. if s.MediaFileUri != nil && len(*s.MediaFileUri) < 1 {
  1482. invalidParams.Add(request.NewErrParamMinLen("MediaFileUri", 1))
  1483. }
  1484. if invalidParams.Len() > 0 {
  1485. return invalidParams
  1486. }
  1487. return nil
  1488. }
  1489. // SetMediaFileUri sets the MediaFileUri field's value.
  1490. func (s *Media) SetMediaFileUri(v string) *Media {
  1491. s.MediaFileUri = &v
  1492. return s
  1493. }
  1494. // Provides optional settings for the StartTranscriptionJob operation.
  1495. type Settings struct {
  1496. _ struct{} `type:"structure"`
  1497. // Instructs Amazon Transcribe to process each audio channel separately and
  1498. // then merge the transcription output of each channel into a single transcription.
  1499. //
  1500. // Amazon Transcribe also produces a transcription of each item detected on
  1501. // an audio channel, including the start time and end time of the item and alternative
  1502. // transcriptions of the item including the confidence that Amazon Transcribe
  1503. // has in the transcription.
  1504. //
  1505. // You can't set both ShowSpeakerLabels and ChannelIdentification in the same
  1506. // request. If you set both, your request returns a BadRequestException.
  1507. ChannelIdentification *bool `type:"boolean"`
  1508. // The maximum number of speakers to identify in the input audio. If there are
  1509. // more speakers in the audio than this number, multiple speakers will be identified
  1510. // as a single speaker. If you specify the MaxSpeakerLabels field, you must
  1511. // set the ShowSpeakerLabels field to true.
  1512. MaxSpeakerLabels *int64 `min:"2" type:"integer"`
  1513. // Determines whether the transcription job uses speaker recognition to identify
  1514. // different speakers in the input audio. Speaker recognition labels individual
  1515. // speakers in the audio file. If you set the ShowSpeakerLabels field to true,
  1516. // you must also set the maximum number of speaker labels MaxSpeakerLabels field.
  1517. //
  1518. // You can't set both ShowSpeakerLabels and ChannelIdentification in the same
  1519. // request. If you set both, your request returns a BadRequestException.
  1520. ShowSpeakerLabels *bool `type:"boolean"`
  1521. // The name of a vocabulary to use when processing the transcription job.
  1522. VocabularyName *string `min:"1" type:"string"`
  1523. }
  1524. // String returns the string representation
  1525. func (s Settings) String() string {
  1526. return awsutil.Prettify(s)
  1527. }
  1528. // GoString returns the string representation
  1529. func (s Settings) GoString() string {
  1530. return s.String()
  1531. }
  1532. // Validate inspects the fields of the type to determine if they are valid.
  1533. func (s *Settings) Validate() error {
  1534. invalidParams := request.ErrInvalidParams{Context: "Settings"}
  1535. if s.MaxSpeakerLabels != nil && *s.MaxSpeakerLabels < 2 {
  1536. invalidParams.Add(request.NewErrParamMinValue("MaxSpeakerLabels", 2))
  1537. }
  1538. if s.VocabularyName != nil && len(*s.VocabularyName) < 1 {
  1539. invalidParams.Add(request.NewErrParamMinLen("VocabularyName", 1))
  1540. }
  1541. if invalidParams.Len() > 0 {
  1542. return invalidParams
  1543. }
  1544. return nil
  1545. }
  1546. // SetChannelIdentification sets the ChannelIdentification field's value.
  1547. func (s *Settings) SetChannelIdentification(v bool) *Settings {
  1548. s.ChannelIdentification = &v
  1549. return s
  1550. }
  1551. // SetMaxSpeakerLabels sets the MaxSpeakerLabels field's value.
  1552. func (s *Settings) SetMaxSpeakerLabels(v int64) *Settings {
  1553. s.MaxSpeakerLabels = &v
  1554. return s
  1555. }
  1556. // SetShowSpeakerLabels sets the ShowSpeakerLabels field's value.
  1557. func (s *Settings) SetShowSpeakerLabels(v bool) *Settings {
  1558. s.ShowSpeakerLabels = &v
  1559. return s
  1560. }
  1561. // SetVocabularyName sets the VocabularyName field's value.
  1562. func (s *Settings) SetVocabularyName(v string) *Settings {
  1563. s.VocabularyName = &v
  1564. return s
  1565. }
  1566. type StartTranscriptionJobInput struct {
  1567. _ struct{} `type:"structure"`
  1568. // The language code for the language used in the input media file.
  1569. //
  1570. // LanguageCode is a required field
  1571. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  1572. // An object that describes the input media for a transcription job.
  1573. //
  1574. // Media is a required field
  1575. Media *Media `type:"structure" required:"true"`
  1576. // The format of the input media file.
  1577. //
  1578. // MediaFormat is a required field
  1579. MediaFormat *string `type:"string" required:"true" enum:"MediaFormat"`
  1580. // The sample rate, in Hertz, of the audio track in the input media file.
  1581. MediaSampleRateHertz *int64 `min:"8000" type:"integer"`
  1582. // The location where the transcription is stored.
  1583. //
  1584. // If you set the OutputBucketName, Amazon Transcribe puts the transcription
  1585. // in the specified S3 bucket. When you call the GetTranscriptionJob operation,
  1586. // the operation returns this location in the TranscriptFileUri field. The S3
  1587. // bucket must have permissions that allow Amazon Transcribe to put files in
  1588. // the bucket. For more information, see Permissions Required for IAM User Roles
  1589. // (https://docs.aws.amazon.com/transcribe/latest/dg/access-control-managing-permissions.html#auth-role-iam-user).
  1590. //
  1591. // If you don't set the OutputBucketName, Amazon Transcribe generates a pre-signed
  1592. // URL, a shareable URL that provides secure access to your transcription, and
  1593. // returns it in the TranscriptFileUri field. Use this URL to download the transcription.
  1594. OutputBucketName *string `type:"string"`
  1595. // A Settings object that provides optional settings for a transcription job.
  1596. Settings *Settings `type:"structure"`
  1597. // The name of the job. Note that you can't use the strings "." or ".." by themselves
  1598. // as the job name. The name must also be unique within an AWS account.
  1599. //
  1600. // TranscriptionJobName is a required field
  1601. TranscriptionJobName *string `min:"1" type:"string" required:"true"`
  1602. }
  1603. // String returns the string representation
  1604. func (s StartTranscriptionJobInput) String() string {
  1605. return awsutil.Prettify(s)
  1606. }
  1607. // GoString returns the string representation
  1608. func (s StartTranscriptionJobInput) GoString() string {
  1609. return s.String()
  1610. }
  1611. // Validate inspects the fields of the type to determine if they are valid.
  1612. func (s *StartTranscriptionJobInput) Validate() error {
  1613. invalidParams := request.ErrInvalidParams{Context: "StartTranscriptionJobInput"}
  1614. if s.LanguageCode == nil {
  1615. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  1616. }
  1617. if s.Media == nil {
  1618. invalidParams.Add(request.NewErrParamRequired("Media"))
  1619. }
  1620. if s.MediaFormat == nil {
  1621. invalidParams.Add(request.NewErrParamRequired("MediaFormat"))
  1622. }
  1623. if s.MediaSampleRateHertz != nil && *s.MediaSampleRateHertz < 8000 {
  1624. invalidParams.Add(request.NewErrParamMinValue("MediaSampleRateHertz", 8000))
  1625. }
  1626. if s.TranscriptionJobName == nil {
  1627. invalidParams.Add(request.NewErrParamRequired("TranscriptionJobName"))
  1628. }
  1629. if s.TranscriptionJobName != nil && len(*s.TranscriptionJobName) < 1 {
  1630. invalidParams.Add(request.NewErrParamMinLen("TranscriptionJobName", 1))
  1631. }
  1632. if s.Media != nil {
  1633. if err := s.Media.Validate(); err != nil {
  1634. invalidParams.AddNested("Media", err.(request.ErrInvalidParams))
  1635. }
  1636. }
  1637. if s.Settings != nil {
  1638. if err := s.Settings.Validate(); err != nil {
  1639. invalidParams.AddNested("Settings", err.(request.ErrInvalidParams))
  1640. }
  1641. }
  1642. if invalidParams.Len() > 0 {
  1643. return invalidParams
  1644. }
  1645. return nil
  1646. }
  1647. // SetLanguageCode sets the LanguageCode field's value.
  1648. func (s *StartTranscriptionJobInput) SetLanguageCode(v string) *StartTranscriptionJobInput {
  1649. s.LanguageCode = &v
  1650. return s
  1651. }
  1652. // SetMedia sets the Media field's value.
  1653. func (s *StartTranscriptionJobInput) SetMedia(v *Media) *StartTranscriptionJobInput {
  1654. s.Media = v
  1655. return s
  1656. }
  1657. // SetMediaFormat sets the MediaFormat field's value.
  1658. func (s *StartTranscriptionJobInput) SetMediaFormat(v string) *StartTranscriptionJobInput {
  1659. s.MediaFormat = &v
  1660. return s
  1661. }
  1662. // SetMediaSampleRateHertz sets the MediaSampleRateHertz field's value.
  1663. func (s *StartTranscriptionJobInput) SetMediaSampleRateHertz(v int64) *StartTranscriptionJobInput {
  1664. s.MediaSampleRateHertz = &v
  1665. return s
  1666. }
  1667. // SetOutputBucketName sets the OutputBucketName field's value.
  1668. func (s *StartTranscriptionJobInput) SetOutputBucketName(v string) *StartTranscriptionJobInput {
  1669. s.OutputBucketName = &v
  1670. return s
  1671. }
  1672. // SetSettings sets the Settings field's value.
  1673. func (s *StartTranscriptionJobInput) SetSettings(v *Settings) *StartTranscriptionJobInput {
  1674. s.Settings = v
  1675. return s
  1676. }
  1677. // SetTranscriptionJobName sets the TranscriptionJobName field's value.
  1678. func (s *StartTranscriptionJobInput) SetTranscriptionJobName(v string) *StartTranscriptionJobInput {
  1679. s.TranscriptionJobName = &v
  1680. return s
  1681. }
  1682. type StartTranscriptionJobOutput struct {
  1683. _ struct{} `type:"structure"`
  1684. // An object containing details of the asynchronous transcription job.
  1685. TranscriptionJob *TranscriptionJob `type:"structure"`
  1686. }
  1687. // String returns the string representation
  1688. func (s StartTranscriptionJobOutput) String() string {
  1689. return awsutil.Prettify(s)
  1690. }
  1691. // GoString returns the string representation
  1692. func (s StartTranscriptionJobOutput) GoString() string {
  1693. return s.String()
  1694. }
  1695. // SetTranscriptionJob sets the TranscriptionJob field's value.
  1696. func (s *StartTranscriptionJobOutput) SetTranscriptionJob(v *TranscriptionJob) *StartTranscriptionJobOutput {
  1697. s.TranscriptionJob = v
  1698. return s
  1699. }
  1700. // Identifies the location of a transcription.
  1701. type Transcript struct {
  1702. _ struct{} `type:"structure"`
  1703. // The location where the transcription is stored.
  1704. //
  1705. // Use this URI to access the transcription. If you specified an S3 bucket in
  1706. // the OutputBucketName field when you created the job, this is the URI of that
  1707. // bucket. If you chose to store the transcription in Amazon Transcribe, this
  1708. // is a shareable URL that provides secure access to that location.
  1709. TranscriptFileUri *string `min:"1" type:"string"`
  1710. }
  1711. // String returns the string representation
  1712. func (s Transcript) String() string {
  1713. return awsutil.Prettify(s)
  1714. }
  1715. // GoString returns the string representation
  1716. func (s Transcript) GoString() string {
  1717. return s.String()
  1718. }
  1719. // SetTranscriptFileUri sets the TranscriptFileUri field's value.
  1720. func (s *Transcript) SetTranscriptFileUri(v string) *Transcript {
  1721. s.TranscriptFileUri = &v
  1722. return s
  1723. }
  1724. // Describes an asynchronous transcription job that was created with the StartTranscriptionJob
  1725. // operation.
  1726. type TranscriptionJob struct {
  1727. _ struct{} `type:"structure"`
  1728. // A timestamp that shows when the job was completed.
  1729. CompletionTime *time.Time `type:"timestamp"`
  1730. // A timestamp that shows when the job was created.
  1731. CreationTime *time.Time `type:"timestamp"`
  1732. // If the TranscriptionJobStatus field is FAILED, this field contains information
  1733. // about why the job failed.
  1734. FailureReason *string `type:"string"`
  1735. // The language code for the input speech.
  1736. LanguageCode *string `type:"string" enum:"LanguageCode"`
  1737. // An object that describes the input media for the transcription job.
  1738. Media *Media `type:"structure"`
  1739. // The format of the input media file.
  1740. MediaFormat *string `type:"string" enum:"MediaFormat"`
  1741. // The sample rate, in Hertz, of the audio track in the input media file.
  1742. MediaSampleRateHertz *int64 `min:"8000" type:"integer"`
  1743. // Optional settings for the transcription job. Use these settings to turn on
  1744. // speaker recognition, to set the maximum number of speakers that should be
  1745. // identified and to specify a custom vocabulary to use when processing the
  1746. // transcription job.
  1747. Settings *Settings `type:"structure"`
  1748. // An object that describes the output of the transcription job.
  1749. Transcript *Transcript `type:"structure"`
  1750. // The name of the transcription job.
  1751. TranscriptionJobName *string `min:"1" type:"string"`
  1752. // The status of the transcription job.
  1753. TranscriptionJobStatus *string `type:"string" enum:"TranscriptionJobStatus"`
  1754. }
  1755. // String returns the string representation
  1756. func (s TranscriptionJob) String() string {
  1757. return awsutil.Prettify(s)
  1758. }
  1759. // GoString returns the string representation
  1760. func (s TranscriptionJob) GoString() string {
  1761. return s.String()
  1762. }
  1763. // SetCompletionTime sets the CompletionTime field's value.
  1764. func (s *TranscriptionJob) SetCompletionTime(v time.Time) *TranscriptionJob {
  1765. s.CompletionTime = &v
  1766. return s
  1767. }
  1768. // SetCreationTime sets the CreationTime field's value.
  1769. func (s *TranscriptionJob) SetCreationTime(v time.Time) *TranscriptionJob {
  1770. s.CreationTime = &v
  1771. return s
  1772. }
  1773. // SetFailureReason sets the FailureReason field's value.
  1774. func (s *TranscriptionJob) SetFailureReason(v string) *TranscriptionJob {
  1775. s.FailureReason = &v
  1776. return s
  1777. }
  1778. // SetLanguageCode sets the LanguageCode field's value.
  1779. func (s *TranscriptionJob) SetLanguageCode(v string) *TranscriptionJob {
  1780. s.LanguageCode = &v
  1781. return s
  1782. }
  1783. // SetMedia sets the Media field's value.
  1784. func (s *TranscriptionJob) SetMedia(v *Media) *TranscriptionJob {
  1785. s.Media = v
  1786. return s
  1787. }
  1788. // SetMediaFormat sets the MediaFormat field's value.
  1789. func (s *TranscriptionJob) SetMediaFormat(v string) *TranscriptionJob {
  1790. s.MediaFormat = &v
  1791. return s
  1792. }
  1793. // SetMediaSampleRateHertz sets the MediaSampleRateHertz field's value.
  1794. func (s *TranscriptionJob) SetMediaSampleRateHertz(v int64) *TranscriptionJob {
  1795. s.MediaSampleRateHertz = &v
  1796. return s
  1797. }
  1798. // SetSettings sets the Settings field's value.
  1799. func (s *TranscriptionJob) SetSettings(v *Settings) *TranscriptionJob {
  1800. s.Settings = v
  1801. return s
  1802. }
  1803. // SetTranscript sets the Transcript field's value.
  1804. func (s *TranscriptionJob) SetTranscript(v *Transcript) *TranscriptionJob {
  1805. s.Transcript = v
  1806. return s
  1807. }
  1808. // SetTranscriptionJobName sets the TranscriptionJobName field's value.
  1809. func (s *TranscriptionJob) SetTranscriptionJobName(v string) *TranscriptionJob {
  1810. s.TranscriptionJobName = &v
  1811. return s
  1812. }
  1813. // SetTranscriptionJobStatus sets the TranscriptionJobStatus field's value.
  1814. func (s *TranscriptionJob) SetTranscriptionJobStatus(v string) *TranscriptionJob {
  1815. s.TranscriptionJobStatus = &v
  1816. return s
  1817. }
  1818. // Provides a summary of information about a transcription job. .
  1819. type TranscriptionJobSummary struct {
  1820. _ struct{} `type:"structure"`
  1821. // A timestamp that shows when the job was completed.
  1822. CompletionTime *time.Time `type:"timestamp"`
  1823. // A timestamp that shows when the job was created.
  1824. CreationTime *time.Time `type:"timestamp"`
  1825. // If the TranscriptionJobStatus field is FAILED, a description of the error.
  1826. FailureReason *string `type:"string"`
  1827. // The language code for the input speech.
  1828. LanguageCode *string `type:"string" enum:"LanguageCode"`
  1829. // Indicates the location of the output of the transcription job.
  1830. //
  1831. // If the value is CUSTOMER_BUCKET then the location is the S3 bucket specified
  1832. // in the outputBucketName field when the transcription job was started with
  1833. // the StartTranscriptionJob operation.
  1834. //
  1835. // If the value is SERVICE_BUCKET then the output is stored by Amazon Transcribe
  1836. // and can be retrieved using the URI in the GetTranscriptionJob response's
  1837. // TranscriptFileUri field.
  1838. OutputLocationType *string `type:"string" enum:"OutputLocationType"`
  1839. // The name of the transcription job.
  1840. TranscriptionJobName *string `min:"1" type:"string"`
  1841. // The status of the transcription job. When the status is COMPLETED, use the
  1842. // GetTranscriptionJob operation to get the results of the transcription.
  1843. TranscriptionJobStatus *string `type:"string" enum:"TranscriptionJobStatus"`
  1844. }
  1845. // String returns the string representation
  1846. func (s TranscriptionJobSummary) String() string {
  1847. return awsutil.Prettify(s)
  1848. }
  1849. // GoString returns the string representation
  1850. func (s TranscriptionJobSummary) GoString() string {
  1851. return s.String()
  1852. }
  1853. // SetCompletionTime sets the CompletionTime field's value.
  1854. func (s *TranscriptionJobSummary) SetCompletionTime(v time.Time) *TranscriptionJobSummary {
  1855. s.CompletionTime = &v
  1856. return s
  1857. }
  1858. // SetCreationTime sets the CreationTime field's value.
  1859. func (s *TranscriptionJobSummary) SetCreationTime(v time.Time) *TranscriptionJobSummary {
  1860. s.CreationTime = &v
  1861. return s
  1862. }
  1863. // SetFailureReason sets the FailureReason field's value.
  1864. func (s *TranscriptionJobSummary) SetFailureReason(v string) *TranscriptionJobSummary {
  1865. s.FailureReason = &v
  1866. return s
  1867. }
  1868. // SetLanguageCode sets the LanguageCode field's value.
  1869. func (s *TranscriptionJobSummary) SetLanguageCode(v string) *TranscriptionJobSummary {
  1870. s.LanguageCode = &v
  1871. return s
  1872. }
  1873. // SetOutputLocationType sets the OutputLocationType field's value.
  1874. func (s *TranscriptionJobSummary) SetOutputLocationType(v string) *TranscriptionJobSummary {
  1875. s.OutputLocationType = &v
  1876. return s
  1877. }
  1878. // SetTranscriptionJobName sets the TranscriptionJobName field's value.
  1879. func (s *TranscriptionJobSummary) SetTranscriptionJobName(v string) *TranscriptionJobSummary {
  1880. s.TranscriptionJobName = &v
  1881. return s
  1882. }
  1883. // SetTranscriptionJobStatus sets the TranscriptionJobStatus field's value.
  1884. func (s *TranscriptionJobSummary) SetTranscriptionJobStatus(v string) *TranscriptionJobSummary {
  1885. s.TranscriptionJobStatus = &v
  1886. return s
  1887. }
  1888. type UpdateVocabularyInput struct {
  1889. _ struct{} `type:"structure"`
  1890. // The language code of the vocabulary entries.
  1891. //
  1892. // LanguageCode is a required field
  1893. LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"`
  1894. // An array of strings containing the vocabulary entries.
  1895. //
  1896. // Phrases is a required field
  1897. Phrases []*string `type:"list" required:"true"`
  1898. // The name of the vocabulary to update. The name is case-sensitive.
  1899. //
  1900. // VocabularyName is a required field
  1901. VocabularyName *string `min:"1" type:"string" required:"true"`
  1902. }
  1903. // String returns the string representation
  1904. func (s UpdateVocabularyInput) String() string {
  1905. return awsutil.Prettify(s)
  1906. }
  1907. // GoString returns the string representation
  1908. func (s UpdateVocabularyInput) GoString() string {
  1909. return s.String()
  1910. }
  1911. // Validate inspects the fields of the type to determine if they are valid.
  1912. func (s *UpdateVocabularyInput) Validate() error {
  1913. invalidParams := request.ErrInvalidParams{Context: "UpdateVocabularyInput"}
  1914. if s.LanguageCode == nil {
  1915. invalidParams.Add(request.NewErrParamRequired("LanguageCode"))
  1916. }
  1917. if s.Phrases == nil {
  1918. invalidParams.Add(request.NewErrParamRequired("Phrases"))
  1919. }
  1920. if s.VocabularyName == nil {
  1921. invalidParams.Add(request.NewErrParamRequired("VocabularyName"))
  1922. }
  1923. if s.VocabularyName != nil && len(*s.VocabularyName) < 1 {
  1924. invalidParams.Add(request.NewErrParamMinLen("VocabularyName", 1))
  1925. }
  1926. if invalidParams.Len() > 0 {
  1927. return invalidParams
  1928. }
  1929. return nil
  1930. }
  1931. // SetLanguageCode sets the LanguageCode field's value.
  1932. func (s *UpdateVocabularyInput) SetLanguageCode(v string) *UpdateVocabularyInput {
  1933. s.LanguageCode = &v
  1934. return s
  1935. }
  1936. // SetPhrases sets the Phrases field's value.
  1937. func (s *UpdateVocabularyInput) SetPhrases(v []*string) *UpdateVocabularyInput {
  1938. s.Phrases = v
  1939. return s
  1940. }
  1941. // SetVocabularyName sets the VocabularyName field's value.
  1942. func (s *UpdateVocabularyInput) SetVocabularyName(v string) *UpdateVocabularyInput {
  1943. s.VocabularyName = &v
  1944. return s
  1945. }
  1946. type UpdateVocabularyOutput struct {
  1947. _ struct{} `type:"structure"`
  1948. // The language code of the vocabulary entries.
  1949. LanguageCode *string `type:"string" enum:"LanguageCode"`
  1950. // The date and time that the vocabulary was updated.
  1951. LastModifiedTime *time.Time `type:"timestamp"`
  1952. // The name of the vocabulary that was updated.
  1953. VocabularyName *string `min:"1" type:"string"`
  1954. // The processing state of the vocabulary. When the VocabularyState field contains
  1955. // READY the vocabulary is ready to be used in a StartTranscriptionJob request.
  1956. VocabularyState *string `type:"string" enum:"VocabularyState"`
  1957. }
  1958. // String returns the string representation
  1959. func (s UpdateVocabularyOutput) String() string {
  1960. return awsutil.Prettify(s)
  1961. }
  1962. // GoString returns the string representation
  1963. func (s UpdateVocabularyOutput) GoString() string {
  1964. return s.String()
  1965. }
  1966. // SetLanguageCode sets the LanguageCode field's value.
  1967. func (s *UpdateVocabularyOutput) SetLanguageCode(v string) *UpdateVocabularyOutput {
  1968. s.LanguageCode = &v
  1969. return s
  1970. }
  1971. // SetLastModifiedTime sets the LastModifiedTime field's value.
  1972. func (s *UpdateVocabularyOutput) SetLastModifiedTime(v time.Time) *UpdateVocabularyOutput {
  1973. s.LastModifiedTime = &v
  1974. return s
  1975. }
  1976. // SetVocabularyName sets the VocabularyName field's value.
  1977. func (s *UpdateVocabularyOutput) SetVocabularyName(v string) *UpdateVocabularyOutput {
  1978. s.VocabularyName = &v
  1979. return s
  1980. }
  1981. // SetVocabularyState sets the VocabularyState field's value.
  1982. func (s *UpdateVocabularyOutput) SetVocabularyState(v string) *UpdateVocabularyOutput {
  1983. s.VocabularyState = &v
  1984. return s
  1985. }
  1986. // Provides information about a custom vocabulary.
  1987. type VocabularyInfo struct {
  1988. _ struct{} `type:"structure"`
  1989. // The language code of the vocabulary entries.
  1990. LanguageCode *string `type:"string" enum:"LanguageCode"`
  1991. // The date and time that the vocabulary was last modified.
  1992. LastModifiedTime *time.Time `type:"timestamp"`
  1993. // The name of the vocabulary.
  1994. VocabularyName *string `min:"1" type:"string"`
  1995. // The processing state of the vocabulary. If the state is READY you can use
  1996. // the vocabulary in a StartTranscriptionJob request.
  1997. VocabularyState *string `type:"string" enum:"VocabularyState"`
  1998. }
  1999. // String returns the string representation
  2000. func (s VocabularyInfo) String() string {
  2001. return awsutil.Prettify(s)
  2002. }
  2003. // GoString returns the string representation
  2004. func (s VocabularyInfo) GoString() string {
  2005. return s.String()
  2006. }
  2007. // SetLanguageCode sets the LanguageCode field's value.
  2008. func (s *VocabularyInfo) SetLanguageCode(v string) *VocabularyInfo {
  2009. s.LanguageCode = &v
  2010. return s
  2011. }
  2012. // SetLastModifiedTime sets the LastModifiedTime field's value.
  2013. func (s *VocabularyInfo) SetLastModifiedTime(v time.Time) *VocabularyInfo {
  2014. s.LastModifiedTime = &v
  2015. return s
  2016. }
  2017. // SetVocabularyName sets the VocabularyName field's value.
  2018. func (s *VocabularyInfo) SetVocabularyName(v string) *VocabularyInfo {
  2019. s.VocabularyName = &v
  2020. return s
  2021. }
  2022. // SetVocabularyState sets the VocabularyState field's value.
  2023. func (s *VocabularyInfo) SetVocabularyState(v string) *VocabularyInfo {
  2024. s.VocabularyState = &v
  2025. return s
  2026. }
  2027. const (
  2028. // LanguageCodeEnUs is a LanguageCode enum value
  2029. LanguageCodeEnUs = "en-US"
  2030. // LanguageCodeEsUs is a LanguageCode enum value
  2031. LanguageCodeEsUs = "es-US"
  2032. // LanguageCodeEnAu is a LanguageCode enum value
  2033. LanguageCodeEnAu = "en-AU"
  2034. // LanguageCodeFrCa is a LanguageCode enum value
  2035. LanguageCodeFrCa = "fr-CA"
  2036. // LanguageCodeEnGb is a LanguageCode enum value
  2037. LanguageCodeEnGb = "en-GB"
  2038. // LanguageCodeDeDe is a LanguageCode enum value
  2039. LanguageCodeDeDe = "de-DE"
  2040. // LanguageCodePtBr is a LanguageCode enum value
  2041. LanguageCodePtBr = "pt-BR"
  2042. // LanguageCodeFrFr is a LanguageCode enum value
  2043. LanguageCodeFrFr = "fr-FR"
  2044. // LanguageCodeItIt is a LanguageCode enum value
  2045. LanguageCodeItIt = "it-IT"
  2046. )
  2047. const (
  2048. // MediaFormatMp3 is a MediaFormat enum value
  2049. MediaFormatMp3 = "mp3"
  2050. // MediaFormatMp4 is a MediaFormat enum value
  2051. MediaFormatMp4 = "mp4"
  2052. // MediaFormatWav is a MediaFormat enum value
  2053. MediaFormatWav = "wav"
  2054. // MediaFormatFlac is a MediaFormat enum value
  2055. MediaFormatFlac = "flac"
  2056. )
  2057. const (
  2058. // OutputLocationTypeCustomerBucket is a OutputLocationType enum value
  2059. OutputLocationTypeCustomerBucket = "CUSTOMER_BUCKET"
  2060. // OutputLocationTypeServiceBucket is a OutputLocationType enum value
  2061. OutputLocationTypeServiceBucket = "SERVICE_BUCKET"
  2062. )
  2063. const (
  2064. // TranscriptionJobStatusInProgress is a TranscriptionJobStatus enum value
  2065. TranscriptionJobStatusInProgress = "IN_PROGRESS"
  2066. // TranscriptionJobStatusFailed is a TranscriptionJobStatus enum value
  2067. TranscriptionJobStatusFailed = "FAILED"
  2068. // TranscriptionJobStatusCompleted is a TranscriptionJobStatus enum value
  2069. TranscriptionJobStatusCompleted = "COMPLETED"
  2070. )
  2071. const (
  2072. // VocabularyStatePending is a VocabularyState enum value
  2073. VocabularyStatePending = "PENDING"
  2074. // VocabularyStateReady is a VocabularyState enum value
  2075. VocabularyStateReady = "READY"
  2076. // VocabularyStateFailed is a VocabularyState enum value
  2077. VocabularyStateFailed = "FAILED"
  2078. )