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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* 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 Declaration {
/// Application is the CD Application name the generator mints: <org>-<name>. It is the join key against /v1/platform/cd.
#[serde(rename = "application", skip_serializing_if = "Option::is_none")]
pub application: Option<String>,
/// Automated is cd.automated: false means the Application reports drift and NOTHING moves. It is off by default for a new file on purpose.
#[serde(rename = "automated", skip_serializing_if = "Option::is_none")]
pub automated: Option<bool>,
/// image.digest — wins over tag
#[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
pub digest: Option<String>,
/// Env is the declared container environment, as the chart's list of {name,value}. It is read back so a re-declare of an identical body is a no-op rather than a refusal — idempotency is what makes a retry safe.
#[serde(rename = "env", skip_serializing_if = "Option::is_none")]
pub env: Option<Vec<models::DeclareEnv>>,
/// ingress.hosts, both shapes flattened
#[serde(rename = "hosts", skip_serializing_if = "Option::is_none")]
pub hosts: Option<Vec<String>>,
/// the Helm release name — the file's basename
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Org is the owner. It is ALSO the values directory and the destination namespace, because those are one value under one name — see the header.
#[serde(rename = "org", skip_serializing_if = "Option::is_none")]
pub org: Option<String>,
/// Path is the file, relative to the repository root.
#[serde(rename = "path", skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Project is the AppProject the sync is admitted under, derived from the directory exactly as the ApplicationSet derives it. It differs from Org for a reserved directory, which syncs under the platform fence.
#[serde(rename = "project", skip_serializing_if = "Option::is_none")]
pub project: Option<String>,
#[serde(rename = "replicas", skip_serializing_if = "Option::is_none")]
pub replicas: Option<i32>,
/// image.repository
#[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
pub repository: Option<String>,
/// image.tag
#[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
pub tag: Option<String>,
}
impl Declaration {
pub fn new() -> Declaration {
Declaration {
application: None,
automated: None,
digest: None,
env: None,
hosts: None,
name: None,
org: None,
path: None,
project: None,
replicas: None,
repository: None,
tag: None,
}
}
}