/*
* 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).
*
* The version of the OpenAPI document: 1.15.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 GetPendingOAuthData200Response {
/// The platform (e.g., \"linkedin\")
#[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
/// The Zernio profile ID
#[serde(rename = "profileId", skip_serializing_if = "Option::is_none")]
pub profile_id: Option<String>,
/// Temporary access token for the platform
#[serde(rename = "tempToken", skip_serializing_if = "Option::is_none")]
pub temp_token: Option<String>,
/// Refresh token (if available)
#[serde(rename = "refreshToken", skip_serializing_if = "Option::is_none")]
pub refresh_token: Option<String>,
/// Token expiry in seconds
#[serde(rename = "expiresIn", skip_serializing_if = "Option::is_none")]
pub expires_in: Option<f64>,
/// User profile data (id, username, displayName, profilePicture)
#[serde(rename = "userProfile", skip_serializing_if = "Option::is_none")]
pub user_profile: Option<serde_json::Value>,
/// Type of selection data
#[serde(rename = "selectionType", skip_serializing_if = "Option::is_none")]
pub selection_type: Option<SelectionType>,
/// LinkedIn organizations (when selectionType is \"organizations\")
#[serde(rename = "organizations", skip_serializing_if = "Option::is_none")]
pub organizations: Option<Vec<models::GetPendingOAuthData200ResponseOrganizationsInner>>,
}
impl GetPendingOAuthData200Response {
pub fn new() -> GetPendingOAuthData200Response {
GetPendingOAuthData200Response {
platform: None,
profile_id: None,
temp_token: None,
refresh_token: None,
expires_in: None,
user_profile: None,
selection_type: None,
organizations: None,
}
}
}
/// Type of selection data
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SelectionType {
#[serde(rename = "organizations")]
Organizations,
#[serde(rename = "pages")]
Pages,
#[serde(rename = "boards")]
Boards,
#[serde(rename = "locations")]
Locations,
#[serde(rename = "profiles")]
Profiles,
}
impl Default for SelectionType {
fn default() -> SelectionType {
Self::Organizations
}
}