/*
* supports a RESTful API for the Libpod library
*
* This documentation describes the Podman v2.x+ RESTful API. It consists of a Docker-compatible API and a Libpod API providing support for Podman’s unique features such as pods. To start the service and keep it running for 5,000 seconds (-t 0 runs forever): podman system service -t 5000 & You can then use cURL on the socket using requests documented below. NOTE: if you install the package podman-docker, it will create a symbolic link for /run/docker.sock to /run/podman/podman.sock NOTE: Some fields in the API response JSON are encoded as omitempty, which means that if said field has a zero value, they will not be encoded in the API response. This is a feature to help reduce the size of the JSON responses returned via the API. NOTE: Due to the limitations of [go-swagger](https://github.com/go-swagger/go-swagger), some field values that have a complex type show up as null in the docs as well as in the API responses. This is because the zero value for the field type is null. The field description in the docs will state what type the field is expected to be for such cases. See podman-system-service(1) for more information. Quick Examples: 'podman info' curl --unix-socket /run/podman/podman.sock http://d/v5.0.0/libpod/info 'podman pull quay.io/containers/podman' curl -XPOST --unix-socket /run/podman/podman.sock -v 'http://d/v5.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman' 'podman list images' curl --unix-socket /run/podman/podman.sock -v 'http://d/v5.0.0/libpod/images/json' | jq
*
* The version of the OpenAPI document: 5.0.0
* Contact: podman@lists.podman.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// HostInfo : HostInfo describes the libpod host
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HostInfo {
#[serde(rename = "arch", skip_serializing_if = "Option::is_none")]
pub arch: Option<String>,
#[serde(rename = "buildahVersion", skip_serializing_if = "Option::is_none")]
pub buildah_version: Option<String>,
#[serde(rename = "cgroupControllers", skip_serializing_if = "Option::is_none")]
pub cgroup_controllers: Option<Vec<String>>,
#[serde(rename = "cgroupManager", skip_serializing_if = "Option::is_none")]
pub cgroup_manager: Option<String>,
#[serde(rename = "cgroupVersion", skip_serializing_if = "Option::is_none")]
pub cgroup_version: Option<String>,
#[serde(rename = "conmon", skip_serializing_if = "Option::is_none")]
pub conmon: Option<Box<models::ConmonInfo>>,
#[serde(rename = "cpuUtilization", skip_serializing_if = "Option::is_none")]
pub cpu_utilization: Option<Box<models::CpuUsage>>,
#[serde(rename = "cpus", skip_serializing_if = "Option::is_none")]
pub cpus: Option<i64>,
#[serde(rename = "databaseBackend", skip_serializing_if = "Option::is_none")]
pub database_backend: Option<String>,
#[serde(rename = "distribution", skip_serializing_if = "Option::is_none")]
pub distribution: Option<Box<models::DistributionInfo>>,
#[serde(rename = "eventLogger", skip_serializing_if = "Option::is_none")]
pub event_logger: Option<String>,
#[serde(rename = "freeLocks", skip_serializing_if = "Option::is_none")]
pub free_locks: Option<i32>,
#[serde(rename = "hostname", skip_serializing_if = "Option::is_none")]
pub hostname: Option<String>,
#[serde(rename = "idMappings", skip_serializing_if = "Option::is_none")]
pub id_mappings: Option<Box<models::IdMappings>>,
#[serde(rename = "kernel", skip_serializing_if = "Option::is_none")]
pub kernel: Option<String>,
#[serde(rename = "linkmode", skip_serializing_if = "Option::is_none")]
pub linkmode: Option<String>,
#[serde(rename = "logDriver", skip_serializing_if = "Option::is_none")]
pub log_driver: Option<String>,
#[serde(rename = "memFree", skip_serializing_if = "Option::is_none")]
pub mem_free: Option<i64>,
#[serde(rename = "memTotal", skip_serializing_if = "Option::is_none")]
pub mem_total: Option<i64>,
#[serde(rename = "networkBackend", skip_serializing_if = "Option::is_none")]
pub network_backend: Option<String>,
#[serde(rename = "networkBackendInfo", skip_serializing_if = "Option::is_none")]
pub network_backend_info: Option<Box<models::NetworkInfo>>,
#[serde(rename = "ociRuntime", skip_serializing_if = "Option::is_none")]
pub oci_runtime: Option<Box<models::OciRuntimeInfo>>,
#[serde(rename = "os", skip_serializing_if = "Option::is_none")]
pub os: Option<String>,
#[serde(rename = "pasta", skip_serializing_if = "Option::is_none")]
pub pasta: Option<Box<models::PastaInfo>>,
#[serde(rename = "remoteSocket", skip_serializing_if = "Option::is_none")]
pub remote_socket: Option<Box<models::RemoteSocket>>,
/// RootlessNetworkCmd returns the default rootless network command (slirp4netns or pasta)
#[serde(rename = "rootlessNetworkCmd", skip_serializing_if = "Option::is_none")]
pub rootless_network_cmd: Option<String>,
#[serde(rename = "runtimeInfo", skip_serializing_if = "Option::is_none")]
pub runtime_info: Option<std::collections::HashMap<String, serde_json::Value>>,
#[serde(rename = "security", skip_serializing_if = "Option::is_none")]
pub security: Option<Box<models::SecurityInfo>>,
/// ServiceIsRemote is true when the podman/libpod service is remote to the client
#[serde(rename = "serviceIsRemote", skip_serializing_if = "Option::is_none")]
pub service_is_remote: Option<bool>,
#[serde(rename = "slirp4netns", skip_serializing_if = "Option::is_none")]
pub slirp4netns: Option<Box<models::SlirpInfo>>,
#[serde(rename = "swapFree", skip_serializing_if = "Option::is_none")]
pub swap_free: Option<i64>,
#[serde(rename = "swapTotal", skip_serializing_if = "Option::is_none")]
pub swap_total: Option<i64>,
#[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
pub uptime: Option<String>,
#[serde(rename = "variant", skip_serializing_if = "Option::is_none")]
pub variant: Option<String>,
}
impl HostInfo {
/// HostInfo describes the libpod host
pub fn new() -> HostInfo {
HostInfo {
arch: None,
buildah_version: None,
cgroup_controllers: None,
cgroup_manager: None,
cgroup_version: None,
conmon: None,
cpu_utilization: None,
cpus: None,
database_backend: None,
distribution: None,
event_logger: None,
free_locks: None,
hostname: None,
id_mappings: None,
kernel: None,
linkmode: None,
log_driver: None,
mem_free: None,
mem_total: None,
network_backend: None,
network_backend_info: None,
oci_runtime: None,
os: None,
pasta: None,
remote_socket: None,
rootless_network_cmd: None,
runtime_info: None,
security: None,
service_is_remote: None,
slirp4netns: None,
swap_free: None,
swap_total: None,
uptime: None,
variant: None,
}
}
}