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;
/// Attributes : A set of attributes, each in the format `[KEY]:[VALUE]`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Attributes {
/// The set of attributes. Each attribute's key can be up to 128 bytes long. The value can be a string up to 256 bytes, a signed 64-bit integer, or the Boolean values `true` and `false`. For example: \"/instance_id\": \"my-instance\" \"/http/user_agent\": \"\" \"/http/request_bytes\": 300 \"abc.com/myattribute\": true
#[serde(rename = "attributeMap", skip_serializing_if = "Option::is_none")]
pub attribute_map: Option<std::collections::HashMap<String, models::AttributeValue>>,
/// The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0 then all attributes are valid.
#[serde(
rename = "droppedAttributesCount",
skip_serializing_if = "Option::is_none"
)]
pub dropped_attributes_count: Option<i32>,
}
impl Attributes {
/// A set of attributes, each in the format `[KEY]:[VALUE]`.
pub fn new() -> Attributes {
Attributes {
attribute_map: None,
dropped_attributes_count: None,
}
}
}