Skip to main content

openapi_service_fabric/models/
probe_http_get.rs

1/*
2 * Service Fabric Client APIs
3 *
4 * Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services.
5 *
6 * The version of the OpenAPI document: 8.2
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ProbeHttpGet : Http probe for the container.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProbeHttpGet {
17    /// Port to access for probe.
18    #[serde(rename = "port")]
19    pub port: i32,
20    /// Path to access on the HTTP request.
21    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
22    pub path: Option<String>,
23    /// Host IP to connect to.
24    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
25    pub host: Option<String>,
26    /// Headers to set in the request.
27    #[serde(rename = "httpHeaders", skip_serializing_if = "Option::is_none")]
28    pub http_headers: Option<Vec<models::ProbeHttpGetHeaders>>,
29    /// Scheme for the http probe. Can be Http or Https.
30    #[serde(rename = "scheme", skip_serializing_if = "Option::is_none")]
31    pub scheme: Option<Scheme>,
32}
33
34impl ProbeHttpGet {
35    /// Http probe for the container.
36    pub fn new(port: i32) -> ProbeHttpGet {
37        ProbeHttpGet {
38            port,
39            path: None,
40            host: None,
41            http_headers: None,
42            scheme: None,
43        }
44    }
45}
46/// Scheme for the http probe. Can be Http or Https.
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Scheme {
49    #[serde(rename = "http")]
50    Http,
51    #[serde(rename = "https")]
52    Https,
53}
54
55impl Default for Scheme {
56    fn default() -> Scheme {
57        Self::Http
58    }
59}