pipedrive_rs/models/
add_organization_request.rs

1/*
2 * Pipedrive API v1
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AddOrganizationRequest {
16    /// The name of the organization
17    #[serde(rename = "name")]
18    pub name: String,
19    /// The optional creation date & time of the organization in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
20    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
21    pub add_time: Option<String>,
22    /// The ID of the user who will be marked as the owner of this organization. When omitted, the authorized user ID will be used.
23    #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")]
24    pub owner_id: Option<i32>,
25    #[serde(rename = "visible_to", skip_serializing_if = "Option::is_none")]
26    pub visible_to: Option<VisibleTo>,
27}
28
29impl AddOrganizationRequest {
30    pub fn new(name: String) -> AddOrganizationRequest {
31        AddOrganizationRequest {
32            name,
33            add_time: None,
34            owner_id: None,
35            visible_to: None,
36        }
37    }
38}
39
40/// 
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum VisibleTo {
43    #[serde(rename = "1")]
44    Variant1,
45    #[serde(rename = "3")]
46    Variant3,
47    #[serde(rename = "5")]
48    Variant5,
49    #[serde(rename = "7")]
50    Variant7,
51}
52
53impl Default for VisibleTo {
54    fn default() -> VisibleTo {
55        Self::Variant1
56    }
57}
58