Skip to main content

clientapi_pbs/models/
nodes_apt_create_repositories_request.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NodesAptCreateRepositoriesRequest {
16
17    /// Prevent changes if current configuration file has different SHA256 digest. This can be used to prevent concurrent modifications.
18    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
19    pub digest: Option<String>,
20
21    /// Whether the repository should be enabled or not.
22    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
23    pub enabled: Option<bool>,
24
25    /// Index within the file (starting from 0).
26    #[serde(rename = "index")]
27    pub index: i64,
28
29    /// Path to the containing file.
30    #[serde(rename = "path")]
31    pub path: String,
32
33
34}
35
36impl NodesAptCreateRepositoriesRequest {
37    pub fn new(index: i64, path: String) -> NodesAptCreateRepositoriesRequest {
38        NodesAptCreateRepositoriesRequest {
39            
40            digest: None,
41            
42            enabled: None,
43            
44            index,
45            
46            path,
47            
48        }
49    }
50}
51
52