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;

/// OrgPolicyViolationInfo : Represents OrgPolicy Violation information.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OrgPolicyViolationInfo {
    /// Optional. Deprecated. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request.
    #[serde(rename = "payload", skip_serializing_if = "Option::is_none")]
    pub payload: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// Optional. Deprecated. Tags referenced on the resource at the time of evaluation.
    #[serde(rename = "resourceTags", skip_serializing_if = "Option::is_none")]
    pub resource_tags: Option<std::collections::HashMap<String, String>>,
    /// Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket
    #[serde(rename = "resourceType", skip_serializing_if = "Option::is_none")]
    pub resource_type: Option<String>,
    /// Optional. Policy violations
    #[serde(rename = "violationInfo", skip_serializing_if = "Option::is_none")]
    pub violation_info: Option<Vec<models::ViolationInfo>>,
}

impl OrgPolicyViolationInfo {
    /// Represents OrgPolicy Violation information.
    pub fn new() -> OrgPolicyViolationInfo {
        OrgPolicyViolationInfo {
            payload: None,
            resource_tags: None,
            resource_type: None,
            violation_info: None,
        }
    }
}
