rusty_box/rest_api/users/models/
put_users_id_request.rs

1/*
2 * Box Platform API
3 *
4 * [Box Platform](https://box.dev) provides functionality to provide access to content stored within [Box](https://box.com). It provides endpoints for basic manipulation of files and folders, management of users within an enterprise, as well as more complex topics such as legal holds and retention policies.
5 *
6 * The version of the OpenAPI document: 2.0.0
7 * Contact: devrel@box.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use super::{
12    put_users_id_request_notification_email::PutUsersIdRequestNotificationEmail,
13    tracking_code::TrackingCode, Role, Status,
14};
15
16#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
17pub struct PutUsersIdRequest {
18    /// Set this to `null` to roll the user out of the enterprise and make them a free user
19    #[serde(
20        rename = "enterprise",
21        default,
22        with = "::serde_with::rust::double_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub enterprise: Option<Option<String>>,
26    /// Whether the user should receive an email when they are rolled out of an enterprise
27    #[serde(rename = "notify", skip_serializing_if = "Option::is_none")]
28    pub notify: Option<bool>,
29    /// The name of the user
30    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
31    pub name: Option<String>,
32    /// The email address the user uses to log in  Note: If the target user's email is not confirmed, then the primary login address cannot be changed.
33    #[serde(rename = "login", skip_serializing_if = "Option::is_none")]
34    pub login: Option<String>,
35    /// The user’s enterprise role
36    #[serde(rename = "role", skip_serializing_if = "Option::is_none")]
37    pub role: Option<Role>,
38    /// The language of the user, formatted in modified version of the [ISO 639-1](/guides/api-calls/language-codes) format.
39    #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
40    pub language: Option<String>,
41    /// Whether the user can use Box Sync
42    #[serde(rename = "is_sync_enabled", skip_serializing_if = "Option::is_none")]
43    pub is_sync_enabled: Option<bool>,
44    /// The user’s job title
45    #[serde(rename = "job_title", skip_serializing_if = "Option::is_none")]
46    pub job_title: Option<String>,
47    /// The user’s phone number
48    #[serde(rename = "phone", skip_serializing_if = "Option::is_none")]
49    pub phone: Option<String>,
50    /// The user’s address
51    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
52    pub address: Option<String>,
53    /// Tracking codes allow an admin to generate reports from the admin console and assign an attribute to a specific group of users. This setting must be enabled for an enterprise before it can be used.
54    #[serde(rename = "tracking_codes", skip_serializing_if = "Option::is_none")]
55    pub tracking_codes: Option<Vec<TrackingCode>>,
56    /// Whether the user can see other enterprise users in their contact list
57    #[serde(
58        rename = "can_see_managed_users",
59        skip_serializing_if = "Option::is_none"
60    )]
61    pub can_see_managed_users: Option<bool>,
62    /// The user's timezone
63    #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")]
64    pub timezone: Option<String>,
65    /// Whether the user is allowed to collaborate with users outside their enterprise
66    #[serde(
67        rename = "is_external_collab_restricted",
68        skip_serializing_if = "Option::is_none"
69    )]
70    pub is_external_collab_restricted: Option<bool>,
71    /// Whether to exempt the user from enterprise device limits
72    #[serde(
73        rename = "is_exempt_from_device_limits",
74        skip_serializing_if = "Option::is_none"
75    )]
76    pub is_exempt_from_device_limits: Option<bool>,
77    /// Whether the user must use two-factor authentication
78    #[serde(
79        rename = "is_exempt_from_login_verification",
80        skip_serializing_if = "Option::is_none"
81    )]
82    pub is_exempt_from_login_verification: Option<bool>,
83    /// Whether the user is required to reset their password
84    #[serde(
85        rename = "is_password_reset_required",
86        skip_serializing_if = "Option::is_none"
87    )]
88    pub is_password_reset_required: Option<bool>,
89    /// The user's account status
90    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
91    pub status: Option<Status>,
92    /// The user’s total available space in bytes. Set this to `-1` to indicate unlimited storage.
93    #[serde(rename = "space_amount", skip_serializing_if = "Option::is_none")]
94    pub space_amount: Option<i64>,
95    #[serde(
96        rename = "notification_email",
97        default,
98        with = "::serde_with::rust::double_option",
99        skip_serializing_if = "Option::is_none"
100    )]
101    pub notification_email: Option<Option<Box<PutUsersIdRequestNotificationEmail>>>,
102    /// An external identifier for an app user, which can be used to look up the user. This can be used to tie user IDs from external identity providers to Box users.  Note: In order to update this field, you need to request a token using the application that created the app user.
103    #[serde(
104        rename = "external_app_user_id",
105        skip_serializing_if = "Option::is_none"
106    )]
107    pub external_app_user_id: Option<String>,
108}
109
110impl PutUsersIdRequest {
111    pub fn new() -> PutUsersIdRequest {
112        PutUsersIdRequest {
113            enterprise: None,
114            notify: None,
115            name: None,
116            login: None,
117            role: None,
118            language: None,
119            is_sync_enabled: None,
120            job_title: None,
121            phone: None,
122            address: None,
123            tracking_codes: None,
124            can_see_managed_users: None,
125            timezone: None,
126            is_external_collab_restricted: None,
127            is_exempt_from_device_limits: None,
128            is_exempt_from_login_verification: None,
129            is_password_reset_required: None,
130            status: None,
131            space_amount: None,
132            notification_email: None,
133            external_app_user_id: None,
134        }
135    }
136}