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;

/// CheckRequest : Request message for the Check method.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CheckRequest {
    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
    pub attributes: Option<Box<models::AttributeContext>>,
    /// Optional. Contains a comma-separated list of flags.
    #[serde(rename = "flags", skip_serializing_if = "Option::is_none")]
    pub flags: Option<String>,
    /// Describes the resources and the policies applied to each resource.
    #[serde(rename = "resources", skip_serializing_if = "Option::is_none")]
    pub resources: Option<Vec<models::ResourceInfo>>,
    /// Specifies the version of the service configuration that should be used to process the request. Must not be empty. Set this field to 'latest' to specify using the latest configuration.
    #[serde(rename = "serviceConfigId", skip_serializing_if = "Option::is_none")]
    pub service_config_id: Option<String>,
}

impl CheckRequest {
    /// Request message for the Check method.
    pub fn new() -> CheckRequest {
        CheckRequest {
            attributes: None,
            flags: None,
            resources: None,
            service_config_id: None,
        }
    }
}
