github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/stats_event.rs (about)

     1  /*
     2   * lakeFS API
     3   *
     4   * lakeFS HTTP API
     5   *
     6   * The version of the OpenAPI document: 1.0.0
     7   * Contact: services@treeverse.io
     8   * Generated by: https://openapi-generator.tech
     9   */
    10  
    11  use crate::models;
    12  
    13  #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
    14  pub struct StatsEvent {
    15      /// stats event class (e.g. \"s3_gateway\", \"openapi_request\", \"experimental-feature\", \"ui-event\")
    16      #[serde(rename = "class")]
    17      pub class: String,
    18      /// stats event name (e.g. \"put_object\", \"create_repository\", \"<experimental-feature-name>\")
    19      #[serde(rename = "name")]
    20      pub name: String,
    21      /// number of events of the class and name
    22      #[serde(rename = "count")]
    23      pub count: i32,
    24  }
    25  
    26  impl StatsEvent {
    27      pub fn new(class: String, name: String, count: i32) -> StatsEvent {
    28          StatsEvent {
    29              class,
    30              name,
    31              count,
    32          }
    33      }
    34  }
    35