gitbundle_sdk/models/
service_context.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ServiceContext {
17 #[serde(rename = "id")]
18 pub id: String,
19 #[serde(rename = "network")]
20 pub network: String,
21 #[serde(rename = "ports")]
22 pub ports: std::collections::HashMap<String, String>,
23}
24
25impl ServiceContext {
26 pub fn new(
27 id: String,
28 network: String,
29 ports: std::collections::HashMap<String, String>,
30 ) -> ServiceContext {
31 ServiceContext { id, network, ports }
32 }
33}