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: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::servicecontrol_v1::models;

/// CheckResponse : Response message for the Check method.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CheckResponse {
    /// Indicate the decision of the check. If no check errors are present, the service should process the operation. Otherwise the service should use the list of errors to determine the appropriate action.
    #[serde(rename = "checkErrors", skip_serializing_if = "Option::is_none")]
    pub check_errors: Option<Vec<models::CheckError>>,
    #[serde(rename = "checkInfo", skip_serializing_if = "Option::is_none")]
    pub check_info: Option<Box<models::CheckInfo>>,
    /// The same operation_id value used in the CheckRequest. Used for logging and diagnostics purposes.
    #[serde(rename = "operationId", skip_serializing_if = "Option::is_none")]
    pub operation_id: Option<String>,
    #[serde(rename = "quotaInfo", skip_serializing_if = "Option::is_none")]
    pub quota_info: Option<Box<models::QuotaInfo>>,
    /// The actual config id used to process the request.
    #[serde(rename = "serviceConfigId", skip_serializing_if = "Option::is_none")]
    pub service_config_id: Option<String>,
    /// The current service rollout id used to process the request.
    #[serde(rename = "serviceRolloutId", skip_serializing_if = "Option::is_none")]
    pub service_rollout_id: Option<String>,
}

impl CheckResponse {
    /// Response message for the Check method.
    pub fn new() -> CheckResponse {
        CheckResponse {
            check_errors: None,
            check_info: None,
            operation_id: None,
            quota_info: None,
            service_config_id: None,
            service_rollout_id: None,
        }
    }
}
