use serde::{Deserialize, Serialize}; /*
                                      * Compute Engine API
                                      *
                                      * Creates and runs virtual machines on Google Cloud Platform.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

/// Quota : A quotas entry.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Quota {
    /// [Output Only] Quota limit for this metric.
    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
    pub limit: Option<f64>,
    /// [Output Only] Name of the quota metric.
    #[serde(rename = "metric", skip_serializing_if = "Option::is_none")]
    pub metric: Option<Metric>,
    /// [Output Only] Owning resource. This is the resource on which this quota is applied.
    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
    pub owner: Option<String>,
    /// [Output Only] Current usage of this metric.
    #[serde(rename = "usage", skip_serializing_if = "Option::is_none")]
    pub usage: Option<f64>,
}

impl Quota {
    /// A quotas entry.
    pub fn new() -> Quota {
        Quota {
            limit: None,
            metric: None,
            owner: None,
            usage: None,
        }
    }
}

/// [Output Only] Name of the quota metric.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Metric {
    #[serde(rename = "A2_CPUS")]
    A2Cpus,
    #[serde(rename = "AFFINITY_GROUPS")]
    AffinityGroups,
    #[serde(rename = "AUTOSCALERS")]
    Autoscalers,
    #[serde(rename = "BACKEND_BUCKETS")]
    BackendBuckets,
    #[serde(rename = "BACKEND_SERVICES")]
    BackendServices,
    #[serde(rename = "C2D_CPUS")]
    C2DCpus,
    #[serde(rename = "C2_CPUS")]
    C2Cpus,
    #[serde(rename = "C3_CPUS")]
    C3Cpus,
    #[serde(rename = "COMMITMENTS")]
    Commitments,
    #[serde(rename = "COMMITTED_A2_CPUS")]
    CommittedA2Cpus,
    #[serde(rename = "COMMITTED_C2D_CPUS")]
    CommittedC2DCpus,
    #[serde(rename = "COMMITTED_C2_CPUS")]
    CommittedC2Cpus,
    #[serde(rename = "COMMITTED_C3_CPUS")]
    CommittedC3Cpus,
    #[serde(rename = "COMMITTED_CPUS")]
    CommittedCpus,
    #[serde(rename = "COMMITTED_E2_CPUS")]
    CommittedE2Cpus,
    #[serde(rename = "COMMITTED_LICENSES")]
    CommittedLicenses,
    #[serde(rename = "COMMITTED_LOCAL_SSD_TOTAL_GB")]
    CommittedLocalSsdTotalGb,
    #[serde(rename = "COMMITTED_M3_CPUS")]
    CommittedM3Cpus,
    #[serde(rename = "COMMITTED_MEMORY_OPTIMIZED_CPUS")]
    CommittedMemoryOptimizedCpus,
    #[serde(rename = "COMMITTED_N2A_CPUS")]
    CommittedN2ACpus,
    #[serde(rename = "COMMITTED_N2D_CPUS")]
    CommittedN2DCpus,
    #[serde(rename = "COMMITTED_N2_CPUS")]
    CommittedN2Cpus,
    #[serde(rename = "COMMITTED_NVIDIA_A100_80GB_GPUS")]
    CommittedNvidiaA10080GbGpus,
    #[serde(rename = "COMMITTED_NVIDIA_A100_GPUS")]
    CommittedNvidiaA100Gpus,
    #[serde(rename = "COMMITTED_NVIDIA_K80_GPUS")]
    CommittedNvidiaK80Gpus,
    #[serde(rename = "COMMITTED_NVIDIA_L4_GPUS")]
    CommittedNvidiaL4Gpus,
    #[serde(rename = "COMMITTED_NVIDIA_P100_GPUS")]
    CommittedNvidiaP100Gpus,
    #[serde(rename = "COMMITTED_NVIDIA_P4_GPUS")]
    CommittedNvidiaP4Gpus,
    #[serde(rename = "COMMITTED_NVIDIA_T4_GPUS")]
    CommittedNvidiaT4Gpus,
    #[serde(rename = "COMMITTED_NVIDIA_V100_GPUS")]
    CommittedNvidiaV100Gpus,
    #[serde(rename = "COMMITTED_T2A_CPUS")]
    CommittedT2ACpus,
    #[serde(rename = "COMMITTED_T2D_CPUS")]
    CommittedT2DCpus,
    #[serde(rename = "CPUS")]
    Cpus,
    #[serde(rename = "CPUS_ALL_REGIONS")]
    CpusAllRegions,
    #[serde(rename = "DISKS_TOTAL_GB")]
    DisksTotalGb,
    #[serde(rename = "E2_CPUS")]
    E2Cpus,
    #[serde(rename = "EXTERNAL_MANAGED_FORWARDING_RULES")]
    ExternalManagedForwardingRules,
    #[serde(rename = "EXTERNAL_NETWORK_LB_FORWARDING_RULES")]
    ExternalNetworkLbForwardingRules,
    #[serde(rename = "EXTERNAL_PROTOCOL_FORWARDING_RULES")]
    ExternalProtocolForwardingRules,
    #[serde(rename = "EXTERNAL_VPN_GATEWAYS")]
    ExternalVpnGateways,
    #[serde(rename = "FIREWALLS")]
    Firewalls,
    #[serde(rename = "FORWARDING_RULES")]
    ForwardingRules,
    #[serde(rename = "GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES")]
    GlobalExternalManagedBackendServices,
    #[serde(rename = "GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES")]
    GlobalExternalManagedForwardingRules,
    #[serde(rename = "GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES")]
    GlobalExternalProxyLbBackendServices,
    #[serde(rename = "GLOBAL_INTERNAL_ADDRESSES")]
    GlobalInternalAddresses,
    #[serde(rename = "GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES")]
    GlobalInternalManagedBackendServices,
    #[serde(rename = "GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES")]
    GlobalInternalTrafficDirectorBackendServices,
    #[serde(rename = "GPUS_ALL_REGIONS")]
    GpusAllRegions,
    #[serde(rename = "HEALTH_CHECKS")]
    HealthChecks,
    #[serde(rename = "IMAGES")]
    Images,
    #[serde(rename = "INSTANCES")]
    Instances,
    #[serde(rename = "INSTANCE_GROUPS")]
    InstanceGroups,
    #[serde(rename = "INSTANCE_GROUP_MANAGERS")]
    InstanceGroupManagers,
    #[serde(rename = "INSTANCE_TEMPLATES")]
    InstanceTemplates,
    #[serde(rename = "INTERCONNECTS")]
    Interconnects,
    #[serde(rename = "INTERCONNECT_ATTACHMENTS_PER_REGION")]
    InterconnectAttachmentsPerRegion,
    #[serde(rename = "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS")]
    InterconnectAttachmentsTotalMbps,
    #[serde(rename = "INTERCONNECT_TOTAL_GBPS")]
    InterconnectTotalGbps,
    #[serde(rename = "INTERNAL_ADDRESSES")]
    InternalAddresses,
    #[serde(rename = "INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES")]
    InternalTrafficDirectorForwardingRules,
    #[serde(rename = "IN_PLACE_SNAPSHOTS")]
    InPlaceSnapshots,
    #[serde(rename = "IN_USE_ADDRESSES")]
    InUseAddresses,
    #[serde(rename = "IN_USE_BACKUP_SCHEDULES")]
    InUseBackupSchedules,
    #[serde(rename = "IN_USE_SNAPSHOT_SCHEDULES")]
    InUseSnapshotSchedules,
    #[serde(rename = "LOCAL_SSD_TOTAL_GB")]
    LocalSsdTotalGb,
    #[serde(rename = "M1_CPUS")]
    M1Cpus,
    #[serde(rename = "M2_CPUS")]
    M2Cpus,
    #[serde(rename = "M3_CPUS")]
    M3Cpus,
    #[serde(rename = "MACHINE_IMAGES")]
    MachineImages,
    #[serde(rename = "N2A_CPUS")]
    N2ACpus,
    #[serde(rename = "N2D_CPUS")]
    N2DCpus,
    #[serde(rename = "N2_CPUS")]
    N2Cpus,
    #[serde(rename = "NETWORKS")]
    Networks,
    #[serde(rename = "NETWORK_ATTACHMENTS")]
    NetworkAttachments,
    #[serde(rename = "NETWORK_ENDPOINT_GROUPS")]
    NetworkEndpointGroups,
    #[serde(rename = "NETWORK_FIREWALL_POLICIES")]
    NetworkFirewallPolicies,
    #[serde(rename = "NET_LB_SECURITY_POLICIES_PER_REGION")]
    NetLbSecurityPoliciesPerRegion,
    #[serde(rename = "NET_LB_SECURITY_POLICY_RULES_PER_REGION")]
    NetLbSecurityPolicyRulesPerRegion,
    #[serde(rename = "NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION")]
    NetLbSecurityPolicyRuleAttributesPerRegion,
    #[serde(rename = "NODE_GROUPS")]
    NodeGroups,
    #[serde(rename = "NODE_TEMPLATES")]
    NodeTemplates,
    #[serde(rename = "NVIDIA_A100_80GB_GPUS")]
    NvidiaA10080GbGpus,
    #[serde(rename = "NVIDIA_A100_GPUS")]
    NvidiaA100Gpus,
    #[serde(rename = "NVIDIA_K80_GPUS")]
    NvidiaK80Gpus,
    #[serde(rename = "NVIDIA_L4_GPUS")]
    NvidiaL4Gpus,
    #[serde(rename = "NVIDIA_P100_GPUS")]
    NvidiaP100Gpus,
    #[serde(rename = "NVIDIA_P100_VWS_GPUS")]
    NvidiaP100VwsGpus,
    #[serde(rename = "NVIDIA_P4_GPUS")]
    NvidiaP4Gpus,
    #[serde(rename = "NVIDIA_P4_VWS_GPUS")]
    NvidiaP4VwsGpus,
    #[serde(rename = "NVIDIA_T4_GPUS")]
    NvidiaT4Gpus,
    #[serde(rename = "NVIDIA_T4_VWS_GPUS")]
    NvidiaT4VwsGpus,
    #[serde(rename = "NVIDIA_V100_GPUS")]
    NvidiaV100Gpus,
    #[serde(rename = "PACKET_MIRRORINGS")]
    PacketMirrorings,
    #[serde(rename = "PD_EXTREME_TOTAL_PROVISIONED_IOPS")]
    PdExtremeTotalProvisionedIops,
    #[serde(rename = "PREEMPTIBLE_CPUS")]
    PreemptibleCpus,
    #[serde(rename = "PREEMPTIBLE_LOCAL_SSD_GB")]
    PreemptibleLocalSsdGb,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_A100_80GB_GPUS")]
    PreemptibleNvidiaA10080GbGpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_A100_GPUS")]
    PreemptibleNvidiaA100Gpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_K80_GPUS")]
    PreemptibleNvidiaK80Gpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_L4_GPUS")]
    PreemptibleNvidiaL4Gpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_P100_GPUS")]
    PreemptibleNvidiaP100Gpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS")]
    PreemptibleNvidiaP100VwsGpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_P4_GPUS")]
    PreemptibleNvidiaP4Gpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS")]
    PreemptibleNvidiaP4VwsGpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_T4_GPUS")]
    PreemptibleNvidiaT4Gpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS")]
    PreemptibleNvidiaT4VwsGpus,
    #[serde(rename = "PREEMPTIBLE_NVIDIA_V100_GPUS")]
    PreemptibleNvidiaV100Gpus,
    #[serde(rename = "PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK")]
    PscIlbConsumerForwardingRulesPerProducerNetwork,
    #[serde(rename = "PSC_INTERNAL_LB_FORWARDING_RULES")]
    PscInternalLbForwardingRules,
    #[serde(rename = "PUBLIC_ADVERTISED_PREFIXES")]
    PublicAdvertisedPrefixes,
    #[serde(rename = "PUBLIC_DELEGATED_PREFIXES")]
    PublicDelegatedPrefixes,
    #[serde(rename = "REGIONAL_AUTOSCALERS")]
    RegionalAutoscalers,
    #[serde(rename = "REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES")]
    RegionalExternalManagedBackendServices,
    #[serde(rename = "REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES")]
    RegionalExternalNetworkLbBackendServices,
    #[serde(rename = "REGIONAL_INSTANCE_GROUP_MANAGERS")]
    RegionalInstanceGroupManagers,
    #[serde(rename = "REGIONAL_INTERNAL_LB_BACKEND_SERVICES")]
    RegionalInternalLbBackendServices,
    #[serde(rename = "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES")]
    RegionalInternalManagedBackendServices,
    #[serde(rename = "RESERVATIONS")]
    Reservations,
    #[serde(rename = "RESOURCE_POLICIES")]
    ResourcePolicies,
    #[serde(rename = "ROUTERS")]
    Routers,
    #[serde(rename = "ROUTES")]
    Routes,
    #[serde(rename = "SECURITY_POLICIES")]
    SecurityPolicies,
    #[serde(rename = "SECURITY_POLICIES_PER_REGION")]
    SecurityPoliciesPerRegion,
    #[serde(rename = "SECURITY_POLICY_ADVANCED_RULES_PER_REGION")]
    SecurityPolicyAdvancedRulesPerRegion,
    #[serde(rename = "SECURITY_POLICY_CEVAL_RULES")]
    SecurityPolicyCevalRules,
    #[serde(rename = "SECURITY_POLICY_RULES")]
    SecurityPolicyRules,
    #[serde(rename = "SECURITY_POLICY_RULES_PER_REGION")]
    SecurityPolicyRulesPerRegion,
    #[serde(rename = "SERVICE_ATTACHMENTS")]
    ServiceAttachments,
    #[serde(rename = "SNAPSHOTS")]
    Snapshots,
    #[serde(rename = "SSD_TOTAL_GB")]
    SsdTotalGb,
    #[serde(rename = "SSL_CERTIFICATES")]
    SslCertificates,
    #[serde(rename = "STATIC_ADDRESSES")]
    StaticAddresses,
    #[serde(rename = "STATIC_BYOIP_ADDRESSES")]
    StaticByoipAddresses,
    #[serde(rename = "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES")]
    StaticExternalIpv6AddressRanges,
    #[serde(rename = "SUBNETWORKS")]
    Subnetworks,
    #[serde(rename = "T2A_CPUS")]
    T2ACpus,
    #[serde(rename = "T2D_CPUS")]
    T2DCpus,
    #[serde(rename = "TARGET_HTTPS_PROXIES")]
    TargetHttpsProxies,
    #[serde(rename = "TARGET_HTTP_PROXIES")]
    TargetHttpProxies,
    #[serde(rename = "TARGET_INSTANCES")]
    TargetInstances,
    #[serde(rename = "TARGET_POOLS")]
    TargetPools,
    #[serde(rename = "TARGET_SSL_PROXIES")]
    TargetSslProxies,
    #[serde(rename = "TARGET_TCP_PROXIES")]
    TargetTcpProxies,
    #[serde(rename = "TARGET_VPN_GATEWAYS")]
    TargetVpnGateways,
    #[serde(rename = "URL_MAPS")]
    UrlMaps,
    #[serde(rename = "VPN_GATEWAYS")]
    VpnGateways,
    #[serde(rename = "VPN_TUNNELS")]
    VpnTunnels,
    #[serde(rename = "XPN_SERVICE_PROJECTS")]
    XpnServiceProjects,
}

impl Default for Metric {
    fn default() -> Metric {
        Self::A2Cpus
    }
}
