podman_client/models/podman/manifests/
create.rs

1use core::fmt;
2use std::collections::HashMap;
3
4use serde::{Deserialize, Serialize};
5
6pub struct ManifestCreateOptions<'a> {
7    pub name: &'a str,
8    pub all: Option<bool>,
9    pub amend: Option<bool>,
10    pub images: Vec<&'a str>,
11    pub request: ManifestCreateRequest,
12}
13
14#[derive(Serialize)]
15pub struct ManifestCreateRequest {
16    pub all: bool,
17    pub annotation: Vec<String>,
18    pub annotations: HashMap<String, String>,
19    pub arch: String,
20    pub artifact_annotations: HashMap<String, String>,
21    pub artifact_config: String,
22    pub artifact_config_type: String,
23    pub artifact_exclude_titles: bool,
24    pub artifact_files: Vec<String>,
25    pub artifact_layer_type: String,
26    pub artifact_subject: String,
27    pub artifact_type: String,
28    pub features: Vec<String>,
29    pub images: Vec<String>,
30    pub index_annotation: Vec<String>,
31    pub index_annotations: HashMap<String, String>,
32    pub operation: String,
33    pub os: String,
34    pub os_features: Vec<String>,
35    pub os_version: String,
36    pub subject: String,
37    pub variant: String,
38}
39
40#[derive(Deserialize, Serialize)]
41#[serde(rename_all = "PascalCase")]
42pub struct ManifestCreate {
43    pub id: String,
44}
45
46impl fmt::Debug for ManifestCreate {
47    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
48        let json = serde_json::to_string_pretty(self).map_err(|_| fmt::Error)?;
49        f.write_str(&json)
50    }
51}