bitwarden-api-api 3.0.0

Api bindings for the Bitwarden API.
Documentation
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SyncResponseModel {
    #[serde(
        rename = "object",
        alias = "Object",
        skip_serializing_if = "Option::is_none"
    )]
    pub object: Option<String>,
    #[serde(
        rename = "profile",
        alias = "Profile",
        skip_serializing_if = "Option::is_none"
    )]
    pub profile: Option<Box<models::ProfileResponseModel>>,
    #[serde(
        rename = "folders",
        alias = "Folders",
        skip_serializing_if = "Option::is_none"
    )]
    pub folders: Option<Vec<models::FolderResponseModel>>,
    #[serde(
        rename = "collections",
        alias = "Collections",
        skip_serializing_if = "Option::is_none"
    )]
    pub collections: Option<Vec<models::CollectionDetailsResponseModel>>,
    #[serde(
        rename = "ciphers",
        alias = "Ciphers",
        skip_serializing_if = "Option::is_none"
    )]
    pub ciphers: Option<Vec<models::CipherDetailsResponseModel>>,
    #[serde(
        rename = "domains",
        alias = "Domains",
        skip_serializing_if = "Option::is_none"
    )]
    pub domains: Option<Box<models::DomainsResponseModel>>,
    #[serde(
        rename = "policies",
        alias = "Policies",
        skip_serializing_if = "Option::is_none"
    )]
    pub policies: Option<Vec<models::PolicyResponseModel>>,
    /// Policies for organizations where the user is in the Confirmed or Accepted status. Null when
    /// the `pm-34145-policies-in-accepted-state` feature flag is disabled. New clients should
    /// prefer this property and fall back to
    /// Bit.Api.Vault.Models.Response.SyncResponseModel.Policies if absent.
    #[serde(
        rename = "policiesNew",
        alias = "PoliciesNew",
        skip_serializing_if = "Option::is_none"
    )]
    pub policies_new: Option<Vec<models::PolicyResponseModel>>,
    /// Organizations where the user is in the Confirmed or Accepted status. Null when the
    /// `pm-34145-policies-in-accepted-state` feature flag is disabled. New clients should prefer
    /// this property and fall back to
    /// Bit.Api.Vault.Models.Response.SyncResponseModel.Profile.`Organizations` if absent.
    #[serde(
        rename = "organizationsNew",
        alias = "OrganizationsNew",
        skip_serializing_if = "Option::is_none"
    )]
    pub organizations_new: Option<Vec<models::ProfileOrganizationResponseModel>>,
    #[serde(
        rename = "sends",
        alias = "Sends",
        skip_serializing_if = "Option::is_none"
    )]
    pub sends: Option<Vec<models::SendResponseModel>>,
    #[serde(
        rename = "userDecryption",
        alias = "UserDecryption",
        skip_serializing_if = "Option::is_none"
    )]
    pub user_decryption: Option<Box<models::UserDecryptionResponseModel>>,
}

impl SyncResponseModel {
    pub fn new() -> SyncResponseModel {
        SyncResponseModel {
            object: None,
            profile: None,
            folders: None,
            collections: None,
            ciphers: None,
            domains: None,
            policies: None,
            policies_new: None,
            organizations_new: None,
            sends: None,
            user_decryption: None,
        }
    }
}