-
Notifications
You must be signed in to change notification settings - Fork 3
/
phones.go
76 lines (64 loc) · 1.73 KB
/
phones.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
// This file was auto-generated by Fern from our API Definition.
package api
import (
json "encoding/json"
fmt "fmt"
core "github.com/seamapi/go/core"
)
type PhonesDeactivateRequest struct {
DeviceId string `json:"device_id" url:"device_id"`
}
type PhonesListRequest struct {
OwnerUserIdentityId *string `json:"owner_user_identity_id,omitempty" url:"owner_user_identity_id,omitempty"`
}
type PhonesDeactivateResponse struct {
Ok bool `json:"ok" url:"ok"`
_rawJSON json.RawMessage
}
func (p *PhonesDeactivateResponse) UnmarshalJSON(data []byte) error {
type unmarshaler PhonesDeactivateResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*p = PhonesDeactivateResponse(value)
p._rawJSON = json.RawMessage(data)
return nil
}
func (p *PhonesDeactivateResponse) String() string {
if len(p._rawJSON) > 0 {
if value, err := core.StringifyJSON(p._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(p); err == nil {
return value
}
return fmt.Sprintf("%#v", p)
}
type PhonesListResponse struct {
Phones []*Phone `json:"phones,omitempty" url:"phones,omitempty"`
Ok bool `json:"ok" url:"ok"`
_rawJSON json.RawMessage
}
func (p *PhonesListResponse) UnmarshalJSON(data []byte) error {
type unmarshaler PhonesListResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*p = PhonesListResponse(value)
p._rawJSON = json.RawMessage(data)
return nil
}
func (p *PhonesListResponse) String() string {
if len(p._rawJSON) > 0 {
if value, err := core.StringifyJSON(p._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(p); err == nil {
return value
}
return fmt.Sprintf("%#v", p)
}