rusty_box/rest_api/users/models/tracking_code.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
11/// TrackingCode : 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.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct TrackingCode {
15 /// `tracking_code`
16 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
17 pub r#type: Option<RHashType>,
18 /// The name of the tracking code, which must be preconfigured in the Admin Console
19 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
20 pub name: Option<String>,
21 /// The value of the tracking code
22 #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
23 pub value: Option<String>,
24}
25
26impl TrackingCode {
27 /// 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.
28 pub fn new() -> TrackingCode {
29 TrackingCode {
30 r#type: None,
31 name: None,
32 value: None,
33 }
34 }
35}
36
37/// `tracking_code`
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum RHashType {
40 #[serde(rename = "tracking_code")]
41 TrackingCode,
42}
43
44impl Default for RHashType {
45 fn default() -> RHashType {
46 Self::TrackingCode
47 }
48}