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;

/// QuotaProperties : Represents the properties needed for quota operations.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct QuotaProperties {
    /// Quota mode for this operation.
    #[serde(rename = "quotaMode", skip_serializing_if = "Option::is_none")]
    pub quota_mode: Option<QuotaMode>,
}

impl QuotaProperties {
    /// Represents the properties needed for quota operations.
    pub fn new() -> QuotaProperties {
        QuotaProperties { quota_mode: None }
    }
}
/// Quota mode for this operation.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum QuotaMode {
    #[serde(rename = "ACQUIRE")]
    Acquire,
    #[serde(rename = "ACQUIRE_BEST_EFFORT")]
    AcquireBestEffort,
    #[serde(rename = "CHECK")]
    Check,
}

impl Default for QuotaMode {
    fn default() -> QuotaMode {
        Self::Acquire
    }
}
