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
/*
* Pipedrive API v1
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct OrganizationRelationship {
/// The ID of the base organization for the returned calculated values
#[serde(rename = "org_id", skip_serializing_if = "Option::is_none")]
pub org_id: Option<i32>,
/// The type of organization relationship
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<Type>,
/// The owner of this relationship. If type is `parent`, then the owner is the parent and the linked organization is the daughter.
#[serde(rename = "rel_owner_org_id", skip_serializing_if = "Option::is_none")]
pub rel_owner_org_id: Option<i32>,
/// The linked organization in this relationship. If type is `parent`, then the linked organization is the daughter.
#[serde(rename = "rel_linked_org_id", skip_serializing_if = "Option::is_none")]
pub rel_linked_org_id: Option<i32>,
}
impl OrganizationRelationship {
pub fn new() -> OrganizationRelationship {
OrganizationRelationship {
org_id: None,
r#type: None,
rel_owner_org_id: None,
rel_linked_org_id: None,
}
}
}
/// The type of organization relationship
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "parent")]
Parent,
#[serde(rename = "related")]
Related,
}
impl Default for Type {
fn default() -> Type {
Self::Parent
}
}