/
stop.go
45 lines (36 loc) · 1 KB
/
stop.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package verbs
import (
"encoding/xml"
"github.com/RJPearson94/twilio-sdk-go/twiml/voice/verbs/nouns"
)
type StopAttributes struct {
Action *string `xml:"action,attr,omitempty"`
Method *string `xml:"method,attr,omitempty"`
}
type Stop struct {
XMLName xml.Name `xml:"Stop"`
StopAttributes
Children []interface{}
}
func (s *Stop) Siprec() *nouns.Siprec {
return s.SiprecWithAttributes(nouns.SiprecAttributes{})
}
func (s *Stop) SiprecWithAttributes(attributes nouns.SiprecAttributes) *nouns.Siprec {
siprec := &nouns.Siprec{
SiprecAttributes: attributes,
Children: make([]interface{}, 0),
}
s.Children = append(s.Children, siprec)
return siprec
}
func (s *Stop) Stream() *nouns.Stream {
return s.StreamWithAttributes(nouns.StreamAttributes{})
}
func (s *Stop) StreamWithAttributes(attributes nouns.StreamAttributes) *nouns.Stream {
stream := &nouns.Stream{
StreamAttributes: attributes,
Children: make([]interface{}, 0),
}
s.Children = append(s.Children, stream)
return stream
}