sonarr_api_rs/models/
download_protocol.rs

1/*
2 * Sonarr
3 *
4 * Sonarr API docs - The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application.
5 *
6 * The version of the OpenAPI document: 3.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum DownloadProtocol {
17    #[serde(rename = "unknown")]
18    Unknown,
19    #[serde(rename = "usenet")]
20    Usenet,
21    #[serde(rename = "torrent")]
22    Torrent,
23
24}
25
26impl std::fmt::Display for DownloadProtocol {
27    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
28        match self {
29            Self::Unknown => write!(f, "unknown"),
30            Self::Usenet => write!(f, "usenet"),
31            Self::Torrent => write!(f, "torrent"),
32        }
33    }
34}
35
36impl Default for DownloadProtocol {
37    fn default() -> DownloadProtocol {
38        Self::Unknown
39    }
40}
41