nominal_api/conjure/objects/secrets/api/
decrypted_secret.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 PartialEq,
7 Eq,
8 PartialOrd,
9 Ord,
10 Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct DecryptedSecret {
16 #[serde(rename = "rid")]
17 rid: super::SecretRid,
18 #[builder(into)]
19 #[serde(rename = "name")]
20 name: String,
21 #[builder(into)]
22 #[serde(rename = "description")]
23 description: String,
24 #[builder(into)]
25 #[serde(rename = "decryptedValue")]
26 decrypted_value: String,
27 #[serde(rename = "createdBy")]
28 created_by: conjure_object::ResourceIdentifier,
29 #[builder(
30 default,
31 map(
32 key(type = super::super::super::api::PropertyName),
33 value(type = super::super::super::api::PropertyValue)
34 )
35 )]
36 #[serde(
37 rename = "properties",
38 skip_serializing_if = "std::collections::BTreeMap::is_empty",
39 default
40 )]
41 properties: std::collections::BTreeMap<
42 super::super::super::api::PropertyName,
43 super::super::super::api::PropertyValue,
44 >,
45 #[builder(default, set(item(type = super::super::super::api::Label)))]
46 #[serde(
47 rename = "labels",
48 skip_serializing_if = "std::collections::BTreeSet::is_empty",
49 default
50 )]
51 labels: std::collections::BTreeSet<super::super::super::api::Label>,
52 #[serde(rename = "createdAt")]
53 created_at: conjure_object::DateTime<conjure_object::Utc>,
54 #[serde(rename = "isArchived")]
55 is_archived: bool,
56}
57impl DecryptedSecret {
58 #[inline]
59 pub fn rid(&self) -> &super::SecretRid {
60 &self.rid
61 }
62 #[inline]
63 pub fn name(&self) -> &str {
64 &*self.name
65 }
66 #[inline]
67 pub fn description(&self) -> &str {
68 &*self.description
69 }
70 #[inline]
71 pub fn decrypted_value(&self) -> &str {
72 &*self.decrypted_value
73 }
74 #[inline]
75 pub fn created_by(&self) -> &conjure_object::ResourceIdentifier {
76 &self.created_by
77 }
78 #[inline]
79 pub fn properties(
80 &self,
81 ) -> &std::collections::BTreeMap<
82 super::super::super::api::PropertyName,
83 super::super::super::api::PropertyValue,
84 > {
85 &self.properties
86 }
87 #[inline]
88 pub fn labels(
89 &self,
90 ) -> &std::collections::BTreeSet<super::super::super::api::Label> {
91 &self.labels
92 }
93 #[inline]
94 pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
95 self.created_at
96 }
97 #[inline]
98 pub fn is_archived(&self) -> bool {
99 self.is_archived
100 }
101}