nominal_api/conjure/objects/ingest/api/
containerized_extractor.rs1#[derive(
3 Debug,
4 Clone,
5 conjure_object::serde::Serialize,
6 conjure_object::serde::Deserialize,
7 PartialEq,
8 Eq,
9 PartialOrd,
10 Ord,
11 Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct ContainerizedExtractor {
17 #[serde(rename = "rid")]
18 rid: super::ContainerizedExtractorRid,
19 #[builder(into)]
20 #[serde(rename = "name")]
21 name: String,
22 #[builder(default, into)]
23 #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
24 description: Option<String>,
25 #[builder(custom(type = super::DockerImageSource, convert = Box::new))]
26 #[serde(rename = "image")]
27 image: Box<super::DockerImageSource>,
28 #[builder(default, into)]
29 #[serde(
30 rename = "containerImageRid",
31 skip_serializing_if = "Option::is_none",
32 default
33 )]
34 container_image_rid: Option<super::super::super::api::rids::ContainerImageRid>,
35 #[builder(default, list(item(type = super::FileExtractionInput)))]
36 #[serde(rename = "inputs", skip_serializing_if = "Vec::is_empty", default)]
37 inputs: Vec<super::FileExtractionInput>,
38 #[builder(default, list(item(type = super::FileExtractionParameter)))]
39 #[serde(rename = "parameters", skip_serializing_if = "Vec::is_empty", default)]
40 parameters: Vec<super::FileExtractionParameter>,
41 #[builder(
42 default,
43 map(
44 key(type = super::super::super::api::PropertyName),
45 value(type = super::super::super::api::PropertyValue)
46 )
47 )]
48 #[serde(
49 rename = "properties",
50 skip_serializing_if = "std::collections::BTreeMap::is_empty",
51 default
52 )]
53 properties: std::collections::BTreeMap<
54 super::super::super::api::PropertyName,
55 super::super::super::api::PropertyValue,
56 >,
57 #[builder(default, set(item(type = super::super::super::api::Label)))]
58 #[serde(
59 rename = "labels",
60 skip_serializing_if = "std::collections::BTreeSet::is_empty",
61 default
62 )]
63 labels: std::collections::BTreeSet<super::super::super::api::Label>,
64 #[serde(rename = "createdAt")]
65 created_at: conjure_object::DateTime<conjure_object::Utc>,
66 #[serde(rename = "isArchived")]
67 is_archived: bool,
68 #[builder(
69 default,
70 custom(
71 type = impl
72 Into<Option<super::TimestampMetadata>>,
73 convert = |v|v.into().map(Box::new)
74 )
75 )]
76 #[serde(
77 rename = "timestampMetadata",
78 skip_serializing_if = "Option::is_none",
79 default
80 )]
81 timestamp_metadata: Option<Box<super::TimestampMetadata>>,
82 #[serde(rename = "outputFileFormat")]
83 output_file_format: super::FileOutputFormat,
84}
85impl ContainerizedExtractor {
86 #[inline]
88 pub fn rid(&self) -> &super::ContainerizedExtractorRid {
89 &self.rid
90 }
91 #[inline]
93 pub fn name(&self) -> &str {
94 &*self.name
95 }
96 #[inline]
98 pub fn description(&self) -> Option<&str> {
99 self.description.as_ref().map(|o| &**o)
100 }
101 #[deprecated(note = "Use containerImageRid for self-hosted images.")]
105 #[inline]
106 pub fn image(&self) -> &super::DockerImageSource {
107 &*self.image
108 }
109 #[inline]
112 pub fn container_image_rid(
113 &self,
114 ) -> Option<&super::super::super::api::rids::ContainerImageRid> {
115 self.container_image_rid.as_ref().map(|o| &*o)
116 }
117 #[inline]
119 pub fn inputs(&self) -> &[super::FileExtractionInput] {
120 &*self.inputs
121 }
122 #[inline]
124 pub fn parameters(&self) -> &[super::FileExtractionParameter] {
125 &*self.parameters
126 }
127 #[inline]
129 pub fn properties(
130 &self,
131 ) -> &std::collections::BTreeMap<
132 super::super::super::api::PropertyName,
133 super::super::super::api::PropertyValue,
134 > {
135 &self.properties
136 }
137 #[inline]
139 pub fn labels(
140 &self,
141 ) -> &std::collections::BTreeSet<super::super::super::api::Label> {
142 &self.labels
143 }
144 #[inline]
146 pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
147 self.created_at
148 }
149 #[inline]
151 pub fn is_archived(&self) -> bool {
152 self.is_archived
153 }
154 #[inline]
157 pub fn timestamp_metadata(&self) -> Option<&super::TimestampMetadata> {
158 self.timestamp_metadata.as_ref().map(|o| &**o)
159 }
160 #[inline]
162 pub fn output_file_format(&self) -> &super::FileOutputFormat {
163 &self.output_file_format
164 }
165}