-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateauthenticationrequest.go
158 lines (139 loc) · 3.79 KB
/
createauthenticationrequest.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package components
import (
"encoding/json"
"fmt"
)
// DeviceType - The type of device the user is using.
type DeviceType string
const (
DeviceTypeIos DeviceType = "IOS"
DeviceTypeAndroid DeviceType = "ANDROID"
DeviceTypeWeb DeviceType = "WEB"
)
func (e DeviceType) ToPointer() *DeviceType {
return &e
}
func (e *DeviceType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "IOS":
fallthrough
case "ANDROID":
fallthrough
case "WEB":
*e = DeviceType(v)
return nil
default:
return fmt.Errorf("invalid value for DeviceType: %v", v)
}
}
type CreateAuthenticationRequest struct {
// The Android SMS Retriever API hash code that identifies your app. This allows you to automatically retrieve and fill the OTP code on Android devices.
AppRealm *string `json:"app_realm,omitempty"`
// The version of your application.
AppVersion *string `json:"app_version,omitempty"`
// A webhook URL to which delivery statuses will be sent.
CallbackURL *string `json:"callback_url,omitempty"`
// A unique, user-defined identifier that will be included in webhook events
CorrelationID *string `json:"correlation_id,omitempty"`
// Your customer UUID, which can be found in the API settings in the dashboard.
CustomerUUID string `json:"customer_uuid"`
// Unique identifier for the user's device. For Android, this corresponds to the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
DeviceID *string `json:"device_id,omitempty"`
// The model of the user's device.
DeviceModel *string `json:"device_model,omitempty"`
// The type of device the user is using.
DeviceType *DeviceType `json:"device_type,omitempty"`
// The IP address of the user's device.
IP *string `json:"ip,omitempty"`
// Whether the user is a returning user on your app.
IsReturningUser *bool `json:"is_returning_user,omitempty"`
// The version of the user's device operating system.
OsVersion *string `json:"os_version,omitempty"`
// An E.164 formatted phone number to send the OTP to.
PhoneNumber string `json:"phone_number"`
// The template id associated with the message content variant to be sent.
TemplateID *string `json:"template_id,omitempty"`
}
func (o *CreateAuthenticationRequest) GetAppRealm() *string {
if o == nil {
return nil
}
return o.AppRealm
}
func (o *CreateAuthenticationRequest) GetAppVersion() *string {
if o == nil {
return nil
}
return o.AppVersion
}
func (o *CreateAuthenticationRequest) GetCallbackURL() *string {
if o == nil {
return nil
}
return o.CallbackURL
}
func (o *CreateAuthenticationRequest) GetCorrelationID() *string {
if o == nil {
return nil
}
return o.CorrelationID
}
func (o *CreateAuthenticationRequest) GetCustomerUUID() string {
if o == nil {
return ""
}
return o.CustomerUUID
}
func (o *CreateAuthenticationRequest) GetDeviceID() *string {
if o == nil {
return nil
}
return o.DeviceID
}
func (o *CreateAuthenticationRequest) GetDeviceModel() *string {
if o == nil {
return nil
}
return o.DeviceModel
}
func (o *CreateAuthenticationRequest) GetDeviceType() *DeviceType {
if o == nil {
return nil
}
return o.DeviceType
}
func (o *CreateAuthenticationRequest) GetIP() *string {
if o == nil {
return nil
}
return o.IP
}
func (o *CreateAuthenticationRequest) GetIsReturningUser() *bool {
if o == nil {
return nil
}
return o.IsReturningUser
}
func (o *CreateAuthenticationRequest) GetOsVersion() *string {
if o == nil {
return nil
}
return o.OsVersion
}
func (o *CreateAuthenticationRequest) GetPhoneNumber() string {
if o == nil {
return ""
}
return o.PhoneNumber
}
func (o *CreateAuthenticationRequest) GetTemplateID() *string {
if o == nil {
return nil
}
return o.TemplateID
}