-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathautomations.go
105 lines (91 loc) · 2.99 KB
/
automations.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
// This file was auto-generated by Fern from our API Definition.
package api
import (
json "encoding/json"
fmt "fmt"
core "github.com/trycourier/courier-go/v3/core"
)
type AutomationAdHocInvokeParams struct {
Brand *string `json:"brand,omitempty" url:"brand,omitempty"`
Data map[string]interface{} `json:"data,omitempty" url:"data,omitempty"`
Profile *Profile `json:"profile,omitempty" url:"profile,omitempty"`
Recipient *string `json:"recipient,omitempty" url:"recipient,omitempty"`
Template *string `json:"template,omitempty" url:"template,omitempty"`
Automation *Automation `json:"automation,omitempty" url:"automation,omitempty"`
_rawJSON json.RawMessage
}
func (a *AutomationAdHocInvokeParams) UnmarshalJSON(data []byte) error {
type unmarshaler AutomationAdHocInvokeParams
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AutomationAdHocInvokeParams(value)
a._rawJSON = json.RawMessage(data)
return nil
}
func (a *AutomationAdHocInvokeParams) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}
type AutomationInvokeParams struct {
Brand *string `json:"brand,omitempty" url:"brand,omitempty"`
Data map[string]interface{} `json:"data,omitempty" url:"data,omitempty"`
Profile *Profile `json:"profile,omitempty" url:"profile,omitempty"`
Recipient *string `json:"recipient,omitempty" url:"recipient,omitempty"`
Template *string `json:"template,omitempty" url:"template,omitempty"`
_rawJSON json.RawMessage
}
func (a *AutomationInvokeParams) UnmarshalJSON(data []byte) error {
type unmarshaler AutomationInvokeParams
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AutomationInvokeParams(value)
a._rawJSON = json.RawMessage(data)
return nil
}
func (a *AutomationInvokeParams) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}
type AutomationInvokeResponse struct {
RunId string `json:"runId" url:"runId"`
_rawJSON json.RawMessage
}
func (a *AutomationInvokeResponse) UnmarshalJSON(data []byte) error {
type unmarshaler AutomationInvokeResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AutomationInvokeResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}
func (a *AutomationInvokeResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}