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;

/// ReportResponse : Response message for the Report method.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReportResponse {
    /// Partial failures, one for each `Operation` in the request that failed processing. There are three possible combinations of the RPC status: 1. The combination of a successful RPC status and an empty `report_errors` list indicates a complete success where all `Operations` in the request are processed successfully. 2. The combination of a successful RPC status and a non-empty `report_errors` list indicates a partial success where some `Operations` in the request succeeded. Each `Operation` that failed processing has a corresponding item in this list. 3. A failed RPC status indicates a general non-deterministic failure. When this happens, it's impossible to know which of the 'Operations' in the request succeeded or failed.
    #[serde(rename = "reportErrors", skip_serializing_if = "Option::is_none")]
    pub report_errors: Option<Vec<models::ReportError>>,
    /// 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 ReportResponse {
    /// Response message for the Report method.
    pub fn new() -> ReportResponse {
        ReportResponse {
            report_errors: None,
            service_config_id: None,
            service_rollout_id: None,
        }
    }
}
