rocl/models/
service_binding_endpoint.rs

1/*
2 * Open Service Broker API
3 *
4 * The Open Service Broker API defines an HTTP(S) interface between Platforms and Service Brokers.
5 *
6 * The version of the OpenAPI document: master - might contain changes that are not yet released
7 * Contact: open-service-broker-api@googlegroups.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ServiceBindingEndpoint {
16    #[serde(rename = "host")]
17    pub host: String,
18    #[serde(rename = "ports")]
19    pub ports: Vec<String>,
20    #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")]
21    pub protocol: Option<Protocol>,
22}
23
24impl ServiceBindingEndpoint {
25    pub fn new(host: String, ports: Vec<String>) -> ServiceBindingEndpoint {
26        ServiceBindingEndpoint {
27            host,
28            ports,
29            protocol: None,
30        }
31    }
32}
33
34/// 
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum Protocol {
37    #[serde(rename = "tcp")]
38    Tcp,
39    #[serde(rename = "udp")]
40    Udp,
41    #[serde(rename = "all")]
42    All,
43}
44