use serde::{Deserialize, Serialize}; /*
                                      * Service Control API
                                      *
                                      * Provides admission control and telemetry reporting for services integrated with Service Infrastructure.
                                      *
                                      * The version of the OpenAPI document: v2
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::servicecontrol_v2::models;

/// CheckResponse : Response message for the Check method.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CheckResponse {
    /// Optional response metadata that will be emitted as dynamic metadata to be consumed by the caller of ServiceController. For compatibility with the ext_authz interface.
    #[serde(rename = "dynamicMetadata", skip_serializing_if = "Option::is_none")]
    pub dynamic_metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// Returns a set of request contexts generated from the `CheckRequest`.
    #[serde(rename = "headers", skip_serializing_if = "Option::is_none")]
    pub headers: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Box<models::Status>>,
}

impl CheckResponse {
    /// Response message for the Check method.
    pub fn new() -> CheckResponse {
        CheckResponse {
            dynamic_metadata: None,
            headers: None,
            status: None,
        }
    }
}
