Skip to main content

nifi_rust_client/dynamic/
mod.rs

1// @generated — do not edit; run `cargo run -p nifi-openapi-gen`
2
3mod conversions;
4pub mod types;
5use crate::{NifiClient, NifiError};
6/// Represents a detected NiFi server version.
7#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
8pub enum DetectedVersion {
9    V2_6_0,
10    V2_7_2,
11    V2_8_0,
12}
13impl std::fmt::Display for DetectedVersion {
14    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15        match self {
16            DetectedVersion::V2_6_0 => write!(f, "2.6.0"),
17            DetectedVersion::V2_7_2 => write!(f, "2.7.2"),
18            DetectedVersion::V2_8_0 => write!(f, "2.8.0"),
19        }
20    }
21}
22/// Match a version string by major.minor (ignoring patch).
23fn version_from_str(version: &str) -> Result<DetectedVersion, NifiError> {
24    let parts: Vec<&str> = version.split('.').collect();
25    if parts.len() < 2 {
26        return Err(NifiError::UnsupportedVersion {
27            detected: version.to_string(),
28        });
29    }
30    let major_minor = format!("{}.{}", parts[0], parts[1]);
31    match major_minor.as_str() {
32        "2.6" => Ok(DetectedVersion::V2_6_0),
33        "2.7" => Ok(DetectedVersion::V2_7_2),
34        "2.8" => Ok(DetectedVersion::V2_8_0),
35        _ => Err(NifiError::UnsupportedVersion {
36            detected: version.to_string(),
37        }),
38    }
39}
40#[derive(serde::Deserialize)]
41#[serde(rename_all = "camelCase")]
42struct AboutResponse {
43    about: AboutInner,
44}
45#[derive(serde::Deserialize)]
46#[serde(rename_all = "camelCase")]
47struct AboutInner {
48    version: String,
49}
50/// A dynamic NiFi client that detects the server version at connect time
51/// and dispatches API calls to the correct version's generated code.
52#[derive(Debug)]
53pub struct DynamicClient {
54    client: NifiClient,
55    version: DetectedVersion,
56}
57impl DynamicClient {
58    /// Wrap an existing `NifiClient` and detect the NiFi server version via GET /flow/about.
59    pub async fn from_client(client: NifiClient) -> Result<Self, NifiError> {
60        let resp: AboutResponse = client.get("/flow/about").await?;
61        let version = version_from_str(&resp.about.version)?;
62        Ok(Self { client, version })
63    }
64    /// Returns the detected NiFi server version.
65    pub fn detected_version(&self) -> DetectedVersion {
66        self.version
67    }
68    /// Returns a reference to the underlying `NifiClient`.
69    pub fn inner(&self) -> &NifiClient {
70        &self.client
71    }
72    /// Returns a mutable reference to the underlying `NifiClient`.
73    pub fn inner_mut(&mut self) -> &mut NifiClient {
74        &mut self.client
75    }
76    /// Authenticate with the NiFi instance.
77    pub async fn login(&mut self, username: &str, password: &str) -> Result<(), NifiError> {
78        self.client.login(username, password).await
79    }
80    /// Log out from the NiFi instance.
81    pub async fn logout(&mut self) -> Result<(), NifiError> {
82        self.client.logout().await
83    }
84    /// Access the [Access API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
85    pub fn access_api(&self) -> DynamicAccessApi<'_> {
86        DynamicAccessApi {
87            client: &self.client,
88            version: self.version,
89        }
90    }
91    /// Access the [Authentication API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
92    pub fn authentication_api(&self) -> DynamicAuthenticationApi<'_> {
93        DynamicAuthenticationApi {
94            client: &self.client,
95            version: self.version,
96        }
97    }
98    /// Access the [Connections API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
99    pub fn connections_api(&self) -> DynamicConnectionsApi<'_> {
100        DynamicConnectionsApi {
101            client: &self.client,
102            version: self.version,
103        }
104    }
105    /// Access the [Controller API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
106    pub fn controller_api(&self) -> DynamicControllerApi<'_> {
107        DynamicControllerApi {
108            client: &self.client,
109            version: self.version,
110        }
111    }
112    /// Access the [Controller Services API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
113    pub fn controller_services_api(&self) -> DynamicControllerServicesApi<'_> {
114        DynamicControllerServicesApi {
115            client: &self.client,
116            version: self.version,
117        }
118    }
119    /// Access the [Counters API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
120    pub fn counters_api(&self) -> DynamicCountersApi<'_> {
121        DynamicCountersApi {
122            client: &self.client,
123            version: self.version,
124        }
125    }
126    /// Access the [DataTransfer API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
127    pub fn datatransfer_api(&self) -> DynamicDataTransferApi<'_> {
128        DynamicDataTransferApi {
129            client: &self.client,
130            version: self.version,
131        }
132    }
133    /// Access the [Flow API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
134    pub fn flow_api(&self) -> DynamicFlowApi<'_> {
135        DynamicFlowApi {
136            client: &self.client,
137            version: self.version,
138        }
139    }
140    /// Access the [FlowFileQueues API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
141    pub fn flowfilequeues_api(&self) -> DynamicFlowFileQueuesApi<'_> {
142        DynamicFlowFileQueuesApi {
143            client: &self.client,
144            version: self.version,
145        }
146    }
147    /// Access the [Funnels API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
148    pub fn funnels_api(&self) -> DynamicFunnelsApi<'_> {
149        DynamicFunnelsApi {
150            client: &self.client,
151            version: self.version,
152        }
153    }
154    /// Access the [InputPorts API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
155    pub fn inputports_api(&self) -> DynamicInputPortsApi<'_> {
156        DynamicInputPortsApi {
157            client: &self.client,
158            version: self.version,
159        }
160    }
161    /// Access the [Labels API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
162    pub fn labels_api(&self) -> DynamicLabelsApi<'_> {
163        DynamicLabelsApi {
164            client: &self.client,
165            version: self.version,
166        }
167    }
168    /// Access the [OutputPorts API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
169    pub fn outputports_api(&self) -> DynamicOutputPortsApi<'_> {
170        DynamicOutputPortsApi {
171            client: &self.client,
172            version: self.version,
173        }
174    }
175    /// Access the [ParameterContexts API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
176    pub fn parametercontexts_api(&self) -> DynamicParameterContextsApi<'_> {
177        DynamicParameterContextsApi {
178            client: &self.client,
179            version: self.version,
180        }
181    }
182    /// Access the [ParameterProviders API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
183    pub fn parameterproviders_api(&self) -> DynamicParameterProvidersApi<'_> {
184        DynamicParameterProvidersApi {
185            client: &self.client,
186            version: self.version,
187        }
188    }
189    /// Access the [Policies API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
190    pub fn policies_api(&self) -> DynamicPoliciesApi<'_> {
191        DynamicPoliciesApi {
192            client: &self.client,
193            version: self.version,
194        }
195    }
196    /// Access the [ProcessGroups API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
197    pub fn processgroups_api(&self) -> DynamicProcessGroupsApi<'_> {
198        DynamicProcessGroupsApi {
199            client: &self.client,
200            version: self.version,
201        }
202    }
203    /// Access the [Processors API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
204    pub fn processors_api(&self) -> DynamicProcessorsApi<'_> {
205        DynamicProcessorsApi {
206            client: &self.client,
207            version: self.version,
208        }
209    }
210    /// Access the [Provenance API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
211    pub fn provenance_api(&self) -> DynamicProvenanceApi<'_> {
212        DynamicProvenanceApi {
213            client: &self.client,
214            version: self.version,
215        }
216    }
217    /// Access the [ProvenanceEvents API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
218    pub fn provenanceevents_api(&self) -> DynamicProvenanceEventsApi<'_> {
219        DynamicProvenanceEventsApi {
220            client: &self.client,
221            version: self.version,
222        }
223    }
224    /// Access the [RemoteProcessGroups API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
225    pub fn remoteprocessgroups_api(&self) -> DynamicRemoteProcessGroupsApi<'_> {
226        DynamicRemoteProcessGroupsApi {
227            client: &self.client,
228            version: self.version,
229        }
230    }
231    /// Access the [ReportingTasks API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
232    pub fn reportingtasks_api(&self) -> DynamicReportingTasksApi<'_> {
233        DynamicReportingTasksApi {
234            client: &self.client,
235            version: self.version,
236        }
237    }
238    /// Access the [Resources API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
239    pub fn resources_api(&self) -> DynamicResourcesApi<'_> {
240        DynamicResourcesApi {
241            client: &self.client,
242            version: self.version,
243        }
244    }
245    /// Access the [SiteToSite API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
246    pub fn sitetosite_api(&self) -> DynamicSiteToSiteApi<'_> {
247        DynamicSiteToSiteApi {
248            client: &self.client,
249            version: self.version,
250        }
251    }
252    /// Access the [Snippets API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
253    pub fn snippets_api(&self) -> DynamicSnippetsApi<'_> {
254        DynamicSnippetsApi {
255            client: &self.client,
256            version: self.version,
257        }
258    }
259    /// Access the [SystemDiagnostics API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
260    pub fn systemdiagnostics_api(&self) -> DynamicSystemDiagnosticsApi<'_> {
261        DynamicSystemDiagnosticsApi {
262            client: &self.client,
263            version: self.version,
264        }
265    }
266    /// Access the [Tenants API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
267    pub fn tenants_api(&self) -> DynamicTenantsApi<'_> {
268        DynamicTenantsApi {
269            client: &self.client,
270            version: self.version,
271        }
272    }
273    /// Access the [Versions API](https://nifi.apache.org/nifi-docs/rest-api.html) with dynamic dispatch.
274    pub fn versions_api(&self) -> DynamicVersionsApi<'_> {
275        DynamicVersionsApi {
276            client: &self.client,
277            version: self.version,
278        }
279    }
280}
281/// Dynamic dispatch wrapper for the Access API.
282pub struct DynamicAccessApi<'a> {
283    client: &'a NifiClient,
284    version: DetectedVersion,
285}
286#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
287impl<'a> DynamicAccessApi<'a> {
288    /// Performs a logout for other providers that have been issued a JWT.
289    pub async fn log_out(&self) -> Result<(), NifiError> {
290        match self.version {
291            DetectedVersion::V2_6_0 => {
292                let api = crate::v2_6_0::api::access::AccessApi {
293                    client: self.client,
294                };
295                api.log_out().await
296            }
297            DetectedVersion::V2_7_2 => {
298                let api = crate::v2_7_2::api::access::AccessApi {
299                    client: self.client,
300                };
301                api.log_out().await
302            }
303            DetectedVersion::V2_8_0 => {
304                let api = crate::v2_8_0::api::access::AccessApi {
305                    client: self.client,
306                };
307                api.log_out().await
308            }
309        }
310    }
311    /// Completes the logout sequence by removing the cached Logout Request and Cookie if they existed and redirects to /nifi/login.
312    pub async fn log_out_complete(&self) -> Result<(), NifiError> {
313        match self.version {
314            DetectedVersion::V2_6_0 => {
315                let api = crate::v2_6_0::api::access::AccessApi {
316                    client: self.client,
317                };
318                api.log_out_complete().await
319            }
320            DetectedVersion::V2_7_2 => {
321                let api = crate::v2_7_2::api::access::AccessApi {
322                    client: self.client,
323                };
324                api.log_out_complete().await
325            }
326            DetectedVersion::V2_8_0 => {
327                let api = crate::v2_8_0::api::access::AccessApi {
328                    client: self.client,
329                };
330                api.log_out_complete().await
331            }
332        }
333    }
334}
335/// Dynamic dispatch wrapper for the Authentication API.
336pub struct DynamicAuthenticationApi<'a> {
337    client: &'a NifiClient,
338    version: DetectedVersion,
339}
340#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
341impl<'a> DynamicAuthenticationApi<'a> {
342    /// Retrieves the authentication configuration endpoint and status information
343    pub async fn get_authentication_configuration(
344        &self,
345    ) -> Result<types::AuthenticationConfigurationDto, NifiError> {
346        match self.version {
347            DetectedVersion::V2_6_0 => {
348                let api = crate::v2_6_0::api::authentication::AuthenticationApi {
349                    client: self.client,
350                };
351                Ok(api.get_authentication_configuration().await?.into())
352            }
353            DetectedVersion::V2_7_2 => {
354                let api = crate::v2_7_2::api::authentication::AuthenticationApi {
355                    client: self.client,
356                };
357                Ok(api.get_authentication_configuration().await?.into())
358            }
359            DetectedVersion::V2_8_0 => {
360                let api = crate::v2_8_0::api::authentication::AuthenticationApi {
361                    client: self.client,
362                };
363                Ok(api.get_authentication_configuration().await?.into())
364            }
365        }
366    }
367}
368/// Dynamic dispatch wrapper for the Connections API.
369pub struct DynamicConnectionsApi<'a> {
370    client: &'a NifiClient,
371    version: DetectedVersion,
372}
373#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
374impl<'a> DynamicConnectionsApi<'a> {
375    /// Deletes a connection
376    pub async fn delete_connection(
377        &self,
378        id: &str,
379        version: Option<&str>,
380        client_id: Option<&str>,
381        disconnected_node_acknowledged: Option<bool>,
382    ) -> Result<types::ConnectionEntity, NifiError> {
383        match self.version {
384            DetectedVersion::V2_6_0 => {
385                let api = crate::v2_6_0::api::connections::ConnectionsApi {
386                    client: self.client,
387                };
388                Ok(api
389                    .delete_connection(id, version, client_id, disconnected_node_acknowledged)
390                    .await?
391                    .into())
392            }
393            DetectedVersion::V2_7_2 => {
394                let api = crate::v2_7_2::api::connections::ConnectionsApi {
395                    client: self.client,
396                };
397                Ok(api
398                    .delete_connection(id, version, client_id, disconnected_node_acknowledged)
399                    .await?
400                    .into())
401            }
402            DetectedVersion::V2_8_0 => {
403                let api = crate::v2_8_0::api::connections::ConnectionsApi {
404                    client: self.client,
405                };
406                Ok(api
407                    .delete_connection(id, version, client_id, disconnected_node_acknowledged)
408                    .await?
409                    .into())
410            }
411        }
412    }
413    /// Gets a connection
414    pub async fn get_connection(&self, id: &str) -> Result<types::ConnectionEntity, NifiError> {
415        match self.version {
416            DetectedVersion::V2_6_0 => {
417                let api = crate::v2_6_0::api::connections::ConnectionsApi {
418                    client: self.client,
419                };
420                Ok(api.get_connection(id).await?.into())
421            }
422            DetectedVersion::V2_7_2 => {
423                let api = crate::v2_7_2::api::connections::ConnectionsApi {
424                    client: self.client,
425                };
426                Ok(api.get_connection(id).await?.into())
427            }
428            DetectedVersion::V2_8_0 => {
429                let api = crate::v2_8_0::api::connections::ConnectionsApi {
430                    client: self.client,
431                };
432                Ok(api.get_connection(id).await?.into())
433            }
434        }
435    }
436    /// Updates a connection
437    pub async fn update_connection(
438        &self,
439        id: &str,
440        body: &serde_json::Value,
441    ) -> Result<types::ConnectionEntity, NifiError> {
442        match self.version {
443            DetectedVersion::V2_6_0 => {
444                let api = crate::v2_6_0::api::connections::ConnectionsApi {
445                    client: self.client,
446                };
447                Ok(api
448                    .update_connection(
449                        id,
450                        &serde_json::from_value::<crate::v2_6_0::types::ConnectionEntity>(
451                            body.clone(),
452                        )
453                        .map_err(|e| NifiError::UnsupportedEndpoint {
454                            endpoint: format!("{} (body deserialize: {})", "update_connection", e),
455                            version: "2.6.0".to_string(),
456                        })?,
457                    )
458                    .await?
459                    .into())
460            }
461            DetectedVersion::V2_7_2 => {
462                let api = crate::v2_7_2::api::connections::ConnectionsApi {
463                    client: self.client,
464                };
465                Ok(api
466                    .update_connection(
467                        id,
468                        &serde_json::from_value::<crate::v2_7_2::types::ConnectionEntity>(
469                            body.clone(),
470                        )
471                        .map_err(|e| NifiError::UnsupportedEndpoint {
472                            endpoint: format!("{} (body deserialize: {})", "update_connection", e),
473                            version: "2.7.2".to_string(),
474                        })?,
475                    )
476                    .await?
477                    .into())
478            }
479            DetectedVersion::V2_8_0 => {
480                let api = crate::v2_8_0::api::connections::ConnectionsApi {
481                    client: self.client,
482                };
483                Ok(api
484                    .update_connection(
485                        id,
486                        &serde_json::from_value::<crate::v2_8_0::types::ConnectionEntity>(
487                            body.clone(),
488                        )
489                        .map_err(|e| NifiError::UnsupportedEndpoint {
490                            endpoint: format!("{} (body deserialize: {})", "update_connection", e),
491                            version: "2.8.0".to_string(),
492                        })?,
493                    )
494                    .await?
495                    .into())
496            }
497        }
498    }
499}
500/// Dynamic dispatch wrapper for the Controller API.
501pub struct DynamicControllerApi<'a> {
502    client: &'a NifiClient,
503    version: DetectedVersion,
504}
505#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
506impl<'a> DynamicControllerApi<'a> {
507    /// Performs analysis of the component's configuration, providing information about which attributes are referenced.
508    pub async fn analyze_flow_analysis_rule_configuration(
509        &self,
510        id: &str,
511        body: &serde_json::Value,
512    ) -> Result<types::ConfigurationAnalysisDto, NifiError> {
513        match self.version {
514            DetectedVersion::V2_6_0 => {
515                let api = crate::v2_6_0::api::controller::ControllerConfigApi {
516                    client: self.client,
517                    id,
518                };
519                Ok(
520                    api
521                        .analyze_flow_analysis_rule_configuration(
522                            &serde_json::from_value::<
523                                crate::v2_6_0::types::ConfigurationAnalysisEntity,
524                            >(body.clone())
525                            .map_err(|e| NifiError::UnsupportedEndpoint {
526                                endpoint: format!(
527                                    "{} (body deserialize: {})",
528                                    "analyze_flow_analysis_rule_configuration", e
529                                ),
530                                version: "2.6.0".to_string(),
531                            })?,
532                        )
533                        .await?
534                        .into(),
535                )
536            }
537            DetectedVersion::V2_7_2 => {
538                let api = crate::v2_7_2::api::controller::ControllerConfigApi {
539                    client: self.client,
540                    id,
541                };
542                Ok(
543                    api
544                        .analyze_flow_analysis_rule_configuration(
545                            &serde_json::from_value::<
546                                crate::v2_7_2::types::ConfigurationAnalysisEntity,
547                            >(body.clone())
548                            .map_err(|e| NifiError::UnsupportedEndpoint {
549                                endpoint: format!(
550                                    "{} (body deserialize: {})",
551                                    "analyze_flow_analysis_rule_configuration", e
552                                ),
553                                version: "2.7.2".to_string(),
554                            })?,
555                        )
556                        .await?
557                        .into(),
558                )
559            }
560            DetectedVersion::V2_8_0 => {
561                let api = crate::v2_8_0::api::controller::ControllerConfigApi {
562                    client: self.client,
563                    id,
564                };
565                Ok(
566                    api
567                        .analyze_flow_analysis_rule_configuration(
568                            &serde_json::from_value::<
569                                crate::v2_8_0::types::ConfigurationAnalysisEntity,
570                            >(body.clone())
571                            .map_err(|e| NifiError::UnsupportedEndpoint {
572                                endpoint: format!(
573                                    "{} (body deserialize: {})",
574                                    "analyze_flow_analysis_rule_configuration", e
575                                ),
576                                version: "2.8.0".to_string(),
577                            })?,
578                        )
579                        .await?
580                        .into(),
581                )
582            }
583        }
584    }
585    /// Performs analysis of the component's configuration, providing information about which attributes are referenced.
586    pub async fn analyze_flow_registry_client_configuration(
587        &self,
588        id: &str,
589        body: &serde_json::Value,
590    ) -> Result<types::ConfigurationAnalysisDto, NifiError> {
591        match self.version {
592            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
593                endpoint: "analyze_flow_registry_client_configuration".to_string(),
594                version: "2.6.0".to_string(),
595            }),
596            DetectedVersion::V2_7_2 => {
597                let api = crate::v2_7_2::api::controller::ControllerConfigApi {
598                    client: self.client,
599                    id,
600                };
601                Ok(
602                    api
603                        .analyze_flow_registry_client_configuration(
604                            &serde_json::from_value::<
605                                crate::v2_7_2::types::ConfigurationAnalysisEntity,
606                            >(body.clone())
607                            .map_err(|e| NifiError::UnsupportedEndpoint {
608                                endpoint: format!(
609                                    "{} (body deserialize: {})",
610                                    "analyze_flow_registry_client_configuration", e
611                                ),
612                                version: "2.7.2".to_string(),
613                            })?,
614                        )
615                        .await?
616                        .into(),
617                )
618            }
619            DetectedVersion::V2_8_0 => {
620                let api = crate::v2_8_0::api::controller::ControllerConfigApi {
621                    client: self.client,
622                    id,
623                };
624                Ok(
625                    api
626                        .analyze_flow_registry_client_configuration(
627                            &serde_json::from_value::<
628                                crate::v2_8_0::types::ConfigurationAnalysisEntity,
629                            >(body.clone())
630                            .map_err(|e| NifiError::UnsupportedEndpoint {
631                                endpoint: format!(
632                                    "{} (body deserialize: {})",
633                                    "analyze_flow_registry_client_configuration", e
634                                ),
635                                version: "2.8.0".to_string(),
636                            })?,
637                        )
638                        .await?
639                        .into(),
640                )
641            }
642        }
643    }
644    /// Clears bulletins for a flow analysis rule
645    pub async fn clear_flow_analysis_rule_bulletins(
646        &self,
647        id: &str,
648        body: &serde_json::Value,
649    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
650        match self.version {
651            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
652                endpoint: "clear_flow_analysis_rule_bulletins".to_string(),
653                version: "2.6.0".to_string(),
654            }),
655            DetectedVersion::V2_7_2 => {
656                let api = crate::v2_7_2::api::controller::ControllerBulletinsApi {
657                    client: self.client,
658                    id,
659                };
660                Ok(
661                    api
662                        .clear_flow_analysis_rule_bulletins(
663                            &serde_json::from_value::<
664                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
665                            >(body.clone())
666                            .map_err(|e| NifiError::UnsupportedEndpoint {
667                                endpoint: format!(
668                                    "{} (body deserialize: {})",
669                                    "clear_flow_analysis_rule_bulletins", e
670                                ),
671                                version: "2.7.2".to_string(),
672                            })?,
673                        )
674                        .await?
675                        .into(),
676                )
677            }
678            DetectedVersion::V2_8_0 => {
679                let api = crate::v2_8_0::api::controller::ControllerBulletinsApi {
680                    client: self.client,
681                    id,
682                };
683                Ok(
684                    api
685                        .clear_flow_analysis_rule_bulletins(
686                            &serde_json::from_value::<
687                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
688                            >(body.clone())
689                            .map_err(|e| NifiError::UnsupportedEndpoint {
690                                endpoint: format!(
691                                    "{} (body deserialize: {})",
692                                    "clear_flow_analysis_rule_bulletins", e
693                                ),
694                                version: "2.8.0".to_string(),
695                            })?,
696                        )
697                        .await?
698                        .into(),
699                )
700            }
701        }
702    }
703    /// Clears bulletins for a parameter provider
704    pub async fn clear_parameter_provider_bulletins(
705        &self,
706        id: &str,
707        body: &serde_json::Value,
708    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
709        match self.version {
710            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
711                endpoint: "clear_parameter_provider_bulletins".to_string(),
712                version: "2.6.0".to_string(),
713            }),
714            DetectedVersion::V2_7_2 => {
715                let api = crate::v2_7_2::api::controller::ControllerBulletinsApi {
716                    client: self.client,
717                    id,
718                };
719                Ok(
720                    api
721                        .clear_parameter_provider_bulletins(
722                            &serde_json::from_value::<
723                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
724                            >(body.clone())
725                            .map_err(|e| NifiError::UnsupportedEndpoint {
726                                endpoint: format!(
727                                    "{} (body deserialize: {})",
728                                    "clear_parameter_provider_bulletins", e
729                                ),
730                                version: "2.7.2".to_string(),
731                            })?,
732                        )
733                        .await?
734                        .into(),
735                )
736            }
737            DetectedVersion::V2_8_0 => {
738                let api = crate::v2_8_0::api::controller::ControllerBulletinsApi {
739                    client: self.client,
740                    id,
741                };
742                Ok(
743                    api
744                        .clear_parameter_provider_bulletins(
745                            &serde_json::from_value::<
746                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
747                            >(body.clone())
748                            .map_err(|e| NifiError::UnsupportedEndpoint {
749                                endpoint: format!(
750                                    "{} (body deserialize: {})",
751                                    "clear_parameter_provider_bulletins", e
752                                ),
753                                version: "2.8.0".to_string(),
754                            })?,
755                        )
756                        .await?
757                        .into(),
758                )
759            }
760        }
761    }
762    /// Clears bulletins for a registry client
763    pub async fn clear_registry_client_bulletins(
764        &self,
765        id: &str,
766        body: &serde_json::Value,
767    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
768        match self.version {
769            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
770                endpoint: "clear_registry_client_bulletins".to_string(),
771                version: "2.6.0".to_string(),
772            }),
773            DetectedVersion::V2_7_2 => {
774                let api = crate::v2_7_2::api::controller::ControllerBulletinsApi {
775                    client: self.client,
776                    id,
777                };
778                Ok(
779                    api
780                        .clear_registry_client_bulletins(
781                            &serde_json::from_value::<
782                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
783                            >(body.clone())
784                            .map_err(|e| NifiError::UnsupportedEndpoint {
785                                endpoint: format!(
786                                    "{} (body deserialize: {})",
787                                    "clear_registry_client_bulletins", e
788                                ),
789                                version: "2.7.2".to_string(),
790                            })?,
791                        )
792                        .await?
793                        .into(),
794                )
795            }
796            DetectedVersion::V2_8_0 => {
797                let api = crate::v2_8_0::api::controller::ControllerBulletinsApi {
798                    client: self.client,
799                    id,
800                };
801                Ok(
802                    api
803                        .clear_registry_client_bulletins(
804                            &serde_json::from_value::<
805                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
806                            >(body.clone())
807                            .map_err(|e| NifiError::UnsupportedEndpoint {
808                                endpoint: format!(
809                                    "{} (body deserialize: {})",
810                                    "clear_registry_client_bulletins", e
811                                ),
812                                version: "2.8.0".to_string(),
813                            })?,
814                        )
815                        .await?
816                        .into(),
817                )
818            }
819        }
820    }
821    /// Clears the state for a flow analysis rule
822    pub async fn clear_state(
823        &self,
824        id: &str,
825        body: &serde_json::Value,
826    ) -> Result<types::ComponentStateDto, NifiError> {
827        match self.version {
828            DetectedVersion::V2_6_0 => {
829                let api = crate::v2_6_0::api::controller::ControllerStateApi {
830                    client: self.client,
831                    id,
832                };
833                Ok(api
834                    .clear_state(
835                        &serde_json::from_value::<crate::v2_6_0::types::ComponentStateEntity>(
836                            body.clone(),
837                        )
838                        .map_err(|e| NifiError::UnsupportedEndpoint {
839                            endpoint: format!("{} (body deserialize: {})", "clear_state", e),
840                            version: "2.6.0".to_string(),
841                        })?,
842                    )
843                    .await?
844                    .into())
845            }
846            DetectedVersion::V2_7_2 => {
847                let api = crate::v2_7_2::api::controller::ControllerStateApi {
848                    client: self.client,
849                    id,
850                };
851                Ok(api
852                    .clear_state(
853                        &serde_json::from_value::<crate::v2_7_2::types::ComponentStateEntity>(
854                            body.clone(),
855                        )
856                        .map_err(|e| NifiError::UnsupportedEndpoint {
857                            endpoint: format!("{} (body deserialize: {})", "clear_state", e),
858                            version: "2.7.2".to_string(),
859                        })?,
860                    )
861                    .await?
862                    .into())
863            }
864            DetectedVersion::V2_8_0 => {
865                let api = crate::v2_8_0::api::controller::ControllerStateApi {
866                    client: self.client,
867                    id,
868                };
869                Ok(api
870                    .clear_state(
871                        &serde_json::from_value::<crate::v2_8_0::types::ComponentStateEntity>(
872                            body.clone(),
873                        )
874                        .map_err(|e| NifiError::UnsupportedEndpoint {
875                            endpoint: format!("{} (body deserialize: {})", "clear_state", e),
876                            version: "2.8.0".to_string(),
877                        })?,
878                    )
879                    .await?
880                    .into())
881            }
882        }
883    }
884    /// Creates a new bulletin
885    pub async fn create_bulletin(
886        &self,
887        body: &serde_json::Value,
888    ) -> Result<types::BulletinEntity, NifiError> {
889        match self.version {
890            DetectedVersion::V2_6_0 => {
891                let api = crate::v2_6_0::api::controller::ControllerApi {
892                    client: self.client,
893                };
894                Ok(api
895                    .create_bulletin(
896                        &serde_json::from_value::<crate::v2_6_0::types::BulletinEntity>(
897                            body.clone(),
898                        )
899                        .map_err(|e| NifiError::UnsupportedEndpoint {
900                            endpoint: format!("{} (body deserialize: {})", "create_bulletin", e),
901                            version: "2.6.0".to_string(),
902                        })?,
903                    )
904                    .await?
905                    .into())
906            }
907            DetectedVersion::V2_7_2 => {
908                let api = crate::v2_7_2::api::controller::ControllerApi {
909                    client: self.client,
910                };
911                Ok(api
912                    .create_bulletin(
913                        &serde_json::from_value::<crate::v2_7_2::types::BulletinEntity>(
914                            body.clone(),
915                        )
916                        .map_err(|e| NifiError::UnsupportedEndpoint {
917                            endpoint: format!("{} (body deserialize: {})", "create_bulletin", e),
918                            version: "2.7.2".to_string(),
919                        })?,
920                    )
921                    .await?
922                    .into())
923            }
924            DetectedVersion::V2_8_0 => {
925                let api = crate::v2_8_0::api::controller::ControllerApi {
926                    client: self.client,
927                };
928                Ok(api
929                    .create_bulletin(
930                        &serde_json::from_value::<crate::v2_8_0::types::BulletinEntity>(
931                            body.clone(),
932                        )
933                        .map_err(|e| NifiError::UnsupportedEndpoint {
934                            endpoint: format!("{} (body deserialize: {})", "create_bulletin", e),
935                            version: "2.8.0".to_string(),
936                        })?,
937                    )
938                    .await?
939                    .into())
940            }
941        }
942    }
943    /// Creates a new controller service
944    pub async fn create_controller_service(
945        &self,
946        body: &serde_json::Value,
947    ) -> Result<types::ControllerServiceEntity, NifiError> {
948        match self.version {
949            DetectedVersion::V2_6_0 => {
950                let api = crate::v2_6_0::api::controller::ControllerApi {
951                    client: self.client,
952                };
953                Ok(api
954                    .create_controller_service(
955                        &serde_json::from_value::<crate::v2_6_0::types::ControllerServiceEntity>(
956                            body.clone(),
957                        )
958                        .map_err(|e| NifiError::UnsupportedEndpoint {
959                            endpoint: format!(
960                                "{} (body deserialize: {})",
961                                "create_controller_service", e
962                            ),
963                            version: "2.6.0".to_string(),
964                        })?,
965                    )
966                    .await?
967                    .into())
968            }
969            DetectedVersion::V2_7_2 => {
970                let api = crate::v2_7_2::api::controller::ControllerApi {
971                    client: self.client,
972                };
973                Ok(api
974                    .create_controller_service(
975                        &serde_json::from_value::<crate::v2_7_2::types::ControllerServiceEntity>(
976                            body.clone(),
977                        )
978                        .map_err(|e| NifiError::UnsupportedEndpoint {
979                            endpoint: format!(
980                                "{} (body deserialize: {})",
981                                "create_controller_service", e
982                            ),
983                            version: "2.7.2".to_string(),
984                        })?,
985                    )
986                    .await?
987                    .into())
988            }
989            DetectedVersion::V2_8_0 => {
990                let api = crate::v2_8_0::api::controller::ControllerApi {
991                    client: self.client,
992                };
993                Ok(api
994                    .create_controller_service(
995                        &serde_json::from_value::<crate::v2_8_0::types::ControllerServiceEntity>(
996                            body.clone(),
997                        )
998                        .map_err(|e| NifiError::UnsupportedEndpoint {
999                            endpoint: format!(
1000                                "{} (body deserialize: {})",
1001                                "create_controller_service", e
1002                            ),
1003                            version: "2.8.0".to_string(),
1004                        })?,
1005                    )
1006                    .await?
1007                    .into())
1008            }
1009        }
1010    }
1011    /// Creates a new flow analysis rule
1012    pub async fn create_flow_analysis_rule(
1013        &self,
1014        body: &serde_json::Value,
1015    ) -> Result<types::FlowAnalysisRuleEntity, NifiError> {
1016        match self.version {
1017            DetectedVersion::V2_6_0 => {
1018                let api = crate::v2_6_0::api::controller::ControllerApi {
1019                    client: self.client,
1020                };
1021                Ok(api
1022                    .create_flow_analysis_rule(
1023                        &serde_json::from_value::<crate::v2_6_0::types::FlowAnalysisRuleEntity>(
1024                            body.clone(),
1025                        )
1026                        .map_err(|e| NifiError::UnsupportedEndpoint {
1027                            endpoint: format!(
1028                                "{} (body deserialize: {})",
1029                                "create_flow_analysis_rule", e
1030                            ),
1031                            version: "2.6.0".to_string(),
1032                        })?,
1033                    )
1034                    .await?
1035                    .into())
1036            }
1037            DetectedVersion::V2_7_2 => {
1038                let api = crate::v2_7_2::api::controller::ControllerApi {
1039                    client: self.client,
1040                };
1041                Ok(api
1042                    .create_flow_analysis_rule(
1043                        &serde_json::from_value::<crate::v2_7_2::types::FlowAnalysisRuleEntity>(
1044                            body.clone(),
1045                        )
1046                        .map_err(|e| NifiError::UnsupportedEndpoint {
1047                            endpoint: format!(
1048                                "{} (body deserialize: {})",
1049                                "create_flow_analysis_rule", e
1050                            ),
1051                            version: "2.7.2".to_string(),
1052                        })?,
1053                    )
1054                    .await?
1055                    .into())
1056            }
1057            DetectedVersion::V2_8_0 => {
1058                let api = crate::v2_8_0::api::controller::ControllerApi {
1059                    client: self.client,
1060                };
1061                Ok(api
1062                    .create_flow_analysis_rule(
1063                        &serde_json::from_value::<crate::v2_8_0::types::FlowAnalysisRuleEntity>(
1064                            body.clone(),
1065                        )
1066                        .map_err(|e| NifiError::UnsupportedEndpoint {
1067                            endpoint: format!(
1068                                "{} (body deserialize: {})",
1069                                "create_flow_analysis_rule", e
1070                            ),
1071                            version: "2.8.0".to_string(),
1072                        })?,
1073                    )
1074                    .await?
1075                    .into())
1076            }
1077        }
1078    }
1079    /// Creates a new flow registry client
1080    pub async fn create_flow_registry_client(
1081        &self,
1082        body: &serde_json::Value,
1083    ) -> Result<types::FlowRegistryClientEntity, NifiError> {
1084        match self.version {
1085            DetectedVersion::V2_6_0 => {
1086                let api = crate::v2_6_0::api::controller::ControllerApi {
1087                    client: self.client,
1088                };
1089                Ok(api
1090                    .create_flow_registry_client(
1091                        &serde_json::from_value::<crate::v2_6_0::types::FlowRegistryClientEntity>(
1092                            body.clone(),
1093                        )
1094                        .map_err(|e| NifiError::UnsupportedEndpoint {
1095                            endpoint: format!(
1096                                "{} (body deserialize: {})",
1097                                "create_flow_registry_client", e
1098                            ),
1099                            version: "2.6.0".to_string(),
1100                        })?,
1101                    )
1102                    .await?
1103                    .into())
1104            }
1105            DetectedVersion::V2_7_2 => {
1106                let api = crate::v2_7_2::api::controller::ControllerApi {
1107                    client: self.client,
1108                };
1109                Ok(api
1110                    .create_flow_registry_client(
1111                        &serde_json::from_value::<crate::v2_7_2::types::FlowRegistryClientEntity>(
1112                            body.clone(),
1113                        )
1114                        .map_err(|e| NifiError::UnsupportedEndpoint {
1115                            endpoint: format!(
1116                                "{} (body deserialize: {})",
1117                                "create_flow_registry_client", e
1118                            ),
1119                            version: "2.7.2".to_string(),
1120                        })?,
1121                    )
1122                    .await?
1123                    .into())
1124            }
1125            DetectedVersion::V2_8_0 => {
1126                let api = crate::v2_8_0::api::controller::ControllerApi {
1127                    client: self.client,
1128                };
1129                Ok(api
1130                    .create_flow_registry_client(
1131                        &serde_json::from_value::<crate::v2_8_0::types::FlowRegistryClientEntity>(
1132                            body.clone(),
1133                        )
1134                        .map_err(|e| NifiError::UnsupportedEndpoint {
1135                            endpoint: format!(
1136                                "{} (body deserialize: {})",
1137                                "create_flow_registry_client", e
1138                            ),
1139                            version: "2.8.0".to_string(),
1140                        })?,
1141                    )
1142                    .await?
1143                    .into())
1144            }
1145        }
1146    }
1147    /// Creates a new parameter provider
1148    pub async fn create_parameter_provider(
1149        &self,
1150        body: &serde_json::Value,
1151    ) -> Result<types::ParameterProviderEntity, NifiError> {
1152        match self.version {
1153            DetectedVersion::V2_6_0 => {
1154                let api = crate::v2_6_0::api::controller::ControllerApi {
1155                    client: self.client,
1156                };
1157                Ok(api
1158                    .create_parameter_provider(
1159                        &serde_json::from_value::<crate::v2_6_0::types::ParameterProviderEntity>(
1160                            body.clone(),
1161                        )
1162                        .map_err(|e| NifiError::UnsupportedEndpoint {
1163                            endpoint: format!(
1164                                "{} (body deserialize: {})",
1165                                "create_parameter_provider", e
1166                            ),
1167                            version: "2.6.0".to_string(),
1168                        })?,
1169                    )
1170                    .await?
1171                    .into())
1172            }
1173            DetectedVersion::V2_7_2 => {
1174                let api = crate::v2_7_2::api::controller::ControllerApi {
1175                    client: self.client,
1176                };
1177                Ok(api
1178                    .create_parameter_provider(
1179                        &serde_json::from_value::<crate::v2_7_2::types::ParameterProviderEntity>(
1180                            body.clone(),
1181                        )
1182                        .map_err(|e| NifiError::UnsupportedEndpoint {
1183                            endpoint: format!(
1184                                "{} (body deserialize: {})",
1185                                "create_parameter_provider", e
1186                            ),
1187                            version: "2.7.2".to_string(),
1188                        })?,
1189                    )
1190                    .await?
1191                    .into())
1192            }
1193            DetectedVersion::V2_8_0 => {
1194                let api = crate::v2_8_0::api::controller::ControllerApi {
1195                    client: self.client,
1196                };
1197                Ok(api
1198                    .create_parameter_provider(
1199                        &serde_json::from_value::<crate::v2_8_0::types::ParameterProviderEntity>(
1200                            body.clone(),
1201                        )
1202                        .map_err(|e| NifiError::UnsupportedEndpoint {
1203                            endpoint: format!(
1204                                "{} (body deserialize: {})",
1205                                "create_parameter_provider", e
1206                            ),
1207                            version: "2.8.0".to_string(),
1208                        })?,
1209                    )
1210                    .await?
1211                    .into())
1212            }
1213        }
1214    }
1215    /// Creates a new reporting task
1216    pub async fn create_reporting_task(
1217        &self,
1218        body: &serde_json::Value,
1219    ) -> Result<types::ReportingTaskEntity, NifiError> {
1220        match self.version {
1221            DetectedVersion::V2_6_0 => {
1222                let api = crate::v2_6_0::api::controller::ControllerApi {
1223                    client: self.client,
1224                };
1225                Ok(api
1226                    .create_reporting_task(
1227                        &serde_json::from_value::<crate::v2_6_0::types::ReportingTaskEntity>(
1228                            body.clone(),
1229                        )
1230                        .map_err(|e| NifiError::UnsupportedEndpoint {
1231                            endpoint: format!(
1232                                "{} (body deserialize: {})",
1233                                "create_reporting_task", e
1234                            ),
1235                            version: "2.6.0".to_string(),
1236                        })?,
1237                    )
1238                    .await?
1239                    .into())
1240            }
1241            DetectedVersion::V2_7_2 => {
1242                let api = crate::v2_7_2::api::controller::ControllerApi {
1243                    client: self.client,
1244                };
1245                Ok(api
1246                    .create_reporting_task(
1247                        &serde_json::from_value::<crate::v2_7_2::types::ReportingTaskEntity>(
1248                            body.clone(),
1249                        )
1250                        .map_err(|e| NifiError::UnsupportedEndpoint {
1251                            endpoint: format!(
1252                                "{} (body deserialize: {})",
1253                                "create_reporting_task", e
1254                            ),
1255                            version: "2.7.2".to_string(),
1256                        })?,
1257                    )
1258                    .await?
1259                    .into())
1260            }
1261            DetectedVersion::V2_8_0 => {
1262                let api = crate::v2_8_0::api::controller::ControllerApi {
1263                    client: self.client,
1264                };
1265                Ok(api
1266                    .create_reporting_task(
1267                        &serde_json::from_value::<crate::v2_8_0::types::ReportingTaskEntity>(
1268                            body.clone(),
1269                        )
1270                        .map_err(|e| NifiError::UnsupportedEndpoint {
1271                            endpoint: format!(
1272                                "{} (body deserialize: {})",
1273                                "create_reporting_task", e
1274                            ),
1275                            version: "2.8.0".to_string(),
1276                        })?,
1277                    )
1278                    .await?
1279                    .into())
1280            }
1281        }
1282    }
1283    /// Deletes the Verification Request with the given ID
1284    pub async fn delete_flow_analysis_rule_verification_request(
1285        &self,
1286        id: &str,
1287        request_id: &str,
1288    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
1289        match self.version {
1290            DetectedVersion::V2_6_0 => {
1291                let api = crate::v2_6_0::api::controller::ControllerConfigApi {
1292                    client: self.client,
1293                    id,
1294                };
1295                Ok(api
1296                    .delete_flow_analysis_rule_verification_request(request_id)
1297                    .await?
1298                    .into())
1299            }
1300            DetectedVersion::V2_7_2 => {
1301                let api = crate::v2_7_2::api::controller::ControllerConfigApi {
1302                    client: self.client,
1303                    id,
1304                };
1305                Ok(api
1306                    .delete_flow_analysis_rule_verification_request(request_id)
1307                    .await?
1308                    .into())
1309            }
1310            DetectedVersion::V2_8_0 => {
1311                let api = crate::v2_8_0::api::controller::ControllerConfigApi {
1312                    client: self.client,
1313                    id,
1314                };
1315                Ok(api
1316                    .delete_flow_analysis_rule_verification_request(request_id)
1317                    .await?
1318                    .into())
1319            }
1320        }
1321    }
1322    /// Deletes a flow registry client
1323    pub async fn delete_flow_registry_client(
1324        &self,
1325        id: &str,
1326        version: Option<&str>,
1327        client_id: Option<&str>,
1328        disconnected_node_acknowledged: Option<bool>,
1329    ) -> Result<types::FlowRegistryClientEntity, NifiError> {
1330        match self.version {
1331            DetectedVersion::V2_6_0 => {
1332                let api = crate::v2_6_0::api::controller::ControllerApi {
1333                    client: self.client,
1334                };
1335                Ok(api
1336                    .delete_flow_registry_client(
1337                        id,
1338                        version,
1339                        client_id,
1340                        disconnected_node_acknowledged,
1341                    )
1342                    .await?
1343                    .into())
1344            }
1345            DetectedVersion::V2_7_2 => {
1346                let api = crate::v2_7_2::api::controller::ControllerApi {
1347                    client: self.client,
1348                };
1349                Ok(api
1350                    .delete_flow_registry_client(
1351                        id,
1352                        version,
1353                        client_id,
1354                        disconnected_node_acknowledged,
1355                    )
1356                    .await?
1357                    .into())
1358            }
1359            DetectedVersion::V2_8_0 => {
1360                let api = crate::v2_8_0::api::controller::ControllerApi {
1361                    client: self.client,
1362                };
1363                Ok(api
1364                    .delete_flow_registry_client(
1365                        id,
1366                        version,
1367                        client_id,
1368                        disconnected_node_acknowledged,
1369                    )
1370                    .await?
1371                    .into())
1372            }
1373        }
1374    }
1375    /// Purges history
1376    pub async fn delete_history(&self, end_date: &str) -> Result<types::HistoryDto, NifiError> {
1377        match self.version {
1378            DetectedVersion::V2_6_0 => {
1379                let api = crate::v2_6_0::api::controller::ControllerApi {
1380                    client: self.client,
1381                };
1382                Ok(api.delete_history(end_date).await?.into())
1383            }
1384            DetectedVersion::V2_7_2 => {
1385                let api = crate::v2_7_2::api::controller::ControllerApi {
1386                    client: self.client,
1387                };
1388                Ok(api.delete_history(end_date).await?.into())
1389            }
1390            DetectedVersion::V2_8_0 => {
1391                let api = crate::v2_8_0::api::controller::ControllerApi {
1392                    client: self.client,
1393                };
1394                Ok(api.delete_history(end_date).await?.into())
1395            }
1396        }
1397    }
1398    /// Deletes an installed NAR
1399    pub async fn delete_nar(
1400        &self,
1401        id: &str,
1402        disconnected_node_acknowledged: Option<bool>,
1403        force: Option<bool>,
1404    ) -> Result<types::NarSummaryDto, NifiError> {
1405        match self.version {
1406            DetectedVersion::V2_6_0 => {
1407                let api = crate::v2_6_0::api::controller::ControllerApi {
1408                    client: self.client,
1409                };
1410                Ok(api
1411                    .delete_nar(id, disconnected_node_acknowledged, force)
1412                    .await?
1413                    .into())
1414            }
1415            DetectedVersion::V2_7_2 => {
1416                let api = crate::v2_7_2::api::controller::ControllerApi {
1417                    client: self.client,
1418                };
1419                Ok(api
1420                    .delete_nar(id, disconnected_node_acknowledged, force)
1421                    .await?
1422                    .into())
1423            }
1424            DetectedVersion::V2_8_0 => {
1425                let api = crate::v2_8_0::api::controller::ControllerApi {
1426                    client: self.client,
1427                };
1428                Ok(api
1429                    .delete_nar(id, disconnected_node_acknowledged, force)
1430                    .await?
1431                    .into())
1432            }
1433        }
1434    }
1435    /// Removes a node from the cluster
1436    pub async fn delete_node(&self, id: &str) -> Result<types::NodeDto, NifiError> {
1437        match self.version {
1438            DetectedVersion::V2_6_0 => {
1439                let api = crate::v2_6_0::api::controller::ControllerApi {
1440                    client: self.client,
1441                };
1442                Ok(api.delete_node(id).await?.into())
1443            }
1444            DetectedVersion::V2_7_2 => {
1445                let api = crate::v2_7_2::api::controller::ControllerApi {
1446                    client: self.client,
1447                };
1448                Ok(api.delete_node(id).await?.into())
1449            }
1450            DetectedVersion::V2_8_0 => {
1451                let api = crate::v2_8_0::api::controller::ControllerApi {
1452                    client: self.client,
1453                };
1454                Ok(api.delete_node(id).await?.into())
1455            }
1456        }
1457    }
1458    /// Deletes the Verification Request with the given ID
1459    pub async fn delete_registry_client_verification_request(
1460        &self,
1461        id: &str,
1462        request_id: &str,
1463    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
1464        match self.version {
1465            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
1466                endpoint: "delete_registry_client_verification_request".to_string(),
1467                version: "2.6.0".to_string(),
1468            }),
1469            DetectedVersion::V2_7_2 => {
1470                let api = crate::v2_7_2::api::controller::ControllerConfigApi {
1471                    client: self.client,
1472                    id,
1473                };
1474                Ok(api
1475                    .delete_registry_client_verification_request(request_id)
1476                    .await?
1477                    .into())
1478            }
1479            DetectedVersion::V2_8_0 => {
1480                let api = crate::v2_8_0::api::controller::ControllerConfigApi {
1481                    client: self.client,
1482                    id,
1483                };
1484                Ok(api
1485                    .delete_registry_client_verification_request(request_id)
1486                    .await?
1487                    .into())
1488            }
1489        }
1490    }
1491    /// Retrieves the content of the NAR with the given id
1492    pub async fn download_nar(&self, id: &str) -> Result<(), NifiError> {
1493        match self.version {
1494            DetectedVersion::V2_6_0 => {
1495                let api = crate::v2_6_0::api::controller::ControllerContentApi {
1496                    client: self.client,
1497                    id,
1498                };
1499                api.download_nar().await
1500            }
1501            DetectedVersion::V2_7_2 => {
1502                let api = crate::v2_7_2::api::controller::ControllerContentApi {
1503                    client: self.client,
1504                    id,
1505                };
1506                api.download_nar().await
1507            }
1508            DetectedVersion::V2_8_0 => {
1509                let api = crate::v2_8_0::api::controller::ControllerContentApi {
1510                    client: self.client,
1511                    id,
1512                };
1513                api.download_nar().await
1514            }
1515        }
1516    }
1517    /// Gets the contents of the cluster
1518    pub async fn get_cluster(&self) -> Result<types::ClusterDto, NifiError> {
1519        match self.version {
1520            DetectedVersion::V2_6_0 => {
1521                let api = crate::v2_6_0::api::controller::ControllerApi {
1522                    client: self.client,
1523                };
1524                Ok(api.get_cluster().await?.into())
1525            }
1526            DetectedVersion::V2_7_2 => {
1527                let api = crate::v2_7_2::api::controller::ControllerApi {
1528                    client: self.client,
1529                };
1530                Ok(api.get_cluster().await?.into())
1531            }
1532            DetectedVersion::V2_8_0 => {
1533                let api = crate::v2_8_0::api::controller::ControllerApi {
1534                    client: self.client,
1535                };
1536                Ok(api.get_cluster().await?.into())
1537            }
1538        }
1539    }
1540    /// Retrieves the configuration for this NiFi Controller
1541    pub async fn get_controller_config(
1542        &self,
1543    ) -> Result<types::ControllerConfigurationEntity, NifiError> {
1544        match self.version {
1545            DetectedVersion::V2_6_0 => {
1546                let api = crate::v2_6_0::api::controller::ControllerApi {
1547                    client: self.client,
1548                };
1549                Ok(api.get_controller_config().await?.into())
1550            }
1551            DetectedVersion::V2_7_2 => {
1552                let api = crate::v2_7_2::api::controller::ControllerApi {
1553                    client: self.client,
1554                };
1555                Ok(api.get_controller_config().await?.into())
1556            }
1557            DetectedVersion::V2_8_0 => {
1558                let api = crate::v2_8_0::api::controller::ControllerApi {
1559                    client: self.client,
1560                };
1561                Ok(api.get_controller_config().await?.into())
1562            }
1563        }
1564    }
1565    /// Gets a flow analysis rule
1566    pub async fn get_flow_analysis_rule(
1567        &self,
1568        id: &str,
1569    ) -> Result<types::FlowAnalysisRuleEntity, NifiError> {
1570        match self.version {
1571            DetectedVersion::V2_6_0 => {
1572                let api = crate::v2_6_0::api::controller::ControllerApi {
1573                    client: self.client,
1574                };
1575                Ok(api.get_flow_analysis_rule(id).await?.into())
1576            }
1577            DetectedVersion::V2_7_2 => {
1578                let api = crate::v2_7_2::api::controller::ControllerApi {
1579                    client: self.client,
1580                };
1581                Ok(api.get_flow_analysis_rule(id).await?.into())
1582            }
1583            DetectedVersion::V2_8_0 => {
1584                let api = crate::v2_8_0::api::controller::ControllerApi {
1585                    client: self.client,
1586                };
1587                Ok(api.get_flow_analysis_rule(id).await?.into())
1588            }
1589        }
1590    }
1591    /// Gets a flow analysis rule property descriptor
1592    pub async fn get_flow_analysis_rule_property_descriptor(
1593        &self,
1594        id: &str,
1595        property_name: &str,
1596        sensitive: Option<bool>,
1597    ) -> Result<types::PropertyDescriptorDto, NifiError> {
1598        match self.version {
1599            DetectedVersion::V2_6_0 => {
1600                let api = crate::v2_6_0::api::controller::ControllerDescriptorsApi {
1601                    client: self.client,
1602                    id,
1603                };
1604                Ok(api
1605                    .get_flow_analysis_rule_property_descriptor(property_name, sensitive)
1606                    .await?
1607                    .into())
1608            }
1609            DetectedVersion::V2_7_2 => {
1610                let api = crate::v2_7_2::api::controller::ControllerDescriptorsApi {
1611                    client: self.client,
1612                    id,
1613                };
1614                Ok(api
1615                    .get_flow_analysis_rule_property_descriptor(property_name, sensitive)
1616                    .await?
1617                    .into())
1618            }
1619            DetectedVersion::V2_8_0 => {
1620                let api = crate::v2_8_0::api::controller::ControllerDescriptorsApi {
1621                    client: self.client,
1622                    id,
1623                };
1624                Ok(api
1625                    .get_flow_analysis_rule_property_descriptor(property_name, sensitive)
1626                    .await?
1627                    .into())
1628            }
1629        }
1630    }
1631    /// Gets the state for a flow analysis rule
1632    pub async fn get_flow_analysis_rule_state(
1633        &self,
1634        id: &str,
1635    ) -> Result<types::ComponentStateDto, NifiError> {
1636        match self.version {
1637            DetectedVersion::V2_6_0 => {
1638                let api = crate::v2_6_0::api::controller::ControllerStateApi {
1639                    client: self.client,
1640                    id,
1641                };
1642                Ok(api.get_flow_analysis_rule_state().await?.into())
1643            }
1644            DetectedVersion::V2_7_2 => {
1645                let api = crate::v2_7_2::api::controller::ControllerStateApi {
1646                    client: self.client,
1647                    id,
1648                };
1649                Ok(api.get_flow_analysis_rule_state().await?.into())
1650            }
1651            DetectedVersion::V2_8_0 => {
1652                let api = crate::v2_8_0::api::controller::ControllerStateApi {
1653                    client: self.client,
1654                    id,
1655                };
1656                Ok(api.get_flow_analysis_rule_state().await?.into())
1657            }
1658        }
1659    }
1660    /// Returns the Verification Request with the given ID
1661    pub async fn get_flow_analysis_rule_verification_request(
1662        &self,
1663        id: &str,
1664        request_id: &str,
1665    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
1666        match self.version {
1667            DetectedVersion::V2_6_0 => {
1668                let api = crate::v2_6_0::api::controller::ControllerConfigApi {
1669                    client: self.client,
1670                    id,
1671                };
1672                Ok(api
1673                    .get_flow_analysis_rule_verification_request(request_id)
1674                    .await?
1675                    .into())
1676            }
1677            DetectedVersion::V2_7_2 => {
1678                let api = crate::v2_7_2::api::controller::ControllerConfigApi {
1679                    client: self.client,
1680                    id,
1681                };
1682                Ok(api
1683                    .get_flow_analysis_rule_verification_request(request_id)
1684                    .await?
1685                    .into())
1686            }
1687            DetectedVersion::V2_8_0 => {
1688                let api = crate::v2_8_0::api::controller::ControllerConfigApi {
1689                    client: self.client,
1690                    id,
1691                };
1692                Ok(api
1693                    .get_flow_analysis_rule_verification_request(request_id)
1694                    .await?
1695                    .into())
1696            }
1697        }
1698    }
1699    /// Gets all flow analysis rules
1700    pub async fn get_flow_analysis_rules(
1701        &self,
1702    ) -> Result<types::FlowAnalysisRulesEntity, NifiError> {
1703        match self.version {
1704            DetectedVersion::V2_6_0 => {
1705                let api = crate::v2_6_0::api::controller::ControllerApi {
1706                    client: self.client,
1707                };
1708                Ok(api.get_flow_analysis_rules().await?.into())
1709            }
1710            DetectedVersion::V2_7_2 => {
1711                let api = crate::v2_7_2::api::controller::ControllerApi {
1712                    client: self.client,
1713                };
1714                Ok(api.get_flow_analysis_rules().await?.into())
1715            }
1716            DetectedVersion::V2_8_0 => {
1717                let api = crate::v2_8_0::api::controller::ControllerApi {
1718                    client: self.client,
1719                };
1720                Ok(api.get_flow_analysis_rules().await?.into())
1721            }
1722        }
1723    }
1724    /// Gets a flow registry client
1725    pub async fn get_flow_registry_client(
1726        &self,
1727        id: &str,
1728    ) -> Result<types::FlowRegistryClientEntity, NifiError> {
1729        match self.version {
1730            DetectedVersion::V2_6_0 => {
1731                let api = crate::v2_6_0::api::controller::ControllerApi {
1732                    client: self.client,
1733                };
1734                Ok(api.get_flow_registry_client(id).await?.into())
1735            }
1736            DetectedVersion::V2_7_2 => {
1737                let api = crate::v2_7_2::api::controller::ControllerApi {
1738                    client: self.client,
1739                };
1740                Ok(api.get_flow_registry_client(id).await?.into())
1741            }
1742            DetectedVersion::V2_8_0 => {
1743                let api = crate::v2_8_0::api::controller::ControllerApi {
1744                    client: self.client,
1745                };
1746                Ok(api.get_flow_registry_client(id).await?.into())
1747            }
1748        }
1749    }
1750    /// Gets the listing of available flow registry clients
1751    pub async fn get_flow_registry_clients(
1752        &self,
1753    ) -> Result<types::FlowRegistryClientsEntity, NifiError> {
1754        match self.version {
1755            DetectedVersion::V2_6_0 => {
1756                let api = crate::v2_6_0::api::controller::ControllerApi {
1757                    client: self.client,
1758                };
1759                Ok(api.get_flow_registry_clients().await?.into())
1760            }
1761            DetectedVersion::V2_7_2 => {
1762                let api = crate::v2_7_2::api::controller::ControllerApi {
1763                    client: self.client,
1764                };
1765                Ok(api.get_flow_registry_clients().await?.into())
1766            }
1767            DetectedVersion::V2_8_0 => {
1768                let api = crate::v2_8_0::api::controller::ControllerApi {
1769                    client: self.client,
1770                };
1771                Ok(api.get_flow_registry_clients().await?.into())
1772            }
1773        }
1774    }
1775    /// Retrieves the component types available from the installed NARs
1776    pub async fn get_nar_details(&self, id: &str) -> Result<types::NarDetailsEntity, NifiError> {
1777        match self.version {
1778            DetectedVersion::V2_6_0 => {
1779                let api = crate::v2_6_0::api::controller::ControllerDetailsApi {
1780                    client: self.client,
1781                    id,
1782                };
1783                Ok(api.get_nar_details().await?.into())
1784            }
1785            DetectedVersion::V2_7_2 => {
1786                let api = crate::v2_7_2::api::controller::ControllerDetailsApi {
1787                    client: self.client,
1788                    id,
1789                };
1790                Ok(api.get_nar_details().await?.into())
1791            }
1792            DetectedVersion::V2_8_0 => {
1793                let api = crate::v2_8_0::api::controller::ControllerDetailsApi {
1794                    client: self.client,
1795                    id,
1796                };
1797                Ok(api.get_nar_details().await?.into())
1798            }
1799        }
1800    }
1801    /// Retrieves summary information for installed NARs
1802    pub async fn get_nar_summaries(&self) -> Result<types::NarSummariesEntity, NifiError> {
1803        match self.version {
1804            DetectedVersion::V2_6_0 => {
1805                let api = crate::v2_6_0::api::controller::ControllerApi {
1806                    client: self.client,
1807                };
1808                Ok(api.get_nar_summaries().await?.into())
1809            }
1810            DetectedVersion::V2_7_2 => {
1811                let api = crate::v2_7_2::api::controller::ControllerApi {
1812                    client: self.client,
1813                };
1814                Ok(api.get_nar_summaries().await?.into())
1815            }
1816            DetectedVersion::V2_8_0 => {
1817                let api = crate::v2_8_0::api::controller::ControllerApi {
1818                    client: self.client,
1819                };
1820                Ok(api.get_nar_summaries().await?.into())
1821            }
1822        }
1823    }
1824    /// Retrieves the summary information for the NAR with the given identifier
1825    pub async fn get_nar_summary(&self, id: &str) -> Result<types::NarDetailsEntity, NifiError> {
1826        match self.version {
1827            DetectedVersion::V2_6_0 => {
1828                let api = crate::v2_6_0::api::controller::ControllerApi {
1829                    client: self.client,
1830                };
1831                Ok(api.get_nar_summary(id).await?.into())
1832            }
1833            DetectedVersion::V2_7_2 => {
1834                let api = crate::v2_7_2::api::controller::ControllerApi {
1835                    client: self.client,
1836                };
1837                Ok(api.get_nar_summary(id).await?.into())
1838            }
1839            DetectedVersion::V2_8_0 => {
1840                let api = crate::v2_8_0::api::controller::ControllerApi {
1841                    client: self.client,
1842                };
1843                Ok(api.get_nar_summary(id).await?.into())
1844            }
1845        }
1846    }
1847    /// Gets a node in the cluster
1848    pub async fn get_node(&self, id: &str) -> Result<types::NodeDto, NifiError> {
1849        match self.version {
1850            DetectedVersion::V2_6_0 => {
1851                let api = crate::v2_6_0::api::controller::ControllerApi {
1852                    client: self.client,
1853                };
1854                Ok(api.get_node(id).await?.into())
1855            }
1856            DetectedVersion::V2_7_2 => {
1857                let api = crate::v2_7_2::api::controller::ControllerApi {
1858                    client: self.client,
1859                };
1860                Ok(api.get_node(id).await?.into())
1861            }
1862            DetectedVersion::V2_8_0 => {
1863                let api = crate::v2_8_0::api::controller::ControllerApi {
1864                    client: self.client,
1865                };
1866                Ok(api.get_node(id).await?.into())
1867            }
1868        }
1869    }
1870    /// Gets status history for the node
1871    pub async fn get_node_status_history(&self) -> Result<types::ComponentHistoryDto, NifiError> {
1872        match self.version {
1873            DetectedVersion::V2_6_0 => {
1874                let api = crate::v2_6_0::api::controller::ControllerApi {
1875                    client: self.client,
1876                };
1877                Ok(api.get_node_status_history().await?.into())
1878            }
1879            DetectedVersion::V2_7_2 => {
1880                let api = crate::v2_7_2::api::controller::ControllerApi {
1881                    client: self.client,
1882                };
1883                Ok(api.get_node_status_history().await?.into())
1884            }
1885            DetectedVersion::V2_8_0 => {
1886                let api = crate::v2_8_0::api::controller::ControllerApi {
1887                    client: self.client,
1888                };
1889                Ok(api.get_node_status_history().await?.into())
1890            }
1891        }
1892    }
1893    /// Gets a flow registry client property descriptor
1894    pub async fn get_property_descriptor(
1895        &self,
1896        id: &str,
1897        property_name: &str,
1898        sensitive: Option<bool>,
1899    ) -> Result<types::PropertyDescriptorDto, NifiError> {
1900        match self.version {
1901            DetectedVersion::V2_6_0 => {
1902                let api = crate::v2_6_0::api::controller::ControllerDescriptorsApi {
1903                    client: self.client,
1904                    id,
1905                };
1906                Ok(api
1907                    .get_property_descriptor(property_name, sensitive)
1908                    .await?
1909                    .into())
1910            }
1911            DetectedVersion::V2_7_2 => {
1912                let api = crate::v2_7_2::api::controller::ControllerDescriptorsApi {
1913                    client: self.client,
1914                    id,
1915                };
1916                Ok(api
1917                    .get_property_descriptor(property_name, sensitive)
1918                    .await?
1919                    .into())
1920            }
1921            DetectedVersion::V2_8_0 => {
1922                let api = crate::v2_8_0::api::controller::ControllerDescriptorsApi {
1923                    client: self.client,
1924                    id,
1925                };
1926                Ok(api
1927                    .get_property_descriptor(property_name, sensitive)
1928                    .await?
1929                    .into())
1930            }
1931        }
1932    }
1933    /// Retrieves the types of flow  that this NiFi supports
1934    pub async fn get_registry_client_types(
1935        &self,
1936    ) -> Result<types::FlowRegistryClientTypesEntity, NifiError> {
1937        match self.version {
1938            DetectedVersion::V2_6_0 => {
1939                let api = crate::v2_6_0::api::controller::ControllerApi {
1940                    client: self.client,
1941                };
1942                Ok(api.get_registry_client_types().await?.into())
1943            }
1944            DetectedVersion::V2_7_2 => {
1945                let api = crate::v2_7_2::api::controller::ControllerApi {
1946                    client: self.client,
1947                };
1948                Ok(api.get_registry_client_types().await?.into())
1949            }
1950            DetectedVersion::V2_8_0 => {
1951                let api = crate::v2_8_0::api::controller::ControllerApi {
1952                    client: self.client,
1953                };
1954                Ok(api.get_registry_client_types().await?.into())
1955            }
1956        }
1957    }
1958    /// Returns the Verification Request with the given ID
1959    pub async fn get_registry_client_verification_request(
1960        &self,
1961        id: &str,
1962        request_id: &str,
1963    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
1964        match self.version {
1965            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
1966                endpoint: "get_registry_client_verification_request".to_string(),
1967                version: "2.6.0".to_string(),
1968            }),
1969            DetectedVersion::V2_7_2 => {
1970                let api = crate::v2_7_2::api::controller::ControllerConfigApi {
1971                    client: self.client,
1972                    id,
1973                };
1974                Ok(api
1975                    .get_registry_client_verification_request(request_id)
1976                    .await?
1977                    .into())
1978            }
1979            DetectedVersion::V2_8_0 => {
1980                let api = crate::v2_8_0::api::controller::ControllerConfigApi {
1981                    client: self.client,
1982                    id,
1983                };
1984                Ok(api
1985                    .get_registry_client_verification_request(request_id)
1986                    .await?
1987                    .into())
1988            }
1989        }
1990    }
1991    /// Imports a reporting task snapshot
1992    pub async fn import_reporting_task_snapshot(
1993        &self,
1994        body: &serde_json::Value,
1995    ) -> Result<types::VersionedReportingTaskImportResponseEntity, NifiError> {
1996        match self.version {
1997            DetectedVersion::V2_6_0 => {
1998                let api = crate::v2_6_0::api::controller::ControllerApi {
1999                    client: self.client,
2000                };
2001                Ok(api
2002                    .import_reporting_task_snapshot(
2003                        &serde_json::from_value::<
2004                            crate::v2_6_0::types::VersionedReportingTaskImportRequestEntity,
2005                        >(body.clone())
2006                        .map_err(|e| NifiError::UnsupportedEndpoint {
2007                            endpoint: format!(
2008                                "{} (body deserialize: {})",
2009                                "import_reporting_task_snapshot", e
2010                            ),
2011                            version: "2.6.0".to_string(),
2012                        })?,
2013                    )
2014                    .await?
2015                    .into())
2016            }
2017            DetectedVersion::V2_7_2 => {
2018                let api = crate::v2_7_2::api::controller::ControllerApi {
2019                    client: self.client,
2020                };
2021                Ok(api
2022                    .import_reporting_task_snapshot(
2023                        &serde_json::from_value::<
2024                            crate::v2_7_2::types::VersionedReportingTaskImportRequestEntity,
2025                        >(body.clone())
2026                        .map_err(|e| NifiError::UnsupportedEndpoint {
2027                            endpoint: format!(
2028                                "{} (body deserialize: {})",
2029                                "import_reporting_task_snapshot", e
2030                            ),
2031                            version: "2.7.2".to_string(),
2032                        })?,
2033                    )
2034                    .await?
2035                    .into())
2036            }
2037            DetectedVersion::V2_8_0 => {
2038                let api = crate::v2_8_0::api::controller::ControllerApi {
2039                    client: self.client,
2040                };
2041                Ok(api
2042                    .import_reporting_task_snapshot(
2043                        &serde_json::from_value::<
2044                            crate::v2_8_0::types::VersionedReportingTaskImportRequestEntity,
2045                        >(body.clone())
2046                        .map_err(|e| NifiError::UnsupportedEndpoint {
2047                            endpoint: format!(
2048                                "{} (body deserialize: {})",
2049                                "import_reporting_task_snapshot", e
2050                            ),
2051                            version: "2.8.0".to_string(),
2052                        })?,
2053                    )
2054                    .await?
2055                    .into())
2056            }
2057        }
2058    }
2059    /// Deletes a flow analysis rule
2060    pub async fn remove_flow_analysis_rule(
2061        &self,
2062        id: &str,
2063        version: Option<&str>,
2064        client_id: Option<&str>,
2065        disconnected_node_acknowledged: Option<bool>,
2066    ) -> Result<types::FlowAnalysisRuleEntity, NifiError> {
2067        match self.version {
2068            DetectedVersion::V2_6_0 => {
2069                let api = crate::v2_6_0::api::controller::ControllerApi {
2070                    client: self.client,
2071                };
2072                Ok(api
2073                    .remove_flow_analysis_rule(
2074                        id,
2075                        version,
2076                        client_id,
2077                        disconnected_node_acknowledged,
2078                    )
2079                    .await?
2080                    .into())
2081            }
2082            DetectedVersion::V2_7_2 => {
2083                let api = crate::v2_7_2::api::controller::ControllerApi {
2084                    client: self.client,
2085                };
2086                Ok(api
2087                    .remove_flow_analysis_rule(
2088                        id,
2089                        version,
2090                        client_id,
2091                        disconnected_node_acknowledged,
2092                    )
2093                    .await?
2094                    .into())
2095            }
2096            DetectedVersion::V2_8_0 => {
2097                let api = crate::v2_8_0::api::controller::ControllerApi {
2098                    client: self.client,
2099                };
2100                Ok(api
2101                    .remove_flow_analysis_rule(
2102                        id,
2103                        version,
2104                        client_id,
2105                        disconnected_node_acknowledged,
2106                    )
2107                    .await?
2108                    .into())
2109            }
2110        }
2111    }
2112    /// Performs verification of the Flow Analysis Rule's configuration
2113    pub async fn submit_flow_analysis_rule_config_verification_request(
2114        &self,
2115        id: &str,
2116        body: &serde_json::Value,
2117    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
2118        match self.version {
2119            DetectedVersion::V2_6_0 => {
2120                let api = crate::v2_6_0::api::controller::ControllerConfigApi {
2121                    client: self.client,
2122                    id,
2123                };
2124                Ok(api
2125                    .submit_flow_analysis_rule_config_verification_request(
2126                        &serde_json::from_value::<crate::v2_6_0::types::VerifyConfigRequestEntity>(
2127                            body.clone(),
2128                        )
2129                        .map_err(|e| NifiError::UnsupportedEndpoint {
2130                            endpoint: format!(
2131                                "{} (body deserialize: {})",
2132                                "submit_flow_analysis_rule_config_verification_request", e
2133                            ),
2134                            version: "2.6.0".to_string(),
2135                        })?,
2136                    )
2137                    .await?
2138                    .into())
2139            }
2140            DetectedVersion::V2_7_2 => {
2141                let api = crate::v2_7_2::api::controller::ControllerConfigApi {
2142                    client: self.client,
2143                    id,
2144                };
2145                Ok(api
2146                    .submit_flow_analysis_rule_config_verification_request(
2147                        &serde_json::from_value::<crate::v2_7_2::types::VerifyConfigRequestEntity>(
2148                            body.clone(),
2149                        )
2150                        .map_err(|e| NifiError::UnsupportedEndpoint {
2151                            endpoint: format!(
2152                                "{} (body deserialize: {})",
2153                                "submit_flow_analysis_rule_config_verification_request", e
2154                            ),
2155                            version: "2.7.2".to_string(),
2156                        })?,
2157                    )
2158                    .await?
2159                    .into())
2160            }
2161            DetectedVersion::V2_8_0 => {
2162                let api = crate::v2_8_0::api::controller::ControllerConfigApi {
2163                    client: self.client,
2164                    id,
2165                };
2166                Ok(api
2167                    .submit_flow_analysis_rule_config_verification_request(
2168                        &serde_json::from_value::<crate::v2_8_0::types::VerifyConfigRequestEntity>(
2169                            body.clone(),
2170                        )
2171                        .map_err(|e| NifiError::UnsupportedEndpoint {
2172                            endpoint: format!(
2173                                "{} (body deserialize: {})",
2174                                "submit_flow_analysis_rule_config_verification_request", e
2175                            ),
2176                            version: "2.8.0".to_string(),
2177                        })?,
2178                    )
2179                    .await?
2180                    .into())
2181            }
2182        }
2183    }
2184    /// Performs verification of the Registry Client's configuration
2185    pub async fn submit_registry_client_config_verification_request(
2186        &self,
2187        id: &str,
2188        body: &serde_json::Value,
2189    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
2190        match self.version {
2191            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
2192                endpoint: "submit_registry_client_config_verification_request".to_string(),
2193                version: "2.6.0".to_string(),
2194            }),
2195            DetectedVersion::V2_7_2 => {
2196                let api = crate::v2_7_2::api::controller::ControllerConfigApi {
2197                    client: self.client,
2198                    id,
2199                };
2200                Ok(api
2201                    .submit_registry_client_config_verification_request(
2202                        &serde_json::from_value::<crate::v2_7_2::types::VerifyConfigRequestEntity>(
2203                            body.clone(),
2204                        )
2205                        .map_err(|e| NifiError::UnsupportedEndpoint {
2206                            endpoint: format!(
2207                                "{} (body deserialize: {})",
2208                                "submit_registry_client_config_verification_request", e
2209                            ),
2210                            version: "2.7.2".to_string(),
2211                        })?,
2212                    )
2213                    .await?
2214                    .into())
2215            }
2216            DetectedVersion::V2_8_0 => {
2217                let api = crate::v2_8_0::api::controller::ControllerConfigApi {
2218                    client: self.client,
2219                    id,
2220                };
2221                Ok(api
2222                    .submit_registry_client_config_verification_request(
2223                        &serde_json::from_value::<crate::v2_8_0::types::VerifyConfigRequestEntity>(
2224                            body.clone(),
2225                        )
2226                        .map_err(|e| NifiError::UnsupportedEndpoint {
2227                            endpoint: format!(
2228                                "{} (body deserialize: {})",
2229                                "submit_registry_client_config_verification_request", e
2230                            ),
2231                            version: "2.8.0".to_string(),
2232                        })?,
2233                    )
2234                    .await?
2235                    .into())
2236            }
2237        }
2238    }
2239    /// Retrieves the configuration for this NiFi
2240    pub async fn update_controller_config(
2241        &self,
2242        body: &serde_json::Value,
2243    ) -> Result<types::ControllerConfigurationEntity, NifiError> {
2244        match self.version {
2245            DetectedVersion::V2_6_0 => {
2246                let api = crate::v2_6_0::api::controller::ControllerApi {
2247                    client: self.client,
2248                };
2249                Ok(api
2250                    .update_controller_config(
2251                        &serde_json::from_value::<
2252                            crate::v2_6_0::types::ControllerConfigurationEntity,
2253                        >(body.clone())
2254                        .map_err(|e| NifiError::UnsupportedEndpoint {
2255                            endpoint: format!(
2256                                "{} (body deserialize: {})",
2257                                "update_controller_config", e
2258                            ),
2259                            version: "2.6.0".to_string(),
2260                        })?,
2261                    )
2262                    .await?
2263                    .into())
2264            }
2265            DetectedVersion::V2_7_2 => {
2266                let api = crate::v2_7_2::api::controller::ControllerApi {
2267                    client: self.client,
2268                };
2269                Ok(api
2270                    .update_controller_config(
2271                        &serde_json::from_value::<
2272                            crate::v2_7_2::types::ControllerConfigurationEntity,
2273                        >(body.clone())
2274                        .map_err(|e| NifiError::UnsupportedEndpoint {
2275                            endpoint: format!(
2276                                "{} (body deserialize: {})",
2277                                "update_controller_config", e
2278                            ),
2279                            version: "2.7.2".to_string(),
2280                        })?,
2281                    )
2282                    .await?
2283                    .into())
2284            }
2285            DetectedVersion::V2_8_0 => {
2286                let api = crate::v2_8_0::api::controller::ControllerApi {
2287                    client: self.client,
2288                };
2289                Ok(api
2290                    .update_controller_config(
2291                        &serde_json::from_value::<
2292                            crate::v2_8_0::types::ControllerConfigurationEntity,
2293                        >(body.clone())
2294                        .map_err(|e| NifiError::UnsupportedEndpoint {
2295                            endpoint: format!(
2296                                "{} (body deserialize: {})",
2297                                "update_controller_config", e
2298                            ),
2299                            version: "2.8.0".to_string(),
2300                        })?,
2301                    )
2302                    .await?
2303                    .into())
2304            }
2305        }
2306    }
2307    /// Updates a flow analysis rule
2308    pub async fn update_flow_analysis_rule(
2309        &self,
2310        id: &str,
2311        body: &serde_json::Value,
2312    ) -> Result<types::FlowAnalysisRuleEntity, NifiError> {
2313        match self.version {
2314            DetectedVersion::V2_6_0 => {
2315                let api = crate::v2_6_0::api::controller::ControllerApi {
2316                    client: self.client,
2317                };
2318                Ok(api
2319                    .update_flow_analysis_rule(
2320                        id,
2321                        &serde_json::from_value::<crate::v2_6_0::types::FlowAnalysisRuleEntity>(
2322                            body.clone(),
2323                        )
2324                        .map_err(|e| NifiError::UnsupportedEndpoint {
2325                            endpoint: format!(
2326                                "{} (body deserialize: {})",
2327                                "update_flow_analysis_rule", e
2328                            ),
2329                            version: "2.6.0".to_string(),
2330                        })?,
2331                    )
2332                    .await?
2333                    .into())
2334            }
2335            DetectedVersion::V2_7_2 => {
2336                let api = crate::v2_7_2::api::controller::ControllerApi {
2337                    client: self.client,
2338                };
2339                Ok(api
2340                    .update_flow_analysis_rule(
2341                        id,
2342                        &serde_json::from_value::<crate::v2_7_2::types::FlowAnalysisRuleEntity>(
2343                            body.clone(),
2344                        )
2345                        .map_err(|e| NifiError::UnsupportedEndpoint {
2346                            endpoint: format!(
2347                                "{} (body deserialize: {})",
2348                                "update_flow_analysis_rule", e
2349                            ),
2350                            version: "2.7.2".to_string(),
2351                        })?,
2352                    )
2353                    .await?
2354                    .into())
2355            }
2356            DetectedVersion::V2_8_0 => {
2357                let api = crate::v2_8_0::api::controller::ControllerApi {
2358                    client: self.client,
2359                };
2360                Ok(api
2361                    .update_flow_analysis_rule(
2362                        id,
2363                        &serde_json::from_value::<crate::v2_8_0::types::FlowAnalysisRuleEntity>(
2364                            body.clone(),
2365                        )
2366                        .map_err(|e| NifiError::UnsupportedEndpoint {
2367                            endpoint: format!(
2368                                "{} (body deserialize: {})",
2369                                "update_flow_analysis_rule", e
2370                            ),
2371                            version: "2.8.0".to_string(),
2372                        })?,
2373                    )
2374                    .await?
2375                    .into())
2376            }
2377        }
2378    }
2379    /// Updates a flow registry client
2380    pub async fn update_flow_registry_client(
2381        &self,
2382        id: &str,
2383        body: &serde_json::Value,
2384    ) -> Result<types::FlowRegistryClientEntity, NifiError> {
2385        match self.version {
2386            DetectedVersion::V2_6_0 => {
2387                let api = crate::v2_6_0::api::controller::ControllerApi {
2388                    client: self.client,
2389                };
2390                Ok(api
2391                    .update_flow_registry_client(
2392                        id,
2393                        &serde_json::from_value::<crate::v2_6_0::types::FlowRegistryClientEntity>(
2394                            body.clone(),
2395                        )
2396                        .map_err(|e| NifiError::UnsupportedEndpoint {
2397                            endpoint: format!(
2398                                "{} (body deserialize: {})",
2399                                "update_flow_registry_client", e
2400                            ),
2401                            version: "2.6.0".to_string(),
2402                        })?,
2403                    )
2404                    .await?
2405                    .into())
2406            }
2407            DetectedVersion::V2_7_2 => {
2408                let api = crate::v2_7_2::api::controller::ControllerApi {
2409                    client: self.client,
2410                };
2411                Ok(api
2412                    .update_flow_registry_client(
2413                        id,
2414                        &serde_json::from_value::<crate::v2_7_2::types::FlowRegistryClientEntity>(
2415                            body.clone(),
2416                        )
2417                        .map_err(|e| NifiError::UnsupportedEndpoint {
2418                            endpoint: format!(
2419                                "{} (body deserialize: {})",
2420                                "update_flow_registry_client", e
2421                            ),
2422                            version: "2.7.2".to_string(),
2423                        })?,
2424                    )
2425                    .await?
2426                    .into())
2427            }
2428            DetectedVersion::V2_8_0 => {
2429                let api = crate::v2_8_0::api::controller::ControllerApi {
2430                    client: self.client,
2431                };
2432                Ok(api
2433                    .update_flow_registry_client(
2434                        id,
2435                        &serde_json::from_value::<crate::v2_8_0::types::FlowRegistryClientEntity>(
2436                            body.clone(),
2437                        )
2438                        .map_err(|e| NifiError::UnsupportedEndpoint {
2439                            endpoint: format!(
2440                                "{} (body deserialize: {})",
2441                                "update_flow_registry_client", e
2442                            ),
2443                            version: "2.8.0".to_string(),
2444                        })?,
2445                    )
2446                    .await?
2447                    .into())
2448            }
2449        }
2450    }
2451    /// Updates a node in the cluster
2452    pub async fn update_node(
2453        &self,
2454        id: &str,
2455        body: &serde_json::Value,
2456    ) -> Result<types::NodeDto, NifiError> {
2457        match self.version {
2458            DetectedVersion::V2_6_0 => {
2459                let api = crate::v2_6_0::api::controller::ControllerApi {
2460                    client: self.client,
2461                };
2462                Ok(api
2463                    .update_node(
2464                        id,
2465                        &serde_json::from_value::<crate::v2_6_0::types::NodeEntity>(body.clone())
2466                            .map_err(|e| NifiError::UnsupportedEndpoint {
2467                            endpoint: format!("{} (body deserialize: {})", "update_node", e),
2468                            version: "2.6.0".to_string(),
2469                        })?,
2470                    )
2471                    .await?
2472                    .into())
2473            }
2474            DetectedVersion::V2_7_2 => {
2475                let api = crate::v2_7_2::api::controller::ControllerApi {
2476                    client: self.client,
2477                };
2478                Ok(api
2479                    .update_node(
2480                        id,
2481                        &serde_json::from_value::<crate::v2_7_2::types::NodeEntity>(body.clone())
2482                            .map_err(|e| NifiError::UnsupportedEndpoint {
2483                            endpoint: format!("{} (body deserialize: {})", "update_node", e),
2484                            version: "2.7.2".to_string(),
2485                        })?,
2486                    )
2487                    .await?
2488                    .into())
2489            }
2490            DetectedVersion::V2_8_0 => {
2491                let api = crate::v2_8_0::api::controller::ControllerApi {
2492                    client: self.client,
2493                };
2494                Ok(api
2495                    .update_node(
2496                        id,
2497                        &serde_json::from_value::<crate::v2_8_0::types::NodeEntity>(body.clone())
2498                            .map_err(|e| NifiError::UnsupportedEndpoint {
2499                            endpoint: format!("{} (body deserialize: {})", "update_node", e),
2500                            version: "2.8.0".to_string(),
2501                        })?,
2502                    )
2503                    .await?
2504                    .into())
2505            }
2506        }
2507    }
2508    /// Updates run status of a flow analysis rule
2509    pub async fn update_run_status(
2510        &self,
2511        id: &str,
2512        body: &serde_json::Value,
2513    ) -> Result<types::FlowAnalysisRuleEntity, NifiError> {
2514        match self.version {
2515            DetectedVersion::V2_6_0 => {
2516                let api = crate::v2_6_0::api::controller::ControllerRunStatusApi {
2517                    client: self.client,
2518                    id,
2519                };
2520                Ok(api
2521                    .update_run_status(
2522                        &serde_json::from_value::<
2523                            crate::v2_6_0::types::FlowAnalysisRuleRunStatusEntity,
2524                        >(body.clone())
2525                        .map_err(|e| NifiError::UnsupportedEndpoint {
2526                            endpoint: format!("{} (body deserialize: {})", "update_run_status", e),
2527                            version: "2.6.0".to_string(),
2528                        })?,
2529                    )
2530                    .await?
2531                    .into())
2532            }
2533            DetectedVersion::V2_7_2 => {
2534                let api = crate::v2_7_2::api::controller::ControllerRunStatusApi {
2535                    client: self.client,
2536                    id,
2537                };
2538                Ok(api
2539                    .update_run_status(
2540                        &serde_json::from_value::<
2541                            crate::v2_7_2::types::FlowAnalysisRuleRunStatusEntity,
2542                        >(body.clone())
2543                        .map_err(|e| NifiError::UnsupportedEndpoint {
2544                            endpoint: format!("{} (body deserialize: {})", "update_run_status", e),
2545                            version: "2.7.2".to_string(),
2546                        })?,
2547                    )
2548                    .await?
2549                    .into())
2550            }
2551            DetectedVersion::V2_8_0 => {
2552                let api = crate::v2_8_0::api::controller::ControllerRunStatusApi {
2553                    client: self.client,
2554                    id,
2555                };
2556                Ok(api
2557                    .update_run_status(
2558                        &serde_json::from_value::<
2559                            crate::v2_8_0::types::FlowAnalysisRuleRunStatusEntity,
2560                        >(body.clone())
2561                        .map_err(|e| NifiError::UnsupportedEndpoint {
2562                            endpoint: format!("{} (body deserialize: {})", "update_run_status", e),
2563                            version: "2.8.0".to_string(),
2564                        })?,
2565                    )
2566                    .await?
2567                    .into())
2568            }
2569        }
2570    }
2571    /// Uploads a NAR and requests for it to be installed
2572    pub async fn upload_nar(
2573        &self,
2574        filename: Option<&str>,
2575        data: Vec<u8>,
2576    ) -> Result<types::NarSummaryDto, NifiError> {
2577        match self.version {
2578            DetectedVersion::V2_6_0 => {
2579                let api = crate::v2_6_0::api::controller::ControllerApi {
2580                    client: self.client,
2581                };
2582                Ok(api.upload_nar(filename, data).await?.into())
2583            }
2584            DetectedVersion::V2_7_2 => {
2585                let api = crate::v2_7_2::api::controller::ControllerApi {
2586                    client: self.client,
2587                };
2588                Ok(api.upload_nar(filename, data).await?.into())
2589            }
2590            DetectedVersion::V2_8_0 => {
2591                let api = crate::v2_8_0::api::controller::ControllerApi {
2592                    client: self.client,
2593                };
2594                Ok(api.upload_nar(filename, data).await?.into())
2595            }
2596        }
2597    }
2598}
2599/// Dynamic dispatch wrapper for the Controller Services API.
2600pub struct DynamicControllerServicesApi<'a> {
2601    client: &'a NifiClient,
2602    version: DetectedVersion,
2603}
2604#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
2605impl<'a> DynamicControllerServicesApi<'a> {
2606    /// Performs analysis of the component's configuration, providing information about which attributes are referenced.
2607    pub async fn analyze_configuration(
2608        &self,
2609        id: &str,
2610        body: &serde_json::Value,
2611    ) -> Result<types::ConfigurationAnalysisDto, NifiError> {
2612        match self.version {
2613            DetectedVersion::V2_6_0 => {
2614                let api = crate::v2_6_0::api::controller_services::ControllerServicesConfigApi {
2615                    client: self.client,
2616                    id,
2617                };
2618                Ok(
2619                    api
2620                        .analyze_configuration(
2621                            &serde_json::from_value::<
2622                                crate::v2_6_0::types::ConfigurationAnalysisEntity,
2623                            >(body.clone())
2624                            .map_err(|e| NifiError::UnsupportedEndpoint {
2625                                endpoint: format!(
2626                                    "{} (body deserialize: {})",
2627                                    "analyze_configuration", e
2628                                ),
2629                                version: "2.6.0".to_string(),
2630                            })?,
2631                        )
2632                        .await?
2633                        .into(),
2634                )
2635            }
2636            DetectedVersion::V2_7_2 => {
2637                let api = crate::v2_7_2::api::controller_services::ControllerServicesConfigApi {
2638                    client: self.client,
2639                    id,
2640                };
2641                Ok(
2642                    api
2643                        .analyze_configuration(
2644                            &serde_json::from_value::<
2645                                crate::v2_7_2::types::ConfigurationAnalysisEntity,
2646                            >(body.clone())
2647                            .map_err(|e| NifiError::UnsupportedEndpoint {
2648                                endpoint: format!(
2649                                    "{} (body deserialize: {})",
2650                                    "analyze_configuration", e
2651                                ),
2652                                version: "2.7.2".to_string(),
2653                            })?,
2654                        )
2655                        .await?
2656                        .into(),
2657                )
2658            }
2659            DetectedVersion::V2_8_0 => {
2660                let api = crate::v2_8_0::api::controller_services::ControllerServicesConfigApi {
2661                    client: self.client,
2662                    id,
2663                };
2664                Ok(
2665                    api
2666                        .analyze_configuration(
2667                            &serde_json::from_value::<
2668                                crate::v2_8_0::types::ConfigurationAnalysisEntity,
2669                            >(body.clone())
2670                            .map_err(|e| NifiError::UnsupportedEndpoint {
2671                                endpoint: format!(
2672                                    "{} (body deserialize: {})",
2673                                    "analyze_configuration", e
2674                                ),
2675                                version: "2.8.0".to_string(),
2676                            })?,
2677                        )
2678                        .await?
2679                        .into(),
2680                )
2681            }
2682        }
2683    }
2684    /// Clears bulletins for a controller service
2685    pub async fn clear_bulletins(
2686        &self,
2687        id: &str,
2688        body: &serde_json::Value,
2689    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
2690        match self.version {
2691            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
2692                endpoint: "clear_bulletins".to_string(),
2693                version: "2.6.0".to_string(),
2694            }),
2695            DetectedVersion::V2_7_2 => {
2696                let api = crate::v2_7_2::api::controller_services::ControllerServicesBulletinsApi {
2697                    client: self.client,
2698                    id,
2699                };
2700                Ok(
2701                    api
2702                        .clear_bulletins(
2703                            &serde_json::from_value::<
2704                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
2705                            >(body.clone())
2706                            .map_err(|e| NifiError::UnsupportedEndpoint {
2707                                endpoint: format!(
2708                                    "{} (body deserialize: {})",
2709                                    "clear_bulletins", e
2710                                ),
2711                                version: "2.7.2".to_string(),
2712                            })?,
2713                        )
2714                        .await?
2715                        .into(),
2716                )
2717            }
2718            DetectedVersion::V2_8_0 => {
2719                let api = crate::v2_8_0::api::controller_services::ControllerServicesBulletinsApi {
2720                    client: self.client,
2721                    id,
2722                };
2723                Ok(
2724                    api
2725                        .clear_bulletins(
2726                            &serde_json::from_value::<
2727                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
2728                            >(body.clone())
2729                            .map_err(|e| NifiError::UnsupportedEndpoint {
2730                                endpoint: format!(
2731                                    "{} (body deserialize: {})",
2732                                    "clear_bulletins", e
2733                                ),
2734                                version: "2.8.0".to_string(),
2735                            })?,
2736                        )
2737                        .await?
2738                        .into(),
2739                )
2740            }
2741        }
2742    }
2743    /// Clears the state for a controller service
2744    pub async fn clear_state_1(
2745        &self,
2746        id: &str,
2747        body: &serde_json::Value,
2748    ) -> Result<types::ComponentStateDto, NifiError> {
2749        match self.version {
2750            DetectedVersion::V2_6_0 => {
2751                let api = crate::v2_6_0::api::controller_services::ControllerServicesStateApi {
2752                    client: self.client,
2753                    id,
2754                };
2755                Ok(api
2756                    .clear_state_1(
2757                        &serde_json::from_value::<crate::v2_6_0::types::ComponentStateEntity>(
2758                            body.clone(),
2759                        )
2760                        .map_err(|e| NifiError::UnsupportedEndpoint {
2761                            endpoint: format!("{} (body deserialize: {})", "clear_state_1", e),
2762                            version: "2.6.0".to_string(),
2763                        })?,
2764                    )
2765                    .await?
2766                    .into())
2767            }
2768            DetectedVersion::V2_7_2 => {
2769                let api = crate::v2_7_2::api::controller_services::ControllerServicesStateApi {
2770                    client: self.client,
2771                    id,
2772                };
2773                Ok(api
2774                    .clear_state_1(
2775                        &serde_json::from_value::<crate::v2_7_2::types::ComponentStateEntity>(
2776                            body.clone(),
2777                        )
2778                        .map_err(|e| NifiError::UnsupportedEndpoint {
2779                            endpoint: format!("{} (body deserialize: {})", "clear_state_1", e),
2780                            version: "2.7.2".to_string(),
2781                        })?,
2782                    )
2783                    .await?
2784                    .into())
2785            }
2786            DetectedVersion::V2_8_0 => {
2787                let api = crate::v2_8_0::api::controller_services::ControllerServicesStateApi {
2788                    client: self.client,
2789                    id,
2790                };
2791                Ok(api
2792                    .clear_state_1(
2793                        &serde_json::from_value::<crate::v2_8_0::types::ComponentStateEntity>(
2794                            body.clone(),
2795                        )
2796                        .map_err(|e| NifiError::UnsupportedEndpoint {
2797                            endpoint: format!("{} (body deserialize: {})", "clear_state_1", e),
2798                            version: "2.8.0".to_string(),
2799                        })?,
2800                    )
2801                    .await?
2802                    .into())
2803            }
2804        }
2805    }
2806    /// Deletes the Verification Request with the given ID
2807    pub async fn delete_verification_request(
2808        &self,
2809        id: &str,
2810        request_id: &str,
2811    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
2812        match self.version {
2813            DetectedVersion::V2_6_0 => {
2814                let api = crate::v2_6_0::api::controller_services::ControllerServicesConfigApi {
2815                    client: self.client,
2816                    id,
2817                };
2818                Ok(api.delete_verification_request(request_id).await?.into())
2819            }
2820            DetectedVersion::V2_7_2 => {
2821                let api = crate::v2_7_2::api::controller_services::ControllerServicesConfigApi {
2822                    client: self.client,
2823                    id,
2824                };
2825                Ok(api.delete_verification_request(request_id).await?.into())
2826            }
2827            DetectedVersion::V2_8_0 => {
2828                let api = crate::v2_8_0::api::controller_services::ControllerServicesConfigApi {
2829                    client: self.client,
2830                    id,
2831                };
2832                Ok(api.delete_verification_request(request_id).await?.into())
2833            }
2834        }
2835    }
2836    /// Gets a controller service
2837    pub async fn get_controller_service(
2838        &self,
2839        id: &str,
2840        ui_only: Option<bool>,
2841    ) -> Result<types::ControllerServiceEntity, NifiError> {
2842        match self.version {
2843            DetectedVersion::V2_6_0 => {
2844                let api = crate::v2_6_0::api::controller_services::ControllerServicesApi {
2845                    client: self.client,
2846                };
2847                Ok(api.get_controller_service(id, ui_only).await?.into())
2848            }
2849            DetectedVersion::V2_7_2 => {
2850                let api = crate::v2_7_2::api::controller_services::ControllerServicesApi {
2851                    client: self.client,
2852                };
2853                Ok(api.get_controller_service(id, ui_only).await?.into())
2854            }
2855            DetectedVersion::V2_8_0 => {
2856                let api = crate::v2_8_0::api::controller_services::ControllerServicesApi {
2857                    client: self.client,
2858                };
2859                Ok(api.get_controller_service(id, ui_only).await?.into())
2860            }
2861        }
2862    }
2863    /// Gets a controller service
2864    pub async fn get_controller_service_references(
2865        &self,
2866        id: &str,
2867    ) -> Result<types::ControllerServiceReferencingComponentsEntity, NifiError> {
2868        match self.version {
2869            DetectedVersion::V2_6_0 => {
2870                let api =
2871                    crate::v2_6_0::api::controller_services::ControllerServicesReferencesApi {
2872                        client: self.client,
2873                        id,
2874                    };
2875                Ok(api.get_controller_service_references().await?.into())
2876            }
2877            DetectedVersion::V2_7_2 => {
2878                let api =
2879                    crate::v2_7_2::api::controller_services::ControllerServicesReferencesApi {
2880                        client: self.client,
2881                        id,
2882                    };
2883                Ok(api.get_controller_service_references().await?.into())
2884            }
2885            DetectedVersion::V2_8_0 => {
2886                let api =
2887                    crate::v2_8_0::api::controller_services::ControllerServicesReferencesApi {
2888                        client: self.client,
2889                        id,
2890                    };
2891                Ok(api.get_controller_service_references().await?.into())
2892            }
2893        }
2894    }
2895    /// Gets a controller service property descriptor
2896    pub async fn get_property_descriptor_1(
2897        &self,
2898        id: &str,
2899        property_name: &str,
2900        sensitive: Option<bool>,
2901    ) -> Result<types::PropertyDescriptorDto, NifiError> {
2902        match self.version {
2903            DetectedVersion::V2_6_0 => {
2904                let api =
2905                    crate::v2_6_0::api::controller_services::ControllerServicesDescriptorsApi {
2906                        client: self.client,
2907                        id,
2908                    };
2909                Ok(api
2910                    .get_property_descriptor_1(property_name, sensitive)
2911                    .await?
2912                    .into())
2913            }
2914            DetectedVersion::V2_7_2 => {
2915                let api =
2916                    crate::v2_7_2::api::controller_services::ControllerServicesDescriptorsApi {
2917                        client: self.client,
2918                        id,
2919                    };
2920                Ok(api
2921                    .get_property_descriptor_1(property_name, sensitive)
2922                    .await?
2923                    .into())
2924            }
2925            DetectedVersion::V2_8_0 => {
2926                let api =
2927                    crate::v2_8_0::api::controller_services::ControllerServicesDescriptorsApi {
2928                        client: self.client,
2929                        id,
2930                    };
2931                Ok(api
2932                    .get_property_descriptor_1(property_name, sensitive)
2933                    .await?
2934                    .into())
2935            }
2936        }
2937    }
2938    /// Gets the state for a controller service
2939    pub async fn get_state(&self, id: &str) -> Result<types::ComponentStateDto, NifiError> {
2940        match self.version {
2941            DetectedVersion::V2_6_0 => {
2942                let api = crate::v2_6_0::api::controller_services::ControllerServicesStateApi {
2943                    client: self.client,
2944                    id,
2945                };
2946                Ok(api.get_state().await?.into())
2947            }
2948            DetectedVersion::V2_7_2 => {
2949                let api = crate::v2_7_2::api::controller_services::ControllerServicesStateApi {
2950                    client: self.client,
2951                    id,
2952                };
2953                Ok(api.get_state().await?.into())
2954            }
2955            DetectedVersion::V2_8_0 => {
2956                let api = crate::v2_8_0::api::controller_services::ControllerServicesStateApi {
2957                    client: self.client,
2958                    id,
2959                };
2960                Ok(api.get_state().await?.into())
2961            }
2962        }
2963    }
2964    /// Returns the Verification Request with the given ID
2965    pub async fn get_verification_request(
2966        &self,
2967        id: &str,
2968        request_id: &str,
2969    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
2970        match self.version {
2971            DetectedVersion::V2_6_0 => {
2972                let api = crate::v2_6_0::api::controller_services::ControllerServicesConfigApi {
2973                    client: self.client,
2974                    id,
2975                };
2976                Ok(api.get_verification_request(request_id).await?.into())
2977            }
2978            DetectedVersion::V2_7_2 => {
2979                let api = crate::v2_7_2::api::controller_services::ControllerServicesConfigApi {
2980                    client: self.client,
2981                    id,
2982                };
2983                Ok(api.get_verification_request(request_id).await?.into())
2984            }
2985            DetectedVersion::V2_8_0 => {
2986                let api = crate::v2_8_0::api::controller_services::ControllerServicesConfigApi {
2987                    client: self.client,
2988                    id,
2989                };
2990                Ok(api.get_verification_request(request_id).await?.into())
2991            }
2992        }
2993    }
2994    /// Deletes a controller service
2995    pub async fn remove_controller_service(
2996        &self,
2997        id: &str,
2998        version: Option<&str>,
2999        client_id: Option<&str>,
3000        disconnected_node_acknowledged: Option<bool>,
3001    ) -> Result<types::ControllerServiceEntity, NifiError> {
3002        match self.version {
3003            DetectedVersion::V2_6_0 => {
3004                let api = crate::v2_6_0::api::controller_services::ControllerServicesApi {
3005                    client: self.client,
3006                };
3007                Ok(api
3008                    .remove_controller_service(
3009                        id,
3010                        version,
3011                        client_id,
3012                        disconnected_node_acknowledged,
3013                    )
3014                    .await?
3015                    .into())
3016            }
3017            DetectedVersion::V2_7_2 => {
3018                let api = crate::v2_7_2::api::controller_services::ControllerServicesApi {
3019                    client: self.client,
3020                };
3021                Ok(api
3022                    .remove_controller_service(
3023                        id,
3024                        version,
3025                        client_id,
3026                        disconnected_node_acknowledged,
3027                    )
3028                    .await?
3029                    .into())
3030            }
3031            DetectedVersion::V2_8_0 => {
3032                let api = crate::v2_8_0::api::controller_services::ControllerServicesApi {
3033                    client: self.client,
3034                };
3035                Ok(api
3036                    .remove_controller_service(
3037                        id,
3038                        version,
3039                        client_id,
3040                        disconnected_node_acknowledged,
3041                    )
3042                    .await?
3043                    .into())
3044            }
3045        }
3046    }
3047    /// Performs verification of the Controller Service's configuration
3048    pub async fn submit_config_verification_request(
3049        &self,
3050        id: &str,
3051        body: &serde_json::Value,
3052    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
3053        match self.version {
3054            DetectedVersion::V2_6_0 => {
3055                let api = crate::v2_6_0::api::controller_services::ControllerServicesConfigApi {
3056                    client: self.client,
3057                    id,
3058                };
3059                Ok(api
3060                    .submit_config_verification_request(
3061                        &serde_json::from_value::<crate::v2_6_0::types::VerifyConfigRequestEntity>(
3062                            body.clone(),
3063                        )
3064                        .map_err(|e| NifiError::UnsupportedEndpoint {
3065                            endpoint: format!(
3066                                "{} (body deserialize: {})",
3067                                "submit_config_verification_request", e
3068                            ),
3069                            version: "2.6.0".to_string(),
3070                        })?,
3071                    )
3072                    .await?
3073                    .into())
3074            }
3075            DetectedVersion::V2_7_2 => {
3076                let api = crate::v2_7_2::api::controller_services::ControllerServicesConfigApi {
3077                    client: self.client,
3078                    id,
3079                };
3080                Ok(api
3081                    .submit_config_verification_request(
3082                        &serde_json::from_value::<crate::v2_7_2::types::VerifyConfigRequestEntity>(
3083                            body.clone(),
3084                        )
3085                        .map_err(|e| NifiError::UnsupportedEndpoint {
3086                            endpoint: format!(
3087                                "{} (body deserialize: {})",
3088                                "submit_config_verification_request", e
3089                            ),
3090                            version: "2.7.2".to_string(),
3091                        })?,
3092                    )
3093                    .await?
3094                    .into())
3095            }
3096            DetectedVersion::V2_8_0 => {
3097                let api = crate::v2_8_0::api::controller_services::ControllerServicesConfigApi {
3098                    client: self.client,
3099                    id,
3100                };
3101                Ok(api
3102                    .submit_config_verification_request(
3103                        &serde_json::from_value::<crate::v2_8_0::types::VerifyConfigRequestEntity>(
3104                            body.clone(),
3105                        )
3106                        .map_err(|e| NifiError::UnsupportedEndpoint {
3107                            endpoint: format!(
3108                                "{} (body deserialize: {})",
3109                                "submit_config_verification_request", e
3110                            ),
3111                            version: "2.8.0".to_string(),
3112                        })?,
3113                    )
3114                    .await?
3115                    .into())
3116            }
3117        }
3118    }
3119    /// Updates a controller service
3120    pub async fn update_controller_service(
3121        &self,
3122        id: &str,
3123        body: &serde_json::Value,
3124    ) -> Result<types::ControllerServiceEntity, NifiError> {
3125        match self.version {
3126            DetectedVersion::V2_6_0 => {
3127                let api = crate::v2_6_0::api::controller_services::ControllerServicesApi {
3128                    client: self.client,
3129                };
3130                Ok(api
3131                    .update_controller_service(
3132                        id,
3133                        &serde_json::from_value::<crate::v2_6_0::types::ControllerServiceEntity>(
3134                            body.clone(),
3135                        )
3136                        .map_err(|e| NifiError::UnsupportedEndpoint {
3137                            endpoint: format!(
3138                                "{} (body deserialize: {})",
3139                                "update_controller_service", e
3140                            ),
3141                            version: "2.6.0".to_string(),
3142                        })?,
3143                    )
3144                    .await?
3145                    .into())
3146            }
3147            DetectedVersion::V2_7_2 => {
3148                let api = crate::v2_7_2::api::controller_services::ControllerServicesApi {
3149                    client: self.client,
3150                };
3151                Ok(api
3152                    .update_controller_service(
3153                        id,
3154                        &serde_json::from_value::<crate::v2_7_2::types::ControllerServiceEntity>(
3155                            body.clone(),
3156                        )
3157                        .map_err(|e| NifiError::UnsupportedEndpoint {
3158                            endpoint: format!(
3159                                "{} (body deserialize: {})",
3160                                "update_controller_service", e
3161                            ),
3162                            version: "2.7.2".to_string(),
3163                        })?,
3164                    )
3165                    .await?
3166                    .into())
3167            }
3168            DetectedVersion::V2_8_0 => {
3169                let api = crate::v2_8_0::api::controller_services::ControllerServicesApi {
3170                    client: self.client,
3171                };
3172                Ok(api
3173                    .update_controller_service(
3174                        id,
3175                        &serde_json::from_value::<crate::v2_8_0::types::ControllerServiceEntity>(
3176                            body.clone(),
3177                        )
3178                        .map_err(|e| NifiError::UnsupportedEndpoint {
3179                            endpoint: format!(
3180                                "{} (body deserialize: {})",
3181                                "update_controller_service", e
3182                            ),
3183                            version: "2.8.0".to_string(),
3184                        })?,
3185                    )
3186                    .await?
3187                    .into())
3188            }
3189        }
3190    }
3191    /// Updates a controller services references
3192    pub async fn update_controller_service_references(
3193        &self,
3194        id: &str,
3195        body: &serde_json::Value,
3196    ) -> Result<types::ControllerServiceReferencingComponentsEntity, NifiError> {
3197        match self.version {
3198            DetectedVersion::V2_6_0 => {
3199                let api =
3200                    crate::v2_6_0::api::controller_services::ControllerServicesReferencesApi {
3201                        client: self.client,
3202                        id,
3203                    };
3204                Ok(api
3205                    .update_controller_service_references(
3206                        &serde_json::from_value::<
3207                            crate::v2_6_0::types::UpdateControllerServiceReferenceRequestEntity,
3208                        >(body.clone())
3209                        .map_err(|e| NifiError::UnsupportedEndpoint {
3210                            endpoint: format!(
3211                                "{} (body deserialize: {})",
3212                                "update_controller_service_references", e
3213                            ),
3214                            version: "2.6.0".to_string(),
3215                        })?,
3216                    )
3217                    .await?
3218                    .into())
3219            }
3220            DetectedVersion::V2_7_2 => {
3221                let api =
3222                    crate::v2_7_2::api::controller_services::ControllerServicesReferencesApi {
3223                        client: self.client,
3224                        id,
3225                    };
3226                Ok(api
3227                    .update_controller_service_references(
3228                        &serde_json::from_value::<
3229                            crate::v2_7_2::types::UpdateControllerServiceReferenceRequestEntity,
3230                        >(body.clone())
3231                        .map_err(|e| NifiError::UnsupportedEndpoint {
3232                            endpoint: format!(
3233                                "{} (body deserialize: {})",
3234                                "update_controller_service_references", e
3235                            ),
3236                            version: "2.7.2".to_string(),
3237                        })?,
3238                    )
3239                    .await?
3240                    .into())
3241            }
3242            DetectedVersion::V2_8_0 => {
3243                let api =
3244                    crate::v2_8_0::api::controller_services::ControllerServicesReferencesApi {
3245                        client: self.client,
3246                        id,
3247                    };
3248                Ok(api
3249                    .update_controller_service_references(
3250                        &serde_json::from_value::<
3251                            crate::v2_8_0::types::UpdateControllerServiceReferenceRequestEntity,
3252                        >(body.clone())
3253                        .map_err(|e| NifiError::UnsupportedEndpoint {
3254                            endpoint: format!(
3255                                "{} (body deserialize: {})",
3256                                "update_controller_service_references", e
3257                            ),
3258                            version: "2.8.0".to_string(),
3259                        })?,
3260                    )
3261                    .await?
3262                    .into())
3263            }
3264        }
3265    }
3266    /// Updates run status of a controller service
3267    pub async fn update_run_status_1(
3268        &self,
3269        id: &str,
3270        body: &serde_json::Value,
3271    ) -> Result<types::ControllerServiceEntity, NifiError> {
3272        match self.version {
3273            DetectedVersion::V2_6_0 => {
3274                let api = crate::v2_6_0::api::controller_services::ControllerServicesRunStatusApi {
3275                    client: self.client,
3276                    id,
3277                };
3278                Ok(api
3279                    .update_run_status_1(
3280                        &serde_json::from_value::<
3281                            crate::v2_6_0::types::ControllerServiceRunStatusEntity,
3282                        >(body.clone())
3283                        .map_err(|e| NifiError::UnsupportedEndpoint {
3284                            endpoint: format!(
3285                                "{} (body deserialize: {})",
3286                                "update_run_status_1", e
3287                            ),
3288                            version: "2.6.0".to_string(),
3289                        })?,
3290                    )
3291                    .await?
3292                    .into())
3293            }
3294            DetectedVersion::V2_7_2 => {
3295                let api = crate::v2_7_2::api::controller_services::ControllerServicesRunStatusApi {
3296                    client: self.client,
3297                    id,
3298                };
3299                Ok(api
3300                    .update_run_status_1(
3301                        &serde_json::from_value::<
3302                            crate::v2_7_2::types::ControllerServiceRunStatusEntity,
3303                        >(body.clone())
3304                        .map_err(|e| NifiError::UnsupportedEndpoint {
3305                            endpoint: format!(
3306                                "{} (body deserialize: {})",
3307                                "update_run_status_1", e
3308                            ),
3309                            version: "2.7.2".to_string(),
3310                        })?,
3311                    )
3312                    .await?
3313                    .into())
3314            }
3315            DetectedVersion::V2_8_0 => {
3316                let api = crate::v2_8_0::api::controller_services::ControllerServicesRunStatusApi {
3317                    client: self.client,
3318                    id,
3319                };
3320                Ok(api
3321                    .update_run_status_1(
3322                        &serde_json::from_value::<
3323                            crate::v2_8_0::types::ControllerServiceRunStatusEntity,
3324                        >(body.clone())
3325                        .map_err(|e| NifiError::UnsupportedEndpoint {
3326                            endpoint: format!(
3327                                "{} (body deserialize: {})",
3328                                "update_run_status_1", e
3329                            ),
3330                            version: "2.8.0".to_string(),
3331                        })?,
3332                    )
3333                    .await?
3334                    .into())
3335            }
3336        }
3337    }
3338}
3339/// Dynamic dispatch wrapper for the Counters API.
3340pub struct DynamicCountersApi<'a> {
3341    client: &'a NifiClient,
3342    version: DetectedVersion,
3343}
3344#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
3345impl<'a> DynamicCountersApi<'a> {
3346    /// Gets the current counters for this NiFi
3347    pub async fn get_counters(
3348        &self,
3349        nodewise: Option<bool>,
3350        cluster_node_id: Option<&str>,
3351    ) -> Result<types::CountersDto, NifiError> {
3352        match self.version {
3353            DetectedVersion::V2_6_0 => {
3354                let api = crate::v2_6_0::api::counters::CountersApi {
3355                    client: self.client,
3356                };
3357                Ok(api.get_counters(nodewise, cluster_node_id).await?.into())
3358            }
3359            DetectedVersion::V2_7_2 => {
3360                let api = crate::v2_7_2::api::counters::CountersApi {
3361                    client: self.client,
3362                };
3363                Ok(api.get_counters(nodewise, cluster_node_id).await?.into())
3364            }
3365            DetectedVersion::V2_8_0 => {
3366                let api = crate::v2_8_0::api::counters::CountersApi {
3367                    client: self.client,
3368                };
3369                Ok(api.get_counters(nodewise, cluster_node_id).await?.into())
3370            }
3371        }
3372    }
3373    /// Updates all counters. This will reset all counter values to 0
3374    pub async fn update_all_counters(&self) -> Result<types::CountersDto, NifiError> {
3375        match self.version {
3376            DetectedVersion::V2_6_0 => {
3377                let api = crate::v2_6_0::api::counters::CountersApi {
3378                    client: self.client,
3379                };
3380                Ok(api.update_all_counters().await?.into())
3381            }
3382            DetectedVersion::V2_7_2 => {
3383                let api = crate::v2_7_2::api::counters::CountersApi {
3384                    client: self.client,
3385                };
3386                Ok(api.update_all_counters().await?.into())
3387            }
3388            DetectedVersion::V2_8_0 => {
3389                let api = crate::v2_8_0::api::counters::CountersApi {
3390                    client: self.client,
3391                };
3392                Ok(api.update_all_counters().await?.into())
3393            }
3394        }
3395    }
3396    /// Updates the specified counter. This will reset the counter value to 0
3397    pub async fn update_counter(&self, id: &str) -> Result<types::CounterDto, NifiError> {
3398        match self.version {
3399            DetectedVersion::V2_6_0 => {
3400                let api = crate::v2_6_0::api::counters::CountersApi {
3401                    client: self.client,
3402                };
3403                Ok(api.update_counter(id).await?.into())
3404            }
3405            DetectedVersion::V2_7_2 => {
3406                let api = crate::v2_7_2::api::counters::CountersApi {
3407                    client: self.client,
3408                };
3409                Ok(api.update_counter(id).await?.into())
3410            }
3411            DetectedVersion::V2_8_0 => {
3412                let api = crate::v2_8_0::api::counters::CountersApi {
3413                    client: self.client,
3414                };
3415                Ok(api.update_counter(id).await?.into())
3416            }
3417        }
3418    }
3419}
3420/// Dynamic dispatch wrapper for the DataTransfer API.
3421pub struct DynamicDataTransferApi<'a> {
3422    client: &'a NifiClient,
3423    version: DetectedVersion,
3424}
3425#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
3426impl<'a> DynamicDataTransferApi<'a> {
3427    /// Commit or cancel the specified transaction
3428    pub async fn commit_input_port_transaction(
3429        &self,
3430        port_id: &str,
3431        transaction_id: &str,
3432        response_code: i32,
3433    ) -> Result<types::TransactionResultEntity, NifiError> {
3434        match self.version {
3435            DetectedVersion::V2_6_0 => {
3436                let api = crate::v2_6_0::api::datatransfer::DataTransferTransactionsApi {
3437                    client: self.client,
3438                    port_id,
3439                };
3440                Ok(api
3441                    .commit_input_port_transaction(transaction_id, response_code)
3442                    .await?
3443                    .into())
3444            }
3445            DetectedVersion::V2_7_2 => {
3446                let api = crate::v2_7_2::api::datatransfer::DataTransferTransactionsApi {
3447                    client: self.client,
3448                    port_id,
3449                };
3450                Ok(api
3451                    .commit_input_port_transaction(transaction_id, response_code)
3452                    .await?
3453                    .into())
3454            }
3455            DetectedVersion::V2_8_0 => {
3456                let api = crate::v2_8_0::api::datatransfer::DataTransferTransactionsApi {
3457                    client: self.client,
3458                    port_id,
3459                };
3460                Ok(api
3461                    .commit_input_port_transaction(transaction_id, response_code)
3462                    .await?
3463                    .into())
3464            }
3465        }
3466    }
3467    /// Commit or cancel the specified transaction
3468    pub async fn commit_output_port_transaction(
3469        &self,
3470        port_id: &str,
3471        transaction_id: &str,
3472        response_code: i32,
3473        checksum: &str,
3474    ) -> Result<types::TransactionResultEntity, NifiError> {
3475        match self.version {
3476            DetectedVersion::V2_6_0 => {
3477                let api = crate::v2_6_0::api::datatransfer::DataTransferTransactionsApi {
3478                    client: self.client,
3479                    port_id,
3480                };
3481                Ok(api
3482                    .commit_output_port_transaction(transaction_id, response_code, checksum)
3483                    .await?
3484                    .into())
3485            }
3486            DetectedVersion::V2_7_2 => {
3487                let api = crate::v2_7_2::api::datatransfer::DataTransferTransactionsApi {
3488                    client: self.client,
3489                    port_id,
3490                };
3491                Ok(api
3492                    .commit_output_port_transaction(transaction_id, response_code, checksum)
3493                    .await?
3494                    .into())
3495            }
3496            DetectedVersion::V2_8_0 => {
3497                let api = crate::v2_8_0::api::datatransfer::DataTransferTransactionsApi {
3498                    client: self.client,
3499                    port_id,
3500                };
3501                Ok(api
3502                    .commit_output_port_transaction(transaction_id, response_code, checksum)
3503                    .await?
3504                    .into())
3505            }
3506        }
3507    }
3508    /// Create a transaction to the specified output port or input port
3509    pub async fn create_port_transaction(
3510        &self,
3511        port_id: &str,
3512        port_type: &str,
3513    ) -> Result<types::TransactionResultEntity, NifiError> {
3514        match self.version {
3515            DetectedVersion::V2_6_0 => {
3516                let api = crate::v2_6_0::api::datatransfer::DataTransferTransactionsApi {
3517                    client: self.client,
3518                    port_id,
3519                };
3520                Ok(api.create_port_transaction(port_type).await?.into())
3521            }
3522            DetectedVersion::V2_7_2 => {
3523                let api = crate::v2_7_2::api::datatransfer::DataTransferTransactionsApi {
3524                    client: self.client,
3525                    port_id,
3526                };
3527                Ok(api.create_port_transaction(port_type).await?.into())
3528            }
3529            DetectedVersion::V2_8_0 => {
3530                let api = crate::v2_8_0::api::datatransfer::DataTransferTransactionsApi {
3531                    client: self.client,
3532                    port_id,
3533                };
3534                Ok(api.create_port_transaction(port_type).await?.into())
3535            }
3536        }
3537    }
3538    /// Extend transaction TTL
3539    pub async fn extend_input_port_transaction_t_t_l(
3540        &self,
3541        port_id: &str,
3542        transaction_id: &str,
3543    ) -> Result<types::TransactionResultEntity, NifiError> {
3544        match self.version {
3545            DetectedVersion::V2_6_0 => {
3546                let api = crate::v2_6_0::api::datatransfer::DataTransferTransactionsApi {
3547                    client: self.client,
3548                    port_id,
3549                };
3550                Ok(api
3551                    .extend_input_port_transaction_t_t_l(transaction_id)
3552                    .await?
3553                    .into())
3554            }
3555            DetectedVersion::V2_7_2 => {
3556                let api = crate::v2_7_2::api::datatransfer::DataTransferTransactionsApi {
3557                    client: self.client,
3558                    port_id,
3559                };
3560                Ok(api
3561                    .extend_input_port_transaction_t_t_l(transaction_id)
3562                    .await?
3563                    .into())
3564            }
3565            DetectedVersion::V2_8_0 => {
3566                let api = crate::v2_8_0::api::datatransfer::DataTransferTransactionsApi {
3567                    client: self.client,
3568                    port_id,
3569                };
3570                Ok(api
3571                    .extend_input_port_transaction_t_t_l(transaction_id)
3572                    .await?
3573                    .into())
3574            }
3575        }
3576    }
3577    /// Extend transaction TTL
3578    pub async fn extend_output_port_transaction_t_t_l(
3579        &self,
3580        port_id: &str,
3581        transaction_id: &str,
3582    ) -> Result<types::TransactionResultEntity, NifiError> {
3583        match self.version {
3584            DetectedVersion::V2_6_0 => {
3585                let api = crate::v2_6_0::api::datatransfer::DataTransferTransactionsApi {
3586                    client: self.client,
3587                    port_id,
3588                };
3589                Ok(api
3590                    .extend_output_port_transaction_t_t_l(transaction_id)
3591                    .await?
3592                    .into())
3593            }
3594            DetectedVersion::V2_7_2 => {
3595                let api = crate::v2_7_2::api::datatransfer::DataTransferTransactionsApi {
3596                    client: self.client,
3597                    port_id,
3598                };
3599                Ok(api
3600                    .extend_output_port_transaction_t_t_l(transaction_id)
3601                    .await?
3602                    .into())
3603            }
3604            DetectedVersion::V2_8_0 => {
3605                let api = crate::v2_8_0::api::datatransfer::DataTransferTransactionsApi {
3606                    client: self.client,
3607                    port_id,
3608                };
3609                Ok(api
3610                    .extend_output_port_transaction_t_t_l(transaction_id)
3611                    .await?
3612                    .into())
3613            }
3614        }
3615    }
3616    /// Transfer flow files to the input port
3617    pub async fn receive_flow_files(
3618        &self,
3619        port_id: &str,
3620        transaction_id: &str,
3621        filename: Option<&str>,
3622        data: Vec<u8>,
3623    ) -> Result<(), NifiError> {
3624        match self.version {
3625            DetectedVersion::V2_6_0 => {
3626                let api = crate::v2_6_0::api::datatransfer::DataTransferTransactionsApi {
3627                    client: self.client,
3628                    port_id,
3629                };
3630                api.receive_flow_files(transaction_id, filename, data).await
3631            }
3632            DetectedVersion::V2_7_2 => {
3633                let api = crate::v2_7_2::api::datatransfer::DataTransferTransactionsApi {
3634                    client: self.client,
3635                    port_id,
3636                };
3637                api.receive_flow_files(transaction_id, filename, data).await
3638            }
3639            DetectedVersion::V2_8_0 => {
3640                let api = crate::v2_8_0::api::datatransfer::DataTransferTransactionsApi {
3641                    client: self.client,
3642                    port_id,
3643                };
3644                api.receive_flow_files(transaction_id, filename, data).await
3645            }
3646        }
3647    }
3648    /// Transfer flow files from the output port
3649    pub async fn transfer_flow_files(
3650        &self,
3651        port_id: &str,
3652        transaction_id: &str,
3653    ) -> Result<(), NifiError> {
3654        match self.version {
3655            DetectedVersion::V2_6_0 => {
3656                let api = crate::v2_6_0::api::datatransfer::DataTransferTransactionsApi {
3657                    client: self.client,
3658                    port_id,
3659                };
3660                api.transfer_flow_files(transaction_id).await
3661            }
3662            DetectedVersion::V2_7_2 => {
3663                let api = crate::v2_7_2::api::datatransfer::DataTransferTransactionsApi {
3664                    client: self.client,
3665                    port_id,
3666                };
3667                api.transfer_flow_files(transaction_id).await
3668            }
3669            DetectedVersion::V2_8_0 => {
3670                let api = crate::v2_8_0::api::datatransfer::DataTransferTransactionsApi {
3671                    client: self.client,
3672                    port_id,
3673                };
3674                api.transfer_flow_files(transaction_id).await
3675            }
3676        }
3677    }
3678}
3679/// Dynamic dispatch wrapper for the Flow API.
3680pub struct DynamicFlowApi<'a> {
3681    client: &'a NifiClient,
3682    version: DetectedVersion,
3683}
3684#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
3685impl<'a> DynamicFlowApi<'a> {
3686    /// Enable or disable Controller Services in the specified Process Group.
3687    pub async fn activate_controller_services(
3688        &self,
3689        id: &str,
3690        body: &serde_json::Value,
3691    ) -> Result<types::ActivateControllerServicesEntity, NifiError> {
3692        match self.version {
3693            DetectedVersion::V2_6_0 => {
3694                let api = crate::v2_6_0::api::flow::FlowControllerServicesApi {
3695                    client: self.client,
3696                    id,
3697                };
3698                Ok(api
3699                    .activate_controller_services(
3700                        &serde_json::from_value::<
3701                            crate::v2_6_0::types::ActivateControllerServicesEntity,
3702                        >(body.clone())
3703                        .map_err(|e| NifiError::UnsupportedEndpoint {
3704                            endpoint: format!(
3705                                "{} (body deserialize: {})",
3706                                "activate_controller_services", e
3707                            ),
3708                            version: "2.6.0".to_string(),
3709                        })?,
3710                    )
3711                    .await?
3712                    .into())
3713            }
3714            DetectedVersion::V2_7_2 => {
3715                let api = crate::v2_7_2::api::flow::FlowControllerServicesApi {
3716                    client: self.client,
3717                    id,
3718                };
3719                Ok(api
3720                    .activate_controller_services(
3721                        &serde_json::from_value::<
3722                            crate::v2_7_2::types::ActivateControllerServicesEntity,
3723                        >(body.clone())
3724                        .map_err(|e| NifiError::UnsupportedEndpoint {
3725                            endpoint: format!(
3726                                "{} (body deserialize: {})",
3727                                "activate_controller_services", e
3728                            ),
3729                            version: "2.7.2".to_string(),
3730                        })?,
3731                    )
3732                    .await?
3733                    .into())
3734            }
3735            DetectedVersion::V2_8_0 => {
3736                let api = crate::v2_8_0::api::flow::FlowControllerServicesApi {
3737                    client: self.client,
3738                    id,
3739                };
3740                Ok(api
3741                    .activate_controller_services(
3742                        &serde_json::from_value::<
3743                            crate::v2_8_0::types::ActivateControllerServicesEntity,
3744                        >(body.clone())
3745                        .map_err(|e| NifiError::UnsupportedEndpoint {
3746                            endpoint: format!(
3747                                "{} (body deserialize: {})",
3748                                "activate_controller_services", e
3749                            ),
3750                            version: "2.8.0".to_string(),
3751                        })?,
3752                    )
3753                    .await?
3754                    .into())
3755            }
3756        }
3757    }
3758    /// Clears bulletins for components in the specified Process Group.
3759    pub async fn clear_bulletins_1(
3760        &self,
3761        id: &str,
3762        body: &serde_json::Value,
3763    ) -> Result<types::ClearBulletinsForGroupResultsEntity, NifiError> {
3764        match self.version {
3765            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
3766                endpoint: "clear_bulletins_1".to_string(),
3767                version: "2.6.0".to_string(),
3768            }),
3769            DetectedVersion::V2_7_2 => {
3770                let api = crate::v2_7_2::api::flow::FlowBulletinsApi {
3771                    client: self.client,
3772                    id,
3773                };
3774                Ok(api
3775                    .clear_bulletins_1(
3776                        &serde_json::from_value::<
3777                            crate::v2_7_2::types::ClearBulletinsForGroupRequestEntity,
3778                        >(body.clone())
3779                        .map_err(|e| NifiError::UnsupportedEndpoint {
3780                            endpoint: format!("{} (body deserialize: {})", "clear_bulletins_1", e),
3781                            version: "2.7.2".to_string(),
3782                        })?,
3783                    )
3784                    .await?
3785                    .into())
3786            }
3787            DetectedVersion::V2_8_0 => {
3788                let api = crate::v2_8_0::api::flow::FlowBulletinsApi {
3789                    client: self.client,
3790                    id,
3791                };
3792                Ok(api
3793                    .clear_bulletins_1(
3794                        &serde_json::from_value::<
3795                            crate::v2_8_0::types::ClearBulletinsForGroupRequestEntity,
3796                        >(body.clone())
3797                        .map_err(|e| NifiError::UnsupportedEndpoint {
3798                            endpoint: format!("{} (body deserialize: {})", "clear_bulletins_1", e),
3799                            version: "2.8.0".to_string(),
3800                        })?,
3801                    )
3802                    .await?
3803                    .into())
3804            }
3805        }
3806    }
3807    /// Download a snapshot of the given reporting tasks and any controller services they use
3808    pub async fn download_reporting_task_snapshot(
3809        &self,
3810        reporting_task_id: Option<&str>,
3811    ) -> Result<(), NifiError> {
3812        match self.version {
3813            DetectedVersion::V2_6_0 => {
3814                let api = crate::v2_6_0::api::flow::FlowApi {
3815                    client: self.client,
3816                };
3817                api.download_reporting_task_snapshot(reporting_task_id)
3818                    .await
3819            }
3820            DetectedVersion::V2_7_2 => {
3821                let api = crate::v2_7_2::api::flow::FlowApi {
3822                    client: self.client,
3823                };
3824                api.download_reporting_task_snapshot(reporting_task_id)
3825                    .await
3826            }
3827            DetectedVersion::V2_8_0 => {
3828                let api = crate::v2_8_0::api::flow::FlowApi {
3829                    client: self.client,
3830                };
3831                api.download_reporting_task_snapshot(reporting_task_id)
3832                    .await
3833            }
3834        }
3835    }
3836    /// Generates a client id.
3837    pub async fn generate_client_id(&self) -> Result<(), NifiError> {
3838        match self.version {
3839            DetectedVersion::V2_6_0 => {
3840                let api = crate::v2_6_0::api::flow::FlowApi {
3841                    client: self.client,
3842                };
3843                api.generate_client_id().await
3844            }
3845            DetectedVersion::V2_7_2 => {
3846                let api = crate::v2_7_2::api::flow::FlowApi {
3847                    client: self.client,
3848                };
3849                api.generate_client_id().await
3850            }
3851            DetectedVersion::V2_8_0 => {
3852                let api = crate::v2_8_0::api::flow::FlowApi {
3853                    client: self.client,
3854                };
3855                api.generate_client_id().await
3856            }
3857        }
3858    }
3859    /// Retrieves details about this NiFi to put in the About dialog
3860    pub async fn get_about_info(&self) -> Result<types::AboutDto, NifiError> {
3861        match self.version {
3862            DetectedVersion::V2_6_0 => {
3863                let api = crate::v2_6_0::api::flow::FlowApi {
3864                    client: self.client,
3865                };
3866                Ok(api.get_about_info().await?.into())
3867            }
3868            DetectedVersion::V2_7_2 => {
3869                let api = crate::v2_7_2::api::flow::FlowApi {
3870                    client: self.client,
3871                };
3872                Ok(api.get_about_info().await?.into())
3873            }
3874            DetectedVersion::V2_8_0 => {
3875                let api = crate::v2_8_0::api::flow::FlowApi {
3876                    client: self.client,
3877                };
3878                Ok(api.get_about_info().await?.into())
3879            }
3880        }
3881    }
3882    /// Gets an action
3883    pub async fn get_action(&self, id: &str) -> Result<types::ActionEntity, NifiError> {
3884        match self.version {
3885            DetectedVersion::V2_6_0 => {
3886                let api = crate::v2_6_0::api::flow::FlowApi {
3887                    client: self.client,
3888                };
3889                Ok(api.get_action(id).await?.into())
3890            }
3891            DetectedVersion::V2_7_2 => {
3892                let api = crate::v2_7_2::api::flow::FlowApi {
3893                    client: self.client,
3894                };
3895                Ok(api.get_action(id).await?.into())
3896            }
3897            DetectedVersion::V2_8_0 => {
3898                let api = crate::v2_8_0::api::flow::FlowApi {
3899                    client: self.client,
3900                };
3901                Ok(api.get_action(id).await?.into())
3902            }
3903        }
3904    }
3905    /// Retrieves the additional details for the specified component type.
3906    pub async fn get_additional_details(
3907        &self,
3908        group: &str,
3909        artifact: &str,
3910        version: &str,
3911        r#type: &str,
3912    ) -> Result<types::AdditionalDetailsEntity, NifiError> {
3913        match self.version {
3914            DetectedVersion::V2_6_0 => {
3915                let api = crate::v2_6_0::api::flow::FlowApi {
3916                    client: self.client,
3917                };
3918                Ok(api
3919                    .get_additional_details(group, artifact, version, r#type)
3920                    .await?
3921                    .into())
3922            }
3923            DetectedVersion::V2_7_2 => {
3924                let api = crate::v2_7_2::api::flow::FlowApi {
3925                    client: self.client,
3926                };
3927                Ok(api
3928                    .get_additional_details(group, artifact, version, r#type)
3929                    .await?
3930                    .into())
3931            }
3932            DetectedVersion::V2_8_0 => {
3933                let api = crate::v2_8_0::api::flow::FlowApi {
3934                    client: self.client,
3935                };
3936                Ok(api
3937                    .get_additional_details(group, artifact, version, r#type)
3938                    .await?
3939                    .into())
3940            }
3941        }
3942    }
3943    /// Returns all flow analysis results currently in effect
3944    pub async fn get_all_flow_analysis_results(
3945        &self,
3946    ) -> Result<types::FlowAnalysisResultEntity, NifiError> {
3947        match self.version {
3948            DetectedVersion::V2_6_0 => {
3949                let api = crate::v2_6_0::api::flow::FlowApi {
3950                    client: self.client,
3951                };
3952                Ok(api.get_all_flow_analysis_results().await?.into())
3953            }
3954            DetectedVersion::V2_7_2 => {
3955                let api = crate::v2_7_2::api::flow::FlowApi {
3956                    client: self.client,
3957                };
3958                Ok(api.get_all_flow_analysis_results().await?.into())
3959            }
3960            DetectedVersion::V2_8_0 => {
3961                let api = crate::v2_8_0::api::flow::FlowApi {
3962                    client: self.client,
3963                };
3964                Ok(api.get_all_flow_analysis_results().await?.into())
3965            }
3966        }
3967    }
3968    /// Retrieves the banners for this NiFi
3969    pub async fn get_banners(&self) -> Result<types::BannerDto, NifiError> {
3970        match self.version {
3971            DetectedVersion::V2_6_0 => {
3972                let api = crate::v2_6_0::api::flow::FlowApi {
3973                    client: self.client,
3974                };
3975                Ok(api.get_banners().await?.into())
3976            }
3977            DetectedVersion::V2_7_2 => {
3978                let api = crate::v2_7_2::api::flow::FlowApi {
3979                    client: self.client,
3980                };
3981                Ok(api.get_banners().await?.into())
3982            }
3983            DetectedVersion::V2_8_0 => {
3984                let api = crate::v2_8_0::api::flow::FlowApi {
3985                    client: self.client,
3986                };
3987                Ok(api.get_banners().await?.into())
3988            }
3989        }
3990    }
3991    /// Gets the branches from the specified registry for the current user
3992    pub async fn get_branches(
3993        &self,
3994        id: &str,
3995    ) -> Result<types::FlowRegistryBranchesEntity, NifiError> {
3996        match self.version {
3997            DetectedVersion::V2_6_0 => {
3998                let api = crate::v2_6_0::api::flow::FlowBranchesApi {
3999                    client: self.client,
4000                    id,
4001                };
4002                Ok(api.get_branches().await?.into())
4003            }
4004            DetectedVersion::V2_7_2 => {
4005                let api = crate::v2_7_2::api::flow::FlowBranchesApi {
4006                    client: self.client,
4007                    id,
4008                };
4009                Ok(api.get_branches().await?.into())
4010            }
4011            DetectedVersion::V2_8_0 => {
4012                let api = crate::v2_8_0::api::flow::FlowBranchesApi {
4013                    client: self.client,
4014                    id,
4015                };
4016                Ok(api.get_branches().await?.into())
4017            }
4018        }
4019    }
4020    /// Gets the breadcrumbs for a process group
4021    pub async fn get_breadcrumbs(
4022        &self,
4023        id: &str,
4024    ) -> Result<types::FlowBreadcrumbEntity, NifiError> {
4025        match self.version {
4026            DetectedVersion::V2_6_0 => {
4027                let api = crate::v2_6_0::api::flow::FlowBreadcrumbsApi {
4028                    client: self.client,
4029                    id,
4030                };
4031                Ok(api.get_breadcrumbs().await?.into())
4032            }
4033            DetectedVersion::V2_7_2 => {
4034                let api = crate::v2_7_2::api::flow::FlowBreadcrumbsApi {
4035                    client: self.client,
4036                    id,
4037                };
4038                Ok(api.get_breadcrumbs().await?.into())
4039            }
4040            DetectedVersion::V2_8_0 => {
4041                let api = crate::v2_8_0::api::flow::FlowBreadcrumbsApi {
4042                    client: self.client,
4043                    id,
4044                };
4045                Ok(api.get_breadcrumbs().await?.into())
4046            }
4047        }
4048    }
4049    /// Gets the buckets from the specified registry for the current user
4050    pub async fn get_buckets(
4051        &self,
4052        id: &str,
4053        branch: Option<&str>,
4054    ) -> Result<types::FlowRegistryBucketsEntity, NifiError> {
4055        match self.version {
4056            DetectedVersion::V2_6_0 => {
4057                let api = crate::v2_6_0::api::flow::FlowBucketsApi {
4058                    client: self.client,
4059                    id,
4060                };
4061                Ok(api.get_buckets(branch).await?.into())
4062            }
4063            DetectedVersion::V2_7_2 => {
4064                let api = crate::v2_7_2::api::flow::FlowBucketsApi {
4065                    client: self.client,
4066                    id,
4067                };
4068                Ok(api.get_buckets(branch).await?.into())
4069            }
4070            DetectedVersion::V2_8_0 => {
4071                let api = crate::v2_8_0::api::flow::FlowBucketsApi {
4072                    client: self.client,
4073                    id,
4074                };
4075                Ok(api.get_buckets(branch).await?.into())
4076            }
4077        }
4078    }
4079    /// Gets current bulletins
4080    pub async fn get_bulletin_board(
4081        &self,
4082        after: Option<&str>,
4083        source_name: Option<&str>,
4084        message: Option<&str>,
4085        source_id: Option<&str>,
4086        group_id: Option<&str>,
4087        limit: Option<&str>,
4088    ) -> Result<types::BulletinBoardDto, NifiError> {
4089        match self.version {
4090            DetectedVersion::V2_6_0 => {
4091                let api = crate::v2_6_0::api::flow::FlowApi {
4092                    client: self.client,
4093                };
4094                Ok(api
4095                    .get_bulletin_board(after, source_name, message, source_id, group_id, limit)
4096                    .await?
4097                    .into())
4098            }
4099            DetectedVersion::V2_7_2 => {
4100                let api = crate::v2_7_2::api::flow::FlowApi {
4101                    client: self.client,
4102                };
4103                Ok(api
4104                    .get_bulletin_board(after, source_name, message, source_id, group_id, limit)
4105                    .await?
4106                    .into())
4107            }
4108            DetectedVersion::V2_8_0 => {
4109                let api = crate::v2_8_0::api::flow::FlowApi {
4110                    client: self.client,
4111                };
4112                Ok(api
4113                    .get_bulletin_board(after, source_name, message, source_id, group_id, limit)
4114                    .await?
4115                    .into())
4116            }
4117        }
4118    }
4119    /// Retrieves Controller level bulletins
4120    pub async fn get_bulletins(&self) -> Result<types::ControllerBulletinsEntity, NifiError> {
4121        match self.version {
4122            DetectedVersion::V2_6_0 => {
4123                let api = crate::v2_6_0::api::flow::FlowApi {
4124                    client: self.client,
4125                };
4126                Ok(api.get_bulletins().await?.into())
4127            }
4128            DetectedVersion::V2_7_2 => {
4129                let api = crate::v2_7_2::api::flow::FlowApi {
4130                    client: self.client,
4131                };
4132                Ok(api.get_bulletins().await?.into())
4133            }
4134            DetectedVersion::V2_8_0 => {
4135                let api = crate::v2_8_0::api::flow::FlowApi {
4136                    client: self.client,
4137                };
4138                Ok(api.get_bulletins().await?.into())
4139            }
4140        }
4141    }
4142    /// The cluster summary for this NiFi
4143    pub async fn get_cluster_summary(&self) -> Result<types::ClusterSummaryDto, NifiError> {
4144        match self.version {
4145            DetectedVersion::V2_6_0 => {
4146                let api = crate::v2_6_0::api::flow::FlowApi {
4147                    client: self.client,
4148                };
4149                Ok(api.get_cluster_summary().await?.into())
4150            }
4151            DetectedVersion::V2_7_2 => {
4152                let api = crate::v2_7_2::api::flow::FlowApi {
4153                    client: self.client,
4154                };
4155                Ok(api.get_cluster_summary().await?.into())
4156            }
4157            DetectedVersion::V2_8_0 => {
4158                let api = crate::v2_8_0::api::flow::FlowApi {
4159                    client: self.client,
4160                };
4161                Ok(api.get_cluster_summary().await?.into())
4162            }
4163        }
4164    }
4165    /// Gets configuration history for a component
4166    pub async fn get_component_history(
4167        &self,
4168        component_id: &str,
4169    ) -> Result<types::ComponentHistoryDto, NifiError> {
4170        match self.version {
4171            DetectedVersion::V2_6_0 => {
4172                let api = crate::v2_6_0::api::flow::FlowApi {
4173                    client: self.client,
4174                };
4175                Ok(api.get_component_history(component_id).await?.into())
4176            }
4177            DetectedVersion::V2_7_2 => {
4178                let api = crate::v2_7_2::api::flow::FlowApi {
4179                    client: self.client,
4180                };
4181                Ok(api.get_component_history(component_id).await?.into())
4182            }
4183            DetectedVersion::V2_8_0 => {
4184                let api = crate::v2_8_0::api::flow::FlowApi {
4185                    client: self.client,
4186                };
4187                Ok(api.get_component_history(component_id).await?.into())
4188            }
4189        }
4190    }
4191    /// Gets statistics for a connection
4192    pub async fn get_connection_statistics(
4193        &self,
4194        id: &str,
4195        nodewise: Option<bool>,
4196        cluster_node_id: Option<&str>,
4197    ) -> Result<types::ConnectionStatisticsEntity, NifiError> {
4198        match self.version {
4199            DetectedVersion::V2_6_0 => {
4200                let api = crate::v2_6_0::api::flow::FlowStatisticsApi {
4201                    client: self.client,
4202                    id,
4203                };
4204                Ok(api
4205                    .get_connection_statistics(nodewise, cluster_node_id)
4206                    .await?
4207                    .into())
4208            }
4209            DetectedVersion::V2_7_2 => {
4210                let api = crate::v2_7_2::api::flow::FlowStatisticsApi {
4211                    client: self.client,
4212                    id,
4213                };
4214                Ok(api
4215                    .get_connection_statistics(nodewise, cluster_node_id)
4216                    .await?
4217                    .into())
4218            }
4219            DetectedVersion::V2_8_0 => {
4220                let api = crate::v2_8_0::api::flow::FlowStatisticsApi {
4221                    client: self.client,
4222                    id,
4223                };
4224                Ok(api
4225                    .get_connection_statistics(nodewise, cluster_node_id)
4226                    .await?
4227                    .into())
4228            }
4229        }
4230    }
4231    /// Gets status for a connection
4232    pub async fn get_connection_status(
4233        &self,
4234        id: &str,
4235        nodewise: Option<bool>,
4236        cluster_node_id: Option<&str>,
4237    ) -> Result<types::ConnectionStatusEntity, NifiError> {
4238        match self.version {
4239            DetectedVersion::V2_6_0 => {
4240                let api = crate::v2_6_0::api::flow::FlowStatusApi {
4241                    client: self.client,
4242                    id,
4243                };
4244                Ok(api
4245                    .get_connection_status(nodewise, cluster_node_id)
4246                    .await?
4247                    .into())
4248            }
4249            DetectedVersion::V2_7_2 => {
4250                let api = crate::v2_7_2::api::flow::FlowStatusApi {
4251                    client: self.client,
4252                    id,
4253                };
4254                Ok(api
4255                    .get_connection_status(nodewise, cluster_node_id)
4256                    .await?
4257                    .into())
4258            }
4259            DetectedVersion::V2_8_0 => {
4260                let api = crate::v2_8_0::api::flow::FlowStatusApi {
4261                    client: self.client,
4262                    id,
4263                };
4264                Ok(api
4265                    .get_connection_status(nodewise, cluster_node_id)
4266                    .await?
4267                    .into())
4268            }
4269        }
4270    }
4271    /// Gets the status history for a connection
4272    pub async fn get_connection_status_history(
4273        &self,
4274        id: &str,
4275    ) -> Result<types::StatusHistoryEntity, NifiError> {
4276        match self.version {
4277            DetectedVersion::V2_6_0 => {
4278                let api = crate::v2_6_0::api::flow::FlowStatusApi {
4279                    client: self.client,
4280                    id,
4281                };
4282                Ok(api.get_connection_status_history().await?.into())
4283            }
4284            DetectedVersion::V2_7_2 => {
4285                let api = crate::v2_7_2::api::flow::FlowStatusApi {
4286                    client: self.client,
4287                    id,
4288                };
4289                Ok(api.get_connection_status_history().await?.into())
4290            }
4291            DetectedVersion::V2_8_0 => {
4292                let api = crate::v2_8_0::api::flow::FlowStatusApi {
4293                    client: self.client,
4294                    id,
4295                };
4296                Ok(api.get_connection_status_history().await?.into())
4297            }
4298        }
4299    }
4300    /// Retrieves the registered content viewers
4301    pub async fn get_content_viewers(&self) -> Result<types::ContentViewerEntity, NifiError> {
4302        match self.version {
4303            DetectedVersion::V2_6_0 => {
4304                let api = crate::v2_6_0::api::flow::FlowApi {
4305                    client: self.client,
4306                };
4307                Ok(api.get_content_viewers().await?.into())
4308            }
4309            DetectedVersion::V2_7_2 => {
4310                let api = crate::v2_7_2::api::flow::FlowApi {
4311                    client: self.client,
4312                };
4313                Ok(api.get_content_viewers().await?.into())
4314            }
4315            DetectedVersion::V2_8_0 => {
4316                let api = crate::v2_8_0::api::flow::FlowApi {
4317                    client: self.client,
4318                };
4319                Ok(api.get_content_viewers().await?.into())
4320            }
4321        }
4322    }
4323    /// Retrieves the Controller Service Definition for the specified component type.
4324    pub async fn get_controller_service_definition(
4325        &self,
4326        group: &str,
4327        artifact: &str,
4328        version: &str,
4329        r#type: &str,
4330    ) -> Result<types::ControllerServiceDefinition, NifiError> {
4331        match self.version {
4332            DetectedVersion::V2_6_0 => {
4333                let api = crate::v2_6_0::api::flow::FlowApi {
4334                    client: self.client,
4335                };
4336                Ok(api
4337                    .get_controller_service_definition(group, artifact, version, r#type)
4338                    .await?
4339                    .into())
4340            }
4341            DetectedVersion::V2_7_2 => {
4342                let api = crate::v2_7_2::api::flow::FlowApi {
4343                    client: self.client,
4344                };
4345                Ok(api
4346                    .get_controller_service_definition(group, artifact, version, r#type)
4347                    .await?
4348                    .into())
4349            }
4350            DetectedVersion::V2_8_0 => {
4351                let api = crate::v2_8_0::api::flow::FlowApi {
4352                    client: self.client,
4353                };
4354                Ok(api
4355                    .get_controller_service_definition(group, artifact, version, r#type)
4356                    .await?
4357                    .into())
4358            }
4359        }
4360    }
4361    /// Retrieves the types of controller services that this NiFi supports
4362    pub async fn get_controller_service_types(
4363        &self,
4364        service_type: Option<&str>,
4365        service_bundle_group: Option<&str>,
4366        service_bundle_artifact: Option<&str>,
4367        service_bundle_version: Option<&str>,
4368        bundle_group_filter: Option<&str>,
4369        bundle_artifact_filter: Option<&str>,
4370        type_filter: Option<&str>,
4371    ) -> Result<types::ControllerServiceTypesEntity, NifiError> {
4372        match self.version {
4373            DetectedVersion::V2_6_0 => {
4374                let api = crate::v2_6_0::api::flow::FlowApi {
4375                    client: self.client,
4376                };
4377                Ok(api
4378                    .get_controller_service_types(
4379                        service_type,
4380                        service_bundle_group,
4381                        service_bundle_artifact,
4382                        service_bundle_version,
4383                        bundle_group_filter,
4384                        bundle_artifact_filter,
4385                        type_filter,
4386                    )
4387                    .await?
4388                    .into())
4389            }
4390            DetectedVersion::V2_7_2 => {
4391                let api = crate::v2_7_2::api::flow::FlowApi {
4392                    client: self.client,
4393                };
4394                Ok(api
4395                    .get_controller_service_types(
4396                        service_type,
4397                        service_bundle_group,
4398                        service_bundle_artifact,
4399                        service_bundle_version,
4400                        bundle_group_filter,
4401                        bundle_artifact_filter,
4402                        type_filter,
4403                    )
4404                    .await?
4405                    .into())
4406            }
4407            DetectedVersion::V2_8_0 => {
4408                let api = crate::v2_8_0::api::flow::FlowApi {
4409                    client: self.client,
4410                };
4411                Ok(api
4412                    .get_controller_service_types(
4413                        service_type,
4414                        service_bundle_group,
4415                        service_bundle_artifact,
4416                        service_bundle_version,
4417                        bundle_group_filter,
4418                        bundle_artifact_filter,
4419                        type_filter,
4420                    )
4421                    .await?
4422                    .into())
4423            }
4424        }
4425    }
4426    /// Gets controller services for reporting tasks
4427    pub async fn get_controller_services_from_controller(
4428        &self,
4429        ui_only: Option<bool>,
4430        include_referencing_components: Option<bool>,
4431    ) -> Result<types::ControllerServicesEntity, NifiError> {
4432        match self.version {
4433            DetectedVersion::V2_6_0 => {
4434                let api = crate::v2_6_0::api::flow::FlowApi {
4435                    client: self.client,
4436                };
4437                Ok(api
4438                    .get_controller_services_from_controller(
4439                        ui_only,
4440                        include_referencing_components,
4441                    )
4442                    .await?
4443                    .into())
4444            }
4445            DetectedVersion::V2_7_2 => {
4446                let api = crate::v2_7_2::api::flow::FlowApi {
4447                    client: self.client,
4448                };
4449                Ok(api
4450                    .get_controller_services_from_controller(
4451                        ui_only,
4452                        include_referencing_components,
4453                    )
4454                    .await?
4455                    .into())
4456            }
4457            DetectedVersion::V2_8_0 => {
4458                let api = crate::v2_8_0::api::flow::FlowApi {
4459                    client: self.client,
4460                };
4461                Ok(api
4462                    .get_controller_services_from_controller(
4463                        ui_only,
4464                        include_referencing_components,
4465                    )
4466                    .await?
4467                    .into())
4468            }
4469        }
4470    }
4471    /// Gets all controller services
4472    pub async fn get_controller_services_from_group(
4473        &self,
4474        id: &str,
4475        include_ancestor_groups: Option<bool>,
4476        include_descendant_groups: Option<bool>,
4477        include_referencing_components: Option<bool>,
4478        ui_only: Option<bool>,
4479    ) -> Result<types::ControllerServicesEntity, NifiError> {
4480        match self.version {
4481            DetectedVersion::V2_6_0 => {
4482                let api = crate::v2_6_0::api::flow::FlowControllerServicesApi {
4483                    client: self.client,
4484                    id,
4485                };
4486                Ok(api
4487                    .get_controller_services_from_group(
4488                        include_ancestor_groups,
4489                        include_descendant_groups,
4490                        include_referencing_components,
4491                        ui_only,
4492                    )
4493                    .await?
4494                    .into())
4495            }
4496            DetectedVersion::V2_7_2 => {
4497                let api = crate::v2_7_2::api::flow::FlowControllerServicesApi {
4498                    client: self.client,
4499                    id,
4500                };
4501                Ok(api
4502                    .get_controller_services_from_group(
4503                        include_ancestor_groups,
4504                        include_descendant_groups,
4505                        include_referencing_components,
4506                        ui_only,
4507                    )
4508                    .await?
4509                    .into())
4510            }
4511            DetectedVersion::V2_8_0 => {
4512                let api = crate::v2_8_0::api::flow::FlowControllerServicesApi {
4513                    client: self.client,
4514                    id,
4515                };
4516                Ok(api
4517                    .get_controller_services_from_group(
4518                        include_ancestor_groups,
4519                        include_descendant_groups,
4520                        include_referencing_components,
4521                        ui_only,
4522                    )
4523                    .await?
4524                    .into())
4525            }
4526        }
4527    }
4528    /// Gets the current status of this NiFi
4529    pub async fn get_controller_status(&self) -> Result<types::ControllerStatusDto, NifiError> {
4530        match self.version {
4531            DetectedVersion::V2_6_0 => {
4532                let api = crate::v2_6_0::api::flow::FlowApi {
4533                    client: self.client,
4534                };
4535                Ok(api.get_controller_status().await?.into())
4536            }
4537            DetectedVersion::V2_7_2 => {
4538                let api = crate::v2_7_2::api::flow::FlowApi {
4539                    client: self.client,
4540                };
4541                Ok(api.get_controller_status().await?.into())
4542            }
4543            DetectedVersion::V2_8_0 => {
4544                let api = crate::v2_8_0::api::flow::FlowApi {
4545                    client: self.client,
4546                };
4547                Ok(api.get_controller_status().await?.into())
4548            }
4549        }
4550    }
4551    /// Retrieves the user identity of the user making the request
4552    pub async fn get_current_user(&self) -> Result<types::CurrentUserEntity, NifiError> {
4553        match self.version {
4554            DetectedVersion::V2_6_0 => {
4555                let api = crate::v2_6_0::api::flow::FlowApi {
4556                    client: self.client,
4557                };
4558                Ok(api.get_current_user().await?.into())
4559            }
4560            DetectedVersion::V2_7_2 => {
4561                let api = crate::v2_7_2::api::flow::FlowApi {
4562                    client: self.client,
4563                };
4564                Ok(api.get_current_user().await?.into())
4565            }
4566            DetectedVersion::V2_8_0 => {
4567                let api = crate::v2_8_0::api::flow::FlowApi {
4568                    client: self.client,
4569                };
4570                Ok(api.get_current_user().await?.into())
4571            }
4572        }
4573    }
4574    /// Gets the details of a flow from the specified registry and bucket for the specified flow for the current user
4575    pub async fn get_details(
4576        &self,
4577        id: &str,
4578        registry_id: &str,
4579        bucket_id: &str,
4580        flow_id: &str,
4581        branch: Option<&str>,
4582    ) -> Result<types::VersionedFlowDto, NifiError> {
4583        match self.version {
4584            DetectedVersion::V2_6_0 => {
4585                let api = crate::v2_6_0::api::flow::FlowBucketsApi {
4586                    client: self.client,
4587                    id,
4588                };
4589                Ok(api
4590                    .get_details(registry_id, bucket_id, flow_id, branch)
4591                    .await?
4592                    .into())
4593            }
4594            DetectedVersion::V2_7_2 => {
4595                let api = crate::v2_7_2::api::flow::FlowBucketsApi {
4596                    client: self.client,
4597                    id,
4598                };
4599                Ok(api
4600                    .get_details(registry_id, bucket_id, flow_id, branch)
4601                    .await?
4602                    .into())
4603            }
4604            DetectedVersion::V2_8_0 => {
4605                let api = crate::v2_8_0::api::flow::FlowBucketsApi {
4606                    client: self.client,
4607                    id,
4608                };
4609                Ok(api
4610                    .get_details(registry_id, bucket_id, flow_id, branch)
4611                    .await?
4612                    .into())
4613            }
4614        }
4615    }
4616    /// Gets a process group
4617    pub async fn get_flow(
4618        &self,
4619        id: &str,
4620        ui_only: Option<bool>,
4621    ) -> Result<types::ProcessGroupFlowEntity, NifiError> {
4622        match self.version {
4623            DetectedVersion::V2_6_0 => {
4624                let api = crate::v2_6_0::api::flow::FlowApi {
4625                    client: self.client,
4626                };
4627                Ok(api.get_flow(id, ui_only).await?.into())
4628            }
4629            DetectedVersion::V2_7_2 => {
4630                let api = crate::v2_7_2::api::flow::FlowApi {
4631                    client: self.client,
4632                };
4633                Ok(api.get_flow(id, ui_only).await?.into())
4634            }
4635            DetectedVersion::V2_8_0 => {
4636                let api = crate::v2_8_0::api::flow::FlowApi {
4637                    client: self.client,
4638                };
4639                Ok(api.get_flow(id, ui_only).await?.into())
4640            }
4641        }
4642    }
4643    /// Returns flow analysis results produced by the analysis of a given process group
4644    pub async fn get_flow_analysis_results(
4645        &self,
4646        process_group_id: &str,
4647    ) -> Result<types::FlowAnalysisResultEntity, NifiError> {
4648        match self.version {
4649            DetectedVersion::V2_6_0 => {
4650                let api = crate::v2_6_0::api::flow::FlowApi {
4651                    client: self.client,
4652                };
4653                Ok(api
4654                    .get_flow_analysis_results(process_group_id)
4655                    .await?
4656                    .into())
4657            }
4658            DetectedVersion::V2_7_2 => {
4659                let api = crate::v2_7_2::api::flow::FlowApi {
4660                    client: self.client,
4661                };
4662                Ok(api
4663                    .get_flow_analysis_results(process_group_id)
4664                    .await?
4665                    .into())
4666            }
4667            DetectedVersion::V2_8_0 => {
4668                let api = crate::v2_8_0::api::flow::FlowApi {
4669                    client: self.client,
4670                };
4671                Ok(api
4672                    .get_flow_analysis_results(process_group_id)
4673                    .await?
4674                    .into())
4675            }
4676        }
4677    }
4678    /// Retrieves the Flow Analysis Rule Definition for the specified component type.
4679    pub async fn get_flow_analysis_rule_definition(
4680        &self,
4681        group: &str,
4682        artifact: &str,
4683        version: &str,
4684        r#type: &str,
4685    ) -> Result<types::FlowAnalysisRuleDefinition, NifiError> {
4686        match self.version {
4687            DetectedVersion::V2_6_0 => {
4688                let api = crate::v2_6_0::api::flow::FlowApi {
4689                    client: self.client,
4690                };
4691                Ok(api
4692                    .get_flow_analysis_rule_definition(group, artifact, version, r#type)
4693                    .await?
4694                    .into())
4695            }
4696            DetectedVersion::V2_7_2 => {
4697                let api = crate::v2_7_2::api::flow::FlowApi {
4698                    client: self.client,
4699                };
4700                Ok(api
4701                    .get_flow_analysis_rule_definition(group, artifact, version, r#type)
4702                    .await?
4703                    .into())
4704            }
4705            DetectedVersion::V2_8_0 => {
4706                let api = crate::v2_8_0::api::flow::FlowApi {
4707                    client: self.client,
4708                };
4709                Ok(api
4710                    .get_flow_analysis_rule_definition(group, artifact, version, r#type)
4711                    .await?
4712                    .into())
4713            }
4714        }
4715    }
4716    /// Retrieves the types of available Flow Analysis Rules
4717    pub async fn get_flow_analysis_rule_types(
4718        &self,
4719        bundle_group_filter: Option<&str>,
4720        bundle_artifact_filter: Option<&str>,
4721        r#type: Option<&str>,
4722    ) -> Result<types::FlowAnalysisRuleTypesEntity, NifiError> {
4723        match self.version {
4724            DetectedVersion::V2_6_0 => {
4725                let api = crate::v2_6_0::api::flow::FlowApi {
4726                    client: self.client,
4727                };
4728                Ok(api
4729                    .get_flow_analysis_rule_types(
4730                        bundle_group_filter,
4731                        bundle_artifact_filter,
4732                        r#type,
4733                    )
4734                    .await?
4735                    .into())
4736            }
4737            DetectedVersion::V2_7_2 => {
4738                let api = crate::v2_7_2::api::flow::FlowApi {
4739                    client: self.client,
4740                };
4741                Ok(api
4742                    .get_flow_analysis_rule_types(
4743                        bundle_group_filter,
4744                        bundle_artifact_filter,
4745                        r#type,
4746                    )
4747                    .await?
4748                    .into())
4749            }
4750            DetectedVersion::V2_8_0 => {
4751                let api = crate::v2_8_0::api::flow::FlowApi {
4752                    client: self.client,
4753                };
4754                Ok(api
4755                    .get_flow_analysis_rule_types(
4756                        bundle_group_filter,
4757                        bundle_artifact_filter,
4758                        r#type,
4759                    )
4760                    .await?
4761                    .into())
4762            }
4763        }
4764    }
4765    /// Retrieves the configuration for this NiFi flow
4766    pub async fn get_flow_config(&self) -> Result<types::FlowConfigurationDto, NifiError> {
4767        match self.version {
4768            DetectedVersion::V2_6_0 => {
4769                let api = crate::v2_6_0::api::flow::FlowApi {
4770                    client: self.client,
4771                };
4772                Ok(api.get_flow_config().await?.into())
4773            }
4774            DetectedVersion::V2_7_2 => {
4775                let api = crate::v2_7_2::api::flow::FlowApi {
4776                    client: self.client,
4777                };
4778                Ok(api.get_flow_config().await?.into())
4779            }
4780            DetectedVersion::V2_8_0 => {
4781                let api = crate::v2_8_0::api::flow::FlowApi {
4782                    client: self.client,
4783                };
4784                Ok(api.get_flow_config().await?.into())
4785            }
4786        }
4787    }
4788    /// Gets all metrics for the flow from a particular node
4789    pub async fn get_flow_metrics(
4790        &self,
4791        producer: &str,
4792        included_registries: Option<&str>,
4793        sample_name: Option<&str>,
4794        sample_label_value: Option<&str>,
4795        root_field_name: Option<&str>,
4796        flow_metrics_reporting_strategy: Option<&str>,
4797    ) -> Result<(), NifiError> {
4798        match self.version {
4799            DetectedVersion::V2_6_0 => {
4800                let api = crate::v2_6_0::api::flow::FlowApi {
4801                    client: self.client,
4802                };
4803                api.get_flow_metrics(
4804                    producer,
4805                    included_registries
4806                        .map(|v| {
4807                            serde_json::from_value::<crate::v2_6_0::types::IncludedRegistries>(
4808                                serde_json::Value::String(v.to_string()),
4809                            )
4810                        })
4811                        .transpose()
4812                        .map_err(|_| NifiError::UnsupportedEndpoint {
4813                            endpoint: "get_flow_metrics".to_string(),
4814                            version: "2.6.0".to_string(),
4815                        })?,
4816                    sample_name,
4817                    sample_label_value,
4818                    root_field_name,
4819                )
4820                .await
4821            }
4822            DetectedVersion::V2_7_2 => {
4823                let api = crate::v2_7_2::api::flow::FlowApi {
4824                    client: self.client,
4825                };
4826                api.get_flow_metrics(
4827                    producer,
4828                    included_registries
4829                        .map(|v| {
4830                            serde_json::from_value::<crate::v2_7_2::types::IncludedRegistries>(
4831                                serde_json::Value::String(v.to_string()),
4832                            )
4833                        })
4834                        .transpose()
4835                        .map_err(|_| NifiError::UnsupportedEndpoint {
4836                            endpoint: "get_flow_metrics".to_string(),
4837                            version: "2.7.2".to_string(),
4838                        })?,
4839                    sample_name,
4840                    sample_label_value,
4841                    root_field_name,
4842                    flow_metrics_reporting_strategy
4843                        .map(|v| {
4844                            serde_json::from_value::<
4845                                crate::v2_7_2::types::FlowMetricsReportingStrategy,
4846                            >(serde_json::Value::String(v.to_string()))
4847                        })
4848                        .transpose()
4849                        .map_err(|_| NifiError::UnsupportedEndpoint {
4850                            endpoint: "get_flow_metrics".to_string(),
4851                            version: "2.7.2".to_string(),
4852                        })?,
4853                )
4854                .await
4855            }
4856            DetectedVersion::V2_8_0 => {
4857                let api = crate::v2_8_0::api::flow::FlowApi {
4858                    client: self.client,
4859                };
4860                api.get_flow_metrics(
4861                    producer,
4862                    included_registries
4863                        .map(|v| {
4864                            serde_json::from_value::<crate::v2_8_0::types::IncludedRegistries>(
4865                                serde_json::Value::String(v.to_string()),
4866                            )
4867                        })
4868                        .transpose()
4869                        .map_err(|_| NifiError::UnsupportedEndpoint {
4870                            endpoint: "get_flow_metrics".to_string(),
4871                            version: "2.8.0".to_string(),
4872                        })?,
4873                    sample_name,
4874                    sample_label_value,
4875                    root_field_name,
4876                    flow_metrics_reporting_strategy
4877                        .map(|v| {
4878                            serde_json::from_value::<
4879                                crate::v2_8_0::types::FlowMetricsReportingStrategy,
4880                            >(serde_json::Value::String(v.to_string()))
4881                        })
4882                        .transpose()
4883                        .map_err(|_| NifiError::UnsupportedEndpoint {
4884                            endpoint: "get_flow_metrics".to_string(),
4885                            version: "2.8.0".to_string(),
4886                        })?,
4887                )
4888                .await
4889            }
4890        }
4891    }
4892    /// Retrieves the Flow Registry Client Definition for the specified component type.
4893    pub async fn get_flow_registry_client_definition(
4894        &self,
4895        group: &str,
4896        artifact: &str,
4897        version: &str,
4898        r#type: &str,
4899    ) -> Result<types::FlowRegistryClientDefinition, NifiError> {
4900        match self.version {
4901            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
4902                endpoint: "get_flow_registry_client_definition".to_string(),
4903                version: "2.6.0".to_string(),
4904            }),
4905            DetectedVersion::V2_7_2 => {
4906                let api = crate::v2_7_2::api::flow::FlowApi {
4907                    client: self.client,
4908                };
4909                Ok(api
4910                    .get_flow_registry_client_definition(group, artifact, version, r#type)
4911                    .await?
4912                    .into())
4913            }
4914            DetectedVersion::V2_8_0 => {
4915                let api = crate::v2_8_0::api::flow::FlowApi {
4916                    client: self.client,
4917                };
4918                Ok(api
4919                    .get_flow_registry_client_definition(group, artifact, version, r#type)
4920                    .await?
4921                    .into())
4922            }
4923        }
4924    }
4925    /// Gets the flows from the specified registry and bucket for the current user
4926    pub async fn get_flows(
4927        &self,
4928        id: &str,
4929        registry_id: &str,
4930        bucket_id: &str,
4931        branch: Option<&str>,
4932    ) -> Result<types::VersionedFlowsEntity, NifiError> {
4933        match self.version {
4934            DetectedVersion::V2_6_0 => {
4935                let api = crate::v2_6_0::api::flow::FlowBucketsApi {
4936                    client: self.client,
4937                    id,
4938                };
4939                Ok(api.get_flows(registry_id, bucket_id, branch).await?.into())
4940            }
4941            DetectedVersion::V2_7_2 => {
4942                let api = crate::v2_7_2::api::flow::FlowBucketsApi {
4943                    client: self.client,
4944                    id,
4945                };
4946                Ok(api.get_flows(registry_id, bucket_id, branch).await?.into())
4947            }
4948            DetectedVersion::V2_8_0 => {
4949                let api = crate::v2_8_0::api::flow::FlowBucketsApi {
4950                    client: self.client,
4951                    id,
4952                };
4953                Ok(api.get_flows(registry_id, bucket_id, branch).await?.into())
4954            }
4955        }
4956    }
4957    /// Gets status for an input port
4958    pub async fn get_input_port_status(
4959        &self,
4960        id: &str,
4961        nodewise: Option<bool>,
4962        cluster_node_id: Option<&str>,
4963    ) -> Result<types::PortStatusEntity, NifiError> {
4964        match self.version {
4965            DetectedVersion::V2_6_0 => {
4966                let api = crate::v2_6_0::api::flow::FlowStatusApi {
4967                    client: self.client,
4968                    id,
4969                };
4970                Ok(api
4971                    .get_input_port_status(nodewise, cluster_node_id)
4972                    .await?
4973                    .into())
4974            }
4975            DetectedVersion::V2_7_2 => {
4976                let api = crate::v2_7_2::api::flow::FlowStatusApi {
4977                    client: self.client,
4978                    id,
4979                };
4980                Ok(api
4981                    .get_input_port_status(nodewise, cluster_node_id)
4982                    .await?
4983                    .into())
4984            }
4985            DetectedVersion::V2_8_0 => {
4986                let api = crate::v2_8_0::api::flow::FlowStatusApi {
4987                    client: self.client,
4988                    id,
4989                };
4990                Ok(api
4991                    .get_input_port_status(nodewise, cluster_node_id)
4992                    .await?
4993                    .into())
4994            }
4995        }
4996    }
4997    /// Gets all listen ports configured on this NiFi that the current user has access to
4998    pub async fn get_listen_ports(&self) -> Result<types::ListenPortsEntity, NifiError> {
4999        match self.version {
5000            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
5001                endpoint: "get_listen_ports".to_string(),
5002                version: "2.6.0".to_string(),
5003            }),
5004            DetectedVersion::V2_7_2 => {
5005                let api = crate::v2_7_2::api::flow::FlowApi {
5006                    client: self.client,
5007                };
5008                Ok(api.get_listen_ports().await?.into())
5009            }
5010            DetectedVersion::V2_8_0 => {
5011                let api = crate::v2_8_0::api::flow::FlowApi {
5012                    client: self.client,
5013                };
5014                Ok(api.get_listen_ports().await?.into())
5015            }
5016        }
5017    }
5018    /// Gets status for an output port
5019    pub async fn get_output_port_status(
5020        &self,
5021        id: &str,
5022        nodewise: Option<bool>,
5023        cluster_node_id: Option<&str>,
5024    ) -> Result<types::PortStatusEntity, NifiError> {
5025        match self.version {
5026            DetectedVersion::V2_6_0 => {
5027                let api = crate::v2_6_0::api::flow::FlowStatusApi {
5028                    client: self.client,
5029                    id,
5030                };
5031                Ok(api
5032                    .get_output_port_status(nodewise, cluster_node_id)
5033                    .await?
5034                    .into())
5035            }
5036            DetectedVersion::V2_7_2 => {
5037                let api = crate::v2_7_2::api::flow::FlowStatusApi {
5038                    client: self.client,
5039                    id,
5040                };
5041                Ok(api
5042                    .get_output_port_status(nodewise, cluster_node_id)
5043                    .await?
5044                    .into())
5045            }
5046            DetectedVersion::V2_8_0 => {
5047                let api = crate::v2_8_0::api::flow::FlowStatusApi {
5048                    client: self.client,
5049                    id,
5050                };
5051                Ok(api
5052                    .get_output_port_status(nodewise, cluster_node_id)
5053                    .await?
5054                    .into())
5055            }
5056        }
5057    }
5058    /// Gets all Parameter Contexts
5059    pub async fn get_parameter_contexts(
5060        &self,
5061    ) -> Result<types::ParameterContextsEntity, NifiError> {
5062        match self.version {
5063            DetectedVersion::V2_6_0 => {
5064                let api = crate::v2_6_0::api::flow::FlowApi {
5065                    client: self.client,
5066                };
5067                Ok(api.get_parameter_contexts().await?.into())
5068            }
5069            DetectedVersion::V2_7_2 => {
5070                let api = crate::v2_7_2::api::flow::FlowApi {
5071                    client: self.client,
5072                };
5073                Ok(api.get_parameter_contexts().await?.into())
5074            }
5075            DetectedVersion::V2_8_0 => {
5076                let api = crate::v2_8_0::api::flow::FlowApi {
5077                    client: self.client,
5078                };
5079                Ok(api.get_parameter_contexts().await?.into())
5080            }
5081        }
5082    }
5083    /// Retrieves the Parameter Provider Definition for the specified component type.
5084    pub async fn get_parameter_provider_definition(
5085        &self,
5086        group: &str,
5087        artifact: &str,
5088        version: &str,
5089        r#type: &str,
5090    ) -> Result<types::ParameterProviderDefinition, NifiError> {
5091        match self.version {
5092            DetectedVersion::V2_6_0 => {
5093                let api = crate::v2_6_0::api::flow::FlowApi {
5094                    client: self.client,
5095                };
5096                Ok(api
5097                    .get_parameter_provider_definition(group, artifact, version, r#type)
5098                    .await?
5099                    .into())
5100            }
5101            DetectedVersion::V2_7_2 => {
5102                let api = crate::v2_7_2::api::flow::FlowApi {
5103                    client: self.client,
5104                };
5105                Ok(api
5106                    .get_parameter_provider_definition(group, artifact, version, r#type)
5107                    .await?
5108                    .into())
5109            }
5110            DetectedVersion::V2_8_0 => {
5111                let api = crate::v2_8_0::api::flow::FlowApi {
5112                    client: self.client,
5113                };
5114                Ok(api
5115                    .get_parameter_provider_definition(group, artifact, version, r#type)
5116                    .await?
5117                    .into())
5118            }
5119        }
5120    }
5121    /// Retrieves the types of parameter providers that this NiFi supports
5122    pub async fn get_parameter_provider_types(
5123        &self,
5124        bundle_group_filter: Option<&str>,
5125        bundle_artifact_filter: Option<&str>,
5126        r#type: Option<&str>,
5127    ) -> Result<types::ParameterProviderTypesEntity, NifiError> {
5128        match self.version {
5129            DetectedVersion::V2_6_0 => {
5130                let api = crate::v2_6_0::api::flow::FlowApi {
5131                    client: self.client,
5132                };
5133                Ok(api
5134                    .get_parameter_provider_types(
5135                        bundle_group_filter,
5136                        bundle_artifact_filter,
5137                        r#type,
5138                    )
5139                    .await?
5140                    .into())
5141            }
5142            DetectedVersion::V2_7_2 => {
5143                let api = crate::v2_7_2::api::flow::FlowApi {
5144                    client: self.client,
5145                };
5146                Ok(api
5147                    .get_parameter_provider_types(
5148                        bundle_group_filter,
5149                        bundle_artifact_filter,
5150                        r#type,
5151                    )
5152                    .await?
5153                    .into())
5154            }
5155            DetectedVersion::V2_8_0 => {
5156                let api = crate::v2_8_0::api::flow::FlowApi {
5157                    client: self.client,
5158                };
5159                Ok(api
5160                    .get_parameter_provider_types(
5161                        bundle_group_filter,
5162                        bundle_artifact_filter,
5163                        r#type,
5164                    )
5165                    .await?
5166                    .into())
5167            }
5168        }
5169    }
5170    /// Gets all parameter providers
5171    pub async fn get_parameter_providers(
5172        &self,
5173    ) -> Result<types::ParameterProvidersEntity, NifiError> {
5174        match self.version {
5175            DetectedVersion::V2_6_0 => {
5176                let api = crate::v2_6_0::api::flow::FlowApi {
5177                    client: self.client,
5178                };
5179                Ok(api.get_parameter_providers().await?.into())
5180            }
5181            DetectedVersion::V2_7_2 => {
5182                let api = crate::v2_7_2::api::flow::FlowApi {
5183                    client: self.client,
5184                };
5185                Ok(api.get_parameter_providers().await?.into())
5186            }
5187            DetectedVersion::V2_8_0 => {
5188                let api = crate::v2_8_0::api::flow::FlowApi {
5189                    client: self.client,
5190                };
5191                Ok(api.get_parameter_providers().await?.into())
5192            }
5193        }
5194    }
5195    /// Retrieves the types of prioritizers that this NiFi supports
5196    pub async fn get_prioritizers(&self) -> Result<types::PrioritizerTypesEntity, NifiError> {
5197        match self.version {
5198            DetectedVersion::V2_6_0 => {
5199                let api = crate::v2_6_0::api::flow::FlowApi {
5200                    client: self.client,
5201                };
5202                Ok(api.get_prioritizers().await?.into())
5203            }
5204            DetectedVersion::V2_7_2 => {
5205                let api = crate::v2_7_2::api::flow::FlowApi {
5206                    client: self.client,
5207                };
5208                Ok(api.get_prioritizers().await?.into())
5209            }
5210            DetectedVersion::V2_8_0 => {
5211                let api = crate::v2_8_0::api::flow::FlowApi {
5212                    client: self.client,
5213                };
5214                Ok(api.get_prioritizers().await?.into())
5215            }
5216        }
5217    }
5218    /// Gets the status for a process group
5219    pub async fn get_process_group_status(
5220        &self,
5221        id: &str,
5222        recursive: Option<bool>,
5223        nodewise: Option<bool>,
5224        cluster_node_id: Option<&str>,
5225    ) -> Result<types::ProcessGroupStatusEntity, NifiError> {
5226        match self.version {
5227            DetectedVersion::V2_6_0 => {
5228                let api = crate::v2_6_0::api::flow::FlowStatusApi {
5229                    client: self.client,
5230                    id,
5231                };
5232                Ok(api
5233                    .get_process_group_status(recursive, nodewise, cluster_node_id)
5234                    .await?
5235                    .into())
5236            }
5237            DetectedVersion::V2_7_2 => {
5238                let api = crate::v2_7_2::api::flow::FlowStatusApi {
5239                    client: self.client,
5240                    id,
5241                };
5242                Ok(api
5243                    .get_process_group_status(recursive, nodewise, cluster_node_id)
5244                    .await?
5245                    .into())
5246            }
5247            DetectedVersion::V2_8_0 => {
5248                let api = crate::v2_8_0::api::flow::FlowStatusApi {
5249                    client: self.client,
5250                    id,
5251                };
5252                Ok(api
5253                    .get_process_group_status(recursive, nodewise, cluster_node_id)
5254                    .await?
5255                    .into())
5256            }
5257        }
5258    }
5259    /// Gets status history for a remote process group
5260    pub async fn get_process_group_status_history(
5261        &self,
5262        id: &str,
5263    ) -> Result<types::StatusHistoryEntity, NifiError> {
5264        match self.version {
5265            DetectedVersion::V2_6_0 => {
5266                let api = crate::v2_6_0::api::flow::FlowStatusApi {
5267                    client: self.client,
5268                    id,
5269                };
5270                Ok(api.get_process_group_status_history().await?.into())
5271            }
5272            DetectedVersion::V2_7_2 => {
5273                let api = crate::v2_7_2::api::flow::FlowStatusApi {
5274                    client: self.client,
5275                    id,
5276                };
5277                Ok(api.get_process_group_status_history().await?.into())
5278            }
5279            DetectedVersion::V2_8_0 => {
5280                let api = crate::v2_8_0::api::flow::FlowStatusApi {
5281                    client: self.client,
5282                    id,
5283                };
5284                Ok(api.get_process_group_status_history().await?.into())
5285            }
5286        }
5287    }
5288    /// Retrieves the Processor Definition for the specified component type.
5289    pub async fn get_processor_definition(
5290        &self,
5291        group: &str,
5292        artifact: &str,
5293        version: &str,
5294        r#type: &str,
5295    ) -> Result<types::ProcessorDefinition, NifiError> {
5296        match self.version {
5297            DetectedVersion::V2_6_0 => {
5298                let api = crate::v2_6_0::api::flow::FlowApi {
5299                    client: self.client,
5300                };
5301                Ok(api
5302                    .get_processor_definition(group, artifact, version, r#type)
5303                    .await?
5304                    .into())
5305            }
5306            DetectedVersion::V2_7_2 => {
5307                let api = crate::v2_7_2::api::flow::FlowApi {
5308                    client: self.client,
5309                };
5310                Ok(api
5311                    .get_processor_definition(group, artifact, version, r#type)
5312                    .await?
5313                    .into())
5314            }
5315            DetectedVersion::V2_8_0 => {
5316                let api = crate::v2_8_0::api::flow::FlowApi {
5317                    client: self.client,
5318                };
5319                Ok(api
5320                    .get_processor_definition(group, artifact, version, r#type)
5321                    .await?
5322                    .into())
5323            }
5324        }
5325    }
5326    /// Gets status for a processor
5327    pub async fn get_processor_status(
5328        &self,
5329        id: &str,
5330        nodewise: Option<bool>,
5331        cluster_node_id: Option<&str>,
5332    ) -> Result<types::ProcessorStatusEntity, NifiError> {
5333        match self.version {
5334            DetectedVersion::V2_6_0 => {
5335                let api = crate::v2_6_0::api::flow::FlowStatusApi {
5336                    client: self.client,
5337                    id,
5338                };
5339                Ok(api
5340                    .get_processor_status(nodewise, cluster_node_id)
5341                    .await?
5342                    .into())
5343            }
5344            DetectedVersion::V2_7_2 => {
5345                let api = crate::v2_7_2::api::flow::FlowStatusApi {
5346                    client: self.client,
5347                    id,
5348                };
5349                Ok(api
5350                    .get_processor_status(nodewise, cluster_node_id)
5351                    .await?
5352                    .into())
5353            }
5354            DetectedVersion::V2_8_0 => {
5355                let api = crate::v2_8_0::api::flow::FlowStatusApi {
5356                    client: self.client,
5357                    id,
5358                };
5359                Ok(api
5360                    .get_processor_status(nodewise, cluster_node_id)
5361                    .await?
5362                    .into())
5363            }
5364        }
5365    }
5366    /// Gets status history for a processor
5367    pub async fn get_processor_status_history(
5368        &self,
5369        id: &str,
5370    ) -> Result<types::StatusHistoryEntity, NifiError> {
5371        match self.version {
5372            DetectedVersion::V2_6_0 => {
5373                let api = crate::v2_6_0::api::flow::FlowStatusApi {
5374                    client: self.client,
5375                    id,
5376                };
5377                Ok(api.get_processor_status_history().await?.into())
5378            }
5379            DetectedVersion::V2_7_2 => {
5380                let api = crate::v2_7_2::api::flow::FlowStatusApi {
5381                    client: self.client,
5382                    id,
5383                };
5384                Ok(api.get_processor_status_history().await?.into())
5385            }
5386            DetectedVersion::V2_8_0 => {
5387                let api = crate::v2_8_0::api::flow::FlowStatusApi {
5388                    client: self.client,
5389                    id,
5390                };
5391                Ok(api.get_processor_status_history().await?.into())
5392            }
5393        }
5394    }
5395    /// Retrieves the types of processors that this NiFi supports
5396    pub async fn get_processor_types(
5397        &self,
5398        bundle_group_filter: Option<&str>,
5399        bundle_artifact_filter: Option<&str>,
5400        r#type: Option<&str>,
5401    ) -> Result<types::ProcessorTypesEntity, NifiError> {
5402        match self.version {
5403            DetectedVersion::V2_6_0 => {
5404                let api = crate::v2_6_0::api::flow::FlowApi {
5405                    client: self.client,
5406                };
5407                Ok(api
5408                    .get_processor_types(bundle_group_filter, bundle_artifact_filter, r#type)
5409                    .await?
5410                    .into())
5411            }
5412            DetectedVersion::V2_7_2 => {
5413                let api = crate::v2_7_2::api::flow::FlowApi {
5414                    client: self.client,
5415                };
5416                Ok(api
5417                    .get_processor_types(bundle_group_filter, bundle_artifact_filter, r#type)
5418                    .await?
5419                    .into())
5420            }
5421            DetectedVersion::V2_8_0 => {
5422                let api = crate::v2_8_0::api::flow::FlowApi {
5423                    client: self.client,
5424                };
5425                Ok(api
5426                    .get_processor_types(bundle_group_filter, bundle_artifact_filter, r#type)
5427                    .await?
5428                    .into())
5429            }
5430        }
5431    }
5432    /// Gets the listing of available flow registry clients
5433    pub async fn get_registry_clients(
5434        &self,
5435    ) -> Result<types::FlowRegistryClientsEntity, NifiError> {
5436        match self.version {
5437            DetectedVersion::V2_6_0 => {
5438                let api = crate::v2_6_0::api::flow::FlowApi {
5439                    client: self.client,
5440                };
5441                Ok(api.get_registry_clients().await?.into())
5442            }
5443            DetectedVersion::V2_7_2 => {
5444                let api = crate::v2_7_2::api::flow::FlowApi {
5445                    client: self.client,
5446                };
5447                Ok(api.get_registry_clients().await?.into())
5448            }
5449            DetectedVersion::V2_8_0 => {
5450                let api = crate::v2_8_0::api::flow::FlowApi {
5451                    client: self.client,
5452                };
5453                Ok(api.get_registry_clients().await?.into())
5454            }
5455        }
5456    }
5457    /// Gets status for a remote process group
5458    pub async fn get_remote_process_group_status(
5459        &self,
5460        id: &str,
5461        nodewise: Option<bool>,
5462        cluster_node_id: Option<&str>,
5463    ) -> Result<types::RemoteProcessGroupStatusEntity, NifiError> {
5464        match self.version {
5465            DetectedVersion::V2_6_0 => {
5466                let api = crate::v2_6_0::api::flow::FlowStatusApi {
5467                    client: self.client,
5468                    id,
5469                };
5470                Ok(api
5471                    .get_remote_process_group_status(nodewise, cluster_node_id)
5472                    .await?
5473                    .into())
5474            }
5475            DetectedVersion::V2_7_2 => {
5476                let api = crate::v2_7_2::api::flow::FlowStatusApi {
5477                    client: self.client,
5478                    id,
5479                };
5480                Ok(api
5481                    .get_remote_process_group_status(nodewise, cluster_node_id)
5482                    .await?
5483                    .into())
5484            }
5485            DetectedVersion::V2_8_0 => {
5486                let api = crate::v2_8_0::api::flow::FlowStatusApi {
5487                    client: self.client,
5488                    id,
5489                };
5490                Ok(api
5491                    .get_remote_process_group_status(nodewise, cluster_node_id)
5492                    .await?
5493                    .into())
5494            }
5495        }
5496    }
5497    /// Gets the status history
5498    pub async fn get_remote_process_group_status_history(
5499        &self,
5500        id: &str,
5501    ) -> Result<types::StatusHistoryEntity, NifiError> {
5502        match self.version {
5503            DetectedVersion::V2_6_0 => {
5504                let api = crate::v2_6_0::api::flow::FlowStatusApi {
5505                    client: self.client,
5506                    id,
5507                };
5508                Ok(api.get_remote_process_group_status_history().await?.into())
5509            }
5510            DetectedVersion::V2_7_2 => {
5511                let api = crate::v2_7_2::api::flow::FlowStatusApi {
5512                    client: self.client,
5513                    id,
5514                };
5515                Ok(api.get_remote_process_group_status_history().await?.into())
5516            }
5517            DetectedVersion::V2_8_0 => {
5518                let api = crate::v2_8_0::api::flow::FlowStatusApi {
5519                    client: self.client,
5520                    id,
5521                };
5522                Ok(api.get_remote_process_group_status_history().await?.into())
5523            }
5524        }
5525    }
5526    /// Retrieves the Reporting Task Definition for the specified component type.
5527    pub async fn get_reporting_task_definition(
5528        &self,
5529        group: &str,
5530        artifact: &str,
5531        version: &str,
5532        r#type: &str,
5533    ) -> Result<types::ReportingTaskDefinition, NifiError> {
5534        match self.version {
5535            DetectedVersion::V2_6_0 => {
5536                let api = crate::v2_6_0::api::flow::FlowApi {
5537                    client: self.client,
5538                };
5539                Ok(api
5540                    .get_reporting_task_definition(group, artifact, version, r#type)
5541                    .await?
5542                    .into())
5543            }
5544            DetectedVersion::V2_7_2 => {
5545                let api = crate::v2_7_2::api::flow::FlowApi {
5546                    client: self.client,
5547                };
5548                Ok(api
5549                    .get_reporting_task_definition(group, artifact, version, r#type)
5550                    .await?
5551                    .into())
5552            }
5553            DetectedVersion::V2_8_0 => {
5554                let api = crate::v2_8_0::api::flow::FlowApi {
5555                    client: self.client,
5556                };
5557                Ok(api
5558                    .get_reporting_task_definition(group, artifact, version, r#type)
5559                    .await?
5560                    .into())
5561            }
5562        }
5563    }
5564    /// Get a snapshot of the given reporting tasks and any controller services they use
5565    pub async fn get_reporting_task_snapshot(
5566        &self,
5567        reporting_task_id: Option<&str>,
5568    ) -> Result<types::VersionedReportingTaskSnapshot, NifiError> {
5569        match self.version {
5570            DetectedVersion::V2_6_0 => {
5571                let api = crate::v2_6_0::api::flow::FlowApi {
5572                    client: self.client,
5573                };
5574                Ok(api
5575                    .get_reporting_task_snapshot(reporting_task_id)
5576                    .await?
5577                    .into())
5578            }
5579            DetectedVersion::V2_7_2 => {
5580                let api = crate::v2_7_2::api::flow::FlowApi {
5581                    client: self.client,
5582                };
5583                Ok(api
5584                    .get_reporting_task_snapshot(reporting_task_id)
5585                    .await?
5586                    .into())
5587            }
5588            DetectedVersion::V2_8_0 => {
5589                let api = crate::v2_8_0::api::flow::FlowApi {
5590                    client: self.client,
5591                };
5592                Ok(api
5593                    .get_reporting_task_snapshot(reporting_task_id)
5594                    .await?
5595                    .into())
5596            }
5597        }
5598    }
5599    /// Retrieves the types of reporting tasks that this NiFi supports
5600    pub async fn get_reporting_task_types(
5601        &self,
5602        bundle_group_filter: Option<&str>,
5603        bundle_artifact_filter: Option<&str>,
5604        r#type: Option<&str>,
5605    ) -> Result<types::ReportingTaskTypesEntity, NifiError> {
5606        match self.version {
5607            DetectedVersion::V2_6_0 => {
5608                let api = crate::v2_6_0::api::flow::FlowApi {
5609                    client: self.client,
5610                };
5611                Ok(api
5612                    .get_reporting_task_types(bundle_group_filter, bundle_artifact_filter, r#type)
5613                    .await?
5614                    .into())
5615            }
5616            DetectedVersion::V2_7_2 => {
5617                let api = crate::v2_7_2::api::flow::FlowApi {
5618                    client: self.client,
5619                };
5620                Ok(api
5621                    .get_reporting_task_types(bundle_group_filter, bundle_artifact_filter, r#type)
5622                    .await?
5623                    .into())
5624            }
5625            DetectedVersion::V2_8_0 => {
5626                let api = crate::v2_8_0::api::flow::FlowApi {
5627                    client: self.client,
5628                };
5629                Ok(api
5630                    .get_reporting_task_types(bundle_group_filter, bundle_artifact_filter, r#type)
5631                    .await?
5632                    .into())
5633            }
5634        }
5635    }
5636    /// Gets all reporting tasks
5637    pub async fn get_reporting_tasks(&self) -> Result<types::ReportingTasksEntity, NifiError> {
5638        match self.version {
5639            DetectedVersion::V2_6_0 => {
5640                let api = crate::v2_6_0::api::flow::FlowApi {
5641                    client: self.client,
5642                };
5643                Ok(api.get_reporting_tasks().await?.into())
5644            }
5645            DetectedVersion::V2_7_2 => {
5646                let api = crate::v2_7_2::api::flow::FlowApi {
5647                    client: self.client,
5648                };
5649                Ok(api.get_reporting_tasks().await?.into())
5650            }
5651            DetectedVersion::V2_8_0 => {
5652                let api = crate::v2_8_0::api::flow::FlowApi {
5653                    client: self.client,
5654                };
5655                Ok(api.get_reporting_tasks().await?.into())
5656            }
5657        }
5658    }
5659    /// Retrieves the runtime manifest for this NiFi instance.
5660    pub async fn get_runtime_manifest(&self) -> Result<types::RuntimeManifest, NifiError> {
5661        match self.version {
5662            DetectedVersion::V2_6_0 => {
5663                let api = crate::v2_6_0::api::flow::FlowApi {
5664                    client: self.client,
5665                };
5666                Ok(api.get_runtime_manifest().await?.into())
5667            }
5668            DetectedVersion::V2_7_2 => {
5669                let api = crate::v2_7_2::api::flow::FlowApi {
5670                    client: self.client,
5671                };
5672                Ok(api.get_runtime_manifest().await?.into())
5673            }
5674            DetectedVersion::V2_8_0 => {
5675                let api = crate::v2_8_0::api::flow::FlowApi {
5676                    client: self.client,
5677                };
5678                Ok(api.get_runtime_manifest().await?.into())
5679            }
5680        }
5681    }
5682    /// Gets the differences between two versions of the same versioned flow, the basis of the comparison will be the first version
5683    pub async fn get_version_differences(
5684        &self,
5685        id: &str,
5686        registry_id: &str,
5687        branch_id_a: &str,
5688        bucket_id_a: &str,
5689        flow_id_a: &str,
5690        version_a: &str,
5691        branch_id_b: &str,
5692        bucket_id_b: &str,
5693        flow_id_b: &str,
5694        version_b: &str,
5695        offset: Option<i32>,
5696        limit: Option<i32>,
5697    ) -> Result<types::FlowComparisonEntity, NifiError> {
5698        match self.version {
5699            DetectedVersion::V2_6_0 => {
5700                let api = crate::v2_6_0::api::flow::FlowBranchesApi {
5701                    client: self.client,
5702                    id,
5703                };
5704                Ok(api
5705                    .get_version_differences(
5706                        registry_id,
5707                        branch_id_a,
5708                        bucket_id_a,
5709                        flow_id_a,
5710                        version_a,
5711                        branch_id_b,
5712                        bucket_id_b,
5713                        flow_id_b,
5714                        version_b,
5715                        offset,
5716                        limit,
5717                    )
5718                    .await?
5719                    .into())
5720            }
5721            DetectedVersion::V2_7_2 => {
5722                let api = crate::v2_7_2::api::flow::FlowBranchesApi {
5723                    client: self.client,
5724                    id,
5725                };
5726                Ok(api
5727                    .get_version_differences(
5728                        registry_id,
5729                        branch_id_a,
5730                        bucket_id_a,
5731                        flow_id_a,
5732                        version_a,
5733                        branch_id_b,
5734                        bucket_id_b,
5735                        flow_id_b,
5736                        version_b,
5737                        offset,
5738                        limit,
5739                    )
5740                    .await?
5741                    .into())
5742            }
5743            DetectedVersion::V2_8_0 => {
5744                let api = crate::v2_8_0::api::flow::FlowBranchesApi {
5745                    client: self.client,
5746                    id,
5747                };
5748                Ok(api
5749                    .get_version_differences(
5750                        registry_id,
5751                        branch_id_a,
5752                        bucket_id_a,
5753                        flow_id_a,
5754                        version_a,
5755                        branch_id_b,
5756                        bucket_id_b,
5757                        flow_id_b,
5758                        version_b,
5759                        offset,
5760                        limit,
5761                    )
5762                    .await?
5763                    .into())
5764            }
5765        }
5766    }
5767    /// Gets the flow versions from the specified registry and bucket for the specified flow for the current user
5768    pub async fn get_versions(
5769        &self,
5770        id: &str,
5771        registry_id: &str,
5772        bucket_id: &str,
5773        flow_id: &str,
5774        branch: Option<&str>,
5775    ) -> Result<types::VersionedFlowSnapshotMetadataSetEntity, NifiError> {
5776        match self.version {
5777            DetectedVersion::V2_6_0 => {
5778                let api = crate::v2_6_0::api::flow::FlowBucketsApi {
5779                    client: self.client,
5780                    id,
5781                };
5782                Ok(api
5783                    .get_versions(registry_id, bucket_id, flow_id, branch)
5784                    .await?
5785                    .into())
5786            }
5787            DetectedVersion::V2_7_2 => {
5788                let api = crate::v2_7_2::api::flow::FlowBucketsApi {
5789                    client: self.client,
5790                    id,
5791                };
5792                Ok(api
5793                    .get_versions(registry_id, bucket_id, flow_id, branch)
5794                    .await?
5795                    .into())
5796            }
5797            DetectedVersion::V2_8_0 => {
5798                let api = crate::v2_8_0::api::flow::FlowBucketsApi {
5799                    client: self.client,
5800                    id,
5801                };
5802                Ok(api
5803                    .get_versions(registry_id, bucket_id, flow_id, branch)
5804                    .await?
5805                    .into())
5806            }
5807        }
5808    }
5809    /// Gets configuration history
5810    pub async fn query_history(
5811        &self,
5812        offset: &str,
5813        count: &str,
5814        sort_column: Option<&str>,
5815        sort_order: Option<&str>,
5816        start_date: Option<&str>,
5817        end_date: Option<&str>,
5818        user_identity: Option<&str>,
5819        source_id: Option<&str>,
5820    ) -> Result<types::HistoryDto, NifiError> {
5821        match self.version {
5822            DetectedVersion::V2_6_0 => {
5823                let api = crate::v2_6_0::api::flow::FlowApi {
5824                    client: self.client,
5825                };
5826                Ok(api
5827                    .query_history(
5828                        offset,
5829                        count,
5830                        sort_column,
5831                        sort_order,
5832                        start_date,
5833                        end_date,
5834                        user_identity,
5835                        source_id,
5836                    )
5837                    .await?
5838                    .into())
5839            }
5840            DetectedVersion::V2_7_2 => {
5841                let api = crate::v2_7_2::api::flow::FlowApi {
5842                    client: self.client,
5843                };
5844                Ok(api
5845                    .query_history(
5846                        offset,
5847                        count,
5848                        sort_column,
5849                        sort_order,
5850                        start_date,
5851                        end_date,
5852                        user_identity,
5853                        source_id,
5854                    )
5855                    .await?
5856                    .into())
5857            }
5858            DetectedVersion::V2_8_0 => {
5859                let api = crate::v2_8_0::api::flow::FlowApi {
5860                    client: self.client,
5861                };
5862                Ok(api
5863                    .query_history(
5864                        offset,
5865                        count,
5866                        sort_column,
5867                        sort_order,
5868                        start_date,
5869                        end_date,
5870                        user_identity,
5871                        source_id,
5872                    )
5873                    .await?
5874                    .into())
5875            }
5876        }
5877    }
5878    /// Schedule or unschedule components in the specified Process Group.
5879    pub async fn schedule_components(
5880        &self,
5881        id: &str,
5882        body: &serde_json::Value,
5883    ) -> Result<types::ScheduleComponentsEntity, NifiError> {
5884        match self.version {
5885            DetectedVersion::V2_6_0 => {
5886                let api = crate::v2_6_0::api::flow::FlowApi {
5887                    client: self.client,
5888                };
5889                Ok(api
5890                    .schedule_components(
5891                        id,
5892                        &serde_json::from_value::<crate::v2_6_0::types::ScheduleComponentsEntity>(
5893                            body.clone(),
5894                        )
5895                        .map_err(|e| NifiError::UnsupportedEndpoint {
5896                            endpoint: format!(
5897                                "{} (body deserialize: {})",
5898                                "schedule_components", e
5899                            ),
5900                            version: "2.6.0".to_string(),
5901                        })?,
5902                    )
5903                    .await?
5904                    .into())
5905            }
5906            DetectedVersion::V2_7_2 => {
5907                let api = crate::v2_7_2::api::flow::FlowApi {
5908                    client: self.client,
5909                };
5910                Ok(api
5911                    .schedule_components(
5912                        id,
5913                        &serde_json::from_value::<crate::v2_7_2::types::ScheduleComponentsEntity>(
5914                            body.clone(),
5915                        )
5916                        .map_err(|e| NifiError::UnsupportedEndpoint {
5917                            endpoint: format!(
5918                                "{} (body deserialize: {})",
5919                                "schedule_components", e
5920                            ),
5921                            version: "2.7.2".to_string(),
5922                        })?,
5923                    )
5924                    .await?
5925                    .into())
5926            }
5927            DetectedVersion::V2_8_0 => {
5928                let api = crate::v2_8_0::api::flow::FlowApi {
5929                    client: self.client,
5930                };
5931                Ok(api
5932                    .schedule_components(
5933                        id,
5934                        &serde_json::from_value::<crate::v2_8_0::types::ScheduleComponentsEntity>(
5935                            body.clone(),
5936                        )
5937                        .map_err(|e| NifiError::UnsupportedEndpoint {
5938                            endpoint: format!(
5939                                "{} (body deserialize: {})",
5940                                "schedule_components", e
5941                            ),
5942                            version: "2.8.0".to_string(),
5943                        })?,
5944                    )
5945                    .await?
5946                    .into())
5947            }
5948        }
5949    }
5950    /// Searches the cluster for a node with the specified address
5951    pub async fn search_cluster(
5952        &self,
5953        q: &str,
5954    ) -> Result<types::ClusterSearchResultsEntity, NifiError> {
5955        match self.version {
5956            DetectedVersion::V2_6_0 => {
5957                let api = crate::v2_6_0::api::flow::FlowApi {
5958                    client: self.client,
5959                };
5960                Ok(api.search_cluster(q).await?.into())
5961            }
5962            DetectedVersion::V2_7_2 => {
5963                let api = crate::v2_7_2::api::flow::FlowApi {
5964                    client: self.client,
5965                };
5966                Ok(api.search_cluster(q).await?.into())
5967            }
5968            DetectedVersion::V2_8_0 => {
5969                let api = crate::v2_8_0::api::flow::FlowApi {
5970                    client: self.client,
5971                };
5972                Ok(api.search_cluster(q).await?.into())
5973            }
5974        }
5975    }
5976    /// Performs a search against this NiFi using the specified search term
5977    pub async fn search_flow(
5978        &self,
5979        q: Option<&str>,
5980        a: Option<&str>,
5981    ) -> Result<types::SearchResultsDto, NifiError> {
5982        match self.version {
5983            DetectedVersion::V2_6_0 => {
5984                let api = crate::v2_6_0::api::flow::FlowApi {
5985                    client: self.client,
5986                };
5987                Ok(api.search_flow(q, a).await?.into())
5988            }
5989            DetectedVersion::V2_7_2 => {
5990                let api = crate::v2_7_2::api::flow::FlowApi {
5991                    client: self.client,
5992                };
5993                Ok(api.search_flow(q, a).await?.into())
5994            }
5995            DetectedVersion::V2_8_0 => {
5996                let api = crate::v2_8_0::api::flow::FlowApi {
5997                    client: self.client,
5998                };
5999                Ok(api.search_flow(q, a).await?.into())
6000            }
6001        }
6002    }
6003}
6004/// Dynamic dispatch wrapper for the FlowFileQueues API.
6005pub struct DynamicFlowFileQueuesApi<'a> {
6006    client: &'a NifiClient,
6007    version: DetectedVersion,
6008}
6009#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
6010impl<'a> DynamicFlowFileQueuesApi<'a> {
6011    /// Creates a request to drop the contents of the queue in this connection.
6012    pub async fn create_drop_request(&self, id: &str) -> Result<types::DropRequestDto, NifiError> {
6013        match self.version {
6014            DetectedVersion::V2_6_0 => {
6015                let api = crate::v2_6_0::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6016                    client: self.client,
6017                    id,
6018                };
6019                Ok(api.create_drop_request().await?.into())
6020            }
6021            DetectedVersion::V2_7_2 => {
6022                let api = crate::v2_7_2::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6023                    client: self.client,
6024                    id,
6025                };
6026                Ok(api.create_drop_request().await?.into())
6027            }
6028            DetectedVersion::V2_8_0 => {
6029                let api = crate::v2_8_0::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6030                    client: self.client,
6031                    id,
6032                };
6033                Ok(api.create_drop_request().await?.into())
6034            }
6035        }
6036    }
6037    /// Lists the contents of the queue in this connection.
6038    pub async fn create_flow_file_listing(
6039        &self,
6040        id: &str,
6041    ) -> Result<types::ListingRequestDto, NifiError> {
6042        match self.version {
6043            DetectedVersion::V2_6_0 => {
6044                let api = crate::v2_6_0::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6045                    client: self.client,
6046                    id,
6047                };
6048                Ok(api.create_flow_file_listing().await?.into())
6049            }
6050            DetectedVersion::V2_7_2 => {
6051                let api = crate::v2_7_2::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6052                    client: self.client,
6053                    id,
6054                };
6055                Ok(api.create_flow_file_listing().await?.into())
6056            }
6057            DetectedVersion::V2_8_0 => {
6058                let api = crate::v2_8_0::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6059                    client: self.client,
6060                    id,
6061                };
6062                Ok(api.create_flow_file_listing().await?.into())
6063            }
6064        }
6065    }
6066    /// Cancels and/or removes a request to list the contents of this connection.
6067    pub async fn delete_listing_request(
6068        &self,
6069        id: &str,
6070        listing_request_id: &str,
6071    ) -> Result<types::ListingRequestDto, NifiError> {
6072        match self.version {
6073            DetectedVersion::V2_6_0 => {
6074                let api = crate::v2_6_0::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6075                    client: self.client,
6076                    id,
6077                };
6078                Ok(api.delete_listing_request(listing_request_id).await?.into())
6079            }
6080            DetectedVersion::V2_7_2 => {
6081                let api = crate::v2_7_2::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6082                    client: self.client,
6083                    id,
6084                };
6085                Ok(api.delete_listing_request(listing_request_id).await?.into())
6086            }
6087            DetectedVersion::V2_8_0 => {
6088                let api = crate::v2_8_0::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6089                    client: self.client,
6090                    id,
6091                };
6092                Ok(api.delete_listing_request(listing_request_id).await?.into())
6093            }
6094        }
6095    }
6096    /// Gets the content for a FlowFile in a Connection.
6097    pub async fn download_flow_file_content(
6098        &self,
6099        id: &str,
6100        flowfile_uuid: &str,
6101        client_id: Option<&str>,
6102        cluster_node_id: Option<&str>,
6103    ) -> Result<(), NifiError> {
6104        match self.version {
6105            DetectedVersion::V2_6_0 => {
6106                let api = crate::v2_6_0::api::flowfilequeues::FlowFileQueuesFlowfilesApi {
6107                    client: self.client,
6108                    id,
6109                };
6110                api.download_flow_file_content(flowfile_uuid, client_id, cluster_node_id)
6111                    .await
6112            }
6113            DetectedVersion::V2_7_2 => {
6114                let api = crate::v2_7_2::api::flowfilequeues::FlowFileQueuesFlowfilesApi {
6115                    client: self.client,
6116                    id,
6117                };
6118                api.download_flow_file_content(flowfile_uuid, client_id, cluster_node_id)
6119                    .await
6120            }
6121            DetectedVersion::V2_8_0 => {
6122                let api = crate::v2_8_0::api::flowfilequeues::FlowFileQueuesFlowfilesApi {
6123                    client: self.client,
6124                    id,
6125                };
6126                api.download_flow_file_content(flowfile_uuid, client_id, cluster_node_id)
6127                    .await
6128            }
6129        }
6130    }
6131    /// Gets the current status of a drop request for the specified connection.
6132    pub async fn get_drop_request(
6133        &self,
6134        id: &str,
6135        drop_request_id: &str,
6136    ) -> Result<types::DropRequestDto, NifiError> {
6137        match self.version {
6138            DetectedVersion::V2_6_0 => {
6139                let api = crate::v2_6_0::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6140                    client: self.client,
6141                    id,
6142                };
6143                Ok(api.get_drop_request(drop_request_id).await?.into())
6144            }
6145            DetectedVersion::V2_7_2 => {
6146                let api = crate::v2_7_2::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6147                    client: self.client,
6148                    id,
6149                };
6150                Ok(api.get_drop_request(drop_request_id).await?.into())
6151            }
6152            DetectedVersion::V2_8_0 => {
6153                let api = crate::v2_8_0::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6154                    client: self.client,
6155                    id,
6156                };
6157                Ok(api.get_drop_request(drop_request_id).await?.into())
6158            }
6159        }
6160    }
6161    /// Gets a FlowFile from a Connection.
6162    pub async fn get_flow_file(
6163        &self,
6164        id: &str,
6165        flowfile_uuid: &str,
6166        cluster_node_id: Option<&str>,
6167    ) -> Result<types::FlowFileDto, NifiError> {
6168        match self.version {
6169            DetectedVersion::V2_6_0 => {
6170                let api = crate::v2_6_0::api::flowfilequeues::FlowFileQueuesFlowfilesApi {
6171                    client: self.client,
6172                    id,
6173                };
6174                Ok(api
6175                    .get_flow_file(flowfile_uuid, cluster_node_id)
6176                    .await?
6177                    .into())
6178            }
6179            DetectedVersion::V2_7_2 => {
6180                let api = crate::v2_7_2::api::flowfilequeues::FlowFileQueuesFlowfilesApi {
6181                    client: self.client,
6182                    id,
6183                };
6184                Ok(api
6185                    .get_flow_file(flowfile_uuid, cluster_node_id)
6186                    .await?
6187                    .into())
6188            }
6189            DetectedVersion::V2_8_0 => {
6190                let api = crate::v2_8_0::api::flowfilequeues::FlowFileQueuesFlowfilesApi {
6191                    client: self.client,
6192                    id,
6193                };
6194                Ok(api
6195                    .get_flow_file(flowfile_uuid, cluster_node_id)
6196                    .await?
6197                    .into())
6198            }
6199        }
6200    }
6201    /// Gets the current status of a listing request for the specified connection.
6202    pub async fn get_listing_request(
6203        &self,
6204        id: &str,
6205        listing_request_id: &str,
6206    ) -> Result<types::ListingRequestDto, NifiError> {
6207        match self.version {
6208            DetectedVersion::V2_6_0 => {
6209                let api = crate::v2_6_0::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6210                    client: self.client,
6211                    id,
6212                };
6213                Ok(api.get_listing_request(listing_request_id).await?.into())
6214            }
6215            DetectedVersion::V2_7_2 => {
6216                let api = crate::v2_7_2::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6217                    client: self.client,
6218                    id,
6219                };
6220                Ok(api.get_listing_request(listing_request_id).await?.into())
6221            }
6222            DetectedVersion::V2_8_0 => {
6223                let api = crate::v2_8_0::api::flowfilequeues::FlowFileQueuesListingRequestsApi {
6224                    client: self.client,
6225                    id,
6226                };
6227                Ok(api.get_listing_request(listing_request_id).await?.into())
6228            }
6229        }
6230    }
6231    /// Cancels and/or removes a request to drop the contents of this connection.
6232    pub async fn remove_drop_request(
6233        &self,
6234        id: &str,
6235        drop_request_id: &str,
6236    ) -> Result<types::DropRequestDto, NifiError> {
6237        match self.version {
6238            DetectedVersion::V2_6_0 => {
6239                let api = crate::v2_6_0::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6240                    client: self.client,
6241                    id,
6242                };
6243                Ok(api.remove_drop_request(drop_request_id).await?.into())
6244            }
6245            DetectedVersion::V2_7_2 => {
6246                let api = crate::v2_7_2::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6247                    client: self.client,
6248                    id,
6249                };
6250                Ok(api.remove_drop_request(drop_request_id).await?.into())
6251            }
6252            DetectedVersion::V2_8_0 => {
6253                let api = crate::v2_8_0::api::flowfilequeues::FlowFileQueuesDropRequestsApi {
6254                    client: self.client,
6255                    id,
6256                };
6257                Ok(api.remove_drop_request(drop_request_id).await?.into())
6258            }
6259        }
6260    }
6261}
6262/// Dynamic dispatch wrapper for the Funnels API.
6263pub struct DynamicFunnelsApi<'a> {
6264    client: &'a NifiClient,
6265    version: DetectedVersion,
6266}
6267#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
6268impl<'a> DynamicFunnelsApi<'a> {
6269    /// Gets a funnel
6270    pub async fn get_funnel(&self, id: &str) -> Result<types::FunnelEntity, NifiError> {
6271        match self.version {
6272            DetectedVersion::V2_6_0 => {
6273                let api = crate::v2_6_0::api::funnels::FunnelsApi {
6274                    client: self.client,
6275                };
6276                Ok(api.get_funnel(id).await?.into())
6277            }
6278            DetectedVersion::V2_7_2 => {
6279                let api = crate::v2_7_2::api::funnels::FunnelsApi {
6280                    client: self.client,
6281                };
6282                Ok(api.get_funnel(id).await?.into())
6283            }
6284            DetectedVersion::V2_8_0 => {
6285                let api = crate::v2_8_0::api::funnels::FunnelsApi {
6286                    client: self.client,
6287                };
6288                Ok(api.get_funnel(id).await?.into())
6289            }
6290        }
6291    }
6292    /// Deletes a funnel
6293    pub async fn remove_funnel(
6294        &self,
6295        id: &str,
6296        version: Option<&str>,
6297        client_id: Option<&str>,
6298        disconnected_node_acknowledged: Option<bool>,
6299    ) -> Result<types::FunnelEntity, NifiError> {
6300        match self.version {
6301            DetectedVersion::V2_6_0 => {
6302                let api = crate::v2_6_0::api::funnels::FunnelsApi {
6303                    client: self.client,
6304                };
6305                Ok(api
6306                    .remove_funnel(id, version, client_id, disconnected_node_acknowledged)
6307                    .await?
6308                    .into())
6309            }
6310            DetectedVersion::V2_7_2 => {
6311                let api = crate::v2_7_2::api::funnels::FunnelsApi {
6312                    client: self.client,
6313                };
6314                Ok(api
6315                    .remove_funnel(id, version, client_id, disconnected_node_acknowledged)
6316                    .await?
6317                    .into())
6318            }
6319            DetectedVersion::V2_8_0 => {
6320                let api = crate::v2_8_0::api::funnels::FunnelsApi {
6321                    client: self.client,
6322                };
6323                Ok(api
6324                    .remove_funnel(id, version, client_id, disconnected_node_acknowledged)
6325                    .await?
6326                    .into())
6327            }
6328        }
6329    }
6330    /// Updates a funnel
6331    pub async fn update_funnel(
6332        &self,
6333        id: &str,
6334        body: &serde_json::Value,
6335    ) -> Result<types::FunnelEntity, NifiError> {
6336        match self.version {
6337            DetectedVersion::V2_6_0 => {
6338                let api = crate::v2_6_0::api::funnels::FunnelsApi {
6339                    client: self.client,
6340                };
6341                Ok(api
6342                    .update_funnel(
6343                        id,
6344                        &serde_json::from_value::<crate::v2_6_0::types::FunnelEntity>(body.clone())
6345                            .map_err(|e| NifiError::UnsupportedEndpoint {
6346                                endpoint: format!("{} (body deserialize: {})", "update_funnel", e),
6347                                version: "2.6.0".to_string(),
6348                            })?,
6349                    )
6350                    .await?
6351                    .into())
6352            }
6353            DetectedVersion::V2_7_2 => {
6354                let api = crate::v2_7_2::api::funnels::FunnelsApi {
6355                    client: self.client,
6356                };
6357                Ok(api
6358                    .update_funnel(
6359                        id,
6360                        &serde_json::from_value::<crate::v2_7_2::types::FunnelEntity>(body.clone())
6361                            .map_err(|e| NifiError::UnsupportedEndpoint {
6362                                endpoint: format!("{} (body deserialize: {})", "update_funnel", e),
6363                                version: "2.7.2".to_string(),
6364                            })?,
6365                    )
6366                    .await?
6367                    .into())
6368            }
6369            DetectedVersion::V2_8_0 => {
6370                let api = crate::v2_8_0::api::funnels::FunnelsApi {
6371                    client: self.client,
6372                };
6373                Ok(api
6374                    .update_funnel(
6375                        id,
6376                        &serde_json::from_value::<crate::v2_8_0::types::FunnelEntity>(body.clone())
6377                            .map_err(|e| NifiError::UnsupportedEndpoint {
6378                                endpoint: format!("{} (body deserialize: {})", "update_funnel", e),
6379                                version: "2.8.0".to_string(),
6380                            })?,
6381                    )
6382                    .await?
6383                    .into())
6384            }
6385        }
6386    }
6387}
6388/// Dynamic dispatch wrapper for the InputPorts API.
6389pub struct DynamicInputPortsApi<'a> {
6390    client: &'a NifiClient,
6391    version: DetectedVersion,
6392}
6393#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
6394impl<'a> DynamicInputPortsApi<'a> {
6395    /// Clears bulletins for an input port
6396    pub async fn clear_bulletins_2(
6397        &self,
6398        id: &str,
6399        body: &serde_json::Value,
6400    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
6401        match self.version {
6402            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
6403                endpoint: "clear_bulletins_2".to_string(),
6404                version: "2.6.0".to_string(),
6405            }),
6406            DetectedVersion::V2_7_2 => {
6407                let api = crate::v2_7_2::api::inputports::InputPortsBulletinsApi {
6408                    client: self.client,
6409                    id,
6410                };
6411                Ok(
6412                    api
6413                        .clear_bulletins_2(
6414                            &serde_json::from_value::<
6415                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
6416                            >(body.clone())
6417                            .map_err(|e| NifiError::UnsupportedEndpoint {
6418                                endpoint: format!(
6419                                    "{} (body deserialize: {})",
6420                                    "clear_bulletins_2", e
6421                                ),
6422                                version: "2.7.2".to_string(),
6423                            })?,
6424                        )
6425                        .await?
6426                        .into(),
6427                )
6428            }
6429            DetectedVersion::V2_8_0 => {
6430                let api = crate::v2_8_0::api::inputports::InputPortsBulletinsApi {
6431                    client: self.client,
6432                    id,
6433                };
6434                Ok(
6435                    api
6436                        .clear_bulletins_2(
6437                            &serde_json::from_value::<
6438                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
6439                            >(body.clone())
6440                            .map_err(|e| NifiError::UnsupportedEndpoint {
6441                                endpoint: format!(
6442                                    "{} (body deserialize: {})",
6443                                    "clear_bulletins_2", e
6444                                ),
6445                                version: "2.8.0".to_string(),
6446                            })?,
6447                        )
6448                        .await?
6449                        .into(),
6450                )
6451            }
6452        }
6453    }
6454    /// Gets an input port
6455    pub async fn get_input_port(&self, id: &str) -> Result<types::PortEntity, NifiError> {
6456        match self.version {
6457            DetectedVersion::V2_6_0 => {
6458                let api = crate::v2_6_0::api::inputports::InputPortsApi {
6459                    client: self.client,
6460                };
6461                Ok(api.get_input_port(id).await?.into())
6462            }
6463            DetectedVersion::V2_7_2 => {
6464                let api = crate::v2_7_2::api::inputports::InputPortsApi {
6465                    client: self.client,
6466                };
6467                Ok(api.get_input_port(id).await?.into())
6468            }
6469            DetectedVersion::V2_8_0 => {
6470                let api = crate::v2_8_0::api::inputports::InputPortsApi {
6471                    client: self.client,
6472                };
6473                Ok(api.get_input_port(id).await?.into())
6474            }
6475        }
6476    }
6477    /// Deletes an input port
6478    pub async fn remove_input_port(
6479        &self,
6480        id: &str,
6481        version: Option<&str>,
6482        client_id: Option<&str>,
6483        disconnected_node_acknowledged: Option<bool>,
6484    ) -> Result<types::PortEntity, NifiError> {
6485        match self.version {
6486            DetectedVersion::V2_6_0 => {
6487                let api = crate::v2_6_0::api::inputports::InputPortsApi {
6488                    client: self.client,
6489                };
6490                Ok(api
6491                    .remove_input_port(id, version, client_id, disconnected_node_acknowledged)
6492                    .await?
6493                    .into())
6494            }
6495            DetectedVersion::V2_7_2 => {
6496                let api = crate::v2_7_2::api::inputports::InputPortsApi {
6497                    client: self.client,
6498                };
6499                Ok(api
6500                    .remove_input_port(id, version, client_id, disconnected_node_acknowledged)
6501                    .await?
6502                    .into())
6503            }
6504            DetectedVersion::V2_8_0 => {
6505                let api = crate::v2_8_0::api::inputports::InputPortsApi {
6506                    client: self.client,
6507                };
6508                Ok(api
6509                    .remove_input_port(id, version, client_id, disconnected_node_acknowledged)
6510                    .await?
6511                    .into())
6512            }
6513        }
6514    }
6515    /// Updates an input port
6516    pub async fn update_input_port(
6517        &self,
6518        id: &str,
6519        body: &serde_json::Value,
6520    ) -> Result<types::PortEntity, NifiError> {
6521        match self.version {
6522            DetectedVersion::V2_6_0 => {
6523                let api = crate::v2_6_0::api::inputports::InputPortsApi {
6524                    client: self.client,
6525                };
6526                Ok(api
6527                    .update_input_port(
6528                        id,
6529                        &serde_json::from_value::<crate::v2_6_0::types::PortEntity>(body.clone())
6530                            .map_err(|e| NifiError::UnsupportedEndpoint {
6531                            endpoint: format!("{} (body deserialize: {})", "update_input_port", e),
6532                            version: "2.6.0".to_string(),
6533                        })?,
6534                    )
6535                    .await?
6536                    .into())
6537            }
6538            DetectedVersion::V2_7_2 => {
6539                let api = crate::v2_7_2::api::inputports::InputPortsApi {
6540                    client: self.client,
6541                };
6542                Ok(api
6543                    .update_input_port(
6544                        id,
6545                        &serde_json::from_value::<crate::v2_7_2::types::PortEntity>(body.clone())
6546                            .map_err(|e| NifiError::UnsupportedEndpoint {
6547                            endpoint: format!("{} (body deserialize: {})", "update_input_port", e),
6548                            version: "2.7.2".to_string(),
6549                        })?,
6550                    )
6551                    .await?
6552                    .into())
6553            }
6554            DetectedVersion::V2_8_0 => {
6555                let api = crate::v2_8_0::api::inputports::InputPortsApi {
6556                    client: self.client,
6557                };
6558                Ok(api
6559                    .update_input_port(
6560                        id,
6561                        &serde_json::from_value::<crate::v2_8_0::types::PortEntity>(body.clone())
6562                            .map_err(|e| NifiError::UnsupportedEndpoint {
6563                            endpoint: format!("{} (body deserialize: {})", "update_input_port", e),
6564                            version: "2.8.0".to_string(),
6565                        })?,
6566                    )
6567                    .await?
6568                    .into())
6569            }
6570        }
6571    }
6572    /// Updates run status of an input-port
6573    pub async fn update_run_status_2(
6574        &self,
6575        id: &str,
6576        body: &serde_json::Value,
6577    ) -> Result<types::ProcessorEntity, NifiError> {
6578        match self.version {
6579            DetectedVersion::V2_6_0 => {
6580                let api = crate::v2_6_0::api::inputports::InputPortsRunStatusApi {
6581                    client: self.client,
6582                    id,
6583                };
6584                Ok(api
6585                    .update_run_status_2(
6586                        &serde_json::from_value::<crate::v2_6_0::types::PortRunStatusEntity>(
6587                            body.clone(),
6588                        )
6589                        .map_err(|e| NifiError::UnsupportedEndpoint {
6590                            endpoint: format!(
6591                                "{} (body deserialize: {})",
6592                                "update_run_status_2", e
6593                            ),
6594                            version: "2.6.0".to_string(),
6595                        })?,
6596                    )
6597                    .await?
6598                    .into())
6599            }
6600            DetectedVersion::V2_7_2 => {
6601                let api = crate::v2_7_2::api::inputports::InputPortsRunStatusApi {
6602                    client: self.client,
6603                    id,
6604                };
6605                Ok(api
6606                    .update_run_status_2(
6607                        &serde_json::from_value::<crate::v2_7_2::types::PortRunStatusEntity>(
6608                            body.clone(),
6609                        )
6610                        .map_err(|e| NifiError::UnsupportedEndpoint {
6611                            endpoint: format!(
6612                                "{} (body deserialize: {})",
6613                                "update_run_status_2", e
6614                            ),
6615                            version: "2.7.2".to_string(),
6616                        })?,
6617                    )
6618                    .await?
6619                    .into())
6620            }
6621            DetectedVersion::V2_8_0 => {
6622                let api = crate::v2_8_0::api::inputports::InputPortsRunStatusApi {
6623                    client: self.client,
6624                    id,
6625                };
6626                Ok(api
6627                    .update_run_status_2(
6628                        &serde_json::from_value::<crate::v2_8_0::types::PortRunStatusEntity>(
6629                            body.clone(),
6630                        )
6631                        .map_err(|e| NifiError::UnsupportedEndpoint {
6632                            endpoint: format!(
6633                                "{} (body deserialize: {})",
6634                                "update_run_status_2", e
6635                            ),
6636                            version: "2.8.0".to_string(),
6637                        })?,
6638                    )
6639                    .await?
6640                    .into())
6641            }
6642        }
6643    }
6644}
6645/// Dynamic dispatch wrapper for the Labels API.
6646pub struct DynamicLabelsApi<'a> {
6647    client: &'a NifiClient,
6648    version: DetectedVersion,
6649}
6650#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
6651impl<'a> DynamicLabelsApi<'a> {
6652    /// Gets a label
6653    pub async fn get_label(&self, id: &str) -> Result<types::LabelEntity, NifiError> {
6654        match self.version {
6655            DetectedVersion::V2_6_0 => {
6656                let api = crate::v2_6_0::api::labels::LabelsApi {
6657                    client: self.client,
6658                };
6659                Ok(api.get_label(id).await?.into())
6660            }
6661            DetectedVersion::V2_7_2 => {
6662                let api = crate::v2_7_2::api::labels::LabelsApi {
6663                    client: self.client,
6664                };
6665                Ok(api.get_label(id).await?.into())
6666            }
6667            DetectedVersion::V2_8_0 => {
6668                let api = crate::v2_8_0::api::labels::LabelsApi {
6669                    client: self.client,
6670                };
6671                Ok(api.get_label(id).await?.into())
6672            }
6673        }
6674    }
6675    /// Deletes a label
6676    pub async fn remove_label(
6677        &self,
6678        id: &str,
6679        version: Option<&str>,
6680        client_id: Option<&str>,
6681        disconnected_node_acknowledged: Option<bool>,
6682    ) -> Result<types::LabelEntity, NifiError> {
6683        match self.version {
6684            DetectedVersion::V2_6_0 => {
6685                let api = crate::v2_6_0::api::labels::LabelsApi {
6686                    client: self.client,
6687                };
6688                Ok(api
6689                    .remove_label(id, version, client_id, disconnected_node_acknowledged)
6690                    .await?
6691                    .into())
6692            }
6693            DetectedVersion::V2_7_2 => {
6694                let api = crate::v2_7_2::api::labels::LabelsApi {
6695                    client: self.client,
6696                };
6697                Ok(api
6698                    .remove_label(id, version, client_id, disconnected_node_acknowledged)
6699                    .await?
6700                    .into())
6701            }
6702            DetectedVersion::V2_8_0 => {
6703                let api = crate::v2_8_0::api::labels::LabelsApi {
6704                    client: self.client,
6705                };
6706                Ok(api
6707                    .remove_label(id, version, client_id, disconnected_node_acknowledged)
6708                    .await?
6709                    .into())
6710            }
6711        }
6712    }
6713    /// Updates a label
6714    pub async fn update_label(
6715        &self,
6716        id: &str,
6717        body: &serde_json::Value,
6718    ) -> Result<types::LabelEntity, NifiError> {
6719        match self.version {
6720            DetectedVersion::V2_6_0 => {
6721                let api = crate::v2_6_0::api::labels::LabelsApi {
6722                    client: self.client,
6723                };
6724                Ok(api
6725                    .update_label(
6726                        id,
6727                        &serde_json::from_value::<crate::v2_6_0::types::LabelEntity>(body.clone())
6728                            .map_err(|e| NifiError::UnsupportedEndpoint {
6729                                endpoint: format!("{} (body deserialize: {})", "update_label", e),
6730                                version: "2.6.0".to_string(),
6731                            })?,
6732                    )
6733                    .await?
6734                    .into())
6735            }
6736            DetectedVersion::V2_7_2 => {
6737                let api = crate::v2_7_2::api::labels::LabelsApi {
6738                    client: self.client,
6739                };
6740                Ok(api
6741                    .update_label(
6742                        id,
6743                        &serde_json::from_value::<crate::v2_7_2::types::LabelEntity>(body.clone())
6744                            .map_err(|e| NifiError::UnsupportedEndpoint {
6745                                endpoint: format!("{} (body deserialize: {})", "update_label", e),
6746                                version: "2.7.2".to_string(),
6747                            })?,
6748                    )
6749                    .await?
6750                    .into())
6751            }
6752            DetectedVersion::V2_8_0 => {
6753                let api = crate::v2_8_0::api::labels::LabelsApi {
6754                    client: self.client,
6755                };
6756                Ok(api
6757                    .update_label(
6758                        id,
6759                        &serde_json::from_value::<crate::v2_8_0::types::LabelEntity>(body.clone())
6760                            .map_err(|e| NifiError::UnsupportedEndpoint {
6761                                endpoint: format!("{} (body deserialize: {})", "update_label", e),
6762                                version: "2.8.0".to_string(),
6763                            })?,
6764                    )
6765                    .await?
6766                    .into())
6767            }
6768        }
6769    }
6770}
6771/// Dynamic dispatch wrapper for the OutputPorts API.
6772pub struct DynamicOutputPortsApi<'a> {
6773    client: &'a NifiClient,
6774    version: DetectedVersion,
6775}
6776#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
6777impl<'a> DynamicOutputPortsApi<'a> {
6778    /// Clears bulletins for an output port
6779    pub async fn clear_bulletins_3(
6780        &self,
6781        id: &str,
6782        body: &serde_json::Value,
6783    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
6784        match self.version {
6785            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
6786                endpoint: "clear_bulletins_3".to_string(),
6787                version: "2.6.0".to_string(),
6788            }),
6789            DetectedVersion::V2_7_2 => {
6790                let api = crate::v2_7_2::api::outputports::OutputPortsBulletinsApi {
6791                    client: self.client,
6792                    id,
6793                };
6794                Ok(
6795                    api
6796                        .clear_bulletins_3(
6797                            &serde_json::from_value::<
6798                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
6799                            >(body.clone())
6800                            .map_err(|e| NifiError::UnsupportedEndpoint {
6801                                endpoint: format!(
6802                                    "{} (body deserialize: {})",
6803                                    "clear_bulletins_3", e
6804                                ),
6805                                version: "2.7.2".to_string(),
6806                            })?,
6807                        )
6808                        .await?
6809                        .into(),
6810                )
6811            }
6812            DetectedVersion::V2_8_0 => {
6813                let api = crate::v2_8_0::api::outputports::OutputPortsBulletinsApi {
6814                    client: self.client,
6815                    id,
6816                };
6817                Ok(
6818                    api
6819                        .clear_bulletins_3(
6820                            &serde_json::from_value::<
6821                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
6822                            >(body.clone())
6823                            .map_err(|e| NifiError::UnsupportedEndpoint {
6824                                endpoint: format!(
6825                                    "{} (body deserialize: {})",
6826                                    "clear_bulletins_3", e
6827                                ),
6828                                version: "2.8.0".to_string(),
6829                            })?,
6830                        )
6831                        .await?
6832                        .into(),
6833                )
6834            }
6835        }
6836    }
6837    /// Gets an output port
6838    pub async fn get_output_port(&self, id: &str) -> Result<types::PortEntity, NifiError> {
6839        match self.version {
6840            DetectedVersion::V2_6_0 => {
6841                let api = crate::v2_6_0::api::outputports::OutputPortsApi {
6842                    client: self.client,
6843                };
6844                Ok(api.get_output_port(id).await?.into())
6845            }
6846            DetectedVersion::V2_7_2 => {
6847                let api = crate::v2_7_2::api::outputports::OutputPortsApi {
6848                    client: self.client,
6849                };
6850                Ok(api.get_output_port(id).await?.into())
6851            }
6852            DetectedVersion::V2_8_0 => {
6853                let api = crate::v2_8_0::api::outputports::OutputPortsApi {
6854                    client: self.client,
6855                };
6856                Ok(api.get_output_port(id).await?.into())
6857            }
6858        }
6859    }
6860    /// Deletes an output port
6861    pub async fn remove_output_port(
6862        &self,
6863        id: &str,
6864        version: Option<&str>,
6865        client_id: Option<&str>,
6866        disconnected_node_acknowledged: Option<bool>,
6867    ) -> Result<types::PortEntity, NifiError> {
6868        match self.version {
6869            DetectedVersion::V2_6_0 => {
6870                let api = crate::v2_6_0::api::outputports::OutputPortsApi {
6871                    client: self.client,
6872                };
6873                Ok(api
6874                    .remove_output_port(id, version, client_id, disconnected_node_acknowledged)
6875                    .await?
6876                    .into())
6877            }
6878            DetectedVersion::V2_7_2 => {
6879                let api = crate::v2_7_2::api::outputports::OutputPortsApi {
6880                    client: self.client,
6881                };
6882                Ok(api
6883                    .remove_output_port(id, version, client_id, disconnected_node_acknowledged)
6884                    .await?
6885                    .into())
6886            }
6887            DetectedVersion::V2_8_0 => {
6888                let api = crate::v2_8_0::api::outputports::OutputPortsApi {
6889                    client: self.client,
6890                };
6891                Ok(api
6892                    .remove_output_port(id, version, client_id, disconnected_node_acknowledged)
6893                    .await?
6894                    .into())
6895            }
6896        }
6897    }
6898    /// Updates an output port
6899    pub async fn update_output_port(
6900        &self,
6901        id: &str,
6902        body: &serde_json::Value,
6903    ) -> Result<types::PortEntity, NifiError> {
6904        match self.version {
6905            DetectedVersion::V2_6_0 => {
6906                let api = crate::v2_6_0::api::outputports::OutputPortsApi {
6907                    client: self.client,
6908                };
6909                Ok(api
6910                    .update_output_port(
6911                        id,
6912                        &serde_json::from_value::<crate::v2_6_0::types::PortEntity>(body.clone())
6913                            .map_err(|e| NifiError::UnsupportedEndpoint {
6914                            endpoint: format!("{} (body deserialize: {})", "update_output_port", e),
6915                            version: "2.6.0".to_string(),
6916                        })?,
6917                    )
6918                    .await?
6919                    .into())
6920            }
6921            DetectedVersion::V2_7_2 => {
6922                let api = crate::v2_7_2::api::outputports::OutputPortsApi {
6923                    client: self.client,
6924                };
6925                Ok(api
6926                    .update_output_port(
6927                        id,
6928                        &serde_json::from_value::<crate::v2_7_2::types::PortEntity>(body.clone())
6929                            .map_err(|e| NifiError::UnsupportedEndpoint {
6930                            endpoint: format!("{} (body deserialize: {})", "update_output_port", e),
6931                            version: "2.7.2".to_string(),
6932                        })?,
6933                    )
6934                    .await?
6935                    .into())
6936            }
6937            DetectedVersion::V2_8_0 => {
6938                let api = crate::v2_8_0::api::outputports::OutputPortsApi {
6939                    client: self.client,
6940                };
6941                Ok(api
6942                    .update_output_port(
6943                        id,
6944                        &serde_json::from_value::<crate::v2_8_0::types::PortEntity>(body.clone())
6945                            .map_err(|e| NifiError::UnsupportedEndpoint {
6946                            endpoint: format!("{} (body deserialize: {})", "update_output_port", e),
6947                            version: "2.8.0".to_string(),
6948                        })?,
6949                    )
6950                    .await?
6951                    .into())
6952            }
6953        }
6954    }
6955    /// Updates run status of an output-port
6956    pub async fn update_run_status_3(
6957        &self,
6958        id: &str,
6959        body: &serde_json::Value,
6960    ) -> Result<types::ProcessorEntity, NifiError> {
6961        match self.version {
6962            DetectedVersion::V2_6_0 => {
6963                let api = crate::v2_6_0::api::outputports::OutputPortsRunStatusApi {
6964                    client: self.client,
6965                    id,
6966                };
6967                Ok(api
6968                    .update_run_status_3(
6969                        &serde_json::from_value::<crate::v2_6_0::types::PortRunStatusEntity>(
6970                            body.clone(),
6971                        )
6972                        .map_err(|e| NifiError::UnsupportedEndpoint {
6973                            endpoint: format!(
6974                                "{} (body deserialize: {})",
6975                                "update_run_status_3", e
6976                            ),
6977                            version: "2.6.0".to_string(),
6978                        })?,
6979                    )
6980                    .await?
6981                    .into())
6982            }
6983            DetectedVersion::V2_7_2 => {
6984                let api = crate::v2_7_2::api::outputports::OutputPortsRunStatusApi {
6985                    client: self.client,
6986                    id,
6987                };
6988                Ok(api
6989                    .update_run_status_3(
6990                        &serde_json::from_value::<crate::v2_7_2::types::PortRunStatusEntity>(
6991                            body.clone(),
6992                        )
6993                        .map_err(|e| NifiError::UnsupportedEndpoint {
6994                            endpoint: format!(
6995                                "{} (body deserialize: {})",
6996                                "update_run_status_3", e
6997                            ),
6998                            version: "2.7.2".to_string(),
6999                        })?,
7000                    )
7001                    .await?
7002                    .into())
7003            }
7004            DetectedVersion::V2_8_0 => {
7005                let api = crate::v2_8_0::api::outputports::OutputPortsRunStatusApi {
7006                    client: self.client,
7007                    id,
7008                };
7009                Ok(api
7010                    .update_run_status_3(
7011                        &serde_json::from_value::<crate::v2_8_0::types::PortRunStatusEntity>(
7012                            body.clone(),
7013                        )
7014                        .map_err(|e| NifiError::UnsupportedEndpoint {
7015                            endpoint: format!(
7016                                "{} (body deserialize: {})",
7017                                "update_run_status_3", e
7018                            ),
7019                            version: "2.8.0".to_string(),
7020                        })?,
7021                    )
7022                    .await?
7023                    .into())
7024            }
7025        }
7026    }
7027}
7028/// Dynamic dispatch wrapper for the ParameterContexts API.
7029pub struct DynamicParameterContextsApi<'a> {
7030    client: &'a NifiClient,
7031    version: DetectedVersion,
7032}
7033#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
7034impl<'a> DynamicParameterContextsApi<'a> {
7035    /// Creates a new Asset in the given Parameter Context
7036    pub async fn create_asset(
7037        &self,
7038        context_id: &str,
7039        filename: Option<&str>,
7040        data: Vec<u8>,
7041    ) -> Result<types::AssetDto, NifiError> {
7042        match self.version {
7043            DetectedVersion::V2_6_0 => {
7044                let api = crate::v2_6_0::api::parametercontexts::ParameterContextsAssetsApi {
7045                    client: self.client,
7046                    context_id,
7047                };
7048                Ok(api.create_asset(filename, data).await?.into())
7049            }
7050            DetectedVersion::V2_7_2 => {
7051                let api = crate::v2_7_2::api::parametercontexts::ParameterContextsAssetsApi {
7052                    client: self.client,
7053                    context_id,
7054                };
7055                Ok(api.create_asset(filename, data).await?.into())
7056            }
7057            DetectedVersion::V2_8_0 => {
7058                let api = crate::v2_8_0::api::parametercontexts::ParameterContextsAssetsApi {
7059                    client: self.client,
7060                    context_id,
7061                };
7062                Ok(api.create_asset(filename, data).await?.into())
7063            }
7064        }
7065    }
7066    /// Create a Parameter Context
7067    pub async fn create_parameter_context(
7068        &self,
7069        body: &serde_json::Value,
7070    ) -> Result<types::ParameterContextEntity, NifiError> {
7071        match self.version {
7072            DetectedVersion::V2_6_0 => {
7073                let api = crate::v2_6_0::api::parametercontexts::ParameterContextsApi {
7074                    client: self.client,
7075                };
7076                Ok(api
7077                    .create_parameter_context(
7078                        &serde_json::from_value::<crate::v2_6_0::types::ParameterContextEntity>(
7079                            body.clone(),
7080                        )
7081                        .map_err(|e| NifiError::UnsupportedEndpoint {
7082                            endpoint: format!(
7083                                "{} (body deserialize: {})",
7084                                "create_parameter_context", e
7085                            ),
7086                            version: "2.6.0".to_string(),
7087                        })?,
7088                    )
7089                    .await?
7090                    .into())
7091            }
7092            DetectedVersion::V2_7_2 => {
7093                let api = crate::v2_7_2::api::parametercontexts::ParameterContextsApi {
7094                    client: self.client,
7095                };
7096                Ok(api
7097                    .create_parameter_context(
7098                        &serde_json::from_value::<crate::v2_7_2::types::ParameterContextEntity>(
7099                            body.clone(),
7100                        )
7101                        .map_err(|e| NifiError::UnsupportedEndpoint {
7102                            endpoint: format!(
7103                                "{} (body deserialize: {})",
7104                                "create_parameter_context", e
7105                            ),
7106                            version: "2.7.2".to_string(),
7107                        })?,
7108                    )
7109                    .await?
7110                    .into())
7111            }
7112            DetectedVersion::V2_8_0 => {
7113                let api = crate::v2_8_0::api::parametercontexts::ParameterContextsApi {
7114                    client: self.client,
7115                };
7116                Ok(api
7117                    .create_parameter_context(
7118                        &serde_json::from_value::<crate::v2_8_0::types::ParameterContextEntity>(
7119                            body.clone(),
7120                        )
7121                        .map_err(|e| NifiError::UnsupportedEndpoint {
7122                            endpoint: format!(
7123                                "{} (body deserialize: {})",
7124                                "create_parameter_context", e
7125                            ),
7126                            version: "2.8.0".to_string(),
7127                        })?,
7128                    )
7129                    .await?
7130                    .into())
7131            }
7132        }
7133    }
7134    /// Deletes an Asset from the given Parameter Context
7135    pub async fn delete_asset(
7136        &self,
7137        context_id: &str,
7138        asset_id: &str,
7139        disconnected_node_acknowledged: Option<bool>,
7140    ) -> Result<types::AssetDto, NifiError> {
7141        match self.version {
7142            DetectedVersion::V2_6_0 => {
7143                let api = crate::v2_6_0::api::parametercontexts::ParameterContextsAssetsApi {
7144                    client: self.client,
7145                    context_id,
7146                };
7147                Ok(api
7148                    .delete_asset(asset_id, disconnected_node_acknowledged)
7149                    .await?
7150                    .into())
7151            }
7152            DetectedVersion::V2_7_2 => {
7153                let api = crate::v2_7_2::api::parametercontexts::ParameterContextsAssetsApi {
7154                    client: self.client,
7155                    context_id,
7156                };
7157                Ok(api
7158                    .delete_asset(asset_id, disconnected_node_acknowledged)
7159                    .await?
7160                    .into())
7161            }
7162            DetectedVersion::V2_8_0 => {
7163                let api = crate::v2_8_0::api::parametercontexts::ParameterContextsAssetsApi {
7164                    client: self.client,
7165                    context_id,
7166                };
7167                Ok(api
7168                    .delete_asset(asset_id, disconnected_node_acknowledged)
7169                    .await?
7170                    .into())
7171            }
7172        }
7173    }
7174    /// Deletes the Parameter Context with the given ID
7175    pub async fn delete_parameter_context(
7176        &self,
7177        id: &str,
7178        version: Option<&str>,
7179        client_id: Option<&str>,
7180        disconnected_node_acknowledged: Option<bool>,
7181    ) -> Result<types::ParameterContextEntity, NifiError> {
7182        match self.version {
7183            DetectedVersion::V2_6_0 => {
7184                let api = crate::v2_6_0::api::parametercontexts::ParameterContextsApi {
7185                    client: self.client,
7186                };
7187                Ok(api
7188                    .delete_parameter_context(
7189                        id,
7190                        version,
7191                        client_id,
7192                        disconnected_node_acknowledged,
7193                    )
7194                    .await?
7195                    .into())
7196            }
7197            DetectedVersion::V2_7_2 => {
7198                let api = crate::v2_7_2::api::parametercontexts::ParameterContextsApi {
7199                    client: self.client,
7200                };
7201                Ok(api
7202                    .delete_parameter_context(
7203                        id,
7204                        version,
7205                        client_id,
7206                        disconnected_node_acknowledged,
7207                    )
7208                    .await?
7209                    .into())
7210            }
7211            DetectedVersion::V2_8_0 => {
7212                let api = crate::v2_8_0::api::parametercontexts::ParameterContextsApi {
7213                    client: self.client,
7214                };
7215                Ok(api
7216                    .delete_parameter_context(
7217                        id,
7218                        version,
7219                        client_id,
7220                        disconnected_node_acknowledged,
7221                    )
7222                    .await?
7223                    .into())
7224            }
7225        }
7226    }
7227    /// Deletes the Update Request with the given ID
7228    pub async fn delete_update_request(
7229        &self,
7230        context_id: &str,
7231        request_id: &str,
7232        disconnected_node_acknowledged: Option<bool>,
7233    ) -> Result<types::ParameterContextUpdateRequestEntity, NifiError> {
7234        match self.version {
7235            DetectedVersion::V2_6_0 => {
7236                let api =
7237                    crate::v2_6_0::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7238                        client: self.client,
7239                        context_id,
7240                    };
7241                Ok(api
7242                    .delete_update_request(request_id, disconnected_node_acknowledged)
7243                    .await?
7244                    .into())
7245            }
7246            DetectedVersion::V2_7_2 => {
7247                let api =
7248                    crate::v2_7_2::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7249                        client: self.client,
7250                        context_id,
7251                    };
7252                Ok(api
7253                    .delete_update_request(request_id, disconnected_node_acknowledged)
7254                    .await?
7255                    .into())
7256            }
7257            DetectedVersion::V2_8_0 => {
7258                let api =
7259                    crate::v2_8_0::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7260                        client: self.client,
7261                        context_id,
7262                    };
7263                Ok(api
7264                    .delete_update_request(request_id, disconnected_node_acknowledged)
7265                    .await?
7266                    .into())
7267            }
7268        }
7269    }
7270    /// Deletes the Validation Request with the given ID
7271    pub async fn delete_validation_request(
7272        &self,
7273        context_id: &str,
7274        id: &str,
7275        disconnected_node_acknowledged: Option<bool>,
7276    ) -> Result<types::ParameterContextValidationRequestEntity, NifiError> {
7277        match self.version {
7278            DetectedVersion::V2_6_0 => {
7279                let api =
7280                    crate::v2_6_0::api::parametercontexts::ParameterContextsValidationRequestsApi {
7281                        client: self.client,
7282                        context_id,
7283                    };
7284                Ok(api
7285                    .delete_validation_request(id, disconnected_node_acknowledged)
7286                    .await?
7287                    .into())
7288            }
7289            DetectedVersion::V2_7_2 => {
7290                let api =
7291                    crate::v2_7_2::api::parametercontexts::ParameterContextsValidationRequestsApi {
7292                        client: self.client,
7293                        context_id,
7294                    };
7295                Ok(api
7296                    .delete_validation_request(id, disconnected_node_acknowledged)
7297                    .await?
7298                    .into())
7299            }
7300            DetectedVersion::V2_8_0 => {
7301                let api =
7302                    crate::v2_8_0::api::parametercontexts::ParameterContextsValidationRequestsApi {
7303                        client: self.client,
7304                        context_id,
7305                    };
7306                Ok(api
7307                    .delete_validation_request(id, disconnected_node_acknowledged)
7308                    .await?
7309                    .into())
7310            }
7311        }
7312    }
7313    /// Retrieves the content of the asset with the given id
7314    pub async fn get_asset_content(
7315        &self,
7316        context_id: &str,
7317        asset_id: &str,
7318    ) -> Result<(), NifiError> {
7319        match self.version {
7320            DetectedVersion::V2_6_0 => {
7321                let api = crate::v2_6_0::api::parametercontexts::ParameterContextsAssetsApi {
7322                    client: self.client,
7323                    context_id,
7324                };
7325                api.get_asset_content(asset_id).await
7326            }
7327            DetectedVersion::V2_7_2 => {
7328                let api = crate::v2_7_2::api::parametercontexts::ParameterContextsAssetsApi {
7329                    client: self.client,
7330                    context_id,
7331                };
7332                api.get_asset_content(asset_id).await
7333            }
7334            DetectedVersion::V2_8_0 => {
7335                let api = crate::v2_8_0::api::parametercontexts::ParameterContextsAssetsApi {
7336                    client: self.client,
7337                    context_id,
7338                };
7339                api.get_asset_content(asset_id).await
7340            }
7341        }
7342    }
7343    /// Lists the assets that belong to the Parameter Context with the given ID
7344    pub async fn get_assets(&self, context_id: &str) -> Result<types::AssetsEntity, NifiError> {
7345        match self.version {
7346            DetectedVersion::V2_6_0 => {
7347                let api = crate::v2_6_0::api::parametercontexts::ParameterContextsAssetsApi {
7348                    client: self.client,
7349                    context_id,
7350                };
7351                Ok(api.get_assets().await?.into())
7352            }
7353            DetectedVersion::V2_7_2 => {
7354                let api = crate::v2_7_2::api::parametercontexts::ParameterContextsAssetsApi {
7355                    client: self.client,
7356                    context_id,
7357                };
7358                Ok(api.get_assets().await?.into())
7359            }
7360            DetectedVersion::V2_8_0 => {
7361                let api = crate::v2_8_0::api::parametercontexts::ParameterContextsAssetsApi {
7362                    client: self.client,
7363                    context_id,
7364                };
7365                Ok(api.get_assets().await?.into())
7366            }
7367        }
7368    }
7369    /// Returns the Parameter Context with the given ID
7370    pub async fn get_parameter_context(
7371        &self,
7372        id: &str,
7373        include_inherited_parameters: Option<bool>,
7374    ) -> Result<types::ParameterContextEntity, NifiError> {
7375        match self.version {
7376            DetectedVersion::V2_6_0 => {
7377                let api = crate::v2_6_0::api::parametercontexts::ParameterContextsApi {
7378                    client: self.client,
7379                };
7380                Ok(api
7381                    .get_parameter_context(id, include_inherited_parameters)
7382                    .await?
7383                    .into())
7384            }
7385            DetectedVersion::V2_7_2 => {
7386                let api = crate::v2_7_2::api::parametercontexts::ParameterContextsApi {
7387                    client: self.client,
7388                };
7389                Ok(api
7390                    .get_parameter_context(id, include_inherited_parameters)
7391                    .await?
7392                    .into())
7393            }
7394            DetectedVersion::V2_8_0 => {
7395                let api = crate::v2_8_0::api::parametercontexts::ParameterContextsApi {
7396                    client: self.client,
7397                };
7398                Ok(api
7399                    .get_parameter_context(id, include_inherited_parameters)
7400                    .await?
7401                    .into())
7402            }
7403        }
7404    }
7405    /// Returns the Update Request with the given ID
7406    pub async fn get_parameter_context_update(
7407        &self,
7408        context_id: &str,
7409        request_id: &str,
7410    ) -> Result<types::ParameterContextUpdateRequestEntity, NifiError> {
7411        match self.version {
7412            DetectedVersion::V2_6_0 => {
7413                let api =
7414                    crate::v2_6_0::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7415                        client: self.client,
7416                        context_id,
7417                    };
7418                Ok(api.get_parameter_context_update(request_id).await?.into())
7419            }
7420            DetectedVersion::V2_7_2 => {
7421                let api =
7422                    crate::v2_7_2::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7423                        client: self.client,
7424                        context_id,
7425                    };
7426                Ok(api.get_parameter_context_update(request_id).await?.into())
7427            }
7428            DetectedVersion::V2_8_0 => {
7429                let api =
7430                    crate::v2_8_0::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7431                        client: self.client,
7432                        context_id,
7433                    };
7434                Ok(api.get_parameter_context_update(request_id).await?.into())
7435            }
7436        }
7437    }
7438    /// Returns the Validation Request with the given ID
7439    pub async fn get_validation_request(
7440        &self,
7441        context_id: &str,
7442        id: &str,
7443    ) -> Result<types::ParameterContextValidationRequestEntity, NifiError> {
7444        match self.version {
7445            DetectedVersion::V2_6_0 => {
7446                let api =
7447                    crate::v2_6_0::api::parametercontexts::ParameterContextsValidationRequestsApi {
7448                        client: self.client,
7449                        context_id,
7450                    };
7451                Ok(api.get_validation_request(id).await?.into())
7452            }
7453            DetectedVersion::V2_7_2 => {
7454                let api =
7455                    crate::v2_7_2::api::parametercontexts::ParameterContextsValidationRequestsApi {
7456                        client: self.client,
7457                        context_id,
7458                    };
7459                Ok(api.get_validation_request(id).await?.into())
7460            }
7461            DetectedVersion::V2_8_0 => {
7462                let api =
7463                    crate::v2_8_0::api::parametercontexts::ParameterContextsValidationRequestsApi {
7464                        client: self.client,
7465                        context_id,
7466                    };
7467                Ok(api.get_validation_request(id).await?.into())
7468            }
7469        }
7470    }
7471    /// Initiate the Update Request of a Parameter Context
7472    pub async fn submit_parameter_context_update(
7473        &self,
7474        context_id: &str,
7475        body: &serde_json::Value,
7476    ) -> Result<types::ParameterContextUpdateRequestEntity, NifiError> {
7477        match self.version {
7478            DetectedVersion::V2_6_0 => {
7479                let api =
7480                    crate::v2_6_0::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7481                        client: self.client,
7482                        context_id,
7483                    };
7484                Ok(api
7485                    .submit_parameter_context_update(
7486                        &serde_json::from_value::<crate::v2_6_0::types::ParameterContextEntity>(
7487                            body.clone(),
7488                        )
7489                        .map_err(|e| NifiError::UnsupportedEndpoint {
7490                            endpoint: format!(
7491                                "{} (body deserialize: {})",
7492                                "submit_parameter_context_update", e
7493                            ),
7494                            version: "2.6.0".to_string(),
7495                        })?,
7496                    )
7497                    .await?
7498                    .into())
7499            }
7500            DetectedVersion::V2_7_2 => {
7501                let api =
7502                    crate::v2_7_2::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7503                        client: self.client,
7504                        context_id,
7505                    };
7506                Ok(api
7507                    .submit_parameter_context_update(
7508                        &serde_json::from_value::<crate::v2_7_2::types::ParameterContextEntity>(
7509                            body.clone(),
7510                        )
7511                        .map_err(|e| NifiError::UnsupportedEndpoint {
7512                            endpoint: format!(
7513                                "{} (body deserialize: {})",
7514                                "submit_parameter_context_update", e
7515                            ),
7516                            version: "2.7.2".to_string(),
7517                        })?,
7518                    )
7519                    .await?
7520                    .into())
7521            }
7522            DetectedVersion::V2_8_0 => {
7523                let api =
7524                    crate::v2_8_0::api::parametercontexts::ParameterContextsUpdateRequestsApi {
7525                        client: self.client,
7526                        context_id,
7527                    };
7528                Ok(api
7529                    .submit_parameter_context_update(
7530                        &serde_json::from_value::<crate::v2_8_0::types::ParameterContextEntity>(
7531                            body.clone(),
7532                        )
7533                        .map_err(|e| NifiError::UnsupportedEndpoint {
7534                            endpoint: format!(
7535                                "{} (body deserialize: {})",
7536                                "submit_parameter_context_update", e
7537                            ),
7538                            version: "2.8.0".to_string(),
7539                        })?,
7540                    )
7541                    .await?
7542                    .into())
7543            }
7544        }
7545    }
7546    /// Initiate a Validation Request to determine how the validity of components will change if a Parameter Context were to be updated
7547    pub async fn submit_validation_request(
7548        &self,
7549        context_id: &str,
7550        body: &serde_json::Value,
7551    ) -> Result<types::ParameterContextValidationRequestEntity, NifiError> {
7552        match self.version {
7553            DetectedVersion::V2_6_0 => {
7554                let api =
7555                    crate::v2_6_0::api::parametercontexts::ParameterContextsValidationRequestsApi {
7556                        client: self.client,
7557                        context_id,
7558                    };
7559                Ok(api
7560                    .submit_validation_request(
7561                        &serde_json::from_value::<
7562                            crate::v2_6_0::types::ParameterContextValidationRequestEntity,
7563                        >(body.clone())
7564                        .map_err(|e| NifiError::UnsupportedEndpoint {
7565                            endpoint: format!(
7566                                "{} (body deserialize: {})",
7567                                "submit_validation_request", e
7568                            ),
7569                            version: "2.6.0".to_string(),
7570                        })?,
7571                    )
7572                    .await?
7573                    .into())
7574            }
7575            DetectedVersion::V2_7_2 => {
7576                let api =
7577                    crate::v2_7_2::api::parametercontexts::ParameterContextsValidationRequestsApi {
7578                        client: self.client,
7579                        context_id,
7580                    };
7581                Ok(api
7582                    .submit_validation_request(
7583                        &serde_json::from_value::<
7584                            crate::v2_7_2::types::ParameterContextValidationRequestEntity,
7585                        >(body.clone())
7586                        .map_err(|e| NifiError::UnsupportedEndpoint {
7587                            endpoint: format!(
7588                                "{} (body deserialize: {})",
7589                                "submit_validation_request", e
7590                            ),
7591                            version: "2.7.2".to_string(),
7592                        })?,
7593                    )
7594                    .await?
7595                    .into())
7596            }
7597            DetectedVersion::V2_8_0 => {
7598                let api =
7599                    crate::v2_8_0::api::parametercontexts::ParameterContextsValidationRequestsApi {
7600                        client: self.client,
7601                        context_id,
7602                    };
7603                Ok(api
7604                    .submit_validation_request(
7605                        &serde_json::from_value::<
7606                            crate::v2_8_0::types::ParameterContextValidationRequestEntity,
7607                        >(body.clone())
7608                        .map_err(|e| NifiError::UnsupportedEndpoint {
7609                            endpoint: format!(
7610                                "{} (body deserialize: {})",
7611                                "submit_validation_request", e
7612                            ),
7613                            version: "2.8.0".to_string(),
7614                        })?,
7615                    )
7616                    .await?
7617                    .into())
7618            }
7619        }
7620    }
7621    /// Modifies a Parameter Context
7622    pub async fn update_parameter_context(
7623        &self,
7624        id: &str,
7625        body: &serde_json::Value,
7626    ) -> Result<types::ParameterContextEntity, NifiError> {
7627        match self.version {
7628            DetectedVersion::V2_6_0 => {
7629                let api = crate::v2_6_0::api::parametercontexts::ParameterContextsApi {
7630                    client: self.client,
7631                };
7632                Ok(api
7633                    .update_parameter_context(
7634                        id,
7635                        &serde_json::from_value::<crate::v2_6_0::types::ParameterContextEntity>(
7636                            body.clone(),
7637                        )
7638                        .map_err(|e| NifiError::UnsupportedEndpoint {
7639                            endpoint: format!(
7640                                "{} (body deserialize: {})",
7641                                "update_parameter_context", e
7642                            ),
7643                            version: "2.6.0".to_string(),
7644                        })?,
7645                    )
7646                    .await?
7647                    .into())
7648            }
7649            DetectedVersion::V2_7_2 => {
7650                let api = crate::v2_7_2::api::parametercontexts::ParameterContextsApi {
7651                    client: self.client,
7652                };
7653                Ok(api
7654                    .update_parameter_context(
7655                        id,
7656                        &serde_json::from_value::<crate::v2_7_2::types::ParameterContextEntity>(
7657                            body.clone(),
7658                        )
7659                        .map_err(|e| NifiError::UnsupportedEndpoint {
7660                            endpoint: format!(
7661                                "{} (body deserialize: {})",
7662                                "update_parameter_context", e
7663                            ),
7664                            version: "2.7.2".to_string(),
7665                        })?,
7666                    )
7667                    .await?
7668                    .into())
7669            }
7670            DetectedVersion::V2_8_0 => {
7671                let api = crate::v2_8_0::api::parametercontexts::ParameterContextsApi {
7672                    client: self.client,
7673                };
7674                Ok(api
7675                    .update_parameter_context(
7676                        id,
7677                        &serde_json::from_value::<crate::v2_8_0::types::ParameterContextEntity>(
7678                            body.clone(),
7679                        )
7680                        .map_err(|e| NifiError::UnsupportedEndpoint {
7681                            endpoint: format!(
7682                                "{} (body deserialize: {})",
7683                                "update_parameter_context", e
7684                            ),
7685                            version: "2.8.0".to_string(),
7686                        })?,
7687                    )
7688                    .await?
7689                    .into())
7690            }
7691        }
7692    }
7693}
7694/// Dynamic dispatch wrapper for the ParameterProviders API.
7695pub struct DynamicParameterProvidersApi<'a> {
7696    client: &'a NifiClient,
7697    version: DetectedVersion,
7698}
7699#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
7700impl<'a> DynamicParameterProvidersApi<'a> {
7701    /// Performs analysis of the component's configuration, providing information about which attributes are referenced.
7702    pub async fn analyze_configuration_1(
7703        &self,
7704        id: &str,
7705        body: &serde_json::Value,
7706    ) -> Result<types::ConfigurationAnalysisDto, NifiError> {
7707        match self.version {
7708            DetectedVersion::V2_6_0 => {
7709                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersConfigApi {
7710                    client: self.client,
7711                    id,
7712                };
7713                Ok(
7714                    api
7715                        .analyze_configuration_1(
7716                            &serde_json::from_value::<
7717                                crate::v2_6_0::types::ConfigurationAnalysisEntity,
7718                            >(body.clone())
7719                            .map_err(|e| NifiError::UnsupportedEndpoint {
7720                                endpoint: format!(
7721                                    "{} (body deserialize: {})",
7722                                    "analyze_configuration_1", e
7723                                ),
7724                                version: "2.6.0".to_string(),
7725                            })?,
7726                        )
7727                        .await?
7728                        .into(),
7729                )
7730            }
7731            DetectedVersion::V2_7_2 => {
7732                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersConfigApi {
7733                    client: self.client,
7734                    id,
7735                };
7736                Ok(
7737                    api
7738                        .analyze_configuration_1(
7739                            &serde_json::from_value::<
7740                                crate::v2_7_2::types::ConfigurationAnalysisEntity,
7741                            >(body.clone())
7742                            .map_err(|e| NifiError::UnsupportedEndpoint {
7743                                endpoint: format!(
7744                                    "{} (body deserialize: {})",
7745                                    "analyze_configuration_1", e
7746                                ),
7747                                version: "2.7.2".to_string(),
7748                            })?,
7749                        )
7750                        .await?
7751                        .into(),
7752                )
7753            }
7754            DetectedVersion::V2_8_0 => {
7755                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersConfigApi {
7756                    client: self.client,
7757                    id,
7758                };
7759                Ok(
7760                    api
7761                        .analyze_configuration_1(
7762                            &serde_json::from_value::<
7763                                crate::v2_8_0::types::ConfigurationAnalysisEntity,
7764                            >(body.clone())
7765                            .map_err(|e| NifiError::UnsupportedEndpoint {
7766                                endpoint: format!(
7767                                    "{} (body deserialize: {})",
7768                                    "analyze_configuration_1", e
7769                                ),
7770                                version: "2.8.0".to_string(),
7771                            })?,
7772                        )
7773                        .await?
7774                        .into(),
7775                )
7776            }
7777        }
7778    }
7779    /// Clears bulletins for a parameter provider
7780    pub async fn clear_bulletins_4(
7781        &self,
7782        id: &str,
7783        body: &serde_json::Value,
7784    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
7785        match self.version {
7786            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
7787                endpoint: "clear_bulletins_4".to_string(),
7788                version: "2.6.0".to_string(),
7789            }),
7790            DetectedVersion::V2_7_2 => {
7791                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersBulletinsApi {
7792                    client: self.client,
7793                    id,
7794                };
7795                Ok(
7796                    api
7797                        .clear_bulletins_4(
7798                            &serde_json::from_value::<
7799                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
7800                            >(body.clone())
7801                            .map_err(|e| NifiError::UnsupportedEndpoint {
7802                                endpoint: format!(
7803                                    "{} (body deserialize: {})",
7804                                    "clear_bulletins_4", e
7805                                ),
7806                                version: "2.7.2".to_string(),
7807                            })?,
7808                        )
7809                        .await?
7810                        .into(),
7811                )
7812            }
7813            DetectedVersion::V2_8_0 => {
7814                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersBulletinsApi {
7815                    client: self.client,
7816                    id,
7817                };
7818                Ok(
7819                    api
7820                        .clear_bulletins_4(
7821                            &serde_json::from_value::<
7822                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
7823                            >(body.clone())
7824                            .map_err(|e| NifiError::UnsupportedEndpoint {
7825                                endpoint: format!(
7826                                    "{} (body deserialize: {})",
7827                                    "clear_bulletins_4", e
7828                                ),
7829                                version: "2.8.0".to_string(),
7830                            })?,
7831                        )
7832                        .await?
7833                        .into(),
7834                )
7835            }
7836        }
7837    }
7838    /// Clears the state for a parameter provider
7839    pub async fn clear_state_2(
7840        &self,
7841        id: &str,
7842        body: &serde_json::Value,
7843    ) -> Result<types::ComponentStateDto, NifiError> {
7844        match self.version {
7845            DetectedVersion::V2_6_0 => {
7846                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersStateApi {
7847                    client: self.client,
7848                    id,
7849                };
7850                Ok(api
7851                    .clear_state_2(
7852                        &serde_json::from_value::<crate::v2_6_0::types::ComponentStateEntity>(
7853                            body.clone(),
7854                        )
7855                        .map_err(|e| NifiError::UnsupportedEndpoint {
7856                            endpoint: format!("{} (body deserialize: {})", "clear_state_2", e),
7857                            version: "2.6.0".to_string(),
7858                        })?,
7859                    )
7860                    .await?
7861                    .into())
7862            }
7863            DetectedVersion::V2_7_2 => {
7864                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersStateApi {
7865                    client: self.client,
7866                    id,
7867                };
7868                Ok(api
7869                    .clear_state_2(
7870                        &serde_json::from_value::<crate::v2_7_2::types::ComponentStateEntity>(
7871                            body.clone(),
7872                        )
7873                        .map_err(|e| NifiError::UnsupportedEndpoint {
7874                            endpoint: format!("{} (body deserialize: {})", "clear_state_2", e),
7875                            version: "2.7.2".to_string(),
7876                        })?,
7877                    )
7878                    .await?
7879                    .into())
7880            }
7881            DetectedVersion::V2_8_0 => {
7882                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersStateApi {
7883                    client: self.client,
7884                    id,
7885                };
7886                Ok(api
7887                    .clear_state_2(
7888                        &serde_json::from_value::<crate::v2_8_0::types::ComponentStateEntity>(
7889                            body.clone(),
7890                        )
7891                        .map_err(|e| NifiError::UnsupportedEndpoint {
7892                            endpoint: format!("{} (body deserialize: {})", "clear_state_2", e),
7893                            version: "2.8.0".to_string(),
7894                        })?,
7895                    )
7896                    .await?
7897                    .into())
7898            }
7899        }
7900    }
7901    /// Deletes the Apply Parameters Request with the given ID
7902    pub async fn delete_apply_parameters_request(
7903        &self,
7904        provider_id: &str,
7905        request_id: &str,
7906        disconnected_node_acknowledged: Option<bool>,
7907    ) -> Result<types::ParameterProviderApplyParametersRequestDto, NifiError> {
7908        match self.version {
7909            DetectedVersion::V2_6_0 => {
7910                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
7911                    client: self.client,
7912                    provider_id,
7913                };
7914                Ok(api
7915                    .delete_apply_parameters_request(request_id, disconnected_node_acknowledged)
7916                    .await?
7917                    .into())
7918            }
7919            DetectedVersion::V2_7_2 => {
7920                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
7921                    client: self.client,
7922                    provider_id,
7923                };
7924                Ok(api
7925                    .delete_apply_parameters_request(request_id, disconnected_node_acknowledged)
7926                    .await?
7927                    .into())
7928            }
7929            DetectedVersion::V2_8_0 => {
7930                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
7931                    client: self.client,
7932                    provider_id,
7933                };
7934                Ok(api
7935                    .delete_apply_parameters_request(request_id, disconnected_node_acknowledged)
7936                    .await?
7937                    .into())
7938            }
7939        }
7940    }
7941    /// Deletes the Verification Request with the given ID
7942    pub async fn delete_verification_request_1(
7943        &self,
7944        id: &str,
7945        request_id: &str,
7946    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
7947        match self.version {
7948            DetectedVersion::V2_6_0 => {
7949                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersConfigApi {
7950                    client: self.client,
7951                    id,
7952                };
7953                Ok(api.delete_verification_request_1(request_id).await?.into())
7954            }
7955            DetectedVersion::V2_7_2 => {
7956                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersConfigApi {
7957                    client: self.client,
7958                    id,
7959                };
7960                Ok(api.delete_verification_request_1(request_id).await?.into())
7961            }
7962            DetectedVersion::V2_8_0 => {
7963                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersConfigApi {
7964                    client: self.client,
7965                    id,
7966                };
7967                Ok(api.delete_verification_request_1(request_id).await?.into())
7968            }
7969        }
7970    }
7971    /// Fetches and temporarily caches the parameters for a provider
7972    pub async fn fetch_parameters(
7973        &self,
7974        id: &str,
7975        body: &serde_json::Value,
7976    ) -> Result<types::ParameterProviderEntity, NifiError> {
7977        match self.version {
7978            DetectedVersion::V2_6_0 => {
7979                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersParametersApi {
7980                    client: self.client,
7981                    id,
7982                };
7983                Ok(api
7984                    .fetch_parameters(
7985                        &serde_json::from_value::<
7986                            crate::v2_6_0::types::ParameterProviderParameterFetchEntity,
7987                        >(body.clone())
7988                        .map_err(|e| NifiError::UnsupportedEndpoint {
7989                            endpoint: format!("{} (body deserialize: {})", "fetch_parameters", e),
7990                            version: "2.6.0".to_string(),
7991                        })?,
7992                    )
7993                    .await?
7994                    .into())
7995            }
7996            DetectedVersion::V2_7_2 => {
7997                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersParametersApi {
7998                    client: self.client,
7999                    id,
8000                };
8001                Ok(api
8002                    .fetch_parameters(
8003                        &serde_json::from_value::<
8004                            crate::v2_7_2::types::ParameterProviderParameterFetchEntity,
8005                        >(body.clone())
8006                        .map_err(|e| NifiError::UnsupportedEndpoint {
8007                            endpoint: format!("{} (body deserialize: {})", "fetch_parameters", e),
8008                            version: "2.7.2".to_string(),
8009                        })?,
8010                    )
8011                    .await?
8012                    .into())
8013            }
8014            DetectedVersion::V2_8_0 => {
8015                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersParametersApi {
8016                    client: self.client,
8017                    id,
8018                };
8019                Ok(api
8020                    .fetch_parameters(
8021                        &serde_json::from_value::<
8022                            crate::v2_8_0::types::ParameterProviderParameterFetchEntity,
8023                        >(body.clone())
8024                        .map_err(|e| NifiError::UnsupportedEndpoint {
8025                            endpoint: format!("{} (body deserialize: {})", "fetch_parameters", e),
8026                            version: "2.8.0".to_string(),
8027                        })?,
8028                    )
8029                    .await?
8030                    .into())
8031            }
8032        }
8033    }
8034    /// Gets a parameter provider
8035    pub async fn get_parameter_provider(
8036        &self,
8037        id: &str,
8038    ) -> Result<types::ParameterProviderEntity, NifiError> {
8039        match self.version {
8040            DetectedVersion::V2_6_0 => {
8041                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersApi {
8042                    client: self.client,
8043                };
8044                Ok(api.get_parameter_provider(id).await?.into())
8045            }
8046            DetectedVersion::V2_7_2 => {
8047                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersApi {
8048                    client: self.client,
8049                };
8050                Ok(api.get_parameter_provider(id).await?.into())
8051            }
8052            DetectedVersion::V2_8_0 => {
8053                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersApi {
8054                    client: self.client,
8055                };
8056                Ok(api.get_parameter_provider(id).await?.into())
8057            }
8058        }
8059    }
8060    /// Returns the Apply Parameters Request with the given ID
8061    pub async fn get_parameter_provider_apply_parameters_request(
8062        &self,
8063        provider_id: &str,
8064        request_id: &str,
8065    ) -> Result<types::ParameterProviderApplyParametersRequestDto, NifiError> {
8066        match self.version {
8067            DetectedVersion::V2_6_0 => {
8068                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
8069                    client: self.client,
8070                    provider_id,
8071                };
8072                Ok(api
8073                    .get_parameter_provider_apply_parameters_request(request_id)
8074                    .await?
8075                    .into())
8076            }
8077            DetectedVersion::V2_7_2 => {
8078                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
8079                    client: self.client,
8080                    provider_id,
8081                };
8082                Ok(api
8083                    .get_parameter_provider_apply_parameters_request(request_id)
8084                    .await?
8085                    .into())
8086            }
8087            DetectedVersion::V2_8_0 => {
8088                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
8089                    client: self.client,
8090                    provider_id,
8091                };
8092                Ok(api
8093                    .get_parameter_provider_apply_parameters_request(request_id)
8094                    .await?
8095                    .into())
8096            }
8097        }
8098    }
8099    /// Gets all references to a parameter provider
8100    pub async fn get_parameter_provider_references(
8101        &self,
8102        id: &str,
8103    ) -> Result<types::ParameterProviderReferencingComponentsEntity, NifiError> {
8104        match self.version {
8105            DetectedVersion::V2_6_0 => {
8106                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersReferencesApi {
8107                    client: self.client,
8108                    id,
8109                };
8110                Ok(api.get_parameter_provider_references().await?.into())
8111            }
8112            DetectedVersion::V2_7_2 => {
8113                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersReferencesApi {
8114                    client: self.client,
8115                    id,
8116                };
8117                Ok(api.get_parameter_provider_references().await?.into())
8118            }
8119            DetectedVersion::V2_8_0 => {
8120                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersReferencesApi {
8121                    client: self.client,
8122                    id,
8123                };
8124                Ok(api.get_parameter_provider_references().await?.into())
8125            }
8126        }
8127    }
8128    /// Gets a parameter provider property descriptor
8129    pub async fn get_property_descriptor_2(
8130        &self,
8131        id: &str,
8132        property_name: &str,
8133    ) -> Result<types::PropertyDescriptorDto, NifiError> {
8134        match self.version {
8135            DetectedVersion::V2_6_0 => {
8136                let api =
8137                    crate::v2_6_0::api::parameterproviders::ParameterProvidersDescriptorsApi {
8138                        client: self.client,
8139                        id,
8140                    };
8141                Ok(api.get_property_descriptor_2(property_name).await?.into())
8142            }
8143            DetectedVersion::V2_7_2 => {
8144                let api =
8145                    crate::v2_7_2::api::parameterproviders::ParameterProvidersDescriptorsApi {
8146                        client: self.client,
8147                        id,
8148                    };
8149                Ok(api.get_property_descriptor_2(property_name).await?.into())
8150            }
8151            DetectedVersion::V2_8_0 => {
8152                let api =
8153                    crate::v2_8_0::api::parameterproviders::ParameterProvidersDescriptorsApi {
8154                        client: self.client,
8155                        id,
8156                    };
8157                Ok(api.get_property_descriptor_2(property_name).await?.into())
8158            }
8159        }
8160    }
8161    /// Gets the state for a parameter provider
8162    pub async fn get_state_1(&self, id: &str) -> Result<types::ComponentStateDto, NifiError> {
8163        match self.version {
8164            DetectedVersion::V2_6_0 => {
8165                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersStateApi {
8166                    client: self.client,
8167                    id,
8168                };
8169                Ok(api.get_state_1().await?.into())
8170            }
8171            DetectedVersion::V2_7_2 => {
8172                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersStateApi {
8173                    client: self.client,
8174                    id,
8175                };
8176                Ok(api.get_state_1().await?.into())
8177            }
8178            DetectedVersion::V2_8_0 => {
8179                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersStateApi {
8180                    client: self.client,
8181                    id,
8182                };
8183                Ok(api.get_state_1().await?.into())
8184            }
8185        }
8186    }
8187    /// Returns the Verification Request with the given ID
8188    pub async fn get_verification_request_1(
8189        &self,
8190        id: &str,
8191        request_id: &str,
8192    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
8193        match self.version {
8194            DetectedVersion::V2_6_0 => {
8195                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersConfigApi {
8196                    client: self.client,
8197                    id,
8198                };
8199                Ok(api.get_verification_request_1(request_id).await?.into())
8200            }
8201            DetectedVersion::V2_7_2 => {
8202                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersConfigApi {
8203                    client: self.client,
8204                    id,
8205                };
8206                Ok(api.get_verification_request_1(request_id).await?.into())
8207            }
8208            DetectedVersion::V2_8_0 => {
8209                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersConfigApi {
8210                    client: self.client,
8211                    id,
8212                };
8213                Ok(api.get_verification_request_1(request_id).await?.into())
8214            }
8215        }
8216    }
8217    /// Deletes a parameter provider
8218    pub async fn remove_parameter_provider(
8219        &self,
8220        id: &str,
8221        version: Option<&str>,
8222        client_id: Option<&str>,
8223        disconnected_node_acknowledged: Option<bool>,
8224    ) -> Result<types::ParameterProviderEntity, NifiError> {
8225        match self.version {
8226            DetectedVersion::V2_6_0 => {
8227                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersApi {
8228                    client: self.client,
8229                };
8230                Ok(api
8231                    .remove_parameter_provider(
8232                        id,
8233                        version,
8234                        client_id,
8235                        disconnected_node_acknowledged,
8236                    )
8237                    .await?
8238                    .into())
8239            }
8240            DetectedVersion::V2_7_2 => {
8241                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersApi {
8242                    client: self.client,
8243                };
8244                Ok(api
8245                    .remove_parameter_provider(
8246                        id,
8247                        version,
8248                        client_id,
8249                        disconnected_node_acknowledged,
8250                    )
8251                    .await?
8252                    .into())
8253            }
8254            DetectedVersion::V2_8_0 => {
8255                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersApi {
8256                    client: self.client,
8257                };
8258                Ok(api
8259                    .remove_parameter_provider(
8260                        id,
8261                        version,
8262                        client_id,
8263                        disconnected_node_acknowledged,
8264                    )
8265                    .await?
8266                    .into())
8267            }
8268        }
8269    }
8270    /// Initiate a request to apply the fetched parameters of a Parameter Provider
8271    pub async fn submit_apply_parameters(
8272        &self,
8273        provider_id: &str,
8274        body: &serde_json::Value,
8275    ) -> Result<types::ParameterProviderApplyParametersRequestDto, NifiError> {
8276        match self.version {
8277            DetectedVersion::V2_6_0 => {
8278                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
8279                    client: self.client,
8280                    provider_id,
8281                };
8282                Ok(api
8283                    .submit_apply_parameters(
8284                        &serde_json::from_value::<
8285                            crate::v2_6_0::types::ParameterProviderParameterApplicationEntity,
8286                        >(body.clone())
8287                        .map_err(|e| NifiError::UnsupportedEndpoint {
8288                            endpoint: format!(
8289                                "{} (body deserialize: {})",
8290                                "submit_apply_parameters", e
8291                            ),
8292                            version: "2.6.0".to_string(),
8293                        })?,
8294                    )
8295                    .await?
8296                    .into())
8297            }
8298            DetectedVersion::V2_7_2 => {
8299                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
8300                    client: self.client,
8301                    provider_id,
8302                };
8303                Ok(api
8304                    .submit_apply_parameters(
8305                        &serde_json::from_value::<
8306                            crate::v2_7_2::types::ParameterProviderParameterApplicationEntity,
8307                        >(body.clone())
8308                        .map_err(|e| NifiError::UnsupportedEndpoint {
8309                            endpoint: format!(
8310                                "{} (body deserialize: {})",
8311                                "submit_apply_parameters", e
8312                            ),
8313                            version: "2.7.2".to_string(),
8314                        })?,
8315                    )
8316                    .await?
8317                    .into())
8318            }
8319            DetectedVersion::V2_8_0 => {
8320                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersApplyParametersRequestsApi {
8321                    client: self.client,
8322                    provider_id,
8323                };
8324                Ok(api
8325                    .submit_apply_parameters(
8326                        &serde_json::from_value::<
8327                            crate::v2_8_0::types::ParameterProviderParameterApplicationEntity,
8328                        >(body.clone())
8329                        .map_err(|e| NifiError::UnsupportedEndpoint {
8330                            endpoint: format!(
8331                                "{} (body deserialize: {})",
8332                                "submit_apply_parameters", e
8333                            ),
8334                            version: "2.8.0".to_string(),
8335                        })?,
8336                    )
8337                    .await?
8338                    .into())
8339            }
8340        }
8341    }
8342    /// Performs verification of the Parameter Provider's configuration
8343    pub async fn submit_config_verification_request_1(
8344        &self,
8345        id: &str,
8346        body: &serde_json::Value,
8347    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
8348        match self.version {
8349            DetectedVersion::V2_6_0 => {
8350                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersConfigApi {
8351                    client: self.client,
8352                    id,
8353                };
8354                Ok(api
8355                    .submit_config_verification_request_1(
8356                        &serde_json::from_value::<crate::v2_6_0::types::VerifyConfigRequestEntity>(
8357                            body.clone(),
8358                        )
8359                        .map_err(|e| NifiError::UnsupportedEndpoint {
8360                            endpoint: format!(
8361                                "{} (body deserialize: {})",
8362                                "submit_config_verification_request_1", e
8363                            ),
8364                            version: "2.6.0".to_string(),
8365                        })?,
8366                    )
8367                    .await?
8368                    .into())
8369            }
8370            DetectedVersion::V2_7_2 => {
8371                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersConfigApi {
8372                    client: self.client,
8373                    id,
8374                };
8375                Ok(api
8376                    .submit_config_verification_request_1(
8377                        &serde_json::from_value::<crate::v2_7_2::types::VerifyConfigRequestEntity>(
8378                            body.clone(),
8379                        )
8380                        .map_err(|e| NifiError::UnsupportedEndpoint {
8381                            endpoint: format!(
8382                                "{} (body deserialize: {})",
8383                                "submit_config_verification_request_1", e
8384                            ),
8385                            version: "2.7.2".to_string(),
8386                        })?,
8387                    )
8388                    .await?
8389                    .into())
8390            }
8391            DetectedVersion::V2_8_0 => {
8392                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersConfigApi {
8393                    client: self.client,
8394                    id,
8395                };
8396                Ok(api
8397                    .submit_config_verification_request_1(
8398                        &serde_json::from_value::<crate::v2_8_0::types::VerifyConfigRequestEntity>(
8399                            body.clone(),
8400                        )
8401                        .map_err(|e| NifiError::UnsupportedEndpoint {
8402                            endpoint: format!(
8403                                "{} (body deserialize: {})",
8404                                "submit_config_verification_request_1", e
8405                            ),
8406                            version: "2.8.0".to_string(),
8407                        })?,
8408                    )
8409                    .await?
8410                    .into())
8411            }
8412        }
8413    }
8414    /// Updates a parameter provider
8415    pub async fn update_parameter_provider(
8416        &self,
8417        id: &str,
8418        body: &serde_json::Value,
8419    ) -> Result<types::ParameterProviderEntity, NifiError> {
8420        match self.version {
8421            DetectedVersion::V2_6_0 => {
8422                let api = crate::v2_6_0::api::parameterproviders::ParameterProvidersApi {
8423                    client: self.client,
8424                };
8425                Ok(api
8426                    .update_parameter_provider(
8427                        id,
8428                        &serde_json::from_value::<crate::v2_6_0::types::ParameterProviderEntity>(
8429                            body.clone(),
8430                        )
8431                        .map_err(|e| NifiError::UnsupportedEndpoint {
8432                            endpoint: format!(
8433                                "{} (body deserialize: {})",
8434                                "update_parameter_provider", e
8435                            ),
8436                            version: "2.6.0".to_string(),
8437                        })?,
8438                    )
8439                    .await?
8440                    .into())
8441            }
8442            DetectedVersion::V2_7_2 => {
8443                let api = crate::v2_7_2::api::parameterproviders::ParameterProvidersApi {
8444                    client: self.client,
8445                };
8446                Ok(api
8447                    .update_parameter_provider(
8448                        id,
8449                        &serde_json::from_value::<crate::v2_7_2::types::ParameterProviderEntity>(
8450                            body.clone(),
8451                        )
8452                        .map_err(|e| NifiError::UnsupportedEndpoint {
8453                            endpoint: format!(
8454                                "{} (body deserialize: {})",
8455                                "update_parameter_provider", e
8456                            ),
8457                            version: "2.7.2".to_string(),
8458                        })?,
8459                    )
8460                    .await?
8461                    .into())
8462            }
8463            DetectedVersion::V2_8_0 => {
8464                let api = crate::v2_8_0::api::parameterproviders::ParameterProvidersApi {
8465                    client: self.client,
8466                };
8467                Ok(api
8468                    .update_parameter_provider(
8469                        id,
8470                        &serde_json::from_value::<crate::v2_8_0::types::ParameterProviderEntity>(
8471                            body.clone(),
8472                        )
8473                        .map_err(|e| NifiError::UnsupportedEndpoint {
8474                            endpoint: format!(
8475                                "{} (body deserialize: {})",
8476                                "update_parameter_provider", e
8477                            ),
8478                            version: "2.8.0".to_string(),
8479                        })?,
8480                    )
8481                    .await?
8482                    .into())
8483            }
8484        }
8485    }
8486}
8487/// Dynamic dispatch wrapper for the Policies API.
8488pub struct DynamicPoliciesApi<'a> {
8489    client: &'a NifiClient,
8490    version: DetectedVersion,
8491}
8492#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
8493impl<'a> DynamicPoliciesApi<'a> {
8494    /// Creates an access policy
8495    pub async fn create_access_policy(
8496        &self,
8497        body: &serde_json::Value,
8498    ) -> Result<types::AccessPolicyEntity, NifiError> {
8499        match self.version {
8500            DetectedVersion::V2_6_0 => {
8501                let api = crate::v2_6_0::api::policies::PoliciesApi {
8502                    client: self.client,
8503                };
8504                Ok(api
8505                    .create_access_policy(
8506                        &serde_json::from_value::<crate::v2_6_0::types::AccessPolicyEntity>(
8507                            body.clone(),
8508                        )
8509                        .map_err(|e| NifiError::UnsupportedEndpoint {
8510                            endpoint: format!(
8511                                "{} (body deserialize: {})",
8512                                "create_access_policy", e
8513                            ),
8514                            version: "2.6.0".to_string(),
8515                        })?,
8516                    )
8517                    .await?
8518                    .into())
8519            }
8520            DetectedVersion::V2_7_2 => {
8521                let api = crate::v2_7_2::api::policies::PoliciesApi {
8522                    client: self.client,
8523                };
8524                Ok(api
8525                    .create_access_policy(
8526                        &serde_json::from_value::<crate::v2_7_2::types::AccessPolicyEntity>(
8527                            body.clone(),
8528                        )
8529                        .map_err(|e| NifiError::UnsupportedEndpoint {
8530                            endpoint: format!(
8531                                "{} (body deserialize: {})",
8532                                "create_access_policy", e
8533                            ),
8534                            version: "2.7.2".to_string(),
8535                        })?,
8536                    )
8537                    .await?
8538                    .into())
8539            }
8540            DetectedVersion::V2_8_0 => {
8541                let api = crate::v2_8_0::api::policies::PoliciesApi {
8542                    client: self.client,
8543                };
8544                Ok(api
8545                    .create_access_policy(
8546                        &serde_json::from_value::<crate::v2_8_0::types::AccessPolicyEntity>(
8547                            body.clone(),
8548                        )
8549                        .map_err(|e| NifiError::UnsupportedEndpoint {
8550                            endpoint: format!(
8551                                "{} (body deserialize: {})",
8552                                "create_access_policy", e
8553                            ),
8554                            version: "2.8.0".to_string(),
8555                        })?,
8556                    )
8557                    .await?
8558                    .into())
8559            }
8560        }
8561    }
8562    /// Gets an access policy
8563    pub async fn get_access_policy(
8564        &self,
8565        id: &str,
8566    ) -> Result<types::AccessPolicyEntity, NifiError> {
8567        match self.version {
8568            DetectedVersion::V2_6_0 => {
8569                let api = crate::v2_6_0::api::policies::PoliciesApi {
8570                    client: self.client,
8571                };
8572                Ok(api.get_access_policy(id).await?.into())
8573            }
8574            DetectedVersion::V2_7_2 => {
8575                let api = crate::v2_7_2::api::policies::PoliciesApi {
8576                    client: self.client,
8577                };
8578                Ok(api.get_access_policy(id).await?.into())
8579            }
8580            DetectedVersion::V2_8_0 => {
8581                let api = crate::v2_8_0::api::policies::PoliciesApi {
8582                    client: self.client,
8583                };
8584                Ok(api.get_access_policy(id).await?.into())
8585            }
8586        }
8587    }
8588    /// Gets an access policy for the specified action and resource
8589    pub async fn get_access_policy_for_resource(
8590        &self,
8591        action: &str,
8592        resource: &str,
8593    ) -> Result<types::AccessPolicyEntity, NifiError> {
8594        match self.version {
8595            DetectedVersion::V2_6_0 => {
8596                let api = crate::v2_6_0::api::policies::PoliciesApi {
8597                    client: self.client,
8598                };
8599                Ok(api
8600                    .get_access_policy_for_resource(action, resource)
8601                    .await?
8602                    .into())
8603            }
8604            DetectedVersion::V2_7_2 => {
8605                let api = crate::v2_7_2::api::policies::PoliciesApi {
8606                    client: self.client,
8607                };
8608                Ok(api
8609                    .get_access_policy_for_resource(action, resource)
8610                    .await?
8611                    .into())
8612            }
8613            DetectedVersion::V2_8_0 => {
8614                let api = crate::v2_8_0::api::policies::PoliciesApi {
8615                    client: self.client,
8616                };
8617                Ok(api
8618                    .get_access_policy_for_resource(action, resource)
8619                    .await?
8620                    .into())
8621            }
8622        }
8623    }
8624    /// Deletes an access policy
8625    pub async fn remove_access_policy(
8626        &self,
8627        id: &str,
8628        version: Option<&str>,
8629        client_id: Option<&str>,
8630        disconnected_node_acknowledged: Option<bool>,
8631    ) -> Result<types::AccessPolicyEntity, NifiError> {
8632        match self.version {
8633            DetectedVersion::V2_6_0 => {
8634                let api = crate::v2_6_0::api::policies::PoliciesApi {
8635                    client: self.client,
8636                };
8637                Ok(api
8638                    .remove_access_policy(id, version, client_id, disconnected_node_acknowledged)
8639                    .await?
8640                    .into())
8641            }
8642            DetectedVersion::V2_7_2 => {
8643                let api = crate::v2_7_2::api::policies::PoliciesApi {
8644                    client: self.client,
8645                };
8646                Ok(api
8647                    .remove_access_policy(id, version, client_id, disconnected_node_acknowledged)
8648                    .await?
8649                    .into())
8650            }
8651            DetectedVersion::V2_8_0 => {
8652                let api = crate::v2_8_0::api::policies::PoliciesApi {
8653                    client: self.client,
8654                };
8655                Ok(api
8656                    .remove_access_policy(id, version, client_id, disconnected_node_acknowledged)
8657                    .await?
8658                    .into())
8659            }
8660        }
8661    }
8662    /// Updates a access policy
8663    pub async fn update_access_policy(
8664        &self,
8665        id: &str,
8666        body: &serde_json::Value,
8667    ) -> Result<types::AccessPolicyEntity, NifiError> {
8668        match self.version {
8669            DetectedVersion::V2_6_0 => {
8670                let api = crate::v2_6_0::api::policies::PoliciesApi {
8671                    client: self.client,
8672                };
8673                Ok(api
8674                    .update_access_policy(
8675                        id,
8676                        &serde_json::from_value::<crate::v2_6_0::types::AccessPolicyEntity>(
8677                            body.clone(),
8678                        )
8679                        .map_err(|e| NifiError::UnsupportedEndpoint {
8680                            endpoint: format!(
8681                                "{} (body deserialize: {})",
8682                                "update_access_policy", e
8683                            ),
8684                            version: "2.6.0".to_string(),
8685                        })?,
8686                    )
8687                    .await?
8688                    .into())
8689            }
8690            DetectedVersion::V2_7_2 => {
8691                let api = crate::v2_7_2::api::policies::PoliciesApi {
8692                    client: self.client,
8693                };
8694                Ok(api
8695                    .update_access_policy(
8696                        id,
8697                        &serde_json::from_value::<crate::v2_7_2::types::AccessPolicyEntity>(
8698                            body.clone(),
8699                        )
8700                        .map_err(|e| NifiError::UnsupportedEndpoint {
8701                            endpoint: format!(
8702                                "{} (body deserialize: {})",
8703                                "update_access_policy", e
8704                            ),
8705                            version: "2.7.2".to_string(),
8706                        })?,
8707                    )
8708                    .await?
8709                    .into())
8710            }
8711            DetectedVersion::V2_8_0 => {
8712                let api = crate::v2_8_0::api::policies::PoliciesApi {
8713                    client: self.client,
8714                };
8715                Ok(api
8716                    .update_access_policy(
8717                        id,
8718                        &serde_json::from_value::<crate::v2_8_0::types::AccessPolicyEntity>(
8719                            body.clone(),
8720                        )
8721                        .map_err(|e| NifiError::UnsupportedEndpoint {
8722                            endpoint: format!(
8723                                "{} (body deserialize: {})",
8724                                "update_access_policy", e
8725                            ),
8726                            version: "2.8.0".to_string(),
8727                        })?,
8728                    )
8729                    .await?
8730                    .into())
8731            }
8732        }
8733    }
8734}
8735/// Dynamic dispatch wrapper for the ProcessGroups API.
8736pub struct DynamicProcessGroupsApi<'a> {
8737    client: &'a NifiClient,
8738    version: DetectedVersion,
8739}
8740#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
8741impl<'a> DynamicProcessGroupsApi<'a> {
8742    /// Generates a copy response for the given copy request
8743    pub async fn copy(
8744        &self,
8745        id: &str,
8746        body: &serde_json::Value,
8747    ) -> Result<types::CopyResponseEntity, NifiError> {
8748        match self.version {
8749            DetectedVersion::V2_6_0 => {
8750                let api = crate::v2_6_0::api::processgroups::ProcessGroupsCopyApi {
8751                    client: self.client,
8752                    id,
8753                };
8754                Ok(api
8755                    .copy(
8756                        &serde_json::from_value::<crate::v2_6_0::types::CopyRequestEntity>(
8757                            body.clone(),
8758                        )
8759                        .map_err(|e| NifiError::UnsupportedEndpoint {
8760                            endpoint: format!("{} (body deserialize: {})", "copy", e),
8761                            version: "2.6.0".to_string(),
8762                        })?,
8763                    )
8764                    .await?
8765                    .into())
8766            }
8767            DetectedVersion::V2_7_2 => {
8768                let api = crate::v2_7_2::api::processgroups::ProcessGroupsCopyApi {
8769                    client: self.client,
8770                    id,
8771                };
8772                Ok(api
8773                    .copy(
8774                        &serde_json::from_value::<crate::v2_7_2::types::CopyRequestEntity>(
8775                            body.clone(),
8776                        )
8777                        .map_err(|e| NifiError::UnsupportedEndpoint {
8778                            endpoint: format!("{} (body deserialize: {})", "copy", e),
8779                            version: "2.7.2".to_string(),
8780                        })?,
8781                    )
8782                    .await?
8783                    .into())
8784            }
8785            DetectedVersion::V2_8_0 => {
8786                let api = crate::v2_8_0::api::processgroups::ProcessGroupsCopyApi {
8787                    client: self.client,
8788                    id,
8789                };
8790                Ok(api
8791                    .copy(
8792                        &serde_json::from_value::<crate::v2_8_0::types::CopyRequestEntity>(
8793                            body.clone(),
8794                        )
8795                        .map_err(|e| NifiError::UnsupportedEndpoint {
8796                            endpoint: format!("{} (body deserialize: {})", "copy", e),
8797                            version: "2.8.0".to_string(),
8798                        })?,
8799                    )
8800                    .await?
8801                    .into())
8802            }
8803        }
8804    }
8805    /// Copies a snippet and discards it.
8806    pub async fn copy_snippet(
8807        &self,
8808        id: &str,
8809        body: &serde_json::Value,
8810    ) -> Result<types::FlowDto, NifiError> {
8811        match self.version {
8812            DetectedVersion::V2_6_0 => {
8813                let api = crate::v2_6_0::api::processgroups::ProcessGroupsSnippetInstanceApi {
8814                    client: self.client,
8815                    id,
8816                };
8817                Ok(api
8818                    .copy_snippet(
8819                        &serde_json::from_value::<crate::v2_6_0::types::CopySnippetRequestEntity>(
8820                            body.clone(),
8821                        )
8822                        .map_err(|e| NifiError::UnsupportedEndpoint {
8823                            endpoint: format!("{} (body deserialize: {})", "copy_snippet", e),
8824                            version: "2.6.0".to_string(),
8825                        })?,
8826                    )
8827                    .await?
8828                    .into())
8829            }
8830            DetectedVersion::V2_7_2 => {
8831                let api = crate::v2_7_2::api::processgroups::ProcessGroupsSnippetInstanceApi {
8832                    client: self.client,
8833                    id,
8834                };
8835                Ok(api
8836                    .copy_snippet(
8837                        &serde_json::from_value::<crate::v2_7_2::types::CopySnippetRequestEntity>(
8838                            body.clone(),
8839                        )
8840                        .map_err(|e| NifiError::UnsupportedEndpoint {
8841                            endpoint: format!("{} (body deserialize: {})", "copy_snippet", e),
8842                            version: "2.7.2".to_string(),
8843                        })?,
8844                    )
8845                    .await?
8846                    .into())
8847            }
8848            DetectedVersion::V2_8_0 => {
8849                let api = crate::v2_8_0::api::processgroups::ProcessGroupsSnippetInstanceApi {
8850                    client: self.client,
8851                    id,
8852                };
8853                Ok(api
8854                    .copy_snippet(
8855                        &serde_json::from_value::<crate::v2_8_0::types::CopySnippetRequestEntity>(
8856                            body.clone(),
8857                        )
8858                        .map_err(|e| NifiError::UnsupportedEndpoint {
8859                            endpoint: format!("{} (body deserialize: {})", "copy_snippet", e),
8860                            version: "2.8.0".to_string(),
8861                        })?,
8862                    )
8863                    .await?
8864                    .into())
8865            }
8866        }
8867    }
8868    /// Creates a connection
8869    pub async fn create_connection(
8870        &self,
8871        id: &str,
8872        body: &serde_json::Value,
8873    ) -> Result<types::ConnectionEntity, NifiError> {
8874        match self.version {
8875            DetectedVersion::V2_6_0 => {
8876                let api = crate::v2_6_0::api::processgroups::ProcessGroupsConnectionsApi {
8877                    client: self.client,
8878                    id,
8879                };
8880                Ok(api
8881                    .create_connection(
8882                        &serde_json::from_value::<crate::v2_6_0::types::ConnectionEntity>(
8883                            body.clone(),
8884                        )
8885                        .map_err(|e| NifiError::UnsupportedEndpoint {
8886                            endpoint: format!("{} (body deserialize: {})", "create_connection", e),
8887                            version: "2.6.0".to_string(),
8888                        })?,
8889                    )
8890                    .await?
8891                    .into())
8892            }
8893            DetectedVersion::V2_7_2 => {
8894                let api = crate::v2_7_2::api::processgroups::ProcessGroupsConnectionsApi {
8895                    client: self.client,
8896                    id,
8897                };
8898                Ok(api
8899                    .create_connection(
8900                        &serde_json::from_value::<crate::v2_7_2::types::ConnectionEntity>(
8901                            body.clone(),
8902                        )
8903                        .map_err(|e| NifiError::UnsupportedEndpoint {
8904                            endpoint: format!("{} (body deserialize: {})", "create_connection", e),
8905                            version: "2.7.2".to_string(),
8906                        })?,
8907                    )
8908                    .await?
8909                    .into())
8910            }
8911            DetectedVersion::V2_8_0 => {
8912                let api = crate::v2_8_0::api::processgroups::ProcessGroupsConnectionsApi {
8913                    client: self.client,
8914                    id,
8915                };
8916                Ok(api
8917                    .create_connection(
8918                        &serde_json::from_value::<crate::v2_8_0::types::ConnectionEntity>(
8919                            body.clone(),
8920                        )
8921                        .map_err(|e| NifiError::UnsupportedEndpoint {
8922                            endpoint: format!("{} (body deserialize: {})", "create_connection", e),
8923                            version: "2.8.0".to_string(),
8924                        })?,
8925                    )
8926                    .await?
8927                    .into())
8928            }
8929        }
8930    }
8931    /// Creates a new controller service
8932    pub async fn create_controller_service_1(
8933        &self,
8934        id: &str,
8935        body: &serde_json::Value,
8936    ) -> Result<types::ControllerServiceEntity, NifiError> {
8937        match self.version {
8938            DetectedVersion::V2_6_0 => {
8939                let api = crate::v2_6_0::api::processgroups::ProcessGroupsControllerServicesApi {
8940                    client: self.client,
8941                    id,
8942                };
8943                Ok(api
8944                    .create_controller_service_1(
8945                        &serde_json::from_value::<crate::v2_6_0::types::ControllerServiceEntity>(
8946                            body.clone(),
8947                        )
8948                        .map_err(|e| NifiError::UnsupportedEndpoint {
8949                            endpoint: format!(
8950                                "{} (body deserialize: {})",
8951                                "create_controller_service_1", e
8952                            ),
8953                            version: "2.6.0".to_string(),
8954                        })?,
8955                    )
8956                    .await?
8957                    .into())
8958            }
8959            DetectedVersion::V2_7_2 => {
8960                let api = crate::v2_7_2::api::processgroups::ProcessGroupsControllerServicesApi {
8961                    client: self.client,
8962                    id,
8963                };
8964                Ok(api
8965                    .create_controller_service_1(
8966                        &serde_json::from_value::<crate::v2_7_2::types::ControllerServiceEntity>(
8967                            body.clone(),
8968                        )
8969                        .map_err(|e| NifiError::UnsupportedEndpoint {
8970                            endpoint: format!(
8971                                "{} (body deserialize: {})",
8972                                "create_controller_service_1", e
8973                            ),
8974                            version: "2.7.2".to_string(),
8975                        })?,
8976                    )
8977                    .await?
8978                    .into())
8979            }
8980            DetectedVersion::V2_8_0 => {
8981                let api = crate::v2_8_0::api::processgroups::ProcessGroupsControllerServicesApi {
8982                    client: self.client,
8983                    id,
8984                };
8985                Ok(api
8986                    .create_controller_service_1(
8987                        &serde_json::from_value::<crate::v2_8_0::types::ControllerServiceEntity>(
8988                            body.clone(),
8989                        )
8990                        .map_err(|e| NifiError::UnsupportedEndpoint {
8991                            endpoint: format!(
8992                                "{} (body deserialize: {})",
8993                                "create_controller_service_1", e
8994                            ),
8995                            version: "2.8.0".to_string(),
8996                        })?,
8997                    )
8998                    .await?
8999                    .into())
9000            }
9001        }
9002    }
9003    /// Creates a request to drop all flowfiles of all connection queues in this process group.
9004    pub async fn create_empty_all_connections_request(
9005        &self,
9006        id: &str,
9007    ) -> Result<types::DropRequestDto, NifiError> {
9008        match self.version {
9009            DetectedVersion::V2_6_0 => {
9010                let api = crate::v2_6_0::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
9011                    client: self.client,
9012                    id,
9013                };
9014                Ok(api.create_empty_all_connections_request().await?.into())
9015            }
9016            DetectedVersion::V2_7_2 => {
9017                let api = crate::v2_7_2::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
9018                    client: self.client,
9019                    id,
9020                };
9021                Ok(api.create_empty_all_connections_request().await?.into())
9022            }
9023            DetectedVersion::V2_8_0 => {
9024                let api = crate::v2_8_0::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
9025                    client: self.client,
9026                    id,
9027                };
9028                Ok(api.create_empty_all_connections_request().await?.into())
9029            }
9030        }
9031    }
9032    /// Creates a funnel
9033    pub async fn create_funnel(
9034        &self,
9035        id: &str,
9036        body: &serde_json::Value,
9037    ) -> Result<types::FunnelEntity, NifiError> {
9038        match self.version {
9039            DetectedVersion::V2_6_0 => {
9040                let api = crate::v2_6_0::api::processgroups::ProcessGroupsFunnelsApi {
9041                    client: self.client,
9042                    id,
9043                };
9044                Ok(api
9045                    .create_funnel(
9046                        &serde_json::from_value::<crate::v2_6_0::types::FunnelEntity>(body.clone())
9047                            .map_err(|e| NifiError::UnsupportedEndpoint {
9048                                endpoint: format!("{} (body deserialize: {})", "create_funnel", e),
9049                                version: "2.6.0".to_string(),
9050                            })?,
9051                    )
9052                    .await?
9053                    .into())
9054            }
9055            DetectedVersion::V2_7_2 => {
9056                let api = crate::v2_7_2::api::processgroups::ProcessGroupsFunnelsApi {
9057                    client: self.client,
9058                    id,
9059                };
9060                Ok(api
9061                    .create_funnel(
9062                        &serde_json::from_value::<crate::v2_7_2::types::FunnelEntity>(body.clone())
9063                            .map_err(|e| NifiError::UnsupportedEndpoint {
9064                                endpoint: format!("{} (body deserialize: {})", "create_funnel", e),
9065                                version: "2.7.2".to_string(),
9066                            })?,
9067                    )
9068                    .await?
9069                    .into())
9070            }
9071            DetectedVersion::V2_8_0 => {
9072                let api = crate::v2_8_0::api::processgroups::ProcessGroupsFunnelsApi {
9073                    client: self.client,
9074                    id,
9075                };
9076                Ok(api
9077                    .create_funnel(
9078                        &serde_json::from_value::<crate::v2_8_0::types::FunnelEntity>(body.clone())
9079                            .map_err(|e| NifiError::UnsupportedEndpoint {
9080                                endpoint: format!("{} (body deserialize: {})", "create_funnel", e),
9081                                version: "2.8.0".to_string(),
9082                            })?,
9083                    )
9084                    .await?
9085                    .into())
9086            }
9087        }
9088    }
9089    /// Creates an input port
9090    pub async fn create_input_port(
9091        &self,
9092        id: &str,
9093        body: &serde_json::Value,
9094    ) -> Result<types::PortEntity, NifiError> {
9095        match self.version {
9096            DetectedVersion::V2_6_0 => {
9097                let api = crate::v2_6_0::api::processgroups::ProcessGroupsInputPortsApi {
9098                    client: self.client,
9099                    id,
9100                };
9101                Ok(api
9102                    .create_input_port(
9103                        &serde_json::from_value::<crate::v2_6_0::types::PortEntity>(body.clone())
9104                            .map_err(|e| NifiError::UnsupportedEndpoint {
9105                            endpoint: format!("{} (body deserialize: {})", "create_input_port", e),
9106                            version: "2.6.0".to_string(),
9107                        })?,
9108                    )
9109                    .await?
9110                    .into())
9111            }
9112            DetectedVersion::V2_7_2 => {
9113                let api = crate::v2_7_2::api::processgroups::ProcessGroupsInputPortsApi {
9114                    client: self.client,
9115                    id,
9116                };
9117                Ok(api
9118                    .create_input_port(
9119                        &serde_json::from_value::<crate::v2_7_2::types::PortEntity>(body.clone())
9120                            .map_err(|e| NifiError::UnsupportedEndpoint {
9121                            endpoint: format!("{} (body deserialize: {})", "create_input_port", e),
9122                            version: "2.7.2".to_string(),
9123                        })?,
9124                    )
9125                    .await?
9126                    .into())
9127            }
9128            DetectedVersion::V2_8_0 => {
9129                let api = crate::v2_8_0::api::processgroups::ProcessGroupsInputPortsApi {
9130                    client: self.client,
9131                    id,
9132                };
9133                Ok(api
9134                    .create_input_port(
9135                        &serde_json::from_value::<crate::v2_8_0::types::PortEntity>(body.clone())
9136                            .map_err(|e| NifiError::UnsupportedEndpoint {
9137                            endpoint: format!("{} (body deserialize: {})", "create_input_port", e),
9138                            version: "2.8.0".to_string(),
9139                        })?,
9140                    )
9141                    .await?
9142                    .into())
9143            }
9144        }
9145    }
9146    /// Creates a label
9147    pub async fn create_label(
9148        &self,
9149        id: &str,
9150        body: &serde_json::Value,
9151    ) -> Result<types::LabelEntity, NifiError> {
9152        match self.version {
9153            DetectedVersion::V2_6_0 => {
9154                let api = crate::v2_6_0::api::processgroups::ProcessGroupsLabelsApi {
9155                    client: self.client,
9156                    id,
9157                };
9158                Ok(api
9159                    .create_label(
9160                        &serde_json::from_value::<crate::v2_6_0::types::LabelEntity>(body.clone())
9161                            .map_err(|e| NifiError::UnsupportedEndpoint {
9162                                endpoint: format!("{} (body deserialize: {})", "create_label", e),
9163                                version: "2.6.0".to_string(),
9164                            })?,
9165                    )
9166                    .await?
9167                    .into())
9168            }
9169            DetectedVersion::V2_7_2 => {
9170                let api = crate::v2_7_2::api::processgroups::ProcessGroupsLabelsApi {
9171                    client: self.client,
9172                    id,
9173                };
9174                Ok(api
9175                    .create_label(
9176                        &serde_json::from_value::<crate::v2_7_2::types::LabelEntity>(body.clone())
9177                            .map_err(|e| NifiError::UnsupportedEndpoint {
9178                                endpoint: format!("{} (body deserialize: {})", "create_label", e),
9179                                version: "2.7.2".to_string(),
9180                            })?,
9181                    )
9182                    .await?
9183                    .into())
9184            }
9185            DetectedVersion::V2_8_0 => {
9186                let api = crate::v2_8_0::api::processgroups::ProcessGroupsLabelsApi {
9187                    client: self.client,
9188                    id,
9189                };
9190                Ok(api
9191                    .create_label(
9192                        &serde_json::from_value::<crate::v2_8_0::types::LabelEntity>(body.clone())
9193                            .map_err(|e| NifiError::UnsupportedEndpoint {
9194                                endpoint: format!("{} (body deserialize: {})", "create_label", e),
9195                                version: "2.8.0".to_string(),
9196                            })?,
9197                    )
9198                    .await?
9199                    .into())
9200            }
9201        }
9202    }
9203    /// Creates an output port
9204    pub async fn create_output_port(
9205        &self,
9206        id: &str,
9207        body: &serde_json::Value,
9208    ) -> Result<types::PortEntity, NifiError> {
9209        match self.version {
9210            DetectedVersion::V2_6_0 => {
9211                let api = crate::v2_6_0::api::processgroups::ProcessGroupsOutputPortsApi {
9212                    client: self.client,
9213                    id,
9214                };
9215                Ok(api
9216                    .create_output_port(
9217                        &serde_json::from_value::<crate::v2_6_0::types::PortEntity>(body.clone())
9218                            .map_err(|e| NifiError::UnsupportedEndpoint {
9219                            endpoint: format!("{} (body deserialize: {})", "create_output_port", e),
9220                            version: "2.6.0".to_string(),
9221                        })?,
9222                    )
9223                    .await?
9224                    .into())
9225            }
9226            DetectedVersion::V2_7_2 => {
9227                let api = crate::v2_7_2::api::processgroups::ProcessGroupsOutputPortsApi {
9228                    client: self.client,
9229                    id,
9230                };
9231                Ok(api
9232                    .create_output_port(
9233                        &serde_json::from_value::<crate::v2_7_2::types::PortEntity>(body.clone())
9234                            .map_err(|e| NifiError::UnsupportedEndpoint {
9235                            endpoint: format!("{} (body deserialize: {})", "create_output_port", e),
9236                            version: "2.7.2".to_string(),
9237                        })?,
9238                    )
9239                    .await?
9240                    .into())
9241            }
9242            DetectedVersion::V2_8_0 => {
9243                let api = crate::v2_8_0::api::processgroups::ProcessGroupsOutputPortsApi {
9244                    client: self.client,
9245                    id,
9246                };
9247                Ok(api
9248                    .create_output_port(
9249                        &serde_json::from_value::<crate::v2_8_0::types::PortEntity>(body.clone())
9250                            .map_err(|e| NifiError::UnsupportedEndpoint {
9251                            endpoint: format!("{} (body deserialize: {})", "create_output_port", e),
9252                            version: "2.8.0".to_string(),
9253                        })?,
9254                    )
9255                    .await?
9256                    .into())
9257            }
9258        }
9259    }
9260    /// Creates a process group
9261    pub async fn create_process_group(
9262        &self,
9263        id: &str,
9264        parameter_context_handling_strategy: Option<&str>,
9265        body: &serde_json::Value,
9266    ) -> Result<types::ProcessGroupEntity, NifiError> {
9267        match self.version {
9268            DetectedVersion::V2_6_0 => {
9269                let api = crate::v2_6_0::api::processgroups::ProcessGroupsProcessGroupsApi {
9270                    client: self.client,
9271                    id,
9272                };
9273                Ok(api
9274                    .create_process_group(
9275                        parameter_context_handling_strategy
9276                            .map(|v| {
9277                                serde_json::from_value::<
9278                                    crate::v2_6_0::types::ParameterContextHandlingStrategy,
9279                                >(serde_json::Value::String(
9280                                    v.to_string(),
9281                                ))
9282                            })
9283                            .transpose()
9284                            .map_err(|_| NifiError::UnsupportedEndpoint {
9285                                endpoint: "create_process_group".to_string(),
9286                                version: "2.6.0".to_string(),
9287                            })?,
9288                        &serde_json::from_value::<crate::v2_6_0::types::ProcessGroupEntity>(
9289                            body.clone(),
9290                        )
9291                        .map_err(|e| NifiError::UnsupportedEndpoint {
9292                            endpoint: format!(
9293                                "{} (body deserialize: {})",
9294                                "create_process_group", e
9295                            ),
9296                            version: "2.6.0".to_string(),
9297                        })?,
9298                    )
9299                    .await?
9300                    .into())
9301            }
9302            DetectedVersion::V2_7_2 => {
9303                let api = crate::v2_7_2::api::processgroups::ProcessGroupsProcessGroupsApi {
9304                    client: self.client,
9305                    id,
9306                };
9307                Ok(api
9308                    .create_process_group(
9309                        parameter_context_handling_strategy
9310                            .map(|v| {
9311                                serde_json::from_value::<
9312                                    crate::v2_7_2::types::ParameterContextHandlingStrategy,
9313                                >(serde_json::Value::String(
9314                                    v.to_string(),
9315                                ))
9316                            })
9317                            .transpose()
9318                            .map_err(|_| NifiError::UnsupportedEndpoint {
9319                                endpoint: "create_process_group".to_string(),
9320                                version: "2.7.2".to_string(),
9321                            })?,
9322                        &serde_json::from_value::<crate::v2_7_2::types::ProcessGroupEntity>(
9323                            body.clone(),
9324                        )
9325                        .map_err(|e| NifiError::UnsupportedEndpoint {
9326                            endpoint: format!(
9327                                "{} (body deserialize: {})",
9328                                "create_process_group", e
9329                            ),
9330                            version: "2.7.2".to_string(),
9331                        })?,
9332                    )
9333                    .await?
9334                    .into())
9335            }
9336            DetectedVersion::V2_8_0 => {
9337                let api = crate::v2_8_0::api::processgroups::ProcessGroupsProcessGroupsApi {
9338                    client: self.client,
9339                    id,
9340                };
9341                Ok(api
9342                    .create_process_group(
9343                        parameter_context_handling_strategy
9344                            .map(|v| {
9345                                serde_json::from_value::<
9346                                    crate::v2_8_0::types::ParameterContextHandlingStrategy,
9347                                >(serde_json::Value::String(
9348                                    v.to_string(),
9349                                ))
9350                            })
9351                            .transpose()
9352                            .map_err(|_| NifiError::UnsupportedEndpoint {
9353                                endpoint: "create_process_group".to_string(),
9354                                version: "2.8.0".to_string(),
9355                            })?,
9356                        &serde_json::from_value::<crate::v2_8_0::types::ProcessGroupEntity>(
9357                            body.clone(),
9358                        )
9359                        .map_err(|e| NifiError::UnsupportedEndpoint {
9360                            endpoint: format!(
9361                                "{} (body deserialize: {})",
9362                                "create_process_group", e
9363                            ),
9364                            version: "2.8.0".to_string(),
9365                        })?,
9366                    )
9367                    .await?
9368                    .into())
9369            }
9370        }
9371    }
9372    /// Creates a new processor
9373    pub async fn create_processor(
9374        &self,
9375        id: &str,
9376        body: &serde_json::Value,
9377    ) -> Result<types::ProcessorEntity, NifiError> {
9378        match self.version {
9379            DetectedVersion::V2_6_0 => {
9380                let api = crate::v2_6_0::api::processgroups::ProcessGroupsProcessorsApi {
9381                    client: self.client,
9382                    id,
9383                };
9384                Ok(api
9385                    .create_processor(
9386                        &serde_json::from_value::<crate::v2_6_0::types::ProcessorEntity>(
9387                            body.clone(),
9388                        )
9389                        .map_err(|e| NifiError::UnsupportedEndpoint {
9390                            endpoint: format!("{} (body deserialize: {})", "create_processor", e),
9391                            version: "2.6.0".to_string(),
9392                        })?,
9393                    )
9394                    .await?
9395                    .into())
9396            }
9397            DetectedVersion::V2_7_2 => {
9398                let api = crate::v2_7_2::api::processgroups::ProcessGroupsProcessorsApi {
9399                    client: self.client,
9400                    id,
9401                };
9402                Ok(api
9403                    .create_processor(
9404                        &serde_json::from_value::<crate::v2_7_2::types::ProcessorEntity>(
9405                            body.clone(),
9406                        )
9407                        .map_err(|e| NifiError::UnsupportedEndpoint {
9408                            endpoint: format!("{} (body deserialize: {})", "create_processor", e),
9409                            version: "2.7.2".to_string(),
9410                        })?,
9411                    )
9412                    .await?
9413                    .into())
9414            }
9415            DetectedVersion::V2_8_0 => {
9416                let api = crate::v2_8_0::api::processgroups::ProcessGroupsProcessorsApi {
9417                    client: self.client,
9418                    id,
9419                };
9420                Ok(api
9421                    .create_processor(
9422                        &serde_json::from_value::<crate::v2_8_0::types::ProcessorEntity>(
9423                            body.clone(),
9424                        )
9425                        .map_err(|e| NifiError::UnsupportedEndpoint {
9426                            endpoint: format!("{} (body deserialize: {})", "create_processor", e),
9427                            version: "2.8.0".to_string(),
9428                        })?,
9429                    )
9430                    .await?
9431                    .into())
9432            }
9433        }
9434    }
9435    /// Creates a new process group
9436    pub async fn create_remote_process_group(
9437        &self,
9438        id: &str,
9439        body: &serde_json::Value,
9440    ) -> Result<types::RemoteProcessGroupEntity, NifiError> {
9441        match self.version {
9442            DetectedVersion::V2_6_0 => {
9443                let api = crate::v2_6_0::api::processgroups::ProcessGroupsRemoteProcessGroupsApi {
9444                    client: self.client,
9445                    id,
9446                };
9447                Ok(api
9448                    .create_remote_process_group(
9449                        &serde_json::from_value::<crate::v2_6_0::types::RemoteProcessGroupEntity>(
9450                            body.clone(),
9451                        )
9452                        .map_err(|e| NifiError::UnsupportedEndpoint {
9453                            endpoint: format!(
9454                                "{} (body deserialize: {})",
9455                                "create_remote_process_group", e
9456                            ),
9457                            version: "2.6.0".to_string(),
9458                        })?,
9459                    )
9460                    .await?
9461                    .into())
9462            }
9463            DetectedVersion::V2_7_2 => {
9464                let api = crate::v2_7_2::api::processgroups::ProcessGroupsRemoteProcessGroupsApi {
9465                    client: self.client,
9466                    id,
9467                };
9468                Ok(api
9469                    .create_remote_process_group(
9470                        &serde_json::from_value::<crate::v2_7_2::types::RemoteProcessGroupEntity>(
9471                            body.clone(),
9472                        )
9473                        .map_err(|e| NifiError::UnsupportedEndpoint {
9474                            endpoint: format!(
9475                                "{} (body deserialize: {})",
9476                                "create_remote_process_group", e
9477                            ),
9478                            version: "2.7.2".to_string(),
9479                        })?,
9480                    )
9481                    .await?
9482                    .into())
9483            }
9484            DetectedVersion::V2_8_0 => {
9485                let api = crate::v2_8_0::api::processgroups::ProcessGroupsRemoteProcessGroupsApi {
9486                    client: self.client,
9487                    id,
9488                };
9489                Ok(api
9490                    .create_remote_process_group(
9491                        &serde_json::from_value::<crate::v2_8_0::types::RemoteProcessGroupEntity>(
9492                            body.clone(),
9493                        )
9494                        .map_err(|e| NifiError::UnsupportedEndpoint {
9495                            endpoint: format!(
9496                                "{} (body deserialize: {})",
9497                                "create_remote_process_group", e
9498                            ),
9499                            version: "2.8.0".to_string(),
9500                        })?,
9501                    )
9502                    .await?
9503                    .into())
9504            }
9505        }
9506    }
9507    /// Deletes the Replace Request with the given ID
9508    pub async fn delete_replace_process_group_request(
9509        &self,
9510        id: &str,
9511        disconnected_node_acknowledged: Option<bool>,
9512    ) -> Result<types::ProcessGroupReplaceRequestEntity, NifiError> {
9513        match self.version {
9514            DetectedVersion::V2_6_0 => {
9515                let api = crate::v2_6_0::api::processgroups::ProcessGroupsApi {
9516                    client: self.client,
9517                };
9518                Ok(api
9519                    .delete_replace_process_group_request(id, disconnected_node_acknowledged)
9520                    .await?
9521                    .into())
9522            }
9523            DetectedVersion::V2_7_2 => {
9524                let api = crate::v2_7_2::api::processgroups::ProcessGroupsApi {
9525                    client: self.client,
9526                };
9527                Ok(api
9528                    .delete_replace_process_group_request(id, disconnected_node_acknowledged)
9529                    .await?
9530                    .into())
9531            }
9532            DetectedVersion::V2_8_0 => {
9533                let api = crate::v2_8_0::api::processgroups::ProcessGroupsApi {
9534                    client: self.client,
9535                };
9536                Ok(api
9537                    .delete_replace_process_group_request(id, disconnected_node_acknowledged)
9538                    .await?
9539                    .into())
9540            }
9541        }
9542    }
9543    /// Gets a process group for download
9544    pub async fn export_process_group(
9545        &self,
9546        id: &str,
9547        include_referenced_services: Option<bool>,
9548    ) -> Result<(), NifiError> {
9549        match self.version {
9550            DetectedVersion::V2_6_0 => {
9551                let api = crate::v2_6_0::api::processgroups::ProcessGroupsDownloadApi {
9552                    client: self.client,
9553                    id,
9554                };
9555                api.export_process_group(include_referenced_services).await
9556            }
9557            DetectedVersion::V2_7_2 => {
9558                let api = crate::v2_7_2::api::processgroups::ProcessGroupsDownloadApi {
9559                    client: self.client,
9560                    id,
9561                };
9562                api.export_process_group(include_referenced_services).await
9563            }
9564            DetectedVersion::V2_8_0 => {
9565                let api = crate::v2_8_0::api::processgroups::ProcessGroupsDownloadApi {
9566                    client: self.client,
9567                    id,
9568                };
9569                api.export_process_group(include_referenced_services).await
9570            }
9571        }
9572    }
9573    /// Gets all connections
9574    pub async fn get_connections(&self, id: &str) -> Result<types::ConnectionsEntity, NifiError> {
9575        match self.version {
9576            DetectedVersion::V2_6_0 => {
9577                let api = crate::v2_6_0::api::processgroups::ProcessGroupsConnectionsApi {
9578                    client: self.client,
9579                    id,
9580                };
9581                Ok(api.get_connections().await?.into())
9582            }
9583            DetectedVersion::V2_7_2 => {
9584                let api = crate::v2_7_2::api::processgroups::ProcessGroupsConnectionsApi {
9585                    client: self.client,
9586                    id,
9587                };
9588                Ok(api.get_connections().await?.into())
9589            }
9590            DetectedVersion::V2_8_0 => {
9591                let api = crate::v2_8_0::api::processgroups::ProcessGroupsConnectionsApi {
9592                    client: self.client,
9593                    id,
9594                };
9595                Ok(api.get_connections().await?.into())
9596            }
9597        }
9598    }
9599    /// Gets the current status of a drop all flowfiles request.
9600    pub async fn get_drop_all_flowfiles_request(
9601        &self,
9602        id: &str,
9603        drop_request_id: &str,
9604    ) -> Result<types::DropRequestDto, NifiError> {
9605        match self.version {
9606            DetectedVersion::V2_6_0 => {
9607                let api = crate::v2_6_0::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
9608                    client: self.client,
9609                    id,
9610                };
9611                Ok(api
9612                    .get_drop_all_flowfiles_request(drop_request_id)
9613                    .await?
9614                    .into())
9615            }
9616            DetectedVersion::V2_7_2 => {
9617                let api = crate::v2_7_2::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
9618                    client: self.client,
9619                    id,
9620                };
9621                Ok(api
9622                    .get_drop_all_flowfiles_request(drop_request_id)
9623                    .await?
9624                    .into())
9625            }
9626            DetectedVersion::V2_8_0 => {
9627                let api = crate::v2_8_0::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
9628                    client: self.client,
9629                    id,
9630                };
9631                Ok(api
9632                    .get_drop_all_flowfiles_request(drop_request_id)
9633                    .await?
9634                    .into())
9635            }
9636        }
9637    }
9638    /// Gets all funnels
9639    pub async fn get_funnels(&self, id: &str) -> Result<types::FunnelsEntity, NifiError> {
9640        match self.version {
9641            DetectedVersion::V2_6_0 => {
9642                let api = crate::v2_6_0::api::processgroups::ProcessGroupsFunnelsApi {
9643                    client: self.client,
9644                    id,
9645                };
9646                Ok(api.get_funnels().await?.into())
9647            }
9648            DetectedVersion::V2_7_2 => {
9649                let api = crate::v2_7_2::api::processgroups::ProcessGroupsFunnelsApi {
9650                    client: self.client,
9651                    id,
9652                };
9653                Ok(api.get_funnels().await?.into())
9654            }
9655            DetectedVersion::V2_8_0 => {
9656                let api = crate::v2_8_0::api::processgroups::ProcessGroupsFunnelsApi {
9657                    client: self.client,
9658                    id,
9659                };
9660                Ok(api.get_funnels().await?.into())
9661            }
9662        }
9663    }
9664    /// Gets all input ports
9665    pub async fn get_input_ports(&self, id: &str) -> Result<types::InputPortsEntity, NifiError> {
9666        match self.version {
9667            DetectedVersion::V2_6_0 => {
9668                let api = crate::v2_6_0::api::processgroups::ProcessGroupsInputPortsApi {
9669                    client: self.client,
9670                    id,
9671                };
9672                Ok(api.get_input_ports().await?.into())
9673            }
9674            DetectedVersion::V2_7_2 => {
9675                let api = crate::v2_7_2::api::processgroups::ProcessGroupsInputPortsApi {
9676                    client: self.client,
9677                    id,
9678                };
9679                Ok(api.get_input_ports().await?.into())
9680            }
9681            DetectedVersion::V2_8_0 => {
9682                let api = crate::v2_8_0::api::processgroups::ProcessGroupsInputPortsApi {
9683                    client: self.client,
9684                    id,
9685                };
9686                Ok(api.get_input_ports().await?.into())
9687            }
9688        }
9689    }
9690    /// Gets all labels
9691    pub async fn get_labels(&self, id: &str) -> Result<types::LabelsEntity, NifiError> {
9692        match self.version {
9693            DetectedVersion::V2_6_0 => {
9694                let api = crate::v2_6_0::api::processgroups::ProcessGroupsLabelsApi {
9695                    client: self.client,
9696                    id,
9697                };
9698                Ok(api.get_labels().await?.into())
9699            }
9700            DetectedVersion::V2_7_2 => {
9701                let api = crate::v2_7_2::api::processgroups::ProcessGroupsLabelsApi {
9702                    client: self.client,
9703                    id,
9704                };
9705                Ok(api.get_labels().await?.into())
9706            }
9707            DetectedVersion::V2_8_0 => {
9708                let api = crate::v2_8_0::api::processgroups::ProcessGroupsLabelsApi {
9709                    client: self.client,
9710                    id,
9711                };
9712                Ok(api.get_labels().await?.into())
9713            }
9714        }
9715    }
9716    /// Gets a list of local modifications to the Process Group since it was last synchronized with the Flow Registry
9717    pub async fn get_local_modifications(
9718        &self,
9719        id: &str,
9720    ) -> Result<types::FlowComparisonEntity, NifiError> {
9721        match self.version {
9722            DetectedVersion::V2_6_0 => {
9723                let api = crate::v2_6_0::api::processgroups::ProcessGroupsLocalModificationsApi {
9724                    client: self.client,
9725                    id,
9726                };
9727                Ok(api.get_local_modifications().await?.into())
9728            }
9729            DetectedVersion::V2_7_2 => {
9730                let api = crate::v2_7_2::api::processgroups::ProcessGroupsLocalModificationsApi {
9731                    client: self.client,
9732                    id,
9733                };
9734                Ok(api.get_local_modifications().await?.into())
9735            }
9736            DetectedVersion::V2_8_0 => {
9737                let api = crate::v2_8_0::api::processgroups::ProcessGroupsLocalModificationsApi {
9738                    client: self.client,
9739                    id,
9740                };
9741                Ok(api.get_local_modifications().await?.into())
9742            }
9743        }
9744    }
9745    /// Gets all output ports
9746    pub async fn get_output_ports(&self, id: &str) -> Result<types::OutputPortsEntity, NifiError> {
9747        match self.version {
9748            DetectedVersion::V2_6_0 => {
9749                let api = crate::v2_6_0::api::processgroups::ProcessGroupsOutputPortsApi {
9750                    client: self.client,
9751                    id,
9752                };
9753                Ok(api.get_output_ports().await?.into())
9754            }
9755            DetectedVersion::V2_7_2 => {
9756                let api = crate::v2_7_2::api::processgroups::ProcessGroupsOutputPortsApi {
9757                    client: self.client,
9758                    id,
9759                };
9760                Ok(api.get_output_ports().await?.into())
9761            }
9762            DetectedVersion::V2_8_0 => {
9763                let api = crate::v2_8_0::api::processgroups::ProcessGroupsOutputPortsApi {
9764                    client: self.client,
9765                    id,
9766                };
9767                Ok(api.get_output_ports().await?.into())
9768            }
9769        }
9770    }
9771    /// Gets a process group
9772    pub async fn get_process_group(
9773        &self,
9774        id: &str,
9775    ) -> Result<types::ProcessGroupEntity, NifiError> {
9776        match self.version {
9777            DetectedVersion::V2_6_0 => {
9778                let api = crate::v2_6_0::api::processgroups::ProcessGroupsApi {
9779                    client: self.client,
9780                };
9781                Ok(api.get_process_group(id).await?.into())
9782            }
9783            DetectedVersion::V2_7_2 => {
9784                let api = crate::v2_7_2::api::processgroups::ProcessGroupsApi {
9785                    client: self.client,
9786                };
9787                Ok(api.get_process_group(id).await?.into())
9788            }
9789            DetectedVersion::V2_8_0 => {
9790                let api = crate::v2_8_0::api::processgroups::ProcessGroupsApi {
9791                    client: self.client,
9792                };
9793                Ok(api.get_process_group(id).await?.into())
9794            }
9795        }
9796    }
9797    /// Gets all process groups
9798    pub async fn get_process_groups(
9799        &self,
9800        id: &str,
9801    ) -> Result<types::ProcessGroupsEntity, NifiError> {
9802        match self.version {
9803            DetectedVersion::V2_6_0 => {
9804                let api = crate::v2_6_0::api::processgroups::ProcessGroupsProcessGroupsApi {
9805                    client: self.client,
9806                    id,
9807                };
9808                Ok(api.get_process_groups().await?.into())
9809            }
9810            DetectedVersion::V2_7_2 => {
9811                let api = crate::v2_7_2::api::processgroups::ProcessGroupsProcessGroupsApi {
9812                    client: self.client,
9813                    id,
9814                };
9815                Ok(api.get_process_groups().await?.into())
9816            }
9817            DetectedVersion::V2_8_0 => {
9818                let api = crate::v2_8_0::api::processgroups::ProcessGroupsProcessGroupsApi {
9819                    client: self.client,
9820                    id,
9821                };
9822                Ok(api.get_process_groups().await?.into())
9823            }
9824        }
9825    }
9826    /// Gets all processors
9827    pub async fn get_processors(
9828        &self,
9829        id: &str,
9830        include_descendant_groups: Option<bool>,
9831    ) -> Result<types::ProcessorsEntity, NifiError> {
9832        match self.version {
9833            DetectedVersion::V2_6_0 => {
9834                let api = crate::v2_6_0::api::processgroups::ProcessGroupsProcessorsApi {
9835                    client: self.client,
9836                    id,
9837                };
9838                Ok(api.get_processors(include_descendant_groups).await?.into())
9839            }
9840            DetectedVersion::V2_7_2 => {
9841                let api = crate::v2_7_2::api::processgroups::ProcessGroupsProcessorsApi {
9842                    client: self.client,
9843                    id,
9844                };
9845                Ok(api.get_processors(include_descendant_groups).await?.into())
9846            }
9847            DetectedVersion::V2_8_0 => {
9848                let api = crate::v2_8_0::api::processgroups::ProcessGroupsProcessorsApi {
9849                    client: self.client,
9850                    id,
9851                };
9852                Ok(api.get_processors(include_descendant_groups).await?.into())
9853            }
9854        }
9855    }
9856    /// Gets all remote process groups
9857    pub async fn get_remote_process_groups(
9858        &self,
9859        id: &str,
9860    ) -> Result<types::RemoteProcessGroupsEntity, NifiError> {
9861        match self.version {
9862            DetectedVersion::V2_6_0 => {
9863                let api = crate::v2_6_0::api::processgroups::ProcessGroupsRemoteProcessGroupsApi {
9864                    client: self.client,
9865                    id,
9866                };
9867                Ok(api.get_remote_process_groups().await?.into())
9868            }
9869            DetectedVersion::V2_7_2 => {
9870                let api = crate::v2_7_2::api::processgroups::ProcessGroupsRemoteProcessGroupsApi {
9871                    client: self.client,
9872                    id,
9873                };
9874                Ok(api.get_remote_process_groups().await?.into())
9875            }
9876            DetectedVersion::V2_8_0 => {
9877                let api = crate::v2_8_0::api::processgroups::ProcessGroupsRemoteProcessGroupsApi {
9878                    client: self.client,
9879                    id,
9880                };
9881                Ok(api.get_remote_process_groups().await?.into())
9882            }
9883        }
9884    }
9885    /// Returns the Replace Request with the given ID
9886    pub async fn get_replace_process_group_request(
9887        &self,
9888        id: &str,
9889    ) -> Result<types::ProcessGroupReplaceRequestEntity, NifiError> {
9890        match self.version {
9891            DetectedVersion::V2_6_0 => {
9892                let api = crate::v2_6_0::api::processgroups::ProcessGroupsApi {
9893                    client: self.client,
9894                };
9895                Ok(api.get_replace_process_group_request(id).await?.into())
9896            }
9897            DetectedVersion::V2_7_2 => {
9898                let api = crate::v2_7_2::api::processgroups::ProcessGroupsApi {
9899                    client: self.client,
9900                };
9901                Ok(api.get_replace_process_group_request(id).await?.into())
9902            }
9903            DetectedVersion::V2_8_0 => {
9904                let api = crate::v2_8_0::api::processgroups::ProcessGroupsApi {
9905                    client: self.client,
9906                };
9907                Ok(api.get_replace_process_group_request(id).await?.into())
9908            }
9909        }
9910    }
9911    /// Imports a specified process group
9912    pub async fn import_process_group(
9913        &self,
9914        id: &str,
9915        body: &serde_json::Value,
9916    ) -> Result<types::ProcessGroupEntity, NifiError> {
9917        match self.version {
9918            DetectedVersion::V2_6_0 => {
9919                let api = crate::v2_6_0::api::processgroups::ProcessGroupsProcessGroupsApi {
9920                    client: self.client,
9921                    id,
9922                };
9923                Ok(api
9924                    .import_process_group(
9925                        &serde_json::from_value::<crate::v2_6_0::types::ProcessGroupUploadEntity>(
9926                            body.clone(),
9927                        )
9928                        .map_err(|e| NifiError::UnsupportedEndpoint {
9929                            endpoint: format!(
9930                                "{} (body deserialize: {})",
9931                                "import_process_group", e
9932                            ),
9933                            version: "2.6.0".to_string(),
9934                        })?,
9935                    )
9936                    .await?
9937                    .into())
9938            }
9939            DetectedVersion::V2_7_2 => {
9940                let api = crate::v2_7_2::api::processgroups::ProcessGroupsProcessGroupsApi {
9941                    client: self.client,
9942                    id,
9943                };
9944                Ok(api
9945                    .import_process_group(
9946                        &serde_json::from_value::<crate::v2_7_2::types::ProcessGroupUploadEntity>(
9947                            body.clone(),
9948                        )
9949                        .map_err(|e| NifiError::UnsupportedEndpoint {
9950                            endpoint: format!(
9951                                "{} (body deserialize: {})",
9952                                "import_process_group", e
9953                            ),
9954                            version: "2.7.2".to_string(),
9955                        })?,
9956                    )
9957                    .await?
9958                    .into())
9959            }
9960            DetectedVersion::V2_8_0 => {
9961                let api = crate::v2_8_0::api::processgroups::ProcessGroupsProcessGroupsApi {
9962                    client: self.client,
9963                    id,
9964                };
9965                Ok(api
9966                    .import_process_group(
9967                        &serde_json::from_value::<crate::v2_8_0::types::ProcessGroupUploadEntity>(
9968                            body.clone(),
9969                        )
9970                        .map_err(|e| NifiError::UnsupportedEndpoint {
9971                            endpoint: format!(
9972                                "{} (body deserialize: {})",
9973                                "import_process_group", e
9974                            ),
9975                            version: "2.8.0".to_string(),
9976                        })?,
9977                    )
9978                    .await?
9979                    .into())
9980            }
9981        }
9982    }
9983    /// Initiate the Replace Request of a Process Group with the given ID
9984    pub async fn initiate_replace_process_group(
9985        &self,
9986        id: &str,
9987        body: &serde_json::Value,
9988    ) -> Result<types::ProcessGroupReplaceRequestEntity, NifiError> {
9989        match self.version {
9990            DetectedVersion::V2_6_0 => {
9991                let api = crate::v2_6_0::api::processgroups::ProcessGroupsReplaceRequestsApi {
9992                    client: self.client,
9993                    id,
9994                };
9995                Ok(api
9996                    .initiate_replace_process_group(
9997                        &serde_json::from_value::<crate::v2_6_0::types::ProcessGroupImportEntity>(
9998                            body.clone(),
9999                        )
10000                        .map_err(|e| NifiError::UnsupportedEndpoint {
10001                            endpoint: format!(
10002                                "{} (body deserialize: {})",
10003                                "initiate_replace_process_group", e
10004                            ),
10005                            version: "2.6.0".to_string(),
10006                        })?,
10007                    )
10008                    .await?
10009                    .into())
10010            }
10011            DetectedVersion::V2_7_2 => {
10012                let api = crate::v2_7_2::api::processgroups::ProcessGroupsReplaceRequestsApi {
10013                    client: self.client,
10014                    id,
10015                };
10016                Ok(api
10017                    .initiate_replace_process_group(
10018                        &serde_json::from_value::<crate::v2_7_2::types::ProcessGroupImportEntity>(
10019                            body.clone(),
10020                        )
10021                        .map_err(|e| NifiError::UnsupportedEndpoint {
10022                            endpoint: format!(
10023                                "{} (body deserialize: {})",
10024                                "initiate_replace_process_group", e
10025                            ),
10026                            version: "2.7.2".to_string(),
10027                        })?,
10028                    )
10029                    .await?
10030                    .into())
10031            }
10032            DetectedVersion::V2_8_0 => {
10033                let api = crate::v2_8_0::api::processgroups::ProcessGroupsReplaceRequestsApi {
10034                    client: self.client,
10035                    id,
10036                };
10037                Ok(api
10038                    .initiate_replace_process_group(
10039                        &serde_json::from_value::<crate::v2_8_0::types::ProcessGroupImportEntity>(
10040                            body.clone(),
10041                        )
10042                        .map_err(|e| NifiError::UnsupportedEndpoint {
10043                            endpoint: format!(
10044                                "{} (body deserialize: {})",
10045                                "initiate_replace_process_group", e
10046                            ),
10047                            version: "2.8.0".to_string(),
10048                        })?,
10049                    )
10050                    .await?
10051                    .into())
10052            }
10053        }
10054    }
10055    /// Pastes into the specified process group
10056    pub async fn paste(
10057        &self,
10058        id: &str,
10059        body: &serde_json::Value,
10060    ) -> Result<types::PasteResponseEntity, NifiError> {
10061        match self.version {
10062            DetectedVersion::V2_6_0 => {
10063                let api = crate::v2_6_0::api::processgroups::ProcessGroupsPasteApi {
10064                    client: self.client,
10065                    id,
10066                };
10067                Ok(api
10068                    .paste(
10069                        &serde_json::from_value::<crate::v2_6_0::types::PasteRequestEntity>(
10070                            body.clone(),
10071                        )
10072                        .map_err(|e| NifiError::UnsupportedEndpoint {
10073                            endpoint: format!("{} (body deserialize: {})", "paste", e),
10074                            version: "2.6.0".to_string(),
10075                        })?,
10076                    )
10077                    .await?
10078                    .into())
10079            }
10080            DetectedVersion::V2_7_2 => {
10081                let api = crate::v2_7_2::api::processgroups::ProcessGroupsPasteApi {
10082                    client: self.client,
10083                    id,
10084                };
10085                Ok(api
10086                    .paste(
10087                        &serde_json::from_value::<crate::v2_7_2::types::PasteRequestEntity>(
10088                            body.clone(),
10089                        )
10090                        .map_err(|e| NifiError::UnsupportedEndpoint {
10091                            endpoint: format!("{} (body deserialize: {})", "paste", e),
10092                            version: "2.7.2".to_string(),
10093                        })?,
10094                    )
10095                    .await?
10096                    .into())
10097            }
10098            DetectedVersion::V2_8_0 => {
10099                let api = crate::v2_8_0::api::processgroups::ProcessGroupsPasteApi {
10100                    client: self.client,
10101                    id,
10102                };
10103                Ok(api
10104                    .paste(
10105                        &serde_json::from_value::<crate::v2_8_0::types::PasteRequestEntity>(
10106                            body.clone(),
10107                        )
10108                        .map_err(|e| NifiError::UnsupportedEndpoint {
10109                            endpoint: format!("{} (body deserialize: {})", "paste", e),
10110                            version: "2.8.0".to_string(),
10111                        })?,
10112                    )
10113                    .await?
10114                    .into())
10115            }
10116        }
10117    }
10118    /// Cancels and/or removes a request to drop all flowfiles.
10119    pub async fn remove_drop_request_1(
10120        &self,
10121        id: &str,
10122        drop_request_id: &str,
10123    ) -> Result<types::DropRequestDto, NifiError> {
10124        match self.version {
10125            DetectedVersion::V2_6_0 => {
10126                let api = crate::v2_6_0::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
10127                    client: self.client,
10128                    id,
10129                };
10130                Ok(api.remove_drop_request_1(drop_request_id).await?.into())
10131            }
10132            DetectedVersion::V2_7_2 => {
10133                let api = crate::v2_7_2::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
10134                    client: self.client,
10135                    id,
10136                };
10137                Ok(api.remove_drop_request_1(drop_request_id).await?.into())
10138            }
10139            DetectedVersion::V2_8_0 => {
10140                let api = crate::v2_8_0::api::processgroups::ProcessGroupsEmptyAllConnectionsRequestsApi {
10141                    client: self.client,
10142                    id,
10143                };
10144                Ok(api.remove_drop_request_1(drop_request_id).await?.into())
10145            }
10146        }
10147    }
10148    /// Deletes a process group
10149    pub async fn remove_process_group(
10150        &self,
10151        id: &str,
10152        version: Option<&str>,
10153        client_id: Option<&str>,
10154        disconnected_node_acknowledged: Option<bool>,
10155    ) -> Result<types::ProcessGroupEntity, NifiError> {
10156        match self.version {
10157            DetectedVersion::V2_6_0 => {
10158                let api = crate::v2_6_0::api::processgroups::ProcessGroupsApi {
10159                    client: self.client,
10160                };
10161                Ok(api
10162                    .remove_process_group(id, version, client_id, disconnected_node_acknowledged)
10163                    .await?
10164                    .into())
10165            }
10166            DetectedVersion::V2_7_2 => {
10167                let api = crate::v2_7_2::api::processgroups::ProcessGroupsApi {
10168                    client: self.client,
10169                };
10170                Ok(api
10171                    .remove_process_group(id, version, client_id, disconnected_node_acknowledged)
10172                    .await?
10173                    .into())
10174            }
10175            DetectedVersion::V2_8_0 => {
10176                let api = crate::v2_8_0::api::processgroups::ProcessGroupsApi {
10177                    client: self.client,
10178                };
10179                Ok(api
10180                    .remove_process_group(id, version, client_id, disconnected_node_acknowledged)
10181                    .await?
10182                    .into())
10183            }
10184        }
10185    }
10186    /// Replace Process Group contents with the given ID with the specified Process Group contents
10187    pub async fn replace_process_group(
10188        &self,
10189        id: &str,
10190        body: &serde_json::Value,
10191    ) -> Result<types::ProcessGroupImportEntity, NifiError> {
10192        match self.version {
10193            DetectedVersion::V2_6_0 => {
10194                let api = crate::v2_6_0::api::processgroups::ProcessGroupsFlowContentsApi {
10195                    client: self.client,
10196                    id,
10197                };
10198                Ok(api
10199                    .replace_process_group(
10200                        &serde_json::from_value::<crate::v2_6_0::types::ProcessGroupImportEntity>(
10201                            body.clone(),
10202                        )
10203                        .map_err(|e| NifiError::UnsupportedEndpoint {
10204                            endpoint: format!(
10205                                "{} (body deserialize: {})",
10206                                "replace_process_group", e
10207                            ),
10208                            version: "2.6.0".to_string(),
10209                        })?,
10210                    )
10211                    .await?
10212                    .into())
10213            }
10214            DetectedVersion::V2_7_2 => {
10215                let api = crate::v2_7_2::api::processgroups::ProcessGroupsFlowContentsApi {
10216                    client: self.client,
10217                    id,
10218                };
10219                Ok(api
10220                    .replace_process_group(
10221                        &serde_json::from_value::<crate::v2_7_2::types::ProcessGroupImportEntity>(
10222                            body.clone(),
10223                        )
10224                        .map_err(|e| NifiError::UnsupportedEndpoint {
10225                            endpoint: format!(
10226                                "{} (body deserialize: {})",
10227                                "replace_process_group", e
10228                            ),
10229                            version: "2.7.2".to_string(),
10230                        })?,
10231                    )
10232                    .await?
10233                    .into())
10234            }
10235            DetectedVersion::V2_8_0 => {
10236                let api = crate::v2_8_0::api::processgroups::ProcessGroupsFlowContentsApi {
10237                    client: self.client,
10238                    id,
10239                };
10240                Ok(api
10241                    .replace_process_group(
10242                        &serde_json::from_value::<crate::v2_8_0::types::ProcessGroupImportEntity>(
10243                            body.clone(),
10244                        )
10245                        .map_err(|e| NifiError::UnsupportedEndpoint {
10246                            endpoint: format!(
10247                                "{} (body deserialize: {})",
10248                                "replace_process_group", e
10249                            ),
10250                            version: "2.8.0".to_string(),
10251                        })?,
10252                    )
10253                    .await?
10254                    .into())
10255            }
10256        }
10257    }
10258    /// Updates a process group
10259    pub async fn update_process_group(
10260        &self,
10261        id: &str,
10262        body: &serde_json::Value,
10263    ) -> Result<types::ProcessGroupEntity, NifiError> {
10264        match self.version {
10265            DetectedVersion::V2_6_0 => {
10266                let api = crate::v2_6_0::api::processgroups::ProcessGroupsApi {
10267                    client: self.client,
10268                };
10269                Ok(api
10270                    .update_process_group(
10271                        id,
10272                        &serde_json::from_value::<crate::v2_6_0::types::ProcessGroupEntity>(
10273                            body.clone(),
10274                        )
10275                        .map_err(|e| NifiError::UnsupportedEndpoint {
10276                            endpoint: format!(
10277                                "{} (body deserialize: {})",
10278                                "update_process_group", e
10279                            ),
10280                            version: "2.6.0".to_string(),
10281                        })?,
10282                    )
10283                    .await?
10284                    .into())
10285            }
10286            DetectedVersion::V2_7_2 => {
10287                let api = crate::v2_7_2::api::processgroups::ProcessGroupsApi {
10288                    client: self.client,
10289                };
10290                Ok(api
10291                    .update_process_group(
10292                        id,
10293                        &serde_json::from_value::<crate::v2_7_2::types::ProcessGroupEntity>(
10294                            body.clone(),
10295                        )
10296                        .map_err(|e| NifiError::UnsupportedEndpoint {
10297                            endpoint: format!(
10298                                "{} (body deserialize: {})",
10299                                "update_process_group", e
10300                            ),
10301                            version: "2.7.2".to_string(),
10302                        })?,
10303                    )
10304                    .await?
10305                    .into())
10306            }
10307            DetectedVersion::V2_8_0 => {
10308                let api = crate::v2_8_0::api::processgroups::ProcessGroupsApi {
10309                    client: self.client,
10310                };
10311                Ok(api
10312                    .update_process_group(
10313                        id,
10314                        &serde_json::from_value::<crate::v2_8_0::types::ProcessGroupEntity>(
10315                            body.clone(),
10316                        )
10317                        .map_err(|e| NifiError::UnsupportedEndpoint {
10318                            endpoint: format!(
10319                                "{} (body deserialize: {})",
10320                                "update_process_group", e
10321                            ),
10322                            version: "2.8.0".to_string(),
10323                        })?,
10324                    )
10325                    .await?
10326                    .into())
10327            }
10328        }
10329    }
10330    /// Uploads a versioned flow definition and creates a process group
10331    pub async fn upload_process_group(
10332        &self,
10333        id: &str,
10334    ) -> Result<types::ProcessGroupEntity, NifiError> {
10335        match self.version {
10336            DetectedVersion::V2_6_0 => {
10337                let api = crate::v2_6_0::api::processgroups::ProcessGroupsProcessGroupsApi {
10338                    client: self.client,
10339                    id,
10340                };
10341                Ok(api.upload_process_group().await?.into())
10342            }
10343            DetectedVersion::V2_7_2 => {
10344                let api = crate::v2_7_2::api::processgroups::ProcessGroupsProcessGroupsApi {
10345                    client: self.client,
10346                    id,
10347                };
10348                Ok(api.upload_process_group().await?.into())
10349            }
10350            DetectedVersion::V2_8_0 => {
10351                let api = crate::v2_8_0::api::processgroups::ProcessGroupsProcessGroupsApi {
10352                    client: self.client,
10353                    id,
10354                };
10355                Ok(api.upload_process_group().await?.into())
10356            }
10357        }
10358    }
10359}
10360/// Dynamic dispatch wrapper for the Processors API.
10361pub struct DynamicProcessorsApi<'a> {
10362    client: &'a NifiClient,
10363    version: DetectedVersion,
10364}
10365#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
10366impl<'a> DynamicProcessorsApi<'a> {
10367    /// Performs analysis of the component's configuration, providing information about which attributes are referenced.
10368    pub async fn analyze_configuration_2(
10369        &self,
10370        id: &str,
10371        body: &serde_json::Value,
10372    ) -> Result<types::ConfigurationAnalysisDto, NifiError> {
10373        match self.version {
10374            DetectedVersion::V2_6_0 => {
10375                let api = crate::v2_6_0::api::processors::ProcessorsConfigApi {
10376                    client: self.client,
10377                    id,
10378                };
10379                Ok(
10380                    api
10381                        .analyze_configuration_2(
10382                            &serde_json::from_value::<
10383                                crate::v2_6_0::types::ConfigurationAnalysisEntity,
10384                            >(body.clone())
10385                            .map_err(|e| NifiError::UnsupportedEndpoint {
10386                                endpoint: format!(
10387                                    "{} (body deserialize: {})",
10388                                    "analyze_configuration_2", e
10389                                ),
10390                                version: "2.6.0".to_string(),
10391                            })?,
10392                        )
10393                        .await?
10394                        .into(),
10395                )
10396            }
10397            DetectedVersion::V2_7_2 => {
10398                let api = crate::v2_7_2::api::processors::ProcessorsConfigApi {
10399                    client: self.client,
10400                    id,
10401                };
10402                Ok(
10403                    api
10404                        .analyze_configuration_2(
10405                            &serde_json::from_value::<
10406                                crate::v2_7_2::types::ConfigurationAnalysisEntity,
10407                            >(body.clone())
10408                            .map_err(|e| NifiError::UnsupportedEndpoint {
10409                                endpoint: format!(
10410                                    "{} (body deserialize: {})",
10411                                    "analyze_configuration_2", e
10412                                ),
10413                                version: "2.7.2".to_string(),
10414                            })?,
10415                        )
10416                        .await?
10417                        .into(),
10418                )
10419            }
10420            DetectedVersion::V2_8_0 => {
10421                let api = crate::v2_8_0::api::processors::ProcessorsConfigApi {
10422                    client: self.client,
10423                    id,
10424                };
10425                Ok(
10426                    api
10427                        .analyze_configuration_2(
10428                            &serde_json::from_value::<
10429                                crate::v2_8_0::types::ConfigurationAnalysisEntity,
10430                            >(body.clone())
10431                            .map_err(|e| NifiError::UnsupportedEndpoint {
10432                                endpoint: format!(
10433                                    "{} (body deserialize: {})",
10434                                    "analyze_configuration_2", e
10435                                ),
10436                                version: "2.8.0".to_string(),
10437                            })?,
10438                        )
10439                        .await?
10440                        .into(),
10441                )
10442            }
10443        }
10444    }
10445    /// Clears bulletins for a processor
10446    pub async fn clear_bulletins_5(
10447        &self,
10448        id: &str,
10449        body: &serde_json::Value,
10450    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
10451        match self.version {
10452            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
10453                endpoint: "clear_bulletins_5".to_string(),
10454                version: "2.6.0".to_string(),
10455            }),
10456            DetectedVersion::V2_7_2 => {
10457                let api = crate::v2_7_2::api::processors::ProcessorsBulletinsApi {
10458                    client: self.client,
10459                    id,
10460                };
10461                Ok(
10462                    api
10463                        .clear_bulletins_5(
10464                            &serde_json::from_value::<
10465                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
10466                            >(body.clone())
10467                            .map_err(|e| NifiError::UnsupportedEndpoint {
10468                                endpoint: format!(
10469                                    "{} (body deserialize: {})",
10470                                    "clear_bulletins_5", e
10471                                ),
10472                                version: "2.7.2".to_string(),
10473                            })?,
10474                        )
10475                        .await?
10476                        .into(),
10477                )
10478            }
10479            DetectedVersion::V2_8_0 => {
10480                let api = crate::v2_8_0::api::processors::ProcessorsBulletinsApi {
10481                    client: self.client,
10482                    id,
10483                };
10484                Ok(
10485                    api
10486                        .clear_bulletins_5(
10487                            &serde_json::from_value::<
10488                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
10489                            >(body.clone())
10490                            .map_err(|e| NifiError::UnsupportedEndpoint {
10491                                endpoint: format!(
10492                                    "{} (body deserialize: {})",
10493                                    "clear_bulletins_5", e
10494                                ),
10495                                version: "2.8.0".to_string(),
10496                            })?,
10497                        )
10498                        .await?
10499                        .into(),
10500                )
10501            }
10502        }
10503    }
10504    /// Clears the state for a processor
10505    pub async fn clear_state_3(
10506        &self,
10507        id: &str,
10508        body: &serde_json::Value,
10509    ) -> Result<types::ComponentStateDto, NifiError> {
10510        match self.version {
10511            DetectedVersion::V2_6_0 => {
10512                let api = crate::v2_6_0::api::processors::ProcessorsStateApi {
10513                    client: self.client,
10514                    id,
10515                };
10516                Ok(api
10517                    .clear_state_3(
10518                        &serde_json::from_value::<crate::v2_6_0::types::ComponentStateEntity>(
10519                            body.clone(),
10520                        )
10521                        .map_err(|e| NifiError::UnsupportedEndpoint {
10522                            endpoint: format!("{} (body deserialize: {})", "clear_state_3", e),
10523                            version: "2.6.0".to_string(),
10524                        })?,
10525                    )
10526                    .await?
10527                    .into())
10528            }
10529            DetectedVersion::V2_7_2 => {
10530                let api = crate::v2_7_2::api::processors::ProcessorsStateApi {
10531                    client: self.client,
10532                    id,
10533                };
10534                Ok(api
10535                    .clear_state_3(
10536                        &serde_json::from_value::<crate::v2_7_2::types::ComponentStateEntity>(
10537                            body.clone(),
10538                        )
10539                        .map_err(|e| NifiError::UnsupportedEndpoint {
10540                            endpoint: format!("{} (body deserialize: {})", "clear_state_3", e),
10541                            version: "2.7.2".to_string(),
10542                        })?,
10543                    )
10544                    .await?
10545                    .into())
10546            }
10547            DetectedVersion::V2_8_0 => {
10548                let api = crate::v2_8_0::api::processors::ProcessorsStateApi {
10549                    client: self.client,
10550                    id,
10551                };
10552                Ok(api
10553                    .clear_state_3(
10554                        &serde_json::from_value::<crate::v2_8_0::types::ComponentStateEntity>(
10555                            body.clone(),
10556                        )
10557                        .map_err(|e| NifiError::UnsupportedEndpoint {
10558                            endpoint: format!("{} (body deserialize: {})", "clear_state_3", e),
10559                            version: "2.8.0".to_string(),
10560                        })?,
10561                    )
10562                    .await?
10563                    .into())
10564            }
10565        }
10566    }
10567    /// Deletes a processor
10568    pub async fn delete_processor(
10569        &self,
10570        id: &str,
10571        version: Option<&str>,
10572        client_id: Option<&str>,
10573        disconnected_node_acknowledged: Option<bool>,
10574    ) -> Result<types::ProcessorEntity, NifiError> {
10575        match self.version {
10576            DetectedVersion::V2_6_0 => {
10577                let api = crate::v2_6_0::api::processors::ProcessorsApi {
10578                    client: self.client,
10579                };
10580                Ok(api
10581                    .delete_processor(id, version, client_id, disconnected_node_acknowledged)
10582                    .await?
10583                    .into())
10584            }
10585            DetectedVersion::V2_7_2 => {
10586                let api = crate::v2_7_2::api::processors::ProcessorsApi {
10587                    client: self.client,
10588                };
10589                Ok(api
10590                    .delete_processor(id, version, client_id, disconnected_node_acknowledged)
10591                    .await?
10592                    .into())
10593            }
10594            DetectedVersion::V2_8_0 => {
10595                let api = crate::v2_8_0::api::processors::ProcessorsApi {
10596                    client: self.client,
10597                };
10598                Ok(api
10599                    .delete_processor(id, version, client_id, disconnected_node_acknowledged)
10600                    .await?
10601                    .into())
10602            }
10603        }
10604    }
10605    /// Deletes the Verification Request with the given ID
10606    pub async fn delete_verification_request_2(
10607        &self,
10608        id: &str,
10609        request_id: &str,
10610    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
10611        match self.version {
10612            DetectedVersion::V2_6_0 => {
10613                let api = crate::v2_6_0::api::processors::ProcessorsConfigApi {
10614                    client: self.client,
10615                    id,
10616                };
10617                Ok(api.delete_verification_request_2(request_id).await?.into())
10618            }
10619            DetectedVersion::V2_7_2 => {
10620                let api = crate::v2_7_2::api::processors::ProcessorsConfigApi {
10621                    client: self.client,
10622                    id,
10623                };
10624                Ok(api.delete_verification_request_2(request_id).await?.into())
10625            }
10626            DetectedVersion::V2_8_0 => {
10627                let api = crate::v2_8_0::api::processors::ProcessorsConfigApi {
10628                    client: self.client,
10629                    id,
10630                };
10631                Ok(api.delete_verification_request_2(request_id).await?.into())
10632            }
10633        }
10634    }
10635    /// Gets a processor
10636    pub async fn get_processor(&self, id: &str) -> Result<types::ProcessorEntity, NifiError> {
10637        match self.version {
10638            DetectedVersion::V2_6_0 => {
10639                let api = crate::v2_6_0::api::processors::ProcessorsApi {
10640                    client: self.client,
10641                };
10642                Ok(api.get_processor(id).await?.into())
10643            }
10644            DetectedVersion::V2_7_2 => {
10645                let api = crate::v2_7_2::api::processors::ProcessorsApi {
10646                    client: self.client,
10647                };
10648                Ok(api.get_processor(id).await?.into())
10649            }
10650            DetectedVersion::V2_8_0 => {
10651                let api = crate::v2_8_0::api::processors::ProcessorsApi {
10652                    client: self.client,
10653                };
10654                Ok(api.get_processor(id).await?.into())
10655            }
10656        }
10657    }
10658    /// Gets diagnostics information about a processor
10659    pub async fn get_processor_diagnostics(
10660        &self,
10661        id: &str,
10662    ) -> Result<types::ProcessorEntity, NifiError> {
10663        match self.version {
10664            DetectedVersion::V2_6_0 => {
10665                let api = crate::v2_6_0::api::processors::ProcessorsDiagnosticsApi {
10666                    client: self.client,
10667                    id,
10668                };
10669                Ok(api.get_processor_diagnostics().await?.into())
10670            }
10671            DetectedVersion::V2_7_2 => {
10672                let api = crate::v2_7_2::api::processors::ProcessorsDiagnosticsApi {
10673                    client: self.client,
10674                    id,
10675                };
10676                Ok(api.get_processor_diagnostics().await?.into())
10677            }
10678            DetectedVersion::V2_8_0 => {
10679                let api = crate::v2_8_0::api::processors::ProcessorsDiagnosticsApi {
10680                    client: self.client,
10681                    id,
10682                };
10683                Ok(api.get_processor_diagnostics().await?.into())
10684            }
10685        }
10686    }
10687    /// Submits a query to retrieve the run status details of all processors that are in the given list of Processor IDs
10688    pub async fn get_processor_run_status_details(
10689        &self,
10690        body: &serde_json::Value,
10691    ) -> Result<types::ProcessorsRunStatusDetailsEntity, NifiError> {
10692        match self.version {
10693            DetectedVersion::V2_6_0 => {
10694                let api = crate::v2_6_0::api::processors::ProcessorsApi {
10695                    client: self.client,
10696                };
10697                Ok(api
10698                    .get_processor_run_status_details(
10699                        &serde_json::from_value::<
10700                            crate::v2_6_0::types::RunStatusDetailsRequestEntity,
10701                        >(body.clone())
10702                        .map_err(|e| NifiError::UnsupportedEndpoint {
10703                            endpoint: format!(
10704                                "{} (body deserialize: {})",
10705                                "get_processor_run_status_details", e
10706                            ),
10707                            version: "2.6.0".to_string(),
10708                        })?,
10709                    )
10710                    .await?
10711                    .into())
10712            }
10713            DetectedVersion::V2_7_2 => {
10714                let api = crate::v2_7_2::api::processors::ProcessorsApi {
10715                    client: self.client,
10716                };
10717                Ok(api
10718                    .get_processor_run_status_details(
10719                        &serde_json::from_value::<
10720                            crate::v2_7_2::types::RunStatusDetailsRequestEntity,
10721                        >(body.clone())
10722                        .map_err(|e| NifiError::UnsupportedEndpoint {
10723                            endpoint: format!(
10724                                "{} (body deserialize: {})",
10725                                "get_processor_run_status_details", e
10726                            ),
10727                            version: "2.7.2".to_string(),
10728                        })?,
10729                    )
10730                    .await?
10731                    .into())
10732            }
10733            DetectedVersion::V2_8_0 => {
10734                let api = crate::v2_8_0::api::processors::ProcessorsApi {
10735                    client: self.client,
10736                };
10737                Ok(api
10738                    .get_processor_run_status_details(
10739                        &serde_json::from_value::<
10740                            crate::v2_8_0::types::RunStatusDetailsRequestEntity,
10741                        >(body.clone())
10742                        .map_err(|e| NifiError::UnsupportedEndpoint {
10743                            endpoint: format!(
10744                                "{} (body deserialize: {})",
10745                                "get_processor_run_status_details", e
10746                            ),
10747                            version: "2.8.0".to_string(),
10748                        })?,
10749                    )
10750                    .await?
10751                    .into())
10752            }
10753        }
10754    }
10755    /// Gets the descriptor for a processor property
10756    pub async fn get_property_descriptor_3(
10757        &self,
10758        id: &str,
10759        client_id: Option<&str>,
10760        property_name: &str,
10761        sensitive: Option<bool>,
10762    ) -> Result<types::PropertyDescriptorDto, NifiError> {
10763        match self.version {
10764            DetectedVersion::V2_6_0 => {
10765                let api = crate::v2_6_0::api::processors::ProcessorsDescriptorsApi {
10766                    client: self.client,
10767                    id,
10768                };
10769                Ok(api
10770                    .get_property_descriptor_3(client_id, property_name, sensitive)
10771                    .await?
10772                    .into())
10773            }
10774            DetectedVersion::V2_7_2 => {
10775                let api = crate::v2_7_2::api::processors::ProcessorsDescriptorsApi {
10776                    client: self.client,
10777                    id,
10778                };
10779                Ok(api
10780                    .get_property_descriptor_3(client_id, property_name, sensitive)
10781                    .await?
10782                    .into())
10783            }
10784            DetectedVersion::V2_8_0 => {
10785                let api = crate::v2_8_0::api::processors::ProcessorsDescriptorsApi {
10786                    client: self.client,
10787                    id,
10788                };
10789                Ok(api
10790                    .get_property_descriptor_3(client_id, property_name, sensitive)
10791                    .await?
10792                    .into())
10793            }
10794        }
10795    }
10796    /// Gets the state for a processor
10797    pub async fn get_state_2(&self, id: &str) -> Result<types::ComponentStateDto, NifiError> {
10798        match self.version {
10799            DetectedVersion::V2_6_0 => {
10800                let api = crate::v2_6_0::api::processors::ProcessorsStateApi {
10801                    client: self.client,
10802                    id,
10803                };
10804                Ok(api.get_state_2().await?.into())
10805            }
10806            DetectedVersion::V2_7_2 => {
10807                let api = crate::v2_7_2::api::processors::ProcessorsStateApi {
10808                    client: self.client,
10809                    id,
10810                };
10811                Ok(api.get_state_2().await?.into())
10812            }
10813            DetectedVersion::V2_8_0 => {
10814                let api = crate::v2_8_0::api::processors::ProcessorsStateApi {
10815                    client: self.client,
10816                    id,
10817                };
10818                Ok(api.get_state_2().await?.into())
10819            }
10820        }
10821    }
10822    /// Returns the Verification Request with the given ID
10823    pub async fn get_verification_request_2(
10824        &self,
10825        id: &str,
10826        request_id: &str,
10827    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
10828        match self.version {
10829            DetectedVersion::V2_6_0 => {
10830                let api = crate::v2_6_0::api::processors::ProcessorsConfigApi {
10831                    client: self.client,
10832                    id,
10833                };
10834                Ok(api.get_verification_request_2(request_id).await?.into())
10835            }
10836            DetectedVersion::V2_7_2 => {
10837                let api = crate::v2_7_2::api::processors::ProcessorsConfigApi {
10838                    client: self.client,
10839                    id,
10840                };
10841                Ok(api.get_verification_request_2(request_id).await?.into())
10842            }
10843            DetectedVersion::V2_8_0 => {
10844                let api = crate::v2_8_0::api::processors::ProcessorsConfigApi {
10845                    client: self.client,
10846                    id,
10847                };
10848                Ok(api.get_verification_request_2(request_id).await?.into())
10849            }
10850        }
10851    }
10852    /// Performs verification of the Processor's configuration
10853    pub async fn submit_processor_verification_request(
10854        &self,
10855        id: &str,
10856        body: &serde_json::Value,
10857    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
10858        match self.version {
10859            DetectedVersion::V2_6_0 => {
10860                let api = crate::v2_6_0::api::processors::ProcessorsConfigApi {
10861                    client: self.client,
10862                    id,
10863                };
10864                Ok(api
10865                    .submit_processor_verification_request(
10866                        &serde_json::from_value::<crate::v2_6_0::types::VerifyConfigRequestEntity>(
10867                            body.clone(),
10868                        )
10869                        .map_err(|e| NifiError::UnsupportedEndpoint {
10870                            endpoint: format!(
10871                                "{} (body deserialize: {})",
10872                                "submit_processor_verification_request", e
10873                            ),
10874                            version: "2.6.0".to_string(),
10875                        })?,
10876                    )
10877                    .await?
10878                    .into())
10879            }
10880            DetectedVersion::V2_7_2 => {
10881                let api = crate::v2_7_2::api::processors::ProcessorsConfigApi {
10882                    client: self.client,
10883                    id,
10884                };
10885                Ok(api
10886                    .submit_processor_verification_request(
10887                        &serde_json::from_value::<crate::v2_7_2::types::VerifyConfigRequestEntity>(
10888                            body.clone(),
10889                        )
10890                        .map_err(|e| NifiError::UnsupportedEndpoint {
10891                            endpoint: format!(
10892                                "{} (body deserialize: {})",
10893                                "submit_processor_verification_request", e
10894                            ),
10895                            version: "2.7.2".to_string(),
10896                        })?,
10897                    )
10898                    .await?
10899                    .into())
10900            }
10901            DetectedVersion::V2_8_0 => {
10902                let api = crate::v2_8_0::api::processors::ProcessorsConfigApi {
10903                    client: self.client,
10904                    id,
10905                };
10906                Ok(api
10907                    .submit_processor_verification_request(
10908                        &serde_json::from_value::<crate::v2_8_0::types::VerifyConfigRequestEntity>(
10909                            body.clone(),
10910                        )
10911                        .map_err(|e| NifiError::UnsupportedEndpoint {
10912                            endpoint: format!(
10913                                "{} (body deserialize: {})",
10914                                "submit_processor_verification_request", e
10915                            ),
10916                            version: "2.8.0".to_string(),
10917                        })?,
10918                    )
10919                    .await?
10920                    .into())
10921            }
10922        }
10923    }
10924    /// Terminates a processor, essentially "deleting" its threads and any active tasks
10925    pub async fn terminate_processor(&self, id: &str) -> Result<types::ProcessorEntity, NifiError> {
10926        match self.version {
10927            DetectedVersion::V2_6_0 => {
10928                let api = crate::v2_6_0::api::processors::ProcessorsThreadsApi {
10929                    client: self.client,
10930                    id,
10931                };
10932                Ok(api.terminate_processor().await?.into())
10933            }
10934            DetectedVersion::V2_7_2 => {
10935                let api = crate::v2_7_2::api::processors::ProcessorsThreadsApi {
10936                    client: self.client,
10937                    id,
10938                };
10939                Ok(api.terminate_processor().await?.into())
10940            }
10941            DetectedVersion::V2_8_0 => {
10942                let api = crate::v2_8_0::api::processors::ProcessorsThreadsApi {
10943                    client: self.client,
10944                    id,
10945                };
10946                Ok(api.terminate_processor().await?.into())
10947            }
10948        }
10949    }
10950    /// Updates a processor
10951    pub async fn update_processor(
10952        &self,
10953        id: &str,
10954        body: &serde_json::Value,
10955    ) -> Result<types::ProcessorEntity, NifiError> {
10956        match self.version {
10957            DetectedVersion::V2_6_0 => {
10958                let api = crate::v2_6_0::api::processors::ProcessorsApi {
10959                    client: self.client,
10960                };
10961                Ok(api
10962                    .update_processor(
10963                        id,
10964                        &serde_json::from_value::<crate::v2_6_0::types::ProcessorEntity>(
10965                            body.clone(),
10966                        )
10967                        .map_err(|e| NifiError::UnsupportedEndpoint {
10968                            endpoint: format!("{} (body deserialize: {})", "update_processor", e),
10969                            version: "2.6.0".to_string(),
10970                        })?,
10971                    )
10972                    .await?
10973                    .into())
10974            }
10975            DetectedVersion::V2_7_2 => {
10976                let api = crate::v2_7_2::api::processors::ProcessorsApi {
10977                    client: self.client,
10978                };
10979                Ok(api
10980                    .update_processor(
10981                        id,
10982                        &serde_json::from_value::<crate::v2_7_2::types::ProcessorEntity>(
10983                            body.clone(),
10984                        )
10985                        .map_err(|e| NifiError::UnsupportedEndpoint {
10986                            endpoint: format!("{} (body deserialize: {})", "update_processor", e),
10987                            version: "2.7.2".to_string(),
10988                        })?,
10989                    )
10990                    .await?
10991                    .into())
10992            }
10993            DetectedVersion::V2_8_0 => {
10994                let api = crate::v2_8_0::api::processors::ProcessorsApi {
10995                    client: self.client,
10996                };
10997                Ok(api
10998                    .update_processor(
10999                        id,
11000                        &serde_json::from_value::<crate::v2_8_0::types::ProcessorEntity>(
11001                            body.clone(),
11002                        )
11003                        .map_err(|e| NifiError::UnsupportedEndpoint {
11004                            endpoint: format!("{} (body deserialize: {})", "update_processor", e),
11005                            version: "2.8.0".to_string(),
11006                        })?,
11007                    )
11008                    .await?
11009                    .into())
11010            }
11011        }
11012    }
11013    /// Updates run status of a processor
11014    pub async fn update_run_status_4(
11015        &self,
11016        id: &str,
11017        body: &serde_json::Value,
11018    ) -> Result<types::ProcessorEntity, NifiError> {
11019        match self.version {
11020            DetectedVersion::V2_6_0 => {
11021                let api = crate::v2_6_0::api::processors::ProcessorsRunStatusApi {
11022                    client: self.client,
11023                    id,
11024                };
11025                Ok(api
11026                    .update_run_status_4(
11027                        &serde_json::from_value::<crate::v2_6_0::types::ProcessorRunStatusEntity>(
11028                            body.clone(),
11029                        )
11030                        .map_err(|e| NifiError::UnsupportedEndpoint {
11031                            endpoint: format!(
11032                                "{} (body deserialize: {})",
11033                                "update_run_status_4", e
11034                            ),
11035                            version: "2.6.0".to_string(),
11036                        })?,
11037                    )
11038                    .await?
11039                    .into())
11040            }
11041            DetectedVersion::V2_7_2 => {
11042                let api = crate::v2_7_2::api::processors::ProcessorsRunStatusApi {
11043                    client: self.client,
11044                    id,
11045                };
11046                Ok(api
11047                    .update_run_status_4(
11048                        &serde_json::from_value::<crate::v2_7_2::types::ProcessorRunStatusEntity>(
11049                            body.clone(),
11050                        )
11051                        .map_err(|e| NifiError::UnsupportedEndpoint {
11052                            endpoint: format!(
11053                                "{} (body deserialize: {})",
11054                                "update_run_status_4", e
11055                            ),
11056                            version: "2.7.2".to_string(),
11057                        })?,
11058                    )
11059                    .await?
11060                    .into())
11061            }
11062            DetectedVersion::V2_8_0 => {
11063                let api = crate::v2_8_0::api::processors::ProcessorsRunStatusApi {
11064                    client: self.client,
11065                    id,
11066                };
11067                Ok(api
11068                    .update_run_status_4(
11069                        &serde_json::from_value::<crate::v2_8_0::types::ProcessorRunStatusEntity>(
11070                            body.clone(),
11071                        )
11072                        .map_err(|e| NifiError::UnsupportedEndpoint {
11073                            endpoint: format!(
11074                                "{} (body deserialize: {})",
11075                                "update_run_status_4", e
11076                            ),
11077                            version: "2.8.0".to_string(),
11078                        })?,
11079                    )
11080                    .await?
11081                    .into())
11082            }
11083        }
11084    }
11085}
11086/// Dynamic dispatch wrapper for the Provenance API.
11087pub struct DynamicProvenanceApi<'a> {
11088    client: &'a NifiClient,
11089    version: DetectedVersion,
11090}
11091#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
11092impl<'a> DynamicProvenanceApi<'a> {
11093    /// Deletes a lineage query
11094    pub async fn delete_lineage(
11095        &self,
11096        id: &str,
11097        cluster_node_id: Option<&str>,
11098    ) -> Result<types::LineageDto, NifiError> {
11099        match self.version {
11100            DetectedVersion::V2_6_0 => {
11101                let api = crate::v2_6_0::api::provenance::ProvenanceApi {
11102                    client: self.client,
11103                };
11104                Ok(api.delete_lineage(id, cluster_node_id).await?.into())
11105            }
11106            DetectedVersion::V2_7_2 => {
11107                let api = crate::v2_7_2::api::provenance::ProvenanceApi {
11108                    client: self.client,
11109                };
11110                Ok(api.delete_lineage(id, cluster_node_id).await?.into())
11111            }
11112            DetectedVersion::V2_8_0 => {
11113                let api = crate::v2_8_0::api::provenance::ProvenanceApi {
11114                    client: self.client,
11115                };
11116                Ok(api.delete_lineage(id, cluster_node_id).await?.into())
11117            }
11118        }
11119    }
11120    /// Deletes a provenance query
11121    pub async fn delete_provenance(
11122        &self,
11123        id: &str,
11124        cluster_node_id: Option<&str>,
11125    ) -> Result<types::ProvenanceDto, NifiError> {
11126        match self.version {
11127            DetectedVersion::V2_6_0 => {
11128                let api = crate::v2_6_0::api::provenance::ProvenanceApi {
11129                    client: self.client,
11130                };
11131                Ok(api.delete_provenance(id, cluster_node_id).await?.into())
11132            }
11133            DetectedVersion::V2_7_2 => {
11134                let api = crate::v2_7_2::api::provenance::ProvenanceApi {
11135                    client: self.client,
11136                };
11137                Ok(api.delete_provenance(id, cluster_node_id).await?.into())
11138            }
11139            DetectedVersion::V2_8_0 => {
11140                let api = crate::v2_8_0::api::provenance::ProvenanceApi {
11141                    client: self.client,
11142                };
11143                Ok(api.delete_provenance(id, cluster_node_id).await?.into())
11144            }
11145        }
11146    }
11147    /// Gets a lineage query
11148    pub async fn get_lineage(
11149        &self,
11150        id: &str,
11151        cluster_node_id: Option<&str>,
11152    ) -> Result<types::LineageDto, NifiError> {
11153        match self.version {
11154            DetectedVersion::V2_6_0 => {
11155                let api = crate::v2_6_0::api::provenance::ProvenanceApi {
11156                    client: self.client,
11157                };
11158                Ok(api.get_lineage(id, cluster_node_id).await?.into())
11159            }
11160            DetectedVersion::V2_7_2 => {
11161                let api = crate::v2_7_2::api::provenance::ProvenanceApi {
11162                    client: self.client,
11163                };
11164                Ok(api.get_lineage(id, cluster_node_id).await?.into())
11165            }
11166            DetectedVersion::V2_8_0 => {
11167                let api = crate::v2_8_0::api::provenance::ProvenanceApi {
11168                    client: self.client,
11169                };
11170                Ok(api.get_lineage(id, cluster_node_id).await?.into())
11171            }
11172        }
11173    }
11174    /// Gets a provenance query
11175    pub async fn get_provenance(
11176        &self,
11177        id: &str,
11178        cluster_node_id: Option<&str>,
11179        summarize: Option<bool>,
11180        incremental_results: Option<bool>,
11181    ) -> Result<types::ProvenanceDto, NifiError> {
11182        match self.version {
11183            DetectedVersion::V2_6_0 => {
11184                let api = crate::v2_6_0::api::provenance::ProvenanceApi {
11185                    client: self.client,
11186                };
11187                Ok(api
11188                    .get_provenance(id, cluster_node_id, summarize, incremental_results)
11189                    .await?
11190                    .into())
11191            }
11192            DetectedVersion::V2_7_2 => {
11193                let api = crate::v2_7_2::api::provenance::ProvenanceApi {
11194                    client: self.client,
11195                };
11196                Ok(api
11197                    .get_provenance(id, cluster_node_id, summarize, incremental_results)
11198                    .await?
11199                    .into())
11200            }
11201            DetectedVersion::V2_8_0 => {
11202                let api = crate::v2_8_0::api::provenance::ProvenanceApi {
11203                    client: self.client,
11204                };
11205                Ok(api
11206                    .get_provenance(id, cluster_node_id, summarize, incremental_results)
11207                    .await?
11208                    .into())
11209            }
11210        }
11211    }
11212    /// Gets the searchable attributes for provenance events
11213    pub async fn get_search_options(&self) -> Result<types::ProvenanceOptionsDto, NifiError> {
11214        match self.version {
11215            DetectedVersion::V2_6_0 => {
11216                let api = crate::v2_6_0::api::provenance::ProvenanceApi {
11217                    client: self.client,
11218                };
11219                Ok(api.get_search_options().await?.into())
11220            }
11221            DetectedVersion::V2_7_2 => {
11222                let api = crate::v2_7_2::api::provenance::ProvenanceApi {
11223                    client: self.client,
11224                };
11225                Ok(api.get_search_options().await?.into())
11226            }
11227            DetectedVersion::V2_8_0 => {
11228                let api = crate::v2_8_0::api::provenance::ProvenanceApi {
11229                    client: self.client,
11230                };
11231                Ok(api.get_search_options().await?.into())
11232            }
11233        }
11234    }
11235    /// Submits a lineage query
11236    pub async fn submit_lineage_request(
11237        &self,
11238        body: &serde_json::Value,
11239    ) -> Result<types::LineageDto, NifiError> {
11240        match self.version {
11241            DetectedVersion::V2_6_0 => {
11242                let api = crate::v2_6_0::api::provenance::ProvenanceApi {
11243                    client: self.client,
11244                };
11245                Ok(api
11246                    .submit_lineage_request(
11247                        &serde_json::from_value::<crate::v2_6_0::types::LineageEntity>(
11248                            body.clone(),
11249                        )
11250                        .map_err(|e| NifiError::UnsupportedEndpoint {
11251                            endpoint: format!(
11252                                "{} (body deserialize: {})",
11253                                "submit_lineage_request", e
11254                            ),
11255                            version: "2.6.0".to_string(),
11256                        })?,
11257                    )
11258                    .await?
11259                    .into())
11260            }
11261            DetectedVersion::V2_7_2 => {
11262                let api = crate::v2_7_2::api::provenance::ProvenanceApi {
11263                    client: self.client,
11264                };
11265                Ok(api
11266                    .submit_lineage_request(
11267                        &serde_json::from_value::<crate::v2_7_2::types::LineageEntity>(
11268                            body.clone(),
11269                        )
11270                        .map_err(|e| NifiError::UnsupportedEndpoint {
11271                            endpoint: format!(
11272                                "{} (body deserialize: {})",
11273                                "submit_lineage_request", e
11274                            ),
11275                            version: "2.7.2".to_string(),
11276                        })?,
11277                    )
11278                    .await?
11279                    .into())
11280            }
11281            DetectedVersion::V2_8_0 => {
11282                let api = crate::v2_8_0::api::provenance::ProvenanceApi {
11283                    client: self.client,
11284                };
11285                Ok(api
11286                    .submit_lineage_request(
11287                        &serde_json::from_value::<crate::v2_8_0::types::LineageEntity>(
11288                            body.clone(),
11289                        )
11290                        .map_err(|e| NifiError::UnsupportedEndpoint {
11291                            endpoint: format!(
11292                                "{} (body deserialize: {})",
11293                                "submit_lineage_request", e
11294                            ),
11295                            version: "2.8.0".to_string(),
11296                        })?,
11297                    )
11298                    .await?
11299                    .into())
11300            }
11301        }
11302    }
11303    /// Submits a provenance query
11304    pub async fn submit_provenance_request(
11305        &self,
11306        body: &serde_json::Value,
11307    ) -> Result<types::ProvenanceDto, NifiError> {
11308        match self.version {
11309            DetectedVersion::V2_6_0 => {
11310                let api = crate::v2_6_0::api::provenance::ProvenanceApi {
11311                    client: self.client,
11312                };
11313                Ok(api
11314                    .submit_provenance_request(
11315                        &serde_json::from_value::<crate::v2_6_0::types::ProvenanceEntity>(
11316                            body.clone(),
11317                        )
11318                        .map_err(|e| NifiError::UnsupportedEndpoint {
11319                            endpoint: format!(
11320                                "{} (body deserialize: {})",
11321                                "submit_provenance_request", e
11322                            ),
11323                            version: "2.6.0".to_string(),
11324                        })?,
11325                    )
11326                    .await?
11327                    .into())
11328            }
11329            DetectedVersion::V2_7_2 => {
11330                let api = crate::v2_7_2::api::provenance::ProvenanceApi {
11331                    client: self.client,
11332                };
11333                Ok(api
11334                    .submit_provenance_request(
11335                        &serde_json::from_value::<crate::v2_7_2::types::ProvenanceEntity>(
11336                            body.clone(),
11337                        )
11338                        .map_err(|e| NifiError::UnsupportedEndpoint {
11339                            endpoint: format!(
11340                                "{} (body deserialize: {})",
11341                                "submit_provenance_request", e
11342                            ),
11343                            version: "2.7.2".to_string(),
11344                        })?,
11345                    )
11346                    .await?
11347                    .into())
11348            }
11349            DetectedVersion::V2_8_0 => {
11350                let api = crate::v2_8_0::api::provenance::ProvenanceApi {
11351                    client: self.client,
11352                };
11353                Ok(api
11354                    .submit_provenance_request(
11355                        &serde_json::from_value::<crate::v2_8_0::types::ProvenanceEntity>(
11356                            body.clone(),
11357                        )
11358                        .map_err(|e| NifiError::UnsupportedEndpoint {
11359                            endpoint: format!(
11360                                "{} (body deserialize: {})",
11361                                "submit_provenance_request", e
11362                            ),
11363                            version: "2.8.0".to_string(),
11364                        })?,
11365                    )
11366                    .await?
11367                    .into())
11368            }
11369        }
11370    }
11371}
11372/// Dynamic dispatch wrapper for the ProvenanceEvents API.
11373pub struct DynamicProvenanceEventsApi<'a> {
11374    client: &'a NifiClient,
11375    version: DetectedVersion,
11376}
11377#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
11378impl<'a> DynamicProvenanceEventsApi<'a> {
11379    /// Gets the input content for a provenance event
11380    pub async fn get_input_content(
11381        &self,
11382        id: &str,
11383        cluster_node_id: Option<&str>,
11384    ) -> Result<(), NifiError> {
11385        match self.version {
11386            DetectedVersion::V2_6_0 => {
11387                let api = crate::v2_6_0::api::provenanceevents::ProvenanceEventsContentApi {
11388                    client: self.client,
11389                    id,
11390                };
11391                api.get_input_content(cluster_node_id).await
11392            }
11393            DetectedVersion::V2_7_2 => {
11394                let api = crate::v2_7_2::api::provenanceevents::ProvenanceEventsContentApi {
11395                    client: self.client,
11396                    id,
11397                };
11398                api.get_input_content(cluster_node_id).await
11399            }
11400            DetectedVersion::V2_8_0 => {
11401                let api = crate::v2_8_0::api::provenanceevents::ProvenanceEventsContentApi {
11402                    client: self.client,
11403                    id,
11404                };
11405                api.get_input_content(cluster_node_id).await
11406            }
11407        }
11408    }
11409    /// Retrieves the latest cached Provenance Events for the specified component
11410    pub async fn get_latest_provenance_events(
11411        &self,
11412        component_id: &str,
11413        limit: Option<i32>,
11414    ) -> Result<types::LatestProvenanceEventsDto, NifiError> {
11415        match self.version {
11416            DetectedVersion::V2_6_0 => {
11417                let api = crate::v2_6_0::api::provenanceevents::ProvenanceEventsApi {
11418                    client: self.client,
11419                };
11420                Ok(api
11421                    .get_latest_provenance_events(component_id, limit)
11422                    .await?
11423                    .into())
11424            }
11425            DetectedVersion::V2_7_2 => {
11426                let api = crate::v2_7_2::api::provenanceevents::ProvenanceEventsApi {
11427                    client: self.client,
11428                };
11429                Ok(api
11430                    .get_latest_provenance_events(component_id, limit)
11431                    .await?
11432                    .into())
11433            }
11434            DetectedVersion::V2_8_0 => {
11435                let api = crate::v2_8_0::api::provenanceevents::ProvenanceEventsApi {
11436                    client: self.client,
11437                };
11438                Ok(api
11439                    .get_latest_provenance_events(component_id, limit)
11440                    .await?
11441                    .into())
11442            }
11443        }
11444    }
11445    /// Gets the output content for a provenance event
11446    pub async fn get_output_content(
11447        &self,
11448        id: &str,
11449        cluster_node_id: Option<&str>,
11450    ) -> Result<(), NifiError> {
11451        match self.version {
11452            DetectedVersion::V2_6_0 => {
11453                let api = crate::v2_6_0::api::provenanceevents::ProvenanceEventsContentApi {
11454                    client: self.client,
11455                    id,
11456                };
11457                api.get_output_content(cluster_node_id).await
11458            }
11459            DetectedVersion::V2_7_2 => {
11460                let api = crate::v2_7_2::api::provenanceevents::ProvenanceEventsContentApi {
11461                    client: self.client,
11462                    id,
11463                };
11464                api.get_output_content(cluster_node_id).await
11465            }
11466            DetectedVersion::V2_8_0 => {
11467                let api = crate::v2_8_0::api::provenanceevents::ProvenanceEventsContentApi {
11468                    client: self.client,
11469                    id,
11470                };
11471                api.get_output_content(cluster_node_id).await
11472            }
11473        }
11474    }
11475    /// Gets a provenance event
11476    pub async fn get_provenance_event(
11477        &self,
11478        id: &str,
11479        cluster_node_id: Option<&str>,
11480    ) -> Result<types::ProvenanceEventDto, NifiError> {
11481        match self.version {
11482            DetectedVersion::V2_6_0 => {
11483                let api = crate::v2_6_0::api::provenanceevents::ProvenanceEventsApi {
11484                    client: self.client,
11485                };
11486                Ok(api.get_provenance_event(id, cluster_node_id).await?.into())
11487            }
11488            DetectedVersion::V2_7_2 => {
11489                let api = crate::v2_7_2::api::provenanceevents::ProvenanceEventsApi {
11490                    client: self.client,
11491                };
11492                Ok(api.get_provenance_event(id, cluster_node_id).await?.into())
11493            }
11494            DetectedVersion::V2_8_0 => {
11495                let api = crate::v2_8_0::api::provenanceevents::ProvenanceEventsApi {
11496                    client: self.client,
11497                };
11498                Ok(api.get_provenance_event(id, cluster_node_id).await?.into())
11499            }
11500        }
11501    }
11502    /// Replays content from a provenance event
11503    pub async fn submit_replay(
11504        &self,
11505        body: &serde_json::Value,
11506    ) -> Result<types::ProvenanceEventDto, NifiError> {
11507        match self.version {
11508            DetectedVersion::V2_6_0 => {
11509                let api = crate::v2_6_0::api::provenanceevents::ProvenanceEventsApi {
11510                    client: self.client,
11511                };
11512                Ok(api
11513                    .submit_replay(
11514                        &serde_json::from_value::<crate::v2_6_0::types::SubmitReplayRequestEntity>(
11515                            body.clone(),
11516                        )
11517                        .map_err(|e| NifiError::UnsupportedEndpoint {
11518                            endpoint: format!("{} (body deserialize: {})", "submit_replay", e),
11519                            version: "2.6.0".to_string(),
11520                        })?,
11521                    )
11522                    .await?
11523                    .into())
11524            }
11525            DetectedVersion::V2_7_2 => {
11526                let api = crate::v2_7_2::api::provenanceevents::ProvenanceEventsApi {
11527                    client: self.client,
11528                };
11529                Ok(api
11530                    .submit_replay(
11531                        &serde_json::from_value::<crate::v2_7_2::types::SubmitReplayRequestEntity>(
11532                            body.clone(),
11533                        )
11534                        .map_err(|e| NifiError::UnsupportedEndpoint {
11535                            endpoint: format!("{} (body deserialize: {})", "submit_replay", e),
11536                            version: "2.7.2".to_string(),
11537                        })?,
11538                    )
11539                    .await?
11540                    .into())
11541            }
11542            DetectedVersion::V2_8_0 => {
11543                let api = crate::v2_8_0::api::provenanceevents::ProvenanceEventsApi {
11544                    client: self.client,
11545                };
11546                Ok(api
11547                    .submit_replay(
11548                        &serde_json::from_value::<crate::v2_8_0::types::SubmitReplayRequestEntity>(
11549                            body.clone(),
11550                        )
11551                        .map_err(|e| NifiError::UnsupportedEndpoint {
11552                            endpoint: format!("{} (body deserialize: {})", "submit_replay", e),
11553                            version: "2.8.0".to_string(),
11554                        })?,
11555                    )
11556                    .await?
11557                    .into())
11558            }
11559        }
11560    }
11561    /// Replays content from a provenance event
11562    pub async fn submit_replay_latest_event(
11563        &self,
11564        body: &serde_json::Value,
11565    ) -> Result<types::ReplayLastEventResponseEntity, NifiError> {
11566        match self.version {
11567            DetectedVersion::V2_6_0 => {
11568                let api = crate::v2_6_0::api::provenanceevents::ProvenanceEventsApi {
11569                    client: self.client,
11570                };
11571                Ok(
11572                    api
11573                        .submit_replay_latest_event(
11574                            &serde_json::from_value::<
11575                                crate::v2_6_0::types::ReplayLastEventRequestEntity,
11576                            >(body.clone())
11577                            .map_err(|e| NifiError::UnsupportedEndpoint {
11578                                endpoint: format!(
11579                                    "{} (body deserialize: {})",
11580                                    "submit_replay_latest_event", e
11581                                ),
11582                                version: "2.6.0".to_string(),
11583                            })?,
11584                        )
11585                        .await?
11586                        .into(),
11587                )
11588            }
11589            DetectedVersion::V2_7_2 => {
11590                let api = crate::v2_7_2::api::provenanceevents::ProvenanceEventsApi {
11591                    client: self.client,
11592                };
11593                Ok(
11594                    api
11595                        .submit_replay_latest_event(
11596                            &serde_json::from_value::<
11597                                crate::v2_7_2::types::ReplayLastEventRequestEntity,
11598                            >(body.clone())
11599                            .map_err(|e| NifiError::UnsupportedEndpoint {
11600                                endpoint: format!(
11601                                    "{} (body deserialize: {})",
11602                                    "submit_replay_latest_event", e
11603                                ),
11604                                version: "2.7.2".to_string(),
11605                            })?,
11606                        )
11607                        .await?
11608                        .into(),
11609                )
11610            }
11611            DetectedVersion::V2_8_0 => {
11612                let api = crate::v2_8_0::api::provenanceevents::ProvenanceEventsApi {
11613                    client: self.client,
11614                };
11615                Ok(
11616                    api
11617                        .submit_replay_latest_event(
11618                            &serde_json::from_value::<
11619                                crate::v2_8_0::types::ReplayLastEventRequestEntity,
11620                            >(body.clone())
11621                            .map_err(|e| NifiError::UnsupportedEndpoint {
11622                                endpoint: format!(
11623                                    "{} (body deserialize: {})",
11624                                    "submit_replay_latest_event", e
11625                                ),
11626                                version: "2.8.0".to_string(),
11627                            })?,
11628                        )
11629                        .await?
11630                        .into(),
11631                )
11632            }
11633        }
11634    }
11635}
11636/// Dynamic dispatch wrapper for the RemoteProcessGroups API.
11637pub struct DynamicRemoteProcessGroupsApi<'a> {
11638    client: &'a NifiClient,
11639    version: DetectedVersion,
11640}
11641#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
11642impl<'a> DynamicRemoteProcessGroupsApi<'a> {
11643    /// Clears bulletins for a remote process group
11644    pub async fn clear_bulletins_6(
11645        &self,
11646        id: &str,
11647        body: &serde_json::Value,
11648    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
11649        match self.version {
11650            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
11651                endpoint: "clear_bulletins_6".to_string(),
11652                version: "2.6.0".to_string(),
11653            }),
11654            DetectedVersion::V2_7_2 => {
11655                let api =
11656                    crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsBulletinsApi {
11657                        client: self.client,
11658                        id,
11659                    };
11660                Ok(
11661                    api
11662                        .clear_bulletins_6(
11663                            &serde_json::from_value::<
11664                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
11665                            >(body.clone())
11666                            .map_err(|e| NifiError::UnsupportedEndpoint {
11667                                endpoint: format!(
11668                                    "{} (body deserialize: {})",
11669                                    "clear_bulletins_6", e
11670                                ),
11671                                version: "2.7.2".to_string(),
11672                            })?,
11673                        )
11674                        .await?
11675                        .into(),
11676                )
11677            }
11678            DetectedVersion::V2_8_0 => {
11679                let api =
11680                    crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsBulletinsApi {
11681                        client: self.client,
11682                        id,
11683                    };
11684                Ok(
11685                    api
11686                        .clear_bulletins_6(
11687                            &serde_json::from_value::<
11688                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
11689                            >(body.clone())
11690                            .map_err(|e| NifiError::UnsupportedEndpoint {
11691                                endpoint: format!(
11692                                    "{} (body deserialize: {})",
11693                                    "clear_bulletins_6", e
11694                                ),
11695                                version: "2.8.0".to_string(),
11696                            })?,
11697                        )
11698                        .await?
11699                        .into(),
11700                )
11701            }
11702        }
11703    }
11704    /// Gets a remote process group
11705    pub async fn get_remote_process_group(
11706        &self,
11707        id: &str,
11708    ) -> Result<types::RemoteProcessGroupEntity, NifiError> {
11709        match self.version {
11710            DetectedVersion::V2_6_0 => {
11711                let api = crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsApi {
11712                    client: self.client,
11713                };
11714                Ok(api.get_remote_process_group(id).await?.into())
11715            }
11716            DetectedVersion::V2_7_2 => {
11717                let api = crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsApi {
11718                    client: self.client,
11719                };
11720                Ok(api.get_remote_process_group(id).await?.into())
11721            }
11722            DetectedVersion::V2_8_0 => {
11723                let api = crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsApi {
11724                    client: self.client,
11725                };
11726                Ok(api.get_remote_process_group(id).await?.into())
11727            }
11728        }
11729    }
11730    /// Gets the state for a RemoteProcessGroup
11731    pub async fn get_state_3(&self, id: &str) -> Result<types::ComponentStateDto, NifiError> {
11732        match self.version {
11733            DetectedVersion::V2_6_0 => {
11734                let api = crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsStateApi {
11735                    client: self.client,
11736                    id,
11737                };
11738                Ok(api.get_state_3().await?.into())
11739            }
11740            DetectedVersion::V2_7_2 => {
11741                let api = crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsStateApi {
11742                    client: self.client,
11743                    id,
11744                };
11745                Ok(api.get_state_3().await?.into())
11746            }
11747            DetectedVersion::V2_8_0 => {
11748                let api = crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsStateApi {
11749                    client: self.client,
11750                    id,
11751                };
11752                Ok(api.get_state_3().await?.into())
11753            }
11754        }
11755    }
11756    /// Deletes a remote process group
11757    pub async fn remove_remote_process_group(
11758        &self,
11759        id: &str,
11760        version: Option<&str>,
11761        client_id: Option<&str>,
11762        disconnected_node_acknowledged: Option<bool>,
11763    ) -> Result<types::RemoteProcessGroupEntity, NifiError> {
11764        match self.version {
11765            DetectedVersion::V2_6_0 => {
11766                let api = crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsApi {
11767                    client: self.client,
11768                };
11769                Ok(api
11770                    .remove_remote_process_group(
11771                        id,
11772                        version,
11773                        client_id,
11774                        disconnected_node_acknowledged,
11775                    )
11776                    .await?
11777                    .into())
11778            }
11779            DetectedVersion::V2_7_2 => {
11780                let api = crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsApi {
11781                    client: self.client,
11782                };
11783                Ok(api
11784                    .remove_remote_process_group(
11785                        id,
11786                        version,
11787                        client_id,
11788                        disconnected_node_acknowledged,
11789                    )
11790                    .await?
11791                    .into())
11792            }
11793            DetectedVersion::V2_8_0 => {
11794                let api = crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsApi {
11795                    client: self.client,
11796                };
11797                Ok(api
11798                    .remove_remote_process_group(
11799                        id,
11800                        version,
11801                        client_id,
11802                        disconnected_node_acknowledged,
11803                    )
11804                    .await?
11805                    .into())
11806            }
11807        }
11808    }
11809    /// Updates a remote process group
11810    pub async fn update_remote_process_group(
11811        &self,
11812        id: &str,
11813        body: &serde_json::Value,
11814    ) -> Result<types::RemoteProcessGroupEntity, NifiError> {
11815        match self.version {
11816            DetectedVersion::V2_6_0 => {
11817                let api = crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsApi {
11818                    client: self.client,
11819                };
11820                Ok(api
11821                    .update_remote_process_group(
11822                        id,
11823                        &serde_json::from_value::<crate::v2_6_0::types::RemoteProcessGroupEntity>(
11824                            body.clone(),
11825                        )
11826                        .map_err(|e| NifiError::UnsupportedEndpoint {
11827                            endpoint: format!(
11828                                "{} (body deserialize: {})",
11829                                "update_remote_process_group", e
11830                            ),
11831                            version: "2.6.0".to_string(),
11832                        })?,
11833                    )
11834                    .await?
11835                    .into())
11836            }
11837            DetectedVersion::V2_7_2 => {
11838                let api = crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsApi {
11839                    client: self.client,
11840                };
11841                Ok(api
11842                    .update_remote_process_group(
11843                        id,
11844                        &serde_json::from_value::<crate::v2_7_2::types::RemoteProcessGroupEntity>(
11845                            body.clone(),
11846                        )
11847                        .map_err(|e| NifiError::UnsupportedEndpoint {
11848                            endpoint: format!(
11849                                "{} (body deserialize: {})",
11850                                "update_remote_process_group", e
11851                            ),
11852                            version: "2.7.2".to_string(),
11853                        })?,
11854                    )
11855                    .await?
11856                    .into())
11857            }
11858            DetectedVersion::V2_8_0 => {
11859                let api = crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsApi {
11860                    client: self.client,
11861                };
11862                Ok(api
11863                    .update_remote_process_group(
11864                        id,
11865                        &serde_json::from_value::<crate::v2_8_0::types::RemoteProcessGroupEntity>(
11866                            body.clone(),
11867                        )
11868                        .map_err(|e| NifiError::UnsupportedEndpoint {
11869                            endpoint: format!(
11870                                "{} (body deserialize: {})",
11871                                "update_remote_process_group", e
11872                            ),
11873                            version: "2.8.0".to_string(),
11874                        })?,
11875                    )
11876                    .await?
11877                    .into())
11878            }
11879        }
11880    }
11881    /// Updates a remote port
11882    pub async fn update_remote_process_group_input_port(
11883        &self,
11884        id: &str,
11885        port_id: &str,
11886        body: &serde_json::Value,
11887    ) -> Result<types::RemoteProcessGroupPortEntity, NifiError> {
11888        match self.version {
11889            DetectedVersion::V2_6_0 => {
11890                let api =
11891                    crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsInputPortsApi {
11892                        client: self.client,
11893                        id,
11894                    };
11895                Ok(
11896                    api
11897                        .update_remote_process_group_input_port(
11898                            port_id,
11899                            &serde_json::from_value::<
11900                                crate::v2_6_0::types::RemoteProcessGroupPortEntity,
11901                            >(body.clone())
11902                            .map_err(|e| NifiError::UnsupportedEndpoint {
11903                                endpoint: format!(
11904                                    "{} (body deserialize: {})",
11905                                    "update_remote_process_group_input_port", e
11906                                ),
11907                                version: "2.6.0".to_string(),
11908                            })?,
11909                        )
11910                        .await?
11911                        .into(),
11912                )
11913            }
11914            DetectedVersion::V2_7_2 => {
11915                let api =
11916                    crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsInputPortsApi {
11917                        client: self.client,
11918                        id,
11919                    };
11920                Ok(
11921                    api
11922                        .update_remote_process_group_input_port(
11923                            port_id,
11924                            &serde_json::from_value::<
11925                                crate::v2_7_2::types::RemoteProcessGroupPortEntity,
11926                            >(body.clone())
11927                            .map_err(|e| NifiError::UnsupportedEndpoint {
11928                                endpoint: format!(
11929                                    "{} (body deserialize: {})",
11930                                    "update_remote_process_group_input_port", e
11931                                ),
11932                                version: "2.7.2".to_string(),
11933                            })?,
11934                        )
11935                        .await?
11936                        .into(),
11937                )
11938            }
11939            DetectedVersion::V2_8_0 => {
11940                let api =
11941                    crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsInputPortsApi {
11942                        client: self.client,
11943                        id,
11944                    };
11945                Ok(
11946                    api
11947                        .update_remote_process_group_input_port(
11948                            port_id,
11949                            &serde_json::from_value::<
11950                                crate::v2_8_0::types::RemoteProcessGroupPortEntity,
11951                            >(body.clone())
11952                            .map_err(|e| NifiError::UnsupportedEndpoint {
11953                                endpoint: format!(
11954                                    "{} (body deserialize: {})",
11955                                    "update_remote_process_group_input_port", e
11956                                ),
11957                                version: "2.8.0".to_string(),
11958                            })?,
11959                        )
11960                        .await?
11961                        .into(),
11962                )
11963            }
11964        }
11965    }
11966    /// Updates run status of a remote port
11967    pub async fn update_remote_process_group_input_port_run_status(
11968        &self,
11969        id: &str,
11970        port_id: &str,
11971        body: &serde_json::Value,
11972    ) -> Result<types::RemoteProcessGroupPortEntity, NifiError> {
11973        match self.version {
11974            DetectedVersion::V2_6_0 => {
11975                let api =
11976                    crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsInputPortsApi {
11977                        client: self.client,
11978                        id,
11979                    };
11980                Ok(api
11981                    .update_remote_process_group_input_port_run_status(
11982                        port_id,
11983                        &serde_json::from_value::<crate::v2_6_0::types::RemotePortRunStatusEntity>(
11984                            body.clone(),
11985                        )
11986                        .map_err(|e| NifiError::UnsupportedEndpoint {
11987                            endpoint: format!(
11988                                "{} (body deserialize: {})",
11989                                "update_remote_process_group_input_port_run_status", e
11990                            ),
11991                            version: "2.6.0".to_string(),
11992                        })?,
11993                    )
11994                    .await?
11995                    .into())
11996            }
11997            DetectedVersion::V2_7_2 => {
11998                let api =
11999                    crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsInputPortsApi {
12000                        client: self.client,
12001                        id,
12002                    };
12003                Ok(api
12004                    .update_remote_process_group_input_port_run_status(
12005                        port_id,
12006                        &serde_json::from_value::<crate::v2_7_2::types::RemotePortRunStatusEntity>(
12007                            body.clone(),
12008                        )
12009                        .map_err(|e| NifiError::UnsupportedEndpoint {
12010                            endpoint: format!(
12011                                "{} (body deserialize: {})",
12012                                "update_remote_process_group_input_port_run_status", e
12013                            ),
12014                            version: "2.7.2".to_string(),
12015                        })?,
12016                    )
12017                    .await?
12018                    .into())
12019            }
12020            DetectedVersion::V2_8_0 => {
12021                let api =
12022                    crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsInputPortsApi {
12023                        client: self.client,
12024                        id,
12025                    };
12026                Ok(api
12027                    .update_remote_process_group_input_port_run_status(
12028                        port_id,
12029                        &serde_json::from_value::<crate::v2_8_0::types::RemotePortRunStatusEntity>(
12030                            body.clone(),
12031                        )
12032                        .map_err(|e| NifiError::UnsupportedEndpoint {
12033                            endpoint: format!(
12034                                "{} (body deserialize: {})",
12035                                "update_remote_process_group_input_port_run_status", e
12036                            ),
12037                            version: "2.8.0".to_string(),
12038                        })?,
12039                    )
12040                    .await?
12041                    .into())
12042            }
12043        }
12044    }
12045    /// Updates a remote port
12046    pub async fn update_remote_process_group_output_port(
12047        &self,
12048        id: &str,
12049        port_id: &str,
12050        body: &serde_json::Value,
12051    ) -> Result<types::RemoteProcessGroupPortEntity, NifiError> {
12052        match self.version {
12053            DetectedVersion::V2_6_0 => {
12054                let api =
12055                    crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsOutputPortsApi {
12056                        client: self.client,
12057                        id,
12058                    };
12059                Ok(
12060                    api
12061                        .update_remote_process_group_output_port(
12062                            port_id,
12063                            &serde_json::from_value::<
12064                                crate::v2_6_0::types::RemoteProcessGroupPortEntity,
12065                            >(body.clone())
12066                            .map_err(|e| NifiError::UnsupportedEndpoint {
12067                                endpoint: format!(
12068                                    "{} (body deserialize: {})",
12069                                    "update_remote_process_group_output_port", e
12070                                ),
12071                                version: "2.6.0".to_string(),
12072                            })?,
12073                        )
12074                        .await?
12075                        .into(),
12076                )
12077            }
12078            DetectedVersion::V2_7_2 => {
12079                let api =
12080                    crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsOutputPortsApi {
12081                        client: self.client,
12082                        id,
12083                    };
12084                Ok(
12085                    api
12086                        .update_remote_process_group_output_port(
12087                            port_id,
12088                            &serde_json::from_value::<
12089                                crate::v2_7_2::types::RemoteProcessGroupPortEntity,
12090                            >(body.clone())
12091                            .map_err(|e| NifiError::UnsupportedEndpoint {
12092                                endpoint: format!(
12093                                    "{} (body deserialize: {})",
12094                                    "update_remote_process_group_output_port", e
12095                                ),
12096                                version: "2.7.2".to_string(),
12097                            })?,
12098                        )
12099                        .await?
12100                        .into(),
12101                )
12102            }
12103            DetectedVersion::V2_8_0 => {
12104                let api =
12105                    crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsOutputPortsApi {
12106                        client: self.client,
12107                        id,
12108                    };
12109                Ok(
12110                    api
12111                        .update_remote_process_group_output_port(
12112                            port_id,
12113                            &serde_json::from_value::<
12114                                crate::v2_8_0::types::RemoteProcessGroupPortEntity,
12115                            >(body.clone())
12116                            .map_err(|e| NifiError::UnsupportedEndpoint {
12117                                endpoint: format!(
12118                                    "{} (body deserialize: {})",
12119                                    "update_remote_process_group_output_port", e
12120                                ),
12121                                version: "2.8.0".to_string(),
12122                            })?,
12123                        )
12124                        .await?
12125                        .into(),
12126                )
12127            }
12128        }
12129    }
12130    /// Updates run status of a remote port
12131    pub async fn update_remote_process_group_output_port_run_status(
12132        &self,
12133        id: &str,
12134        port_id: &str,
12135        body: &serde_json::Value,
12136    ) -> Result<types::RemoteProcessGroupPortEntity, NifiError> {
12137        match self.version {
12138            DetectedVersion::V2_6_0 => {
12139                let api =
12140                    crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsOutputPortsApi {
12141                        client: self.client,
12142                        id,
12143                    };
12144                Ok(api
12145                    .update_remote_process_group_output_port_run_status(
12146                        port_id,
12147                        &serde_json::from_value::<crate::v2_6_0::types::RemotePortRunStatusEntity>(
12148                            body.clone(),
12149                        )
12150                        .map_err(|e| NifiError::UnsupportedEndpoint {
12151                            endpoint: format!(
12152                                "{} (body deserialize: {})",
12153                                "update_remote_process_group_output_port_run_status", e
12154                            ),
12155                            version: "2.6.0".to_string(),
12156                        })?,
12157                    )
12158                    .await?
12159                    .into())
12160            }
12161            DetectedVersion::V2_7_2 => {
12162                let api =
12163                    crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsOutputPortsApi {
12164                        client: self.client,
12165                        id,
12166                    };
12167                Ok(api
12168                    .update_remote_process_group_output_port_run_status(
12169                        port_id,
12170                        &serde_json::from_value::<crate::v2_7_2::types::RemotePortRunStatusEntity>(
12171                            body.clone(),
12172                        )
12173                        .map_err(|e| NifiError::UnsupportedEndpoint {
12174                            endpoint: format!(
12175                                "{} (body deserialize: {})",
12176                                "update_remote_process_group_output_port_run_status", e
12177                            ),
12178                            version: "2.7.2".to_string(),
12179                        })?,
12180                    )
12181                    .await?
12182                    .into())
12183            }
12184            DetectedVersion::V2_8_0 => {
12185                let api =
12186                    crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsOutputPortsApi {
12187                        client: self.client,
12188                        id,
12189                    };
12190                Ok(api
12191                    .update_remote_process_group_output_port_run_status(
12192                        port_id,
12193                        &serde_json::from_value::<crate::v2_8_0::types::RemotePortRunStatusEntity>(
12194                            body.clone(),
12195                        )
12196                        .map_err(|e| NifiError::UnsupportedEndpoint {
12197                            endpoint: format!(
12198                                "{} (body deserialize: {})",
12199                                "update_remote_process_group_output_port_run_status", e
12200                            ),
12201                            version: "2.8.0".to_string(),
12202                        })?,
12203                    )
12204                    .await?
12205                    .into())
12206            }
12207        }
12208    }
12209    /// Updates run status of a remote process group
12210    pub async fn update_remote_process_group_run_status(
12211        &self,
12212        id: &str,
12213        body: &serde_json::Value,
12214    ) -> Result<types::RemoteProcessGroupEntity, NifiError> {
12215        match self.version {
12216            DetectedVersion::V2_6_0 => {
12217                let api =
12218                    crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsRunStatusApi {
12219                        client: self.client,
12220                        id,
12221                    };
12222                Ok(api
12223                    .update_remote_process_group_run_status(
12224                        &serde_json::from_value::<crate::v2_6_0::types::RemotePortRunStatusEntity>(
12225                            body.clone(),
12226                        )
12227                        .map_err(|e| NifiError::UnsupportedEndpoint {
12228                            endpoint: format!(
12229                                "{} (body deserialize: {})",
12230                                "update_remote_process_group_run_status", e
12231                            ),
12232                            version: "2.6.0".to_string(),
12233                        })?,
12234                    )
12235                    .await?
12236                    .into())
12237            }
12238            DetectedVersion::V2_7_2 => {
12239                let api =
12240                    crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsRunStatusApi {
12241                        client: self.client,
12242                        id,
12243                    };
12244                Ok(api
12245                    .update_remote_process_group_run_status(
12246                        &serde_json::from_value::<crate::v2_7_2::types::RemotePortRunStatusEntity>(
12247                            body.clone(),
12248                        )
12249                        .map_err(|e| NifiError::UnsupportedEndpoint {
12250                            endpoint: format!(
12251                                "{} (body deserialize: {})",
12252                                "update_remote_process_group_run_status", e
12253                            ),
12254                            version: "2.7.2".to_string(),
12255                        })?,
12256                    )
12257                    .await?
12258                    .into())
12259            }
12260            DetectedVersion::V2_8_0 => {
12261                let api =
12262                    crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsRunStatusApi {
12263                        client: self.client,
12264                        id,
12265                    };
12266                Ok(api
12267                    .update_remote_process_group_run_status(
12268                        &serde_json::from_value::<crate::v2_8_0::types::RemotePortRunStatusEntity>(
12269                            body.clone(),
12270                        )
12271                        .map_err(|e| NifiError::UnsupportedEndpoint {
12272                            endpoint: format!(
12273                                "{} (body deserialize: {})",
12274                                "update_remote_process_group_run_status", e
12275                            ),
12276                            version: "2.8.0".to_string(),
12277                        })?,
12278                    )
12279                    .await?
12280                    .into())
12281            }
12282        }
12283    }
12284    /// Updates run status of all remote process groups in a process group (recursively)
12285    pub async fn update_remote_process_group_run_statuses(
12286        &self,
12287        id: &str,
12288        body: &serde_json::Value,
12289    ) -> Result<types::RemoteProcessGroupEntity, NifiError> {
12290        match self.version {
12291            DetectedVersion::V2_6_0 => {
12292                let api =
12293                    crate::v2_6_0::api::remoteprocessgroups::RemoteProcessGroupsRunStatusApi {
12294                        client: self.client,
12295                        id,
12296                    };
12297                Ok(api
12298                    .update_remote_process_group_run_statuses(
12299                        &serde_json::from_value::<crate::v2_6_0::types::RemotePortRunStatusEntity>(
12300                            body.clone(),
12301                        )
12302                        .map_err(|e| NifiError::UnsupportedEndpoint {
12303                            endpoint: format!(
12304                                "{} (body deserialize: {})",
12305                                "update_remote_process_group_run_statuses", e
12306                            ),
12307                            version: "2.6.0".to_string(),
12308                        })?,
12309                    )
12310                    .await?
12311                    .into())
12312            }
12313            DetectedVersion::V2_7_2 => {
12314                let api =
12315                    crate::v2_7_2::api::remoteprocessgroups::RemoteProcessGroupsRunStatusApi {
12316                        client: self.client,
12317                        id,
12318                    };
12319                Ok(api
12320                    .update_remote_process_group_run_statuses(
12321                        &serde_json::from_value::<crate::v2_7_2::types::RemotePortRunStatusEntity>(
12322                            body.clone(),
12323                        )
12324                        .map_err(|e| NifiError::UnsupportedEndpoint {
12325                            endpoint: format!(
12326                                "{} (body deserialize: {})",
12327                                "update_remote_process_group_run_statuses", e
12328                            ),
12329                            version: "2.7.2".to_string(),
12330                        })?,
12331                    )
12332                    .await?
12333                    .into())
12334            }
12335            DetectedVersion::V2_8_0 => {
12336                let api =
12337                    crate::v2_8_0::api::remoteprocessgroups::RemoteProcessGroupsRunStatusApi {
12338                        client: self.client,
12339                        id,
12340                    };
12341                Ok(api
12342                    .update_remote_process_group_run_statuses(
12343                        &serde_json::from_value::<crate::v2_8_0::types::RemotePortRunStatusEntity>(
12344                            body.clone(),
12345                        )
12346                        .map_err(|e| NifiError::UnsupportedEndpoint {
12347                            endpoint: format!(
12348                                "{} (body deserialize: {})",
12349                                "update_remote_process_group_run_statuses", e
12350                            ),
12351                            version: "2.8.0".to_string(),
12352                        })?,
12353                    )
12354                    .await?
12355                    .into())
12356            }
12357        }
12358    }
12359}
12360/// Dynamic dispatch wrapper for the ReportingTasks API.
12361pub struct DynamicReportingTasksApi<'a> {
12362    client: &'a NifiClient,
12363    version: DetectedVersion,
12364}
12365#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
12366impl<'a> DynamicReportingTasksApi<'a> {
12367    /// Performs analysis of the component's configuration, providing information about which attributes are referenced.
12368    pub async fn analyze_configuration_3(
12369        &self,
12370        id: &str,
12371        body: &serde_json::Value,
12372    ) -> Result<types::ConfigurationAnalysisDto, NifiError> {
12373        match self.version {
12374            DetectedVersion::V2_6_0 => {
12375                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksConfigApi {
12376                    client: self.client,
12377                    id,
12378                };
12379                Ok(
12380                    api
12381                        .analyze_configuration_3(
12382                            &serde_json::from_value::<
12383                                crate::v2_6_0::types::ConfigurationAnalysisEntity,
12384                            >(body.clone())
12385                            .map_err(|e| NifiError::UnsupportedEndpoint {
12386                                endpoint: format!(
12387                                    "{} (body deserialize: {})",
12388                                    "analyze_configuration_3", e
12389                                ),
12390                                version: "2.6.0".to_string(),
12391                            })?,
12392                        )
12393                        .await?
12394                        .into(),
12395                )
12396            }
12397            DetectedVersion::V2_7_2 => {
12398                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksConfigApi {
12399                    client: self.client,
12400                    id,
12401                };
12402                Ok(
12403                    api
12404                        .analyze_configuration_3(
12405                            &serde_json::from_value::<
12406                                crate::v2_7_2::types::ConfigurationAnalysisEntity,
12407                            >(body.clone())
12408                            .map_err(|e| NifiError::UnsupportedEndpoint {
12409                                endpoint: format!(
12410                                    "{} (body deserialize: {})",
12411                                    "analyze_configuration_3", e
12412                                ),
12413                                version: "2.7.2".to_string(),
12414                            })?,
12415                        )
12416                        .await?
12417                        .into(),
12418                )
12419            }
12420            DetectedVersion::V2_8_0 => {
12421                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksConfigApi {
12422                    client: self.client,
12423                    id,
12424                };
12425                Ok(
12426                    api
12427                        .analyze_configuration_3(
12428                            &serde_json::from_value::<
12429                                crate::v2_8_0::types::ConfigurationAnalysisEntity,
12430                            >(body.clone())
12431                            .map_err(|e| NifiError::UnsupportedEndpoint {
12432                                endpoint: format!(
12433                                    "{} (body deserialize: {})",
12434                                    "analyze_configuration_3", e
12435                                ),
12436                                version: "2.8.0".to_string(),
12437                            })?,
12438                        )
12439                        .await?
12440                        .into(),
12441                )
12442            }
12443        }
12444    }
12445    /// Clears bulletins for a reporting task
12446    pub async fn clear_bulletins_7(
12447        &self,
12448        id: &str,
12449        body: &serde_json::Value,
12450    ) -> Result<types::ClearBulletinsResultEntity, NifiError> {
12451        match self.version {
12452            DetectedVersion::V2_6_0 => Err(NifiError::UnsupportedEndpoint {
12453                endpoint: "clear_bulletins_7".to_string(),
12454                version: "2.6.0".to_string(),
12455            }),
12456            DetectedVersion::V2_7_2 => {
12457                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksBulletinsApi {
12458                    client: self.client,
12459                    id,
12460                };
12461                Ok(
12462                    api
12463                        .clear_bulletins_7(
12464                            &serde_json::from_value::<
12465                                crate::v2_7_2::types::ClearBulletinsRequestEntity,
12466                            >(body.clone())
12467                            .map_err(|e| NifiError::UnsupportedEndpoint {
12468                                endpoint: format!(
12469                                    "{} (body deserialize: {})",
12470                                    "clear_bulletins_7", e
12471                                ),
12472                                version: "2.7.2".to_string(),
12473                            })?,
12474                        )
12475                        .await?
12476                        .into(),
12477                )
12478            }
12479            DetectedVersion::V2_8_0 => {
12480                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksBulletinsApi {
12481                    client: self.client,
12482                    id,
12483                };
12484                Ok(
12485                    api
12486                        .clear_bulletins_7(
12487                            &serde_json::from_value::<
12488                                crate::v2_8_0::types::ClearBulletinsRequestEntity,
12489                            >(body.clone())
12490                            .map_err(|e| NifiError::UnsupportedEndpoint {
12491                                endpoint: format!(
12492                                    "{} (body deserialize: {})",
12493                                    "clear_bulletins_7", e
12494                                ),
12495                                version: "2.8.0".to_string(),
12496                            })?,
12497                        )
12498                        .await?
12499                        .into(),
12500                )
12501            }
12502        }
12503    }
12504    /// Clears the state for a reporting task
12505    pub async fn clear_state_4(
12506        &self,
12507        id: &str,
12508        body: &serde_json::Value,
12509    ) -> Result<types::ComponentStateDto, NifiError> {
12510        match self.version {
12511            DetectedVersion::V2_6_0 => {
12512                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksStateApi {
12513                    client: self.client,
12514                    id,
12515                };
12516                Ok(api
12517                    .clear_state_4(
12518                        &serde_json::from_value::<crate::v2_6_0::types::ComponentStateEntity>(
12519                            body.clone(),
12520                        )
12521                        .map_err(|e| NifiError::UnsupportedEndpoint {
12522                            endpoint: format!("{} (body deserialize: {})", "clear_state_4", e),
12523                            version: "2.6.0".to_string(),
12524                        })?,
12525                    )
12526                    .await?
12527                    .into())
12528            }
12529            DetectedVersion::V2_7_2 => {
12530                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksStateApi {
12531                    client: self.client,
12532                    id,
12533                };
12534                Ok(api
12535                    .clear_state_4(
12536                        &serde_json::from_value::<crate::v2_7_2::types::ComponentStateEntity>(
12537                            body.clone(),
12538                        )
12539                        .map_err(|e| NifiError::UnsupportedEndpoint {
12540                            endpoint: format!("{} (body deserialize: {})", "clear_state_4", e),
12541                            version: "2.7.2".to_string(),
12542                        })?,
12543                    )
12544                    .await?
12545                    .into())
12546            }
12547            DetectedVersion::V2_8_0 => {
12548                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksStateApi {
12549                    client: self.client,
12550                    id,
12551                };
12552                Ok(api
12553                    .clear_state_4(
12554                        &serde_json::from_value::<crate::v2_8_0::types::ComponentStateEntity>(
12555                            body.clone(),
12556                        )
12557                        .map_err(|e| NifiError::UnsupportedEndpoint {
12558                            endpoint: format!("{} (body deserialize: {})", "clear_state_4", e),
12559                            version: "2.8.0".to_string(),
12560                        })?,
12561                    )
12562                    .await?
12563                    .into())
12564            }
12565        }
12566    }
12567    /// Deletes the Verification Request with the given ID
12568    pub async fn delete_verification_request_3(
12569        &self,
12570        id: &str,
12571        request_id: &str,
12572    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
12573        match self.version {
12574            DetectedVersion::V2_6_0 => {
12575                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksConfigApi {
12576                    client: self.client,
12577                    id,
12578                };
12579                Ok(api.delete_verification_request_3(request_id).await?.into())
12580            }
12581            DetectedVersion::V2_7_2 => {
12582                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksConfigApi {
12583                    client: self.client,
12584                    id,
12585                };
12586                Ok(api.delete_verification_request_3(request_id).await?.into())
12587            }
12588            DetectedVersion::V2_8_0 => {
12589                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksConfigApi {
12590                    client: self.client,
12591                    id,
12592                };
12593                Ok(api.delete_verification_request_3(request_id).await?.into())
12594            }
12595        }
12596    }
12597    /// Gets a reporting task property descriptor
12598    pub async fn get_property_descriptor_4(
12599        &self,
12600        id: &str,
12601        property_name: &str,
12602        sensitive: Option<bool>,
12603    ) -> Result<types::PropertyDescriptorDto, NifiError> {
12604        match self.version {
12605            DetectedVersion::V2_6_0 => {
12606                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksDescriptorsApi {
12607                    client: self.client,
12608                    id,
12609                };
12610                Ok(api
12611                    .get_property_descriptor_4(property_name, sensitive)
12612                    .await?
12613                    .into())
12614            }
12615            DetectedVersion::V2_7_2 => {
12616                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksDescriptorsApi {
12617                    client: self.client,
12618                    id,
12619                };
12620                Ok(api
12621                    .get_property_descriptor_4(property_name, sensitive)
12622                    .await?
12623                    .into())
12624            }
12625            DetectedVersion::V2_8_0 => {
12626                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksDescriptorsApi {
12627                    client: self.client,
12628                    id,
12629                };
12630                Ok(api
12631                    .get_property_descriptor_4(property_name, sensitive)
12632                    .await?
12633                    .into())
12634            }
12635        }
12636    }
12637    /// Gets a reporting task
12638    pub async fn get_reporting_task(
12639        &self,
12640        id: &str,
12641    ) -> Result<types::ReportingTaskEntity, NifiError> {
12642        match self.version {
12643            DetectedVersion::V2_6_0 => {
12644                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksApi {
12645                    client: self.client,
12646                };
12647                Ok(api.get_reporting_task(id).await?.into())
12648            }
12649            DetectedVersion::V2_7_2 => {
12650                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksApi {
12651                    client: self.client,
12652                };
12653                Ok(api.get_reporting_task(id).await?.into())
12654            }
12655            DetectedVersion::V2_8_0 => {
12656                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksApi {
12657                    client: self.client,
12658                };
12659                Ok(api.get_reporting_task(id).await?.into())
12660            }
12661        }
12662    }
12663    /// Gets the state for a reporting task
12664    pub async fn get_state_4(&self, id: &str) -> Result<types::ComponentStateDto, NifiError> {
12665        match self.version {
12666            DetectedVersion::V2_6_0 => {
12667                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksStateApi {
12668                    client: self.client,
12669                    id,
12670                };
12671                Ok(api.get_state_4().await?.into())
12672            }
12673            DetectedVersion::V2_7_2 => {
12674                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksStateApi {
12675                    client: self.client,
12676                    id,
12677                };
12678                Ok(api.get_state_4().await?.into())
12679            }
12680            DetectedVersion::V2_8_0 => {
12681                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksStateApi {
12682                    client: self.client,
12683                    id,
12684                };
12685                Ok(api.get_state_4().await?.into())
12686            }
12687        }
12688    }
12689    /// Returns the Verification Request with the given ID
12690    pub async fn get_verification_request_3(
12691        &self,
12692        id: &str,
12693        request_id: &str,
12694    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
12695        match self.version {
12696            DetectedVersion::V2_6_0 => {
12697                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksConfigApi {
12698                    client: self.client,
12699                    id,
12700                };
12701                Ok(api.get_verification_request_3(request_id).await?.into())
12702            }
12703            DetectedVersion::V2_7_2 => {
12704                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksConfigApi {
12705                    client: self.client,
12706                    id,
12707                };
12708                Ok(api.get_verification_request_3(request_id).await?.into())
12709            }
12710            DetectedVersion::V2_8_0 => {
12711                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksConfigApi {
12712                    client: self.client,
12713                    id,
12714                };
12715                Ok(api.get_verification_request_3(request_id).await?.into())
12716            }
12717        }
12718    }
12719    /// Deletes a reporting task
12720    pub async fn remove_reporting_task(
12721        &self,
12722        id: &str,
12723        version: Option<&str>,
12724        client_id: Option<&str>,
12725        disconnected_node_acknowledged: Option<bool>,
12726    ) -> Result<types::ReportingTaskEntity, NifiError> {
12727        match self.version {
12728            DetectedVersion::V2_6_0 => {
12729                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksApi {
12730                    client: self.client,
12731                };
12732                Ok(api
12733                    .remove_reporting_task(id, version, client_id, disconnected_node_acknowledged)
12734                    .await?
12735                    .into())
12736            }
12737            DetectedVersion::V2_7_2 => {
12738                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksApi {
12739                    client: self.client,
12740                };
12741                Ok(api
12742                    .remove_reporting_task(id, version, client_id, disconnected_node_acknowledged)
12743                    .await?
12744                    .into())
12745            }
12746            DetectedVersion::V2_8_0 => {
12747                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksApi {
12748                    client: self.client,
12749                };
12750                Ok(api
12751                    .remove_reporting_task(id, version, client_id, disconnected_node_acknowledged)
12752                    .await?
12753                    .into())
12754            }
12755        }
12756    }
12757    /// Performs verification of the Reporting Task's configuration
12758    pub async fn submit_config_verification_request_2(
12759        &self,
12760        id: &str,
12761        body: &serde_json::Value,
12762    ) -> Result<types::VerifyConfigRequestDto, NifiError> {
12763        match self.version {
12764            DetectedVersion::V2_6_0 => {
12765                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksConfigApi {
12766                    client: self.client,
12767                    id,
12768                };
12769                Ok(api
12770                    .submit_config_verification_request_2(
12771                        &serde_json::from_value::<crate::v2_6_0::types::VerifyConfigRequestEntity>(
12772                            body.clone(),
12773                        )
12774                        .map_err(|e| NifiError::UnsupportedEndpoint {
12775                            endpoint: format!(
12776                                "{} (body deserialize: {})",
12777                                "submit_config_verification_request_2", e
12778                            ),
12779                            version: "2.6.0".to_string(),
12780                        })?,
12781                    )
12782                    .await?
12783                    .into())
12784            }
12785            DetectedVersion::V2_7_2 => {
12786                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksConfigApi {
12787                    client: self.client,
12788                    id,
12789                };
12790                Ok(api
12791                    .submit_config_verification_request_2(
12792                        &serde_json::from_value::<crate::v2_7_2::types::VerifyConfigRequestEntity>(
12793                            body.clone(),
12794                        )
12795                        .map_err(|e| NifiError::UnsupportedEndpoint {
12796                            endpoint: format!(
12797                                "{} (body deserialize: {})",
12798                                "submit_config_verification_request_2", e
12799                            ),
12800                            version: "2.7.2".to_string(),
12801                        })?,
12802                    )
12803                    .await?
12804                    .into())
12805            }
12806            DetectedVersion::V2_8_0 => {
12807                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksConfigApi {
12808                    client: self.client,
12809                    id,
12810                };
12811                Ok(api
12812                    .submit_config_verification_request_2(
12813                        &serde_json::from_value::<crate::v2_8_0::types::VerifyConfigRequestEntity>(
12814                            body.clone(),
12815                        )
12816                        .map_err(|e| NifiError::UnsupportedEndpoint {
12817                            endpoint: format!(
12818                                "{} (body deserialize: {})",
12819                                "submit_config_verification_request_2", e
12820                            ),
12821                            version: "2.8.0".to_string(),
12822                        })?,
12823                    )
12824                    .await?
12825                    .into())
12826            }
12827        }
12828    }
12829    /// Updates a reporting task
12830    pub async fn update_reporting_task(
12831        &self,
12832        id: &str,
12833        body: &serde_json::Value,
12834    ) -> Result<types::ReportingTaskEntity, NifiError> {
12835        match self.version {
12836            DetectedVersion::V2_6_0 => {
12837                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksApi {
12838                    client: self.client,
12839                };
12840                Ok(api
12841                    .update_reporting_task(
12842                        id,
12843                        &serde_json::from_value::<crate::v2_6_0::types::ReportingTaskEntity>(
12844                            body.clone(),
12845                        )
12846                        .map_err(|e| NifiError::UnsupportedEndpoint {
12847                            endpoint: format!(
12848                                "{} (body deserialize: {})",
12849                                "update_reporting_task", e
12850                            ),
12851                            version: "2.6.0".to_string(),
12852                        })?,
12853                    )
12854                    .await?
12855                    .into())
12856            }
12857            DetectedVersion::V2_7_2 => {
12858                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksApi {
12859                    client: self.client,
12860                };
12861                Ok(api
12862                    .update_reporting_task(
12863                        id,
12864                        &serde_json::from_value::<crate::v2_7_2::types::ReportingTaskEntity>(
12865                            body.clone(),
12866                        )
12867                        .map_err(|e| NifiError::UnsupportedEndpoint {
12868                            endpoint: format!(
12869                                "{} (body deserialize: {})",
12870                                "update_reporting_task", e
12871                            ),
12872                            version: "2.7.2".to_string(),
12873                        })?,
12874                    )
12875                    .await?
12876                    .into())
12877            }
12878            DetectedVersion::V2_8_0 => {
12879                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksApi {
12880                    client: self.client,
12881                };
12882                Ok(api
12883                    .update_reporting_task(
12884                        id,
12885                        &serde_json::from_value::<crate::v2_8_0::types::ReportingTaskEntity>(
12886                            body.clone(),
12887                        )
12888                        .map_err(|e| NifiError::UnsupportedEndpoint {
12889                            endpoint: format!(
12890                                "{} (body deserialize: {})",
12891                                "update_reporting_task", e
12892                            ),
12893                            version: "2.8.0".to_string(),
12894                        })?,
12895                    )
12896                    .await?
12897                    .into())
12898            }
12899        }
12900    }
12901    /// Updates run status of a reporting task
12902    pub async fn update_run_status_5(
12903        &self,
12904        id: &str,
12905        body: &serde_json::Value,
12906    ) -> Result<types::ReportingTaskEntity, NifiError> {
12907        match self.version {
12908            DetectedVersion::V2_6_0 => {
12909                let api = crate::v2_6_0::api::reportingtasks::ReportingTasksRunStatusApi {
12910                    client: self.client,
12911                    id,
12912                };
12913                Ok(
12914                    api
12915                        .update_run_status_5(
12916                            &serde_json::from_value::<
12917                                crate::v2_6_0::types::ReportingTaskRunStatusEntity,
12918                            >(body.clone())
12919                            .map_err(|e| NifiError::UnsupportedEndpoint {
12920                                endpoint: format!(
12921                                    "{} (body deserialize: {})",
12922                                    "update_run_status_5", e
12923                                ),
12924                                version: "2.6.0".to_string(),
12925                            })?,
12926                        )
12927                        .await?
12928                        .into(),
12929                )
12930            }
12931            DetectedVersion::V2_7_2 => {
12932                let api = crate::v2_7_2::api::reportingtasks::ReportingTasksRunStatusApi {
12933                    client: self.client,
12934                    id,
12935                };
12936                Ok(
12937                    api
12938                        .update_run_status_5(
12939                            &serde_json::from_value::<
12940                                crate::v2_7_2::types::ReportingTaskRunStatusEntity,
12941                            >(body.clone())
12942                            .map_err(|e| NifiError::UnsupportedEndpoint {
12943                                endpoint: format!(
12944                                    "{} (body deserialize: {})",
12945                                    "update_run_status_5", e
12946                                ),
12947                                version: "2.7.2".to_string(),
12948                            })?,
12949                        )
12950                        .await?
12951                        .into(),
12952                )
12953            }
12954            DetectedVersion::V2_8_0 => {
12955                let api = crate::v2_8_0::api::reportingtasks::ReportingTasksRunStatusApi {
12956                    client: self.client,
12957                    id,
12958                };
12959                Ok(
12960                    api
12961                        .update_run_status_5(
12962                            &serde_json::from_value::<
12963                                crate::v2_8_0::types::ReportingTaskRunStatusEntity,
12964                            >(body.clone())
12965                            .map_err(|e| NifiError::UnsupportedEndpoint {
12966                                endpoint: format!(
12967                                    "{} (body deserialize: {})",
12968                                    "update_run_status_5", e
12969                                ),
12970                                version: "2.8.0".to_string(),
12971                            })?,
12972                        )
12973                        .await?
12974                        .into(),
12975                )
12976            }
12977        }
12978    }
12979}
12980/// Dynamic dispatch wrapper for the Resources API.
12981pub struct DynamicResourcesApi<'a> {
12982    client: &'a NifiClient,
12983    version: DetectedVersion,
12984}
12985#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
12986impl<'a> DynamicResourcesApi<'a> {
12987    /// Gets the available resources that support access/authorization policies
12988    pub async fn get_resources(&self) -> Result<types::ResourcesEntity, NifiError> {
12989        match self.version {
12990            DetectedVersion::V2_6_0 => {
12991                let api = crate::v2_6_0::api::resources::ResourcesApi {
12992                    client: self.client,
12993                };
12994                Ok(api.get_resources().await?.into())
12995            }
12996            DetectedVersion::V2_7_2 => {
12997                let api = crate::v2_7_2::api::resources::ResourcesApi {
12998                    client: self.client,
12999                };
13000                Ok(api.get_resources().await?.into())
13001            }
13002            DetectedVersion::V2_8_0 => {
13003                let api = crate::v2_8_0::api::resources::ResourcesApi {
13004                    client: self.client,
13005                };
13006                Ok(api.get_resources().await?.into())
13007            }
13008        }
13009    }
13010}
13011/// Dynamic dispatch wrapper for the SiteToSite API.
13012pub struct DynamicSiteToSiteApi<'a> {
13013    client: &'a NifiClient,
13014    version: DetectedVersion,
13015}
13016#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
13017impl<'a> DynamicSiteToSiteApi<'a> {
13018    /// Returns the available Peers and its status of this NiFi
13019    pub async fn get_peers(&self) -> Result<types::PeersEntity, NifiError> {
13020        match self.version {
13021            DetectedVersion::V2_6_0 => {
13022                let api = crate::v2_6_0::api::sitetosite::SiteToSiteApi {
13023                    client: self.client,
13024                };
13025                Ok(api.get_peers().await?.into())
13026            }
13027            DetectedVersion::V2_7_2 => {
13028                let api = crate::v2_7_2::api::sitetosite::SiteToSiteApi {
13029                    client: self.client,
13030                };
13031                Ok(api.get_peers().await?.into())
13032            }
13033            DetectedVersion::V2_8_0 => {
13034                let api = crate::v2_8_0::api::sitetosite::SiteToSiteApi {
13035                    client: self.client,
13036                };
13037                Ok(api.get_peers().await?.into())
13038            }
13039        }
13040    }
13041    /// Returns the details about this NiFi necessary to communicate via site to site
13042    pub async fn get_site_to_site_details(&self) -> Result<types::ControllerDto, NifiError> {
13043        match self.version {
13044            DetectedVersion::V2_6_0 => {
13045                let api = crate::v2_6_0::api::sitetosite::SiteToSiteApi {
13046                    client: self.client,
13047                };
13048                Ok(api.get_site_to_site_details().await?.into())
13049            }
13050            DetectedVersion::V2_7_2 => {
13051                let api = crate::v2_7_2::api::sitetosite::SiteToSiteApi {
13052                    client: self.client,
13053                };
13054                Ok(api.get_site_to_site_details().await?.into())
13055            }
13056            DetectedVersion::V2_8_0 => {
13057                let api = crate::v2_8_0::api::sitetosite::SiteToSiteApi {
13058                    client: self.client,
13059                };
13060                Ok(api.get_site_to_site_details().await?.into())
13061            }
13062        }
13063    }
13064}
13065/// Dynamic dispatch wrapper for the Snippets API.
13066pub struct DynamicSnippetsApi<'a> {
13067    client: &'a NifiClient,
13068    version: DetectedVersion,
13069}
13070#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
13071impl<'a> DynamicSnippetsApi<'a> {
13072    /// Creates a snippet. The snippet will be automatically discarded if not used in a subsequent request after 1 minute.
13073    pub async fn create_snippet(
13074        &self,
13075        body: &serde_json::Value,
13076    ) -> Result<types::SnippetEntity, NifiError> {
13077        match self.version {
13078            DetectedVersion::V2_6_0 => {
13079                let api = crate::v2_6_0::api::snippets::SnippetsApi {
13080                    client: self.client,
13081                };
13082                Ok(api
13083                    .create_snippet(
13084                        &serde_json::from_value::<crate::v2_6_0::types::SnippetEntity>(
13085                            body.clone(),
13086                        )
13087                        .map_err(|e| NifiError::UnsupportedEndpoint {
13088                            endpoint: format!("{} (body deserialize: {})", "create_snippet", e),
13089                            version: "2.6.0".to_string(),
13090                        })?,
13091                    )
13092                    .await?
13093                    .into())
13094            }
13095            DetectedVersion::V2_7_2 => {
13096                let api = crate::v2_7_2::api::snippets::SnippetsApi {
13097                    client: self.client,
13098                };
13099                Ok(api
13100                    .create_snippet(
13101                        &serde_json::from_value::<crate::v2_7_2::types::SnippetEntity>(
13102                            body.clone(),
13103                        )
13104                        .map_err(|e| NifiError::UnsupportedEndpoint {
13105                            endpoint: format!("{} (body deserialize: {})", "create_snippet", e),
13106                            version: "2.7.2".to_string(),
13107                        })?,
13108                    )
13109                    .await?
13110                    .into())
13111            }
13112            DetectedVersion::V2_8_0 => {
13113                let api = crate::v2_8_0::api::snippets::SnippetsApi {
13114                    client: self.client,
13115                };
13116                Ok(api
13117                    .create_snippet(
13118                        &serde_json::from_value::<crate::v2_8_0::types::SnippetEntity>(
13119                            body.clone(),
13120                        )
13121                        .map_err(|e| NifiError::UnsupportedEndpoint {
13122                            endpoint: format!("{} (body deserialize: {})", "create_snippet", e),
13123                            version: "2.8.0".to_string(),
13124                        })?,
13125                    )
13126                    .await?
13127                    .into())
13128            }
13129        }
13130    }
13131    /// Deletes the components in a snippet and discards the snippet
13132    pub async fn delete_snippet(
13133        &self,
13134        id: &str,
13135        disconnected_node_acknowledged: Option<bool>,
13136    ) -> Result<types::SnippetEntity, NifiError> {
13137        match self.version {
13138            DetectedVersion::V2_6_0 => {
13139                let api = crate::v2_6_0::api::snippets::SnippetsApi {
13140                    client: self.client,
13141                };
13142                Ok(api
13143                    .delete_snippet(id, disconnected_node_acknowledged)
13144                    .await?
13145                    .into())
13146            }
13147            DetectedVersion::V2_7_2 => {
13148                let api = crate::v2_7_2::api::snippets::SnippetsApi {
13149                    client: self.client,
13150                };
13151                Ok(api
13152                    .delete_snippet(id, disconnected_node_acknowledged)
13153                    .await?
13154                    .into())
13155            }
13156            DetectedVersion::V2_8_0 => {
13157                let api = crate::v2_8_0::api::snippets::SnippetsApi {
13158                    client: self.client,
13159                };
13160                Ok(api
13161                    .delete_snippet(id, disconnected_node_acknowledged)
13162                    .await?
13163                    .into())
13164            }
13165        }
13166    }
13167    /// Move's the components in this Snippet into a new Process Group and discards the snippet
13168    pub async fn update_snippet(
13169        &self,
13170        id: &str,
13171        body: &serde_json::Value,
13172    ) -> Result<types::SnippetEntity, NifiError> {
13173        match self.version {
13174            DetectedVersion::V2_6_0 => {
13175                let api = crate::v2_6_0::api::snippets::SnippetsApi {
13176                    client: self.client,
13177                };
13178                Ok(api
13179                    .update_snippet(
13180                        id,
13181                        &serde_json::from_value::<crate::v2_6_0::types::SnippetEntity>(
13182                            body.clone(),
13183                        )
13184                        .map_err(|e| NifiError::UnsupportedEndpoint {
13185                            endpoint: format!("{} (body deserialize: {})", "update_snippet", e),
13186                            version: "2.6.0".to_string(),
13187                        })?,
13188                    )
13189                    .await?
13190                    .into())
13191            }
13192            DetectedVersion::V2_7_2 => {
13193                let api = crate::v2_7_2::api::snippets::SnippetsApi {
13194                    client: self.client,
13195                };
13196                Ok(api
13197                    .update_snippet(
13198                        id,
13199                        &serde_json::from_value::<crate::v2_7_2::types::SnippetEntity>(
13200                            body.clone(),
13201                        )
13202                        .map_err(|e| NifiError::UnsupportedEndpoint {
13203                            endpoint: format!("{} (body deserialize: {})", "update_snippet", e),
13204                            version: "2.7.2".to_string(),
13205                        })?,
13206                    )
13207                    .await?
13208                    .into())
13209            }
13210            DetectedVersion::V2_8_0 => {
13211                let api = crate::v2_8_0::api::snippets::SnippetsApi {
13212                    client: self.client,
13213                };
13214                Ok(api
13215                    .update_snippet(
13216                        id,
13217                        &serde_json::from_value::<crate::v2_8_0::types::SnippetEntity>(
13218                            body.clone(),
13219                        )
13220                        .map_err(|e| NifiError::UnsupportedEndpoint {
13221                            endpoint: format!("{} (body deserialize: {})", "update_snippet", e),
13222                            version: "2.8.0".to_string(),
13223                        })?,
13224                    )
13225                    .await?
13226                    .into())
13227            }
13228        }
13229    }
13230}
13231/// Dynamic dispatch wrapper for the SystemDiagnostics API.
13232pub struct DynamicSystemDiagnosticsApi<'a> {
13233    client: &'a NifiClient,
13234    version: DetectedVersion,
13235}
13236#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
13237impl<'a> DynamicSystemDiagnosticsApi<'a> {
13238    /// Retrieve available JMX metrics
13239    pub async fn get_jmx_metrics(
13240        &self,
13241        bean_name_filter: Option<&str>,
13242    ) -> Result<types::JmxMetricsResultsEntity, NifiError> {
13243        match self.version {
13244            DetectedVersion::V2_6_0 => {
13245                let api = crate::v2_6_0::api::systemdiagnostics::SystemDiagnosticsApi {
13246                    client: self.client,
13247                };
13248                Ok(api.get_jmx_metrics(bean_name_filter).await?.into())
13249            }
13250            DetectedVersion::V2_7_2 => {
13251                let api = crate::v2_7_2::api::systemdiagnostics::SystemDiagnosticsApi {
13252                    client: self.client,
13253                };
13254                Ok(api.get_jmx_metrics(bean_name_filter).await?.into())
13255            }
13256            DetectedVersion::V2_8_0 => {
13257                let api = crate::v2_8_0::api::systemdiagnostics::SystemDiagnosticsApi {
13258                    client: self.client,
13259                };
13260                Ok(api.get_jmx_metrics(bean_name_filter).await?.into())
13261            }
13262        }
13263    }
13264    /// Gets the diagnostics for the system NiFi is running on
13265    pub async fn get_system_diagnostics(
13266        &self,
13267        nodewise: Option<bool>,
13268        diagnostic_level: Option<&str>,
13269        cluster_node_id: Option<&str>,
13270    ) -> Result<types::SystemDiagnosticsDto, NifiError> {
13271        match self.version {
13272            DetectedVersion::V2_6_0 => {
13273                let api = crate::v2_6_0::api::systemdiagnostics::SystemDiagnosticsApi {
13274                    client: self.client,
13275                };
13276                Ok(api
13277                    .get_system_diagnostics(
13278                        nodewise,
13279                        diagnostic_level
13280                            .map(|v| {
13281                                serde_json::from_value::<crate::v2_6_0::types::DiagnosticLevel>(
13282                                    serde_json::Value::String(v.to_string()),
13283                                )
13284                            })
13285                            .transpose()
13286                            .map_err(|_| NifiError::UnsupportedEndpoint {
13287                                endpoint: "get_system_diagnostics".to_string(),
13288                                version: "2.6.0".to_string(),
13289                            })?,
13290                        cluster_node_id,
13291                    )
13292                    .await?
13293                    .into())
13294            }
13295            DetectedVersion::V2_7_2 => {
13296                let api = crate::v2_7_2::api::systemdiagnostics::SystemDiagnosticsApi {
13297                    client: self.client,
13298                };
13299                Ok(api
13300                    .get_system_diagnostics(
13301                        nodewise,
13302                        diagnostic_level
13303                            .map(|v| {
13304                                serde_json::from_value::<crate::v2_7_2::types::DiagnosticLevel>(
13305                                    serde_json::Value::String(v.to_string()),
13306                                )
13307                            })
13308                            .transpose()
13309                            .map_err(|_| NifiError::UnsupportedEndpoint {
13310                                endpoint: "get_system_diagnostics".to_string(),
13311                                version: "2.7.2".to_string(),
13312                            })?,
13313                        cluster_node_id,
13314                    )
13315                    .await?
13316                    .into())
13317            }
13318            DetectedVersion::V2_8_0 => {
13319                let api = crate::v2_8_0::api::systemdiagnostics::SystemDiagnosticsApi {
13320                    client: self.client,
13321                };
13322                Ok(api
13323                    .get_system_diagnostics(
13324                        nodewise,
13325                        diagnostic_level
13326                            .map(|v| {
13327                                serde_json::from_value::<crate::v2_8_0::types::DiagnosticLevel>(
13328                                    serde_json::Value::String(v.to_string()),
13329                                )
13330                            })
13331                            .transpose()
13332                            .map_err(|_| NifiError::UnsupportedEndpoint {
13333                                endpoint: "get_system_diagnostics".to_string(),
13334                                version: "2.8.0".to_string(),
13335                            })?,
13336                        cluster_node_id,
13337                    )
13338                    .await?
13339                    .into())
13340            }
13341        }
13342    }
13343}
13344/// Dynamic dispatch wrapper for the Tenants API.
13345pub struct DynamicTenantsApi<'a> {
13346    client: &'a NifiClient,
13347    version: DetectedVersion,
13348}
13349#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
13350impl<'a> DynamicTenantsApi<'a> {
13351    /// Creates a user
13352    pub async fn create_user(
13353        &self,
13354        body: &serde_json::Value,
13355    ) -> Result<types::UserEntity, NifiError> {
13356        match self.version {
13357            DetectedVersion::V2_6_0 => {
13358                let api = crate::v2_6_0::api::tenants::TenantsApi {
13359                    client: self.client,
13360                };
13361                Ok(api
13362                    .create_user(
13363                        &serde_json::from_value::<crate::v2_6_0::types::UserEntity>(body.clone())
13364                            .map_err(|e| NifiError::UnsupportedEndpoint {
13365                            endpoint: format!("{} (body deserialize: {})", "create_user", e),
13366                            version: "2.6.0".to_string(),
13367                        })?,
13368                    )
13369                    .await?
13370                    .into())
13371            }
13372            DetectedVersion::V2_7_2 => {
13373                let api = crate::v2_7_2::api::tenants::TenantsApi {
13374                    client: self.client,
13375                };
13376                Ok(api
13377                    .create_user(
13378                        &serde_json::from_value::<crate::v2_7_2::types::UserEntity>(body.clone())
13379                            .map_err(|e| NifiError::UnsupportedEndpoint {
13380                            endpoint: format!("{} (body deserialize: {})", "create_user", e),
13381                            version: "2.7.2".to_string(),
13382                        })?,
13383                    )
13384                    .await?
13385                    .into())
13386            }
13387            DetectedVersion::V2_8_0 => {
13388                let api = crate::v2_8_0::api::tenants::TenantsApi {
13389                    client: self.client,
13390                };
13391                Ok(api
13392                    .create_user(
13393                        &serde_json::from_value::<crate::v2_8_0::types::UserEntity>(body.clone())
13394                            .map_err(|e| NifiError::UnsupportedEndpoint {
13395                            endpoint: format!("{} (body deserialize: {})", "create_user", e),
13396                            version: "2.8.0".to_string(),
13397                        })?,
13398                    )
13399                    .await?
13400                    .into())
13401            }
13402        }
13403    }
13404    /// Creates a user group
13405    pub async fn create_user_group(
13406        &self,
13407        body: &serde_json::Value,
13408    ) -> Result<types::UserGroupEntity, NifiError> {
13409        match self.version {
13410            DetectedVersion::V2_6_0 => {
13411                let api = crate::v2_6_0::api::tenants::TenantsApi {
13412                    client: self.client,
13413                };
13414                Ok(api
13415                    .create_user_group(
13416                        &serde_json::from_value::<crate::v2_6_0::types::UserGroupEntity>(
13417                            body.clone(),
13418                        )
13419                        .map_err(|e| NifiError::UnsupportedEndpoint {
13420                            endpoint: format!("{} (body deserialize: {})", "create_user_group", e),
13421                            version: "2.6.0".to_string(),
13422                        })?,
13423                    )
13424                    .await?
13425                    .into())
13426            }
13427            DetectedVersion::V2_7_2 => {
13428                let api = crate::v2_7_2::api::tenants::TenantsApi {
13429                    client: self.client,
13430                };
13431                Ok(api
13432                    .create_user_group(
13433                        &serde_json::from_value::<crate::v2_7_2::types::UserGroupEntity>(
13434                            body.clone(),
13435                        )
13436                        .map_err(|e| NifiError::UnsupportedEndpoint {
13437                            endpoint: format!("{} (body deserialize: {})", "create_user_group", e),
13438                            version: "2.7.2".to_string(),
13439                        })?,
13440                    )
13441                    .await?
13442                    .into())
13443            }
13444            DetectedVersion::V2_8_0 => {
13445                let api = crate::v2_8_0::api::tenants::TenantsApi {
13446                    client: self.client,
13447                };
13448                Ok(api
13449                    .create_user_group(
13450                        &serde_json::from_value::<crate::v2_8_0::types::UserGroupEntity>(
13451                            body.clone(),
13452                        )
13453                        .map_err(|e| NifiError::UnsupportedEndpoint {
13454                            endpoint: format!("{} (body deserialize: {})", "create_user_group", e),
13455                            version: "2.8.0".to_string(),
13456                        })?,
13457                    )
13458                    .await?
13459                    .into())
13460            }
13461        }
13462    }
13463    /// Gets a user
13464    pub async fn get_user(&self, id: &str) -> Result<types::UserEntity, NifiError> {
13465        match self.version {
13466            DetectedVersion::V2_6_0 => {
13467                let api = crate::v2_6_0::api::tenants::TenantsApi {
13468                    client: self.client,
13469                };
13470                Ok(api.get_user(id).await?.into())
13471            }
13472            DetectedVersion::V2_7_2 => {
13473                let api = crate::v2_7_2::api::tenants::TenantsApi {
13474                    client: self.client,
13475                };
13476                Ok(api.get_user(id).await?.into())
13477            }
13478            DetectedVersion::V2_8_0 => {
13479                let api = crate::v2_8_0::api::tenants::TenantsApi {
13480                    client: self.client,
13481                };
13482                Ok(api.get_user(id).await?.into())
13483            }
13484        }
13485    }
13486    /// Gets a user group
13487    pub async fn get_user_group(&self, id: &str) -> Result<types::UserGroupEntity, NifiError> {
13488        match self.version {
13489            DetectedVersion::V2_6_0 => {
13490                let api = crate::v2_6_0::api::tenants::TenantsApi {
13491                    client: self.client,
13492                };
13493                Ok(api.get_user_group(id).await?.into())
13494            }
13495            DetectedVersion::V2_7_2 => {
13496                let api = crate::v2_7_2::api::tenants::TenantsApi {
13497                    client: self.client,
13498                };
13499                Ok(api.get_user_group(id).await?.into())
13500            }
13501            DetectedVersion::V2_8_0 => {
13502                let api = crate::v2_8_0::api::tenants::TenantsApi {
13503                    client: self.client,
13504                };
13505                Ok(api.get_user_group(id).await?.into())
13506            }
13507        }
13508    }
13509    /// Gets all user groups
13510    pub async fn get_user_groups(&self) -> Result<types::UserGroupsEntity, NifiError> {
13511        match self.version {
13512            DetectedVersion::V2_6_0 => {
13513                let api = crate::v2_6_0::api::tenants::TenantsApi {
13514                    client: self.client,
13515                };
13516                Ok(api.get_user_groups().await?.into())
13517            }
13518            DetectedVersion::V2_7_2 => {
13519                let api = crate::v2_7_2::api::tenants::TenantsApi {
13520                    client: self.client,
13521                };
13522                Ok(api.get_user_groups().await?.into())
13523            }
13524            DetectedVersion::V2_8_0 => {
13525                let api = crate::v2_8_0::api::tenants::TenantsApi {
13526                    client: self.client,
13527                };
13528                Ok(api.get_user_groups().await?.into())
13529            }
13530        }
13531    }
13532    /// Gets all users
13533    pub async fn get_users(&self) -> Result<types::UsersEntity, NifiError> {
13534        match self.version {
13535            DetectedVersion::V2_6_0 => {
13536                let api = crate::v2_6_0::api::tenants::TenantsApi {
13537                    client: self.client,
13538                };
13539                Ok(api.get_users().await?.into())
13540            }
13541            DetectedVersion::V2_7_2 => {
13542                let api = crate::v2_7_2::api::tenants::TenantsApi {
13543                    client: self.client,
13544                };
13545                Ok(api.get_users().await?.into())
13546            }
13547            DetectedVersion::V2_8_0 => {
13548                let api = crate::v2_8_0::api::tenants::TenantsApi {
13549                    client: self.client,
13550                };
13551                Ok(api.get_users().await?.into())
13552            }
13553        }
13554    }
13555    /// Deletes a user
13556    pub async fn remove_user(
13557        &self,
13558        id: &str,
13559        version: Option<&str>,
13560        client_id: Option<&str>,
13561        disconnected_node_acknowledged: Option<bool>,
13562    ) -> Result<types::UserEntity, NifiError> {
13563        match self.version {
13564            DetectedVersion::V2_6_0 => {
13565                let api = crate::v2_6_0::api::tenants::TenantsApi {
13566                    client: self.client,
13567                };
13568                Ok(api
13569                    .remove_user(id, version, client_id, disconnected_node_acknowledged)
13570                    .await?
13571                    .into())
13572            }
13573            DetectedVersion::V2_7_2 => {
13574                let api = crate::v2_7_2::api::tenants::TenantsApi {
13575                    client: self.client,
13576                };
13577                Ok(api
13578                    .remove_user(id, version, client_id, disconnected_node_acknowledged)
13579                    .await?
13580                    .into())
13581            }
13582            DetectedVersion::V2_8_0 => {
13583                let api = crate::v2_8_0::api::tenants::TenantsApi {
13584                    client: self.client,
13585                };
13586                Ok(api
13587                    .remove_user(id, version, client_id, disconnected_node_acknowledged)
13588                    .await?
13589                    .into())
13590            }
13591        }
13592    }
13593    /// Deletes a user group
13594    pub async fn remove_user_group(
13595        &self,
13596        id: &str,
13597        version: Option<&str>,
13598        client_id: Option<&str>,
13599        disconnected_node_acknowledged: Option<bool>,
13600    ) -> Result<types::UserGroupEntity, NifiError> {
13601        match self.version {
13602            DetectedVersion::V2_6_0 => {
13603                let api = crate::v2_6_0::api::tenants::TenantsApi {
13604                    client: self.client,
13605                };
13606                Ok(api
13607                    .remove_user_group(id, version, client_id, disconnected_node_acknowledged)
13608                    .await?
13609                    .into())
13610            }
13611            DetectedVersion::V2_7_2 => {
13612                let api = crate::v2_7_2::api::tenants::TenantsApi {
13613                    client: self.client,
13614                };
13615                Ok(api
13616                    .remove_user_group(id, version, client_id, disconnected_node_acknowledged)
13617                    .await?
13618                    .into())
13619            }
13620            DetectedVersion::V2_8_0 => {
13621                let api = crate::v2_8_0::api::tenants::TenantsApi {
13622                    client: self.client,
13623                };
13624                Ok(api
13625                    .remove_user_group(id, version, client_id, disconnected_node_acknowledged)
13626                    .await?
13627                    .into())
13628            }
13629        }
13630    }
13631    /// Searches for a tenant with the specified identity
13632    pub async fn search_tenants(&self, q: &str) -> Result<types::TenantsEntity, NifiError> {
13633        match self.version {
13634            DetectedVersion::V2_6_0 => {
13635                let api = crate::v2_6_0::api::tenants::TenantsApi {
13636                    client: self.client,
13637                };
13638                Ok(api.search_tenants(q).await?.into())
13639            }
13640            DetectedVersion::V2_7_2 => {
13641                let api = crate::v2_7_2::api::tenants::TenantsApi {
13642                    client: self.client,
13643                };
13644                Ok(api.search_tenants(q).await?.into())
13645            }
13646            DetectedVersion::V2_8_0 => {
13647                let api = crate::v2_8_0::api::tenants::TenantsApi {
13648                    client: self.client,
13649                };
13650                Ok(api.search_tenants(q).await?.into())
13651            }
13652        }
13653    }
13654    /// Updates a user
13655    pub async fn update_user(
13656        &self,
13657        id: &str,
13658        body: &serde_json::Value,
13659    ) -> Result<types::UserEntity, NifiError> {
13660        match self.version {
13661            DetectedVersion::V2_6_0 => {
13662                let api = crate::v2_6_0::api::tenants::TenantsApi {
13663                    client: self.client,
13664                };
13665                Ok(api
13666                    .update_user(
13667                        id,
13668                        &serde_json::from_value::<crate::v2_6_0::types::UserEntity>(body.clone())
13669                            .map_err(|e| NifiError::UnsupportedEndpoint {
13670                            endpoint: format!("{} (body deserialize: {})", "update_user", e),
13671                            version: "2.6.0".to_string(),
13672                        })?,
13673                    )
13674                    .await?
13675                    .into())
13676            }
13677            DetectedVersion::V2_7_2 => {
13678                let api = crate::v2_7_2::api::tenants::TenantsApi {
13679                    client: self.client,
13680                };
13681                Ok(api
13682                    .update_user(
13683                        id,
13684                        &serde_json::from_value::<crate::v2_7_2::types::UserEntity>(body.clone())
13685                            .map_err(|e| NifiError::UnsupportedEndpoint {
13686                            endpoint: format!("{} (body deserialize: {})", "update_user", e),
13687                            version: "2.7.2".to_string(),
13688                        })?,
13689                    )
13690                    .await?
13691                    .into())
13692            }
13693            DetectedVersion::V2_8_0 => {
13694                let api = crate::v2_8_0::api::tenants::TenantsApi {
13695                    client: self.client,
13696                };
13697                Ok(api
13698                    .update_user(
13699                        id,
13700                        &serde_json::from_value::<crate::v2_8_0::types::UserEntity>(body.clone())
13701                            .map_err(|e| NifiError::UnsupportedEndpoint {
13702                            endpoint: format!("{} (body deserialize: {})", "update_user", e),
13703                            version: "2.8.0".to_string(),
13704                        })?,
13705                    )
13706                    .await?
13707                    .into())
13708            }
13709        }
13710    }
13711    /// Updates a user group
13712    pub async fn update_user_group(
13713        &self,
13714        id: &str,
13715        body: &serde_json::Value,
13716    ) -> Result<types::UserGroupEntity, NifiError> {
13717        match self.version {
13718            DetectedVersion::V2_6_0 => {
13719                let api = crate::v2_6_0::api::tenants::TenantsApi {
13720                    client: self.client,
13721                };
13722                Ok(api
13723                    .update_user_group(
13724                        id,
13725                        &serde_json::from_value::<crate::v2_6_0::types::UserGroupEntity>(
13726                            body.clone(),
13727                        )
13728                        .map_err(|e| NifiError::UnsupportedEndpoint {
13729                            endpoint: format!("{} (body deserialize: {})", "update_user_group", e),
13730                            version: "2.6.0".to_string(),
13731                        })?,
13732                    )
13733                    .await?
13734                    .into())
13735            }
13736            DetectedVersion::V2_7_2 => {
13737                let api = crate::v2_7_2::api::tenants::TenantsApi {
13738                    client: self.client,
13739                };
13740                Ok(api
13741                    .update_user_group(
13742                        id,
13743                        &serde_json::from_value::<crate::v2_7_2::types::UserGroupEntity>(
13744                            body.clone(),
13745                        )
13746                        .map_err(|e| NifiError::UnsupportedEndpoint {
13747                            endpoint: format!("{} (body deserialize: {})", "update_user_group", e),
13748                            version: "2.7.2".to_string(),
13749                        })?,
13750                    )
13751                    .await?
13752                    .into())
13753            }
13754            DetectedVersion::V2_8_0 => {
13755                let api = crate::v2_8_0::api::tenants::TenantsApi {
13756                    client: self.client,
13757                };
13758                Ok(api
13759                    .update_user_group(
13760                        id,
13761                        &serde_json::from_value::<crate::v2_8_0::types::UserGroupEntity>(
13762                            body.clone(),
13763                        )
13764                        .map_err(|e| NifiError::UnsupportedEndpoint {
13765                            endpoint: format!("{} (body deserialize: {})", "update_user_group", e),
13766                            version: "2.8.0".to_string(),
13767                        })?,
13768                    )
13769                    .await?
13770                    .into())
13771            }
13772        }
13773    }
13774}
13775/// Dynamic dispatch wrapper for the Versions API.
13776pub struct DynamicVersionsApi<'a> {
13777    client: &'a NifiClient,
13778    version: DetectedVersion,
13779}
13780#[allow(clippy::too_many_arguments, clippy::vec_init_then_push)]
13781impl<'a> DynamicVersionsApi<'a> {
13782    /// Create a version control request
13783    pub async fn create_version_control_request(
13784        &self,
13785        body: &serde_json::Value,
13786    ) -> Result<(), NifiError> {
13787        match self.version {
13788            DetectedVersion::V2_6_0 => {
13789                let api = crate::v2_6_0::api::versions::VersionsApi {
13790                    client: self.client,
13791                };
13792                api.create_version_control_request(
13793                    &serde_json::from_value::<crate::v2_6_0::types::CreateActiveRequestEntity>(
13794                        body.clone(),
13795                    )
13796                    .map_err(|e| NifiError::UnsupportedEndpoint {
13797                        endpoint: format!(
13798                            "{} (body deserialize: {})",
13799                            "create_version_control_request", e
13800                        ),
13801                        version: "2.6.0".to_string(),
13802                    })?,
13803                )
13804                .await
13805            }
13806            DetectedVersion::V2_7_2 => {
13807                let api = crate::v2_7_2::api::versions::VersionsApi {
13808                    client: self.client,
13809                };
13810                api.create_version_control_request(
13811                    &serde_json::from_value::<crate::v2_7_2::types::CreateActiveRequestEntity>(
13812                        body.clone(),
13813                    )
13814                    .map_err(|e| NifiError::UnsupportedEndpoint {
13815                        endpoint: format!(
13816                            "{} (body deserialize: {})",
13817                            "create_version_control_request", e
13818                        ),
13819                        version: "2.7.2".to_string(),
13820                    })?,
13821                )
13822                .await
13823            }
13824            DetectedVersion::V2_8_0 => {
13825                let api = crate::v2_8_0::api::versions::VersionsApi {
13826                    client: self.client,
13827                };
13828                api.create_version_control_request(
13829                    &serde_json::from_value::<crate::v2_8_0::types::CreateActiveRequestEntity>(
13830                        body.clone(),
13831                    )
13832                    .map_err(|e| NifiError::UnsupportedEndpoint {
13833                        endpoint: format!(
13834                            "{} (body deserialize: {})",
13835                            "create_version_control_request", e
13836                        ),
13837                        version: "2.8.0".to_string(),
13838                    })?,
13839                )
13840                .await
13841            }
13842        }
13843    }
13844    /// Deletes the Revert Request with the given ID
13845    pub async fn delete_revert_request(
13846        &self,
13847        id: &str,
13848        disconnected_node_acknowledged: Option<bool>,
13849    ) -> Result<types::VersionedFlowUpdateRequestEntity, NifiError> {
13850        match self.version {
13851            DetectedVersion::V2_6_0 => {
13852                let api = crate::v2_6_0::api::versions::VersionsApi {
13853                    client: self.client,
13854                };
13855                Ok(api
13856                    .delete_revert_request(id, disconnected_node_acknowledged)
13857                    .await?
13858                    .into())
13859            }
13860            DetectedVersion::V2_7_2 => {
13861                let api = crate::v2_7_2::api::versions::VersionsApi {
13862                    client: self.client,
13863                };
13864                Ok(api
13865                    .delete_revert_request(id, disconnected_node_acknowledged)
13866                    .await?
13867                    .into())
13868            }
13869            DetectedVersion::V2_8_0 => {
13870                let api = crate::v2_8_0::api::versions::VersionsApi {
13871                    client: self.client,
13872                };
13873                Ok(api
13874                    .delete_revert_request(id, disconnected_node_acknowledged)
13875                    .await?
13876                    .into())
13877            }
13878        }
13879    }
13880    /// Deletes the Update Request with the given ID
13881    pub async fn delete_update_request_1(
13882        &self,
13883        id: &str,
13884        disconnected_node_acknowledged: Option<bool>,
13885    ) -> Result<types::VersionedFlowUpdateRequestEntity, NifiError> {
13886        match self.version {
13887            DetectedVersion::V2_6_0 => {
13888                let api = crate::v2_6_0::api::versions::VersionsApi {
13889                    client: self.client,
13890                };
13891                Ok(api
13892                    .delete_update_request_1(id, disconnected_node_acknowledged)
13893                    .await?
13894                    .into())
13895            }
13896            DetectedVersion::V2_7_2 => {
13897                let api = crate::v2_7_2::api::versions::VersionsApi {
13898                    client: self.client,
13899                };
13900                Ok(api
13901                    .delete_update_request_1(id, disconnected_node_acknowledged)
13902                    .await?
13903                    .into())
13904            }
13905            DetectedVersion::V2_8_0 => {
13906                let api = crate::v2_8_0::api::versions::VersionsApi {
13907                    client: self.client,
13908                };
13909                Ok(api
13910                    .delete_update_request_1(id, disconnected_node_acknowledged)
13911                    .await?
13912                    .into())
13913            }
13914        }
13915    }
13916    /// Deletes the version control request with the given ID
13917    pub async fn delete_version_control_request(
13918        &self,
13919        id: &str,
13920        disconnected_node_acknowledged: Option<bool>,
13921    ) -> Result<(), NifiError> {
13922        match self.version {
13923            DetectedVersion::V2_6_0 => {
13924                let api = crate::v2_6_0::api::versions::VersionsApi {
13925                    client: self.client,
13926                };
13927                api.delete_version_control_request(id, disconnected_node_acknowledged)
13928                    .await
13929            }
13930            DetectedVersion::V2_7_2 => {
13931                let api = crate::v2_7_2::api::versions::VersionsApi {
13932                    client: self.client,
13933                };
13934                api.delete_version_control_request(id, disconnected_node_acknowledged)
13935                    .await
13936            }
13937            DetectedVersion::V2_8_0 => {
13938                let api = crate::v2_8_0::api::versions::VersionsApi {
13939                    client: self.client,
13940                };
13941                api.delete_version_control_request(id, disconnected_node_acknowledged)
13942                    .await
13943            }
13944        }
13945    }
13946    /// Gets the latest version of a Process Group for download
13947    pub async fn export_flow_version(&self, id: &str) -> Result<(), NifiError> {
13948        match self.version {
13949            DetectedVersion::V2_6_0 => {
13950                let api = crate::v2_6_0::api::versions::VersionsDownloadApi {
13951                    client: self.client,
13952                    id,
13953                };
13954                api.export_flow_version().await
13955            }
13956            DetectedVersion::V2_7_2 => {
13957                let api = crate::v2_7_2::api::versions::VersionsDownloadApi {
13958                    client: self.client,
13959                    id,
13960                };
13961                api.export_flow_version().await
13962            }
13963            DetectedVersion::V2_8_0 => {
13964                let api = crate::v2_8_0::api::versions::VersionsDownloadApi {
13965                    client: self.client,
13966                    id,
13967                };
13968                api.export_flow_version().await
13969            }
13970        }
13971    }
13972    /// Returns the Revert Request with the given ID
13973    pub async fn get_revert_request(
13974        &self,
13975        id: &str,
13976    ) -> Result<types::VersionedFlowUpdateRequestEntity, NifiError> {
13977        match self.version {
13978            DetectedVersion::V2_6_0 => {
13979                let api = crate::v2_6_0::api::versions::VersionsApi {
13980                    client: self.client,
13981                };
13982                Ok(api.get_revert_request(id).await?.into())
13983            }
13984            DetectedVersion::V2_7_2 => {
13985                let api = crate::v2_7_2::api::versions::VersionsApi {
13986                    client: self.client,
13987                };
13988                Ok(api.get_revert_request(id).await?.into())
13989            }
13990            DetectedVersion::V2_8_0 => {
13991                let api = crate::v2_8_0::api::versions::VersionsApi {
13992                    client: self.client,
13993                };
13994                Ok(api.get_revert_request(id).await?.into())
13995            }
13996        }
13997    }
13998    /// Returns the Update Request with the given ID
13999    pub async fn get_update_request(
14000        &self,
14001        id: &str,
14002    ) -> Result<types::VersionedFlowUpdateRequestEntity, NifiError> {
14003        match self.version {
14004            DetectedVersion::V2_6_0 => {
14005                let api = crate::v2_6_0::api::versions::VersionsApi {
14006                    client: self.client,
14007                };
14008                Ok(api.get_update_request(id).await?.into())
14009            }
14010            DetectedVersion::V2_7_2 => {
14011                let api = crate::v2_7_2::api::versions::VersionsApi {
14012                    client: self.client,
14013                };
14014                Ok(api.get_update_request(id).await?.into())
14015            }
14016            DetectedVersion::V2_8_0 => {
14017                let api = crate::v2_8_0::api::versions::VersionsApi {
14018                    client: self.client,
14019                };
14020                Ok(api.get_update_request(id).await?.into())
14021            }
14022        }
14023    }
14024    /// Gets the Version Control information for a process group
14025    pub async fn get_version_information(
14026        &self,
14027        id: &str,
14028    ) -> Result<types::VersionControlInformationEntity, NifiError> {
14029        match self.version {
14030            DetectedVersion::V2_6_0 => {
14031                let api = crate::v2_6_0::api::versions::VersionsApi {
14032                    client: self.client,
14033                };
14034                Ok(api.get_version_information(id).await?.into())
14035            }
14036            DetectedVersion::V2_7_2 => {
14037                let api = crate::v2_7_2::api::versions::VersionsApi {
14038                    client: self.client,
14039                };
14040                Ok(api.get_version_information(id).await?.into())
14041            }
14042            DetectedVersion::V2_8_0 => {
14043                let api = crate::v2_8_0::api::versions::VersionsApi {
14044                    client: self.client,
14045                };
14046                Ok(api.get_version_information(id).await?.into())
14047            }
14048        }
14049    }
14050    /// Initiate the Revert Request of a Process Group with the given ID
14051    pub async fn initiate_revert_flow_version(
14052        &self,
14053        id: &str,
14054        body: &serde_json::Value,
14055    ) -> Result<types::VersionedFlowUpdateRequestEntity, NifiError> {
14056        match self.version {
14057            DetectedVersion::V2_6_0 => {
14058                let api = crate::v2_6_0::api::versions::VersionsApi {
14059                    client: self.client,
14060                };
14061                Ok(api
14062                    .initiate_revert_flow_version(
14063                        id,
14064                        &serde_json::from_value::<
14065                            crate::v2_6_0::types::VersionControlInformationEntity,
14066                        >(body.clone())
14067                        .map_err(|e| NifiError::UnsupportedEndpoint {
14068                            endpoint: format!(
14069                                "{} (body deserialize: {})",
14070                                "initiate_revert_flow_version", e
14071                            ),
14072                            version: "2.6.0".to_string(),
14073                        })?,
14074                    )
14075                    .await?
14076                    .into())
14077            }
14078            DetectedVersion::V2_7_2 => {
14079                let api = crate::v2_7_2::api::versions::VersionsApi {
14080                    client: self.client,
14081                };
14082                Ok(api
14083                    .initiate_revert_flow_version(
14084                        id,
14085                        &serde_json::from_value::<
14086                            crate::v2_7_2::types::VersionControlInformationEntity,
14087                        >(body.clone())
14088                        .map_err(|e| NifiError::UnsupportedEndpoint {
14089                            endpoint: format!(
14090                                "{} (body deserialize: {})",
14091                                "initiate_revert_flow_version", e
14092                            ),
14093                            version: "2.7.2".to_string(),
14094                        })?,
14095                    )
14096                    .await?
14097                    .into())
14098            }
14099            DetectedVersion::V2_8_0 => {
14100                let api = crate::v2_8_0::api::versions::VersionsApi {
14101                    client: self.client,
14102                };
14103                Ok(api
14104                    .initiate_revert_flow_version(
14105                        id,
14106                        &serde_json::from_value::<
14107                            crate::v2_8_0::types::VersionControlInformationEntity,
14108                        >(body.clone())
14109                        .map_err(|e| NifiError::UnsupportedEndpoint {
14110                            endpoint: format!(
14111                                "{} (body deserialize: {})",
14112                                "initiate_revert_flow_version", e
14113                            ),
14114                            version: "2.8.0".to_string(),
14115                        })?,
14116                    )
14117                    .await?
14118                    .into())
14119            }
14120        }
14121    }
14122    /// Initiate the Update Request of a Process Group with the given ID
14123    pub async fn initiate_version_control_update(
14124        &self,
14125        id: &str,
14126        body: &serde_json::Value,
14127    ) -> Result<types::VersionedFlowUpdateRequestEntity, NifiError> {
14128        match self.version {
14129            DetectedVersion::V2_6_0 => {
14130                let api = crate::v2_6_0::api::versions::VersionsApi {
14131                    client: self.client,
14132                };
14133                Ok(api
14134                    .initiate_version_control_update(
14135                        id,
14136                        &serde_json::from_value::<
14137                            crate::v2_6_0::types::VersionControlInformationEntity,
14138                        >(body.clone())
14139                        .map_err(|e| NifiError::UnsupportedEndpoint {
14140                            endpoint: format!(
14141                                "{} (body deserialize: {})",
14142                                "initiate_version_control_update", e
14143                            ),
14144                            version: "2.6.0".to_string(),
14145                        })?,
14146                    )
14147                    .await?
14148                    .into())
14149            }
14150            DetectedVersion::V2_7_2 => {
14151                let api = crate::v2_7_2::api::versions::VersionsApi {
14152                    client: self.client,
14153                };
14154                Ok(api
14155                    .initiate_version_control_update(
14156                        id,
14157                        &serde_json::from_value::<
14158                            crate::v2_7_2::types::VersionControlInformationEntity,
14159                        >(body.clone())
14160                        .map_err(|e| NifiError::UnsupportedEndpoint {
14161                            endpoint: format!(
14162                                "{} (body deserialize: {})",
14163                                "initiate_version_control_update", e
14164                            ),
14165                            version: "2.7.2".to_string(),
14166                        })?,
14167                    )
14168                    .await?
14169                    .into())
14170            }
14171            DetectedVersion::V2_8_0 => {
14172                let api = crate::v2_8_0::api::versions::VersionsApi {
14173                    client: self.client,
14174                };
14175                Ok(api
14176                    .initiate_version_control_update(
14177                        id,
14178                        &serde_json::from_value::<
14179                            crate::v2_8_0::types::VersionControlInformationEntity,
14180                        >(body.clone())
14181                        .map_err(|e| NifiError::UnsupportedEndpoint {
14182                            endpoint: format!(
14183                                "{} (body deserialize: {})",
14184                                "initiate_version_control_update", e
14185                            ),
14186                            version: "2.8.0".to_string(),
14187                        })?,
14188                    )
14189                    .await?
14190                    .into())
14191            }
14192        }
14193    }
14194    /// Save the Process Group with the given ID
14195    pub async fn save_to_flow_registry(
14196        &self,
14197        id: &str,
14198        body: &serde_json::Value,
14199    ) -> Result<types::VersionControlInformationEntity, NifiError> {
14200        match self.version {
14201            DetectedVersion::V2_6_0 => {
14202                let api = crate::v2_6_0::api::versions::VersionsApi {
14203                    client: self.client,
14204                };
14205                Ok(api
14206                    .save_to_flow_registry(
14207                        id,
14208                        &serde_json::from_value::<
14209                            crate::v2_6_0::types::StartVersionControlRequestEntity,
14210                        >(body.clone())
14211                        .map_err(|e| NifiError::UnsupportedEndpoint {
14212                            endpoint: format!(
14213                                "{} (body deserialize: {})",
14214                                "save_to_flow_registry", e
14215                            ),
14216                            version: "2.6.0".to_string(),
14217                        })?,
14218                    )
14219                    .await?
14220                    .into())
14221            }
14222            DetectedVersion::V2_7_2 => {
14223                let api = crate::v2_7_2::api::versions::VersionsApi {
14224                    client: self.client,
14225                };
14226                Ok(api
14227                    .save_to_flow_registry(
14228                        id,
14229                        &serde_json::from_value::<
14230                            crate::v2_7_2::types::StartVersionControlRequestEntity,
14231                        >(body.clone())
14232                        .map_err(|e| NifiError::UnsupportedEndpoint {
14233                            endpoint: format!(
14234                                "{} (body deserialize: {})",
14235                                "save_to_flow_registry", e
14236                            ),
14237                            version: "2.7.2".to_string(),
14238                        })?,
14239                    )
14240                    .await?
14241                    .into())
14242            }
14243            DetectedVersion::V2_8_0 => {
14244                let api = crate::v2_8_0::api::versions::VersionsApi {
14245                    client: self.client,
14246                };
14247                Ok(api
14248                    .save_to_flow_registry(
14249                        id,
14250                        &serde_json::from_value::<
14251                            crate::v2_8_0::types::StartVersionControlRequestEntity,
14252                        >(body.clone())
14253                        .map_err(|e| NifiError::UnsupportedEndpoint {
14254                            endpoint: format!(
14255                                "{} (body deserialize: {})",
14256                                "save_to_flow_registry", e
14257                            ),
14258                            version: "2.8.0".to_string(),
14259                        })?,
14260                    )
14261                    .await?
14262                    .into())
14263            }
14264        }
14265    }
14266    /// Stops version controlling the Process Group with the given ID
14267    pub async fn stop_version_control(
14268        &self,
14269        id: &str,
14270        version: Option<&str>,
14271        client_id: Option<&str>,
14272        disconnected_node_acknowledged: Option<bool>,
14273    ) -> Result<types::VersionControlInformationEntity, NifiError> {
14274        match self.version {
14275            DetectedVersion::V2_6_0 => {
14276                let api = crate::v2_6_0::api::versions::VersionsApi {
14277                    client: self.client,
14278                };
14279                Ok(api
14280                    .stop_version_control(id, version, client_id, disconnected_node_acknowledged)
14281                    .await?
14282                    .into())
14283            }
14284            DetectedVersion::V2_7_2 => {
14285                let api = crate::v2_7_2::api::versions::VersionsApi {
14286                    client: self.client,
14287                };
14288                Ok(api
14289                    .stop_version_control(id, version, client_id, disconnected_node_acknowledged)
14290                    .await?
14291                    .into())
14292            }
14293            DetectedVersion::V2_8_0 => {
14294                let api = crate::v2_8_0::api::versions::VersionsApi {
14295                    client: self.client,
14296                };
14297                Ok(api
14298                    .stop_version_control(id, version, client_id, disconnected_node_acknowledged)
14299                    .await?
14300                    .into())
14301            }
14302        }
14303    }
14304    /// Update the version of a Process Group with the given ID
14305    pub async fn update_flow_version(
14306        &self,
14307        id: &str,
14308        body: &serde_json::Value,
14309    ) -> Result<types::VersionControlInformationEntity, NifiError> {
14310        match self.version {
14311            DetectedVersion::V2_6_0 => {
14312                let api = crate::v2_6_0::api::versions::VersionsApi {
14313                    client: self.client,
14314                };
14315                Ok(
14316                    api
14317                        .update_flow_version(
14318                            id,
14319                            &serde_json::from_value::<
14320                                crate::v2_6_0::types::VersionedFlowSnapshotEntity,
14321                            >(body.clone())
14322                            .map_err(|e| NifiError::UnsupportedEndpoint {
14323                                endpoint: format!(
14324                                    "{} (body deserialize: {})",
14325                                    "update_flow_version", e
14326                                ),
14327                                version: "2.6.0".to_string(),
14328                            })?,
14329                        )
14330                        .await?
14331                        .into(),
14332                )
14333            }
14334            DetectedVersion::V2_7_2 => {
14335                let api = crate::v2_7_2::api::versions::VersionsApi {
14336                    client: self.client,
14337                };
14338                Ok(
14339                    api
14340                        .update_flow_version(
14341                            id,
14342                            &serde_json::from_value::<
14343                                crate::v2_7_2::types::VersionedFlowSnapshotEntity,
14344                            >(body.clone())
14345                            .map_err(|e| NifiError::UnsupportedEndpoint {
14346                                endpoint: format!(
14347                                    "{} (body deserialize: {})",
14348                                    "update_flow_version", e
14349                                ),
14350                                version: "2.7.2".to_string(),
14351                            })?,
14352                        )
14353                        .await?
14354                        .into(),
14355                )
14356            }
14357            DetectedVersion::V2_8_0 => {
14358                let api = crate::v2_8_0::api::versions::VersionsApi {
14359                    client: self.client,
14360                };
14361                Ok(
14362                    api
14363                        .update_flow_version(
14364                            id,
14365                            &serde_json::from_value::<
14366                                crate::v2_8_0::types::VersionedFlowSnapshotEntity,
14367                            >(body.clone())
14368                            .map_err(|e| NifiError::UnsupportedEndpoint {
14369                                endpoint: format!(
14370                                    "{} (body deserialize: {})",
14371                                    "update_flow_version", e
14372                                ),
14373                                version: "2.8.0".to_string(),
14374                            })?,
14375                        )
14376                        .await?
14377                        .into(),
14378                )
14379            }
14380        }
14381    }
14382    /// Updates the request with the given ID
14383    pub async fn update_version_control_request(
14384        &self,
14385        id: &str,
14386        body: &serde_json::Value,
14387    ) -> Result<types::VersionControlInformationEntity, NifiError> {
14388        match self.version {
14389            DetectedVersion::V2_6_0 => {
14390                let api = crate::v2_6_0::api::versions::VersionsApi {
14391                    client: self.client,
14392                };
14393                Ok(api
14394                    .update_version_control_request(
14395                        id,
14396                        &serde_json::from_value::<
14397                            crate::v2_6_0::types::VersionControlComponentMappingEntity,
14398                        >(body.clone())
14399                        .map_err(|e| NifiError::UnsupportedEndpoint {
14400                            endpoint: format!(
14401                                "{} (body deserialize: {})",
14402                                "update_version_control_request", e
14403                            ),
14404                            version: "2.6.0".to_string(),
14405                        })?,
14406                    )
14407                    .await?
14408                    .into())
14409            }
14410            DetectedVersion::V2_7_2 => {
14411                let api = crate::v2_7_2::api::versions::VersionsApi {
14412                    client: self.client,
14413                };
14414                Ok(api
14415                    .update_version_control_request(
14416                        id,
14417                        &serde_json::from_value::<
14418                            crate::v2_7_2::types::VersionControlComponentMappingEntity,
14419                        >(body.clone())
14420                        .map_err(|e| NifiError::UnsupportedEndpoint {
14421                            endpoint: format!(
14422                                "{} (body deserialize: {})",
14423                                "update_version_control_request", e
14424                            ),
14425                            version: "2.7.2".to_string(),
14426                        })?,
14427                    )
14428                    .await?
14429                    .into())
14430            }
14431            DetectedVersion::V2_8_0 => {
14432                let api = crate::v2_8_0::api::versions::VersionsApi {
14433                    client: self.client,
14434                };
14435                Ok(api
14436                    .update_version_control_request(
14437                        id,
14438                        &serde_json::from_value::<
14439                            crate::v2_8_0::types::VersionControlComponentMappingEntity,
14440                        >(body.clone())
14441                        .map_err(|e| NifiError::UnsupportedEndpoint {
14442                            endpoint: format!(
14443                                "{} (body deserialize: {})",
14444                                "update_version_control_request", e
14445                            ),
14446                            version: "2.8.0".to_string(),
14447                        })?,
14448                    )
14449                    .await?
14450                    .into())
14451            }
14452        }
14453    }
14454}