pipedrive-rs 0.1.0

Rust PipedriveClient
Documentation
/*
 * 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 ActivityResponseObject {
    /// The due date of the activity. Format: YYYY-MM-DD
    #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")]
    pub due_date: Option<String>,
    /// The due time of the activity in UTC. Format: HH:MM
    #[serde(rename = "due_time", skip_serializing_if = "Option::is_none")]
    pub due_time: Option<String>,
    /// The duration of the activity. Format: HH:MM
    #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
    pub duration: Option<String>,
    /// The ID of the deal this activity is associated with
    #[serde(rename = "deal_id", skip_serializing_if = "Option::is_none")]
    pub deal_id: Option<i32>,
    /// The ID of the lead in the UUID format this activity is associated with
    #[serde(rename = "lead_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub lead_id: Option<Option<uuid::Uuid>>,
    /// The ID of the person this activity is associated with
    #[serde(rename = "person_id", skip_serializing_if = "Option::is_none")]
    pub person_id: Option<i32>,
    /// The ID of the project this activity is associated with
    #[serde(rename = "project_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<Option<i32>>,
    /// The ID of the organization this activity is associated with
    #[serde(rename = "org_id", skip_serializing_if = "Option::is_none")]
    pub org_id: Option<i32>,
    /// The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps.
    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
    pub location: Option<String>,
    /// Additional details about the activity that is synced to your external calendar. Unlike the note added to the activity, the description is publicly visible to any guests added to the activity.
    #[serde(rename = "public_description", skip_serializing_if = "Option::is_none")]
    pub public_description: Option<String>,
    /// The ID of the activity, generated when the activity was created
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    /// The note of the activity (HTML format)
    #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
    pub note: Option<String>,
    /// Whether the activity is done or not
    #[serde(rename = "done", skip_serializing_if = "Option::is_none")]
    pub done: Option<bool>,
    /// The subject of the activity
    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
    pub subject: Option<String>,
    /// The type of the activity. This is in correlation with the `key_string` parameter of ActivityTypes.
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    /// The ID of the user whom the activity is assigned to
    #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<i32>,
    /// List of multiple persons (participants) this activity is associated with
    #[serde(rename = "participants", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub participants: Option<Option<Vec<serde_json::Value>>>,
    /// Marks if the activity is set as 'Busy' or 'Free'. If the flag is set to `true`, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset. When the value of the flag is unset (`null`), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time.
    #[serde(rename = "busy_flag", skip_serializing_if = "Option::is_none")]
    pub busy_flag: Option<bool>,
    /// The attendees of the activity. This can be either your existing Pipedrive contacts or an external email address.
    #[serde(rename = "attendees", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub attendees: Option<Option<Vec<serde_json::Value>>>,
    /// The user's company ID
    #[serde(rename = "company_id", skip_serializing_if = "Option::is_none")]
    pub company_id: Option<i32>,
    /// If the activity references some other object, it is indicated here. For example, value `Salesphone` refers to activities created with Caller.
    #[serde(rename = "reference_type", skip_serializing_if = "Option::is_none")]
    pub reference_type: Option<String>,
    /// Together with the `reference_type`, gives the ID of the other object
    #[serde(rename = "reference_id", skip_serializing_if = "Option::is_none")]
    pub reference_id: Option<i32>,
    /// The ID of the Marketplace app, which is connected to this activity
    #[serde(rename = "conference_meeting_client", skip_serializing_if = "Option::is_none")]
    pub conference_meeting_client: Option<String>,
    /// The link to join the meeting which is associated with this activity
    #[serde(rename = "conference_meeting_url", skip_serializing_if = "Option::is_none")]
    pub conference_meeting_url: Option<String>,
    /// The meeting ID of the meeting provider (Zoom, MS Teams etc.) that is associated with this activity
    #[serde(rename = "conference_meeting_id", skip_serializing_if = "Option::is_none")]
    pub conference_meeting_id: Option<String>,
    /// The creation date and time of the activity in UTC. Format: YYYY-MM-DD HH:MM:SS.
    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
    pub add_time: Option<String>,
    /// The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS.
    #[serde(rename = "marked_as_done_time", skip_serializing_if = "Option::is_none")]
    pub marked_as_done_time: Option<String>,
    /// The date and time of latest notifications sent about this activity to the participants or the attendees of this activity
    #[serde(rename = "last_notification_time", skip_serializing_if = "Option::is_none")]
    pub last_notification_time: Option<String>,
    /// The ID of the user who triggered the sending of the latest notifications about this activity to the participants or the attendees of this activity
    #[serde(rename = "last_notification_user_id", skip_serializing_if = "Option::is_none")]
    pub last_notification_user_id: Option<i32>,
    /// The ID of the language the notifications are sent in
    #[serde(rename = "notification_language_id", skip_serializing_if = "Option::is_none")]
    pub notification_language_id: Option<i32>,
    /// Whether the activity is active or not
    #[serde(rename = "active_flag", skip_serializing_if = "Option::is_none")]
    pub active_flag: Option<bool>,
    /// The last update date and time of the activity. Format: YYYY-MM-DD HH:MM:SS.
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
    /// The ID of the user who was the last to update this activity
    #[serde(rename = "update_user_id", skip_serializing_if = "Option::is_none")]
    pub update_user_id: Option<i32>,
    /// For the activity which syncs to Google calendar, this is the Google event ID. NB! This field is related to old Google calendar sync and will be deprecated soon.
    #[serde(rename = "gcal_event_id", skip_serializing_if = "Option::is_none")]
    pub gcal_event_id: Option<String>,
    /// The Google calendar ID that this activity syncs to. NB! This field is related to old Google calendar sync and will be deprecated soon.
    #[serde(rename = "google_calendar_id", skip_serializing_if = "Option::is_none")]
    pub google_calendar_id: Option<String>,
    /// The Google calendar API etag (version) that is used for syncing this activity. NB! This field is related to old Google calendar sync and will be deprecated soon.
    #[serde(rename = "google_calendar_etag", skip_serializing_if = "Option::is_none")]
    pub google_calendar_etag: Option<String>,
    /// For activities that sync to an external calendar, this setting indicates if the activity syncs with context (what are the deals, persons, organizations this activity is related to)
    #[serde(rename = "calendar_sync_include_context", skip_serializing_if = "Option::is_none")]
    pub calendar_sync_include_context: Option<String>,
    /// The timezone the activity was created in an external calendar
    #[serde(rename = "source_timezone", skip_serializing_if = "Option::is_none")]
    pub source_timezone: Option<String>,
    /// The rule for the recurrence of the activity. Is important for activities synced into Pipedrive from an external calendar. Example: \"RRULE:FREQ=WEEKLY;BYDAY=WE\"
    #[serde(rename = "rec_rule", skip_serializing_if = "Option::is_none")]
    pub rec_rule: Option<String>,
    /// Additional rules for the recurrence of the activity, extend the `rec_rule`. Is important for activities synced into Pipedrive from an external calendar.
    #[serde(rename = "rec_rule_extension", skip_serializing_if = "Option::is_none")]
    pub rec_rule_extension: Option<String>,
    /// The ID of parent activity for a recurrent activity if the current activity is an exception to recurrence rules
    #[serde(rename = "rec_master_activity_id", skip_serializing_if = "Option::is_none")]
    pub rec_master_activity_id: Option<i32>,
    /// The list of recurring activity instances. It is in a structure as follows: `[{due_date: \"2020-06-24\", due_time: \"10:00:00\"}]`
    #[serde(rename = "series", skip_serializing_if = "Option::is_none")]
    pub series: Option<Vec<serde_json::Value>>,
    /// The ID of the user who created the activity
    #[serde(rename = "created_by_user_id", skip_serializing_if = "Option::is_none")]
    pub created_by_user_id: Option<i32>,
    /// A subfield of the location field. Indicates apartment/suite number.
    #[serde(rename = "location_subpremise", skip_serializing_if = "Option::is_none")]
    pub location_subpremise: Option<String>,
    /// A subfield of the location field. Indicates house number.
    #[serde(rename = "location_street_number", skip_serializing_if = "Option::is_none")]
    pub location_street_number: Option<String>,
    /// A subfield of the location field. Indicates street name.
    #[serde(rename = "location_route", skip_serializing_if = "Option::is_none")]
    pub location_route: Option<String>,
    /// A subfield of the location field. Indicates district/sublocality.
    #[serde(rename = "location_sublocality", skip_serializing_if = "Option::is_none")]
    pub location_sublocality: Option<String>,
    /// A subfield of the location field. Indicates city/town/village/locality.
    #[serde(rename = "location_locality", skip_serializing_if = "Option::is_none")]
    pub location_locality: Option<String>,
    /// A subfield of the location field. Indicates state/county.
    #[serde(rename = "location_admin_area_level_1", skip_serializing_if = "Option::is_none")]
    pub location_admin_area_level_1: Option<String>,
    /// A subfield of the location field. Indicates region.
    #[serde(rename = "location_admin_area_level_2", skip_serializing_if = "Option::is_none")]
    pub location_admin_area_level_2: Option<String>,
    /// A subfield of the location field. Indicates country.
    #[serde(rename = "location_country", skip_serializing_if = "Option::is_none")]
    pub location_country: Option<String>,
    /// A subfield of the location field. Indicates ZIP/postal code.
    #[serde(rename = "location_postal_code", skip_serializing_if = "Option::is_none")]
    pub location_postal_code: Option<String>,
    /// A subfield of the location field. Indicates full/combined address.
    #[serde(rename = "location_formatted_address", skip_serializing_if = "Option::is_none")]
    pub location_formatted_address: Option<String>,
    /// The name of the organization this activity is associated with
    #[serde(rename = "org_name", skip_serializing_if = "Option::is_none")]
    pub org_name: Option<String>,
    /// The name of the person this activity is associated with
    #[serde(rename = "person_name", skip_serializing_if = "Option::is_none")]
    pub person_name: Option<String>,
    /// The name of the deal this activity is associated with
    #[serde(rename = "deal_title", skip_serializing_if = "Option::is_none")]
    pub deal_title: Option<String>,
    /// The name of the user this activity is owned by
    #[serde(rename = "owner_name", skip_serializing_if = "Option::is_none")]
    pub owner_name: Option<String>,
    /// The BCC email address of the person
    #[serde(rename = "person_dropbox_bcc", skip_serializing_if = "Option::is_none")]
    pub person_dropbox_bcc: Option<String>,
    /// The BCC email address of the deal
    #[serde(rename = "deal_dropbox_bcc", skip_serializing_if = "Option::is_none")]
    pub deal_dropbox_bcc: Option<String>,
    /// The ID of the user to whom the activity is assigned to. Equal to `user_id`.
    #[serde(rename = "assigned_to_user_id", skip_serializing_if = "Option::is_none")]
    pub assigned_to_user_id: Option<i32>,
    /// The file that is attached to this activity. For example, this can be a reference to an audio note file generated with Pipedrive mobile app.
    #[serde(rename = "file", skip_serializing_if = "Option::is_none")]
    pub file: Option<serde_json::Value>,
}

impl ActivityResponseObject {
    pub fn new() -> ActivityResponseObject {
        ActivityResponseObject {
            due_date: None,
            due_time: None,
            duration: None,
            deal_id: None,
            lead_id: None,
            person_id: None,
            project_id: None,
            org_id: None,
            location: None,
            public_description: None,
            id: None,
            note: None,
            done: None,
            subject: None,
            r#type: None,
            user_id: None,
            participants: None,
            busy_flag: None,
            attendees: None,
            company_id: None,
            reference_type: None,
            reference_id: None,
            conference_meeting_client: None,
            conference_meeting_url: None,
            conference_meeting_id: None,
            add_time: None,
            marked_as_done_time: None,
            last_notification_time: None,
            last_notification_user_id: None,
            notification_language_id: None,
            active_flag: None,
            update_time: None,
            update_user_id: None,
            gcal_event_id: None,
            google_calendar_id: None,
            google_calendar_etag: None,
            calendar_sync_include_context: None,
            source_timezone: None,
            rec_rule: None,
            rec_rule_extension: None,
            rec_master_activity_id: None,
            series: None,
            created_by_user_id: None,
            location_subpremise: None,
            location_street_number: None,
            location_route: None,
            location_sublocality: None,
            location_locality: None,
            location_admin_area_level_1: None,
            location_admin_area_level_2: None,
            location_country: None,
            location_postal_code: None,
            location_formatted_address: None,
            org_name: None,
            person_name: None,
            deal_title: None,
            owner_name: None,
            person_dropbox_bcc: None,
            deal_dropbox_bcc: None,
            assigned_to_user_id: None,
            file: None,
        }
    }
}