hanzo_client/models/def_row.rs
1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DefRow {
16 #[serde(rename = "definition", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
17 pub definition: Option<Option<serde_json::Value>>,
18 /// Key is the flag's primary key in the caller's (org, project) store, and the name evaluation looks it up by. On a write it is taken from the URL, never from the body: the stored document's own \"key\" is forced to match.
19 #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
20 pub key: Option<String>,
21 /// UpdatedAt is when the definition was last written, RFC 3339 UTC.
22 #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
23 pub updated_at: Option<String>,
24 /// UpdatedBy is the email of the principal who last wrote it. Empty when the write came from an in-process composer (an experiment registering its own assignment flag) rather than from a signed-in person.
25 #[serde(rename = "updated_by", skip_serializing_if = "Option::is_none")]
26 pub updated_by: Option<String>,
27 /// Version is 1 when the key was created and rises by one on every overwrite. It counts writes, not content changes: re-storing an identical document bumps it.
28 #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
29 pub version: Option<i32>,
30}
31
32impl DefRow {
33 pub fn new() -> DefRow {
34 DefRow {
35 definition: None,
36 key: None,
37 updated_at: None,
38 updated_by: None,
39 version: None,
40 }
41 }
42}
43