fireblocks_sdk/models/
network_connection_response.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NetworkConnectionResponse {
16    #[serde(rename = "id")]
17    pub id: String,
18    /// Deprecated - Replaced by `localNetworkId`
19    #[serde(rename = "localChannel", skip_serializing_if = "Option::is_none")]
20    pub local_channel: Option<models::NetworkChannel>,
21    /// Deprecated - Replaced by `remoteNetworkId`
22    #[serde(rename = "remoteChannel", skip_serializing_if = "Option::is_none")]
23    pub remote_channel: Option<models::NetworkChannel>,
24    #[serde(rename = "status")]
25    pub status: models::NetworkConnectionStatus,
26    #[serde(rename = "localNetworkId")]
27    pub local_network_id: models::NetworkId,
28    #[serde(rename = "remoteNetworkId")]
29    pub remote_network_id: models::NetworkId,
30    #[serde(rename = "routingPolicy")]
31    pub routing_policy:
32        std::collections::HashMap<String, models::NetworkConnectionRoutingPolicyValue>,
33}
34
35impl NetworkConnectionResponse {
36    pub fn new(
37        id: String,
38        status: models::NetworkConnectionStatus,
39        local_network_id: models::NetworkId,
40        remote_network_id: models::NetworkId,
41        routing_policy: std::collections::HashMap<
42            String,
43            models::NetworkConnectionRoutingPolicyValue,
44        >,
45    ) -> NetworkConnectionResponse {
46        NetworkConnectionResponse {
47            id,
48            local_channel: None,
49            remote_channel: None,
50            status,
51            local_network_id,
52            remote_network_id,
53            routing_policy,
54        }
55    }
56}