1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Hanzo Cloud API
*
* 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/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MemoryEntry {
/// 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.
#[serde(rename = "actor", skip_serializing_if = "Option::is_none")]
pub actor: Option<String>,
/// 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.
#[serde(rename = "glossary_version", skip_serializing_if = "Option::is_none")]
pub glossary_version: Option<String>,
/// Source is the ORIGINAL string this entry translates. Part of the identity.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
/// State is the entry's position on the review ladder: machine, suggested, approved or published.
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
/// Target is the target language tag (BCP-47, e.g. \"es\" or \"pt-BR\"). Part of the identity.
#[serde(rename = "target", skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
/// Text is the stored translation. A memory hit returns it verbatim, which is the idempotence contract.
#[serde(rename = "text", skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
/// 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.
#[serde(rename = "tier", skip_serializing_if = "Option::is_none")]
pub tier: Option<String>,
/// UpdatedAt is the unix second the entry last changed.
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<i32>,
}
impl MemoryEntry {
pub fn new() -> MemoryEntry {
MemoryEntry {
actor: None,
glossary_version: None,
source: None,
state: None,
target: None,
text: None,
tier: None,
updated_at: None,
}
}
}