forked from Camb-ai/cambai-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfolders.go
More file actions
50 lines (42 loc) · 1.14 KB
/
Copy pathfolders.go
File metadata and controls
50 lines (42 loc) · 1.14 KB
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
// This file was auto-generated by Fern from our API Definition.
package cambai
import (
json "encoding/json"
fmt "fmt"
core "github.com/camb-ai/cambai-go-sdk/core"
)
type CreateFolderPayload struct {
RunID *int `json:"-" url:"run_id,omitempty"`
FolderName string `json:"folder_name" url:"folder_name"`
}
type ListFoldersFoldersGetRequest struct {
Limit *int `json:"-" url:"limit,omitempty"`
SearchQuery *string `json:"-" url:"search_query,omitempty"`
RunID *int `json:"-" url:"run_id,omitempty"`
}
type Folder struct {
TeamID int `json:"team_id" url:"team_id"`
Name string `json:"name" url:"name"`
_rawJSON json.RawMessage
}
func (f *Folder) UnmarshalJSON(data []byte) error {
type unmarshaler Folder
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*f = Folder(value)
f._rawJSON = json.RawMessage(data)
return nil
}
func (f *Folder) String() string {
if len(f._rawJSON) > 0 {
if value, err := core.StringifyJSON(f._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(f); err == nil {
return value
}
return fmt.Sprintf("%#v", f)
}