-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtemplates.go
45 lines (38 loc) · 1.12 KB
/
templates.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
// 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 ListTemplatesRequest struct {
// A unique identifier that allows for fetching the next set of templates
Cursor *string `json:"-" url:"cursor,omitempty"`
}
type ListTemplatesResponse struct {
Paging *Paging `json:"paging,omitempty" url:"paging,omitempty"`
// An array of Notification Templates
Results []*NotificationTemplates `json:"results,omitempty" url:"results,omitempty"`
_rawJSON json.RawMessage
}
func (l *ListTemplatesResponse) UnmarshalJSON(data []byte) error {
type unmarshaler ListTemplatesResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*l = ListTemplatesResponse(value)
l._rawJSON = json.RawMessage(data)
return nil
}
func (l *ListTemplatesResponse) String() string {
if len(l._rawJSON) > 0 {
if value, err := core.StringifyJSON(l._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(l); err == nil {
return value
}
return fmt.Sprintf("%#v", l)
}