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
use anyhow::Result;

use crate::Client;

pub struct TrackingField {
    pub client: Client,
}

impl TrackingField {
    #[doc(hidden)]
    pub fn new(client: Client) -> Self {
        TrackingField { client }
    }

    /**
     * List tracking fields.
     *
     * This function performs a `GET` to the `/tracking_fields` endpoint.
     *
     * [Tracking fields](https://support.zoom.us/hc/en-us/articles/115000293426-Scheduling-Tracking-Fields) allow you to analyze usage by various fields within an organization.<br> Use this API to list all the tracking fields on your Zoom account.<br><br>
     * **Scopes:** `trackingfield:read:admin`<br>
     *  
     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
     * **Prerequisites:**
     * * Business, Education, API or higher plan
     */
    pub async fn trackingfield_list(&self) -> Result<crate::types::Domains> {
        let url = "/tracking_fields".to_string();
        self.client.get(&url, None).await
    }

    /**
     * Create a tracking field.
     *
     * This function performs a `POST` to the `/tracking_fields` endpoint.
     *
     * [Tracking fields](https://support.zoom.us/hc/en-us/articles/115000293426-Scheduling-Tracking-Fields) allow you to analyze usage by various fields within an organization.<br> Use this API to create a new tracking field.<br><br>
     * **Scope:** `trackingfield:write:admin`<br>
     *  
     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
     * **Prerequisites:**
     * * Business, Education, API or higher plan
     */
    pub async fn trackingfield_create(
        &self,
        body: &crate::types::TrackingField,
    ) -> Result<crate::types::TrackingfieldGetResponseAllOf> {
        let url = "/tracking_fields".to_string();
        self.client
            .post(&url, Some(reqwest::Body::from(serde_json::to_vec(body)?)))
            .await
    }

    /**
     * Get a tracking field.
     *
     * This function performs a `GET` to the `/tracking_fields/{fieldId}` endpoint.
     *
     * [Tracking fields](https://support.zoom.us/hc/en-us/articles/115000293426-Scheduling-Tracking-Fields) allow you to analyze usage by various fields within an organization.<br><br> When scheduling a meeting, the tracking field will be included in the meeting options.<br>Use this API to get information on a tracking field.<br><br>
     * **Scopes:** `trackingfield:read:admin`<br>
     *  
     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
     * **Prerequisites:**
     * * Business, Education, API or higher plan
     *
     *
     * **Parameters:**
     *
     * * `field_id: &str` -- The Tracking Field ID.
     */
    pub async fn trackingfield_get(
        &self,
        field_id: &str,
    ) -> Result<crate::types::TrackingfieldGetResponseAllOf> {
        let url = format!(
            "/tracking_fields/{}",
            crate::progenitor_support::encode_path(field_id),
        );

        self.client.get(&url, None).await
    }

    /**
     * Delete a tracking field.
     *
     * This function performs a `DELETE` to the `/tracking_fields/{fieldId}` endpoint.
     *
     * [Tracking fields](https://support.zoom.us/hc/en-us/articles/115000293426-Scheduling-Tracking-Fields) allow you to analyze usage by various fields within an organization.<br> Use this API to delete a tracking field.<br><br>
     * **Scope:** `trackingfield:write:admin`<br>
     *  
     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
     * **Prerequisites:**
     * * Business, Education, API or higher plan
     *
     * **Parameters:**
     *
     * * `field_id: &str` -- The Tracking Field ID.
     */
    pub async fn trackingfield_delete(&self, field_id: &str) -> Result<()> {
        let url = format!(
            "/tracking_fields/{}",
            crate::progenitor_support::encode_path(field_id),
        );

        self.client.delete(&url, None).await
    }

    /**
     * Update a tracking field.
     *
     * This function performs a `PATCH` to the `/tracking_fields/{fieldId}` endpoint.
     *
     * [Tracking fields](https://support.zoom.us/hc/en-us/articles/115000293426-Scheduling-Tracking-Fields) allow you to analyze usage by various fields within an organization.<br> Use this API to update a tracking field.<br><br>
     * **Scope:** `trackingfield:write:admin`<br>
     *  
     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
     * **Prerequisites:**
     * * Business, Education, API or higher plan
     *
     * **Parameters:**
     *
     * * `field_id: &str` -- The Tracking Field ID.
     */
    pub async fn trackingfield_update(
        &self,
        field_id: &str,
        body: &crate::types::TrackingField,
    ) -> Result<()> {
        let url = format!(
            "/tracking_fields/{}",
            crate::progenitor_support::encode_path(field_id),
        );

        self.client
            .patch(&url, Some(reqwest::Body::from(serde_json::to_vec(body)?)))
            .await
    }
}