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<conjure_object::ResourceIdentifier>,
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(default, map(key(type = String, into), value(type = String, into)))]
42 #[serde(
43 rename = "properties",
44 skip_serializing_if = "std::collections::BTreeMap::is_empty",
45 default
46 )]
47 properties: std::collections::BTreeMap<String, String>,
48 #[builder(default, set(item(type = String, into)))]
49 #[serde(
50 rename = "labels",
51 skip_serializing_if = "std::collections::BTreeSet::is_empty",
52 default
53 )]
54 labels: std::collections::BTreeSet<String>,
55 #[serde(rename = "createdAt")]
56 created_at: conjure_object::DateTime<conjure_object::Utc>,
57 #[serde(rename = "isArchived")]
58 is_archived: bool,
59 #[builder(
60 default,
61 custom(
62 type = impl
63 Into<Option<super::TimestampMetadata>>,
64 convert = |v|v.into().map(Box::new)
65 )
66 )]
67 #[serde(
68 rename = "timestampMetadata",
69 skip_serializing_if = "Option::is_none",
70 default
71 )]
72 timestamp_metadata: Option<Box<super::TimestampMetadata>>,
73 #[serde(rename = "outputFileFormat")]
74 output_file_format: super::FileOutputFormat,
75}
76impl ContainerizedExtractor {
77 #[inline]
79 pub fn rid(&self) -> &super::ContainerizedExtractorRid {
80 &self.rid
81 }
82 #[inline]
84 pub fn name(&self) -> &str {
85 &*self.name
86 }
87 #[inline]
89 pub fn description(&self) -> Option<&str> {
90 self.description.as_ref().map(|o| &**o)
91 }
92 #[deprecated(note = "Use containerImageRid for self-hosted images.")]
96 #[inline]
97 pub fn image(&self) -> &super::DockerImageSource {
98 &*self.image
99 }
100 #[inline]
103 pub fn container_image_rid(&self) -> Option<&conjure_object::ResourceIdentifier> {
104 self.container_image_rid.as_ref().map(|o| &*o)
105 }
106 #[inline]
108 pub fn inputs(&self) -> &[super::FileExtractionInput] {
109 &*self.inputs
110 }
111 #[inline]
113 pub fn parameters(&self) -> &[super::FileExtractionParameter] {
114 &*self.parameters
115 }
116 #[inline]
118 pub fn properties(&self) -> &std::collections::BTreeMap<String, String> {
119 &self.properties
120 }
121 #[inline]
123 pub fn labels(&self) -> &std::collections::BTreeSet<String> {
124 &self.labels
125 }
126 #[inline]
128 pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
129 self.created_at
130 }
131 #[inline]
133 pub fn is_archived(&self) -> bool {
134 self.is_archived
135 }
136 #[inline]
139 pub fn timestamp_metadata(&self) -> Option<&super::TimestampMetadata> {
140 self.timestamp_metadata.as_ref().map(|o| &**o)
141 }
142 #[inline]
144 pub fn output_file_format(&self) -> &super::FileOutputFormat {
145 &self.output_file_format
146 }
147}