1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use serde::{Deserialize, Serialize};

use crate::Error;

#[derive(Deserialize, Debug, Clone)]
pub struct AppRamResponse {
    pub message: String,
    pub status: String,
}

#[derive(Serialize)]
pub struct AppRamBody {
    #[serde(rename = "ramMB")]
    pub ram: u32,
}

#[derive(Debug)]
pub enum AppRamError {
    ForbiddenQuantity(String),
    Other(Error),
}

impl From<Error> for AppRamError {
    fn from(error: Error) -> Self {
        Self::Other(error)
    }
}