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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
//! `users` data models for GoHighLevel API V3 (9 types).
//!
//! Generated from HighLevel's official OpenAPI spec for the
//! **Users** module. Every endpoint that uses these types, with its
//! parameters, required scopes and enum values, is documented in the
//! [`users` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/users.md).
//!
//! Enable with `features = ["users"]`.
// @generated by xtask/generate_models.py — do not edit by hand.
// Source: https://github.com/GoHighLevel/highlevel-api-docs
// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
// they aren't held to rustdoc's markdown conventions.
#![allow(
missing_docs,
clippy::doc_lazy_continuation,
clippy::doc_overindented_list_items
)]
use serde::{Deserialize, Serialize};
/// `CreateUserDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateUserDto {
/// Company/Agency ID to associate the user with
/// Required by the API.
#[serde(rename = "companyId")]
pub company_id: String,
/// Email address of the user (used for login)
/// Required by the API.
pub email: String,
/// Password for the user account. All passwords will be required to meet the following
/// criteria: - Minimum 12 characters - At least one uppercase letter (A–Z) - At least one
/// lowercase letter (a–z) - At least one number (0–9) - At least one special character
/// (e.g., !, @, #, $)
/// Required by the API.
pub password: String,
/// Phone number of the user in E.164 format
#[serde(default, skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
/// User account type (account for sub-account users, agency for agency-level users)
/// Required by the API.
#[serde(rename = "type")]
pub type_: String,
/// User role within the account (admin or user)
/// Required by the API.
pub role: String,
/// List of location IDs to assign to the user
/// Required by the API.
#[serde(rename = "locationIds", default, skip_serializing_if = "Vec::is_empty")]
pub location_ids: Vec<String>,
/// User permissions controlling access to various features
#[serde(default, skip_serializing_if = "Option::is_none")]
pub permissions: Option<PermissionsDto>,
/// Scopes allowed for users. Only scopes that have been passed will be enabled. Note:- If
/// passed empty all the scopes will be get disabled
/// Allowed values: `campaigns.readonly`, `campaigns.write`, `calendars.readonly`,
/// `calendars/events.write`, `calendars/groups.write`, `calendars.write`, `contacts.write`,
/// `contacts/bulkActions.write`, `workflows.readonly`, `workflows.write`, `triggers.write`,
/// `funnels.write`.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub scopes: Vec<String>,
/// Assigned Scopes allowed for users. Only scopes that have been passed will be enabled. If
/// passed empty all the assigned scopes will be get disabled
/// Allowed values: `campaigns.readonly`, `campaigns.write`, `calendars.readonly`,
/// `calendars/events.write`, `calendars/groups.write`, `calendars.write`, `contacts.write`,
/// `contacts/bulkActions.write`, `workflows.readonly`, `workflows.write`, `triggers.write`,
/// `funnels.write`.
#[serde(
rename = "scopesAssignedToOnly",
default,
skip_serializing_if = "Vec::is_empty"
)]
pub scopes_assigned_to_only: Vec<String>,
/// URL of the user profile photo
#[serde(
rename = "profilePhoto",
default,
skip_serializing_if = "Option::is_none"
)]
pub profile_photo: Option<String>,
/// Per-location inbound Twilio number in E.164 format, keyed by location id (Call and
/// Voicemail Inbound Number for direct Twilio, not LC Phone). Replacement semantics: if you
/// send twilioPhone in the request body, the stored map is replaced entirely with this
/// object (not merged). Any location id omitted from the object is removed from the saved
/// map. Omit the twilioPhone property entirely to leave existing numbers unchanged. Send an
/// empty object {} to clear all per-location numbers. To clear a single location only, set
/// that location id to an empty string "".
#[serde(
rename = "twilioPhone",
default,
skip_serializing_if = "Option::is_none"
)]
pub twilio_phone: Option<serde_json::Value>,
/// Platform language preference for the user
/// Allowed values: `en_US`, `es`, `fr_CA`, `fr_FR`, `nl`, `de`, `pt_PT`, `pt_BR`, `it`,
/// `sv`, `da`, `fi`.
#[serde(
rename = "platformLanguage",
default,
skip_serializing_if = "Option::is_none"
)]
pub platform_language: Option<String>,
/// First name of the user
/// Required by the API.
#[serde(rename = "firstName")]
pub first_name: String,
/// Last name of the user
/// Required by the API.
#[serde(rename = "lastName")]
pub last_name: String,
}
/// `DeleteUserSuccessfulResponseV3Dto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteUserSuccessfulResponseV3Dto {
/// Indicates whether the user deletion was queued successfully
#[serde(default, skip_serializing_if = "Option::is_none")]
pub succeeded: Option<bool>,
/// Message describing the result of the deletion request
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
/// `FilterByEmailDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct FilterByEmailDto {
/// Company ID to filter users
/// Required by the API.
#[serde(rename = "companyId")]
pub company_id: String,
/// Comma-separated list of email addresses to filter users
/// Required by the API.
pub emails: String,
/// Filter deleted users
#[serde(default, skip_serializing_if = "Option::is_none")]
pub deleted: Option<bool>,
/// No of results to be skipped before returning the result
#[serde(default, skip_serializing_if = "Option::is_none")]
pub skip: Option<String>,
/// No of results to be limited before returning the result
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limit: Option<String>,
/// Projection fields to return. Use "all" for all fields, or specify comma-separated field
/// names. Default returns only id and email
#[serde(default, skip_serializing_if = "Option::is_none")]
pub projection: Option<String>,
}
/// `PermissionsDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct PermissionsDto {
/// Whether campaigns are enabled for this user
#[serde(
rename = "campaignsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub campaigns_enabled: Option<bool>,
/// Whether campaigns are in read-only mode for this user
#[serde(
rename = "campaignsReadOnly",
default,
skip_serializing_if = "Option::is_none"
)]
pub campaigns_read_only: Option<bool>,
/// Whether contacts are enabled for this user
#[serde(
rename = "contactsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub contacts_enabled: Option<bool>,
/// Whether workflows are enabled for this user
#[serde(
rename = "workflowsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub workflows_enabled: Option<bool>,
/// Whether workflows are in read-only mode for this user
#[serde(
rename = "workflowsReadOnly",
default,
skip_serializing_if = "Option::is_none"
)]
pub workflows_read_only: Option<bool>,
/// Whether triggers are enabled for this user
#[serde(
rename = "triggersEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub triggers_enabled: Option<bool>,
/// Whether funnels are enabled for this user
#[serde(
rename = "funnelsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub funnels_enabled: Option<bool>,
/// Whether websites are enabled for this user
#[serde(
rename = "websitesEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub websites_enabled: Option<bool>,
/// Whether opportunities are enabled for this user
#[serde(
rename = "opportunitiesEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub opportunities_enabled: Option<bool>,
/// Whether dashboard statistics are enabled for this user
#[serde(
rename = "dashboardStatsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub dashboard_stats_enabled: Option<bool>,
/// Whether bulk requests are enabled for this user
#[serde(
rename = "bulkRequestsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub bulk_requests_enabled: Option<bool>,
/// Whether appointments are enabled for this user
#[serde(
rename = "appointmentsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub appointments_enabled: Option<bool>,
/// Whether reviews are enabled for this user
#[serde(
rename = "reviewsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub reviews_enabled: Option<bool>,
/// Whether online listings are enabled for this user
#[serde(
rename = "onlineListingsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub online_listings_enabled: Option<bool>,
/// Whether phone calls are enabled for this user
#[serde(
rename = "phoneCallEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub phone_call_enabled: Option<bool>,
/// Whether conversations are enabled for this user
#[serde(
rename = "conversationsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub conversations_enabled: Option<bool>,
/// Whether the user can only access data assigned to them
#[serde(
rename = "assignedDataOnly",
default,
skip_serializing_if = "Option::is_none"
)]
pub assigned_data_only: Option<bool>,
/// Whether AdWords reporting is enabled for this user
#[serde(
rename = "adwordsReportingEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub adwords_reporting_enabled: Option<bool>,
/// Whether membership features are enabled for this user
#[serde(
rename = "membershipEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub membership_enabled: Option<bool>,
/// Whether Facebook Ads reporting is enabled for this user
#[serde(
rename = "facebookAdsReportingEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub facebook_ads_reporting_enabled: Option<bool>,
/// Whether attributions reporting is enabled for this user
#[serde(
rename = "attributionsReportingEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub attributions_reporting_enabled: Option<bool>,
/// Whether settings are enabled for this user
#[serde(
rename = "settingsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub settings_enabled: Option<bool>,
/// Whether tags are enabled for this user
#[serde(
rename = "tagsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub tags_enabled: Option<bool>,
/// Whether lead value features are enabled for this user
#[serde(
rename = "leadValueEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub lead_value_enabled: Option<bool>,
/// Whether marketing features are enabled for this user
#[serde(
rename = "marketingEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub marketing_enabled: Option<bool>,
/// Whether agent reporting is enabled for this user
#[serde(
rename = "agentReportingEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub agent_reporting_enabled: Option<bool>,
/// Whether the bot service is enabled for this user
#[serde(
rename = "botService",
default,
skip_serializing_if = "Option::is_none"
)]
pub bot_service: Option<bool>,
/// Whether the social planner is enabled for this user
#[serde(
rename = "socialPlanner",
default,
skip_serializing_if = "Option::is_none"
)]
pub social_planner: Option<bool>,
/// Whether blogging is enabled for this user
#[serde(
rename = "bloggingEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub blogging_enabled: Option<bool>,
/// Whether invoices are enabled for this user
#[serde(
rename = "invoiceEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub invoice_enabled: Option<bool>,
/// Whether the affiliate manager is enabled for this user
#[serde(
rename = "affiliateManagerEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub affiliate_manager_enabled: Option<bool>,
/// Whether Content AI is enabled for this user
#[serde(
rename = "contentAiEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub content_ai_enabled: Option<bool>,
/// Whether refunds are enabled for this user
#[serde(
rename = "refundsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub refunds_enabled: Option<bool>,
/// Whether recording payments is enabled for this user
#[serde(
rename = "recordPaymentEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub record_payment_enabled: Option<bool>,
/// Whether cancelling subscriptions is enabled for this user
#[serde(
rename = "cancelSubscriptionEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub cancel_subscription_enabled: Option<bool>,
/// Whether payments are enabled for this user
#[serde(
rename = "paymentsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub payments_enabled: Option<bool>,
/// Whether communities are enabled for this user
#[serde(
rename = "communitiesEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub communities_enabled: Option<bool>,
/// Whether exporting payments is enabled for this user
#[serde(
rename = "exportPaymentsEnabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub export_payments_enabled: Option<bool>,
}
/// `RoleSchema` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RoleSchema {
/// User account type (account for sub-account users, agency for agency-level users)
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
/// User role within the account (admin or user)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
/// List of location IDs the user has access to
#[serde(rename = "locationIds", default, skip_serializing_if = "Vec::is_empty")]
pub location_ids: Vec<String>,
/// Whether the user is restricted to specific sub-accounts only
#[serde(
rename = "restrictSubAccount",
default,
skip_serializing_if = "Option::is_none"
)]
pub restrict_sub_account: Option<bool>,
}
/// `SearchUserSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct SearchUserSuccessfulResponseDto {
/// List of users matching the search criteria
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub users: Vec<UserSchema>,
/// Total number of users matching the search criteria
#[serde(default, skip_serializing_if = "Option::is_none")]
pub count: Option<f64>,
}
/// `UpdateUserDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UpdateUserDto {
/// First name of the user
#[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
/// Last name of the user
#[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
/// Email update is no longer supported due to security reasons.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// New password for the user account. All passwords will be required to meet the following
/// criteria: - Minimum 12 characters - At least one uppercase letter (A–Z) - At least one
/// lowercase letter (a–z) - At least one number (0–9) - At least one special character
/// (e.g., !, @, #, $)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
/// Phone number of the user in E.164 format
#[serde(default, skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
/// User account type (account for sub-account users, agency for agency-level users)
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
/// User role within the account (admin or user)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
/// Company/Agency Id. Required for Agency Level access
#[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
pub company_id: Option<String>,
/// List of sub-account location IDs the user should have access to
#[serde(rename = "locationIds", default, skip_serializing_if = "Vec::is_empty")]
pub location_ids: Vec<String>,
/// User permissions controlling access to various features
#[serde(default, skip_serializing_if = "Option::is_none")]
pub permissions: Option<PermissionsDto>,
/// Scopes allowed for users. Only scopes that have been passed will be enabled. If passed
/// empty all the scopes will be get disabled
/// Allowed values: `campaigns.readonly`, `campaigns.write`, `calendars.readonly`,
/// `calendars/events.write`, `calendars/groups.write`, `calendars.write`, `contacts.write`,
/// `contacts/bulkActions.write`, `workflows.readonly`, `workflows.write`, `triggers.write`,
/// `funnels.write`.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub scopes: Vec<String>,
/// Assigned Scopes allowed for users. Only scopes that have been passed will be enabled. If
/// passed empty all the assigned scopes will be get disabled
/// Allowed values: `campaigns.readonly`, `campaigns.write`, `calendars.readonly`,
/// `calendars/events.write`, `calendars/groups.write`, `calendars.write`, `contacts.write`,
/// `contacts/bulkActions.write`, `workflows.readonly`, `workflows.write`, `triggers.write`,
/// `funnels.write`.
#[serde(
rename = "scopesAssignedToOnly",
default,
skip_serializing_if = "Vec::is_empty"
)]
pub scopes_assigned_to_only: Vec<String>,
/// URL of the user profile photo
#[serde(
rename = "profilePhoto",
default,
skip_serializing_if = "Option::is_none"
)]
pub profile_photo: Option<String>,
/// Per-location inbound Twilio number in E.164 format, keyed by location id (Call and
/// Voicemail Inbound Number for direct Twilio, not LC Phone). Replacement semantics: if you
/// send twilioPhone in the request body, the stored map is replaced entirely with this
/// object (not merged). Any location id omitted from the object is removed from the saved
/// map. Omit the twilioPhone property entirely to leave existing numbers unchanged. Send an
/// empty object {} to clear all per-location numbers. To clear a single location only, set
/// that location id to an empty string "".
#[serde(
rename = "twilioPhone",
default,
skip_serializing_if = "Option::is_none"
)]
pub twilio_phone: Option<serde_json::Value>,
/// Platform language preference for the user
/// Allowed values: `en_US`, `es`, `fr_CA`, `fr_FR`, `nl`, `de`, `pt_PT`, `pt_BR`, `it`,
/// `sv`, `da`, `fi`.
#[serde(
rename = "platformLanguage",
default,
skip_serializing_if = "Option::is_none"
)]
pub platform_language: Option<String>,
}
/// `UserSchema` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UserSchema {
/// Unique identifier of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Full name of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// First name of the user
#[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
/// Last name of the user
#[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
/// Email address of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// Phone number of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
/// Phone extension of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub extension: Option<String>,
/// User permissions controlling access to various features
#[serde(default, skip_serializing_if = "Option::is_none")]
pub permissions: Option<PermissionsDto>,
/// List of OAuth scopes granted to this user
/// Allowed values: `campaigns.readonly`, `campaigns.write`, `calendars.readonly`,
/// `calendars/events.write`, `calendars/groups.write`, `calendars.write`, `contacts.write`,
/// `contacts/bulkActions.write`, `workflows.readonly`, `workflows.write`, `triggers.write`,
/// `funnels.write`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scopes: Option<String>,
/// Role and access configuration for the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub roles: Option<RoleSchema>,
/// Whether the user has been deleted
#[serde(default, skip_serializing_if = "Option::is_none")]
pub deleted: Option<bool>,
/// LC Phone Inbound Phone Numbers
#[serde(rename = "lcPhone", default, skip_serializing_if = "Option::is_none")]
pub lc_phone: Option<serde_json::Value>,
/// Platform language preference for the user
/// Allowed values: `en_US`, `es`, `fr_CA`, `fr_FR`, `nl`, `de`, `pt_PT`, `pt_BR`, `it`,
/// `sv`, `da`, `fi`.
#[serde(
rename = "platformLanguage",
default,
skip_serializing_if = "Option::is_none"
)]
pub platform_language: Option<String>,
}
/// `UserSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UserSuccessfulResponseDto {
/// Unique identifier of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Full name of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// First name of the user
#[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
/// Last name of the user
#[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
/// Email address of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// Phone number of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
/// Phone extension of the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub extension: Option<String>,
/// User permissions controlling access to various features
#[serde(default, skip_serializing_if = "Option::is_none")]
pub permissions: Option<PermissionsDto>,
/// List of OAuth scopes granted to this user
/// Allowed values: `campaigns.readonly`, `campaigns.write`, `calendars.readonly`,
/// `calendars/events.write`, `calendars/groups.write`, `calendars.write`, `contacts.write`,
/// `contacts/bulkActions.write`, `workflows.readonly`, `workflows.write`, `triggers.write`,
/// `funnels.write`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scopes: Option<String>,
/// Role and access configuration for the user
#[serde(default, skip_serializing_if = "Option::is_none")]
pub roles: Option<RoleSchema>,
/// LC Phone Inbound Phone Numbers
#[serde(rename = "lcPhone", default, skip_serializing_if = "Option::is_none")]
pub lc_phone: Option<serde_json::Value>,
/// Platform language preference for the user
/// Allowed values: `en_US`, `es`, `fr_CA`, `fr_FR`, `nl`, `de`, `pt_PT`, `pt_BR`, `it`,
/// `sv`, `da`, `fi`.
#[serde(
rename = "platformLanguage",
default,
skip_serializing_if = "Option::is_none"
)]
pub platform_language: Option<String>,
}