opsgenie-rs 0.1.0-alpha.2

Rust client for OpsGenie API
Documentation
/*
 * Python SDK for Opsgenie REST API
 *
 * Python SDK for Opsgenie REST API
 *
 * The version of the OpenAPI document: 2.0.0
 * Contact: support@opsgenie.com
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorResponse {
    #[serde(rename = "requestId")]
    pub request_id: String,
    #[serde(rename = "took")]
    pub took: f32,
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
    pub code: Option<i32>,
    #[serde(rename = "responseHeaders", skip_serializing_if = "Option::is_none")]
    pub response_headers: Option<::std::collections::HashMap<String, Vec<String>>>,
}

impl ErrorResponse {
    pub fn new(request_id: String, took: f32) -> ErrorResponse {
        ErrorResponse {
            request_id,
            took,
            message: None,
            code: None,
            response_headers: None,
        }
    }
}