Skip to main content

edc_web_components/models/
data_plane.rs

1use edc_connector_client::types::dataplane::{DataPlaneInstance, DataPlaneInstanceState};
2
3#[derive(Debug, Clone, PartialEq)]
4pub struct DataPlane {
5  pub id: String,
6  pub url: String,
7  pub allowed_source_types: Vec<String>,
8  pub allowed_dest_types: Vec<String>,
9  pub allowed_transfer_types: Vec<String>,
10  pub state: DataPlaneInstanceState,
11}
12
13impl From<DataPlaneInstance> for DataPlane {
14  fn from(data_plane: DataPlaneInstance) -> Self {
15    Self {
16      id: data_plane.id().to_string(),
17      url: data_plane.url().to_string(),
18      allowed_source_types: data_plane.allowed_source_types().to_vec(),
19      allowed_dest_types: data_plane.allowed_dest_types().to_vec(),
20      allowed_transfer_types: data_plane.allowed_transfer_types().to_vec(),
21      state: data_plane.state().clone(),
22    }
23  }
24}