-
Notifications
You must be signed in to change notification settings - Fork 0
/
action_xml_response.go
147 lines (120 loc) · 4.75 KB
/
action_xml_response.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
package actions
import "encoding/xml"
type GetActionConfigurationsSoapEnvelope struct {
XMLName xml.Name `xml:"Envelope"`
GetActionConfigurationsSoapBody GetActionConfigurationsSoapBody
}
type GetActionConfigurationsSoapBody struct {
XMLName xml.Name `xml:"Body"`
GetActionConfigurationsResponse GetActionConfigurationsResponse
}
type GetActionConfigurations struct {
XMLNS string `xml:"xmlns,attr"`
XMLName xml.Name `xml:"aa:GetActionConfigurations"`
}
func NewGetActionConfiguration() GetActionConfigurations {
return GetActionConfigurations{
XMLNS: "http://www.axis.com/vapix/ws/action1",
}
}
type GetActionConfigurationsResponse struct {
XMLName xml.Name `xml:"GetActionConfigurationsResponse"`
ActionConfigurationsResponse []ActionConfigurationResponse `xml:"ActionConfigurations>ActionConfiguration"`
}
type ActionConfigurationResponse struct {
XMLName xml.Name `xml:"ActionConfiguration"`
ConfigurationID int `xml:"ConfigurationID"`
Name string `xml:"Name"`
TemplateToken string `xml:"TemplateToken"`
Parameters []ParameterResponse `xml:"Parameters>Parameter"`
}
type ParameterResponse struct {
Name string `xml:"Name,attr"`
Value string `xml:"Value,attr"`
}
// ActionTemplates
type GetActionTemplatesSoapEnvelope struct {
XMLName xml.Name `xml:"Envelope"`
GetActionTemplatesSoapBody GetActionTemplatesSoapBody
}
type GetActionTemplatesSoapBody struct {
XMLName xml.Name `xml:"Body"`
GetActionTemplatesResponse GetActionTemplatesResponse
}
type GetActionTemplatesResponse struct {
XMLName xml.Name `xml:"GetActionTemplatesResponse"`
ActionTemplatesResponse []ActionTemplateResponse `xml:"ActionTemplates>ActionTemplate"`
}
type ActionTemplateResponse struct {
XMLName xml.Name `xml:"ActionTemplate"`
RecipientTemplate string `xml:"RecipientTemplate"`
TemplateToken string `xml:"TemplateToken"`
Parameters []ParameterResponse `xml:"Parameters>Parameter"`
}
// Recipients
type GetRecipientTemplatesSoapEnvelope struct {
XMLName xml.Name `xml:"Envelope"`
GetRecipientTemplatesSoapBody GetRecipientTemplatesSoapBody
}
type GetRecipientTemplatesSoapBody struct {
XMLName xml.Name `xml:"Body"`
GetRecipientTemplatesResponse GetRecipientTemplatesResponse
}
type GetRecipientTemplatesResponse struct {
XMLName xml.Name `xml:"GetRecipientTemplatesResponse"`
RecipientTemplatesResponse []RecipientTemplateResponse `xml:"RecipientTemplates>RecipientTemplate"`
}
type RecipientTemplateResponse struct {
XMLName xml.Name `xml:"RecipientTemplate"`
TemplateToken string `xml:"TemplateToken"`
Parameters []ParameterResponse `xml:"Parameters>Parameter"`
}
// ActionRules
type GetActionRulesSoapEnvelope struct {
XMLName xml.Name `xml:"Envelope"`
GetActionRulesSoapBody GetActionRulesSoapBody
}
type GetActionRulesSoapBody struct {
XMLName xml.Name `xml:"Body"`
GetActionRulesResponse GetActionRulesResponse
}
type GetActionRulesResponse struct {
XMLName xml.Name `xml:"GetActionRulesResponse"`
ActionRulesResponse []ActionRuleResponse `xml:"ActionRules>ActionRule"`
}
type ActionRuleResponse struct {
XMLName xml.Name `xml:"ActionRule"`
Name string `xml:"Name"`
RuleID int `xml:"RuleID"`
Enabled bool `xml:"Enabled"`
PrimaryAction int `xml:"PrimaryAction"`
Parameters []ConditionResponse `xml:"Conditions>Condition"`
}
type ConditionResponse struct {
TopicExpression string `xml:"Name,attr"`
MessageContent string `xml:"Value,attr"`
}
type AddActionConfigurationSoapEnvelope struct {
XMLName xml.Name `xml:"Envelope"`
AddActionConfigurationSoapBody AddActionConfigurationSoapBody
}
type AddActionConfigurationSoapBody struct {
XMLName xml.Name `xml:"Body"`
AddActionConfigurationResponse AddActionConfigurationResponse
}
type AddActionConfigurationResponse struct {
XMLName xml.Name `xml:"AddActionConfigurationResponse"`
ConfigurationID int `xml:"ConfigurationID"`
}
type AddActionRuleSoapEnvelope struct {
XMLName xml.Name `xml:"Envelope"`
AddActionRulenSoapBody AddActionRulenSoapBody
}
type AddActionRulenSoapBody struct {
XMLName xml.Name `xml:"Body"`
AddActionRuleResponse AddActionRuleResponse
}
type AddActionRuleResponse struct {
XMLName xml.Name `xml:"AddActionRuleResponse"`
RuleID int `xml:"RuleID"`
}