/*
* 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 AddOrUpdateRoleSettingRequest {
#[serde(rename = "setting_key")]
pub setting_key: SettingKey,
/// Possible values for the `default_visibility` setting depending on the subscription plan:<br> <table class='role-setting'> <caption><b>Essential / Advanced plan</b></caption> <tr><th><b>Value</b></th><th><b>Description</b></th></tr> <tr><td>`1`</td><td>Owner & Followers</td></tr> <tr><td>`3`</td><td>Entire company</td></tr> </table> <br> <table class='role-setting'> <caption><b>Professional / Enterprise plan</b></caption> <tr><th><b>Value</b></th><th><b>Description</b></th></tr> <tr><td>`1`</td><td>Owner only</td></tr> <tr><td>`3`</td><td>Owner's visibility group</td></tr> <tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr> <tr><td>`7`</td><td>Entire company</td></tr> </table> <br> Read more about visibility groups <a href='https://support.pipedrive.com/en/article/visibility-groups'>here</a>.
#[serde(rename = "value")]
pub value: Value,
}
impl AddOrUpdateRoleSettingRequest {
pub fn new(setting_key: SettingKey, value: Value) -> AddOrUpdateRoleSettingRequest {
AddOrUpdateRoleSettingRequest {
setting_key,
value,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SettingKey {
#[serde(rename = "deal_default_visibility")]
DealDefaultVisibility,
#[serde(rename = "lead_default_visibility")]
LeadDefaultVisibility,
#[serde(rename = "org_default_visibility")]
OrgDefaultVisibility,
#[serde(rename = "person_default_visibility")]
PersonDefaultVisibility,
#[serde(rename = "product_default_visibility")]
ProductDefaultVisibility,
}
impl Default for SettingKey {
fn default() -> SettingKey {
Self::DealDefaultVisibility
}
}
/// Possible values for the `default_visibility` setting depending on the subscription plan:<br> <table class='role-setting'> <caption><b>Essential / Advanced plan</b></caption> <tr><th><b>Value</b></th><th><b>Description</b></th></tr> <tr><td>`1`</td><td>Owner & Followers</td></tr> <tr><td>`3`</td><td>Entire company</td></tr> </table> <br> <table class='role-setting'> <caption><b>Professional / Enterprise plan</b></caption> <tr><th><b>Value</b></th><th><b>Description</b></th></tr> <tr><td>`1`</td><td>Owner only</td></tr> <tr><td>`3`</td><td>Owner's visibility group</td></tr> <tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr> <tr><td>`7`</td><td>Entire company</td></tr> </table> <br> Read more about visibility groups <a href='https://support.pipedrive.com/en/article/visibility-groups'>here</a>.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Value {
#[serde(rename = "1")]
Variant1,
#[serde(rename = "3")]
Variant3,
#[serde(rename = "5")]
Variant5,
#[serde(rename = "7")]
Variant7,
}
impl Default for Value {
fn default() -> Value {
Self::Variant1
}
}