#[cfg(feature = "json")]
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug)]
#[cfg_attr(feature = "json", derive(Serialize, Deserialize))]
pub struct Directory {
#[cfg_attr(feature = "json", serde(rename = "newNonce"))]
pub new_nonce: String,
#[cfg_attr(feature = "json", serde(rename = "newAccount"))]
pub new_account: String,
#[cfg_attr(feature = "json", serde(rename = "newOrder"))]
pub new_order: String,
#[cfg_attr(feature = "json", serde(skip_serializing_if = "Option::is_none"))]
#[cfg_attr(feature = "json", serde(rename = "newAuthz"))]
pub new_authorization: Option<String>,
#[cfg_attr(feature = "json", serde(rename = "revokeCert"))]
pub revoke_certificate: String,
#[cfg_attr(feature = "json", serde(rename = "keyChange"))]
pub key_change: String,
#[cfg_attr(feature = "json", serde(skip_serializing_if = "Option::is_none"))]
#[cfg_attr(feature = "json", serde(rename = "meta"))]
pub metadata: Option<DirectoryMetadata>,
}
#[cfg(feature = "json")]
impl Directory {
pub fn from_str(s: &str) -> Result<Directory, serde_json::error::Error> {
serde_json::from_str(s)
}
pub fn to_string(&self) -> Result<String, serde_json::error::Error> {
serde_json::to_string(self)
}
}
#[derive(Clone, Debug)]
#[cfg_attr(feature = "json", derive(Serialize, Deserialize))]
pub struct DirectoryMetadata {
#[cfg_attr(feature = "json", serde(skip_serializing_if = "Option::is_none"))]
#[cfg_attr(feature = "json", serde(rename = "termsOfService"))]
pub terms_of_service: Option<String>,
#[cfg_attr(feature = "json", serde(skip_serializing_if = "Option::is_none"))]
pub website: Option<String>,
#[cfg_attr(feature = "json", serde(skip_serializing_if = "Option::is_none"))]
#[cfg_attr(feature = "json", serde(rename = "caaIdentities"))]
pub caa_identities: Option<Vec<String>>,
#[cfg_attr(feature = "json", serde(skip_serializing_if = "Option::is_none"))]
#[cfg_attr(feature = "json", serde(rename = "externalAccountRequired"))]
pub external_account_required: Option<bool>,
}