/*
* 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.162.2
* 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 RcsLaunchRequestConsent {
#[serde(rename = "optInMethods")]
pub opt_in_methods: Vec<models::RcsLaunchRequestConsentOptInMethodsInner>,
/// The opt-in wording people agree to.
#[serde(rename = "callToAction")]
pub call_to_action: String,
/// Required for WEBSITE opt-in.
#[serde(rename = "callToActionUrl", skip_serializing_if = "Option::is_none")]
pub call_to_action_url: Option<String>,
/// Screenshot of the opt-in. Required for WEBSITE and MOBILE_APP opt-in.
#[serde(
rename = "callToActionMediaUrl",
skip_serializing_if = "Option::is_none"
)]
pub call_to_action_media_url: Option<String>,
#[serde(rename = "doubleOptIn")]
pub double_opt_in: bool,
/// Required when doubleOptIn is true.
#[serde(rename = "doubleOptInMessage", skip_serializing_if = "Option::is_none")]
pub double_opt_in_message: Option<String>,
#[serde(rename = "optInMessage")]
pub opt_in_message: String,
#[serde(rename = "helpResponse")]
pub help_response: String,
#[serde(rename = "optOutResponse")]
pub opt_out_response: String,
}
impl RcsLaunchRequestConsent {
pub fn new(
opt_in_methods: Vec<models::RcsLaunchRequestConsentOptInMethodsInner>,
call_to_action: String,
double_opt_in: bool,
opt_in_message: String,
help_response: String,
opt_out_response: String,
) -> RcsLaunchRequestConsent {
RcsLaunchRequestConsent {
opt_in_methods,
call_to_action,
call_to_action_url: None,
call_to_action_media_url: None,
double_opt_in,
double_opt_in_message: None,
opt_in_message,
help_response,
opt_out_response,
}
}
}