github.com/twilio/twilio-go@v1.20.1/twiml/voice_response.go (about) 1 //This code was generated by 2 //\ / _ _ _| _ _ 3 // | (_)\/(_)(_|\/| |(/_ v1.0.0 4 // / / 5 6 package twiml 7 8 func Voice(verbs []Element) (string, error) { 9 doc, response := CreateDocument() 10 if verbs != nil { 11 AddAllVerbs(response, verbs) 12 } 13 return ToXML(doc) 14 } 15 16 //VoiceRefer <Refer> TwiML Verb 17 type VoiceRefer struct { 18 // action: Action URL 19 // method: Action URL method 20 // OptionalAttributes: additional attributes 21 Action string 22 Method string 23 InnerElements []Element 24 OptionalAttributes map[string]string 25 } 26 27 func (m VoiceRefer) GetName() string { 28 return "Refer" 29 } 30 31 func (m VoiceRefer) GetText() string { 32 return "" 33 } 34 35 func (m VoiceRefer) GetAttr() (map[string]string, map[string]string) { 36 paramsAttr := map[string]string{ 37 "Action": m.Action, 38 "Method": m.Method, 39 } 40 return m.OptionalAttributes, paramsAttr 41 } 42 43 func (m VoiceRefer) GetInnerElements() []Element { 44 return m.InnerElements 45 } 46 47 //VoiceReferSip <Sip> TwiML Noun used in <Refer> 48 type VoiceReferSip struct { 49 // sip_url: SIP URL 50 // OptionalAttributes: additional attributes 51 SipUrl string 52 InnerElements []Element 53 OptionalAttributes map[string]string 54 } 55 56 func (m VoiceReferSip) GetName() string { 57 return "Sip" 58 } 59 60 func (m VoiceReferSip) GetText() string { 61 return m.SipUrl 62 } 63 64 func (m VoiceReferSip) GetAttr() (map[string]string, map[string]string) { 65 return m.OptionalAttributes, nil 66 } 67 68 func (m VoiceReferSip) GetInnerElements() []Element { 69 return m.InnerElements 70 } 71 72 //VoiceStop <Stop> TwiML Verb 73 type VoiceStop struct { 74 // OptionalAttributes: additional attributes 75 InnerElements []Element 76 OptionalAttributes map[string]string 77 } 78 79 func (m VoiceStop) GetName() string { 80 return "Stop" 81 } 82 83 func (m VoiceStop) GetText() string { 84 return "" 85 } 86 87 func (m VoiceStop) GetAttr() (map[string]string, map[string]string) { 88 return m.OptionalAttributes, nil 89 } 90 91 func (m VoiceStop) GetInnerElements() []Element { 92 return m.InnerElements 93 } 94 95 //VoiceSipRec <Siprec> TwiML Noun 96 type VoiceSipRec struct { 97 // name: Friendly name given to SIPREC 98 // connector_name: Unique name for Connector 99 // track: Track to be streamed to remote service 100 // status_callback: Status Callback URL 101 // status_callback_method: Status Callback URL method 102 // OptionalAttributes: additional attributes 103 Name string 104 ConnectorName string 105 Track string 106 StatusCallback string 107 StatusCallbackMethod string 108 InnerElements []Element 109 OptionalAttributes map[string]string 110 } 111 112 func (m VoiceSipRec) GetName() string { 113 return "SipRec" 114 } 115 116 func (m VoiceSipRec) GetText() string { 117 return "" 118 } 119 120 func (m VoiceSipRec) GetAttr() (map[string]string, map[string]string) { 121 paramsAttr := map[string]string{ 122 "Name": m.Name, 123 "ConnectorName": m.ConnectorName, 124 "Track": m.Track, 125 "StatusCallback": m.StatusCallback, 126 "StatusCallbackMethod": m.StatusCallbackMethod, 127 } 128 return m.OptionalAttributes, paramsAttr 129 } 130 131 func (m VoiceSipRec) GetInnerElements() []Element { 132 return m.InnerElements 133 } 134 135 //VoiceParameter <Parameter> TwiML Noun 136 type VoiceParameter struct { 137 // name: The name of the custom parameter 138 // value: The value of the custom parameter 139 // OptionalAttributes: additional attributes 140 Name string 141 Value string 142 InnerElements []Element 143 OptionalAttributes map[string]string 144 } 145 146 func (m VoiceParameter) GetName() string { 147 return "Parameter" 148 } 149 150 func (m VoiceParameter) GetText() string { 151 return "" 152 } 153 154 func (m VoiceParameter) GetAttr() (map[string]string, map[string]string) { 155 paramsAttr := map[string]string{ 156 "Name": m.Name, 157 "Value": m.Value, 158 } 159 return m.OptionalAttributes, paramsAttr 160 } 161 162 func (m VoiceParameter) GetInnerElements() []Element { 163 return m.InnerElements 164 } 165 166 //VoiceStream <Stream> TwiML Noun 167 type VoiceStream struct { 168 // name: Friendly name given to the Stream 169 // connector_name: Unique name for Stream Connector 170 // url: URL of the remote service where the Stream is routed 171 // track: Track to be streamed to remote service 172 // status_callback: Status Callback URL 173 // status_callback_method: Status Callback URL method 174 // OptionalAttributes: additional attributes 175 Name string 176 ConnectorName string 177 Url string 178 Track string 179 StatusCallback string 180 StatusCallbackMethod string 181 InnerElements []Element 182 OptionalAttributes map[string]string 183 } 184 185 func (m VoiceStream) GetName() string { 186 return "Stream" 187 } 188 189 func (m VoiceStream) GetText() string { 190 return "" 191 } 192 193 func (m VoiceStream) GetAttr() (map[string]string, map[string]string) { 194 paramsAttr := map[string]string{ 195 "Name": m.Name, 196 "ConnectorName": m.ConnectorName, 197 "Url": m.Url, 198 "Track": m.Track, 199 "StatusCallback": m.StatusCallback, 200 "StatusCallbackMethod": m.StatusCallbackMethod, 201 } 202 return m.OptionalAttributes, paramsAttr 203 } 204 205 func (m VoiceStream) GetInnerElements() []Element { 206 return m.InnerElements 207 } 208 209 //VoiceStart <Start> TwiML Verb 210 type VoiceStart struct { 211 // action: Action URL 212 // method: Action URL method 213 // OptionalAttributes: additional attributes 214 Action string 215 Method string 216 InnerElements []Element 217 OptionalAttributes map[string]string 218 } 219 220 func (m VoiceStart) GetName() string { 221 return "Start" 222 } 223 224 func (m VoiceStart) GetText() string { 225 return "" 226 } 227 228 func (m VoiceStart) GetAttr() (map[string]string, map[string]string) { 229 paramsAttr := map[string]string{ 230 "Action": m.Action, 231 "Method": m.Method, 232 } 233 return m.OptionalAttributes, paramsAttr 234 } 235 236 func (m VoiceStart) GetInnerElements() []Element { 237 return m.InnerElements 238 } 239 240 //VoicePrompt <Prompt> Twiml Verb 241 type VoicePrompt struct { 242 // for_: Name of the payment source data element 243 // error_type: Type of error 244 // card_type: Type of the credit card 245 // attempt: Current attempt count 246 // require_matching_inputs: Require customer to input requested information twice and verify matching. 247 // OptionalAttributes: additional attributes 248 For_ string 249 ErrorType string 250 CardType string 251 Attempt string 252 RequireMatchingInputs string 253 InnerElements []Element 254 OptionalAttributes map[string]string 255 } 256 257 func (m VoicePrompt) GetName() string { 258 return "Prompt" 259 } 260 261 func (m VoicePrompt) GetText() string { 262 return "" 263 } 264 265 func (m VoicePrompt) GetAttr() (map[string]string, map[string]string) { 266 paramsAttr := map[string]string{ 267 "For_": m.For_, 268 "ErrorType": m.ErrorType, 269 "CardType": m.CardType, 270 "Attempt": m.Attempt, 271 "RequireMatchingInputs": m.RequireMatchingInputs, 272 } 273 return m.OptionalAttributes, paramsAttr 274 } 275 276 func (m VoicePrompt) GetInnerElements() []Element { 277 return m.InnerElements 278 } 279 280 //VoicePause <Pause> TwiML Verb 281 type VoicePause struct { 282 // length: Length in seconds to pause 283 // OptionalAttributes: additional attributes 284 Length string 285 InnerElements []Element 286 OptionalAttributes map[string]string 287 } 288 289 func (m VoicePause) GetName() string { 290 return "Pause" 291 } 292 293 func (m VoicePause) GetText() string { 294 return "" 295 } 296 297 func (m VoicePause) GetAttr() (map[string]string, map[string]string) { 298 paramsAttr := map[string]string{ 299 "Length": m.Length, 300 } 301 return m.OptionalAttributes, paramsAttr 302 } 303 304 func (m VoicePause) GetInnerElements() []Element { 305 return m.InnerElements 306 } 307 308 //VoicePlay <Play> TwiML Verb 309 type VoicePlay struct { 310 // url: Media URL 311 // loop: Times to loop media 312 // digits: Play DTMF tones for digits 313 // OptionalAttributes: additional attributes 314 Url string 315 Loop string 316 Digits string 317 InnerElements []Element 318 OptionalAttributes map[string]string 319 } 320 321 func (m VoicePlay) GetName() string { 322 return "Play" 323 } 324 325 func (m VoicePlay) GetText() string { 326 return m.Url 327 } 328 329 func (m VoicePlay) GetAttr() (map[string]string, map[string]string) { 330 paramsAttr := map[string]string{ 331 "Loop": m.Loop, 332 "Digits": m.Digits, 333 } 334 return m.OptionalAttributes, paramsAttr 335 } 336 337 func (m VoicePlay) GetInnerElements() []Element { 338 return m.InnerElements 339 } 340 341 //VoiceSay <Say> TwiML Verb 342 type VoiceSay struct { 343 // message: Message to say 344 // voice: Voice to use 345 // loop: Times to loop message 346 // language: Message language 347 // OptionalAttributes: additional attributes 348 Message string 349 Voice string 350 Loop string 351 Language string 352 InnerElements []Element 353 OptionalAttributes map[string]string 354 } 355 356 func (m VoiceSay) GetName() string { 357 return "Say" 358 } 359 360 func (m VoiceSay) GetText() string { 361 return m.Message 362 } 363 364 func (m VoiceSay) GetAttr() (map[string]string, map[string]string) { 365 paramsAttr := map[string]string{ 366 "Voice": m.Voice, 367 "Loop": m.Loop, 368 "Language": m.Language, 369 } 370 return m.OptionalAttributes, paramsAttr 371 } 372 373 func (m VoiceSay) GetInnerElements() []Element { 374 return m.InnerElements 375 } 376 377 //VoiceW Improving Pronunciation by Specifying Parts of Speech in <Say> 378 type VoiceW struct { 379 // words: Words to speak 380 // role: Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning 381 // OptionalAttributes: additional attributes 382 Words string 383 Role string 384 InnerElements []Element 385 OptionalAttributes map[string]string 386 } 387 388 func (m VoiceW) GetName() string { 389 return "W" 390 } 391 392 func (m VoiceW) GetText() string { 393 return m.Words 394 } 395 396 func (m VoiceW) GetAttr() (map[string]string, map[string]string) { 397 paramsAttr := map[string]string{ 398 "Role": m.Role, 399 } 400 return m.OptionalAttributes, paramsAttr 401 } 402 403 func (m VoiceW) GetInnerElements() []Element { 404 return m.InnerElements 405 } 406 407 //VoiceSub Pronouncing Acronyms and Abbreviations in <Say> 408 type VoiceSub struct { 409 // words: Words to be substituted 410 // alias: Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation 411 // OptionalAttributes: additional attributes 412 Words string 413 Alias string 414 InnerElements []Element 415 OptionalAttributes map[string]string 416 } 417 418 func (m VoiceSub) GetName() string { 419 return "Sub" 420 } 421 422 func (m VoiceSub) GetText() string { 423 return m.Words 424 } 425 426 func (m VoiceSub) GetAttr() (map[string]string, map[string]string) { 427 paramsAttr := map[string]string{ 428 "Alias": m.Alias, 429 } 430 return m.OptionalAttributes, paramsAttr 431 } 432 433 func (m VoiceSub) GetInnerElements() []Element { 434 return m.InnerElements 435 } 436 437 //VoiceSayAs Controlling How Special Types of Words Are Spoken in <Say> 438 type VoiceSayAs struct { 439 // words: Words to be interpreted 440 // interpret-as: Specify the type of words are spoken 441 // format: Specify the format of the date when interpret-as is set to date 442 // OptionalAttributes: additional attributes 443 Words string 444 InterpretAs string 445 Format string 446 InnerElements []Element 447 OptionalAttributes map[string]string 448 } 449 450 func (m VoiceSayAs) GetName() string { 451 return "SayAs" 452 } 453 454 func (m VoiceSayAs) GetText() string { 455 return m.Words 456 } 457 458 func (m VoiceSayAs) GetAttr() (map[string]string, map[string]string) { 459 paramsAttr := map[string]string{ 460 "InterpretAs": m.InterpretAs, 461 "Format": m.Format, 462 } 463 return m.OptionalAttributes, paramsAttr 464 } 465 466 func (m VoiceSayAs) GetInnerElements() []Element { 467 return m.InnerElements 468 } 469 470 //VoiceProsody Controling Volume, Speaking Rate, and Pitch in <Say> 471 type VoiceProsody struct { 472 // words: Words to speak 473 // volume: Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB 474 // rate: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n% 475 // pitch: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n% 476 // OptionalAttributes: additional attributes 477 Words string 478 Volume string 479 Rate string 480 Pitch string 481 InnerElements []Element 482 OptionalAttributes map[string]string 483 } 484 485 func (m VoiceProsody) GetName() string { 486 return "Prosody" 487 } 488 489 func (m VoiceProsody) GetText() string { 490 return m.Words 491 } 492 493 func (m VoiceProsody) GetAttr() (map[string]string, map[string]string) { 494 paramsAttr := map[string]string{ 495 "Volume": m.Volume, 496 "Rate": m.Rate, 497 "Pitch": m.Pitch, 498 } 499 return m.OptionalAttributes, paramsAttr 500 } 501 502 func (m VoiceProsody) GetInnerElements() []Element { 503 return m.InnerElements 504 } 505 506 //VoiceS Adding A Pause Between Sentences in <Say> 507 type VoiceS struct { 508 // words: Words to speak 509 // OptionalAttributes: additional attributes 510 Words string 511 InnerElements []Element 512 OptionalAttributes map[string]string 513 } 514 515 func (m VoiceS) GetName() string { 516 return "S" 517 } 518 519 func (m VoiceS) GetText() string { 520 return m.Words 521 } 522 523 func (m VoiceS) GetAttr() (map[string]string, map[string]string) { 524 return m.OptionalAttributes, nil 525 } 526 527 func (m VoiceS) GetInnerElements() []Element { 528 return m.InnerElements 529 } 530 531 //VoicePhoneme Using Phonetic Pronunciation in <Say> 532 type VoicePhoneme struct { 533 // words: Words to speak 534 // alphabet: Specify the phonetic alphabet 535 // ph: Specifiy the phonetic symbols for pronunciation 536 // OptionalAttributes: additional attributes 537 Words string 538 Alphabet string 539 Ph string 540 InnerElements []Element 541 OptionalAttributes map[string]string 542 } 543 544 func (m VoicePhoneme) GetName() string { 545 return "Phoneme" 546 } 547 548 func (m VoicePhoneme) GetText() string { 549 return m.Words 550 } 551 552 func (m VoicePhoneme) GetAttr() (map[string]string, map[string]string) { 553 paramsAttr := map[string]string{ 554 "Alphabet": m.Alphabet, 555 "Ph": m.Ph, 556 } 557 return m.OptionalAttributes, paramsAttr 558 } 559 560 func (m VoicePhoneme) GetInnerElements() []Element { 561 return m.InnerElements 562 } 563 564 //VoiceLang Specifying Another Language for Specific Words in <Say> 565 type VoiceLang struct { 566 // words: Words to speak 567 // xml:lang: Specify the language 568 // OptionalAttributes: additional attributes 569 Words string 570 XmlLang string 571 InnerElements []Element 572 OptionalAttributes map[string]string 573 } 574 575 func (m VoiceLang) GetName() string { 576 return "Lang" 577 } 578 579 func (m VoiceLang) GetText() string { 580 return m.Words 581 } 582 583 func (m VoiceLang) GetAttr() (map[string]string, map[string]string) { 584 paramsAttr := map[string]string{ 585 "XmlLang": m.XmlLang, 586 } 587 return m.OptionalAttributes, paramsAttr 588 } 589 590 func (m VoiceLang) GetInnerElements() []Element { 591 return m.InnerElements 592 } 593 594 //VoiceP Adding a Pause Between Paragraphs in <Say> 595 type VoiceP struct { 596 // words: Words to speak 597 // OptionalAttributes: additional attributes 598 Words string 599 InnerElements []Element 600 OptionalAttributes map[string]string 601 } 602 603 func (m VoiceP) GetName() string { 604 return "P" 605 } 606 607 func (m VoiceP) GetText() string { 608 return m.Words 609 } 610 611 func (m VoiceP) GetAttr() (map[string]string, map[string]string) { 612 return m.OptionalAttributes, nil 613 } 614 615 func (m VoiceP) GetInnerElements() []Element { 616 return m.InnerElements 617 } 618 619 //VoiceEmphasis Emphasizing Words in <Say> 620 type VoiceEmphasis struct { 621 // words: Words to emphasize 622 // level: Specify the degree of emphasis 623 // OptionalAttributes: additional attributes 624 Words string 625 Level string 626 InnerElements []Element 627 OptionalAttributes map[string]string 628 } 629 630 func (m VoiceEmphasis) GetName() string { 631 return "Emphasis" 632 } 633 634 func (m VoiceEmphasis) GetText() string { 635 return m.Words 636 } 637 638 func (m VoiceEmphasis) GetAttr() (map[string]string, map[string]string) { 639 paramsAttr := map[string]string{ 640 "Level": m.Level, 641 } 642 return m.OptionalAttributes, paramsAttr 643 } 644 645 func (m VoiceEmphasis) GetInnerElements() []Element { 646 return m.InnerElements 647 } 648 649 //VoiceBreak Adding a Pause in <Say> 650 type VoiceBreak struct { 651 // strength: Set a pause based on strength 652 // time: Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms 653 // OptionalAttributes: additional attributes 654 Strength string 655 Time string 656 InnerElements []Element 657 OptionalAttributes map[string]string 658 } 659 660 func (m VoiceBreak) GetName() string { 661 return "Break" 662 } 663 664 func (m VoiceBreak) GetText() string { 665 return "" 666 } 667 668 func (m VoiceBreak) GetAttr() (map[string]string, map[string]string) { 669 paramsAttr := map[string]string{ 670 "Strength": m.Strength, 671 "Time": m.Time, 672 } 673 return m.OptionalAttributes, paramsAttr 674 } 675 676 func (m VoiceBreak) GetInnerElements() []Element { 677 return m.InnerElements 678 } 679 680 //VoicePay <Pay> Twiml Verb 681 type VoicePay struct { 682 // input: Input type Twilio should accept 683 // action: Action URL 684 // bank_account_type: Bank account type for ach transactions. If set, payment method attribute must be provided and value should be set to ach-debit. defaults to consumer-checking 685 // status_callback: Status callback URL 686 // status_callback_method: Status callback method 687 // timeout: Time to wait to gather input 688 // max_attempts: Maximum number of allowed retries when gathering input 689 // security_code: Prompt for security code 690 // postal_code: Prompt for postal code and it should be true/false or default postal code 691 // min_postal_code_length: Prompt for minimum postal code length 692 // payment_connector: Unique name for payment connector 693 // payment_method: Payment method to be used. defaults to credit-card 694 // token_type: Type of token 695 // charge_amount: Amount to process. If value is greater than 0 then make the payment else create a payment token 696 // currency: Currency of the amount attribute 697 // description: Details regarding the payment 698 // valid_card_types: Comma separated accepted card types 699 // language: Language to use 700 // OptionalAttributes: additional attributes 701 Input string 702 Action string 703 BankAccountType string 704 StatusCallback string 705 StatusCallbackMethod string 706 Timeout string 707 MaxAttempts string 708 SecurityCode string 709 PostalCode string 710 MinPostalCodeLength string 711 PaymentConnector string 712 PaymentMethod string 713 TokenType string 714 ChargeAmount string 715 Currency string 716 Description string 717 ValidCardTypes string 718 Language string 719 InnerElements []Element 720 OptionalAttributes map[string]string 721 } 722 723 func (m VoicePay) GetName() string { 724 return "Pay" 725 } 726 727 func (m VoicePay) GetText() string { 728 return "" 729 } 730 731 func (m VoicePay) GetAttr() (map[string]string, map[string]string) { 732 paramsAttr := map[string]string{ 733 "Input": m.Input, 734 "Action": m.Action, 735 "BankAccountType": m.BankAccountType, 736 "StatusCallback": m.StatusCallback, 737 "StatusCallbackMethod": m.StatusCallbackMethod, 738 "Timeout": m.Timeout, 739 "MaxAttempts": m.MaxAttempts, 740 "SecurityCode": m.SecurityCode, 741 "PostalCode": m.PostalCode, 742 "MinPostalCodeLength": m.MinPostalCodeLength, 743 "PaymentConnector": m.PaymentConnector, 744 "PaymentMethod": m.PaymentMethod, 745 "TokenType": m.TokenType, 746 "ChargeAmount": m.ChargeAmount, 747 "Currency": m.Currency, 748 "Description": m.Description, 749 "ValidCardTypes": m.ValidCardTypes, 750 "Language": m.Language, 751 } 752 return m.OptionalAttributes, paramsAttr 753 } 754 755 func (m VoicePay) GetInnerElements() []Element { 756 return m.InnerElements 757 } 758 759 //VoiceSms <Sms> TwiML Noun 760 type VoiceSms struct { 761 // message: Message body 762 // to: Number to send message to 763 // from: Number to send message from 764 // action: Action URL 765 // method: Action URL method 766 // status_callback: Status callback URL 767 // OptionalAttributes: additional attributes 768 Message string 769 To string 770 From string 771 Action string 772 Method string 773 StatusCallback string 774 InnerElements []Element 775 OptionalAttributes map[string]string 776 } 777 778 func (m VoiceSms) GetName() string { 779 return "Sms" 780 } 781 782 func (m VoiceSms) GetText() string { 783 return m.Message 784 } 785 786 func (m VoiceSms) GetAttr() (map[string]string, map[string]string) { 787 paramsAttr := map[string]string{ 788 "To": m.To, 789 "From": m.From, 790 "Action": m.Action, 791 "Method": m.Method, 792 "StatusCallback": m.StatusCallback, 793 } 794 return m.OptionalAttributes, paramsAttr 795 } 796 797 func (m VoiceSms) GetInnerElements() []Element { 798 return m.InnerElements 799 } 800 801 //VoiceReject <Reject> TwiML Verb 802 type VoiceReject struct { 803 // reason: Rejection reason 804 // OptionalAttributes: additional attributes 805 Reason string 806 InnerElements []Element 807 OptionalAttributes map[string]string 808 } 809 810 func (m VoiceReject) GetName() string { 811 return "Reject" 812 } 813 814 func (m VoiceReject) GetText() string { 815 return "" 816 } 817 818 func (m VoiceReject) GetAttr() (map[string]string, map[string]string) { 819 paramsAttr := map[string]string{ 820 "Reason": m.Reason, 821 } 822 return m.OptionalAttributes, paramsAttr 823 } 824 825 func (m VoiceReject) GetInnerElements() []Element { 826 return m.InnerElements 827 } 828 829 //VoiceRedirect <Redirect> TwiML Verb 830 type VoiceRedirect struct { 831 // url: Redirect URL 832 // method: Redirect URL method 833 // OptionalAttributes: additional attributes 834 Url string 835 Method string 836 InnerElements []Element 837 OptionalAttributes map[string]string 838 } 839 840 func (m VoiceRedirect) GetName() string { 841 return "Redirect" 842 } 843 844 func (m VoiceRedirect) GetText() string { 845 return m.Url 846 } 847 848 func (m VoiceRedirect) GetAttr() (map[string]string, map[string]string) { 849 paramsAttr := map[string]string{ 850 "Method": m.Method, 851 } 852 return m.OptionalAttributes, paramsAttr 853 } 854 855 func (m VoiceRedirect) GetInnerElements() []Element { 856 return m.InnerElements 857 } 858 859 //VoiceRecord <Record> TwiML Verb 860 type VoiceRecord struct { 861 // action: Action URL 862 // method: Action URL method 863 // timeout: Timeout to begin recording 864 // finish_on_key: Finish recording on key 865 // max_length: Max time to record in seconds 866 // play_beep: Play beep 867 // trim: Trim the recording 868 // recording_status_callback: Status callback URL 869 // recording_status_callback_method: Status callback URL method 870 // recording_status_callback_event: Recording status callback events 871 // transcribe: Transcribe the recording 872 // transcribe_callback: Transcribe callback URL 873 // OptionalAttributes: additional attributes 874 Action string 875 Method string 876 Timeout string 877 FinishOnKey string 878 MaxLength string 879 PlayBeep string 880 Trim string 881 RecordingStatusCallback string 882 RecordingStatusCallbackMethod string 883 RecordingStatusCallbackEvent string 884 Transcribe string 885 TranscribeCallback string 886 InnerElements []Element 887 OptionalAttributes map[string]string 888 } 889 890 func (m VoiceRecord) GetName() string { 891 return "Record" 892 } 893 894 func (m VoiceRecord) GetText() string { 895 return "" 896 } 897 898 func (m VoiceRecord) GetAttr() (map[string]string, map[string]string) { 899 paramsAttr := map[string]string{ 900 "Action": m.Action, 901 "Method": m.Method, 902 "Timeout": m.Timeout, 903 "FinishOnKey": m.FinishOnKey, 904 "MaxLength": m.MaxLength, 905 "PlayBeep": m.PlayBeep, 906 "Trim": m.Trim, 907 "RecordingStatusCallback": m.RecordingStatusCallback, 908 "RecordingStatusCallbackMethod": m.RecordingStatusCallbackMethod, 909 "RecordingStatusCallbackEvent": m.RecordingStatusCallbackEvent, 910 "Transcribe": m.Transcribe, 911 "TranscribeCallback": m.TranscribeCallback, 912 } 913 return m.OptionalAttributes, paramsAttr 914 } 915 916 func (m VoiceRecord) GetInnerElements() []Element { 917 return m.InnerElements 918 } 919 920 //VoiceQueue <Queue> TwiML Noun 921 type VoiceQueue struct { 922 // name: Queue name 923 // url: Action URL 924 // method: Action URL method 925 // reservation_sid: TaskRouter Reservation SID 926 // post_work_activity_sid: TaskRouter Activity SID 927 // OptionalAttributes: additional attributes 928 Name string 929 Url string 930 Method string 931 ReservationSid string 932 PostWorkActivitySid string 933 InnerElements []Element 934 OptionalAttributes map[string]string 935 } 936 937 func (m VoiceQueue) GetName() string { 938 return "Queue" 939 } 940 941 func (m VoiceQueue) GetText() string { 942 return m.Name 943 } 944 945 func (m VoiceQueue) GetAttr() (map[string]string, map[string]string) { 946 paramsAttr := map[string]string{ 947 "Url": m.Url, 948 "Method": m.Method, 949 "ReservationSid": m.ReservationSid, 950 "PostWorkActivitySid": m.PostWorkActivitySid, 951 } 952 return m.OptionalAttributes, paramsAttr 953 } 954 955 func (m VoiceQueue) GetInnerElements() []Element { 956 return m.InnerElements 957 } 958 959 //VoiceLeave <Leave> TwiML Verb 960 type VoiceLeave struct { 961 // OptionalAttributes: additional attributes 962 InnerElements []Element 963 OptionalAttributes map[string]string 964 } 965 966 func (m VoiceLeave) GetName() string { 967 return "Leave" 968 } 969 970 func (m VoiceLeave) GetText() string { 971 return "" 972 } 973 974 func (m VoiceLeave) GetAttr() (map[string]string, map[string]string) { 975 return m.OptionalAttributes, nil 976 } 977 978 func (m VoiceLeave) GetInnerElements() []Element { 979 return m.InnerElements 980 } 981 982 //VoiceHangup <Hangup> TwiML Verb 983 type VoiceHangup struct { 984 // OptionalAttributes: additional attributes 985 InnerElements []Element 986 OptionalAttributes map[string]string 987 } 988 989 func (m VoiceHangup) GetName() string { 990 return "Hangup" 991 } 992 993 func (m VoiceHangup) GetText() string { 994 return "" 995 } 996 997 func (m VoiceHangup) GetAttr() (map[string]string, map[string]string) { 998 return m.OptionalAttributes, nil 999 } 1000 1001 func (m VoiceHangup) GetInnerElements() []Element { 1002 return m.InnerElements 1003 } 1004 1005 //VoiceGather <Gather> TwiML Verb 1006 type VoiceGather struct { 1007 // input: Input type Twilio should accept 1008 // action: Action URL 1009 // method: Action URL method 1010 // timeout: Time to wait to gather input 1011 // speech_timeout: Time to wait to gather speech input and it should be either auto or a positive integer. 1012 // max_speech_time: Max allowed time for speech input 1013 // profanity_filter: Profanity Filter on speech 1014 // finish_on_key: Finish gather on key 1015 // num_digits: Number of digits to collect 1016 // partial_result_callback: Partial result callback URL 1017 // partial_result_callback_method: Partial result callback URL method 1018 // language: Language to use 1019 // hints: Speech recognition hints 1020 // barge_in: Stop playing media upon speech 1021 // debug: Allow debug for gather 1022 // action_on_empty_result: Force webhook to the action URL event if there is no input 1023 // speech_model: Specify the model that is best suited for your use case 1024 // enhanced: Use enhanced speech model 1025 // OptionalAttributes: additional attributes 1026 Input string 1027 Action string 1028 Method string 1029 Timeout string 1030 SpeechTimeout string 1031 MaxSpeechTime string 1032 ProfanityFilter string 1033 FinishOnKey string 1034 NumDigits string 1035 PartialResultCallback string 1036 PartialResultCallbackMethod string 1037 Language string 1038 Hints string 1039 BargeIn string 1040 Debug string 1041 ActionOnEmptyResult string 1042 SpeechModel string 1043 Enhanced string 1044 InnerElements []Element 1045 OptionalAttributes map[string]string 1046 } 1047 1048 func (m VoiceGather) GetName() string { 1049 return "Gather" 1050 } 1051 1052 func (m VoiceGather) GetText() string { 1053 return "" 1054 } 1055 1056 func (m VoiceGather) GetAttr() (map[string]string, map[string]string) { 1057 paramsAttr := map[string]string{ 1058 "Input": m.Input, 1059 "Action": m.Action, 1060 "Method": m.Method, 1061 "Timeout": m.Timeout, 1062 "SpeechTimeout": m.SpeechTimeout, 1063 "MaxSpeechTime": m.MaxSpeechTime, 1064 "ProfanityFilter": m.ProfanityFilter, 1065 "FinishOnKey": m.FinishOnKey, 1066 "NumDigits": m.NumDigits, 1067 "PartialResultCallback": m.PartialResultCallback, 1068 "PartialResultCallbackMethod": m.PartialResultCallbackMethod, 1069 "Language": m.Language, 1070 "Hints": m.Hints, 1071 "BargeIn": m.BargeIn, 1072 "Debug": m.Debug, 1073 "ActionOnEmptyResult": m.ActionOnEmptyResult, 1074 "SpeechModel": m.SpeechModel, 1075 "Enhanced": m.Enhanced, 1076 } 1077 return m.OptionalAttributes, paramsAttr 1078 } 1079 1080 func (m VoiceGather) GetInnerElements() []Element { 1081 return m.InnerElements 1082 } 1083 1084 //VoiceEnqueue <Enqueue> TwiML Noun 1085 type VoiceEnqueue struct { 1086 // name: Friendly name 1087 // action: Action URL 1088 // max_queue_size: Maximum size of queue 1089 // method: Action URL method 1090 // wait_url: Wait URL 1091 // wait_url_method: Wait URL method 1092 // workflow_sid: TaskRouter Workflow SID 1093 // OptionalAttributes: additional attributes 1094 Name string 1095 Action string 1096 MaxQueueSize string 1097 Method string 1098 WaitUrl string 1099 WaitUrlMethod string 1100 WorkflowSid string 1101 InnerElements []Element 1102 OptionalAttributes map[string]string 1103 } 1104 1105 func (m VoiceEnqueue) GetName() string { 1106 return "Enqueue" 1107 } 1108 1109 func (m VoiceEnqueue) GetText() string { 1110 return m.Name 1111 } 1112 1113 func (m VoiceEnqueue) GetAttr() (map[string]string, map[string]string) { 1114 paramsAttr := map[string]string{ 1115 "Action": m.Action, 1116 "MaxQueueSize": m.MaxQueueSize, 1117 "Method": m.Method, 1118 "WaitUrl": m.WaitUrl, 1119 "WaitUrlMethod": m.WaitUrlMethod, 1120 "WorkflowSid": m.WorkflowSid, 1121 } 1122 return m.OptionalAttributes, paramsAttr 1123 } 1124 1125 func (m VoiceEnqueue) GetInnerElements() []Element { 1126 return m.InnerElements 1127 } 1128 1129 //VoiceTask <Task> TwiML Noun 1130 type VoiceTask struct { 1131 // body: TaskRouter task attributes 1132 // priority: Task priority 1133 // timeout: Timeout associated with task 1134 // OptionalAttributes: additional attributes 1135 Body string 1136 Priority string 1137 Timeout string 1138 InnerElements []Element 1139 OptionalAttributes map[string]string 1140 } 1141 1142 func (m VoiceTask) GetName() string { 1143 return "Task" 1144 } 1145 1146 func (m VoiceTask) GetText() string { 1147 return m.Body 1148 } 1149 1150 func (m VoiceTask) GetAttr() (map[string]string, map[string]string) { 1151 paramsAttr := map[string]string{ 1152 "Priority": m.Priority, 1153 "Timeout": m.Timeout, 1154 } 1155 return m.OptionalAttributes, paramsAttr 1156 } 1157 1158 func (m VoiceTask) GetInnerElements() []Element { 1159 return m.InnerElements 1160 } 1161 1162 //VoiceEcho <Echo> TwiML Verb 1163 type VoiceEcho struct { 1164 // OptionalAttributes: additional attributes 1165 InnerElements []Element 1166 OptionalAttributes map[string]string 1167 } 1168 1169 func (m VoiceEcho) GetName() string { 1170 return "Echo" 1171 } 1172 1173 func (m VoiceEcho) GetText() string { 1174 return "" 1175 } 1176 1177 func (m VoiceEcho) GetAttr() (map[string]string, map[string]string) { 1178 return m.OptionalAttributes, nil 1179 } 1180 1181 func (m VoiceEcho) GetInnerElements() []Element { 1182 return m.InnerElements 1183 } 1184 1185 //VoiceDial <Dial> TwiML Verb 1186 type VoiceDial struct { 1187 // number: Phone number to dial 1188 // action: Action URL 1189 // method: Action URL method 1190 // timeout: Time to wait for answer 1191 // hangup_on_star: Hangup call on star press 1192 // time_limit: Max time length 1193 // caller_id: Caller ID to display 1194 // record: Record the call 1195 // trim: Trim the recording 1196 // recording_status_callback: Recording status callback URL 1197 // recording_status_callback_method: Recording status callback URL method 1198 // recording_status_callback_event: Recording status callback events 1199 // answer_on_bridge: Preserve the ringing behavior of the inbound call until the Dialed call picks up 1200 // ring_tone: Ringtone allows you to override the ringback tone that Twilio will play back to the caller while executing the Dial 1201 // recording_track: To indicate which audio track should be recorded 1202 // sequential: Used to determine if child TwiML nouns should be dialed in order, one after the other (sequential) or dial all at once (parallel). Default is false, parallel 1203 // refer_url: Webhook that will receive future SIP REFER requests 1204 // refer_method: The HTTP method to use for the refer Webhook 1205 // OptionalAttributes: additional attributes 1206 Number string 1207 Action string 1208 Method string 1209 Timeout string 1210 HangupOnStar string 1211 TimeLimit string 1212 CallerId string 1213 Record string 1214 Trim string 1215 RecordingStatusCallback string 1216 RecordingStatusCallbackMethod string 1217 RecordingStatusCallbackEvent string 1218 AnswerOnBridge string 1219 RingTone string 1220 RecordingTrack string 1221 Sequential string 1222 ReferUrl string 1223 ReferMethod string 1224 InnerElements []Element 1225 OptionalAttributes map[string]string 1226 } 1227 1228 func (m VoiceDial) GetName() string { 1229 return "Dial" 1230 } 1231 1232 func (m VoiceDial) GetText() string { 1233 return m.Number 1234 } 1235 1236 func (m VoiceDial) GetAttr() (map[string]string, map[string]string) { 1237 paramsAttr := map[string]string{ 1238 "Action": m.Action, 1239 "Method": m.Method, 1240 "Timeout": m.Timeout, 1241 "HangupOnStar": m.HangupOnStar, 1242 "TimeLimit": m.TimeLimit, 1243 "CallerId": m.CallerId, 1244 "Record": m.Record, 1245 "Trim": m.Trim, 1246 "RecordingStatusCallback": m.RecordingStatusCallback, 1247 "RecordingStatusCallbackMethod": m.RecordingStatusCallbackMethod, 1248 "RecordingStatusCallbackEvent": m.RecordingStatusCallbackEvent, 1249 "AnswerOnBridge": m.AnswerOnBridge, 1250 "RingTone": m.RingTone, 1251 "RecordingTrack": m.RecordingTrack, 1252 "Sequential": m.Sequential, 1253 "ReferUrl": m.ReferUrl, 1254 "ReferMethod": m.ReferMethod, 1255 } 1256 return m.OptionalAttributes, paramsAttr 1257 } 1258 1259 func (m VoiceDial) GetInnerElements() []Element { 1260 return m.InnerElements 1261 } 1262 1263 //VoiceApplication <Application> TwiML Noun 1264 type VoiceApplication struct { 1265 // application_sid: Application sid 1266 // url: TwiML URL 1267 // method: TwiML URL Method 1268 // status_callback_event: Events to trigger status callback 1269 // status_callback: Status Callback URL 1270 // status_callback_method: Status Callback URL Method 1271 // customer_id: Identity of the customer calling application 1272 // copy_parent_to: Copy parent call To field to called application side, otherwise use the application sid as To field 1273 // OptionalAttributes: additional attributes 1274 ApplicationSid string 1275 Url string 1276 Method string 1277 StatusCallbackEvent string 1278 StatusCallback string 1279 StatusCallbackMethod string 1280 CustomerId string 1281 CopyParentTo string 1282 InnerElements []Element 1283 OptionalAttributes map[string]string 1284 } 1285 1286 func (m VoiceApplication) GetName() string { 1287 return "Application" 1288 } 1289 1290 func (m VoiceApplication) GetText() string { 1291 return m.ApplicationSid 1292 } 1293 1294 func (m VoiceApplication) GetAttr() (map[string]string, map[string]string) { 1295 paramsAttr := map[string]string{ 1296 "Url": m.Url, 1297 "Method": m.Method, 1298 "StatusCallbackEvent": m.StatusCallbackEvent, 1299 "StatusCallback": m.StatusCallback, 1300 "StatusCallbackMethod": m.StatusCallbackMethod, 1301 "CustomerId": m.CustomerId, 1302 "CopyParentTo": m.CopyParentTo, 1303 } 1304 return m.OptionalAttributes, paramsAttr 1305 } 1306 1307 func (m VoiceApplication) GetInnerElements() []Element { 1308 return m.InnerElements 1309 } 1310 1311 //VoiceApplicationSid <ApplicationSid> TwiML Noun 1312 type VoiceApplicationSid struct { 1313 // sid: Application sid to dial 1314 // OptionalAttributes: additional attributes 1315 Sid string 1316 InnerElements []Element 1317 OptionalAttributes map[string]string 1318 } 1319 1320 func (m VoiceApplicationSid) GetName() string { 1321 return "ApplicationSid" 1322 } 1323 1324 func (m VoiceApplicationSid) GetText() string { 1325 return m.Sid 1326 } 1327 1328 func (m VoiceApplicationSid) GetAttr() (map[string]string, map[string]string) { 1329 return m.OptionalAttributes, nil 1330 } 1331 1332 func (m VoiceApplicationSid) GetInnerElements() []Element { 1333 return m.InnerElements 1334 } 1335 1336 //VoiceSip <Sip> TwiML Noun 1337 type VoiceSip struct { 1338 // sip_url: SIP URL 1339 // username: SIP Username 1340 // password: SIP Password 1341 // url: Action URL 1342 // method: Action URL method 1343 // status_callback_event: Status callback events 1344 // status_callback: Status callback URL 1345 // status_callback_method: Status callback URL method 1346 // machine_detection: Enable machine detection or end of greeting detection 1347 // amd_status_callback_method: HTTP Method to use with amd_status_callback 1348 // amd_status_callback: The URL we should call to send amd status information to your application 1349 // machine_detection_timeout: Number of seconds to wait for machine detection 1350 // machine_detection_speech_threshold: Number of milliseconds for measuring stick for the length of the speech activity 1351 // machine_detection_speech_end_threshold: Number of milliseconds of silence after speech activity 1352 // machine_detection_silence_timeout: Number of milliseconds of initial silence 1353 // OptionalAttributes: additional attributes 1354 SipUrl string 1355 Username string 1356 Password string 1357 Url string 1358 Method string 1359 StatusCallbackEvent string 1360 StatusCallback string 1361 StatusCallbackMethod string 1362 MachineDetection string 1363 AmdStatusCallbackMethod string 1364 AmdStatusCallback string 1365 MachineDetectionTimeout string 1366 MachineDetectionSpeechThreshold string 1367 MachineDetectionSpeechEndThreshold string 1368 MachineDetectionSilenceTimeout string 1369 InnerElements []Element 1370 OptionalAttributes map[string]string 1371 } 1372 1373 func (m VoiceSip) GetName() string { 1374 return "Sip" 1375 } 1376 1377 func (m VoiceSip) GetText() string { 1378 return m.SipUrl 1379 } 1380 1381 func (m VoiceSip) GetAttr() (map[string]string, map[string]string) { 1382 paramsAttr := map[string]string{ 1383 "Username": m.Username, 1384 "Password": m.Password, 1385 "Url": m.Url, 1386 "Method": m.Method, 1387 "StatusCallbackEvent": m.StatusCallbackEvent, 1388 "StatusCallback": m.StatusCallback, 1389 "StatusCallbackMethod": m.StatusCallbackMethod, 1390 "MachineDetection": m.MachineDetection, 1391 "AmdStatusCallbackMethod": m.AmdStatusCallbackMethod, 1392 "AmdStatusCallback": m.AmdStatusCallback, 1393 "MachineDetectionTimeout": m.MachineDetectionTimeout, 1394 "MachineDetectionSpeechThreshold": m.MachineDetectionSpeechThreshold, 1395 "MachineDetectionSpeechEndThreshold": m.MachineDetectionSpeechEndThreshold, 1396 "MachineDetectionSilenceTimeout": m.MachineDetectionSilenceTimeout, 1397 } 1398 return m.OptionalAttributes, paramsAttr 1399 } 1400 1401 func (m VoiceSip) GetInnerElements() []Element { 1402 return m.InnerElements 1403 } 1404 1405 //VoiceSim <Sim> TwiML Noun 1406 type VoiceSim struct { 1407 // sim_sid: SIM SID 1408 // OptionalAttributes: additional attributes 1409 SimSid string 1410 InnerElements []Element 1411 OptionalAttributes map[string]string 1412 } 1413 1414 func (m VoiceSim) GetName() string { 1415 return "Sim" 1416 } 1417 1418 func (m VoiceSim) GetText() string { 1419 return m.SimSid 1420 } 1421 1422 func (m VoiceSim) GetAttr() (map[string]string, map[string]string) { 1423 return m.OptionalAttributes, nil 1424 } 1425 1426 func (m VoiceSim) GetInnerElements() []Element { 1427 return m.InnerElements 1428 } 1429 1430 //VoiceNumber <Number> TwiML Noun 1431 type VoiceNumber struct { 1432 // phone_number: Phone Number to dial 1433 // send_digits: DTMF tones to play when the call is answered 1434 // url: TwiML URL 1435 // method: TwiML URL method 1436 // status_callback_event: Events to call status callback 1437 // status_callback: Status callback URL 1438 // status_callback_method: Status callback URL method 1439 // byoc: BYOC trunk SID (Beta) 1440 // machine_detection: Enable machine detection or end of greeting detection 1441 // amd_status_callback_method: HTTP Method to use with amd_status_callback 1442 // amd_status_callback: The URL we should call to send amd status information to your application 1443 // machine_detection_timeout: Number of seconds to wait for machine detection 1444 // machine_detection_speech_threshold: Number of milliseconds for measuring stick for the length of the speech activity 1445 // machine_detection_speech_end_threshold: Number of milliseconds of silence after speech activity 1446 // machine_detection_silence_timeout: Number of milliseconds of initial silence 1447 // OptionalAttributes: additional attributes 1448 PhoneNumber string 1449 SendDigits string 1450 Url string 1451 Method string 1452 StatusCallbackEvent string 1453 StatusCallback string 1454 StatusCallbackMethod string 1455 Byoc string 1456 MachineDetection string 1457 AmdStatusCallbackMethod string 1458 AmdStatusCallback string 1459 MachineDetectionTimeout string 1460 MachineDetectionSpeechThreshold string 1461 MachineDetectionSpeechEndThreshold string 1462 MachineDetectionSilenceTimeout string 1463 InnerElements []Element 1464 OptionalAttributes map[string]string 1465 } 1466 1467 func (m VoiceNumber) GetName() string { 1468 return "Number" 1469 } 1470 1471 func (m VoiceNumber) GetText() string { 1472 return m.PhoneNumber 1473 } 1474 1475 func (m VoiceNumber) GetAttr() (map[string]string, map[string]string) { 1476 paramsAttr := map[string]string{ 1477 "SendDigits": m.SendDigits, 1478 "Url": m.Url, 1479 "Method": m.Method, 1480 "StatusCallbackEvent": m.StatusCallbackEvent, 1481 "StatusCallback": m.StatusCallback, 1482 "StatusCallbackMethod": m.StatusCallbackMethod, 1483 "Byoc": m.Byoc, 1484 "MachineDetection": m.MachineDetection, 1485 "AmdStatusCallbackMethod": m.AmdStatusCallbackMethod, 1486 "AmdStatusCallback": m.AmdStatusCallback, 1487 "MachineDetectionTimeout": m.MachineDetectionTimeout, 1488 "MachineDetectionSpeechThreshold": m.MachineDetectionSpeechThreshold, 1489 "MachineDetectionSpeechEndThreshold": m.MachineDetectionSpeechEndThreshold, 1490 "MachineDetectionSilenceTimeout": m.MachineDetectionSilenceTimeout, 1491 } 1492 return m.OptionalAttributes, paramsAttr 1493 } 1494 1495 func (m VoiceNumber) GetInnerElements() []Element { 1496 return m.InnerElements 1497 } 1498 1499 //VoiceConference <Conference> TwiML Noun 1500 type VoiceConference struct { 1501 // name: Conference name 1502 // muted: Join the conference muted 1503 // beep: Play beep when joining 1504 // start_conference_on_enter: Start the conference on enter 1505 // end_conference_on_exit: End the conferenceon exit 1506 // wait_url: Wait URL 1507 // wait_method: Wait URL method 1508 // max_participants: Maximum number of participants 1509 // record: Record the conference 1510 // region: Conference region 1511 // coach: Call coach 1512 // trim: Trim the conference recording 1513 // status_callback_event: Events to call status callback URL 1514 // status_callback: Status callback URL 1515 // status_callback_method: Status callback URL method 1516 // recording_status_callback: Recording status callback URL 1517 // recording_status_callback_method: Recording status callback URL method 1518 // recording_status_callback_event: Recording status callback events 1519 // event_callback_url: Event callback URL 1520 // jitter_buffer_size: Size of jitter buffer for participant 1521 // participant_label: A label for participant 1522 // OptionalAttributes: additional attributes 1523 Name string 1524 Muted string 1525 Beep string 1526 StartConferenceOnEnter string 1527 EndConferenceOnExit string 1528 WaitUrl string 1529 WaitMethod string 1530 MaxParticipants string 1531 Record string 1532 Region string 1533 Coach string 1534 Trim string 1535 StatusCallbackEvent string 1536 StatusCallback string 1537 StatusCallbackMethod string 1538 RecordingStatusCallback string 1539 RecordingStatusCallbackMethod string 1540 RecordingStatusCallbackEvent string 1541 EventCallbackUrl string 1542 JitterBufferSize string 1543 ParticipantLabel string 1544 InnerElements []Element 1545 OptionalAttributes map[string]string 1546 } 1547 1548 func (m VoiceConference) GetName() string { 1549 return "Conference" 1550 } 1551 1552 func (m VoiceConference) GetText() string { 1553 return m.Name 1554 } 1555 1556 func (m VoiceConference) GetAttr() (map[string]string, map[string]string) { 1557 paramsAttr := map[string]string{ 1558 "Muted": m.Muted, 1559 "Beep": m.Beep, 1560 "StartConferenceOnEnter": m.StartConferenceOnEnter, 1561 "EndConferenceOnExit": m.EndConferenceOnExit, 1562 "WaitUrl": m.WaitUrl, 1563 "WaitMethod": m.WaitMethod, 1564 "MaxParticipants": m.MaxParticipants, 1565 "Record": m.Record, 1566 "Region": m.Region, 1567 "Coach": m.Coach, 1568 "Trim": m.Trim, 1569 "StatusCallbackEvent": m.StatusCallbackEvent, 1570 "StatusCallback": m.StatusCallback, 1571 "StatusCallbackMethod": m.StatusCallbackMethod, 1572 "RecordingStatusCallback": m.RecordingStatusCallback, 1573 "RecordingStatusCallbackMethod": m.RecordingStatusCallbackMethod, 1574 "RecordingStatusCallbackEvent": m.RecordingStatusCallbackEvent, 1575 "EventCallbackUrl": m.EventCallbackUrl, 1576 "JitterBufferSize": m.JitterBufferSize, 1577 "ParticipantLabel": m.ParticipantLabel, 1578 } 1579 return m.OptionalAttributes, paramsAttr 1580 } 1581 1582 func (m VoiceConference) GetInnerElements() []Element { 1583 return m.InnerElements 1584 } 1585 1586 //VoiceClient <Client> TwiML Noun 1587 type VoiceClient struct { 1588 // identity: Client identity 1589 // url: Client URL 1590 // method: Client URL Method 1591 // status_callback_event: Events to trigger status callback 1592 // status_callback: Status Callback URL 1593 // status_callback_method: Status Callback URL Method 1594 // OptionalAttributes: additional attributes 1595 Identity string 1596 Url string 1597 Method string 1598 StatusCallbackEvent string 1599 StatusCallback string 1600 StatusCallbackMethod string 1601 InnerElements []Element 1602 OptionalAttributes map[string]string 1603 } 1604 1605 func (m VoiceClient) GetName() string { 1606 return "Client" 1607 } 1608 1609 func (m VoiceClient) GetText() string { 1610 return m.Identity 1611 } 1612 1613 func (m VoiceClient) GetAttr() (map[string]string, map[string]string) { 1614 paramsAttr := map[string]string{ 1615 "Url": m.Url, 1616 "Method": m.Method, 1617 "StatusCallbackEvent": m.StatusCallbackEvent, 1618 "StatusCallback": m.StatusCallback, 1619 "StatusCallbackMethod": m.StatusCallbackMethod, 1620 } 1621 return m.OptionalAttributes, paramsAttr 1622 } 1623 1624 func (m VoiceClient) GetInnerElements() []Element { 1625 return m.InnerElements 1626 } 1627 1628 //VoiceIdentity <Identity> TwiML Noun 1629 type VoiceIdentity struct { 1630 // client_identity: Identity of the client to dial 1631 // OptionalAttributes: additional attributes 1632 ClientIdentity string 1633 InnerElements []Element 1634 OptionalAttributes map[string]string 1635 } 1636 1637 func (m VoiceIdentity) GetName() string { 1638 return "Identity" 1639 } 1640 1641 func (m VoiceIdentity) GetText() string { 1642 return m.ClientIdentity 1643 } 1644 1645 func (m VoiceIdentity) GetAttr() (map[string]string, map[string]string) { 1646 return m.OptionalAttributes, nil 1647 } 1648 1649 func (m VoiceIdentity) GetInnerElements() []Element { 1650 return m.InnerElements 1651 } 1652 1653 //VoiceConnect <Connect> TwiML Verb 1654 type VoiceConnect struct { 1655 // action: Action URL 1656 // method: Action URL method 1657 // OptionalAttributes: additional attributes 1658 Action string 1659 Method string 1660 InnerElements []Element 1661 OptionalAttributes map[string]string 1662 } 1663 1664 func (m VoiceConnect) GetName() string { 1665 return "Connect" 1666 } 1667 1668 func (m VoiceConnect) GetText() string { 1669 return "" 1670 } 1671 1672 func (m VoiceConnect) GetAttr() (map[string]string, map[string]string) { 1673 paramsAttr := map[string]string{ 1674 "Action": m.Action, 1675 "Method": m.Method, 1676 } 1677 return m.OptionalAttributes, paramsAttr 1678 } 1679 1680 func (m VoiceConnect) GetInnerElements() []Element { 1681 return m.InnerElements 1682 } 1683 1684 //VoiceConversation <Conversation> TwiML Noun 1685 type VoiceConversation struct { 1686 // service_instance_sid: Service instance Sid 1687 // inbound_autocreation: Inbound autocreation 1688 // routing_assignment_timeout: Routing assignment timeout 1689 // inbound_timeout: Inbound timeout 1690 // url: TwiML URL 1691 // method: TwiML URL method 1692 // record: Record 1693 // trim: Trim 1694 // recording_status_callback: Recording status callback URL 1695 // recording_status_callback_method: Recording status callback URL method 1696 // recording_status_callback_event: Recording status callback events 1697 // status_callback: Status callback URL 1698 // status_callback_method: Status callback URL method 1699 // status_callback_event: Events to call status callback URL 1700 // OptionalAttributes: additional attributes 1701 ServiceInstanceSid string 1702 InboundAutocreation string 1703 RoutingAssignmentTimeout string 1704 InboundTimeout string 1705 Url string 1706 Method string 1707 Record string 1708 Trim string 1709 RecordingStatusCallback string 1710 RecordingStatusCallbackMethod string 1711 RecordingStatusCallbackEvent string 1712 StatusCallback string 1713 StatusCallbackMethod string 1714 StatusCallbackEvent string 1715 InnerElements []Element 1716 OptionalAttributes map[string]string 1717 } 1718 1719 func (m VoiceConversation) GetName() string { 1720 return "Conversation" 1721 } 1722 1723 func (m VoiceConversation) GetText() string { 1724 return "" 1725 } 1726 1727 func (m VoiceConversation) GetAttr() (map[string]string, map[string]string) { 1728 paramsAttr := map[string]string{ 1729 "ServiceInstanceSid": m.ServiceInstanceSid, 1730 "InboundAutocreation": m.InboundAutocreation, 1731 "RoutingAssignmentTimeout": m.RoutingAssignmentTimeout, 1732 "InboundTimeout": m.InboundTimeout, 1733 "Url": m.Url, 1734 "Method": m.Method, 1735 "Record": m.Record, 1736 "Trim": m.Trim, 1737 "RecordingStatusCallback": m.RecordingStatusCallback, 1738 "RecordingStatusCallbackMethod": m.RecordingStatusCallbackMethod, 1739 "RecordingStatusCallbackEvent": m.RecordingStatusCallbackEvent, 1740 "StatusCallback": m.StatusCallback, 1741 "StatusCallbackMethod": m.StatusCallbackMethod, 1742 "StatusCallbackEvent": m.StatusCallbackEvent, 1743 } 1744 return m.OptionalAttributes, paramsAttr 1745 } 1746 1747 func (m VoiceConversation) GetInnerElements() []Element { 1748 return m.InnerElements 1749 } 1750 1751 //VoiceVirtualAgent <VirtualAgent> TwiML Noun 1752 type VoiceVirtualAgent struct { 1753 // connector_name: Defines the conversation profile Dialogflow needs to use 1754 // language: Language to be used by Dialogflow to transcribe speech 1755 // sentiment_analysis: Whether sentiment analysis needs to be enabled or not 1756 // status_callback: URL to post status callbacks from Twilio 1757 // status_callback_method: HTTP method to use when requesting the status callback URL 1758 // OptionalAttributes: additional attributes 1759 ConnectorName string 1760 Language string 1761 SentimentAnalysis string 1762 StatusCallback string 1763 StatusCallbackMethod string 1764 InnerElements []Element 1765 OptionalAttributes map[string]string 1766 } 1767 1768 func (m VoiceVirtualAgent) GetName() string { 1769 return "VirtualAgent" 1770 } 1771 1772 func (m VoiceVirtualAgent) GetText() string { 1773 return "" 1774 } 1775 1776 func (m VoiceVirtualAgent) GetAttr() (map[string]string, map[string]string) { 1777 paramsAttr := map[string]string{ 1778 "ConnectorName": m.ConnectorName, 1779 "Language": m.Language, 1780 "SentimentAnalysis": m.SentimentAnalysis, 1781 "StatusCallback": m.StatusCallback, 1782 "StatusCallbackMethod": m.StatusCallbackMethod, 1783 } 1784 return m.OptionalAttributes, paramsAttr 1785 } 1786 1787 func (m VoiceVirtualAgent) GetInnerElements() []Element { 1788 return m.InnerElements 1789 } 1790 1791 //VoiceConfig <Config> TwiML Noun 1792 type VoiceConfig struct { 1793 // name: The name of the custom config 1794 // value: The value of the custom config 1795 // OptionalAttributes: additional attributes 1796 Name string 1797 Value string 1798 InnerElements []Element 1799 OptionalAttributes map[string]string 1800 } 1801 1802 func (m VoiceConfig) GetName() string { 1803 return "Config" 1804 } 1805 1806 func (m VoiceConfig) GetText() string { 1807 return "" 1808 } 1809 1810 func (m VoiceConfig) GetAttr() (map[string]string, map[string]string) { 1811 paramsAttr := map[string]string{ 1812 "Name": m.Name, 1813 "Value": m.Value, 1814 } 1815 return m.OptionalAttributes, paramsAttr 1816 } 1817 1818 func (m VoiceConfig) GetInnerElements() []Element { 1819 return m.InnerElements 1820 } 1821 1822 //VoiceAutopilot <Autopilot> TwiML Noun 1823 type VoiceAutopilot struct { 1824 // name: Autopilot assistant sid or unique name 1825 // OptionalAttributes: additional attributes 1826 Name string 1827 InnerElements []Element 1828 OptionalAttributes map[string]string 1829 } 1830 1831 func (m VoiceAutopilot) GetName() string { 1832 return "Autopilot" 1833 } 1834 1835 func (m VoiceAutopilot) GetText() string { 1836 return m.Name 1837 } 1838 1839 func (m VoiceAutopilot) GetAttr() (map[string]string, map[string]string) { 1840 return m.OptionalAttributes, nil 1841 } 1842 1843 func (m VoiceAutopilot) GetInnerElements() []Element { 1844 return m.InnerElements 1845 } 1846 1847 //VoiceRoom <Room> TwiML Noun 1848 type VoiceRoom struct { 1849 // name: Room name 1850 // participant_identity: Participant identity when connecting to the Room 1851 // OptionalAttributes: additional attributes 1852 Name string 1853 ParticipantIdentity string 1854 InnerElements []Element 1855 OptionalAttributes map[string]string 1856 } 1857 1858 func (m VoiceRoom) GetName() string { 1859 return "Room" 1860 } 1861 1862 func (m VoiceRoom) GetText() string { 1863 return m.Name 1864 } 1865 1866 func (m VoiceRoom) GetAttr() (map[string]string, map[string]string) { 1867 paramsAttr := map[string]string{ 1868 "ParticipantIdentity": m.ParticipantIdentity, 1869 } 1870 return m.OptionalAttributes, paramsAttr 1871 } 1872 1873 func (m VoiceRoom) GetInnerElements() []Element { 1874 return m.InnerElements 1875 }