nominal_api_conjure/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 #[builder(default, list(item(type = super::ExitCodeMapping)))]
85 #[serde(rename = "exitCodeMappings", skip_serializing_if = "Vec::is_empty", default)]
86 exit_code_mappings: Vec<super::ExitCodeMapping>,
87}
88impl ContainerizedExtractor {
89 #[inline]
91 pub fn rid(&self) -> &super::ContainerizedExtractorRid {
92 &self.rid
93 }
94 #[inline]
96 pub fn name(&self) -> &str {
97 &*self.name
98 }
99 #[inline]
101 pub fn description(&self) -> Option<&str> {
102 self.description.as_ref().map(|o| &**o)
103 }
104 #[deprecated(note = "Use containerImageRid for self-hosted images.")]
108 #[inline]
109 pub fn image(&self) -> &super::DockerImageSource {
110 &*self.image
111 }
112 #[inline]
115 pub fn container_image_rid(
116 &self,
117 ) -> Option<&super::super::super::api::rids::ContainerImageRid> {
118 self.container_image_rid.as_ref().map(|o| &*o)
119 }
120 #[inline]
122 pub fn inputs(&self) -> &[super::FileExtractionInput] {
123 &*self.inputs
124 }
125 #[inline]
127 pub fn parameters(&self) -> &[super::FileExtractionParameter] {
128 &*self.parameters
129 }
130 #[inline]
132 pub fn properties(
133 &self,
134 ) -> &std::collections::BTreeMap<
135 super::super::super::api::PropertyName,
136 super::super::super::api::PropertyValue,
137 > {
138 &self.properties
139 }
140 #[inline]
142 pub fn labels(
143 &self,
144 ) -> &std::collections::BTreeSet<super::super::super::api::Label> {
145 &self.labels
146 }
147 #[inline]
149 pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
150 self.created_at
151 }
152 #[inline]
154 pub fn is_archived(&self) -> bool {
155 self.is_archived
156 }
157 #[inline]
160 pub fn timestamp_metadata(&self) -> Option<&super::TimestampMetadata> {
161 self.timestamp_metadata.as_ref().map(|o| &**o)
162 }
163 #[inline]
165 pub fn output_file_format(&self) -> &super::FileOutputFormat {
166 &self.output_file_format
167 }
168 #[inline]
172 pub fn exit_code_mappings(&self) -> &[super::ExitCodeMapping] {
173 &*self.exit_code_mappings
174 }
175}