nifi-rust-client 0.4.0

Apache NiFi REST API client library
Documentation
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
// @generated — do not edit; run `cargo run -p nifi-openapi-gen`

#![allow(dead_code, private_interfaces, unused_imports)]
use super::*;
use serde::{Deserialize, Serialize};
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ConnectionsEntity {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub connections: Option<Vec<ConnectionEntity>>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CopyRequestEntity {
    /// The ids of the connections to be copied.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub connections: Option<Vec<String>>,
    /// The ids of the funnels to be copied.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub funnels: Option<Vec<String>>,
    /// The ids of the input ports to be copied.
    #[serde(rename = "inputPorts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_ports: Option<Vec<String>>,
    /// The ids of the labels to be copied.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
    /// The ids of the output ports to be copied.
    #[serde(rename = "outputPorts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_ports: Option<Vec<String>>,
    /// The ids of the process groups to be copied.
    #[serde(rename = "processGroups")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub process_groups: Option<Vec<String>>,
    /// The ids of the processors to be copied.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub processors: Option<Vec<String>>,
    /// The ids of the remote process groups to be copied.
    #[serde(rename = "remoteProcessGroups")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub remote_process_groups: Option<Vec<String>>,
}
/// The response from copying.
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CopyResponseEntity {
    /// The connections being copied.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub connections: Option<Vec<VersionedConnection>>,
    /// The external controller service references.
    #[serde(rename = "externalControllerServiceReferences")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub external_controller_service_references:
        Option<std::collections::HashMap<String, Option<ExternalControllerServiceReference>>>,
    /// The funnels being copied.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub funnels: Option<Vec<VersionedFunnel>>,
    /// The id for this copy action.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The input ports being copied.
    #[serde(rename = "inputPorts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_ports: Option<Vec<VersionedPort>>,
    /// The labels being copied.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<VersionedLabel>>,
    /// The output ports being copied.
    #[serde(rename = "outputPorts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_ports: Option<Vec<VersionedPort>>,
    /// The referenced parameter contexts.
    #[serde(rename = "parameterContexts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_contexts:
        Option<std::collections::HashMap<String, Option<VersionedParameterContext>>>,
    /// The referenced parameter providers.
    #[serde(rename = "parameterProviders")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_providers:
        Option<std::collections::HashMap<String, Option<ParameterProviderReference>>>,
    /// The process groups being copied.
    #[serde(rename = "processGroups")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub process_groups: Option<Vec<VersionedProcessGroup>>,
    /// The processors being copied.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub processors: Option<Vec<VersionedProcessor>>,
    /// The remote process groups being copied.
    #[serde(rename = "remoteProcessGroups")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub remote_process_groups: Option<Vec<VersionedRemoteProcessGroup>>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CopySnippetRequestEntity {
    /// Acknowledges that this node is disconnected to allow for mutable requests to proceed.
    #[serde(rename = "disconnectedNodeAcknowledged")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub disconnected_node_acknowledged: Option<bool>,
    /// The x coordinate of the origin of the bounding box where the new components will be placed.
    #[serde(rename = "originX")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub origin_x: Option<f64>,
    /// The y coordinate of the origin of the bounding box where the new components will be placed.
    #[serde(rename = "originY")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub origin_y: Option<f64>,
    /// The identifier of the snippet.
    #[serde(rename = "snippetId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub snippet_id: Option<String>,
}
/// Flow containing the components that were created as part of this paste action.
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct FlowDto {
    /// The connections in this flow.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub connections: Option<Vec<ConnectionEntity>>,
    /// The funnels in this flow.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub funnels: Option<Vec<FunnelEntity>>,
    /// The input ports in this flow.
    #[serde(rename = "inputPorts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_ports: Option<Vec<PortEntity>>,
    /// The labels in this flow.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<LabelEntity>>,
    /// The output ports in this flow.
    #[serde(rename = "outputPorts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_ports: Option<Vec<PortEntity>>,
    /// The process groups in this flow.
    #[serde(rename = "processGroups")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub process_groups: Option<Vec<ProcessGroupEntity>>,
    /// The processors in this flow.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub processors: Option<Vec<ProcessorEntity>>,
    /// The remote process groups in this flow.
    #[serde(rename = "remoteProcessGroups")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub remote_process_groups: Option<Vec<RemoteProcessGroupEntity>>,
}
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct FlowEntity {
    pub flow: Option<FlowDto>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct FunnelsEntity {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub funnels: Option<Vec<FunnelEntity>>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct InputPortsEntity {
    #[serde(rename = "inputPorts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_ports: Option<Vec<PortEntity>>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct LabelsEntity {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<LabelEntity>>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct OutputPortsEntity {
    #[serde(rename = "outputPorts")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_ports: Option<Vec<PortEntity>>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
pub enum ParameterContextHandlingStrategy {
    #[serde(rename = "KEEP_EXISTING")]
    KeepExisting,
    #[serde(rename = "REPLACE")]
    Replace,
}
impl std::fmt::Display for ParameterContextHandlingStrategy {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            ParameterContextHandlingStrategy::KeepExisting => write!(f, "KEEP_EXISTING"),
            ParameterContextHandlingStrategy::Replace => write!(f, "REPLACE"),
        }
    }
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct PasteRequestEntity {
    #[serde(rename = "copyResponse")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub copy_response: Option<CopyResponseEntity>,
    #[serde(rename = "disconnectedNodeAcknowledged")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub disconnected_node_acknowledged: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub revision: Option<RevisionDto>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct PasteResponseEntity {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub flow: Option<FlowDto>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub revision: Option<RevisionDto>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ProcessGroupEntity {
    /// The number of active remote ports in the process group.
    #[serde(rename = "activeRemotePortCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub active_remote_port_count: Option<i32>,
    /// The bulletins for this component.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub bulletins: Option<Vec<BulletinEntity>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub component: Option<ProcessGroupDto>,
    /// The number of disabled components in the process group.
    #[serde(rename = "disabledCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub disabled_count: Option<i32>,
    /// Acknowledges that this node is disconnected to allow for mutable requests to proceed.
    #[serde(rename = "disconnectedNodeAcknowledged")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub disconnected_node_acknowledged: Option<bool>,
    /// The id of the component.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The number of inactive remote ports in the process group.
    #[serde(rename = "inactiveRemotePortCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub inactive_remote_port_count: Option<i32>,
    /// The number of input ports in the process group.
    #[serde(rename = "inputPortCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_port_count: Option<i32>,
    /// The number of invalid components in the process group.
    #[serde(rename = "invalidCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub invalid_count: Option<i32>,
    /// The number of local input ports in the process group.
    #[serde(rename = "localInputPortCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub local_input_port_count: Option<i32>,
    /// The number of local output ports in the process group.
    #[serde(rename = "localOutputPortCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub local_output_port_count: Option<i32>,
    /// The number of locally modified and stale versioned process groups in the process group.
    #[serde(rename = "locallyModifiedAndStaleCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub locally_modified_and_stale_count: Option<i32>,
    /// The number of locally modified versioned process groups in the process group.
    #[serde(rename = "locallyModifiedCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub locally_modified_count: Option<i32>,
    /// The number of output ports in the process group.
    #[serde(rename = "outputPortCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_port_count: Option<i32>,
    #[serde(rename = "parameterContext")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_context: Option<ParameterContextReferenceEntity>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub permissions: Option<PermissionsDto>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub position: Option<PositionDto>,
    /// Determines the process group update strategy
    #[serde(rename = "processGroupUpdateStrategy")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub process_group_update_strategy: Option<String>,
    /// The number of public input ports in the process group.
    #[serde(rename = "publicInputPortCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub public_input_port_count: Option<i32>,
    /// The number of public output ports in the process group.
    #[serde(rename = "publicOutputPortCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub public_output_port_count: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub revision: Option<RevisionDto>,
    /// The number of running components in this process group.
    #[serde(rename = "runningCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub running_count: Option<i32>,
    /// The number of stale versioned process groups in the process group.
    #[serde(rename = "staleCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stale_count: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<ProcessGroupStatusDto>,
    /// The number of stopped components in the process group.
    #[serde(rename = "stoppedCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stopped_count: Option<i32>,
    /// The number of versioned process groups in the process group that are unable to sync to a registry.
    #[serde(rename = "syncFailureCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub sync_failure_count: Option<i32>,
    /// The number of up to date versioned process groups in the process group.
    #[serde(rename = "upToDateCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub up_to_date_count: Option<i32>,
    /// The URI for futures requests to the component.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub uri: Option<String>,
    #[serde(rename = "versionedFlowSnapshot")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub versioned_flow_snapshot: Option<RegisteredFlowSnapshot>,
    /// The current state of the Process Group, as it relates to the Versioned Flow
    #[serde(rename = "versionedFlowState")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub versioned_flow_state: Option<String>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ProcessGroupImportEntity {
    /// Acknowledges that this node is disconnected to allow for mutable requests to proceed.
    #[serde(rename = "disconnectedNodeAcknowledged")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub disconnected_node_acknowledged: Option<bool>,
    #[serde(rename = "processGroupRevision")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub process_group_revision: Option<RevisionDto>,
    #[serde(rename = "versionedFlowSnapshot")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub versioned_flow_snapshot: Option<RegisteredFlowSnapshot>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ProcessGroupReplaceRequestEntity {
    #[serde(rename = "processGroupRevision")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub process_group_revision: Option<RevisionDto>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub request: Option<ProcessGroupReplaceRequestDto>,
    #[serde(rename = "versionedFlowSnapshot")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub versioned_flow_snapshot: Option<RegisteredFlowSnapshot>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ProcessGroupUploadEntity {
    #[serde(rename = "disconnectedNodeAcknowledged")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub disconnected_node_acknowledged: Option<bool>,
    #[serde(rename = "flowSnapshot")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub flow_snapshot: Option<RegisteredFlowSnapshot>,
    #[serde(rename = "groupId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub group_id: Option<String>,
    #[serde(rename = "groupName")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub group_name: Option<String>,
    #[serde(rename = "positionDTO")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub position_d_t_o: Option<PositionDto>,
    #[serde(rename = "revisionDTO")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub revision_d_t_o: Option<RevisionDto>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ProcessGroupsEntity {
    #[serde(rename = "processGroups")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub process_groups: Option<Vec<ProcessGroupEntity>>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ProcessorsEntity {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub processors: Option<Vec<ProcessorEntity>>,
}
#[non_exhaustive]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct RemoteProcessGroupsEntity {
    #[serde(rename = "remoteProcessGroups")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub remote_process_groups: Option<Vec<RemoteProcessGroupEntity>>,
}