/*
* 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.565.0
* 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 CreateImapAccountRequest {
#[serde(rename = "profileId")]
pub profile_id: String,
#[serde(rename = "email")]
pub email: String,
/// Shown to people the mailbox emails.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Shortcut for imap.password.
#[serde(rename = "password", skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
#[serde(rename = "imap", skip_serializing_if = "Option::is_none")]
pub imap: Option<Box<models::CreateImapAccountRequestImap>>,
#[serde(rename = "smtp", skip_serializing_if = "Option::is_none")]
pub smtp: Option<Box<models::CreateImapAccountRequestSmtp>>,
/// Other addresses this mailbox sends as.
#[serde(rename = "identities", skip_serializing_if = "Option::is_none")]
pub identities: Option<Vec<models::CreateImapAccountRequestIdentitiesInner>>,
/// Run every check and store nothing, for live validation in your own form.
#[serde(rename = "dryRun", skip_serializing_if = "Option::is_none")]
pub dry_run: Option<bool>,
/// On-premise servers only: accept a certificate that cannot be verified. The hosted page never offers it.
#[serde(
rename = "allowSelfSignedCertificate",
skip_serializing_if = "Option::is_none"
)]
pub allow_self_signed_certificate: Option<bool>,
/// Reconnect this account in place with a new password; the stored servers are reused.
#[serde(rename = "reconnectAccountId", skip_serializing_if = "Option::is_none")]
pub reconnect_account_id: Option<String>,
}
impl CreateImapAccountRequest {
pub fn new(profile_id: String, email: String) -> CreateImapAccountRequest {
CreateImapAccountRequest {
profile_id,
email,
name: None,
password: None,
imap: None,
smtp: None,
identities: None,
dry_run: None,
allow_self_signed_certificate: None,
reconnect_account_id: None,
}
}
}