-
Notifications
You must be signed in to change notification settings - Fork 1
/
update.go
81 lines (72 loc) · 3.84 KB
/
update.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
package models
// UpdateSourceIdentifier represents the input for updating an existing source identifier value
// in a source identifier field of an existing WebAPIAseet object
type UpdateSourceIdentifierValue struct {
ID string `json:"id"`
IdentifierValue string `json:"identifierValue"`
}
// UpdateSourceIdentifier represents the input for updating an existing proxy
// setting field of an existing WebAPIAseet object
type UpdateSourceIdentifier struct {
ID string `json:"id"`
SourceIdentifier string `json:"sourceIdentifier"`
AddValues []string `json:"addValues"`
RemoveValues []string `json:"removeValues"`
UpdateValues []string `json:"updateValues"`
}
// AddSourceIdentifier represents the input for adding a source identifier field to an existing WebAPIAseet object
type AddSourceIdentifier struct {
SourceIdentifier string `json:"sourceIdentifier"`
Values []string `json:"values"`
}
// AddProxySetting represents the input for updating an existing url field of an existing WebAPIAseet object
type UpdateURL struct {
ID string `json:"id"`
URL string `json:"url"`
}
// AddProxySetting represents the input for updating an existing proxy setting field of an existing WebAPIAseet object
type UpdateProxySetting struct {
ID string `json:"id"`
Key string `json:"key"`
Value string `json:"value"`
}
// AddProxySetting represents the input for adding a proxy setting field to an existing WebAPIAseet object
type AddProxySetting struct {
Key string `json:"key"`
Value string `json:"value"`
}
// AddPracticeMode represents the api input for adding a practice mode (sub practice) in a practice to add
// to an existing WebAPIAseet object
type AddPracticeMode struct {
Mode string `json:"mode"`
SubPractice string `json:"subPractice,omitempty"`
}
// AddPracticeWrapper represents the input for adding a practiceWrapper field to an existing WebAPIAseet object
type AddPracticeWrapper struct {
PracticeID string `json:"practiceId"`
MainMode string `json:"mainMode"`
SubPracticeModes []AddPracticeMode `json:"subPracticeModes,omitempty"`
Triggers []string `json:"triggers,omitempty"`
Behaviors []string `json:"behaviors,omitempty"`
}
// UpdateWebAPIAssetInput represents the input for updating an existing WebAPIAseet object
type UpdateWebAPIAssetInput struct {
Name string `json:"name,omitempty"`
AddPracticeWrappers []AddPracticeWrapper `json:"addPractices,omitempty"`
RemovePracticeWrappers []string `json:"removePractices,omitempty"`
AddProfiles []string `json:"addProfiles,omitempty"`
RemoveProfiles []string `json:"removeProfiles,omitempty"`
AddBehaviors []string `json:"addBehaviors,omitempty"`
RemoveBehaviors []string `json:"removeBehaviors,omitempty"`
State string `json:"state,omitempty"`
AddProxySetting []AddProxySetting `json:"addProxySetting,omitempty"`
RemoveProxySetting []string `json:"removeProxySetting,omitempty"`
UpdateProxySetting []UpdateProxySetting `json:"updateProxySetting,omitempty"`
UpstreamURL string `json:"upstreamURL,omitempty"`
AddURLs []string `json:"addURLs,omitempty"`
RemoveURLs []string `json:"removeURLs,omitempty"`
UpdateURLs []UpdateURL `json:"updateURLs,omitempty"`
AddSourceIdentifiers []AddSourceIdentifier `json:"addSourceIdentifiers,omitempty"`
RemoveSourceIdentifiers []string `json:"removeSourceIdentifiers,omitempty"`
UpdateSourceIdentifiers []UpdateSourceIdentifier `json:"updateSourceIdentifiers,omitempty"`
}