hanzo_client/models/memory_entry.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 MemoryEntry {
16 /// Actor is the validated user id that last wrote this entry by hand. Empty on an entry an engine produced, and on one written before attribution existed.
17 #[serde(rename = "actor", skip_serializing_if = "Option::is_none")]
18 pub actor: Option<String>,
19 /// Glossary is the glossary VERSION the entry was translated under — the digest version() derives from the terms, so changing a term changes the key and the stale rendering can never be served.
20 #[serde(rename = "glossary_version", skip_serializing_if = "Option::is_none")]
21 pub glossary_version: Option<String>,
22 /// Source is the ORIGINAL string this entry translates. Part of the identity.
23 #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
24 pub source: Option<String>,
25 /// State is the entry's position on the review ladder: machine, suggested, approved or published.
26 #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
27 pub state: Option<String>,
28 /// Target is the target language tag (BCP-47, e.g. \"es\" or \"pt-BR\"). Part of the identity.
29 #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
30 pub target: Option<String>,
31 /// Text is the stored translation. A memory hit returns it verbatim, which is the idempotence contract.
32 #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
33 pub text: Option<String>,
34 /// Tier is the engine tier the entry belongs to, quality or bulk. Part of the identity: the two tiers keep separate renderings of the same source.
35 #[serde(rename = "tier", skip_serializing_if = "Option::is_none")]
36 pub tier: Option<String>,
37 /// UpdatedAt is the unix second the entry last changed.
38 #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
39 pub updated_at: Option<i32>,
40}
41
42impl MemoryEntry {
43 pub fn new() -> MemoryEntry {
44 MemoryEntry {
45 actor: None,
46 glossary_version: None,
47 source: None,
48 state: None,
49 target: None,
50 text: None,
51 tier: None,
52 updated_at: None,
53 }
54 }
55}
56