use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct ProjectApiKeyDeleteResponse {
#[serde(rename = "object")]
pub object: Object,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "deleted")]
pub deleted: bool,
}
impl ProjectApiKeyDeleteResponse {
pub fn new(object: Object, id: String, deleted: bool) -> ProjectApiKeyDeleteResponse {
ProjectApiKeyDeleteResponse {
object,
id,
deleted,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Object {
#[serde(rename = "organization.project.api_key.deleted")]
OrganizationProjectApiKeyDeleted,
}
impl Default for Object {
fn default() -> Object {
Self::OrganizationProjectApiKeyDeleted
}
}
impl std::fmt::Display for ProjectApiKeyDeleteResponse {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match serde_json::to_string(self) {
Ok(s) => write!(f, "{}", s),
Err(_) => Err(std::fmt::Error),
}
}
}