/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.603.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ForwardEmailRequest {
#[serde(rename = "accountId")]
pub account_id: String,
#[serde(rename = "to")]
pub to: Vec<models::EmailAddress>,
#[serde(rename = "cc", skip_serializing_if = "Option::is_none")]
pub cc: Option<Vec<models::EmailAddress>>,
#[serde(rename = "bcc", skip_serializing_if = "Option::is_none")]
pub bcc: Option<Vec<models::EmailAddress>>,
#[serde(rename = "replyTo", skip_serializing_if = "Option::is_none")]
pub reply_to: Option<Vec<models::EmailAddress>>,
#[serde(rename = "fromName", skip_serializing_if = "Option::is_none")]
pub from_name: Option<String>,
/// Send from another address of the mailbox, as on `POST /v1/email/messages`.
#[serde(rename = "from", skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
/// Appends the signature of the sending address to the note, above the forwarded original: its Zernio default first, else its Gmail signature.
#[serde(rename = "appendSignature", skip_serializing_if = "Option::is_none")]
pub append_signature: Option<bool>,
/// Appends this Zernio signature to the note instead. Wins over `appendSignature`.
#[serde(rename = "signatureId", skip_serializing_if = "Option::is_none")]
pub signature_id: Option<String>,
/// Defaults to \"Fwd: \" plus the original subject.
#[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
pub subject: Option<String>,
/// Optional note above the forwarded mail.
#[serde(rename = "text", skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
/// Optional note above the forwarded mail, as html.
#[serde(rename = "html", skip_serializing_if = "Option::is_none")]
pub html: Option<String>,
/// Added to the forwarded attachments. Everything together stays under 25 MB, else 413 `attachment_too_large`.
#[serde(rename = "attachments", skip_serializing_if = "Option::is_none")]
pub attachments: Option<Vec<models::EmailAttachmentInput>>,
/// False keeps only the inline images of the original.
#[serde(rename = "includeAttachments", skip_serializing_if = "Option::is_none")]
pub include_attachments: Option<bool>,
/// Attachment ids (from a read of the original) to leave out.
#[serde(
rename = "excludeAttachmentIds",
skip_serializing_if = "Option::is_none"
)]
pub exclude_attachment_ids: Option<Vec<String>>,
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, String>>,
/// Adds an open pixel to the note and fires `email.opened`. Needs `html`.
#[serde(rename = "trackOpens", skip_serializing_if = "Option::is_none")]
pub track_opens: Option<bool>,
/// Rewrites the links of the note and fires `email.link_clicked`. Needs `html`.
#[serde(rename = "trackLinks", skip_serializing_if = "Option::is_none")]
pub track_links: Option<bool>,
/// Fires `email.thread_replied` when someone else writes in the thread.
#[serde(rename = "trackReplies", skip_serializing_if = "Option::is_none")]
pub track_replies: Option<bool>,
}
impl ForwardEmailRequest {
pub fn new(account_id: String, to: Vec<models::EmailAddress>) -> ForwardEmailRequest {
ForwardEmailRequest {
account_id,
to,
cc: None,
bcc: None,
reply_to: None,
from_name: None,
from: None,
append_signature: None,
signature_id: None,
subject: None,
text: None,
html: None,
attachments: None,
include_attachments: None,
exclude_attachment_ids: None,
metadata: None,
track_opens: None,
track_links: None,
track_replies: None,
}
}
}