#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PublicKey {
#[serde(rename = "mechanisms")]
pub mechanisms: Vec<crate::models::KeyMechanism>,
#[serde(rename = "type")]
pub r#type: crate::models::KeyType,
#[serde(rename = "restrictions")]
pub restrictions: Box<crate::models::KeyRestrictions>,
#[serde(rename = "public", skip_serializing_if = "Option::is_none")]
pub public: Option<Box<crate::models::KeyPublicData>>,
#[serde(rename = "operations")]
pub operations: i32,
}
impl PublicKey {
pub fn new(
mechanisms: Vec<crate::models::KeyMechanism>,
r#type: crate::models::KeyType,
restrictions: crate::models::KeyRestrictions,
operations: i32,
) -> PublicKey {
PublicKey {
mechanisms,
r#type,
restrictions: Box::new(restrictions),
public: None,
operations,
}
}
}