azure_mgmt_automation/package_2019_06/
mod.rs

1#![allow(unused_mut)]
2#![allow(unused_variables)]
3#![allow(unused_imports)]
4#![allow(clippy::redundant_clone)]
5pub mod models;
6#[derive(Clone)]
7pub struct Client {
8    endpoint: azure_core::Url,
9    credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>,
10    scopes: Vec<String>,
11    pipeline: azure_core::Pipeline,
12}
13#[derive(Clone)]
14pub struct ClientBuilder {
15    credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>,
16    endpoint: Option<azure_core::Url>,
17    scopes: Option<Vec<String>>,
18    options: azure_core::ClientOptions,
19}
20pub use azure_core::resource_manager_endpoint::AZURE_PUBLIC_CLOUD as DEFAULT_ENDPOINT;
21impl ClientBuilder {
22    #[doc = "Create a new instance of `ClientBuilder`."]
23    #[must_use]
24    pub fn new(credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>) -> Self {
25        Self {
26            credential,
27            endpoint: None,
28            scopes: None,
29            options: azure_core::ClientOptions::default(),
30        }
31    }
32    #[doc = "Set the endpoint."]
33    #[must_use]
34    pub fn endpoint(mut self, endpoint: impl Into<azure_core::Url>) -> Self {
35        self.endpoint = Some(endpoint.into());
36        self
37    }
38    #[doc = "Set the scopes."]
39    #[must_use]
40    pub fn scopes(mut self, scopes: &[&str]) -> Self {
41        self.scopes = Some(scopes.iter().map(|scope| (*scope).to_owned()).collect());
42        self
43    }
44    #[doc = "Set the retry options."]
45    #[must_use]
46    pub fn retry(mut self, retry: impl Into<azure_core::RetryOptions>) -> Self {
47        self.options = self.options.retry(retry);
48        self
49    }
50    #[doc = "Set the transport options."]
51    #[must_use]
52    pub fn transport(mut self, transport: impl Into<azure_core::TransportOptions>) -> Self {
53        self.options = self.options.transport(transport);
54        self
55    }
56    #[doc = "Convert the builder into a `Client` instance."]
57    pub fn build(self) -> azure_core::Result<Client> {
58        let endpoint = self.endpoint.unwrap_or_else(|| DEFAULT_ENDPOINT.to_owned());
59        let scopes = if let Some(scopes) = self.scopes {
60            scopes
61        } else {
62            vec![endpoint.join(azure_core::auth::DEFAULT_SCOPE_SUFFIX)?.to_string()]
63        };
64        Ok(Client::new(endpoint, self.credential, scopes, self.options))
65    }
66}
67impl Client {
68    pub(crate) async fn bearer_token(&self) -> azure_core::Result<azure_core::auth::Secret> {
69        let credential = self.token_credential();
70        let response = credential.get_token(&self.scopes()).await?;
71        Ok(response.token)
72    }
73    pub(crate) fn endpoint(&self) -> &azure_core::Url {
74        &self.endpoint
75    }
76    pub(crate) fn token_credential(&self) -> &dyn azure_core::auth::TokenCredential {
77        self.credential.as_ref()
78    }
79    pub(crate) fn scopes(&self) -> Vec<&str> {
80        self.scopes.iter().map(String::as_str).collect()
81    }
82    pub(crate) async fn send(&self, request: &mut azure_core::Request) -> azure_core::Result<azure_core::Response> {
83        let context = azure_core::Context::default();
84        self.pipeline.send(&context, request).await
85    }
86    #[doc = "Create a new `ClientBuilder`."]
87    #[must_use]
88    pub fn builder(credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>) -> ClientBuilder {
89        ClientBuilder::new(credential)
90    }
91    #[doc = "Create a new `Client`."]
92    #[must_use]
93    pub fn new(
94        endpoint: impl Into<azure_core::Url>,
95        credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>,
96        scopes: Vec<String>,
97        options: azure_core::ClientOptions,
98    ) -> Self {
99        let endpoint = endpoint.into();
100        let pipeline = azure_core::Pipeline::new(
101            option_env!("CARGO_PKG_NAME"),
102            option_env!("CARGO_PKG_VERSION"),
103            options,
104            Vec::new(),
105            Vec::new(),
106        );
107        Self {
108            endpoint,
109            credential,
110            scopes,
111            pipeline,
112        }
113    }
114    pub fn activity_client(&self) -> activity::Client {
115        activity::Client(self.clone())
116    }
117    pub fn agent_registration_information_client(&self) -> agent_registration_information::Client {
118        agent_registration_information::Client(self.clone())
119    }
120    pub fn automation_account_client(&self) -> automation_account::Client {
121        automation_account::Client(self.clone())
122    }
123    pub fn certificate_client(&self) -> certificate::Client {
124        certificate::Client(self.clone())
125    }
126    pub fn connection_client(&self) -> connection::Client {
127        connection::Client(self.clone())
128    }
129    pub fn connection_type_client(&self) -> connection_type::Client {
130        connection_type::Client(self.clone())
131    }
132    pub fn credential_client(&self) -> credential::Client {
133        credential::Client(self.clone())
134    }
135    pub fn dsc_compilation_job_client(&self) -> dsc_compilation_job::Client {
136        dsc_compilation_job::Client(self.clone())
137    }
138    pub fn dsc_compilation_job_stream_client(&self) -> dsc_compilation_job_stream::Client {
139        dsc_compilation_job_stream::Client(self.clone())
140    }
141    pub fn dsc_configuration_client(&self) -> dsc_configuration::Client {
142        dsc_configuration::Client(self.clone())
143    }
144    pub fn dsc_node_client(&self) -> dsc_node::Client {
145        dsc_node::Client(self.clone())
146    }
147    pub fn dsc_node_configuration_client(&self) -> dsc_node_configuration::Client {
148        dsc_node_configuration::Client(self.clone())
149    }
150    pub fn fields_client(&self) -> fields::Client {
151        fields::Client(self.clone())
152    }
153    pub fn hybrid_runbook_worker_group_client(&self) -> hybrid_runbook_worker_group::Client {
154        hybrid_runbook_worker_group::Client(self.clone())
155    }
156    pub fn job_client(&self) -> job::Client {
157        job::Client(self.clone())
158    }
159    pub fn job_schedule_client(&self) -> job_schedule::Client {
160        job_schedule::Client(self.clone())
161    }
162    pub fn job_stream_client(&self) -> job_stream::Client {
163        job_stream::Client(self.clone())
164    }
165    pub fn keys_client(&self) -> keys::Client {
166        keys::Client(self.clone())
167    }
168    pub fn linked_workspace_client(&self) -> linked_workspace::Client {
169        linked_workspace::Client(self.clone())
170    }
171    pub fn module_client(&self) -> module::Client {
172        module::Client(self.clone())
173    }
174    pub fn node_count_information_client(&self) -> node_count_information::Client {
175        node_count_information::Client(self.clone())
176    }
177    pub fn node_reports_client(&self) -> node_reports::Client {
178        node_reports::Client(self.clone())
179    }
180    pub fn object_data_types_client(&self) -> object_data_types::Client {
181        object_data_types::Client(self.clone())
182    }
183    pub fn operations_client(&self) -> operations::Client {
184        operations::Client(self.clone())
185    }
186    pub fn python2_package_client(&self) -> python2_package::Client {
187        python2_package::Client(self.clone())
188    }
189    pub fn runbook_client(&self) -> runbook::Client {
190        runbook::Client(self.clone())
191    }
192    pub fn runbook_draft_client(&self) -> runbook_draft::Client {
193        runbook_draft::Client(self.clone())
194    }
195    pub fn schedule_client(&self) -> schedule::Client {
196        schedule::Client(self.clone())
197    }
198    pub fn software_update_configuration_machine_runs_client(&self) -> software_update_configuration_machine_runs::Client {
199        software_update_configuration_machine_runs::Client(self.clone())
200    }
201    pub fn software_update_configuration_runs_client(&self) -> software_update_configuration_runs::Client {
202        software_update_configuration_runs::Client(self.clone())
203    }
204    pub fn software_update_configurations_client(&self) -> software_update_configurations::Client {
205        software_update_configurations::Client(self.clone())
206    }
207    pub fn source_control_client(&self) -> source_control::Client {
208        source_control::Client(self.clone())
209    }
210    pub fn source_control_sync_job_client(&self) -> source_control_sync_job::Client {
211        source_control_sync_job::Client(self.clone())
212    }
213    pub fn source_control_sync_job_streams_client(&self) -> source_control_sync_job_streams::Client {
214        source_control_sync_job_streams::Client(self.clone())
215    }
216    pub fn statistics_client(&self) -> statistics::Client {
217        statistics::Client(self.clone())
218    }
219    pub fn test_job_client(&self) -> test_job::Client {
220        test_job::Client(self.clone())
221    }
222    pub fn test_job_streams_client(&self) -> test_job_streams::Client {
223        test_job_streams::Client(self.clone())
224    }
225    pub fn usages_client(&self) -> usages::Client {
226        usages::Client(self.clone())
227    }
228    pub fn variable_client(&self) -> variable::Client {
229        variable::Client(self.clone())
230    }
231    pub fn watcher_client(&self) -> watcher::Client {
232        watcher::Client(self.clone())
233    }
234    pub fn webhook_client(&self) -> webhook::Client {
235        webhook::Client(self.clone())
236    }
237}
238pub mod runbook_draft {
239    use super::models;
240    #[cfg(not(target_arch = "wasm32"))]
241    use futures::future::BoxFuture;
242    #[cfg(target_arch = "wasm32")]
243    use futures::future::LocalBoxFuture as BoxFuture;
244    pub struct Client(pub(crate) super::Client);
245    impl Client {
246        #[doc = "Retrieve the content of runbook draft identified by runbook name."]
247        #[doc = ""]
248        #[doc = "Arguments:"]
249        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
250        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
251        #[doc = "* `automation_account_name`: The name of the automation account."]
252        #[doc = "* `runbook_name`: The runbook name."]
253        pub fn get_content(
254            &self,
255            subscription_id: impl Into<String>,
256            resource_group_name: impl Into<String>,
257            automation_account_name: impl Into<String>,
258            runbook_name: impl Into<String>,
259        ) -> get_content::RequestBuilder {
260            get_content::RequestBuilder {
261                client: self.0.clone(),
262                subscription_id: subscription_id.into(),
263                resource_group_name: resource_group_name.into(),
264                automation_account_name: automation_account_name.into(),
265                runbook_name: runbook_name.into(),
266            }
267        }
268        #[doc = "Replaces the runbook draft content."]
269        #[doc = ""]
270        #[doc = "Arguments:"]
271        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
272        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
273        #[doc = "* `automation_account_name`: The name of the automation account."]
274        #[doc = "* `runbook_name`: The runbook name."]
275        #[doc = "* `runbook_content`: The runbook draft content."]
276        pub fn replace_content(
277            &self,
278            subscription_id: impl Into<String>,
279            resource_group_name: impl Into<String>,
280            automation_account_name: impl Into<String>,
281            runbook_name: impl Into<String>,
282            runbook_content: impl Into<serde_json::Value>,
283        ) -> replace_content::RequestBuilder {
284            replace_content::RequestBuilder {
285                client: self.0.clone(),
286                subscription_id: subscription_id.into(),
287                resource_group_name: resource_group_name.into(),
288                automation_account_name: automation_account_name.into(),
289                runbook_name: runbook_name.into(),
290                runbook_content: runbook_content.into(),
291            }
292        }
293        #[doc = "Retrieve the runbook draft identified by runbook name."]
294        #[doc = ""]
295        #[doc = "Arguments:"]
296        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
297        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
298        #[doc = "* `automation_account_name`: The name of the automation account."]
299        #[doc = "* `runbook_name`: The runbook name."]
300        pub fn get(
301            &self,
302            subscription_id: impl Into<String>,
303            resource_group_name: impl Into<String>,
304            automation_account_name: impl Into<String>,
305            runbook_name: impl Into<String>,
306        ) -> get::RequestBuilder {
307            get::RequestBuilder {
308                client: self.0.clone(),
309                subscription_id: subscription_id.into(),
310                resource_group_name: resource_group_name.into(),
311                automation_account_name: automation_account_name.into(),
312                runbook_name: runbook_name.into(),
313            }
314        }
315        #[doc = "Undo draft edit to last known published state identified by runbook name."]
316        #[doc = ""]
317        #[doc = "Arguments:"]
318        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
319        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
320        #[doc = "* `automation_account_name`: The name of the automation account."]
321        #[doc = "* `runbook_name`: The runbook name."]
322        pub fn undo_edit(
323            &self,
324            subscription_id: impl Into<String>,
325            resource_group_name: impl Into<String>,
326            automation_account_name: impl Into<String>,
327            runbook_name: impl Into<String>,
328        ) -> undo_edit::RequestBuilder {
329            undo_edit::RequestBuilder {
330                client: self.0.clone(),
331                subscription_id: subscription_id.into(),
332                resource_group_name: resource_group_name.into(),
333                automation_account_name: automation_account_name.into(),
334                runbook_name: runbook_name.into(),
335            }
336        }
337    }
338    pub mod get_content {
339        use super::models;
340        #[cfg(not(target_arch = "wasm32"))]
341        use futures::future::BoxFuture;
342        #[cfg(target_arch = "wasm32")]
343        use futures::future::LocalBoxFuture as BoxFuture;
344        #[derive(Debug)]
345        pub struct Response(azure_core::Response);
346        impl Response {
347            pub async fn into_body(self) -> azure_core::Result<String> {
348                let bytes = self.0.into_body().collect().await?;
349                let body: String = serde_json::from_slice(&bytes)?;
350                Ok(body)
351            }
352            pub fn into_raw_response(self) -> azure_core::Response {
353                self.0
354            }
355            pub fn as_raw_response(&self) -> &azure_core::Response {
356                &self.0
357            }
358        }
359        impl From<Response> for azure_core::Response {
360            fn from(rsp: Response) -> Self {
361                rsp.into_raw_response()
362            }
363        }
364        impl AsRef<azure_core::Response> for Response {
365            fn as_ref(&self) -> &azure_core::Response {
366                self.as_raw_response()
367            }
368        }
369        #[derive(Clone)]
370        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
371        #[doc = r""]
372        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
373        #[doc = r" parameters can be chained."]
374        #[doc = r""]
375        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
376        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
377        #[doc = r" executes the request and returns a `Result` with the parsed"]
378        #[doc = r" response."]
379        #[doc = r""]
380        #[doc = r" In order to execute the request without polling the service"]
381        #[doc = r" until the operation completes, use `.send().await` instead."]
382        #[doc = r""]
383        #[doc = r" If you need lower-level access to the raw response details"]
384        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
385        #[doc = r" can finalize the request using the"]
386        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
387        #[doc = r" that resolves to a lower-level [`Response`] value."]
388        pub struct RequestBuilder {
389            pub(crate) client: super::super::Client,
390            pub(crate) subscription_id: String,
391            pub(crate) resource_group_name: String,
392            pub(crate) automation_account_name: String,
393            pub(crate) runbook_name: String,
394        }
395        impl RequestBuilder {
396            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
397            #[doc = ""]
398            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
399            #[doc = "However, this function can provide more flexibility when required."]
400            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
401                Box::pin({
402                    let this = self.clone();
403                    async move {
404                        let url = this.url()?;
405                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
406                        let bearer_token = this.client.bearer_token().await?;
407                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
408                        let req_body = azure_core::EMPTY_BODY;
409                        req.set_body(req_body);
410                        Ok(Response(this.client.send(&mut req).await?))
411                    }
412                })
413            }
414            fn url(&self) -> azure_core::Result<azure_core::Url> {
415                let mut url = self.client.endpoint().clone();
416                url.set_path(&format!(
417                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/content",
418                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
419                ));
420                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
421                if !has_api_version_already {
422                    url.query_pairs_mut()
423                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
424                }
425                Ok(url)
426            }
427        }
428        impl std::future::IntoFuture for RequestBuilder {
429            type Output = azure_core::Result<String>;
430            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
431            #[doc = "Returns a future that sends the request and returns the parsed response body."]
432            #[doc = ""]
433            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
434            #[doc = ""]
435            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
436            fn into_future(self) -> Self::IntoFuture {
437                Box::pin(async move { self.send().await?.into_body().await })
438            }
439        }
440    }
441    pub mod replace_content {
442        use super::models;
443        #[cfg(not(target_arch = "wasm32"))]
444        use futures::future::BoxFuture;
445        #[cfg(target_arch = "wasm32")]
446        use futures::future::LocalBoxFuture as BoxFuture;
447        #[derive(Debug)]
448        pub struct Response(azure_core::Response);
449        impl Response {
450            pub fn into_raw_response(self) -> azure_core::Response {
451                self.0
452            }
453            pub fn as_raw_response(&self) -> &azure_core::Response {
454                &self.0
455            }
456            pub fn headers(&self) -> Headers {
457                Headers(self.0.headers())
458            }
459        }
460        impl From<Response> for azure_core::Response {
461            fn from(rsp: Response) -> Self {
462                rsp.into_raw_response()
463            }
464        }
465        impl AsRef<azure_core::Response> for Response {
466            fn as_ref(&self) -> &azure_core::Response {
467                self.as_raw_response()
468            }
469        }
470        pub struct Headers<'a>(&'a azure_core::headers::Headers);
471        impl<'a> Headers<'a> {
472            #[doc = "URL to query for status of the operation."]
473            pub fn location(&self) -> azure_core::Result<&str> {
474                self.0.get_str(&azure_core::headers::HeaderName::from_static("location"))
475            }
476        }
477        #[derive(Clone)]
478        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
479        #[doc = r""]
480        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
481        #[doc = r" parameters can be chained."]
482        #[doc = r""]
483        #[doc = r" This `RequestBuilder` implements a Long Running Operation"]
484        #[doc = r" (LRO)."]
485        #[doc = r""]
486        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
487        #[doc = r" which will convert the `RequestBuilder` into a future"]
488        #[doc = r" executes the request and polls the service until the"]
489        #[doc = r" operation completes."]
490        #[doc = r""]
491        #[doc = r" In order to execute the request without polling the service"]
492        #[doc = r" until the operation completes, use"]
493        #[doc = r" [`RequestBuilder::send()`], which will return a lower-level"]
494        #[doc = r" [`Response`] value."]
495        pub struct RequestBuilder {
496            pub(crate) client: super::super::Client,
497            pub(crate) subscription_id: String,
498            pub(crate) resource_group_name: String,
499            pub(crate) automation_account_name: String,
500            pub(crate) runbook_name: String,
501            pub(crate) runbook_content: serde_json::Value,
502        }
503        impl RequestBuilder {
504            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
505            #[doc = ""]
506            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
507            #[doc = "However, this function can provide more flexibility when required."]
508            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
509                Box::pin({
510                    let this = self.clone();
511                    async move {
512                        let url = this.url()?;
513                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
514                        let bearer_token = this.client.bearer_token().await?;
515                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
516                        req.insert_header("content-type", "text/powershell");
517                        let req_body = azure_core::to_json(&this.runbook_content)?;
518                        req.set_body(req_body);
519                        Ok(Response(this.client.send(&mut req).await?))
520                    }
521                })
522            }
523            fn url(&self) -> azure_core::Result<azure_core::Url> {
524                let mut url = self.client.endpoint().clone();
525                url.set_path(&format!(
526                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/content",
527                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
528                ));
529                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
530                if !has_api_version_already {
531                    url.query_pairs_mut()
532                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
533                }
534                Ok(url)
535            }
536        }
537    }
538    pub mod get {
539        use super::models;
540        #[cfg(not(target_arch = "wasm32"))]
541        use futures::future::BoxFuture;
542        #[cfg(target_arch = "wasm32")]
543        use futures::future::LocalBoxFuture as BoxFuture;
544        #[derive(Debug)]
545        pub struct Response(azure_core::Response);
546        impl Response {
547            pub async fn into_body(self) -> azure_core::Result<models::RunbookDraft> {
548                let bytes = self.0.into_body().collect().await?;
549                let body: models::RunbookDraft = serde_json::from_slice(&bytes)?;
550                Ok(body)
551            }
552            pub fn into_raw_response(self) -> azure_core::Response {
553                self.0
554            }
555            pub fn as_raw_response(&self) -> &azure_core::Response {
556                &self.0
557            }
558        }
559        impl From<Response> for azure_core::Response {
560            fn from(rsp: Response) -> Self {
561                rsp.into_raw_response()
562            }
563        }
564        impl AsRef<azure_core::Response> for Response {
565            fn as_ref(&self) -> &azure_core::Response {
566                self.as_raw_response()
567            }
568        }
569        #[derive(Clone)]
570        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
571        #[doc = r""]
572        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
573        #[doc = r" parameters can be chained."]
574        #[doc = r""]
575        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
576        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
577        #[doc = r" executes the request and returns a `Result` with the parsed"]
578        #[doc = r" response."]
579        #[doc = r""]
580        #[doc = r" In order to execute the request without polling the service"]
581        #[doc = r" until the operation completes, use `.send().await` instead."]
582        #[doc = r""]
583        #[doc = r" If you need lower-level access to the raw response details"]
584        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
585        #[doc = r" can finalize the request using the"]
586        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
587        #[doc = r" that resolves to a lower-level [`Response`] value."]
588        pub struct RequestBuilder {
589            pub(crate) client: super::super::Client,
590            pub(crate) subscription_id: String,
591            pub(crate) resource_group_name: String,
592            pub(crate) automation_account_name: String,
593            pub(crate) runbook_name: String,
594        }
595        impl RequestBuilder {
596            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
597            #[doc = ""]
598            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
599            #[doc = "However, this function can provide more flexibility when required."]
600            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
601                Box::pin({
602                    let this = self.clone();
603                    async move {
604                        let url = this.url()?;
605                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
606                        let bearer_token = this.client.bearer_token().await?;
607                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
608                        let req_body = azure_core::EMPTY_BODY;
609                        req.set_body(req_body);
610                        Ok(Response(this.client.send(&mut req).await?))
611                    }
612                })
613            }
614            fn url(&self) -> azure_core::Result<azure_core::Url> {
615                let mut url = self.client.endpoint().clone();
616                url.set_path(&format!(
617                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft",
618                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
619                ));
620                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
621                if !has_api_version_already {
622                    url.query_pairs_mut()
623                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
624                }
625                Ok(url)
626            }
627        }
628        impl std::future::IntoFuture for RequestBuilder {
629            type Output = azure_core::Result<models::RunbookDraft>;
630            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RunbookDraft>>;
631            #[doc = "Returns a future that sends the request and returns the parsed response body."]
632            #[doc = ""]
633            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
634            #[doc = ""]
635            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
636            fn into_future(self) -> Self::IntoFuture {
637                Box::pin(async move { self.send().await?.into_body().await })
638            }
639        }
640    }
641    pub mod undo_edit {
642        use super::models;
643        #[cfg(not(target_arch = "wasm32"))]
644        use futures::future::BoxFuture;
645        #[cfg(target_arch = "wasm32")]
646        use futures::future::LocalBoxFuture as BoxFuture;
647        #[derive(Debug)]
648        pub struct Response(azure_core::Response);
649        impl Response {
650            pub fn into_raw_response(self) -> azure_core::Response {
651                self.0
652            }
653            pub fn as_raw_response(&self) -> &azure_core::Response {
654                &self.0
655            }
656        }
657        impl From<Response> for azure_core::Response {
658            fn from(rsp: Response) -> Self {
659                rsp.into_raw_response()
660            }
661        }
662        impl AsRef<azure_core::Response> for Response {
663            fn as_ref(&self) -> &azure_core::Response {
664                self.as_raw_response()
665            }
666        }
667        #[derive(Clone)]
668        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
669        #[doc = r""]
670        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
671        #[doc = r" parameters can be chained."]
672        #[doc = r""]
673        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
674        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
675        #[doc = r" executes the request and returns a `Result` with the parsed"]
676        #[doc = r" response."]
677        #[doc = r""]
678        #[doc = r" In order to execute the request without polling the service"]
679        #[doc = r" until the operation completes, use `.send().await` instead."]
680        #[doc = r""]
681        #[doc = r" If you need lower-level access to the raw response details"]
682        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
683        #[doc = r" can finalize the request using the"]
684        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
685        #[doc = r" that resolves to a lower-level [`Response`] value."]
686        pub struct RequestBuilder {
687            pub(crate) client: super::super::Client,
688            pub(crate) subscription_id: String,
689            pub(crate) resource_group_name: String,
690            pub(crate) automation_account_name: String,
691            pub(crate) runbook_name: String,
692        }
693        impl RequestBuilder {
694            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
695            #[doc = ""]
696            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
697            #[doc = "However, this function can provide more flexibility when required."]
698            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
699                Box::pin({
700                    let this = self.clone();
701                    async move {
702                        let url = this.url()?;
703                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
704                        let bearer_token = this.client.bearer_token().await?;
705                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
706                        let req_body = azure_core::EMPTY_BODY;
707                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
708                        req.set_body(req_body);
709                        Ok(Response(this.client.send(&mut req).await?))
710                    }
711                })
712            }
713            fn url(&self) -> azure_core::Result<azure_core::Url> {
714                let mut url = self.client.endpoint().clone();
715                url.set_path(&format!(
716                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/undoEdit",
717                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
718                ));
719                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
720                if !has_api_version_already {
721                    url.query_pairs_mut()
722                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
723                }
724                Ok(url)
725            }
726        }
727    }
728}
729pub mod runbook {
730    use super::models;
731    #[cfg(not(target_arch = "wasm32"))]
732    use futures::future::BoxFuture;
733    #[cfg(target_arch = "wasm32")]
734    use futures::future::LocalBoxFuture as BoxFuture;
735    pub struct Client(pub(crate) super::Client);
736    impl Client {
737        #[doc = "Publish runbook draft."]
738        #[doc = ""]
739        #[doc = "Arguments:"]
740        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
741        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
742        #[doc = "* `automation_account_name`: The name of the automation account."]
743        #[doc = "* `runbook_name`: The parameters supplied to the publish runbook operation."]
744        pub fn publish(
745            &self,
746            subscription_id: impl Into<String>,
747            resource_group_name: impl Into<String>,
748            automation_account_name: impl Into<String>,
749            runbook_name: impl Into<String>,
750        ) -> publish::RequestBuilder {
751            publish::RequestBuilder {
752                client: self.0.clone(),
753                subscription_id: subscription_id.into(),
754                resource_group_name: resource_group_name.into(),
755                automation_account_name: automation_account_name.into(),
756                runbook_name: runbook_name.into(),
757            }
758        }
759        #[doc = "Retrieve the content of runbook identified by runbook name."]
760        #[doc = ""]
761        #[doc = "Arguments:"]
762        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
763        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
764        #[doc = "* `automation_account_name`: The name of the automation account."]
765        #[doc = "* `runbook_name`: The runbook name."]
766        pub fn get_content(
767            &self,
768            subscription_id: impl Into<String>,
769            resource_group_name: impl Into<String>,
770            automation_account_name: impl Into<String>,
771            runbook_name: impl Into<String>,
772        ) -> get_content::RequestBuilder {
773            get_content::RequestBuilder {
774                client: self.0.clone(),
775                subscription_id: subscription_id.into(),
776                resource_group_name: resource_group_name.into(),
777                automation_account_name: automation_account_name.into(),
778                runbook_name: runbook_name.into(),
779            }
780        }
781        #[doc = "Retrieve the runbook identified by runbook name."]
782        #[doc = ""]
783        #[doc = "Arguments:"]
784        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
785        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
786        #[doc = "* `automation_account_name`: The name of the automation account."]
787        #[doc = "* `runbook_name`: The runbook name."]
788        pub fn get(
789            &self,
790            subscription_id: impl Into<String>,
791            resource_group_name: impl Into<String>,
792            automation_account_name: impl Into<String>,
793            runbook_name: impl Into<String>,
794        ) -> get::RequestBuilder {
795            get::RequestBuilder {
796                client: self.0.clone(),
797                subscription_id: subscription_id.into(),
798                resource_group_name: resource_group_name.into(),
799                automation_account_name: automation_account_name.into(),
800                runbook_name: runbook_name.into(),
801            }
802        }
803        #[doc = "Create the runbook identified by runbook name."]
804        #[doc = ""]
805        #[doc = "Arguments:"]
806        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
807        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
808        #[doc = "* `automation_account_name`: The name of the automation account."]
809        #[doc = "* `runbook_name`: The runbook name."]
810        #[doc = "* `parameters`: The create or update parameters for runbook. Provide either content link for a published runbook or draft, not both."]
811        pub fn create_or_update(
812            &self,
813            subscription_id: impl Into<String>,
814            resource_group_name: impl Into<String>,
815            automation_account_name: impl Into<String>,
816            runbook_name: impl Into<String>,
817            parameters: impl Into<models::RunbookCreateOrUpdateParameters>,
818        ) -> create_or_update::RequestBuilder {
819            create_or_update::RequestBuilder {
820                client: self.0.clone(),
821                subscription_id: subscription_id.into(),
822                resource_group_name: resource_group_name.into(),
823                automation_account_name: automation_account_name.into(),
824                runbook_name: runbook_name.into(),
825                parameters: parameters.into(),
826            }
827        }
828        #[doc = "Update the runbook identified by runbook name."]
829        #[doc = ""]
830        #[doc = "Arguments:"]
831        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
832        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
833        #[doc = "* `automation_account_name`: The name of the automation account."]
834        #[doc = "* `runbook_name`: The runbook name."]
835        #[doc = "* `parameters`: The update parameters for runbook."]
836        pub fn update(
837            &self,
838            subscription_id: impl Into<String>,
839            resource_group_name: impl Into<String>,
840            automation_account_name: impl Into<String>,
841            runbook_name: impl Into<String>,
842            parameters: impl Into<models::RunbookUpdateParameters>,
843        ) -> update::RequestBuilder {
844            update::RequestBuilder {
845                client: self.0.clone(),
846                subscription_id: subscription_id.into(),
847                resource_group_name: resource_group_name.into(),
848                automation_account_name: automation_account_name.into(),
849                runbook_name: runbook_name.into(),
850                parameters: parameters.into(),
851            }
852        }
853        #[doc = "Delete the runbook by name."]
854        #[doc = ""]
855        #[doc = "Arguments:"]
856        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
857        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
858        #[doc = "* `automation_account_name`: The name of the automation account."]
859        #[doc = "* `runbook_name`: The runbook name."]
860        pub fn delete(
861            &self,
862            subscription_id: impl Into<String>,
863            resource_group_name: impl Into<String>,
864            automation_account_name: impl Into<String>,
865            runbook_name: impl Into<String>,
866        ) -> delete::RequestBuilder {
867            delete::RequestBuilder {
868                client: self.0.clone(),
869                subscription_id: subscription_id.into(),
870                resource_group_name: resource_group_name.into(),
871                automation_account_name: automation_account_name.into(),
872                runbook_name: runbook_name.into(),
873            }
874        }
875        #[doc = "Retrieve a list of runbooks."]
876        #[doc = ""]
877        #[doc = "Arguments:"]
878        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
879        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
880        #[doc = "* `automation_account_name`: The name of the automation account."]
881        pub fn list_by_automation_account(
882            &self,
883            subscription_id: impl Into<String>,
884            resource_group_name: impl Into<String>,
885            automation_account_name: impl Into<String>,
886        ) -> list_by_automation_account::RequestBuilder {
887            list_by_automation_account::RequestBuilder {
888                client: self.0.clone(),
889                subscription_id: subscription_id.into(),
890                resource_group_name: resource_group_name.into(),
891                automation_account_name: automation_account_name.into(),
892            }
893        }
894    }
895    pub mod publish {
896        use super::models;
897        #[cfg(not(target_arch = "wasm32"))]
898        use futures::future::BoxFuture;
899        #[cfg(target_arch = "wasm32")]
900        use futures::future::LocalBoxFuture as BoxFuture;
901        #[derive(Debug)]
902        pub struct Response(azure_core::Response);
903        impl Response {
904            pub fn into_raw_response(self) -> azure_core::Response {
905                self.0
906            }
907            pub fn as_raw_response(&self) -> &azure_core::Response {
908                &self.0
909            }
910            pub fn headers(&self) -> Headers {
911                Headers(self.0.headers())
912            }
913        }
914        impl From<Response> for azure_core::Response {
915            fn from(rsp: Response) -> Self {
916                rsp.into_raw_response()
917            }
918        }
919        impl AsRef<azure_core::Response> for Response {
920            fn as_ref(&self) -> &azure_core::Response {
921                self.as_raw_response()
922            }
923        }
924        pub struct Headers<'a>(&'a azure_core::headers::Headers);
925        impl<'a> Headers<'a> {
926            #[doc = "URL to query for status of the operation."]
927            pub fn location(&self) -> azure_core::Result<&str> {
928                self.0.get_str(&azure_core::headers::HeaderName::from_static("location"))
929            }
930        }
931        #[derive(Clone)]
932        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
933        #[doc = r""]
934        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
935        #[doc = r" parameters can be chained."]
936        #[doc = r""]
937        #[doc = r" This `RequestBuilder` implements a Long Running Operation"]
938        #[doc = r" (LRO)."]
939        #[doc = r""]
940        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
941        #[doc = r" which will convert the `RequestBuilder` into a future"]
942        #[doc = r" executes the request and polls the service until the"]
943        #[doc = r" operation completes."]
944        #[doc = r""]
945        #[doc = r" In order to execute the request without polling the service"]
946        #[doc = r" until the operation completes, use"]
947        #[doc = r" [`RequestBuilder::send()`], which will return a lower-level"]
948        #[doc = r" [`Response`] value."]
949        pub struct RequestBuilder {
950            pub(crate) client: super::super::Client,
951            pub(crate) subscription_id: String,
952            pub(crate) resource_group_name: String,
953            pub(crate) automation_account_name: String,
954            pub(crate) runbook_name: String,
955        }
956        impl RequestBuilder {
957            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
958            #[doc = ""]
959            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
960            #[doc = "However, this function can provide more flexibility when required."]
961            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
962                Box::pin({
963                    let this = self.clone();
964                    async move {
965                        let url = this.url()?;
966                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
967                        let bearer_token = this.client.bearer_token().await?;
968                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
969                        let req_body = azure_core::EMPTY_BODY;
970                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
971                        req.set_body(req_body);
972                        Ok(Response(this.client.send(&mut req).await?))
973                    }
974                })
975            }
976            fn url(&self) -> azure_core::Result<azure_core::Url> {
977                let mut url = self.client.endpoint().clone();
978                url.set_path(&format!(
979                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/publish",
980                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
981                ));
982                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
983                if !has_api_version_already {
984                    url.query_pairs_mut()
985                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
986                }
987                Ok(url)
988            }
989        }
990    }
991    pub mod get_content {
992        use super::models;
993        #[cfg(not(target_arch = "wasm32"))]
994        use futures::future::BoxFuture;
995        #[cfg(target_arch = "wasm32")]
996        use futures::future::LocalBoxFuture as BoxFuture;
997        #[derive(Debug)]
998        pub struct Response(azure_core::Response);
999        impl Response {
1000            pub async fn into_body(self) -> azure_core::Result<String> {
1001                let bytes = self.0.into_body().collect().await?;
1002                let body: String = serde_json::from_slice(&bytes)?;
1003                Ok(body)
1004            }
1005            pub fn into_raw_response(self) -> azure_core::Response {
1006                self.0
1007            }
1008            pub fn as_raw_response(&self) -> &azure_core::Response {
1009                &self.0
1010            }
1011        }
1012        impl From<Response> for azure_core::Response {
1013            fn from(rsp: Response) -> Self {
1014                rsp.into_raw_response()
1015            }
1016        }
1017        impl AsRef<azure_core::Response> for Response {
1018            fn as_ref(&self) -> &azure_core::Response {
1019                self.as_raw_response()
1020            }
1021        }
1022        #[derive(Clone)]
1023        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1024        #[doc = r""]
1025        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1026        #[doc = r" parameters can be chained."]
1027        #[doc = r""]
1028        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1029        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
1030        #[doc = r" executes the request and returns a `Result` with the parsed"]
1031        #[doc = r" response."]
1032        #[doc = r""]
1033        #[doc = r" In order to execute the request without polling the service"]
1034        #[doc = r" until the operation completes, use `.send().await` instead."]
1035        #[doc = r""]
1036        #[doc = r" If you need lower-level access to the raw response details"]
1037        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1038        #[doc = r" can finalize the request using the"]
1039        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1040        #[doc = r" that resolves to a lower-level [`Response`] value."]
1041        pub struct RequestBuilder {
1042            pub(crate) client: super::super::Client,
1043            pub(crate) subscription_id: String,
1044            pub(crate) resource_group_name: String,
1045            pub(crate) automation_account_name: String,
1046            pub(crate) runbook_name: String,
1047        }
1048        impl RequestBuilder {
1049            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1050            #[doc = ""]
1051            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1052            #[doc = "However, this function can provide more flexibility when required."]
1053            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1054                Box::pin({
1055                    let this = self.clone();
1056                    async move {
1057                        let url = this.url()?;
1058                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1059                        let bearer_token = this.client.bearer_token().await?;
1060                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1061                        let req_body = azure_core::EMPTY_BODY;
1062                        req.set_body(req_body);
1063                        Ok(Response(this.client.send(&mut req).await?))
1064                    }
1065                })
1066            }
1067            fn url(&self) -> azure_core::Result<azure_core::Url> {
1068                let mut url = self.client.endpoint().clone();
1069                url.set_path(&format!(
1070                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/content",
1071                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
1072                ));
1073                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1074                if !has_api_version_already {
1075                    url.query_pairs_mut()
1076                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1077                }
1078                Ok(url)
1079            }
1080        }
1081        impl std::future::IntoFuture for RequestBuilder {
1082            type Output = azure_core::Result<String>;
1083            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
1084            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1085            #[doc = ""]
1086            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1087            #[doc = ""]
1088            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1089            fn into_future(self) -> Self::IntoFuture {
1090                Box::pin(async move { self.send().await?.into_body().await })
1091            }
1092        }
1093    }
1094    pub mod get {
1095        use super::models;
1096        #[cfg(not(target_arch = "wasm32"))]
1097        use futures::future::BoxFuture;
1098        #[cfg(target_arch = "wasm32")]
1099        use futures::future::LocalBoxFuture as BoxFuture;
1100        #[derive(Debug)]
1101        pub struct Response(azure_core::Response);
1102        impl Response {
1103            pub async fn into_body(self) -> azure_core::Result<models::Runbook> {
1104                let bytes = self.0.into_body().collect().await?;
1105                let body: models::Runbook = serde_json::from_slice(&bytes)?;
1106                Ok(body)
1107            }
1108            pub fn into_raw_response(self) -> azure_core::Response {
1109                self.0
1110            }
1111            pub fn as_raw_response(&self) -> &azure_core::Response {
1112                &self.0
1113            }
1114        }
1115        impl From<Response> for azure_core::Response {
1116            fn from(rsp: Response) -> Self {
1117                rsp.into_raw_response()
1118            }
1119        }
1120        impl AsRef<azure_core::Response> for Response {
1121            fn as_ref(&self) -> &azure_core::Response {
1122                self.as_raw_response()
1123            }
1124        }
1125        #[derive(Clone)]
1126        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1127        #[doc = r""]
1128        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1129        #[doc = r" parameters can be chained."]
1130        #[doc = r""]
1131        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1132        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
1133        #[doc = r" executes the request and returns a `Result` with the parsed"]
1134        #[doc = r" response."]
1135        #[doc = r""]
1136        #[doc = r" In order to execute the request without polling the service"]
1137        #[doc = r" until the operation completes, use `.send().await` instead."]
1138        #[doc = r""]
1139        #[doc = r" If you need lower-level access to the raw response details"]
1140        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1141        #[doc = r" can finalize the request using the"]
1142        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1143        #[doc = r" that resolves to a lower-level [`Response`] value."]
1144        pub struct RequestBuilder {
1145            pub(crate) client: super::super::Client,
1146            pub(crate) subscription_id: String,
1147            pub(crate) resource_group_name: String,
1148            pub(crate) automation_account_name: String,
1149            pub(crate) runbook_name: String,
1150        }
1151        impl RequestBuilder {
1152            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1153            #[doc = ""]
1154            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1155            #[doc = "However, this function can provide more flexibility when required."]
1156            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1157                Box::pin({
1158                    let this = self.clone();
1159                    async move {
1160                        let url = this.url()?;
1161                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1162                        let bearer_token = this.client.bearer_token().await?;
1163                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1164                        let req_body = azure_core::EMPTY_BODY;
1165                        req.set_body(req_body);
1166                        Ok(Response(this.client.send(&mut req).await?))
1167                    }
1168                })
1169            }
1170            fn url(&self) -> azure_core::Result<azure_core::Url> {
1171                let mut url = self.client.endpoint().clone();
1172                url.set_path(&format!(
1173                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}",
1174                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
1175                ));
1176                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1177                if !has_api_version_already {
1178                    url.query_pairs_mut()
1179                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1180                }
1181                Ok(url)
1182            }
1183        }
1184        impl std::future::IntoFuture for RequestBuilder {
1185            type Output = azure_core::Result<models::Runbook>;
1186            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Runbook>>;
1187            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1188            #[doc = ""]
1189            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1190            #[doc = ""]
1191            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1192            fn into_future(self) -> Self::IntoFuture {
1193                Box::pin(async move { self.send().await?.into_body().await })
1194            }
1195        }
1196    }
1197    pub mod create_or_update {
1198        use super::models;
1199        #[cfg(not(target_arch = "wasm32"))]
1200        use futures::future::BoxFuture;
1201        #[cfg(target_arch = "wasm32")]
1202        use futures::future::LocalBoxFuture as BoxFuture;
1203        #[derive(Debug)]
1204        pub struct Response(azure_core::Response);
1205        impl Response {
1206            pub async fn into_body(self) -> azure_core::Result<models::Runbook> {
1207                let bytes = self.0.into_body().collect().await?;
1208                let body: models::Runbook = serde_json::from_slice(&bytes)?;
1209                Ok(body)
1210            }
1211            pub fn into_raw_response(self) -> azure_core::Response {
1212                self.0
1213            }
1214            pub fn as_raw_response(&self) -> &azure_core::Response {
1215                &self.0
1216            }
1217        }
1218        impl From<Response> for azure_core::Response {
1219            fn from(rsp: Response) -> Self {
1220                rsp.into_raw_response()
1221            }
1222        }
1223        impl AsRef<azure_core::Response> for Response {
1224            fn as_ref(&self) -> &azure_core::Response {
1225                self.as_raw_response()
1226            }
1227        }
1228        #[derive(Clone)]
1229        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1230        #[doc = r""]
1231        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1232        #[doc = r" parameters can be chained."]
1233        #[doc = r""]
1234        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1235        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
1236        #[doc = r" executes the request and returns a `Result` with the parsed"]
1237        #[doc = r" response."]
1238        #[doc = r""]
1239        #[doc = r" In order to execute the request without polling the service"]
1240        #[doc = r" until the operation completes, use `.send().await` instead."]
1241        #[doc = r""]
1242        #[doc = r" If you need lower-level access to the raw response details"]
1243        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1244        #[doc = r" can finalize the request using the"]
1245        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1246        #[doc = r" that resolves to a lower-level [`Response`] value."]
1247        pub struct RequestBuilder {
1248            pub(crate) client: super::super::Client,
1249            pub(crate) subscription_id: String,
1250            pub(crate) resource_group_name: String,
1251            pub(crate) automation_account_name: String,
1252            pub(crate) runbook_name: String,
1253            pub(crate) parameters: models::RunbookCreateOrUpdateParameters,
1254        }
1255        impl RequestBuilder {
1256            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1257            #[doc = ""]
1258            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1259            #[doc = "However, this function can provide more flexibility when required."]
1260            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1261                Box::pin({
1262                    let this = self.clone();
1263                    async move {
1264                        let url = this.url()?;
1265                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
1266                        let bearer_token = this.client.bearer_token().await?;
1267                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1268                        req.insert_header("content-type", "application/json");
1269                        let req_body = azure_core::to_json(&this.parameters)?;
1270                        req.set_body(req_body);
1271                        Ok(Response(this.client.send(&mut req).await?))
1272                    }
1273                })
1274            }
1275            fn url(&self) -> azure_core::Result<azure_core::Url> {
1276                let mut url = self.client.endpoint().clone();
1277                url.set_path(&format!(
1278                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}",
1279                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
1280                ));
1281                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1282                if !has_api_version_already {
1283                    url.query_pairs_mut()
1284                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1285                }
1286                Ok(url)
1287            }
1288        }
1289        impl std::future::IntoFuture for RequestBuilder {
1290            type Output = azure_core::Result<models::Runbook>;
1291            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Runbook>>;
1292            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1293            #[doc = ""]
1294            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1295            #[doc = ""]
1296            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1297            fn into_future(self) -> Self::IntoFuture {
1298                Box::pin(async move { self.send().await?.into_body().await })
1299            }
1300        }
1301    }
1302    pub mod update {
1303        use super::models;
1304        #[cfg(not(target_arch = "wasm32"))]
1305        use futures::future::BoxFuture;
1306        #[cfg(target_arch = "wasm32")]
1307        use futures::future::LocalBoxFuture as BoxFuture;
1308        #[derive(Debug)]
1309        pub struct Response(azure_core::Response);
1310        impl Response {
1311            pub async fn into_body(self) -> azure_core::Result<models::Runbook> {
1312                let bytes = self.0.into_body().collect().await?;
1313                let body: models::Runbook = serde_json::from_slice(&bytes)?;
1314                Ok(body)
1315            }
1316            pub fn into_raw_response(self) -> azure_core::Response {
1317                self.0
1318            }
1319            pub fn as_raw_response(&self) -> &azure_core::Response {
1320                &self.0
1321            }
1322        }
1323        impl From<Response> for azure_core::Response {
1324            fn from(rsp: Response) -> Self {
1325                rsp.into_raw_response()
1326            }
1327        }
1328        impl AsRef<azure_core::Response> for Response {
1329            fn as_ref(&self) -> &azure_core::Response {
1330                self.as_raw_response()
1331            }
1332        }
1333        #[derive(Clone)]
1334        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1335        #[doc = r""]
1336        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1337        #[doc = r" parameters can be chained."]
1338        #[doc = r""]
1339        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1340        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
1341        #[doc = r" executes the request and returns a `Result` with the parsed"]
1342        #[doc = r" response."]
1343        #[doc = r""]
1344        #[doc = r" In order to execute the request without polling the service"]
1345        #[doc = r" until the operation completes, use `.send().await` instead."]
1346        #[doc = r""]
1347        #[doc = r" If you need lower-level access to the raw response details"]
1348        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1349        #[doc = r" can finalize the request using the"]
1350        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1351        #[doc = r" that resolves to a lower-level [`Response`] value."]
1352        pub struct RequestBuilder {
1353            pub(crate) client: super::super::Client,
1354            pub(crate) subscription_id: String,
1355            pub(crate) resource_group_name: String,
1356            pub(crate) automation_account_name: String,
1357            pub(crate) runbook_name: String,
1358            pub(crate) parameters: models::RunbookUpdateParameters,
1359        }
1360        impl RequestBuilder {
1361            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1362            #[doc = ""]
1363            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1364            #[doc = "However, this function can provide more flexibility when required."]
1365            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1366                Box::pin({
1367                    let this = self.clone();
1368                    async move {
1369                        let url = this.url()?;
1370                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
1371                        let bearer_token = this.client.bearer_token().await?;
1372                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1373                        req.insert_header("content-type", "application/json");
1374                        let req_body = azure_core::to_json(&this.parameters)?;
1375                        req.set_body(req_body);
1376                        Ok(Response(this.client.send(&mut req).await?))
1377                    }
1378                })
1379            }
1380            fn url(&self) -> azure_core::Result<azure_core::Url> {
1381                let mut url = self.client.endpoint().clone();
1382                url.set_path(&format!(
1383                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}",
1384                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
1385                ));
1386                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1387                if !has_api_version_already {
1388                    url.query_pairs_mut()
1389                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1390                }
1391                Ok(url)
1392            }
1393        }
1394        impl std::future::IntoFuture for RequestBuilder {
1395            type Output = azure_core::Result<models::Runbook>;
1396            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Runbook>>;
1397            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1398            #[doc = ""]
1399            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1400            #[doc = ""]
1401            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1402            fn into_future(self) -> Self::IntoFuture {
1403                Box::pin(async move { self.send().await?.into_body().await })
1404            }
1405        }
1406    }
1407    pub mod delete {
1408        use super::models;
1409        #[cfg(not(target_arch = "wasm32"))]
1410        use futures::future::BoxFuture;
1411        #[cfg(target_arch = "wasm32")]
1412        use futures::future::LocalBoxFuture as BoxFuture;
1413        #[derive(Debug)]
1414        pub struct Response(azure_core::Response);
1415        impl Response {
1416            pub fn into_raw_response(self) -> azure_core::Response {
1417                self.0
1418            }
1419            pub fn as_raw_response(&self) -> &azure_core::Response {
1420                &self.0
1421            }
1422        }
1423        impl From<Response> for azure_core::Response {
1424            fn from(rsp: Response) -> Self {
1425                rsp.into_raw_response()
1426            }
1427        }
1428        impl AsRef<azure_core::Response> for Response {
1429            fn as_ref(&self) -> &azure_core::Response {
1430                self.as_raw_response()
1431            }
1432        }
1433        #[derive(Clone)]
1434        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1435        #[doc = r""]
1436        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1437        #[doc = r" parameters can be chained."]
1438        #[doc = r""]
1439        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1440        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
1441        #[doc = r" executes the request and returns a `Result` with the parsed"]
1442        #[doc = r" response."]
1443        #[doc = r""]
1444        #[doc = r" In order to execute the request without polling the service"]
1445        #[doc = r" until the operation completes, use `.send().await` instead."]
1446        #[doc = r""]
1447        #[doc = r" If you need lower-level access to the raw response details"]
1448        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1449        #[doc = r" can finalize the request using the"]
1450        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1451        #[doc = r" that resolves to a lower-level [`Response`] value."]
1452        pub struct RequestBuilder {
1453            pub(crate) client: super::super::Client,
1454            pub(crate) subscription_id: String,
1455            pub(crate) resource_group_name: String,
1456            pub(crate) automation_account_name: String,
1457            pub(crate) runbook_name: String,
1458        }
1459        impl RequestBuilder {
1460            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1461            #[doc = ""]
1462            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1463            #[doc = "However, this function can provide more flexibility when required."]
1464            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1465                Box::pin({
1466                    let this = self.clone();
1467                    async move {
1468                        let url = this.url()?;
1469                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
1470                        let bearer_token = this.client.bearer_token().await?;
1471                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1472                        let req_body = azure_core::EMPTY_BODY;
1473                        req.set_body(req_body);
1474                        Ok(Response(this.client.send(&mut req).await?))
1475                    }
1476                })
1477            }
1478            fn url(&self) -> azure_core::Result<azure_core::Url> {
1479                let mut url = self.client.endpoint().clone();
1480                url.set_path(&format!(
1481                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}",
1482                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
1483                ));
1484                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1485                if !has_api_version_already {
1486                    url.query_pairs_mut()
1487                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1488                }
1489                Ok(url)
1490            }
1491        }
1492    }
1493    pub mod list_by_automation_account {
1494        use super::models;
1495        #[cfg(not(target_arch = "wasm32"))]
1496        use futures::future::BoxFuture;
1497        #[cfg(target_arch = "wasm32")]
1498        use futures::future::LocalBoxFuture as BoxFuture;
1499        #[derive(Debug)]
1500        pub struct Response(azure_core::Response);
1501        impl Response {
1502            pub async fn into_body(self) -> azure_core::Result<models::RunbookListResult> {
1503                let bytes = self.0.into_body().collect().await?;
1504                let body: models::RunbookListResult = serde_json::from_slice(&bytes)?;
1505                Ok(body)
1506            }
1507            pub fn into_raw_response(self) -> azure_core::Response {
1508                self.0
1509            }
1510            pub fn as_raw_response(&self) -> &azure_core::Response {
1511                &self.0
1512            }
1513        }
1514        impl From<Response> for azure_core::Response {
1515            fn from(rsp: Response) -> Self {
1516                rsp.into_raw_response()
1517            }
1518        }
1519        impl AsRef<azure_core::Response> for Response {
1520            fn as_ref(&self) -> &azure_core::Response {
1521                self.as_raw_response()
1522            }
1523        }
1524        #[derive(Clone)]
1525        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1526        #[doc = r""]
1527        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1528        #[doc = r" parameters can be chained."]
1529        #[doc = r""]
1530        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1531        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
1532        #[doc = r" executes the request and returns a `Result` with the parsed"]
1533        #[doc = r" response."]
1534        #[doc = r""]
1535        #[doc = r" In order to execute the request without polling the service"]
1536        #[doc = r" until the operation completes, use `.send().await` instead."]
1537        #[doc = r""]
1538        #[doc = r" If you need lower-level access to the raw response details"]
1539        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1540        #[doc = r" can finalize the request using the"]
1541        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1542        #[doc = r" that resolves to a lower-level [`Response`] value."]
1543        pub struct RequestBuilder {
1544            pub(crate) client: super::super::Client,
1545            pub(crate) subscription_id: String,
1546            pub(crate) resource_group_name: String,
1547            pub(crate) automation_account_name: String,
1548        }
1549        impl RequestBuilder {
1550            pub fn into_stream(self) -> azure_core::Pageable<models::RunbookListResult, azure_core::error::Error> {
1551                let make_request = move |continuation: Option<String>| {
1552                    let this = self.clone();
1553                    async move {
1554                        let mut url = this.url()?;
1555                        let rsp = match continuation {
1556                            Some(value) => {
1557                                url.set_path("");
1558                                url = url.join(&value)?;
1559                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1560                                let bearer_token = this.client.bearer_token().await?;
1561                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1562                                let has_api_version_already =
1563                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1564                                if !has_api_version_already {
1565                                    req.url_mut()
1566                                        .query_pairs_mut()
1567                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1568                                }
1569                                let req_body = azure_core::EMPTY_BODY;
1570                                req.set_body(req_body);
1571                                this.client.send(&mut req).await?
1572                            }
1573                            None => {
1574                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1575                                let bearer_token = this.client.bearer_token().await?;
1576                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1577                                let req_body = azure_core::EMPTY_BODY;
1578                                req.set_body(req_body);
1579                                this.client.send(&mut req).await?
1580                            }
1581                        };
1582                        let rsp = match rsp.status() {
1583                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
1584                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
1585                                status: status_code,
1586                                error_code: None,
1587                            })),
1588                        };
1589                        rsp?.into_body().await
1590                    }
1591                };
1592                azure_core::Pageable::new(make_request)
1593            }
1594            fn url(&self) -> azure_core::Result<azure_core::Url> {
1595                let mut url = self.client.endpoint().clone();
1596                url.set_path(&format!(
1597                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks",
1598                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
1599                ));
1600                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1601                if !has_api_version_already {
1602                    url.query_pairs_mut()
1603                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1604                }
1605                Ok(url)
1606            }
1607        }
1608    }
1609}
1610pub mod test_job_streams {
1611    use super::models;
1612    #[cfg(not(target_arch = "wasm32"))]
1613    use futures::future::BoxFuture;
1614    #[cfg(target_arch = "wasm32")]
1615    use futures::future::LocalBoxFuture as BoxFuture;
1616    pub struct Client(pub(crate) super::Client);
1617    impl Client {
1618        #[doc = "Retrieve a test job stream of the test job identified by runbook name and stream id."]
1619        #[doc = ""]
1620        #[doc = "Arguments:"]
1621        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
1622        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
1623        #[doc = "* `automation_account_name`: The name of the automation account."]
1624        #[doc = "* `runbook_name`: The runbook name."]
1625        #[doc = "* `job_stream_id`: The job stream id."]
1626        pub fn get(
1627            &self,
1628            subscription_id: impl Into<String>,
1629            resource_group_name: impl Into<String>,
1630            automation_account_name: impl Into<String>,
1631            runbook_name: impl Into<String>,
1632            job_stream_id: impl Into<String>,
1633        ) -> get::RequestBuilder {
1634            get::RequestBuilder {
1635                client: self.0.clone(),
1636                subscription_id: subscription_id.into(),
1637                resource_group_name: resource_group_name.into(),
1638                automation_account_name: automation_account_name.into(),
1639                runbook_name: runbook_name.into(),
1640                job_stream_id: job_stream_id.into(),
1641            }
1642        }
1643        #[doc = "Retrieve a list of test job streams identified by runbook name."]
1644        #[doc = ""]
1645        #[doc = "Arguments:"]
1646        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
1647        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
1648        #[doc = "* `automation_account_name`: The name of the automation account."]
1649        #[doc = "* `runbook_name`: The runbook name."]
1650        pub fn list_by_test_job(
1651            &self,
1652            subscription_id: impl Into<String>,
1653            resource_group_name: impl Into<String>,
1654            automation_account_name: impl Into<String>,
1655            runbook_name: impl Into<String>,
1656        ) -> list_by_test_job::RequestBuilder {
1657            list_by_test_job::RequestBuilder {
1658                client: self.0.clone(),
1659                subscription_id: subscription_id.into(),
1660                resource_group_name: resource_group_name.into(),
1661                automation_account_name: automation_account_name.into(),
1662                runbook_name: runbook_name.into(),
1663                filter: None,
1664            }
1665        }
1666    }
1667    pub mod get {
1668        use super::models;
1669        #[cfg(not(target_arch = "wasm32"))]
1670        use futures::future::BoxFuture;
1671        #[cfg(target_arch = "wasm32")]
1672        use futures::future::LocalBoxFuture as BoxFuture;
1673        #[derive(Debug)]
1674        pub struct Response(azure_core::Response);
1675        impl Response {
1676            pub async fn into_body(self) -> azure_core::Result<models::JobStream> {
1677                let bytes = self.0.into_body().collect().await?;
1678                let body: models::JobStream = serde_json::from_slice(&bytes)?;
1679                Ok(body)
1680            }
1681            pub fn into_raw_response(self) -> azure_core::Response {
1682                self.0
1683            }
1684            pub fn as_raw_response(&self) -> &azure_core::Response {
1685                &self.0
1686            }
1687        }
1688        impl From<Response> for azure_core::Response {
1689            fn from(rsp: Response) -> Self {
1690                rsp.into_raw_response()
1691            }
1692        }
1693        impl AsRef<azure_core::Response> for Response {
1694            fn as_ref(&self) -> &azure_core::Response {
1695                self.as_raw_response()
1696            }
1697        }
1698        #[derive(Clone)]
1699        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1700        #[doc = r""]
1701        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1702        #[doc = r" parameters can be chained."]
1703        #[doc = r""]
1704        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1705        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
1706        #[doc = r" executes the request and returns a `Result` with the parsed"]
1707        #[doc = r" response."]
1708        #[doc = r""]
1709        #[doc = r" In order to execute the request without polling the service"]
1710        #[doc = r" until the operation completes, use `.send().await` instead."]
1711        #[doc = r""]
1712        #[doc = r" If you need lower-level access to the raw response details"]
1713        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1714        #[doc = r" can finalize the request using the"]
1715        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1716        #[doc = r" that resolves to a lower-level [`Response`] value."]
1717        pub struct RequestBuilder {
1718            pub(crate) client: super::super::Client,
1719            pub(crate) subscription_id: String,
1720            pub(crate) resource_group_name: String,
1721            pub(crate) automation_account_name: String,
1722            pub(crate) runbook_name: String,
1723            pub(crate) job_stream_id: String,
1724        }
1725        impl RequestBuilder {
1726            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1727            #[doc = ""]
1728            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1729            #[doc = "However, this function can provide more flexibility when required."]
1730            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1731                Box::pin({
1732                    let this = self.clone();
1733                    async move {
1734                        let url = this.url()?;
1735                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1736                        let bearer_token = this.client.bearer_token().await?;
1737                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1738                        let req_body = azure_core::EMPTY_BODY;
1739                        req.set_body(req_body);
1740                        Ok(Response(this.client.send(&mut req).await?))
1741                    }
1742                })
1743            }
1744            fn url(&self) -> azure_core::Result<azure_core::Url> {
1745                let mut url = self.client.endpoint().clone();
1746                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/testJob/streams/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . runbook_name , & self . job_stream_id)) ;
1747                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1748                if !has_api_version_already {
1749                    url.query_pairs_mut()
1750                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1751                }
1752                Ok(url)
1753            }
1754        }
1755        impl std::future::IntoFuture for RequestBuilder {
1756            type Output = azure_core::Result<models::JobStream>;
1757            type IntoFuture = BoxFuture<'static, azure_core::Result<models::JobStream>>;
1758            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1759            #[doc = ""]
1760            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1761            #[doc = ""]
1762            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1763            fn into_future(self) -> Self::IntoFuture {
1764                Box::pin(async move { self.send().await?.into_body().await })
1765            }
1766        }
1767    }
1768    pub mod list_by_test_job {
1769        use super::models;
1770        #[cfg(not(target_arch = "wasm32"))]
1771        use futures::future::BoxFuture;
1772        #[cfg(target_arch = "wasm32")]
1773        use futures::future::LocalBoxFuture as BoxFuture;
1774        #[derive(Debug)]
1775        pub struct Response(azure_core::Response);
1776        impl Response {
1777            pub async fn into_body(self) -> azure_core::Result<models::JobStreamListResult> {
1778                let bytes = self.0.into_body().collect().await?;
1779                let body: models::JobStreamListResult = serde_json::from_slice(&bytes)?;
1780                Ok(body)
1781            }
1782            pub fn into_raw_response(self) -> azure_core::Response {
1783                self.0
1784            }
1785            pub fn as_raw_response(&self) -> &azure_core::Response {
1786                &self.0
1787            }
1788        }
1789        impl From<Response> for azure_core::Response {
1790            fn from(rsp: Response) -> Self {
1791                rsp.into_raw_response()
1792            }
1793        }
1794        impl AsRef<azure_core::Response> for Response {
1795            fn as_ref(&self) -> &azure_core::Response {
1796                self.as_raw_response()
1797            }
1798        }
1799        #[derive(Clone)]
1800        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1801        #[doc = r""]
1802        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1803        #[doc = r" parameters can be chained."]
1804        #[doc = r""]
1805        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1806        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
1807        #[doc = r" executes the request and returns a `Result` with the parsed"]
1808        #[doc = r" response."]
1809        #[doc = r""]
1810        #[doc = r" In order to execute the request without polling the service"]
1811        #[doc = r" until the operation completes, use `.send().await` instead."]
1812        #[doc = r""]
1813        #[doc = r" If you need lower-level access to the raw response details"]
1814        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1815        #[doc = r" can finalize the request using the"]
1816        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1817        #[doc = r" that resolves to a lower-level [`Response`] value."]
1818        pub struct RequestBuilder {
1819            pub(crate) client: super::super::Client,
1820            pub(crate) subscription_id: String,
1821            pub(crate) resource_group_name: String,
1822            pub(crate) automation_account_name: String,
1823            pub(crate) runbook_name: String,
1824            pub(crate) filter: Option<String>,
1825        }
1826        impl RequestBuilder {
1827            #[doc = "The filter to apply on the operation."]
1828            pub fn filter(mut self, filter: impl Into<String>) -> Self {
1829                self.filter = Some(filter.into());
1830                self
1831            }
1832            pub fn into_stream(self) -> azure_core::Pageable<models::JobStreamListResult, azure_core::error::Error> {
1833                let make_request = move |continuation: Option<String>| {
1834                    let this = self.clone();
1835                    async move {
1836                        let mut url = this.url()?;
1837                        let rsp = match continuation {
1838                            Some(value) => {
1839                                url.set_path("");
1840                                url = url.join(&value)?;
1841                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1842                                let bearer_token = this.client.bearer_token().await?;
1843                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1844                                let has_api_version_already =
1845                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1846                                if !has_api_version_already {
1847                                    req.url_mut()
1848                                        .query_pairs_mut()
1849                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1850                                }
1851                                let req_body = azure_core::EMPTY_BODY;
1852                                req.set_body(req_body);
1853                                this.client.send(&mut req).await?
1854                            }
1855                            None => {
1856                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1857                                let bearer_token = this.client.bearer_token().await?;
1858                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
1859                                if let Some(filter) = &this.filter {
1860                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
1861                                }
1862                                let req_body = azure_core::EMPTY_BODY;
1863                                req.set_body(req_body);
1864                                this.client.send(&mut req).await?
1865                            }
1866                        };
1867                        let rsp = match rsp.status() {
1868                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
1869                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
1870                                status: status_code,
1871                                error_code: None,
1872                            })),
1873                        };
1874                        rsp?.into_body().await
1875                    }
1876                };
1877                azure_core::Pageable::new(make_request)
1878            }
1879            fn url(&self) -> azure_core::Result<azure_core::Url> {
1880                let mut url = self.client.endpoint().clone();
1881                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/testJob/streams" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . runbook_name)) ;
1882                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
1883                if !has_api_version_already {
1884                    url.query_pairs_mut()
1885                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
1886                }
1887                Ok(url)
1888            }
1889        }
1890    }
1891}
1892pub mod test_job {
1893    use super::models;
1894    #[cfg(not(target_arch = "wasm32"))]
1895    use futures::future::BoxFuture;
1896    #[cfg(target_arch = "wasm32")]
1897    use futures::future::LocalBoxFuture as BoxFuture;
1898    pub struct Client(pub(crate) super::Client);
1899    impl Client {
1900        #[doc = "Retrieve the test job for the specified runbook."]
1901        #[doc = ""]
1902        #[doc = "Arguments:"]
1903        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
1904        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
1905        #[doc = "* `automation_account_name`: The name of the automation account."]
1906        #[doc = "* `runbook_name`: The runbook name."]
1907        pub fn get(
1908            &self,
1909            subscription_id: impl Into<String>,
1910            resource_group_name: impl Into<String>,
1911            automation_account_name: impl Into<String>,
1912            runbook_name: impl Into<String>,
1913        ) -> get::RequestBuilder {
1914            get::RequestBuilder {
1915                client: self.0.clone(),
1916                subscription_id: subscription_id.into(),
1917                resource_group_name: resource_group_name.into(),
1918                automation_account_name: automation_account_name.into(),
1919                runbook_name: runbook_name.into(),
1920            }
1921        }
1922        #[doc = "Create a test job of the runbook."]
1923        #[doc = ""]
1924        #[doc = "Arguments:"]
1925        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
1926        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
1927        #[doc = "* `automation_account_name`: The name of the automation account."]
1928        #[doc = "* `runbook_name`: The parameters supplied to the create test job operation."]
1929        #[doc = "* `parameters`: The parameters supplied to the create test job operation."]
1930        pub fn create(
1931            &self,
1932            subscription_id: impl Into<String>,
1933            resource_group_name: impl Into<String>,
1934            automation_account_name: impl Into<String>,
1935            runbook_name: impl Into<String>,
1936            parameters: impl Into<models::TestJobCreateParameters>,
1937        ) -> create::RequestBuilder {
1938            create::RequestBuilder {
1939                client: self.0.clone(),
1940                subscription_id: subscription_id.into(),
1941                resource_group_name: resource_group_name.into(),
1942                automation_account_name: automation_account_name.into(),
1943                runbook_name: runbook_name.into(),
1944                parameters: parameters.into(),
1945            }
1946        }
1947        #[doc = "Resume the test job."]
1948        #[doc = ""]
1949        #[doc = "Arguments:"]
1950        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
1951        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
1952        #[doc = "* `automation_account_name`: The name of the automation account."]
1953        #[doc = "* `runbook_name`: The runbook name."]
1954        pub fn resume(
1955            &self,
1956            subscription_id: impl Into<String>,
1957            resource_group_name: impl Into<String>,
1958            automation_account_name: impl Into<String>,
1959            runbook_name: impl Into<String>,
1960        ) -> resume::RequestBuilder {
1961            resume::RequestBuilder {
1962                client: self.0.clone(),
1963                subscription_id: subscription_id.into(),
1964                resource_group_name: resource_group_name.into(),
1965                automation_account_name: automation_account_name.into(),
1966                runbook_name: runbook_name.into(),
1967            }
1968        }
1969        #[doc = "Stop the test job."]
1970        #[doc = ""]
1971        #[doc = "Arguments:"]
1972        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
1973        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
1974        #[doc = "* `automation_account_name`: The name of the automation account."]
1975        #[doc = "* `runbook_name`: The runbook name."]
1976        pub fn stop(
1977            &self,
1978            subscription_id: impl Into<String>,
1979            resource_group_name: impl Into<String>,
1980            automation_account_name: impl Into<String>,
1981            runbook_name: impl Into<String>,
1982        ) -> stop::RequestBuilder {
1983            stop::RequestBuilder {
1984                client: self.0.clone(),
1985                subscription_id: subscription_id.into(),
1986                resource_group_name: resource_group_name.into(),
1987                automation_account_name: automation_account_name.into(),
1988                runbook_name: runbook_name.into(),
1989            }
1990        }
1991        #[doc = "Suspend the test job."]
1992        #[doc = ""]
1993        #[doc = "Arguments:"]
1994        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
1995        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
1996        #[doc = "* `automation_account_name`: The name of the automation account."]
1997        #[doc = "* `runbook_name`: The runbook name."]
1998        pub fn suspend(
1999            &self,
2000            subscription_id: impl Into<String>,
2001            resource_group_name: impl Into<String>,
2002            automation_account_name: impl Into<String>,
2003            runbook_name: impl Into<String>,
2004        ) -> suspend::RequestBuilder {
2005            suspend::RequestBuilder {
2006                client: self.0.clone(),
2007                subscription_id: subscription_id.into(),
2008                resource_group_name: resource_group_name.into(),
2009                automation_account_name: automation_account_name.into(),
2010                runbook_name: runbook_name.into(),
2011            }
2012        }
2013    }
2014    pub mod get {
2015        use super::models;
2016        #[cfg(not(target_arch = "wasm32"))]
2017        use futures::future::BoxFuture;
2018        #[cfg(target_arch = "wasm32")]
2019        use futures::future::LocalBoxFuture as BoxFuture;
2020        #[derive(Debug)]
2021        pub struct Response(azure_core::Response);
2022        impl Response {
2023            pub async fn into_body(self) -> azure_core::Result<models::TestJob> {
2024                let bytes = self.0.into_body().collect().await?;
2025                let body: models::TestJob = serde_json::from_slice(&bytes)?;
2026                Ok(body)
2027            }
2028            pub fn into_raw_response(self) -> azure_core::Response {
2029                self.0
2030            }
2031            pub fn as_raw_response(&self) -> &azure_core::Response {
2032                &self.0
2033            }
2034        }
2035        impl From<Response> for azure_core::Response {
2036            fn from(rsp: Response) -> Self {
2037                rsp.into_raw_response()
2038            }
2039        }
2040        impl AsRef<azure_core::Response> for Response {
2041            fn as_ref(&self) -> &azure_core::Response {
2042                self.as_raw_response()
2043            }
2044        }
2045        #[derive(Clone)]
2046        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2047        #[doc = r""]
2048        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2049        #[doc = r" parameters can be chained."]
2050        #[doc = r""]
2051        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2052        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2053        #[doc = r" executes the request and returns a `Result` with the parsed"]
2054        #[doc = r" response."]
2055        #[doc = r""]
2056        #[doc = r" In order to execute the request without polling the service"]
2057        #[doc = r" until the operation completes, use `.send().await` instead."]
2058        #[doc = r""]
2059        #[doc = r" If you need lower-level access to the raw response details"]
2060        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2061        #[doc = r" can finalize the request using the"]
2062        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2063        #[doc = r" that resolves to a lower-level [`Response`] value."]
2064        pub struct RequestBuilder {
2065            pub(crate) client: super::super::Client,
2066            pub(crate) subscription_id: String,
2067            pub(crate) resource_group_name: String,
2068            pub(crate) automation_account_name: String,
2069            pub(crate) runbook_name: String,
2070        }
2071        impl RequestBuilder {
2072            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2073            #[doc = ""]
2074            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2075            #[doc = "However, this function can provide more flexibility when required."]
2076            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2077                Box::pin({
2078                    let this = self.clone();
2079                    async move {
2080                        let url = this.url()?;
2081                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
2082                        let bearer_token = this.client.bearer_token().await?;
2083                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2084                        let req_body = azure_core::EMPTY_BODY;
2085                        req.set_body(req_body);
2086                        Ok(Response(this.client.send(&mut req).await?))
2087                    }
2088                })
2089            }
2090            fn url(&self) -> azure_core::Result<azure_core::Url> {
2091                let mut url = self.client.endpoint().clone();
2092                url.set_path(&format!(
2093                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/testJob",
2094                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
2095                ));
2096                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2097                if !has_api_version_already {
2098                    url.query_pairs_mut()
2099                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2100                }
2101                Ok(url)
2102            }
2103        }
2104        impl std::future::IntoFuture for RequestBuilder {
2105            type Output = azure_core::Result<models::TestJob>;
2106            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestJob>>;
2107            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2108            #[doc = ""]
2109            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2110            #[doc = ""]
2111            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2112            fn into_future(self) -> Self::IntoFuture {
2113                Box::pin(async move { self.send().await?.into_body().await })
2114            }
2115        }
2116    }
2117    pub mod create {
2118        use super::models;
2119        #[cfg(not(target_arch = "wasm32"))]
2120        use futures::future::BoxFuture;
2121        #[cfg(target_arch = "wasm32")]
2122        use futures::future::LocalBoxFuture as BoxFuture;
2123        #[derive(Debug)]
2124        pub struct Response(azure_core::Response);
2125        impl Response {
2126            pub async fn into_body(self) -> azure_core::Result<models::TestJob> {
2127                let bytes = self.0.into_body().collect().await?;
2128                let body: models::TestJob = serde_json::from_slice(&bytes)?;
2129                Ok(body)
2130            }
2131            pub fn into_raw_response(self) -> azure_core::Response {
2132                self.0
2133            }
2134            pub fn as_raw_response(&self) -> &azure_core::Response {
2135                &self.0
2136            }
2137        }
2138        impl From<Response> for azure_core::Response {
2139            fn from(rsp: Response) -> Self {
2140                rsp.into_raw_response()
2141            }
2142        }
2143        impl AsRef<azure_core::Response> for Response {
2144            fn as_ref(&self) -> &azure_core::Response {
2145                self.as_raw_response()
2146            }
2147        }
2148        #[derive(Clone)]
2149        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2150        #[doc = r""]
2151        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2152        #[doc = r" parameters can be chained."]
2153        #[doc = r""]
2154        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2155        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2156        #[doc = r" executes the request and returns a `Result` with the parsed"]
2157        #[doc = r" response."]
2158        #[doc = r""]
2159        #[doc = r" In order to execute the request without polling the service"]
2160        #[doc = r" until the operation completes, use `.send().await` instead."]
2161        #[doc = r""]
2162        #[doc = r" If you need lower-level access to the raw response details"]
2163        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2164        #[doc = r" can finalize the request using the"]
2165        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2166        #[doc = r" that resolves to a lower-level [`Response`] value."]
2167        pub struct RequestBuilder {
2168            pub(crate) client: super::super::Client,
2169            pub(crate) subscription_id: String,
2170            pub(crate) resource_group_name: String,
2171            pub(crate) automation_account_name: String,
2172            pub(crate) runbook_name: String,
2173            pub(crate) parameters: models::TestJobCreateParameters,
2174        }
2175        impl RequestBuilder {
2176            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2177            #[doc = ""]
2178            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2179            #[doc = "However, this function can provide more flexibility when required."]
2180            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2181                Box::pin({
2182                    let this = self.clone();
2183                    async move {
2184                        let url = this.url()?;
2185                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
2186                        let bearer_token = this.client.bearer_token().await?;
2187                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2188                        req.insert_header("content-type", "application/json");
2189                        let req_body = azure_core::to_json(&this.parameters)?;
2190                        req.set_body(req_body);
2191                        Ok(Response(this.client.send(&mut req).await?))
2192                    }
2193                })
2194            }
2195            fn url(&self) -> azure_core::Result<azure_core::Url> {
2196                let mut url = self.client.endpoint().clone();
2197                url.set_path(&format!(
2198                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/testJob",
2199                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.runbook_name
2200                ));
2201                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2202                if !has_api_version_already {
2203                    url.query_pairs_mut()
2204                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2205                }
2206                Ok(url)
2207            }
2208        }
2209        impl std::future::IntoFuture for RequestBuilder {
2210            type Output = azure_core::Result<models::TestJob>;
2211            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestJob>>;
2212            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2213            #[doc = ""]
2214            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2215            #[doc = ""]
2216            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2217            fn into_future(self) -> Self::IntoFuture {
2218                Box::pin(async move { self.send().await?.into_body().await })
2219            }
2220        }
2221    }
2222    pub mod resume {
2223        use super::models;
2224        #[cfg(not(target_arch = "wasm32"))]
2225        use futures::future::BoxFuture;
2226        #[cfg(target_arch = "wasm32")]
2227        use futures::future::LocalBoxFuture as BoxFuture;
2228        #[derive(Debug)]
2229        pub struct Response(azure_core::Response);
2230        impl Response {
2231            pub fn into_raw_response(self) -> azure_core::Response {
2232                self.0
2233            }
2234            pub fn as_raw_response(&self) -> &azure_core::Response {
2235                &self.0
2236            }
2237        }
2238        impl From<Response> for azure_core::Response {
2239            fn from(rsp: Response) -> Self {
2240                rsp.into_raw_response()
2241            }
2242        }
2243        impl AsRef<azure_core::Response> for Response {
2244            fn as_ref(&self) -> &azure_core::Response {
2245                self.as_raw_response()
2246            }
2247        }
2248        #[derive(Clone)]
2249        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2250        #[doc = r""]
2251        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2252        #[doc = r" parameters can be chained."]
2253        #[doc = r""]
2254        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2255        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2256        #[doc = r" executes the request and returns a `Result` with the parsed"]
2257        #[doc = r" response."]
2258        #[doc = r""]
2259        #[doc = r" In order to execute the request without polling the service"]
2260        #[doc = r" until the operation completes, use `.send().await` instead."]
2261        #[doc = r""]
2262        #[doc = r" If you need lower-level access to the raw response details"]
2263        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2264        #[doc = r" can finalize the request using the"]
2265        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2266        #[doc = r" that resolves to a lower-level [`Response`] value."]
2267        pub struct RequestBuilder {
2268            pub(crate) client: super::super::Client,
2269            pub(crate) subscription_id: String,
2270            pub(crate) resource_group_name: String,
2271            pub(crate) automation_account_name: String,
2272            pub(crate) runbook_name: String,
2273        }
2274        impl RequestBuilder {
2275            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2276            #[doc = ""]
2277            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2278            #[doc = "However, this function can provide more flexibility when required."]
2279            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2280                Box::pin({
2281                    let this = self.clone();
2282                    async move {
2283                        let url = this.url()?;
2284                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
2285                        let bearer_token = this.client.bearer_token().await?;
2286                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2287                        let req_body = azure_core::EMPTY_BODY;
2288                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
2289                        req.set_body(req_body);
2290                        Ok(Response(this.client.send(&mut req).await?))
2291                    }
2292                })
2293            }
2294            fn url(&self) -> azure_core::Result<azure_core::Url> {
2295                let mut url = self.client.endpoint().clone();
2296                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/testJob/resume" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . runbook_name)) ;
2297                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2298                if !has_api_version_already {
2299                    url.query_pairs_mut()
2300                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2301                }
2302                Ok(url)
2303            }
2304        }
2305    }
2306    pub mod stop {
2307        use super::models;
2308        #[cfg(not(target_arch = "wasm32"))]
2309        use futures::future::BoxFuture;
2310        #[cfg(target_arch = "wasm32")]
2311        use futures::future::LocalBoxFuture as BoxFuture;
2312        #[derive(Debug)]
2313        pub struct Response(azure_core::Response);
2314        impl Response {
2315            pub fn into_raw_response(self) -> azure_core::Response {
2316                self.0
2317            }
2318            pub fn as_raw_response(&self) -> &azure_core::Response {
2319                &self.0
2320            }
2321        }
2322        impl From<Response> for azure_core::Response {
2323            fn from(rsp: Response) -> Self {
2324                rsp.into_raw_response()
2325            }
2326        }
2327        impl AsRef<azure_core::Response> for Response {
2328            fn as_ref(&self) -> &azure_core::Response {
2329                self.as_raw_response()
2330            }
2331        }
2332        #[derive(Clone)]
2333        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2334        #[doc = r""]
2335        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2336        #[doc = r" parameters can be chained."]
2337        #[doc = r""]
2338        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2339        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2340        #[doc = r" executes the request and returns a `Result` with the parsed"]
2341        #[doc = r" response."]
2342        #[doc = r""]
2343        #[doc = r" In order to execute the request without polling the service"]
2344        #[doc = r" until the operation completes, use `.send().await` instead."]
2345        #[doc = r""]
2346        #[doc = r" If you need lower-level access to the raw response details"]
2347        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2348        #[doc = r" can finalize the request using the"]
2349        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2350        #[doc = r" that resolves to a lower-level [`Response`] value."]
2351        pub struct RequestBuilder {
2352            pub(crate) client: super::super::Client,
2353            pub(crate) subscription_id: String,
2354            pub(crate) resource_group_name: String,
2355            pub(crate) automation_account_name: String,
2356            pub(crate) runbook_name: String,
2357        }
2358        impl RequestBuilder {
2359            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2360            #[doc = ""]
2361            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2362            #[doc = "However, this function can provide more flexibility when required."]
2363            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2364                Box::pin({
2365                    let this = self.clone();
2366                    async move {
2367                        let url = this.url()?;
2368                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
2369                        let bearer_token = this.client.bearer_token().await?;
2370                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2371                        let req_body = azure_core::EMPTY_BODY;
2372                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
2373                        req.set_body(req_body);
2374                        Ok(Response(this.client.send(&mut req).await?))
2375                    }
2376                })
2377            }
2378            fn url(&self) -> azure_core::Result<azure_core::Url> {
2379                let mut url = self.client.endpoint().clone();
2380                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/testJob/stop" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . runbook_name)) ;
2381                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2382                if !has_api_version_already {
2383                    url.query_pairs_mut()
2384                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2385                }
2386                Ok(url)
2387            }
2388        }
2389    }
2390    pub mod suspend {
2391        use super::models;
2392        #[cfg(not(target_arch = "wasm32"))]
2393        use futures::future::BoxFuture;
2394        #[cfg(target_arch = "wasm32")]
2395        use futures::future::LocalBoxFuture as BoxFuture;
2396        #[derive(Debug)]
2397        pub struct Response(azure_core::Response);
2398        impl Response {
2399            pub fn into_raw_response(self) -> azure_core::Response {
2400                self.0
2401            }
2402            pub fn as_raw_response(&self) -> &azure_core::Response {
2403                &self.0
2404            }
2405        }
2406        impl From<Response> for azure_core::Response {
2407            fn from(rsp: Response) -> Self {
2408                rsp.into_raw_response()
2409            }
2410        }
2411        impl AsRef<azure_core::Response> for Response {
2412            fn as_ref(&self) -> &azure_core::Response {
2413                self.as_raw_response()
2414            }
2415        }
2416        #[derive(Clone)]
2417        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2418        #[doc = r""]
2419        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2420        #[doc = r" parameters can be chained."]
2421        #[doc = r""]
2422        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2423        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2424        #[doc = r" executes the request and returns a `Result` with the parsed"]
2425        #[doc = r" response."]
2426        #[doc = r""]
2427        #[doc = r" In order to execute the request without polling the service"]
2428        #[doc = r" until the operation completes, use `.send().await` instead."]
2429        #[doc = r""]
2430        #[doc = r" If you need lower-level access to the raw response details"]
2431        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2432        #[doc = r" can finalize the request using the"]
2433        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2434        #[doc = r" that resolves to a lower-level [`Response`] value."]
2435        pub struct RequestBuilder {
2436            pub(crate) client: super::super::Client,
2437            pub(crate) subscription_id: String,
2438            pub(crate) resource_group_name: String,
2439            pub(crate) automation_account_name: String,
2440            pub(crate) runbook_name: String,
2441        }
2442        impl RequestBuilder {
2443            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2444            #[doc = ""]
2445            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2446            #[doc = "However, this function can provide more flexibility when required."]
2447            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2448                Box::pin({
2449                    let this = self.clone();
2450                    async move {
2451                        let url = this.url()?;
2452                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
2453                        let bearer_token = this.client.bearer_token().await?;
2454                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2455                        let req_body = azure_core::EMPTY_BODY;
2456                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
2457                        req.set_body(req_body);
2458                        Ok(Response(this.client.send(&mut req).await?))
2459                    }
2460                })
2461            }
2462            fn url(&self) -> azure_core::Result<azure_core::Url> {
2463                let mut url = self.client.endpoint().clone();
2464                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/runbooks/{}/draft/testJob/suspend" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . runbook_name)) ;
2465                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2466                if !has_api_version_already {
2467                    url.query_pairs_mut()
2468                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2469                }
2470                Ok(url)
2471            }
2472        }
2473    }
2474}
2475pub mod python2_package {
2476    use super::models;
2477    #[cfg(not(target_arch = "wasm32"))]
2478    use futures::future::BoxFuture;
2479    #[cfg(target_arch = "wasm32")]
2480    use futures::future::LocalBoxFuture as BoxFuture;
2481    pub struct Client(pub(crate) super::Client);
2482    impl Client {
2483        #[doc = "Retrieve the python 2 package identified by package name."]
2484        #[doc = ""]
2485        #[doc = "Arguments:"]
2486        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
2487        #[doc = "* `automation_account_name`: The name of the automation account."]
2488        #[doc = "* `package_name`: The python package name."]
2489        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
2490        pub fn get(
2491            &self,
2492            resource_group_name: impl Into<String>,
2493            automation_account_name: impl Into<String>,
2494            package_name: impl Into<String>,
2495            subscription_id: impl Into<String>,
2496        ) -> get::RequestBuilder {
2497            get::RequestBuilder {
2498                client: self.0.clone(),
2499                resource_group_name: resource_group_name.into(),
2500                automation_account_name: automation_account_name.into(),
2501                package_name: package_name.into(),
2502                subscription_id: subscription_id.into(),
2503            }
2504        }
2505        #[doc = "Create or Update the python 2 package identified by package name."]
2506        #[doc = ""]
2507        #[doc = "Arguments:"]
2508        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
2509        #[doc = "* `automation_account_name`: The name of the automation account."]
2510        #[doc = "* `package_name`: The name of python package."]
2511        #[doc = "* `parameters`: The create or update parameters for python package."]
2512        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
2513        pub fn create_or_update(
2514            &self,
2515            resource_group_name: impl Into<String>,
2516            automation_account_name: impl Into<String>,
2517            package_name: impl Into<String>,
2518            parameters: impl Into<models::PythonPackageCreateParameters>,
2519            subscription_id: impl Into<String>,
2520        ) -> create_or_update::RequestBuilder {
2521            create_or_update::RequestBuilder {
2522                client: self.0.clone(),
2523                resource_group_name: resource_group_name.into(),
2524                automation_account_name: automation_account_name.into(),
2525                package_name: package_name.into(),
2526                parameters: parameters.into(),
2527                subscription_id: subscription_id.into(),
2528            }
2529        }
2530        #[doc = "Update the python 2 package identified by package name."]
2531        #[doc = ""]
2532        #[doc = "Arguments:"]
2533        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
2534        #[doc = "* `automation_account_name`: The name of the automation account."]
2535        #[doc = "* `package_name`: The name of python package."]
2536        #[doc = "* `parameters`: The update parameters for python package."]
2537        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
2538        pub fn update(
2539            &self,
2540            resource_group_name: impl Into<String>,
2541            automation_account_name: impl Into<String>,
2542            package_name: impl Into<String>,
2543            parameters: impl Into<models::PythonPackageUpdateParameters>,
2544            subscription_id: impl Into<String>,
2545        ) -> update::RequestBuilder {
2546            update::RequestBuilder {
2547                client: self.0.clone(),
2548                resource_group_name: resource_group_name.into(),
2549                automation_account_name: automation_account_name.into(),
2550                package_name: package_name.into(),
2551                parameters: parameters.into(),
2552                subscription_id: subscription_id.into(),
2553            }
2554        }
2555        #[doc = "Delete the python 2 package by name."]
2556        #[doc = ""]
2557        #[doc = "Arguments:"]
2558        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
2559        #[doc = "* `automation_account_name`: The name of the automation account."]
2560        #[doc = "* `package_name`: The python package name."]
2561        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
2562        pub fn delete(
2563            &self,
2564            resource_group_name: impl Into<String>,
2565            automation_account_name: impl Into<String>,
2566            package_name: impl Into<String>,
2567            subscription_id: impl Into<String>,
2568        ) -> delete::RequestBuilder {
2569            delete::RequestBuilder {
2570                client: self.0.clone(),
2571                resource_group_name: resource_group_name.into(),
2572                automation_account_name: automation_account_name.into(),
2573                package_name: package_name.into(),
2574                subscription_id: subscription_id.into(),
2575            }
2576        }
2577        #[doc = "Retrieve a list of python 2 packages."]
2578        #[doc = ""]
2579        #[doc = "Arguments:"]
2580        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
2581        #[doc = "* `automation_account_name`: The name of the automation account."]
2582        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
2583        pub fn list_by_automation_account(
2584            &self,
2585            resource_group_name: impl Into<String>,
2586            automation_account_name: impl Into<String>,
2587            subscription_id: impl Into<String>,
2588        ) -> list_by_automation_account::RequestBuilder {
2589            list_by_automation_account::RequestBuilder {
2590                client: self.0.clone(),
2591                resource_group_name: resource_group_name.into(),
2592                automation_account_name: automation_account_name.into(),
2593                subscription_id: subscription_id.into(),
2594            }
2595        }
2596    }
2597    pub mod get {
2598        use super::models;
2599        #[cfg(not(target_arch = "wasm32"))]
2600        use futures::future::BoxFuture;
2601        #[cfg(target_arch = "wasm32")]
2602        use futures::future::LocalBoxFuture as BoxFuture;
2603        #[derive(Debug)]
2604        pub struct Response(azure_core::Response);
2605        impl Response {
2606            pub async fn into_body(self) -> azure_core::Result<models::Module> {
2607                let bytes = self.0.into_body().collect().await?;
2608                let body: models::Module = serde_json::from_slice(&bytes)?;
2609                Ok(body)
2610            }
2611            pub fn into_raw_response(self) -> azure_core::Response {
2612                self.0
2613            }
2614            pub fn as_raw_response(&self) -> &azure_core::Response {
2615                &self.0
2616            }
2617        }
2618        impl From<Response> for azure_core::Response {
2619            fn from(rsp: Response) -> Self {
2620                rsp.into_raw_response()
2621            }
2622        }
2623        impl AsRef<azure_core::Response> for Response {
2624            fn as_ref(&self) -> &azure_core::Response {
2625                self.as_raw_response()
2626            }
2627        }
2628        #[derive(Clone)]
2629        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2630        #[doc = r""]
2631        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2632        #[doc = r" parameters can be chained."]
2633        #[doc = r""]
2634        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2635        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2636        #[doc = r" executes the request and returns a `Result` with the parsed"]
2637        #[doc = r" response."]
2638        #[doc = r""]
2639        #[doc = r" In order to execute the request without polling the service"]
2640        #[doc = r" until the operation completes, use `.send().await` instead."]
2641        #[doc = r""]
2642        #[doc = r" If you need lower-level access to the raw response details"]
2643        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2644        #[doc = r" can finalize the request using the"]
2645        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2646        #[doc = r" that resolves to a lower-level [`Response`] value."]
2647        pub struct RequestBuilder {
2648            pub(crate) client: super::super::Client,
2649            pub(crate) resource_group_name: String,
2650            pub(crate) automation_account_name: String,
2651            pub(crate) package_name: String,
2652            pub(crate) subscription_id: String,
2653        }
2654        impl RequestBuilder {
2655            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2656            #[doc = ""]
2657            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2658            #[doc = "However, this function can provide more flexibility when required."]
2659            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2660                Box::pin({
2661                    let this = self.clone();
2662                    async move {
2663                        let url = this.url()?;
2664                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
2665                        let bearer_token = this.client.bearer_token().await?;
2666                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2667                        let req_body = azure_core::EMPTY_BODY;
2668                        req.set_body(req_body);
2669                        Ok(Response(this.client.send(&mut req).await?))
2670                    }
2671                })
2672            }
2673            fn url(&self) -> azure_core::Result<azure_core::Url> {
2674                let mut url = self.client.endpoint().clone();
2675                url.set_path(&format!(
2676                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/python2Packages/{}",
2677                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.package_name
2678                ));
2679                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2680                if !has_api_version_already {
2681                    url.query_pairs_mut()
2682                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2683                }
2684                Ok(url)
2685            }
2686        }
2687        impl std::future::IntoFuture for RequestBuilder {
2688            type Output = azure_core::Result<models::Module>;
2689            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Module>>;
2690            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2691            #[doc = ""]
2692            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2693            #[doc = ""]
2694            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2695            fn into_future(self) -> Self::IntoFuture {
2696                Box::pin(async move { self.send().await?.into_body().await })
2697            }
2698        }
2699    }
2700    pub mod create_or_update {
2701        use super::models;
2702        #[cfg(not(target_arch = "wasm32"))]
2703        use futures::future::BoxFuture;
2704        #[cfg(target_arch = "wasm32")]
2705        use futures::future::LocalBoxFuture as BoxFuture;
2706        #[derive(Debug)]
2707        pub struct Response(azure_core::Response);
2708        impl Response {
2709            pub async fn into_body(self) -> azure_core::Result<models::Module> {
2710                let bytes = self.0.into_body().collect().await?;
2711                let body: models::Module = serde_json::from_slice(&bytes)?;
2712                Ok(body)
2713            }
2714            pub fn into_raw_response(self) -> azure_core::Response {
2715                self.0
2716            }
2717            pub fn as_raw_response(&self) -> &azure_core::Response {
2718                &self.0
2719            }
2720        }
2721        impl From<Response> for azure_core::Response {
2722            fn from(rsp: Response) -> Self {
2723                rsp.into_raw_response()
2724            }
2725        }
2726        impl AsRef<azure_core::Response> for Response {
2727            fn as_ref(&self) -> &azure_core::Response {
2728                self.as_raw_response()
2729            }
2730        }
2731        #[derive(Clone)]
2732        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2733        #[doc = r""]
2734        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2735        #[doc = r" parameters can be chained."]
2736        #[doc = r""]
2737        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2738        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2739        #[doc = r" executes the request and returns a `Result` with the parsed"]
2740        #[doc = r" response."]
2741        #[doc = r""]
2742        #[doc = r" In order to execute the request without polling the service"]
2743        #[doc = r" until the operation completes, use `.send().await` instead."]
2744        #[doc = r""]
2745        #[doc = r" If you need lower-level access to the raw response details"]
2746        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2747        #[doc = r" can finalize the request using the"]
2748        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2749        #[doc = r" that resolves to a lower-level [`Response`] value."]
2750        pub struct RequestBuilder {
2751            pub(crate) client: super::super::Client,
2752            pub(crate) resource_group_name: String,
2753            pub(crate) automation_account_name: String,
2754            pub(crate) package_name: String,
2755            pub(crate) parameters: models::PythonPackageCreateParameters,
2756            pub(crate) subscription_id: String,
2757        }
2758        impl RequestBuilder {
2759            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2760            #[doc = ""]
2761            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2762            #[doc = "However, this function can provide more flexibility when required."]
2763            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2764                Box::pin({
2765                    let this = self.clone();
2766                    async move {
2767                        let url = this.url()?;
2768                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
2769                        let bearer_token = this.client.bearer_token().await?;
2770                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2771                        req.insert_header("content-type", "application/json");
2772                        let req_body = azure_core::to_json(&this.parameters)?;
2773                        req.set_body(req_body);
2774                        Ok(Response(this.client.send(&mut req).await?))
2775                    }
2776                })
2777            }
2778            fn url(&self) -> azure_core::Result<azure_core::Url> {
2779                let mut url = self.client.endpoint().clone();
2780                url.set_path(&format!(
2781                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/python2Packages/{}",
2782                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.package_name
2783                ));
2784                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2785                if !has_api_version_already {
2786                    url.query_pairs_mut()
2787                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2788                }
2789                Ok(url)
2790            }
2791        }
2792        impl std::future::IntoFuture for RequestBuilder {
2793            type Output = azure_core::Result<models::Module>;
2794            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Module>>;
2795            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2796            #[doc = ""]
2797            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2798            #[doc = ""]
2799            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2800            fn into_future(self) -> Self::IntoFuture {
2801                Box::pin(async move { self.send().await?.into_body().await })
2802            }
2803        }
2804    }
2805    pub mod update {
2806        use super::models;
2807        #[cfg(not(target_arch = "wasm32"))]
2808        use futures::future::BoxFuture;
2809        #[cfg(target_arch = "wasm32")]
2810        use futures::future::LocalBoxFuture as BoxFuture;
2811        #[derive(Debug)]
2812        pub struct Response(azure_core::Response);
2813        impl Response {
2814            pub async fn into_body(self) -> azure_core::Result<models::Module> {
2815                let bytes = self.0.into_body().collect().await?;
2816                let body: models::Module = serde_json::from_slice(&bytes)?;
2817                Ok(body)
2818            }
2819            pub fn into_raw_response(self) -> azure_core::Response {
2820                self.0
2821            }
2822            pub fn as_raw_response(&self) -> &azure_core::Response {
2823                &self.0
2824            }
2825        }
2826        impl From<Response> for azure_core::Response {
2827            fn from(rsp: Response) -> Self {
2828                rsp.into_raw_response()
2829            }
2830        }
2831        impl AsRef<azure_core::Response> for Response {
2832            fn as_ref(&self) -> &azure_core::Response {
2833                self.as_raw_response()
2834            }
2835        }
2836        #[derive(Clone)]
2837        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2838        #[doc = r""]
2839        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2840        #[doc = r" parameters can be chained."]
2841        #[doc = r""]
2842        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2843        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2844        #[doc = r" executes the request and returns a `Result` with the parsed"]
2845        #[doc = r" response."]
2846        #[doc = r""]
2847        #[doc = r" In order to execute the request without polling the service"]
2848        #[doc = r" until the operation completes, use `.send().await` instead."]
2849        #[doc = r""]
2850        #[doc = r" If you need lower-level access to the raw response details"]
2851        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2852        #[doc = r" can finalize the request using the"]
2853        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2854        #[doc = r" that resolves to a lower-level [`Response`] value."]
2855        pub struct RequestBuilder {
2856            pub(crate) client: super::super::Client,
2857            pub(crate) resource_group_name: String,
2858            pub(crate) automation_account_name: String,
2859            pub(crate) package_name: String,
2860            pub(crate) parameters: models::PythonPackageUpdateParameters,
2861            pub(crate) subscription_id: String,
2862        }
2863        impl RequestBuilder {
2864            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2865            #[doc = ""]
2866            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2867            #[doc = "However, this function can provide more flexibility when required."]
2868            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2869                Box::pin({
2870                    let this = self.clone();
2871                    async move {
2872                        let url = this.url()?;
2873                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
2874                        let bearer_token = this.client.bearer_token().await?;
2875                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2876                        req.insert_header("content-type", "application/json");
2877                        let req_body = azure_core::to_json(&this.parameters)?;
2878                        req.set_body(req_body);
2879                        Ok(Response(this.client.send(&mut req).await?))
2880                    }
2881                })
2882            }
2883            fn url(&self) -> azure_core::Result<azure_core::Url> {
2884                let mut url = self.client.endpoint().clone();
2885                url.set_path(&format!(
2886                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/python2Packages/{}",
2887                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.package_name
2888                ));
2889                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2890                if !has_api_version_already {
2891                    url.query_pairs_mut()
2892                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2893                }
2894                Ok(url)
2895            }
2896        }
2897        impl std::future::IntoFuture for RequestBuilder {
2898            type Output = azure_core::Result<models::Module>;
2899            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Module>>;
2900            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2901            #[doc = ""]
2902            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2903            #[doc = ""]
2904            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2905            fn into_future(self) -> Self::IntoFuture {
2906                Box::pin(async move { self.send().await?.into_body().await })
2907            }
2908        }
2909    }
2910    pub mod delete {
2911        use super::models;
2912        #[cfg(not(target_arch = "wasm32"))]
2913        use futures::future::BoxFuture;
2914        #[cfg(target_arch = "wasm32")]
2915        use futures::future::LocalBoxFuture as BoxFuture;
2916        #[derive(Debug)]
2917        pub struct Response(azure_core::Response);
2918        impl Response {
2919            pub fn into_raw_response(self) -> azure_core::Response {
2920                self.0
2921            }
2922            pub fn as_raw_response(&self) -> &azure_core::Response {
2923                &self.0
2924            }
2925        }
2926        impl From<Response> for azure_core::Response {
2927            fn from(rsp: Response) -> Self {
2928                rsp.into_raw_response()
2929            }
2930        }
2931        impl AsRef<azure_core::Response> for Response {
2932            fn as_ref(&self) -> &azure_core::Response {
2933                self.as_raw_response()
2934            }
2935        }
2936        #[derive(Clone)]
2937        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2938        #[doc = r""]
2939        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2940        #[doc = r" parameters can be chained."]
2941        #[doc = r""]
2942        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2943        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
2944        #[doc = r" executes the request and returns a `Result` with the parsed"]
2945        #[doc = r" response."]
2946        #[doc = r""]
2947        #[doc = r" In order to execute the request without polling the service"]
2948        #[doc = r" until the operation completes, use `.send().await` instead."]
2949        #[doc = r""]
2950        #[doc = r" If you need lower-level access to the raw response details"]
2951        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2952        #[doc = r" can finalize the request using the"]
2953        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2954        #[doc = r" that resolves to a lower-level [`Response`] value."]
2955        pub struct RequestBuilder {
2956            pub(crate) client: super::super::Client,
2957            pub(crate) resource_group_name: String,
2958            pub(crate) automation_account_name: String,
2959            pub(crate) package_name: String,
2960            pub(crate) subscription_id: String,
2961        }
2962        impl RequestBuilder {
2963            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2964            #[doc = ""]
2965            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2966            #[doc = "However, this function can provide more flexibility when required."]
2967            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2968                Box::pin({
2969                    let this = self.clone();
2970                    async move {
2971                        let url = this.url()?;
2972                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
2973                        let bearer_token = this.client.bearer_token().await?;
2974                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
2975                        let req_body = azure_core::EMPTY_BODY;
2976                        req.set_body(req_body);
2977                        Ok(Response(this.client.send(&mut req).await?))
2978                    }
2979                })
2980            }
2981            fn url(&self) -> azure_core::Result<azure_core::Url> {
2982                let mut url = self.client.endpoint().clone();
2983                url.set_path(&format!(
2984                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/python2Packages/{}",
2985                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.package_name
2986                ));
2987                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
2988                if !has_api_version_already {
2989                    url.query_pairs_mut()
2990                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
2991                }
2992                Ok(url)
2993            }
2994        }
2995    }
2996    pub mod list_by_automation_account {
2997        use super::models;
2998        #[cfg(not(target_arch = "wasm32"))]
2999        use futures::future::BoxFuture;
3000        #[cfg(target_arch = "wasm32")]
3001        use futures::future::LocalBoxFuture as BoxFuture;
3002        #[derive(Debug)]
3003        pub struct Response(azure_core::Response);
3004        impl Response {
3005            pub async fn into_body(self) -> azure_core::Result<models::ModuleListResult> {
3006                let bytes = self.0.into_body().collect().await?;
3007                let body: models::ModuleListResult = serde_json::from_slice(&bytes)?;
3008                Ok(body)
3009            }
3010            pub fn into_raw_response(self) -> azure_core::Response {
3011                self.0
3012            }
3013            pub fn as_raw_response(&self) -> &azure_core::Response {
3014                &self.0
3015            }
3016        }
3017        impl From<Response> for azure_core::Response {
3018            fn from(rsp: Response) -> Self {
3019                rsp.into_raw_response()
3020            }
3021        }
3022        impl AsRef<azure_core::Response> for Response {
3023            fn as_ref(&self) -> &azure_core::Response {
3024                self.as_raw_response()
3025            }
3026        }
3027        #[derive(Clone)]
3028        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3029        #[doc = r""]
3030        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3031        #[doc = r" parameters can be chained."]
3032        #[doc = r""]
3033        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3034        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
3035        #[doc = r" executes the request and returns a `Result` with the parsed"]
3036        #[doc = r" response."]
3037        #[doc = r""]
3038        #[doc = r" In order to execute the request without polling the service"]
3039        #[doc = r" until the operation completes, use `.send().await` instead."]
3040        #[doc = r""]
3041        #[doc = r" If you need lower-level access to the raw response details"]
3042        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3043        #[doc = r" can finalize the request using the"]
3044        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3045        #[doc = r" that resolves to a lower-level [`Response`] value."]
3046        pub struct RequestBuilder {
3047            pub(crate) client: super::super::Client,
3048            pub(crate) resource_group_name: String,
3049            pub(crate) automation_account_name: String,
3050            pub(crate) subscription_id: String,
3051        }
3052        impl RequestBuilder {
3053            pub fn into_stream(self) -> azure_core::Pageable<models::ModuleListResult, azure_core::error::Error> {
3054                let make_request = move |continuation: Option<String>| {
3055                    let this = self.clone();
3056                    async move {
3057                        let mut url = this.url()?;
3058                        let rsp = match continuation {
3059                            Some(value) => {
3060                                url.set_path("");
3061                                url = url.join(&value)?;
3062                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
3063                                let bearer_token = this.client.bearer_token().await?;
3064                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3065                                let has_api_version_already =
3066                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3067                                if !has_api_version_already {
3068                                    req.url_mut()
3069                                        .query_pairs_mut()
3070                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3071                                }
3072                                let req_body = azure_core::EMPTY_BODY;
3073                                req.set_body(req_body);
3074                                this.client.send(&mut req).await?
3075                            }
3076                            None => {
3077                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
3078                                let bearer_token = this.client.bearer_token().await?;
3079                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3080                                let req_body = azure_core::EMPTY_BODY;
3081                                req.set_body(req_body);
3082                                this.client.send(&mut req).await?
3083                            }
3084                        };
3085                        let rsp = match rsp.status() {
3086                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
3087                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
3088                                status: status_code,
3089                                error_code: None,
3090                            })),
3091                        };
3092                        rsp?.into_body().await
3093                    }
3094                };
3095                azure_core::Pageable::new(make_request)
3096            }
3097            fn url(&self) -> azure_core::Result<azure_core::Url> {
3098                let mut url = self.client.endpoint().clone();
3099                url.set_path(&format!(
3100                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/python2Packages",
3101                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
3102                ));
3103                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3104                if !has_api_version_already {
3105                    url.query_pairs_mut()
3106                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3107                }
3108                Ok(url)
3109            }
3110        }
3111    }
3112}
3113pub mod agent_registration_information {
3114    use super::models;
3115    #[cfg(not(target_arch = "wasm32"))]
3116    use futures::future::BoxFuture;
3117    #[cfg(target_arch = "wasm32")]
3118    use futures::future::LocalBoxFuture as BoxFuture;
3119    pub struct Client(pub(crate) super::Client);
3120    impl Client {
3121        #[doc = "Retrieve the automation agent registration information."]
3122        #[doc = ""]
3123        #[doc = "Arguments:"]
3124        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3125        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3126        #[doc = "* `automation_account_name`: The name of the automation account."]
3127        pub fn get(
3128            &self,
3129            subscription_id: impl Into<String>,
3130            resource_group_name: impl Into<String>,
3131            automation_account_name: impl Into<String>,
3132        ) -> get::RequestBuilder {
3133            get::RequestBuilder {
3134                client: self.0.clone(),
3135                subscription_id: subscription_id.into(),
3136                resource_group_name: resource_group_name.into(),
3137                automation_account_name: automation_account_name.into(),
3138            }
3139        }
3140        #[doc = "Regenerate a primary or secondary agent registration key"]
3141        #[doc = ""]
3142        #[doc = "Arguments:"]
3143        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3144        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3145        #[doc = "* `automation_account_name`: The name of the automation account."]
3146        #[doc = "* `parameters`: The name of the agent registration key to be regenerated"]
3147        pub fn regenerate_key(
3148            &self,
3149            subscription_id: impl Into<String>,
3150            resource_group_name: impl Into<String>,
3151            automation_account_name: impl Into<String>,
3152            parameters: impl Into<models::AgentRegistrationRegenerateKeyParameter>,
3153        ) -> regenerate_key::RequestBuilder {
3154            regenerate_key::RequestBuilder {
3155                client: self.0.clone(),
3156                subscription_id: subscription_id.into(),
3157                resource_group_name: resource_group_name.into(),
3158                automation_account_name: automation_account_name.into(),
3159                parameters: parameters.into(),
3160            }
3161        }
3162    }
3163    pub mod get {
3164        use super::models;
3165        #[cfg(not(target_arch = "wasm32"))]
3166        use futures::future::BoxFuture;
3167        #[cfg(target_arch = "wasm32")]
3168        use futures::future::LocalBoxFuture as BoxFuture;
3169        #[derive(Debug)]
3170        pub struct Response(azure_core::Response);
3171        impl Response {
3172            pub async fn into_body(self) -> azure_core::Result<models::AgentRegistration> {
3173                let bytes = self.0.into_body().collect().await?;
3174                let body: models::AgentRegistration = serde_json::from_slice(&bytes)?;
3175                Ok(body)
3176            }
3177            pub fn into_raw_response(self) -> azure_core::Response {
3178                self.0
3179            }
3180            pub fn as_raw_response(&self) -> &azure_core::Response {
3181                &self.0
3182            }
3183        }
3184        impl From<Response> for azure_core::Response {
3185            fn from(rsp: Response) -> Self {
3186                rsp.into_raw_response()
3187            }
3188        }
3189        impl AsRef<azure_core::Response> for Response {
3190            fn as_ref(&self) -> &azure_core::Response {
3191                self.as_raw_response()
3192            }
3193        }
3194        #[derive(Clone)]
3195        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3196        #[doc = r""]
3197        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3198        #[doc = r" parameters can be chained."]
3199        #[doc = r""]
3200        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3201        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
3202        #[doc = r" executes the request and returns a `Result` with the parsed"]
3203        #[doc = r" response."]
3204        #[doc = r""]
3205        #[doc = r" In order to execute the request without polling the service"]
3206        #[doc = r" until the operation completes, use `.send().await` instead."]
3207        #[doc = r""]
3208        #[doc = r" If you need lower-level access to the raw response details"]
3209        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3210        #[doc = r" can finalize the request using the"]
3211        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3212        #[doc = r" that resolves to a lower-level [`Response`] value."]
3213        pub struct RequestBuilder {
3214            pub(crate) client: super::super::Client,
3215            pub(crate) subscription_id: String,
3216            pub(crate) resource_group_name: String,
3217            pub(crate) automation_account_name: String,
3218        }
3219        impl RequestBuilder {
3220            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3221            #[doc = ""]
3222            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3223            #[doc = "However, this function can provide more flexibility when required."]
3224            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3225                Box::pin({
3226                    let this = self.clone();
3227                    async move {
3228                        let url = this.url()?;
3229                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
3230                        let bearer_token = this.client.bearer_token().await?;
3231                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3232                        let req_body = azure_core::EMPTY_BODY;
3233                        req.set_body(req_body);
3234                        Ok(Response(this.client.send(&mut req).await?))
3235                    }
3236                })
3237            }
3238            fn url(&self) -> azure_core::Result<azure_core::Url> {
3239                let mut url = self.client.endpoint().clone();
3240                url.set_path(&format!(
3241                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/agentRegistrationInformation",
3242                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
3243                ));
3244                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3245                if !has_api_version_already {
3246                    url.query_pairs_mut()
3247                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3248                }
3249                Ok(url)
3250            }
3251        }
3252        impl std::future::IntoFuture for RequestBuilder {
3253            type Output = azure_core::Result<models::AgentRegistration>;
3254            type IntoFuture = BoxFuture<'static, azure_core::Result<models::AgentRegistration>>;
3255            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3256            #[doc = ""]
3257            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3258            #[doc = ""]
3259            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3260            fn into_future(self) -> Self::IntoFuture {
3261                Box::pin(async move { self.send().await?.into_body().await })
3262            }
3263        }
3264    }
3265    pub mod regenerate_key {
3266        use super::models;
3267        #[cfg(not(target_arch = "wasm32"))]
3268        use futures::future::BoxFuture;
3269        #[cfg(target_arch = "wasm32")]
3270        use futures::future::LocalBoxFuture as BoxFuture;
3271        #[derive(Debug)]
3272        pub struct Response(azure_core::Response);
3273        impl Response {
3274            pub async fn into_body(self) -> azure_core::Result<models::AgentRegistration> {
3275                let bytes = self.0.into_body().collect().await?;
3276                let body: models::AgentRegistration = serde_json::from_slice(&bytes)?;
3277                Ok(body)
3278            }
3279            pub fn into_raw_response(self) -> azure_core::Response {
3280                self.0
3281            }
3282            pub fn as_raw_response(&self) -> &azure_core::Response {
3283                &self.0
3284            }
3285        }
3286        impl From<Response> for azure_core::Response {
3287            fn from(rsp: Response) -> Self {
3288                rsp.into_raw_response()
3289            }
3290        }
3291        impl AsRef<azure_core::Response> for Response {
3292            fn as_ref(&self) -> &azure_core::Response {
3293                self.as_raw_response()
3294            }
3295        }
3296        #[derive(Clone)]
3297        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3298        #[doc = r""]
3299        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3300        #[doc = r" parameters can be chained."]
3301        #[doc = r""]
3302        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3303        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
3304        #[doc = r" executes the request and returns a `Result` with the parsed"]
3305        #[doc = r" response."]
3306        #[doc = r""]
3307        #[doc = r" In order to execute the request without polling the service"]
3308        #[doc = r" until the operation completes, use `.send().await` instead."]
3309        #[doc = r""]
3310        #[doc = r" If you need lower-level access to the raw response details"]
3311        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3312        #[doc = r" can finalize the request using the"]
3313        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3314        #[doc = r" that resolves to a lower-level [`Response`] value."]
3315        pub struct RequestBuilder {
3316            pub(crate) client: super::super::Client,
3317            pub(crate) subscription_id: String,
3318            pub(crate) resource_group_name: String,
3319            pub(crate) automation_account_name: String,
3320            pub(crate) parameters: models::AgentRegistrationRegenerateKeyParameter,
3321        }
3322        impl RequestBuilder {
3323            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3324            #[doc = ""]
3325            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3326            #[doc = "However, this function can provide more flexibility when required."]
3327            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3328                Box::pin({
3329                    let this = self.clone();
3330                    async move {
3331                        let url = this.url()?;
3332                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
3333                        let bearer_token = this.client.bearer_token().await?;
3334                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3335                        req.insert_header("content-type", "application/json");
3336                        let req_body = azure_core::to_json(&this.parameters)?;
3337                        req.set_body(req_body);
3338                        Ok(Response(this.client.send(&mut req).await?))
3339                    }
3340                })
3341            }
3342            fn url(&self) -> azure_core::Result<azure_core::Url> {
3343                let mut url = self.client.endpoint().clone();
3344                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/agentRegistrationInformation/regenerateKey" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name)) ;
3345                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3346                if !has_api_version_already {
3347                    url.query_pairs_mut()
3348                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3349                }
3350                Ok(url)
3351            }
3352        }
3353        impl std::future::IntoFuture for RequestBuilder {
3354            type Output = azure_core::Result<models::AgentRegistration>;
3355            type IntoFuture = BoxFuture<'static, azure_core::Result<models::AgentRegistration>>;
3356            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3357            #[doc = ""]
3358            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3359            #[doc = ""]
3360            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3361            fn into_future(self) -> Self::IntoFuture {
3362                Box::pin(async move { self.send().await?.into_body().await })
3363            }
3364        }
3365    }
3366}
3367pub mod dsc_node {
3368    use super::models;
3369    #[cfg(not(target_arch = "wasm32"))]
3370    use futures::future::BoxFuture;
3371    #[cfg(target_arch = "wasm32")]
3372    use futures::future::LocalBoxFuture as BoxFuture;
3373    pub struct Client(pub(crate) super::Client);
3374    impl Client {
3375        #[doc = "Retrieve the dsc node identified by node id."]
3376        #[doc = ""]
3377        #[doc = "Arguments:"]
3378        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3379        #[doc = "* `automation_account_name`: The name of the automation account."]
3380        #[doc = "* `node_id`: The node id."]
3381        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3382        pub fn get(
3383            &self,
3384            resource_group_name: impl Into<String>,
3385            automation_account_name: impl Into<String>,
3386            node_id: impl Into<String>,
3387            subscription_id: impl Into<String>,
3388        ) -> get::RequestBuilder {
3389            get::RequestBuilder {
3390                client: self.0.clone(),
3391                resource_group_name: resource_group_name.into(),
3392                automation_account_name: automation_account_name.into(),
3393                node_id: node_id.into(),
3394                subscription_id: subscription_id.into(),
3395            }
3396        }
3397        #[doc = "Update the dsc node."]
3398        #[doc = ""]
3399        #[doc = "Arguments:"]
3400        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3401        #[doc = "* `automation_account_name`: The name of the automation account."]
3402        #[doc = "* `node_id`: Parameters supplied to the update dsc node."]
3403        #[doc = "* `dsc_node_update_parameters`: Parameters supplied to the update dsc node."]
3404        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3405        pub fn update(
3406            &self,
3407            resource_group_name: impl Into<String>,
3408            automation_account_name: impl Into<String>,
3409            node_id: impl Into<String>,
3410            dsc_node_update_parameters: impl Into<models::DscNodeUpdateParameters>,
3411            subscription_id: impl Into<String>,
3412        ) -> update::RequestBuilder {
3413            update::RequestBuilder {
3414                client: self.0.clone(),
3415                resource_group_name: resource_group_name.into(),
3416                automation_account_name: automation_account_name.into(),
3417                node_id: node_id.into(),
3418                dsc_node_update_parameters: dsc_node_update_parameters.into(),
3419                subscription_id: subscription_id.into(),
3420            }
3421        }
3422        #[doc = "Delete the dsc node identified by node id."]
3423        #[doc = ""]
3424        #[doc = "Arguments:"]
3425        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3426        #[doc = "* `automation_account_name`: The name of the automation account."]
3427        #[doc = "* `node_id`: The node id."]
3428        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3429        pub fn delete(
3430            &self,
3431            resource_group_name: impl Into<String>,
3432            automation_account_name: impl Into<String>,
3433            node_id: impl Into<String>,
3434            subscription_id: impl Into<String>,
3435        ) -> delete::RequestBuilder {
3436            delete::RequestBuilder {
3437                client: self.0.clone(),
3438                resource_group_name: resource_group_name.into(),
3439                automation_account_name: automation_account_name.into(),
3440                node_id: node_id.into(),
3441                subscription_id: subscription_id.into(),
3442            }
3443        }
3444        #[doc = "Retrieve a list of dsc nodes."]
3445        #[doc = ""]
3446        #[doc = "Arguments:"]
3447        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3448        #[doc = "* `automation_account_name`: The name of the automation account."]
3449        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3450        pub fn list_by_automation_account(
3451            &self,
3452            resource_group_name: impl Into<String>,
3453            automation_account_name: impl Into<String>,
3454            subscription_id: impl Into<String>,
3455        ) -> list_by_automation_account::RequestBuilder {
3456            list_by_automation_account::RequestBuilder {
3457                client: self.0.clone(),
3458                resource_group_name: resource_group_name.into(),
3459                automation_account_name: automation_account_name.into(),
3460                subscription_id: subscription_id.into(),
3461                filter: None,
3462                skip: None,
3463                top: None,
3464                inlinecount: None,
3465            }
3466        }
3467    }
3468    pub mod get {
3469        use super::models;
3470        #[cfg(not(target_arch = "wasm32"))]
3471        use futures::future::BoxFuture;
3472        #[cfg(target_arch = "wasm32")]
3473        use futures::future::LocalBoxFuture as BoxFuture;
3474        #[derive(Debug)]
3475        pub struct Response(azure_core::Response);
3476        impl Response {
3477            pub async fn into_body(self) -> azure_core::Result<models::DscNode> {
3478                let bytes = self.0.into_body().collect().await?;
3479                let body: models::DscNode = serde_json::from_slice(&bytes)?;
3480                Ok(body)
3481            }
3482            pub fn into_raw_response(self) -> azure_core::Response {
3483                self.0
3484            }
3485            pub fn as_raw_response(&self) -> &azure_core::Response {
3486                &self.0
3487            }
3488        }
3489        impl From<Response> for azure_core::Response {
3490            fn from(rsp: Response) -> Self {
3491                rsp.into_raw_response()
3492            }
3493        }
3494        impl AsRef<azure_core::Response> for Response {
3495            fn as_ref(&self) -> &azure_core::Response {
3496                self.as_raw_response()
3497            }
3498        }
3499        #[derive(Clone)]
3500        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3501        #[doc = r""]
3502        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3503        #[doc = r" parameters can be chained."]
3504        #[doc = r""]
3505        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3506        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
3507        #[doc = r" executes the request and returns a `Result` with the parsed"]
3508        #[doc = r" response."]
3509        #[doc = r""]
3510        #[doc = r" In order to execute the request without polling the service"]
3511        #[doc = r" until the operation completes, use `.send().await` instead."]
3512        #[doc = r""]
3513        #[doc = r" If you need lower-level access to the raw response details"]
3514        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3515        #[doc = r" can finalize the request using the"]
3516        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3517        #[doc = r" that resolves to a lower-level [`Response`] value."]
3518        pub struct RequestBuilder {
3519            pub(crate) client: super::super::Client,
3520            pub(crate) resource_group_name: String,
3521            pub(crate) automation_account_name: String,
3522            pub(crate) node_id: String,
3523            pub(crate) subscription_id: String,
3524        }
3525        impl RequestBuilder {
3526            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3527            #[doc = ""]
3528            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3529            #[doc = "However, this function can provide more flexibility when required."]
3530            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3531                Box::pin({
3532                    let this = self.clone();
3533                    async move {
3534                        let url = this.url()?;
3535                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
3536                        let bearer_token = this.client.bearer_token().await?;
3537                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3538                        let req_body = azure_core::EMPTY_BODY;
3539                        req.set_body(req_body);
3540                        Ok(Response(this.client.send(&mut req).await?))
3541                    }
3542                })
3543            }
3544            fn url(&self) -> azure_core::Result<azure_core::Url> {
3545                let mut url = self.client.endpoint().clone();
3546                url.set_path(&format!(
3547                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodes/{}",
3548                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_id
3549                ));
3550                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3551                if !has_api_version_already {
3552                    url.query_pairs_mut()
3553                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3554                }
3555                Ok(url)
3556            }
3557        }
3558        impl std::future::IntoFuture for RequestBuilder {
3559            type Output = azure_core::Result<models::DscNode>;
3560            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscNode>>;
3561            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3562            #[doc = ""]
3563            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3564            #[doc = ""]
3565            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3566            fn into_future(self) -> Self::IntoFuture {
3567                Box::pin(async move { self.send().await?.into_body().await })
3568            }
3569        }
3570    }
3571    pub mod update {
3572        use super::models;
3573        #[cfg(not(target_arch = "wasm32"))]
3574        use futures::future::BoxFuture;
3575        #[cfg(target_arch = "wasm32")]
3576        use futures::future::LocalBoxFuture as BoxFuture;
3577        #[derive(Debug)]
3578        pub struct Response(azure_core::Response);
3579        impl Response {
3580            pub async fn into_body(self) -> azure_core::Result<models::DscNode> {
3581                let bytes = self.0.into_body().collect().await?;
3582                let body: models::DscNode = serde_json::from_slice(&bytes)?;
3583                Ok(body)
3584            }
3585            pub fn into_raw_response(self) -> azure_core::Response {
3586                self.0
3587            }
3588            pub fn as_raw_response(&self) -> &azure_core::Response {
3589                &self.0
3590            }
3591        }
3592        impl From<Response> for azure_core::Response {
3593            fn from(rsp: Response) -> Self {
3594                rsp.into_raw_response()
3595            }
3596        }
3597        impl AsRef<azure_core::Response> for Response {
3598            fn as_ref(&self) -> &azure_core::Response {
3599                self.as_raw_response()
3600            }
3601        }
3602        #[derive(Clone)]
3603        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3604        #[doc = r""]
3605        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3606        #[doc = r" parameters can be chained."]
3607        #[doc = r""]
3608        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3609        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
3610        #[doc = r" executes the request and returns a `Result` with the parsed"]
3611        #[doc = r" response."]
3612        #[doc = r""]
3613        #[doc = r" In order to execute the request without polling the service"]
3614        #[doc = r" until the operation completes, use `.send().await` instead."]
3615        #[doc = r""]
3616        #[doc = r" If you need lower-level access to the raw response details"]
3617        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3618        #[doc = r" can finalize the request using the"]
3619        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3620        #[doc = r" that resolves to a lower-level [`Response`] value."]
3621        pub struct RequestBuilder {
3622            pub(crate) client: super::super::Client,
3623            pub(crate) resource_group_name: String,
3624            pub(crate) automation_account_name: String,
3625            pub(crate) node_id: String,
3626            pub(crate) dsc_node_update_parameters: models::DscNodeUpdateParameters,
3627            pub(crate) subscription_id: String,
3628        }
3629        impl RequestBuilder {
3630            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3631            #[doc = ""]
3632            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3633            #[doc = "However, this function can provide more flexibility when required."]
3634            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3635                Box::pin({
3636                    let this = self.clone();
3637                    async move {
3638                        let url = this.url()?;
3639                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
3640                        let bearer_token = this.client.bearer_token().await?;
3641                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3642                        req.insert_header("content-type", "application/json");
3643                        let req_body = azure_core::to_json(&this.dsc_node_update_parameters)?;
3644                        req.set_body(req_body);
3645                        Ok(Response(this.client.send(&mut req).await?))
3646                    }
3647                })
3648            }
3649            fn url(&self) -> azure_core::Result<azure_core::Url> {
3650                let mut url = self.client.endpoint().clone();
3651                url.set_path(&format!(
3652                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodes/{}",
3653                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_id
3654                ));
3655                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3656                if !has_api_version_already {
3657                    url.query_pairs_mut()
3658                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3659                }
3660                Ok(url)
3661            }
3662        }
3663        impl std::future::IntoFuture for RequestBuilder {
3664            type Output = azure_core::Result<models::DscNode>;
3665            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscNode>>;
3666            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3667            #[doc = ""]
3668            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3669            #[doc = ""]
3670            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3671            fn into_future(self) -> Self::IntoFuture {
3672                Box::pin(async move { self.send().await?.into_body().await })
3673            }
3674        }
3675    }
3676    pub mod delete {
3677        use super::models;
3678        #[cfg(not(target_arch = "wasm32"))]
3679        use futures::future::BoxFuture;
3680        #[cfg(target_arch = "wasm32")]
3681        use futures::future::LocalBoxFuture as BoxFuture;
3682        #[derive(Debug)]
3683        pub struct Response(azure_core::Response);
3684        impl Response {
3685            pub fn into_raw_response(self) -> azure_core::Response {
3686                self.0
3687            }
3688            pub fn as_raw_response(&self) -> &azure_core::Response {
3689                &self.0
3690            }
3691        }
3692        impl From<Response> for azure_core::Response {
3693            fn from(rsp: Response) -> Self {
3694                rsp.into_raw_response()
3695            }
3696        }
3697        impl AsRef<azure_core::Response> for Response {
3698            fn as_ref(&self) -> &azure_core::Response {
3699                self.as_raw_response()
3700            }
3701        }
3702        #[derive(Clone)]
3703        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3704        #[doc = r""]
3705        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3706        #[doc = r" parameters can be chained."]
3707        #[doc = r""]
3708        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3709        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
3710        #[doc = r" executes the request and returns a `Result` with the parsed"]
3711        #[doc = r" response."]
3712        #[doc = r""]
3713        #[doc = r" In order to execute the request without polling the service"]
3714        #[doc = r" until the operation completes, use `.send().await` instead."]
3715        #[doc = r""]
3716        #[doc = r" If you need lower-level access to the raw response details"]
3717        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3718        #[doc = r" can finalize the request using the"]
3719        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3720        #[doc = r" that resolves to a lower-level [`Response`] value."]
3721        pub struct RequestBuilder {
3722            pub(crate) client: super::super::Client,
3723            pub(crate) resource_group_name: String,
3724            pub(crate) automation_account_name: String,
3725            pub(crate) node_id: String,
3726            pub(crate) subscription_id: String,
3727        }
3728        impl RequestBuilder {
3729            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3730            #[doc = ""]
3731            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3732            #[doc = "However, this function can provide more flexibility when required."]
3733            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3734                Box::pin({
3735                    let this = self.clone();
3736                    async move {
3737                        let url = this.url()?;
3738                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
3739                        let bearer_token = this.client.bearer_token().await?;
3740                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3741                        let req_body = azure_core::EMPTY_BODY;
3742                        req.set_body(req_body);
3743                        Ok(Response(this.client.send(&mut req).await?))
3744                    }
3745                })
3746            }
3747            fn url(&self) -> azure_core::Result<azure_core::Url> {
3748                let mut url = self.client.endpoint().clone();
3749                url.set_path(&format!(
3750                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodes/{}",
3751                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_id
3752                ));
3753                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3754                if !has_api_version_already {
3755                    url.query_pairs_mut()
3756                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3757                }
3758                Ok(url)
3759            }
3760        }
3761    }
3762    pub mod list_by_automation_account {
3763        use super::models;
3764        #[cfg(not(target_arch = "wasm32"))]
3765        use futures::future::BoxFuture;
3766        #[cfg(target_arch = "wasm32")]
3767        use futures::future::LocalBoxFuture as BoxFuture;
3768        #[derive(Debug)]
3769        pub struct Response(azure_core::Response);
3770        impl Response {
3771            pub async fn into_body(self) -> azure_core::Result<models::DscNodeListResult> {
3772                let bytes = self.0.into_body().collect().await?;
3773                let body: models::DscNodeListResult = serde_json::from_slice(&bytes)?;
3774                Ok(body)
3775            }
3776            pub fn into_raw_response(self) -> azure_core::Response {
3777                self.0
3778            }
3779            pub fn as_raw_response(&self) -> &azure_core::Response {
3780                &self.0
3781            }
3782        }
3783        impl From<Response> for azure_core::Response {
3784            fn from(rsp: Response) -> Self {
3785                rsp.into_raw_response()
3786            }
3787        }
3788        impl AsRef<azure_core::Response> for Response {
3789            fn as_ref(&self) -> &azure_core::Response {
3790                self.as_raw_response()
3791            }
3792        }
3793        #[derive(Clone)]
3794        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3795        #[doc = r""]
3796        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3797        #[doc = r" parameters can be chained."]
3798        #[doc = r""]
3799        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3800        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
3801        #[doc = r" executes the request and returns a `Result` with the parsed"]
3802        #[doc = r" response."]
3803        #[doc = r""]
3804        #[doc = r" In order to execute the request without polling the service"]
3805        #[doc = r" until the operation completes, use `.send().await` instead."]
3806        #[doc = r""]
3807        #[doc = r" If you need lower-level access to the raw response details"]
3808        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3809        #[doc = r" can finalize the request using the"]
3810        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3811        #[doc = r" that resolves to a lower-level [`Response`] value."]
3812        pub struct RequestBuilder {
3813            pub(crate) client: super::super::Client,
3814            pub(crate) resource_group_name: String,
3815            pub(crate) automation_account_name: String,
3816            pub(crate) subscription_id: String,
3817            pub(crate) filter: Option<String>,
3818            pub(crate) skip: Option<i64>,
3819            pub(crate) top: Option<i64>,
3820            pub(crate) inlinecount: Option<String>,
3821        }
3822        impl RequestBuilder {
3823            #[doc = "The filter to apply on the operation."]
3824            pub fn filter(mut self, filter: impl Into<String>) -> Self {
3825                self.filter = Some(filter.into());
3826                self
3827            }
3828            #[doc = "The number of rows to skip."]
3829            pub fn skip(mut self, skip: i64) -> Self {
3830                self.skip = Some(skip);
3831                self
3832            }
3833            #[doc = "The number of rows to take."]
3834            pub fn top(mut self, top: i64) -> Self {
3835                self.top = Some(top);
3836                self
3837            }
3838            #[doc = "Return total rows."]
3839            pub fn inlinecount(mut self, inlinecount: impl Into<String>) -> Self {
3840                self.inlinecount = Some(inlinecount.into());
3841                self
3842            }
3843            pub fn into_stream(self) -> azure_core::Pageable<models::DscNodeListResult, azure_core::error::Error> {
3844                let make_request = move |continuation: Option<String>| {
3845                    let this = self.clone();
3846                    async move {
3847                        let mut url = this.url()?;
3848                        let rsp = match continuation {
3849                            Some(value) => {
3850                                url.set_path("");
3851                                url = url.join(&value)?;
3852                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
3853                                let bearer_token = this.client.bearer_token().await?;
3854                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3855                                let has_api_version_already =
3856                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3857                                if !has_api_version_already {
3858                                    req.url_mut()
3859                                        .query_pairs_mut()
3860                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3861                                }
3862                                let req_body = azure_core::EMPTY_BODY;
3863                                req.set_body(req_body);
3864                                this.client.send(&mut req).await?
3865                            }
3866                            None => {
3867                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
3868                                let bearer_token = this.client.bearer_token().await?;
3869                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
3870                                if let Some(filter) = &this.filter {
3871                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
3872                                }
3873                                if let Some(skip) = &this.skip {
3874                                    req.url_mut().query_pairs_mut().append_pair("$skip", &skip.to_string());
3875                                }
3876                                if let Some(top) = &this.top {
3877                                    req.url_mut().query_pairs_mut().append_pair("$top", &top.to_string());
3878                                }
3879                                if let Some(inlinecount) = &this.inlinecount {
3880                                    req.url_mut().query_pairs_mut().append_pair("$inlinecount", inlinecount);
3881                                }
3882                                let req_body = azure_core::EMPTY_BODY;
3883                                req.set_body(req_body);
3884                                this.client.send(&mut req).await?
3885                            }
3886                        };
3887                        let rsp = match rsp.status() {
3888                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
3889                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
3890                                status: status_code,
3891                                error_code: None,
3892                            })),
3893                        };
3894                        rsp?.into_body().await
3895                    }
3896                };
3897                azure_core::Pageable::new(make_request)
3898            }
3899            fn url(&self) -> azure_core::Result<azure_core::Url> {
3900                let mut url = self.client.endpoint().clone();
3901                url.set_path(&format!(
3902                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodes",
3903                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
3904                ));
3905                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
3906                if !has_api_version_already {
3907                    url.query_pairs_mut()
3908                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
3909                }
3910                Ok(url)
3911            }
3912        }
3913    }
3914}
3915pub mod node_reports {
3916    use super::models;
3917    #[cfg(not(target_arch = "wasm32"))]
3918    use futures::future::BoxFuture;
3919    #[cfg(target_arch = "wasm32")]
3920    use futures::future::LocalBoxFuture as BoxFuture;
3921    pub struct Client(pub(crate) super::Client);
3922    impl Client {
3923        #[doc = "Retrieve the Dsc node report list by node id."]
3924        #[doc = ""]
3925        #[doc = "Arguments:"]
3926        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3927        #[doc = "* `automation_account_name`: The name of the automation account."]
3928        #[doc = "* `node_id`: The parameters supplied to the list operation."]
3929        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3930        pub fn list_by_node(
3931            &self,
3932            resource_group_name: impl Into<String>,
3933            automation_account_name: impl Into<String>,
3934            node_id: impl Into<String>,
3935            subscription_id: impl Into<String>,
3936        ) -> list_by_node::RequestBuilder {
3937            list_by_node::RequestBuilder {
3938                client: self.0.clone(),
3939                resource_group_name: resource_group_name.into(),
3940                automation_account_name: automation_account_name.into(),
3941                node_id: node_id.into(),
3942                subscription_id: subscription_id.into(),
3943                filter: None,
3944            }
3945        }
3946        #[doc = "Retrieve the Dsc node report data by node id and report id."]
3947        #[doc = ""]
3948        #[doc = "Arguments:"]
3949        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3950        #[doc = "* `automation_account_name`: The name of the automation account."]
3951        #[doc = "* `node_id`: The Dsc node id."]
3952        #[doc = "* `report_id`: The report id."]
3953        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3954        pub fn get(
3955            &self,
3956            resource_group_name: impl Into<String>,
3957            automation_account_name: impl Into<String>,
3958            node_id: impl Into<String>,
3959            report_id: impl Into<String>,
3960            subscription_id: impl Into<String>,
3961        ) -> get::RequestBuilder {
3962            get::RequestBuilder {
3963                client: self.0.clone(),
3964                resource_group_name: resource_group_name.into(),
3965                automation_account_name: automation_account_name.into(),
3966                node_id: node_id.into(),
3967                report_id: report_id.into(),
3968                subscription_id: subscription_id.into(),
3969            }
3970        }
3971        #[doc = "Retrieve the Dsc node reports by node id and report id."]
3972        #[doc = ""]
3973        #[doc = "Arguments:"]
3974        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
3975        #[doc = "* `automation_account_name`: The name of the automation account."]
3976        #[doc = "* `node_id`: The Dsc node id."]
3977        #[doc = "* `report_id`: The report id."]
3978        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
3979        pub fn get_content(
3980            &self,
3981            resource_group_name: impl Into<String>,
3982            automation_account_name: impl Into<String>,
3983            node_id: impl Into<String>,
3984            report_id: impl Into<String>,
3985            subscription_id: impl Into<String>,
3986        ) -> get_content::RequestBuilder {
3987            get_content::RequestBuilder {
3988                client: self.0.clone(),
3989                resource_group_name: resource_group_name.into(),
3990                automation_account_name: automation_account_name.into(),
3991                node_id: node_id.into(),
3992                report_id: report_id.into(),
3993                subscription_id: subscription_id.into(),
3994            }
3995        }
3996    }
3997    pub mod list_by_node {
3998        use super::models;
3999        #[cfg(not(target_arch = "wasm32"))]
4000        use futures::future::BoxFuture;
4001        #[cfg(target_arch = "wasm32")]
4002        use futures::future::LocalBoxFuture as BoxFuture;
4003        #[derive(Debug)]
4004        pub struct Response(azure_core::Response);
4005        impl Response {
4006            pub async fn into_body(self) -> azure_core::Result<models::DscNodeReportListResult> {
4007                let bytes = self.0.into_body().collect().await?;
4008                let body: models::DscNodeReportListResult = serde_json::from_slice(&bytes)?;
4009                Ok(body)
4010            }
4011            pub fn into_raw_response(self) -> azure_core::Response {
4012                self.0
4013            }
4014            pub fn as_raw_response(&self) -> &azure_core::Response {
4015                &self.0
4016            }
4017        }
4018        impl From<Response> for azure_core::Response {
4019            fn from(rsp: Response) -> Self {
4020                rsp.into_raw_response()
4021            }
4022        }
4023        impl AsRef<azure_core::Response> for Response {
4024            fn as_ref(&self) -> &azure_core::Response {
4025                self.as_raw_response()
4026            }
4027        }
4028        #[derive(Clone)]
4029        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4030        #[doc = r""]
4031        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4032        #[doc = r" parameters can be chained."]
4033        #[doc = r""]
4034        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4035        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
4036        #[doc = r" executes the request and returns a `Result` with the parsed"]
4037        #[doc = r" response."]
4038        #[doc = r""]
4039        #[doc = r" In order to execute the request without polling the service"]
4040        #[doc = r" until the operation completes, use `.send().await` instead."]
4041        #[doc = r""]
4042        #[doc = r" If you need lower-level access to the raw response details"]
4043        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4044        #[doc = r" can finalize the request using the"]
4045        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4046        #[doc = r" that resolves to a lower-level [`Response`] value."]
4047        pub struct RequestBuilder {
4048            pub(crate) client: super::super::Client,
4049            pub(crate) resource_group_name: String,
4050            pub(crate) automation_account_name: String,
4051            pub(crate) node_id: String,
4052            pub(crate) subscription_id: String,
4053            pub(crate) filter: Option<String>,
4054        }
4055        impl RequestBuilder {
4056            #[doc = "The filter to apply on the operation."]
4057            pub fn filter(mut self, filter: impl Into<String>) -> Self {
4058                self.filter = Some(filter.into());
4059                self
4060            }
4061            pub fn into_stream(self) -> azure_core::Pageable<models::DscNodeReportListResult, azure_core::error::Error> {
4062                let make_request = move |continuation: Option<String>| {
4063                    let this = self.clone();
4064                    async move {
4065                        let mut url = this.url()?;
4066                        let rsp = match continuation {
4067                            Some(value) => {
4068                                url.set_path("");
4069                                url = url.join(&value)?;
4070                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4071                                let bearer_token = this.client.bearer_token().await?;
4072                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4073                                let has_api_version_already =
4074                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4075                                if !has_api_version_already {
4076                                    req.url_mut()
4077                                        .query_pairs_mut()
4078                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4079                                }
4080                                let req_body = azure_core::EMPTY_BODY;
4081                                req.set_body(req_body);
4082                                this.client.send(&mut req).await?
4083                            }
4084                            None => {
4085                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4086                                let bearer_token = this.client.bearer_token().await?;
4087                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4088                                if let Some(filter) = &this.filter {
4089                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
4090                                }
4091                                let req_body = azure_core::EMPTY_BODY;
4092                                req.set_body(req_body);
4093                                this.client.send(&mut req).await?
4094                            }
4095                        };
4096                        let rsp = match rsp.status() {
4097                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
4098                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
4099                                status: status_code,
4100                                error_code: None,
4101                            })),
4102                        };
4103                        rsp?.into_body().await
4104                    }
4105                };
4106                azure_core::Pageable::new(make_request)
4107            }
4108            fn url(&self) -> azure_core::Result<azure_core::Url> {
4109                let mut url = self.client.endpoint().clone();
4110                url.set_path(&format!(
4111                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodes/{}/reports",
4112                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_id
4113                ));
4114                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4115                if !has_api_version_already {
4116                    url.query_pairs_mut()
4117                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4118                }
4119                Ok(url)
4120            }
4121        }
4122    }
4123    pub mod get {
4124        use super::models;
4125        #[cfg(not(target_arch = "wasm32"))]
4126        use futures::future::BoxFuture;
4127        #[cfg(target_arch = "wasm32")]
4128        use futures::future::LocalBoxFuture as BoxFuture;
4129        #[derive(Debug)]
4130        pub struct Response(azure_core::Response);
4131        impl Response {
4132            pub async fn into_body(self) -> azure_core::Result<models::DscNodeReport> {
4133                let bytes = self.0.into_body().collect().await?;
4134                let body: models::DscNodeReport = serde_json::from_slice(&bytes)?;
4135                Ok(body)
4136            }
4137            pub fn into_raw_response(self) -> azure_core::Response {
4138                self.0
4139            }
4140            pub fn as_raw_response(&self) -> &azure_core::Response {
4141                &self.0
4142            }
4143        }
4144        impl From<Response> for azure_core::Response {
4145            fn from(rsp: Response) -> Self {
4146                rsp.into_raw_response()
4147            }
4148        }
4149        impl AsRef<azure_core::Response> for Response {
4150            fn as_ref(&self) -> &azure_core::Response {
4151                self.as_raw_response()
4152            }
4153        }
4154        #[derive(Clone)]
4155        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4156        #[doc = r""]
4157        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4158        #[doc = r" parameters can be chained."]
4159        #[doc = r""]
4160        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4161        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
4162        #[doc = r" executes the request and returns a `Result` with the parsed"]
4163        #[doc = r" response."]
4164        #[doc = r""]
4165        #[doc = r" In order to execute the request without polling the service"]
4166        #[doc = r" until the operation completes, use `.send().await` instead."]
4167        #[doc = r""]
4168        #[doc = r" If you need lower-level access to the raw response details"]
4169        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4170        #[doc = r" can finalize the request using the"]
4171        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4172        #[doc = r" that resolves to a lower-level [`Response`] value."]
4173        pub struct RequestBuilder {
4174            pub(crate) client: super::super::Client,
4175            pub(crate) resource_group_name: String,
4176            pub(crate) automation_account_name: String,
4177            pub(crate) node_id: String,
4178            pub(crate) report_id: String,
4179            pub(crate) subscription_id: String,
4180        }
4181        impl RequestBuilder {
4182            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4183            #[doc = ""]
4184            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4185            #[doc = "However, this function can provide more flexibility when required."]
4186            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4187                Box::pin({
4188                    let this = self.clone();
4189                    async move {
4190                        let url = this.url()?;
4191                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4192                        let bearer_token = this.client.bearer_token().await?;
4193                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4194                        let req_body = azure_core::EMPTY_BODY;
4195                        req.set_body(req_body);
4196                        Ok(Response(this.client.send(&mut req).await?))
4197                    }
4198                })
4199            }
4200            fn url(&self) -> azure_core::Result<azure_core::Url> {
4201                let mut url = self.client.endpoint().clone();
4202                url.set_path(&format!(
4203                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodes/{}/reports/{}",
4204                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_id, &self.report_id
4205                ));
4206                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4207                if !has_api_version_already {
4208                    url.query_pairs_mut()
4209                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4210                }
4211                Ok(url)
4212            }
4213        }
4214        impl std::future::IntoFuture for RequestBuilder {
4215            type Output = azure_core::Result<models::DscNodeReport>;
4216            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscNodeReport>>;
4217            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4218            #[doc = ""]
4219            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4220            #[doc = ""]
4221            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4222            fn into_future(self) -> Self::IntoFuture {
4223                Box::pin(async move { self.send().await?.into_body().await })
4224            }
4225        }
4226    }
4227    pub mod get_content {
4228        use super::models;
4229        #[cfg(not(target_arch = "wasm32"))]
4230        use futures::future::BoxFuture;
4231        #[cfg(target_arch = "wasm32")]
4232        use futures::future::LocalBoxFuture as BoxFuture;
4233        #[derive(Debug)]
4234        pub struct Response(azure_core::Response);
4235        impl Response {
4236            pub async fn into_body(self) -> azure_core::Result<serde_json::Value> {
4237                let bytes = self.0.into_body().collect().await?;
4238                let body: serde_json::Value = serde_json::from_slice(&bytes)?;
4239                Ok(body)
4240            }
4241            pub fn into_raw_response(self) -> azure_core::Response {
4242                self.0
4243            }
4244            pub fn as_raw_response(&self) -> &azure_core::Response {
4245                &self.0
4246            }
4247        }
4248        impl From<Response> for azure_core::Response {
4249            fn from(rsp: Response) -> Self {
4250                rsp.into_raw_response()
4251            }
4252        }
4253        impl AsRef<azure_core::Response> for Response {
4254            fn as_ref(&self) -> &azure_core::Response {
4255                self.as_raw_response()
4256            }
4257        }
4258        #[derive(Clone)]
4259        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4260        #[doc = r""]
4261        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4262        #[doc = r" parameters can be chained."]
4263        #[doc = r""]
4264        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4265        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
4266        #[doc = r" executes the request and returns a `Result` with the parsed"]
4267        #[doc = r" response."]
4268        #[doc = r""]
4269        #[doc = r" In order to execute the request without polling the service"]
4270        #[doc = r" until the operation completes, use `.send().await` instead."]
4271        #[doc = r""]
4272        #[doc = r" If you need lower-level access to the raw response details"]
4273        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4274        #[doc = r" can finalize the request using the"]
4275        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4276        #[doc = r" that resolves to a lower-level [`Response`] value."]
4277        pub struct RequestBuilder {
4278            pub(crate) client: super::super::Client,
4279            pub(crate) resource_group_name: String,
4280            pub(crate) automation_account_name: String,
4281            pub(crate) node_id: String,
4282            pub(crate) report_id: String,
4283            pub(crate) subscription_id: String,
4284        }
4285        impl RequestBuilder {
4286            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4287            #[doc = ""]
4288            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4289            #[doc = "However, this function can provide more flexibility when required."]
4290            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4291                Box::pin({
4292                    let this = self.clone();
4293                    async move {
4294                        let url = this.url()?;
4295                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4296                        let bearer_token = this.client.bearer_token().await?;
4297                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4298                        let req_body = azure_core::EMPTY_BODY;
4299                        req.set_body(req_body);
4300                        Ok(Response(this.client.send(&mut req).await?))
4301                    }
4302                })
4303            }
4304            fn url(&self) -> azure_core::Result<azure_core::Url> {
4305                let mut url = self.client.endpoint().clone();
4306                url.set_path(&format!(
4307                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodes/{}/reports/{}/content",
4308                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_id, &self.report_id
4309                ));
4310                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4311                if !has_api_version_already {
4312                    url.query_pairs_mut()
4313                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4314                }
4315                Ok(url)
4316            }
4317        }
4318        impl std::future::IntoFuture for RequestBuilder {
4319            type Output = azure_core::Result<serde_json::Value>;
4320            type IntoFuture = BoxFuture<'static, azure_core::Result<serde_json::Value>>;
4321            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4322            #[doc = ""]
4323            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4324            #[doc = ""]
4325            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4326            fn into_future(self) -> Self::IntoFuture {
4327                Box::pin(async move { self.send().await?.into_body().await })
4328            }
4329        }
4330    }
4331}
4332pub mod dsc_compilation_job {
4333    use super::models;
4334    #[cfg(not(target_arch = "wasm32"))]
4335    use futures::future::BoxFuture;
4336    #[cfg(target_arch = "wasm32")]
4337    use futures::future::LocalBoxFuture as BoxFuture;
4338    pub struct Client(pub(crate) super::Client);
4339    impl Client {
4340        #[doc = "Retrieve the Dsc configuration compilation job identified by job id."]
4341        #[doc = ""]
4342        #[doc = "Arguments:"]
4343        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
4344        #[doc = "* `automation_account_name`: The name of the automation account."]
4345        #[doc = "* `compilation_job_name`: The DSC configuration Id."]
4346        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
4347        pub fn get(
4348            &self,
4349            resource_group_name: impl Into<String>,
4350            automation_account_name: impl Into<String>,
4351            compilation_job_name: impl Into<String>,
4352            subscription_id: impl Into<String>,
4353        ) -> get::RequestBuilder {
4354            get::RequestBuilder {
4355                client: self.0.clone(),
4356                resource_group_name: resource_group_name.into(),
4357                automation_account_name: automation_account_name.into(),
4358                compilation_job_name: compilation_job_name.into(),
4359                subscription_id: subscription_id.into(),
4360            }
4361        }
4362        #[doc = "Creates the Dsc compilation job of the configuration."]
4363        #[doc = ""]
4364        #[doc = "Arguments:"]
4365        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
4366        #[doc = "* `automation_account_name`: The name of the automation account."]
4367        #[doc = "* `compilation_job_name`: The DSC configuration Id."]
4368        #[doc = "* `parameters`: The parameters supplied to the create compilation job operation."]
4369        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
4370        pub fn create(
4371            &self,
4372            resource_group_name: impl Into<String>,
4373            automation_account_name: impl Into<String>,
4374            compilation_job_name: impl Into<String>,
4375            parameters: impl Into<models::DscCompilationJobCreateParameters>,
4376            subscription_id: impl Into<String>,
4377        ) -> create::RequestBuilder {
4378            create::RequestBuilder {
4379                client: self.0.clone(),
4380                resource_group_name: resource_group_name.into(),
4381                automation_account_name: automation_account_name.into(),
4382                compilation_job_name: compilation_job_name.into(),
4383                parameters: parameters.into(),
4384                subscription_id: subscription_id.into(),
4385            }
4386        }
4387        #[doc = "Retrieve a list of dsc compilation jobs."]
4388        #[doc = ""]
4389        #[doc = "Arguments:"]
4390        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
4391        #[doc = "* `automation_account_name`: The name of the automation account."]
4392        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
4393        pub fn list_by_automation_account(
4394            &self,
4395            resource_group_name: impl Into<String>,
4396            automation_account_name: impl Into<String>,
4397            subscription_id: impl Into<String>,
4398        ) -> list_by_automation_account::RequestBuilder {
4399            list_by_automation_account::RequestBuilder {
4400                client: self.0.clone(),
4401                resource_group_name: resource_group_name.into(),
4402                automation_account_name: automation_account_name.into(),
4403                subscription_id: subscription_id.into(),
4404                filter: None,
4405            }
4406        }
4407        #[doc = "Retrieve the job stream identified by job stream id."]
4408        #[doc = ""]
4409        #[doc = "Arguments:"]
4410        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
4411        #[doc = "* `automation_account_name`: The name of the automation account."]
4412        #[doc = "* `compilation_job_name`: The DSC configuration Id."]
4413        #[doc = "* `job_stream_id`: The job stream id."]
4414        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
4415        pub fn get_stream(
4416            &self,
4417            resource_group_name: impl Into<String>,
4418            automation_account_name: impl Into<String>,
4419            compilation_job_name: impl Into<String>,
4420            job_stream_id: impl Into<String>,
4421            subscription_id: impl Into<String>,
4422        ) -> get_stream::RequestBuilder {
4423            get_stream::RequestBuilder {
4424                client: self.0.clone(),
4425                resource_group_name: resource_group_name.into(),
4426                automation_account_name: automation_account_name.into(),
4427                compilation_job_name: compilation_job_name.into(),
4428                job_stream_id: job_stream_id.into(),
4429                subscription_id: subscription_id.into(),
4430            }
4431        }
4432    }
4433    pub mod get {
4434        use super::models;
4435        #[cfg(not(target_arch = "wasm32"))]
4436        use futures::future::BoxFuture;
4437        #[cfg(target_arch = "wasm32")]
4438        use futures::future::LocalBoxFuture as BoxFuture;
4439        #[derive(Debug)]
4440        pub struct Response(azure_core::Response);
4441        impl Response {
4442            pub async fn into_body(self) -> azure_core::Result<models::DscCompilationJob> {
4443                let bytes = self.0.into_body().collect().await?;
4444                let body: models::DscCompilationJob = serde_json::from_slice(&bytes)?;
4445                Ok(body)
4446            }
4447            pub fn into_raw_response(self) -> azure_core::Response {
4448                self.0
4449            }
4450            pub fn as_raw_response(&self) -> &azure_core::Response {
4451                &self.0
4452            }
4453        }
4454        impl From<Response> for azure_core::Response {
4455            fn from(rsp: Response) -> Self {
4456                rsp.into_raw_response()
4457            }
4458        }
4459        impl AsRef<azure_core::Response> for Response {
4460            fn as_ref(&self) -> &azure_core::Response {
4461                self.as_raw_response()
4462            }
4463        }
4464        #[derive(Clone)]
4465        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4466        #[doc = r""]
4467        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4468        #[doc = r" parameters can be chained."]
4469        #[doc = r""]
4470        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4471        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
4472        #[doc = r" executes the request and returns a `Result` with the parsed"]
4473        #[doc = r" response."]
4474        #[doc = r""]
4475        #[doc = r" In order to execute the request without polling the service"]
4476        #[doc = r" until the operation completes, use `.send().await` instead."]
4477        #[doc = r""]
4478        #[doc = r" If you need lower-level access to the raw response details"]
4479        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4480        #[doc = r" can finalize the request using the"]
4481        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4482        #[doc = r" that resolves to a lower-level [`Response`] value."]
4483        pub struct RequestBuilder {
4484            pub(crate) client: super::super::Client,
4485            pub(crate) resource_group_name: String,
4486            pub(crate) automation_account_name: String,
4487            pub(crate) compilation_job_name: String,
4488            pub(crate) subscription_id: String,
4489        }
4490        impl RequestBuilder {
4491            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4492            #[doc = ""]
4493            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4494            #[doc = "However, this function can provide more flexibility when required."]
4495            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4496                Box::pin({
4497                    let this = self.clone();
4498                    async move {
4499                        let url = this.url()?;
4500                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4501                        let bearer_token = this.client.bearer_token().await?;
4502                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4503                        let req_body = azure_core::EMPTY_BODY;
4504                        req.set_body(req_body);
4505                        Ok(Response(this.client.send(&mut req).await?))
4506                    }
4507                })
4508            }
4509            fn url(&self) -> azure_core::Result<azure_core::Url> {
4510                let mut url = self.client.endpoint().clone();
4511                url.set_path(&format!(
4512                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/compilationjobs/{}",
4513                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.compilation_job_name
4514                ));
4515                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4516                if !has_api_version_already {
4517                    url.query_pairs_mut()
4518                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4519                }
4520                Ok(url)
4521            }
4522        }
4523        impl std::future::IntoFuture for RequestBuilder {
4524            type Output = azure_core::Result<models::DscCompilationJob>;
4525            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscCompilationJob>>;
4526            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4527            #[doc = ""]
4528            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4529            #[doc = ""]
4530            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4531            fn into_future(self) -> Self::IntoFuture {
4532                Box::pin(async move { self.send().await?.into_body().await })
4533            }
4534        }
4535    }
4536    pub mod create {
4537        use super::models;
4538        #[cfg(not(target_arch = "wasm32"))]
4539        use futures::future::BoxFuture;
4540        #[cfg(target_arch = "wasm32")]
4541        use futures::future::LocalBoxFuture as BoxFuture;
4542        #[derive(Debug)]
4543        pub struct Response(azure_core::Response);
4544        impl Response {
4545            pub async fn into_body(self) -> azure_core::Result<models::DscCompilationJob> {
4546                let bytes = self.0.into_body().collect().await?;
4547                let body: models::DscCompilationJob = serde_json::from_slice(&bytes)?;
4548                Ok(body)
4549            }
4550            pub fn into_raw_response(self) -> azure_core::Response {
4551                self.0
4552            }
4553            pub fn as_raw_response(&self) -> &azure_core::Response {
4554                &self.0
4555            }
4556        }
4557        impl From<Response> for azure_core::Response {
4558            fn from(rsp: Response) -> Self {
4559                rsp.into_raw_response()
4560            }
4561        }
4562        impl AsRef<azure_core::Response> for Response {
4563            fn as_ref(&self) -> &azure_core::Response {
4564                self.as_raw_response()
4565            }
4566        }
4567        #[derive(Clone)]
4568        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4569        #[doc = r""]
4570        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4571        #[doc = r" parameters can be chained."]
4572        #[doc = r""]
4573        #[doc = r" This `RequestBuilder` implements a Long Running Operation"]
4574        #[doc = r" (LRO)."]
4575        #[doc = r""]
4576        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4577        #[doc = r" which will convert the `RequestBuilder` into a future"]
4578        #[doc = r" executes the request and polls the service until the"]
4579        #[doc = r" operation completes."]
4580        #[doc = r""]
4581        #[doc = r" In order to execute the request without polling the service"]
4582        #[doc = r" until the operation completes, use"]
4583        #[doc = r" [`RequestBuilder::send()`], which will return a lower-level"]
4584        #[doc = r" [`Response`] value."]
4585        pub struct RequestBuilder {
4586            pub(crate) client: super::super::Client,
4587            pub(crate) resource_group_name: String,
4588            pub(crate) automation_account_name: String,
4589            pub(crate) compilation_job_name: String,
4590            pub(crate) parameters: models::DscCompilationJobCreateParameters,
4591            pub(crate) subscription_id: String,
4592        }
4593        impl RequestBuilder {
4594            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4595            #[doc = ""]
4596            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4597            #[doc = "However, this function can provide more flexibility when required."]
4598            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4599                Box::pin({
4600                    let this = self.clone();
4601                    async move {
4602                        let url = this.url()?;
4603                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
4604                        let bearer_token = this.client.bearer_token().await?;
4605                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4606                        req.insert_header("content-type", "application/json");
4607                        let req_body = azure_core::to_json(&this.parameters)?;
4608                        req.set_body(req_body);
4609                        Ok(Response(this.client.send(&mut req).await?))
4610                    }
4611                })
4612            }
4613            fn url(&self) -> azure_core::Result<azure_core::Url> {
4614                let mut url = self.client.endpoint().clone();
4615                url.set_path(&format!(
4616                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/compilationjobs/{}",
4617                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.compilation_job_name
4618                ));
4619                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4620                if !has_api_version_already {
4621                    url.query_pairs_mut()
4622                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4623                }
4624                Ok(url)
4625            }
4626        }
4627        impl std::future::IntoFuture for RequestBuilder {
4628            type Output = azure_core::Result<models::DscCompilationJob>;
4629            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscCompilationJob>>;
4630            #[doc = "Returns a future that polls the long running operation and checks for the state via `properties.provisioningState` in the response body."]
4631            #[doc = ""]
4632            #[doc = "To only submit the request but not monitor the status of the operation until completion, use `send()` instead."]
4633            #[doc = ""]
4634            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4635            #[doc = ""]
4636            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4637            fn into_future(self) -> Self::IntoFuture {
4638                Box::pin(async move {
4639                    use azure_core::{
4640                        error::{Error, ErrorKind},
4641                        lro::{body_content::get_provisioning_state, get_retry_after, LroStatus},
4642                        sleep::sleep,
4643                    };
4644                    use std::time::Duration;
4645                    loop {
4646                        let this = self.clone();
4647                        let response = this.send().await?;
4648                        let retry_after = get_retry_after(response.as_raw_response().headers());
4649                        let status = response.as_raw_response().status();
4650                        let body = response.into_body().await?;
4651                        let provisioning_state = get_provisioning_state(status, &body)?;
4652                        log::trace!("current provisioning_state: {provisioning_state:?}");
4653                        match provisioning_state {
4654                            LroStatus::Succeeded => return Ok(body),
4655                            LroStatus::Failed => return Err(Error::message(ErrorKind::Other, "Long running operation failed".to_string())),
4656                            LroStatus::Canceled => {
4657                                return Err(Error::message(ErrorKind::Other, "Long running operation canceled".to_string()))
4658                            }
4659                            _ => {
4660                                sleep(retry_after).await;
4661                            }
4662                        }
4663                    }
4664                })
4665            }
4666        }
4667    }
4668    pub mod list_by_automation_account {
4669        use super::models;
4670        #[cfg(not(target_arch = "wasm32"))]
4671        use futures::future::BoxFuture;
4672        #[cfg(target_arch = "wasm32")]
4673        use futures::future::LocalBoxFuture as BoxFuture;
4674        #[derive(Debug)]
4675        pub struct Response(azure_core::Response);
4676        impl Response {
4677            pub async fn into_body(self) -> azure_core::Result<models::DscCompilationJobListResult> {
4678                let bytes = self.0.into_body().collect().await?;
4679                let body: models::DscCompilationJobListResult = serde_json::from_slice(&bytes)?;
4680                Ok(body)
4681            }
4682            pub fn into_raw_response(self) -> azure_core::Response {
4683                self.0
4684            }
4685            pub fn as_raw_response(&self) -> &azure_core::Response {
4686                &self.0
4687            }
4688        }
4689        impl From<Response> for azure_core::Response {
4690            fn from(rsp: Response) -> Self {
4691                rsp.into_raw_response()
4692            }
4693        }
4694        impl AsRef<azure_core::Response> for Response {
4695            fn as_ref(&self) -> &azure_core::Response {
4696                self.as_raw_response()
4697            }
4698        }
4699        #[derive(Clone)]
4700        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4701        #[doc = r""]
4702        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4703        #[doc = r" parameters can be chained."]
4704        #[doc = r""]
4705        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4706        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
4707        #[doc = r" executes the request and returns a `Result` with the parsed"]
4708        #[doc = r" response."]
4709        #[doc = r""]
4710        #[doc = r" In order to execute the request without polling the service"]
4711        #[doc = r" until the operation completes, use `.send().await` instead."]
4712        #[doc = r""]
4713        #[doc = r" If you need lower-level access to the raw response details"]
4714        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4715        #[doc = r" can finalize the request using the"]
4716        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4717        #[doc = r" that resolves to a lower-level [`Response`] value."]
4718        pub struct RequestBuilder {
4719            pub(crate) client: super::super::Client,
4720            pub(crate) resource_group_name: String,
4721            pub(crate) automation_account_name: String,
4722            pub(crate) subscription_id: String,
4723            pub(crate) filter: Option<String>,
4724        }
4725        impl RequestBuilder {
4726            #[doc = "The filter to apply on the operation."]
4727            pub fn filter(mut self, filter: impl Into<String>) -> Self {
4728                self.filter = Some(filter.into());
4729                self
4730            }
4731            pub fn into_stream(self) -> azure_core::Pageable<models::DscCompilationJobListResult, azure_core::error::Error> {
4732                let make_request = move |continuation: Option<String>| {
4733                    let this = self.clone();
4734                    async move {
4735                        let mut url = this.url()?;
4736                        let rsp = match continuation {
4737                            Some(value) => {
4738                                url.set_path("");
4739                                url = url.join(&value)?;
4740                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4741                                let bearer_token = this.client.bearer_token().await?;
4742                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4743                                let has_api_version_already =
4744                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4745                                if !has_api_version_already {
4746                                    req.url_mut()
4747                                        .query_pairs_mut()
4748                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4749                                }
4750                                let req_body = azure_core::EMPTY_BODY;
4751                                req.set_body(req_body);
4752                                this.client.send(&mut req).await?
4753                            }
4754                            None => {
4755                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4756                                let bearer_token = this.client.bearer_token().await?;
4757                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4758                                if let Some(filter) = &this.filter {
4759                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
4760                                }
4761                                let req_body = azure_core::EMPTY_BODY;
4762                                req.set_body(req_body);
4763                                this.client.send(&mut req).await?
4764                            }
4765                        };
4766                        let rsp = match rsp.status() {
4767                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
4768                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
4769                                status: status_code,
4770                                error_code: None,
4771                            })),
4772                        };
4773                        rsp?.into_body().await
4774                    }
4775                };
4776                azure_core::Pageable::new(make_request)
4777            }
4778            fn url(&self) -> azure_core::Result<azure_core::Url> {
4779                let mut url = self.client.endpoint().clone();
4780                url.set_path(&format!(
4781                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/compilationjobs",
4782                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
4783                ));
4784                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4785                if !has_api_version_already {
4786                    url.query_pairs_mut()
4787                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4788                }
4789                Ok(url)
4790            }
4791        }
4792    }
4793    pub mod get_stream {
4794        use super::models;
4795        #[cfg(not(target_arch = "wasm32"))]
4796        use futures::future::BoxFuture;
4797        #[cfg(target_arch = "wasm32")]
4798        use futures::future::LocalBoxFuture as BoxFuture;
4799        #[derive(Debug)]
4800        pub struct Response(azure_core::Response);
4801        impl Response {
4802            pub async fn into_body(self) -> azure_core::Result<models::JobStream> {
4803                let bytes = self.0.into_body().collect().await?;
4804                let body: models::JobStream = serde_json::from_slice(&bytes)?;
4805                Ok(body)
4806            }
4807            pub fn into_raw_response(self) -> azure_core::Response {
4808                self.0
4809            }
4810            pub fn as_raw_response(&self) -> &azure_core::Response {
4811                &self.0
4812            }
4813        }
4814        impl From<Response> for azure_core::Response {
4815            fn from(rsp: Response) -> Self {
4816                rsp.into_raw_response()
4817            }
4818        }
4819        impl AsRef<azure_core::Response> for Response {
4820            fn as_ref(&self) -> &azure_core::Response {
4821                self.as_raw_response()
4822            }
4823        }
4824        #[derive(Clone)]
4825        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4826        #[doc = r""]
4827        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4828        #[doc = r" parameters can be chained."]
4829        #[doc = r""]
4830        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4831        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
4832        #[doc = r" executes the request and returns a `Result` with the parsed"]
4833        #[doc = r" response."]
4834        #[doc = r""]
4835        #[doc = r" In order to execute the request without polling the service"]
4836        #[doc = r" until the operation completes, use `.send().await` instead."]
4837        #[doc = r""]
4838        #[doc = r" If you need lower-level access to the raw response details"]
4839        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4840        #[doc = r" can finalize the request using the"]
4841        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4842        #[doc = r" that resolves to a lower-level [`Response`] value."]
4843        pub struct RequestBuilder {
4844            pub(crate) client: super::super::Client,
4845            pub(crate) resource_group_name: String,
4846            pub(crate) automation_account_name: String,
4847            pub(crate) compilation_job_name: String,
4848            pub(crate) job_stream_id: String,
4849            pub(crate) subscription_id: String,
4850        }
4851        impl RequestBuilder {
4852            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4853            #[doc = ""]
4854            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4855            #[doc = "However, this function can provide more flexibility when required."]
4856            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4857                Box::pin({
4858                    let this = self.clone();
4859                    async move {
4860                        let url = this.url()?;
4861                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4862                        let bearer_token = this.client.bearer_token().await?;
4863                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4864                        let req_body = azure_core::EMPTY_BODY;
4865                        req.set_body(req_body);
4866                        Ok(Response(this.client.send(&mut req).await?))
4867                    }
4868                })
4869            }
4870            fn url(&self) -> azure_core::Result<azure_core::Url> {
4871                let mut url = self.client.endpoint().clone();
4872                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/compilationjobs/{}/streams/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . compilation_job_name , & self . job_stream_id)) ;
4873                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
4874                if !has_api_version_already {
4875                    url.query_pairs_mut()
4876                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
4877                }
4878                Ok(url)
4879            }
4880        }
4881        impl std::future::IntoFuture for RequestBuilder {
4882            type Output = azure_core::Result<models::JobStream>;
4883            type IntoFuture = BoxFuture<'static, azure_core::Result<models::JobStream>>;
4884            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4885            #[doc = ""]
4886            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4887            #[doc = ""]
4888            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4889            fn into_future(self) -> Self::IntoFuture {
4890                Box::pin(async move { self.send().await?.into_body().await })
4891            }
4892        }
4893    }
4894}
4895pub mod dsc_compilation_job_stream {
4896    use super::models;
4897    #[cfg(not(target_arch = "wasm32"))]
4898    use futures::future::BoxFuture;
4899    #[cfg(target_arch = "wasm32")]
4900    use futures::future::LocalBoxFuture as BoxFuture;
4901    pub struct Client(pub(crate) super::Client);
4902    impl Client {
4903        #[doc = "Retrieve all the job streams for the compilation Job."]
4904        #[doc = ""]
4905        #[doc = "Arguments:"]
4906        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
4907        #[doc = "* `automation_account_name`: The name of the automation account."]
4908        #[doc = "* `compilation_job_name`: The DSC configuration Id."]
4909        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
4910        pub fn list_by_job(
4911            &self,
4912            resource_group_name: impl Into<String>,
4913            automation_account_name: impl Into<String>,
4914            compilation_job_name: impl Into<String>,
4915            subscription_id: impl Into<String>,
4916        ) -> list_by_job::RequestBuilder {
4917            list_by_job::RequestBuilder {
4918                client: self.0.clone(),
4919                resource_group_name: resource_group_name.into(),
4920                automation_account_name: automation_account_name.into(),
4921                compilation_job_name: compilation_job_name.into(),
4922                subscription_id: subscription_id.into(),
4923            }
4924        }
4925    }
4926    pub mod list_by_job {
4927        use super::models;
4928        #[cfg(not(target_arch = "wasm32"))]
4929        use futures::future::BoxFuture;
4930        #[cfg(target_arch = "wasm32")]
4931        use futures::future::LocalBoxFuture as BoxFuture;
4932        #[derive(Debug)]
4933        pub struct Response(azure_core::Response);
4934        impl Response {
4935            pub async fn into_body(self) -> azure_core::Result<models::JobStreamListResult> {
4936                let bytes = self.0.into_body().collect().await?;
4937                let body: models::JobStreamListResult = serde_json::from_slice(&bytes)?;
4938                Ok(body)
4939            }
4940            pub fn into_raw_response(self) -> azure_core::Response {
4941                self.0
4942            }
4943            pub fn as_raw_response(&self) -> &azure_core::Response {
4944                &self.0
4945            }
4946        }
4947        impl From<Response> for azure_core::Response {
4948            fn from(rsp: Response) -> Self {
4949                rsp.into_raw_response()
4950            }
4951        }
4952        impl AsRef<azure_core::Response> for Response {
4953            fn as_ref(&self) -> &azure_core::Response {
4954                self.as_raw_response()
4955            }
4956        }
4957        #[derive(Clone)]
4958        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4959        #[doc = r""]
4960        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4961        #[doc = r" parameters can be chained."]
4962        #[doc = r""]
4963        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4964        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
4965        #[doc = r" executes the request and returns a `Result` with the parsed"]
4966        #[doc = r" response."]
4967        #[doc = r""]
4968        #[doc = r" In order to execute the request without polling the service"]
4969        #[doc = r" until the operation completes, use `.send().await` instead."]
4970        #[doc = r""]
4971        #[doc = r" If you need lower-level access to the raw response details"]
4972        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4973        #[doc = r" can finalize the request using the"]
4974        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4975        #[doc = r" that resolves to a lower-level [`Response`] value."]
4976        pub struct RequestBuilder {
4977            pub(crate) client: super::super::Client,
4978            pub(crate) resource_group_name: String,
4979            pub(crate) automation_account_name: String,
4980            pub(crate) compilation_job_name: String,
4981            pub(crate) subscription_id: String,
4982        }
4983        impl RequestBuilder {
4984            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4985            #[doc = ""]
4986            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4987            #[doc = "However, this function can provide more flexibility when required."]
4988            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4989                Box::pin({
4990                    let this = self.clone();
4991                    async move {
4992                        let url = this.url()?;
4993                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4994                        let bearer_token = this.client.bearer_token().await?;
4995                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
4996                        let req_body = azure_core::EMPTY_BODY;
4997                        req.set_body(req_body);
4998                        Ok(Response(this.client.send(&mut req).await?))
4999                    }
5000                })
5001            }
5002            fn url(&self) -> azure_core::Result<azure_core::Url> {
5003                let mut url = self.client.endpoint().clone();
5004                url.set_path(&format!(
5005                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/compilationjobs/{}/streams",
5006                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.compilation_job_name
5007                ));
5008                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5009                if !has_api_version_already {
5010                    url.query_pairs_mut()
5011                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5012                }
5013                Ok(url)
5014            }
5015        }
5016        impl std::future::IntoFuture for RequestBuilder {
5017            type Output = azure_core::Result<models::JobStreamListResult>;
5018            type IntoFuture = BoxFuture<'static, azure_core::Result<models::JobStreamListResult>>;
5019            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5020            #[doc = ""]
5021            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5022            #[doc = ""]
5023            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5024            fn into_future(self) -> Self::IntoFuture {
5025                Box::pin(async move { self.send().await?.into_body().await })
5026            }
5027        }
5028    }
5029}
5030pub mod dsc_node_configuration {
5031    use super::models;
5032    #[cfg(not(target_arch = "wasm32"))]
5033    use futures::future::BoxFuture;
5034    #[cfg(target_arch = "wasm32")]
5035    use futures::future::LocalBoxFuture as BoxFuture;
5036    pub struct Client(pub(crate) super::Client);
5037    impl Client {
5038        #[doc = "Retrieve the Dsc node configurations by node configuration."]
5039        #[doc = ""]
5040        #[doc = "Arguments:"]
5041        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
5042        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
5043        #[doc = "* `automation_account_name`: The name of the automation account."]
5044        #[doc = "* `node_configuration_name`: The Dsc node configuration name."]
5045        pub fn get(
5046            &self,
5047            subscription_id: impl Into<String>,
5048            resource_group_name: impl Into<String>,
5049            automation_account_name: impl Into<String>,
5050            node_configuration_name: impl Into<String>,
5051        ) -> get::RequestBuilder {
5052            get::RequestBuilder {
5053                client: self.0.clone(),
5054                subscription_id: subscription_id.into(),
5055                resource_group_name: resource_group_name.into(),
5056                automation_account_name: automation_account_name.into(),
5057                node_configuration_name: node_configuration_name.into(),
5058            }
5059        }
5060        #[doc = "Create the node configuration identified by node configuration name."]
5061        #[doc = ""]
5062        #[doc = "Arguments:"]
5063        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
5064        #[doc = "* `automation_account_name`: The name of the automation account."]
5065        #[doc = "* `node_configuration_name`: The Dsc node configuration name."]
5066        #[doc = "* `parameters`: The create or update parameters for configuration."]
5067        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
5068        pub fn create_or_update(
5069            &self,
5070            resource_group_name: impl Into<String>,
5071            automation_account_name: impl Into<String>,
5072            node_configuration_name: impl Into<String>,
5073            parameters: impl Into<models::DscNodeConfigurationCreateOrUpdateParameters>,
5074            subscription_id: impl Into<String>,
5075        ) -> create_or_update::RequestBuilder {
5076            create_or_update::RequestBuilder {
5077                client: self.0.clone(),
5078                resource_group_name: resource_group_name.into(),
5079                automation_account_name: automation_account_name.into(),
5080                node_configuration_name: node_configuration_name.into(),
5081                parameters: parameters.into(),
5082                subscription_id: subscription_id.into(),
5083            }
5084        }
5085        #[doc = "Delete the Dsc node configurations by node configuration."]
5086        #[doc = ""]
5087        #[doc = "Arguments:"]
5088        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
5089        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
5090        #[doc = "* `automation_account_name`: The name of the automation account."]
5091        #[doc = "* `node_configuration_name`: The Dsc node configuration name."]
5092        pub fn delete(
5093            &self,
5094            subscription_id: impl Into<String>,
5095            resource_group_name: impl Into<String>,
5096            automation_account_name: impl Into<String>,
5097            node_configuration_name: impl Into<String>,
5098        ) -> delete::RequestBuilder {
5099            delete::RequestBuilder {
5100                client: self.0.clone(),
5101                subscription_id: subscription_id.into(),
5102                resource_group_name: resource_group_name.into(),
5103                automation_account_name: automation_account_name.into(),
5104                node_configuration_name: node_configuration_name.into(),
5105            }
5106        }
5107        #[doc = "Retrieve a list of dsc node configurations."]
5108        #[doc = ""]
5109        #[doc = "Arguments:"]
5110        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
5111        #[doc = "* `automation_account_name`: The name of the automation account."]
5112        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
5113        pub fn list_by_automation_account(
5114            &self,
5115            resource_group_name: impl Into<String>,
5116            automation_account_name: impl Into<String>,
5117            subscription_id: impl Into<String>,
5118        ) -> list_by_automation_account::RequestBuilder {
5119            list_by_automation_account::RequestBuilder {
5120                client: self.0.clone(),
5121                resource_group_name: resource_group_name.into(),
5122                automation_account_name: automation_account_name.into(),
5123                subscription_id: subscription_id.into(),
5124                filter: None,
5125                skip: None,
5126                top: None,
5127                inlinecount: None,
5128            }
5129        }
5130    }
5131    pub mod get {
5132        use super::models;
5133        #[cfg(not(target_arch = "wasm32"))]
5134        use futures::future::BoxFuture;
5135        #[cfg(target_arch = "wasm32")]
5136        use futures::future::LocalBoxFuture as BoxFuture;
5137        #[derive(Debug)]
5138        pub struct Response(azure_core::Response);
5139        impl Response {
5140            pub async fn into_body(self) -> azure_core::Result<models::DscNodeConfiguration> {
5141                let bytes = self.0.into_body().collect().await?;
5142                let body: models::DscNodeConfiguration = serde_json::from_slice(&bytes)?;
5143                Ok(body)
5144            }
5145            pub fn into_raw_response(self) -> azure_core::Response {
5146                self.0
5147            }
5148            pub fn as_raw_response(&self) -> &azure_core::Response {
5149                &self.0
5150            }
5151        }
5152        impl From<Response> for azure_core::Response {
5153            fn from(rsp: Response) -> Self {
5154                rsp.into_raw_response()
5155            }
5156        }
5157        impl AsRef<azure_core::Response> for Response {
5158            fn as_ref(&self) -> &azure_core::Response {
5159                self.as_raw_response()
5160            }
5161        }
5162        #[derive(Clone)]
5163        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5164        #[doc = r""]
5165        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5166        #[doc = r" parameters can be chained."]
5167        #[doc = r""]
5168        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5169        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
5170        #[doc = r" executes the request and returns a `Result` with the parsed"]
5171        #[doc = r" response."]
5172        #[doc = r""]
5173        #[doc = r" In order to execute the request without polling the service"]
5174        #[doc = r" until the operation completes, use `.send().await` instead."]
5175        #[doc = r""]
5176        #[doc = r" If you need lower-level access to the raw response details"]
5177        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5178        #[doc = r" can finalize the request using the"]
5179        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5180        #[doc = r" that resolves to a lower-level [`Response`] value."]
5181        pub struct RequestBuilder {
5182            pub(crate) client: super::super::Client,
5183            pub(crate) subscription_id: String,
5184            pub(crate) resource_group_name: String,
5185            pub(crate) automation_account_name: String,
5186            pub(crate) node_configuration_name: String,
5187        }
5188        impl RequestBuilder {
5189            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5190            #[doc = ""]
5191            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5192            #[doc = "However, this function can provide more flexibility when required."]
5193            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5194                Box::pin({
5195                    let this = self.clone();
5196                    async move {
5197                        let url = this.url()?;
5198                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5199                        let bearer_token = this.client.bearer_token().await?;
5200                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
5201                        let req_body = azure_core::EMPTY_BODY;
5202                        req.set_body(req_body);
5203                        Ok(Response(this.client.send(&mut req).await?))
5204                    }
5205                })
5206            }
5207            fn url(&self) -> azure_core::Result<azure_core::Url> {
5208                let mut url = self.client.endpoint().clone();
5209                url.set_path(&format!(
5210                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodeConfigurations/{}",
5211                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_configuration_name
5212                ));
5213                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5214                if !has_api_version_already {
5215                    url.query_pairs_mut()
5216                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5217                }
5218                Ok(url)
5219            }
5220        }
5221        impl std::future::IntoFuture for RequestBuilder {
5222            type Output = azure_core::Result<models::DscNodeConfiguration>;
5223            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscNodeConfiguration>>;
5224            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5225            #[doc = ""]
5226            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5227            #[doc = ""]
5228            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5229            fn into_future(self) -> Self::IntoFuture {
5230                Box::pin(async move { self.send().await?.into_body().await })
5231            }
5232        }
5233    }
5234    pub mod create_or_update {
5235        use super::models;
5236        #[cfg(not(target_arch = "wasm32"))]
5237        use futures::future::BoxFuture;
5238        #[cfg(target_arch = "wasm32")]
5239        use futures::future::LocalBoxFuture as BoxFuture;
5240        #[derive(Debug)]
5241        pub struct Response(azure_core::Response);
5242        impl Response {
5243            pub fn into_raw_response(self) -> azure_core::Response {
5244                self.0
5245            }
5246            pub fn as_raw_response(&self) -> &azure_core::Response {
5247                &self.0
5248            }
5249        }
5250        impl From<Response> for azure_core::Response {
5251            fn from(rsp: Response) -> Self {
5252                rsp.into_raw_response()
5253            }
5254        }
5255        impl AsRef<azure_core::Response> for Response {
5256            fn as_ref(&self) -> &azure_core::Response {
5257                self.as_raw_response()
5258            }
5259        }
5260        #[derive(Clone)]
5261        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5262        #[doc = r""]
5263        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5264        #[doc = r" parameters can be chained."]
5265        #[doc = r""]
5266        #[doc = r" This `RequestBuilder` implements a Long Running Operation"]
5267        #[doc = r" (LRO)."]
5268        #[doc = r""]
5269        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5270        #[doc = r" which will convert the `RequestBuilder` into a future"]
5271        #[doc = r" executes the request and polls the service until the"]
5272        #[doc = r" operation completes."]
5273        #[doc = r""]
5274        #[doc = r" In order to execute the request without polling the service"]
5275        #[doc = r" until the operation completes, use"]
5276        #[doc = r" [`RequestBuilder::send()`], which will return a lower-level"]
5277        #[doc = r" [`Response`] value."]
5278        pub struct RequestBuilder {
5279            pub(crate) client: super::super::Client,
5280            pub(crate) resource_group_name: String,
5281            pub(crate) automation_account_name: String,
5282            pub(crate) node_configuration_name: String,
5283            pub(crate) parameters: models::DscNodeConfigurationCreateOrUpdateParameters,
5284            pub(crate) subscription_id: String,
5285        }
5286        impl RequestBuilder {
5287            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5288            #[doc = ""]
5289            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5290            #[doc = "However, this function can provide more flexibility when required."]
5291            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5292                Box::pin({
5293                    let this = self.clone();
5294                    async move {
5295                        let url = this.url()?;
5296                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
5297                        let bearer_token = this.client.bearer_token().await?;
5298                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
5299                        req.insert_header("content-type", "application/json");
5300                        let req_body = azure_core::to_json(&this.parameters)?;
5301                        req.set_body(req_body);
5302                        Ok(Response(this.client.send(&mut req).await?))
5303                    }
5304                })
5305            }
5306            fn url(&self) -> azure_core::Result<azure_core::Url> {
5307                let mut url = self.client.endpoint().clone();
5308                url.set_path(&format!(
5309                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodeConfigurations/{}",
5310                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_configuration_name
5311                ));
5312                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5313                if !has_api_version_already {
5314                    url.query_pairs_mut()
5315                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5316                }
5317                Ok(url)
5318            }
5319        }
5320    }
5321    pub mod delete {
5322        use super::models;
5323        #[cfg(not(target_arch = "wasm32"))]
5324        use futures::future::BoxFuture;
5325        #[cfg(target_arch = "wasm32")]
5326        use futures::future::LocalBoxFuture as BoxFuture;
5327        #[derive(Debug)]
5328        pub struct Response(azure_core::Response);
5329        impl Response {
5330            pub fn into_raw_response(self) -> azure_core::Response {
5331                self.0
5332            }
5333            pub fn as_raw_response(&self) -> &azure_core::Response {
5334                &self.0
5335            }
5336        }
5337        impl From<Response> for azure_core::Response {
5338            fn from(rsp: Response) -> Self {
5339                rsp.into_raw_response()
5340            }
5341        }
5342        impl AsRef<azure_core::Response> for Response {
5343            fn as_ref(&self) -> &azure_core::Response {
5344                self.as_raw_response()
5345            }
5346        }
5347        #[derive(Clone)]
5348        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5349        #[doc = r""]
5350        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5351        #[doc = r" parameters can be chained."]
5352        #[doc = r""]
5353        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5354        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
5355        #[doc = r" executes the request and returns a `Result` with the parsed"]
5356        #[doc = r" response."]
5357        #[doc = r""]
5358        #[doc = r" In order to execute the request without polling the service"]
5359        #[doc = r" until the operation completes, use `.send().await` instead."]
5360        #[doc = r""]
5361        #[doc = r" If you need lower-level access to the raw response details"]
5362        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5363        #[doc = r" can finalize the request using the"]
5364        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5365        #[doc = r" that resolves to a lower-level [`Response`] value."]
5366        pub struct RequestBuilder {
5367            pub(crate) client: super::super::Client,
5368            pub(crate) subscription_id: String,
5369            pub(crate) resource_group_name: String,
5370            pub(crate) automation_account_name: String,
5371            pub(crate) node_configuration_name: String,
5372        }
5373        impl RequestBuilder {
5374            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5375            #[doc = ""]
5376            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5377            #[doc = "However, this function can provide more flexibility when required."]
5378            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5379                Box::pin({
5380                    let this = self.clone();
5381                    async move {
5382                        let url = this.url()?;
5383                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
5384                        let bearer_token = this.client.bearer_token().await?;
5385                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
5386                        let req_body = azure_core::EMPTY_BODY;
5387                        req.set_body(req_body);
5388                        Ok(Response(this.client.send(&mut req).await?))
5389                    }
5390                })
5391            }
5392            fn url(&self) -> azure_core::Result<azure_core::Url> {
5393                let mut url = self.client.endpoint().clone();
5394                url.set_path(&format!(
5395                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodeConfigurations/{}",
5396                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.node_configuration_name
5397                ));
5398                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5399                if !has_api_version_already {
5400                    url.query_pairs_mut()
5401                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5402                }
5403                Ok(url)
5404            }
5405        }
5406    }
5407    pub mod list_by_automation_account {
5408        use super::models;
5409        #[cfg(not(target_arch = "wasm32"))]
5410        use futures::future::BoxFuture;
5411        #[cfg(target_arch = "wasm32")]
5412        use futures::future::LocalBoxFuture as BoxFuture;
5413        #[derive(Debug)]
5414        pub struct Response(azure_core::Response);
5415        impl Response {
5416            pub async fn into_body(self) -> azure_core::Result<models::DscNodeConfigurationListResult> {
5417                let bytes = self.0.into_body().collect().await?;
5418                let body: models::DscNodeConfigurationListResult = serde_json::from_slice(&bytes)?;
5419                Ok(body)
5420            }
5421            pub fn into_raw_response(self) -> azure_core::Response {
5422                self.0
5423            }
5424            pub fn as_raw_response(&self) -> &azure_core::Response {
5425                &self.0
5426            }
5427        }
5428        impl From<Response> for azure_core::Response {
5429            fn from(rsp: Response) -> Self {
5430                rsp.into_raw_response()
5431            }
5432        }
5433        impl AsRef<azure_core::Response> for Response {
5434            fn as_ref(&self) -> &azure_core::Response {
5435                self.as_raw_response()
5436            }
5437        }
5438        #[derive(Clone)]
5439        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5440        #[doc = r""]
5441        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5442        #[doc = r" parameters can be chained."]
5443        #[doc = r""]
5444        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5445        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
5446        #[doc = r" executes the request and returns a `Result` with the parsed"]
5447        #[doc = r" response."]
5448        #[doc = r""]
5449        #[doc = r" In order to execute the request without polling the service"]
5450        #[doc = r" until the operation completes, use `.send().await` instead."]
5451        #[doc = r""]
5452        #[doc = r" If you need lower-level access to the raw response details"]
5453        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5454        #[doc = r" can finalize the request using the"]
5455        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5456        #[doc = r" that resolves to a lower-level [`Response`] value."]
5457        pub struct RequestBuilder {
5458            pub(crate) client: super::super::Client,
5459            pub(crate) resource_group_name: String,
5460            pub(crate) automation_account_name: String,
5461            pub(crate) subscription_id: String,
5462            pub(crate) filter: Option<String>,
5463            pub(crate) skip: Option<i64>,
5464            pub(crate) top: Option<i64>,
5465            pub(crate) inlinecount: Option<String>,
5466        }
5467        impl RequestBuilder {
5468            #[doc = "The filter to apply on the operation."]
5469            pub fn filter(mut self, filter: impl Into<String>) -> Self {
5470                self.filter = Some(filter.into());
5471                self
5472            }
5473            #[doc = "The number of rows to skip."]
5474            pub fn skip(mut self, skip: i64) -> Self {
5475                self.skip = Some(skip);
5476                self
5477            }
5478            #[doc = "The number of rows to take."]
5479            pub fn top(mut self, top: i64) -> Self {
5480                self.top = Some(top);
5481                self
5482            }
5483            #[doc = "Return total rows."]
5484            pub fn inlinecount(mut self, inlinecount: impl Into<String>) -> Self {
5485                self.inlinecount = Some(inlinecount.into());
5486                self
5487            }
5488            pub fn into_stream(self) -> azure_core::Pageable<models::DscNodeConfigurationListResult, azure_core::error::Error> {
5489                let make_request = move |continuation: Option<String>| {
5490                    let this = self.clone();
5491                    async move {
5492                        let mut url = this.url()?;
5493                        let rsp = match continuation {
5494                            Some(value) => {
5495                                url.set_path("");
5496                                url = url.join(&value)?;
5497                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5498                                let bearer_token = this.client.bearer_token().await?;
5499                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
5500                                let has_api_version_already =
5501                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5502                                if !has_api_version_already {
5503                                    req.url_mut()
5504                                        .query_pairs_mut()
5505                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5506                                }
5507                                let req_body = azure_core::EMPTY_BODY;
5508                                req.set_body(req_body);
5509                                this.client.send(&mut req).await?
5510                            }
5511                            None => {
5512                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5513                                let bearer_token = this.client.bearer_token().await?;
5514                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
5515                                if let Some(filter) = &this.filter {
5516                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
5517                                }
5518                                if let Some(skip) = &this.skip {
5519                                    req.url_mut().query_pairs_mut().append_pair("$skip", &skip.to_string());
5520                                }
5521                                if let Some(top) = &this.top {
5522                                    req.url_mut().query_pairs_mut().append_pair("$top", &top.to_string());
5523                                }
5524                                if let Some(inlinecount) = &this.inlinecount {
5525                                    req.url_mut().query_pairs_mut().append_pair("$inlinecount", inlinecount);
5526                                }
5527                                let req_body = azure_core::EMPTY_BODY;
5528                                req.set_body(req_body);
5529                                this.client.send(&mut req).await?
5530                            }
5531                        };
5532                        let rsp = match rsp.status() {
5533                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
5534                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
5535                                status: status_code,
5536                                error_code: None,
5537                            })),
5538                        };
5539                        rsp?.into_body().await
5540                    }
5541                };
5542                azure_core::Pageable::new(make_request)
5543            }
5544            fn url(&self) -> azure_core::Result<azure_core::Url> {
5545                let mut url = self.client.endpoint().clone();
5546                url.set_path(&format!(
5547                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodeConfigurations",
5548                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
5549                ));
5550                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5551                if !has_api_version_already {
5552                    url.query_pairs_mut()
5553                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5554                }
5555                Ok(url)
5556            }
5557        }
5558    }
5559}
5560pub mod node_count_information {
5561    use super::models;
5562    #[cfg(not(target_arch = "wasm32"))]
5563    use futures::future::BoxFuture;
5564    #[cfg(target_arch = "wasm32")]
5565    use futures::future::LocalBoxFuture as BoxFuture;
5566    pub struct Client(pub(crate) super::Client);
5567    impl Client {
5568        #[doc = "Retrieve counts for Dsc Nodes."]
5569        #[doc = ""]
5570        #[doc = "Arguments:"]
5571        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
5572        #[doc = "* `automation_account_name`: The name of the automation account."]
5573        #[doc = "* `count_type`: The type of counts to retrieve"]
5574        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
5575        pub fn get(
5576            &self,
5577            resource_group_name: impl Into<String>,
5578            automation_account_name: impl Into<String>,
5579            count_type: impl Into<String>,
5580            subscription_id: impl Into<String>,
5581        ) -> get::RequestBuilder {
5582            get::RequestBuilder {
5583                client: self.0.clone(),
5584                resource_group_name: resource_group_name.into(),
5585                automation_account_name: automation_account_name.into(),
5586                count_type: count_type.into(),
5587                subscription_id: subscription_id.into(),
5588            }
5589        }
5590    }
5591    pub mod get {
5592        use super::models;
5593        #[cfg(not(target_arch = "wasm32"))]
5594        use futures::future::BoxFuture;
5595        #[cfg(target_arch = "wasm32")]
5596        use futures::future::LocalBoxFuture as BoxFuture;
5597        #[derive(Debug)]
5598        pub struct Response(azure_core::Response);
5599        impl Response {
5600            pub async fn into_body(self) -> azure_core::Result<models::NodeCounts> {
5601                let bytes = self.0.into_body().collect().await?;
5602                let body: models::NodeCounts = serde_json::from_slice(&bytes)?;
5603                Ok(body)
5604            }
5605            pub fn into_raw_response(self) -> azure_core::Response {
5606                self.0
5607            }
5608            pub fn as_raw_response(&self) -> &azure_core::Response {
5609                &self.0
5610            }
5611        }
5612        impl From<Response> for azure_core::Response {
5613            fn from(rsp: Response) -> Self {
5614                rsp.into_raw_response()
5615            }
5616        }
5617        impl AsRef<azure_core::Response> for Response {
5618            fn as_ref(&self) -> &azure_core::Response {
5619                self.as_raw_response()
5620            }
5621        }
5622        #[derive(Clone)]
5623        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5624        #[doc = r""]
5625        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5626        #[doc = r" parameters can be chained."]
5627        #[doc = r""]
5628        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5629        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
5630        #[doc = r" executes the request and returns a `Result` with the parsed"]
5631        #[doc = r" response."]
5632        #[doc = r""]
5633        #[doc = r" In order to execute the request without polling the service"]
5634        #[doc = r" until the operation completes, use `.send().await` instead."]
5635        #[doc = r""]
5636        #[doc = r" If you need lower-level access to the raw response details"]
5637        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5638        #[doc = r" can finalize the request using the"]
5639        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5640        #[doc = r" that resolves to a lower-level [`Response`] value."]
5641        pub struct RequestBuilder {
5642            pub(crate) client: super::super::Client,
5643            pub(crate) resource_group_name: String,
5644            pub(crate) automation_account_name: String,
5645            pub(crate) count_type: String,
5646            pub(crate) subscription_id: String,
5647        }
5648        impl RequestBuilder {
5649            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5650            #[doc = ""]
5651            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5652            #[doc = "However, this function can provide more flexibility when required."]
5653            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5654                Box::pin({
5655                    let this = self.clone();
5656                    async move {
5657                        let url = this.url()?;
5658                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5659                        let bearer_token = this.client.bearer_token().await?;
5660                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
5661                        let req_body = azure_core::EMPTY_BODY;
5662                        req.set_body(req_body);
5663                        Ok(Response(this.client.send(&mut req).await?))
5664                    }
5665                })
5666            }
5667            fn url(&self) -> azure_core::Result<azure_core::Url> {
5668                let mut url = self.client.endpoint().clone();
5669                url.set_path(&format!(
5670                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/nodecounts/{}",
5671                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.count_type
5672                ));
5673                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5674                if !has_api_version_already {
5675                    url.query_pairs_mut()
5676                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5677                }
5678                Ok(url)
5679            }
5680        }
5681        impl std::future::IntoFuture for RequestBuilder {
5682            type Output = azure_core::Result<models::NodeCounts>;
5683            type IntoFuture = BoxFuture<'static, azure_core::Result<models::NodeCounts>>;
5684            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5685            #[doc = ""]
5686            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5687            #[doc = ""]
5688            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5689            fn into_future(self) -> Self::IntoFuture {
5690                Box::pin(async move { self.send().await?.into_body().await })
5691            }
5692        }
5693    }
5694}
5695pub mod software_update_configuration_runs {
5696    use super::models;
5697    #[cfg(not(target_arch = "wasm32"))]
5698    use futures::future::BoxFuture;
5699    #[cfg(target_arch = "wasm32")]
5700    use futures::future::LocalBoxFuture as BoxFuture;
5701    pub struct Client(pub(crate) super::Client);
5702    impl Client {
5703        #[doc = "Get a single software update configuration Run by Id."]
5704        #[doc = ""]
5705        #[doc = "Arguments:"]
5706        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
5707        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
5708        #[doc = "* `automation_account_name`: The name of the automation account."]
5709        #[doc = "* `software_update_configuration_run_id`: The Id of the software update configuration run."]
5710        pub fn get_by_id(
5711            &self,
5712            subscription_id: impl Into<String>,
5713            resource_group_name: impl Into<String>,
5714            automation_account_name: impl Into<String>,
5715            software_update_configuration_run_id: impl Into<String>,
5716        ) -> get_by_id::RequestBuilder {
5717            get_by_id::RequestBuilder {
5718                client: self.0.clone(),
5719                subscription_id: subscription_id.into(),
5720                resource_group_name: resource_group_name.into(),
5721                automation_account_name: automation_account_name.into(),
5722                software_update_configuration_run_id: software_update_configuration_run_id.into(),
5723                client_request_id: None,
5724            }
5725        }
5726        #[doc = "Return list of software update configuration runs"]
5727        #[doc = ""]
5728        #[doc = "Arguments:"]
5729        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
5730        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
5731        #[doc = "* `automation_account_name`: The name of the automation account."]
5732        pub fn list(
5733            &self,
5734            subscription_id: impl Into<String>,
5735            resource_group_name: impl Into<String>,
5736            automation_account_name: impl Into<String>,
5737        ) -> list::RequestBuilder {
5738            list::RequestBuilder {
5739                client: self.0.clone(),
5740                subscription_id: subscription_id.into(),
5741                resource_group_name: resource_group_name.into(),
5742                automation_account_name: automation_account_name.into(),
5743                client_request_id: None,
5744                filter: None,
5745                skip: None,
5746                top: None,
5747            }
5748        }
5749    }
5750    pub mod get_by_id {
5751        use super::models;
5752        #[cfg(not(target_arch = "wasm32"))]
5753        use futures::future::BoxFuture;
5754        #[cfg(target_arch = "wasm32")]
5755        use futures::future::LocalBoxFuture as BoxFuture;
5756        #[derive(Debug)]
5757        pub struct Response(azure_core::Response);
5758        impl Response {
5759            pub async fn into_body(self) -> azure_core::Result<models::SoftwareUpdateConfigurationRun> {
5760                let bytes = self.0.into_body().collect().await?;
5761                let body: models::SoftwareUpdateConfigurationRun = serde_json::from_slice(&bytes)?;
5762                Ok(body)
5763            }
5764            pub fn into_raw_response(self) -> azure_core::Response {
5765                self.0
5766            }
5767            pub fn as_raw_response(&self) -> &azure_core::Response {
5768                &self.0
5769            }
5770        }
5771        impl From<Response> for azure_core::Response {
5772            fn from(rsp: Response) -> Self {
5773                rsp.into_raw_response()
5774            }
5775        }
5776        impl AsRef<azure_core::Response> for Response {
5777            fn as_ref(&self) -> &azure_core::Response {
5778                self.as_raw_response()
5779            }
5780        }
5781        #[derive(Clone)]
5782        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5783        #[doc = r""]
5784        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5785        #[doc = r" parameters can be chained."]
5786        #[doc = r""]
5787        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5788        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
5789        #[doc = r" executes the request and returns a `Result` with the parsed"]
5790        #[doc = r" response."]
5791        #[doc = r""]
5792        #[doc = r" In order to execute the request without polling the service"]
5793        #[doc = r" until the operation completes, use `.send().await` instead."]
5794        #[doc = r""]
5795        #[doc = r" If you need lower-level access to the raw response details"]
5796        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5797        #[doc = r" can finalize the request using the"]
5798        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5799        #[doc = r" that resolves to a lower-level [`Response`] value."]
5800        pub struct RequestBuilder {
5801            pub(crate) client: super::super::Client,
5802            pub(crate) subscription_id: String,
5803            pub(crate) resource_group_name: String,
5804            pub(crate) automation_account_name: String,
5805            pub(crate) software_update_configuration_run_id: String,
5806            pub(crate) client_request_id: Option<String>,
5807        }
5808        impl RequestBuilder {
5809            #[doc = "Identifies this specific client request."]
5810            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
5811                self.client_request_id = Some(client_request_id.into());
5812                self
5813            }
5814            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5815            #[doc = ""]
5816            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5817            #[doc = "However, this function can provide more flexibility when required."]
5818            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5819                Box::pin({
5820                    let this = self.clone();
5821                    async move {
5822                        let url = this.url()?;
5823                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5824                        let bearer_token = this.client.bearer_token().await?;
5825                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
5826                        if let Some(client_request_id) = &this.client_request_id {
5827                            req.insert_header("clientrequestid", client_request_id);
5828                        }
5829                        let req_body = azure_core::EMPTY_BODY;
5830                        req.set_body(req_body);
5831                        Ok(Response(this.client.send(&mut req).await?))
5832                    }
5833                })
5834            }
5835            fn url(&self) -> azure_core::Result<azure_core::Url> {
5836                let mut url = self.client.endpoint().clone();
5837                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/softwareUpdateConfigurationRuns/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . software_update_configuration_run_id)) ;
5838                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5839                if !has_api_version_already {
5840                    url.query_pairs_mut()
5841                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5842                }
5843                Ok(url)
5844            }
5845        }
5846        impl std::future::IntoFuture for RequestBuilder {
5847            type Output = azure_core::Result<models::SoftwareUpdateConfigurationRun>;
5848            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SoftwareUpdateConfigurationRun>>;
5849            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5850            #[doc = ""]
5851            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5852            #[doc = ""]
5853            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5854            fn into_future(self) -> Self::IntoFuture {
5855                Box::pin(async move { self.send().await?.into_body().await })
5856            }
5857        }
5858    }
5859    pub mod list {
5860        use super::models;
5861        #[cfg(not(target_arch = "wasm32"))]
5862        use futures::future::BoxFuture;
5863        #[cfg(target_arch = "wasm32")]
5864        use futures::future::LocalBoxFuture as BoxFuture;
5865        #[derive(Debug)]
5866        pub struct Response(azure_core::Response);
5867        impl Response {
5868            pub async fn into_body(self) -> azure_core::Result<models::SoftwareUpdateConfigurationRunListResult> {
5869                let bytes = self.0.into_body().collect().await?;
5870                let body: models::SoftwareUpdateConfigurationRunListResult = serde_json::from_slice(&bytes)?;
5871                Ok(body)
5872            }
5873            pub fn into_raw_response(self) -> azure_core::Response {
5874                self.0
5875            }
5876            pub fn as_raw_response(&self) -> &azure_core::Response {
5877                &self.0
5878            }
5879        }
5880        impl From<Response> for azure_core::Response {
5881            fn from(rsp: Response) -> Self {
5882                rsp.into_raw_response()
5883            }
5884        }
5885        impl AsRef<azure_core::Response> for Response {
5886            fn as_ref(&self) -> &azure_core::Response {
5887                self.as_raw_response()
5888            }
5889        }
5890        #[derive(Clone)]
5891        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5892        #[doc = r""]
5893        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5894        #[doc = r" parameters can be chained."]
5895        #[doc = r""]
5896        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5897        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
5898        #[doc = r" executes the request and returns a `Result` with the parsed"]
5899        #[doc = r" response."]
5900        #[doc = r""]
5901        #[doc = r" In order to execute the request without polling the service"]
5902        #[doc = r" until the operation completes, use `.send().await` instead."]
5903        #[doc = r""]
5904        #[doc = r" If you need lower-level access to the raw response details"]
5905        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5906        #[doc = r" can finalize the request using the"]
5907        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5908        #[doc = r" that resolves to a lower-level [`Response`] value."]
5909        pub struct RequestBuilder {
5910            pub(crate) client: super::super::Client,
5911            pub(crate) subscription_id: String,
5912            pub(crate) resource_group_name: String,
5913            pub(crate) automation_account_name: String,
5914            pub(crate) client_request_id: Option<String>,
5915            pub(crate) filter: Option<String>,
5916            pub(crate) skip: Option<String>,
5917            pub(crate) top: Option<String>,
5918        }
5919        impl RequestBuilder {
5920            #[doc = "Identifies this specific client request."]
5921            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
5922                self.client_request_id = Some(client_request_id.into());
5923                self
5924            }
5925            #[doc = "The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'"]
5926            pub fn filter(mut self, filter: impl Into<String>) -> Self {
5927                self.filter = Some(filter.into());
5928                self
5929            }
5930            #[doc = "Number of entries you skip before returning results"]
5931            pub fn skip(mut self, skip: impl Into<String>) -> Self {
5932                self.skip = Some(skip.into());
5933                self
5934            }
5935            #[doc = "Maximum number of entries returned in the results collection"]
5936            pub fn top(mut self, top: impl Into<String>) -> Self {
5937                self.top = Some(top.into());
5938                self
5939            }
5940            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5941            #[doc = ""]
5942            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5943            #[doc = "However, this function can provide more flexibility when required."]
5944            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5945                Box::pin({
5946                    let this = self.clone();
5947                    async move {
5948                        let url = this.url()?;
5949                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5950                        let bearer_token = this.client.bearer_token().await?;
5951                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
5952                        if let Some(client_request_id) = &this.client_request_id {
5953                            req.insert_header("clientrequestid", client_request_id);
5954                        }
5955                        if let Some(filter) = &this.filter {
5956                            req.url_mut().query_pairs_mut().append_pair("$filter", filter);
5957                        }
5958                        if let Some(skip) = &this.skip {
5959                            req.url_mut().query_pairs_mut().append_pair("$skip", skip);
5960                        }
5961                        if let Some(top) = &this.top {
5962                            req.url_mut().query_pairs_mut().append_pair("$top", top);
5963                        }
5964                        let req_body = azure_core::EMPTY_BODY;
5965                        req.set_body(req_body);
5966                        Ok(Response(this.client.send(&mut req).await?))
5967                    }
5968                })
5969            }
5970            fn url(&self) -> azure_core::Result<azure_core::Url> {
5971                let mut url = self.client.endpoint().clone();
5972                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/softwareUpdateConfigurationRuns" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name)) ;
5973                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
5974                if !has_api_version_already {
5975                    url.query_pairs_mut()
5976                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
5977                }
5978                Ok(url)
5979            }
5980        }
5981        impl std::future::IntoFuture for RequestBuilder {
5982            type Output = azure_core::Result<models::SoftwareUpdateConfigurationRunListResult>;
5983            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SoftwareUpdateConfigurationRunListResult>>;
5984            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5985            #[doc = ""]
5986            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5987            #[doc = ""]
5988            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5989            fn into_future(self) -> Self::IntoFuture {
5990                Box::pin(async move { self.send().await?.into_body().await })
5991            }
5992        }
5993    }
5994}
5995pub mod software_update_configuration_machine_runs {
5996    use super::models;
5997    #[cfg(not(target_arch = "wasm32"))]
5998    use futures::future::BoxFuture;
5999    #[cfg(target_arch = "wasm32")]
6000    use futures::future::LocalBoxFuture as BoxFuture;
6001    pub struct Client(pub(crate) super::Client);
6002    impl Client {
6003        #[doc = "Get a single software update configuration machine run by Id."]
6004        #[doc = ""]
6005        #[doc = "Arguments:"]
6006        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6007        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6008        #[doc = "* `automation_account_name`: The name of the automation account."]
6009        #[doc = "* `software_update_configuration_machine_run_id`: The Id of the software update configuration machine run."]
6010        pub fn get_by_id(
6011            &self,
6012            subscription_id: impl Into<String>,
6013            resource_group_name: impl Into<String>,
6014            automation_account_name: impl Into<String>,
6015            software_update_configuration_machine_run_id: impl Into<String>,
6016        ) -> get_by_id::RequestBuilder {
6017            get_by_id::RequestBuilder {
6018                client: self.0.clone(),
6019                subscription_id: subscription_id.into(),
6020                resource_group_name: resource_group_name.into(),
6021                automation_account_name: automation_account_name.into(),
6022                software_update_configuration_machine_run_id: software_update_configuration_machine_run_id.into(),
6023                client_request_id: None,
6024            }
6025        }
6026        #[doc = "Return list of software update configuration machine runs"]
6027        #[doc = ""]
6028        #[doc = "Arguments:"]
6029        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6030        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6031        #[doc = "* `automation_account_name`: The name of the automation account."]
6032        pub fn list(
6033            &self,
6034            subscription_id: impl Into<String>,
6035            resource_group_name: impl Into<String>,
6036            automation_account_name: impl Into<String>,
6037        ) -> list::RequestBuilder {
6038            list::RequestBuilder {
6039                client: self.0.clone(),
6040                subscription_id: subscription_id.into(),
6041                resource_group_name: resource_group_name.into(),
6042                automation_account_name: automation_account_name.into(),
6043                client_request_id: None,
6044                filter: None,
6045                skip: None,
6046                top: None,
6047            }
6048        }
6049    }
6050    pub mod get_by_id {
6051        use super::models;
6052        #[cfg(not(target_arch = "wasm32"))]
6053        use futures::future::BoxFuture;
6054        #[cfg(target_arch = "wasm32")]
6055        use futures::future::LocalBoxFuture as BoxFuture;
6056        #[derive(Debug)]
6057        pub struct Response(azure_core::Response);
6058        impl Response {
6059            pub async fn into_body(self) -> azure_core::Result<models::SoftwareUpdateConfigurationMachineRun> {
6060                let bytes = self.0.into_body().collect().await?;
6061                let body: models::SoftwareUpdateConfigurationMachineRun = serde_json::from_slice(&bytes)?;
6062                Ok(body)
6063            }
6064            pub fn into_raw_response(self) -> azure_core::Response {
6065                self.0
6066            }
6067            pub fn as_raw_response(&self) -> &azure_core::Response {
6068                &self.0
6069            }
6070        }
6071        impl From<Response> for azure_core::Response {
6072            fn from(rsp: Response) -> Self {
6073                rsp.into_raw_response()
6074            }
6075        }
6076        impl AsRef<azure_core::Response> for Response {
6077            fn as_ref(&self) -> &azure_core::Response {
6078                self.as_raw_response()
6079            }
6080        }
6081        #[derive(Clone)]
6082        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6083        #[doc = r""]
6084        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6085        #[doc = r" parameters can be chained."]
6086        #[doc = r""]
6087        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6088        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
6089        #[doc = r" executes the request and returns a `Result` with the parsed"]
6090        #[doc = r" response."]
6091        #[doc = r""]
6092        #[doc = r" In order to execute the request without polling the service"]
6093        #[doc = r" until the operation completes, use `.send().await` instead."]
6094        #[doc = r""]
6095        #[doc = r" If you need lower-level access to the raw response details"]
6096        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6097        #[doc = r" can finalize the request using the"]
6098        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6099        #[doc = r" that resolves to a lower-level [`Response`] value."]
6100        pub struct RequestBuilder {
6101            pub(crate) client: super::super::Client,
6102            pub(crate) subscription_id: String,
6103            pub(crate) resource_group_name: String,
6104            pub(crate) automation_account_name: String,
6105            pub(crate) software_update_configuration_machine_run_id: String,
6106            pub(crate) client_request_id: Option<String>,
6107        }
6108        impl RequestBuilder {
6109            #[doc = "Identifies this specific client request."]
6110            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
6111                self.client_request_id = Some(client_request_id.into());
6112                self
6113            }
6114            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6115            #[doc = ""]
6116            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6117            #[doc = "However, this function can provide more flexibility when required."]
6118            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6119                Box::pin({
6120                    let this = self.clone();
6121                    async move {
6122                        let url = this.url()?;
6123                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
6124                        let bearer_token = this.client.bearer_token().await?;
6125                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
6126                        if let Some(client_request_id) = &this.client_request_id {
6127                            req.insert_header("clientrequestid", client_request_id);
6128                        }
6129                        let req_body = azure_core::EMPTY_BODY;
6130                        req.set_body(req_body);
6131                        Ok(Response(this.client.send(&mut req).await?))
6132                    }
6133                })
6134            }
6135            fn url(&self) -> azure_core::Result<azure_core::Url> {
6136                let mut url = self.client.endpoint().clone();
6137                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/softwareUpdateConfigurationMachineRuns/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . software_update_configuration_machine_run_id)) ;
6138                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
6139                if !has_api_version_already {
6140                    url.query_pairs_mut()
6141                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
6142                }
6143                Ok(url)
6144            }
6145        }
6146        impl std::future::IntoFuture for RequestBuilder {
6147            type Output = azure_core::Result<models::SoftwareUpdateConfigurationMachineRun>;
6148            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SoftwareUpdateConfigurationMachineRun>>;
6149            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6150            #[doc = ""]
6151            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6152            #[doc = ""]
6153            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6154            fn into_future(self) -> Self::IntoFuture {
6155                Box::pin(async move { self.send().await?.into_body().await })
6156            }
6157        }
6158    }
6159    pub mod list {
6160        use super::models;
6161        #[cfg(not(target_arch = "wasm32"))]
6162        use futures::future::BoxFuture;
6163        #[cfg(target_arch = "wasm32")]
6164        use futures::future::LocalBoxFuture as BoxFuture;
6165        #[derive(Debug)]
6166        pub struct Response(azure_core::Response);
6167        impl Response {
6168            pub async fn into_body(self) -> azure_core::Result<models::SoftwareUpdateConfigurationMachineRunListResult> {
6169                let bytes = self.0.into_body().collect().await?;
6170                let body: models::SoftwareUpdateConfigurationMachineRunListResult = serde_json::from_slice(&bytes)?;
6171                Ok(body)
6172            }
6173            pub fn into_raw_response(self) -> azure_core::Response {
6174                self.0
6175            }
6176            pub fn as_raw_response(&self) -> &azure_core::Response {
6177                &self.0
6178            }
6179        }
6180        impl From<Response> for azure_core::Response {
6181            fn from(rsp: Response) -> Self {
6182                rsp.into_raw_response()
6183            }
6184        }
6185        impl AsRef<azure_core::Response> for Response {
6186            fn as_ref(&self) -> &azure_core::Response {
6187                self.as_raw_response()
6188            }
6189        }
6190        #[derive(Clone)]
6191        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6192        #[doc = r""]
6193        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6194        #[doc = r" parameters can be chained."]
6195        #[doc = r""]
6196        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6197        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
6198        #[doc = r" executes the request and returns a `Result` with the parsed"]
6199        #[doc = r" response."]
6200        #[doc = r""]
6201        #[doc = r" In order to execute the request without polling the service"]
6202        #[doc = r" until the operation completes, use `.send().await` instead."]
6203        #[doc = r""]
6204        #[doc = r" If you need lower-level access to the raw response details"]
6205        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6206        #[doc = r" can finalize the request using the"]
6207        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6208        #[doc = r" that resolves to a lower-level [`Response`] value."]
6209        pub struct RequestBuilder {
6210            pub(crate) client: super::super::Client,
6211            pub(crate) subscription_id: String,
6212            pub(crate) resource_group_name: String,
6213            pub(crate) automation_account_name: String,
6214            pub(crate) client_request_id: Option<String>,
6215            pub(crate) filter: Option<String>,
6216            pub(crate) skip: Option<String>,
6217            pub(crate) top: Option<String>,
6218        }
6219        impl RequestBuilder {
6220            #[doc = "Identifies this specific client request."]
6221            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
6222                self.client_request_id = Some(client_request_id.into());
6223                self
6224            }
6225            #[doc = "The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'"]
6226            pub fn filter(mut self, filter: impl Into<String>) -> Self {
6227                self.filter = Some(filter.into());
6228                self
6229            }
6230            #[doc = "number of entries you skip before returning results"]
6231            pub fn skip(mut self, skip: impl Into<String>) -> Self {
6232                self.skip = Some(skip.into());
6233                self
6234            }
6235            #[doc = "Maximum number of entries returned in the results collection"]
6236            pub fn top(mut self, top: impl Into<String>) -> Self {
6237                self.top = Some(top.into());
6238                self
6239            }
6240            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6241            #[doc = ""]
6242            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6243            #[doc = "However, this function can provide more flexibility when required."]
6244            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6245                Box::pin({
6246                    let this = self.clone();
6247                    async move {
6248                        let url = this.url()?;
6249                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
6250                        let bearer_token = this.client.bearer_token().await?;
6251                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
6252                        if let Some(client_request_id) = &this.client_request_id {
6253                            req.insert_header("clientrequestid", client_request_id);
6254                        }
6255                        if let Some(filter) = &this.filter {
6256                            req.url_mut().query_pairs_mut().append_pair("$filter", filter);
6257                        }
6258                        if let Some(skip) = &this.skip {
6259                            req.url_mut().query_pairs_mut().append_pair("$skip", skip);
6260                        }
6261                        if let Some(top) = &this.top {
6262                            req.url_mut().query_pairs_mut().append_pair("$top", top);
6263                        }
6264                        let req_body = azure_core::EMPTY_BODY;
6265                        req.set_body(req_body);
6266                        Ok(Response(this.client.send(&mut req).await?))
6267                    }
6268                })
6269            }
6270            fn url(&self) -> azure_core::Result<azure_core::Url> {
6271                let mut url = self.client.endpoint().clone();
6272                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/softwareUpdateConfigurationMachineRuns" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name)) ;
6273                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
6274                if !has_api_version_already {
6275                    url.query_pairs_mut()
6276                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
6277                }
6278                Ok(url)
6279            }
6280        }
6281        impl std::future::IntoFuture for RequestBuilder {
6282            type Output = azure_core::Result<models::SoftwareUpdateConfigurationMachineRunListResult>;
6283            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SoftwareUpdateConfigurationMachineRunListResult>>;
6284            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6285            #[doc = ""]
6286            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6287            #[doc = ""]
6288            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6289            fn into_future(self) -> Self::IntoFuture {
6290                Box::pin(async move { self.send().await?.into_body().await })
6291            }
6292        }
6293    }
6294}
6295pub mod source_control {
6296    use super::models;
6297    #[cfg(not(target_arch = "wasm32"))]
6298    use futures::future::BoxFuture;
6299    #[cfg(target_arch = "wasm32")]
6300    use futures::future::LocalBoxFuture as BoxFuture;
6301    pub struct Client(pub(crate) super::Client);
6302    impl Client {
6303        #[doc = "Retrieve the source control identified by source control name."]
6304        #[doc = ""]
6305        #[doc = "Arguments:"]
6306        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6307        #[doc = "* `automation_account_name`: The name of the automation account."]
6308        #[doc = "* `source_control_name`: The name of source control."]
6309        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6310        pub fn get(
6311            &self,
6312            resource_group_name: impl Into<String>,
6313            automation_account_name: impl Into<String>,
6314            source_control_name: impl Into<String>,
6315            subscription_id: impl Into<String>,
6316        ) -> get::RequestBuilder {
6317            get::RequestBuilder {
6318                client: self.0.clone(),
6319                resource_group_name: resource_group_name.into(),
6320                automation_account_name: automation_account_name.into(),
6321                source_control_name: source_control_name.into(),
6322                subscription_id: subscription_id.into(),
6323            }
6324        }
6325        #[doc = "Create a source control."]
6326        #[doc = ""]
6327        #[doc = "Arguments:"]
6328        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6329        #[doc = "* `automation_account_name`: The name of the automation account."]
6330        #[doc = "* `source_control_name`: The source control name."]
6331        #[doc = "* `parameters`: The parameters supplied to the create or update source control operation."]
6332        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6333        pub fn create_or_update(
6334            &self,
6335            resource_group_name: impl Into<String>,
6336            automation_account_name: impl Into<String>,
6337            source_control_name: impl Into<String>,
6338            parameters: impl Into<models::SourceControlCreateOrUpdateParameters>,
6339            subscription_id: impl Into<String>,
6340        ) -> create_or_update::RequestBuilder {
6341            create_or_update::RequestBuilder {
6342                client: self.0.clone(),
6343                resource_group_name: resource_group_name.into(),
6344                automation_account_name: automation_account_name.into(),
6345                source_control_name: source_control_name.into(),
6346                parameters: parameters.into(),
6347                subscription_id: subscription_id.into(),
6348            }
6349        }
6350        #[doc = "Update a source control."]
6351        #[doc = ""]
6352        #[doc = "Arguments:"]
6353        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6354        #[doc = "* `automation_account_name`: The name of the automation account."]
6355        #[doc = "* `source_control_name`: The source control name."]
6356        #[doc = "* `parameters`: The parameters supplied to the update source control operation."]
6357        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6358        pub fn update(
6359            &self,
6360            resource_group_name: impl Into<String>,
6361            automation_account_name: impl Into<String>,
6362            source_control_name: impl Into<String>,
6363            parameters: impl Into<models::SourceControlUpdateParameters>,
6364            subscription_id: impl Into<String>,
6365        ) -> update::RequestBuilder {
6366            update::RequestBuilder {
6367                client: self.0.clone(),
6368                resource_group_name: resource_group_name.into(),
6369                automation_account_name: automation_account_name.into(),
6370                source_control_name: source_control_name.into(),
6371                parameters: parameters.into(),
6372                subscription_id: subscription_id.into(),
6373            }
6374        }
6375        #[doc = "Delete the source control."]
6376        #[doc = ""]
6377        #[doc = "Arguments:"]
6378        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6379        #[doc = "* `automation_account_name`: The name of the automation account."]
6380        #[doc = "* `source_control_name`: The name of source control."]
6381        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6382        pub fn delete(
6383            &self,
6384            resource_group_name: impl Into<String>,
6385            automation_account_name: impl Into<String>,
6386            source_control_name: impl Into<String>,
6387            subscription_id: impl Into<String>,
6388        ) -> delete::RequestBuilder {
6389            delete::RequestBuilder {
6390                client: self.0.clone(),
6391                resource_group_name: resource_group_name.into(),
6392                automation_account_name: automation_account_name.into(),
6393                source_control_name: source_control_name.into(),
6394                subscription_id: subscription_id.into(),
6395            }
6396        }
6397        #[doc = "Retrieve a list of source controls."]
6398        #[doc = ""]
6399        #[doc = "Arguments:"]
6400        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6401        #[doc = "* `automation_account_name`: The name of the automation account."]
6402        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6403        pub fn list_by_automation_account(
6404            &self,
6405            resource_group_name: impl Into<String>,
6406            automation_account_name: impl Into<String>,
6407            subscription_id: impl Into<String>,
6408        ) -> list_by_automation_account::RequestBuilder {
6409            list_by_automation_account::RequestBuilder {
6410                client: self.0.clone(),
6411                resource_group_name: resource_group_name.into(),
6412                automation_account_name: automation_account_name.into(),
6413                subscription_id: subscription_id.into(),
6414                filter: None,
6415            }
6416        }
6417    }
6418    pub mod get {
6419        use super::models;
6420        #[cfg(not(target_arch = "wasm32"))]
6421        use futures::future::BoxFuture;
6422        #[cfg(target_arch = "wasm32")]
6423        use futures::future::LocalBoxFuture as BoxFuture;
6424        #[derive(Debug)]
6425        pub struct Response(azure_core::Response);
6426        impl Response {
6427            pub async fn into_body(self) -> azure_core::Result<models::SourceControl> {
6428                let bytes = self.0.into_body().collect().await?;
6429                let body: models::SourceControl = serde_json::from_slice(&bytes)?;
6430                Ok(body)
6431            }
6432            pub fn into_raw_response(self) -> azure_core::Response {
6433                self.0
6434            }
6435            pub fn as_raw_response(&self) -> &azure_core::Response {
6436                &self.0
6437            }
6438        }
6439        impl From<Response> for azure_core::Response {
6440            fn from(rsp: Response) -> Self {
6441                rsp.into_raw_response()
6442            }
6443        }
6444        impl AsRef<azure_core::Response> for Response {
6445            fn as_ref(&self) -> &azure_core::Response {
6446                self.as_raw_response()
6447            }
6448        }
6449        #[derive(Clone)]
6450        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6451        #[doc = r""]
6452        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6453        #[doc = r" parameters can be chained."]
6454        #[doc = r""]
6455        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6456        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
6457        #[doc = r" executes the request and returns a `Result` with the parsed"]
6458        #[doc = r" response."]
6459        #[doc = r""]
6460        #[doc = r" In order to execute the request without polling the service"]
6461        #[doc = r" until the operation completes, use `.send().await` instead."]
6462        #[doc = r""]
6463        #[doc = r" If you need lower-level access to the raw response details"]
6464        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6465        #[doc = r" can finalize the request using the"]
6466        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6467        #[doc = r" that resolves to a lower-level [`Response`] value."]
6468        pub struct RequestBuilder {
6469            pub(crate) client: super::super::Client,
6470            pub(crate) resource_group_name: String,
6471            pub(crate) automation_account_name: String,
6472            pub(crate) source_control_name: String,
6473            pub(crate) subscription_id: String,
6474        }
6475        impl RequestBuilder {
6476            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6477            #[doc = ""]
6478            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6479            #[doc = "However, this function can provide more flexibility when required."]
6480            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6481                Box::pin({
6482                    let this = self.clone();
6483                    async move {
6484                        let url = this.url()?;
6485                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
6486                        let bearer_token = this.client.bearer_token().await?;
6487                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
6488                        let req_body = azure_core::EMPTY_BODY;
6489                        req.set_body(req_body);
6490                        Ok(Response(this.client.send(&mut req).await?))
6491                    }
6492                })
6493            }
6494            fn url(&self) -> azure_core::Result<azure_core::Url> {
6495                let mut url = self.client.endpoint().clone();
6496                url.set_path(&format!(
6497                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}",
6498                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.source_control_name
6499                ));
6500                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
6501                if !has_api_version_already {
6502                    url.query_pairs_mut()
6503                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
6504                }
6505                Ok(url)
6506            }
6507        }
6508        impl std::future::IntoFuture for RequestBuilder {
6509            type Output = azure_core::Result<models::SourceControl>;
6510            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SourceControl>>;
6511            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6512            #[doc = ""]
6513            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6514            #[doc = ""]
6515            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6516            fn into_future(self) -> Self::IntoFuture {
6517                Box::pin(async move { self.send().await?.into_body().await })
6518            }
6519        }
6520    }
6521    pub mod create_or_update {
6522        use super::models;
6523        #[cfg(not(target_arch = "wasm32"))]
6524        use futures::future::BoxFuture;
6525        #[cfg(target_arch = "wasm32")]
6526        use futures::future::LocalBoxFuture as BoxFuture;
6527        #[derive(Debug)]
6528        pub struct Response(azure_core::Response);
6529        impl Response {
6530            pub async fn into_body(self) -> azure_core::Result<models::SourceControl> {
6531                let bytes = self.0.into_body().collect().await?;
6532                let body: models::SourceControl = serde_json::from_slice(&bytes)?;
6533                Ok(body)
6534            }
6535            pub fn into_raw_response(self) -> azure_core::Response {
6536                self.0
6537            }
6538            pub fn as_raw_response(&self) -> &azure_core::Response {
6539                &self.0
6540            }
6541        }
6542        impl From<Response> for azure_core::Response {
6543            fn from(rsp: Response) -> Self {
6544                rsp.into_raw_response()
6545            }
6546        }
6547        impl AsRef<azure_core::Response> for Response {
6548            fn as_ref(&self) -> &azure_core::Response {
6549                self.as_raw_response()
6550            }
6551        }
6552        #[derive(Clone)]
6553        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6554        #[doc = r""]
6555        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6556        #[doc = r" parameters can be chained."]
6557        #[doc = r""]
6558        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6559        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
6560        #[doc = r" executes the request and returns a `Result` with the parsed"]
6561        #[doc = r" response."]
6562        #[doc = r""]
6563        #[doc = r" In order to execute the request without polling the service"]
6564        #[doc = r" until the operation completes, use `.send().await` instead."]
6565        #[doc = r""]
6566        #[doc = r" If you need lower-level access to the raw response details"]
6567        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6568        #[doc = r" can finalize the request using the"]
6569        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6570        #[doc = r" that resolves to a lower-level [`Response`] value."]
6571        pub struct RequestBuilder {
6572            pub(crate) client: super::super::Client,
6573            pub(crate) resource_group_name: String,
6574            pub(crate) automation_account_name: String,
6575            pub(crate) source_control_name: String,
6576            pub(crate) parameters: models::SourceControlCreateOrUpdateParameters,
6577            pub(crate) subscription_id: String,
6578        }
6579        impl RequestBuilder {
6580            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6581            #[doc = ""]
6582            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6583            #[doc = "However, this function can provide more flexibility when required."]
6584            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6585                Box::pin({
6586                    let this = self.clone();
6587                    async move {
6588                        let url = this.url()?;
6589                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
6590                        let bearer_token = this.client.bearer_token().await?;
6591                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
6592                        req.insert_header("content-type", "application/json");
6593                        let req_body = azure_core::to_json(&this.parameters)?;
6594                        req.set_body(req_body);
6595                        Ok(Response(this.client.send(&mut req).await?))
6596                    }
6597                })
6598            }
6599            fn url(&self) -> azure_core::Result<azure_core::Url> {
6600                let mut url = self.client.endpoint().clone();
6601                url.set_path(&format!(
6602                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}",
6603                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.source_control_name
6604                ));
6605                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
6606                if !has_api_version_already {
6607                    url.query_pairs_mut()
6608                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
6609                }
6610                Ok(url)
6611            }
6612        }
6613        impl std::future::IntoFuture for RequestBuilder {
6614            type Output = azure_core::Result<models::SourceControl>;
6615            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SourceControl>>;
6616            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6617            #[doc = ""]
6618            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6619            #[doc = ""]
6620            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6621            fn into_future(self) -> Self::IntoFuture {
6622                Box::pin(async move { self.send().await?.into_body().await })
6623            }
6624        }
6625    }
6626    pub mod update {
6627        use super::models;
6628        #[cfg(not(target_arch = "wasm32"))]
6629        use futures::future::BoxFuture;
6630        #[cfg(target_arch = "wasm32")]
6631        use futures::future::LocalBoxFuture as BoxFuture;
6632        #[derive(Debug)]
6633        pub struct Response(azure_core::Response);
6634        impl Response {
6635            pub async fn into_body(self) -> azure_core::Result<models::SourceControl> {
6636                let bytes = self.0.into_body().collect().await?;
6637                let body: models::SourceControl = serde_json::from_slice(&bytes)?;
6638                Ok(body)
6639            }
6640            pub fn into_raw_response(self) -> azure_core::Response {
6641                self.0
6642            }
6643            pub fn as_raw_response(&self) -> &azure_core::Response {
6644                &self.0
6645            }
6646        }
6647        impl From<Response> for azure_core::Response {
6648            fn from(rsp: Response) -> Self {
6649                rsp.into_raw_response()
6650            }
6651        }
6652        impl AsRef<azure_core::Response> for Response {
6653            fn as_ref(&self) -> &azure_core::Response {
6654                self.as_raw_response()
6655            }
6656        }
6657        #[derive(Clone)]
6658        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6659        #[doc = r""]
6660        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6661        #[doc = r" parameters can be chained."]
6662        #[doc = r""]
6663        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6664        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
6665        #[doc = r" executes the request and returns a `Result` with the parsed"]
6666        #[doc = r" response."]
6667        #[doc = r""]
6668        #[doc = r" In order to execute the request without polling the service"]
6669        #[doc = r" until the operation completes, use `.send().await` instead."]
6670        #[doc = r""]
6671        #[doc = r" If you need lower-level access to the raw response details"]
6672        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6673        #[doc = r" can finalize the request using the"]
6674        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6675        #[doc = r" that resolves to a lower-level [`Response`] value."]
6676        pub struct RequestBuilder {
6677            pub(crate) client: super::super::Client,
6678            pub(crate) resource_group_name: String,
6679            pub(crate) automation_account_name: String,
6680            pub(crate) source_control_name: String,
6681            pub(crate) parameters: models::SourceControlUpdateParameters,
6682            pub(crate) subscription_id: String,
6683        }
6684        impl RequestBuilder {
6685            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6686            #[doc = ""]
6687            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6688            #[doc = "However, this function can provide more flexibility when required."]
6689            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6690                Box::pin({
6691                    let this = self.clone();
6692                    async move {
6693                        let url = this.url()?;
6694                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
6695                        let bearer_token = this.client.bearer_token().await?;
6696                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
6697                        req.insert_header("content-type", "application/json");
6698                        let req_body = azure_core::to_json(&this.parameters)?;
6699                        req.set_body(req_body);
6700                        Ok(Response(this.client.send(&mut req).await?))
6701                    }
6702                })
6703            }
6704            fn url(&self) -> azure_core::Result<azure_core::Url> {
6705                let mut url = self.client.endpoint().clone();
6706                url.set_path(&format!(
6707                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}",
6708                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.source_control_name
6709                ));
6710                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
6711                if !has_api_version_already {
6712                    url.query_pairs_mut()
6713                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
6714                }
6715                Ok(url)
6716            }
6717        }
6718        impl std::future::IntoFuture for RequestBuilder {
6719            type Output = azure_core::Result<models::SourceControl>;
6720            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SourceControl>>;
6721            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6722            #[doc = ""]
6723            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6724            #[doc = ""]
6725            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6726            fn into_future(self) -> Self::IntoFuture {
6727                Box::pin(async move { self.send().await?.into_body().await })
6728            }
6729        }
6730    }
6731    pub mod delete {
6732        use super::models;
6733        #[cfg(not(target_arch = "wasm32"))]
6734        use futures::future::BoxFuture;
6735        #[cfg(target_arch = "wasm32")]
6736        use futures::future::LocalBoxFuture as BoxFuture;
6737        #[derive(Debug)]
6738        pub struct Response(azure_core::Response);
6739        impl Response {
6740            pub fn into_raw_response(self) -> azure_core::Response {
6741                self.0
6742            }
6743            pub fn as_raw_response(&self) -> &azure_core::Response {
6744                &self.0
6745            }
6746        }
6747        impl From<Response> for azure_core::Response {
6748            fn from(rsp: Response) -> Self {
6749                rsp.into_raw_response()
6750            }
6751        }
6752        impl AsRef<azure_core::Response> for Response {
6753            fn as_ref(&self) -> &azure_core::Response {
6754                self.as_raw_response()
6755            }
6756        }
6757        #[derive(Clone)]
6758        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6759        #[doc = r""]
6760        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6761        #[doc = r" parameters can be chained."]
6762        #[doc = r""]
6763        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6764        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
6765        #[doc = r" executes the request and returns a `Result` with the parsed"]
6766        #[doc = r" response."]
6767        #[doc = r""]
6768        #[doc = r" In order to execute the request without polling the service"]
6769        #[doc = r" until the operation completes, use `.send().await` instead."]
6770        #[doc = r""]
6771        #[doc = r" If you need lower-level access to the raw response details"]
6772        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6773        #[doc = r" can finalize the request using the"]
6774        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6775        #[doc = r" that resolves to a lower-level [`Response`] value."]
6776        pub struct RequestBuilder {
6777            pub(crate) client: super::super::Client,
6778            pub(crate) resource_group_name: String,
6779            pub(crate) automation_account_name: String,
6780            pub(crate) source_control_name: String,
6781            pub(crate) subscription_id: String,
6782        }
6783        impl RequestBuilder {
6784            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6785            #[doc = ""]
6786            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6787            #[doc = "However, this function can provide more flexibility when required."]
6788            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6789                Box::pin({
6790                    let this = self.clone();
6791                    async move {
6792                        let url = this.url()?;
6793                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
6794                        let bearer_token = this.client.bearer_token().await?;
6795                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
6796                        let req_body = azure_core::EMPTY_BODY;
6797                        req.set_body(req_body);
6798                        Ok(Response(this.client.send(&mut req).await?))
6799                    }
6800                })
6801            }
6802            fn url(&self) -> azure_core::Result<azure_core::Url> {
6803                let mut url = self.client.endpoint().clone();
6804                url.set_path(&format!(
6805                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}",
6806                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.source_control_name
6807                ));
6808                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
6809                if !has_api_version_already {
6810                    url.query_pairs_mut()
6811                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
6812                }
6813                Ok(url)
6814            }
6815        }
6816    }
6817    pub mod list_by_automation_account {
6818        use super::models;
6819        #[cfg(not(target_arch = "wasm32"))]
6820        use futures::future::BoxFuture;
6821        #[cfg(target_arch = "wasm32")]
6822        use futures::future::LocalBoxFuture as BoxFuture;
6823        #[derive(Debug)]
6824        pub struct Response(azure_core::Response);
6825        impl Response {
6826            pub async fn into_body(self) -> azure_core::Result<models::SourceControlListResult> {
6827                let bytes = self.0.into_body().collect().await?;
6828                let body: models::SourceControlListResult = serde_json::from_slice(&bytes)?;
6829                Ok(body)
6830            }
6831            pub fn into_raw_response(self) -> azure_core::Response {
6832                self.0
6833            }
6834            pub fn as_raw_response(&self) -> &azure_core::Response {
6835                &self.0
6836            }
6837        }
6838        impl From<Response> for azure_core::Response {
6839            fn from(rsp: Response) -> Self {
6840                rsp.into_raw_response()
6841            }
6842        }
6843        impl AsRef<azure_core::Response> for Response {
6844            fn as_ref(&self) -> &azure_core::Response {
6845                self.as_raw_response()
6846            }
6847        }
6848        #[derive(Clone)]
6849        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6850        #[doc = r""]
6851        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6852        #[doc = r" parameters can be chained."]
6853        #[doc = r""]
6854        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6855        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
6856        #[doc = r" executes the request and returns a `Result` with the parsed"]
6857        #[doc = r" response."]
6858        #[doc = r""]
6859        #[doc = r" In order to execute the request without polling the service"]
6860        #[doc = r" until the operation completes, use `.send().await` instead."]
6861        #[doc = r""]
6862        #[doc = r" If you need lower-level access to the raw response details"]
6863        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6864        #[doc = r" can finalize the request using the"]
6865        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6866        #[doc = r" that resolves to a lower-level [`Response`] value."]
6867        pub struct RequestBuilder {
6868            pub(crate) client: super::super::Client,
6869            pub(crate) resource_group_name: String,
6870            pub(crate) automation_account_name: String,
6871            pub(crate) subscription_id: String,
6872            pub(crate) filter: Option<String>,
6873        }
6874        impl RequestBuilder {
6875            #[doc = "The filter to apply on the operation."]
6876            pub fn filter(mut self, filter: impl Into<String>) -> Self {
6877                self.filter = Some(filter.into());
6878                self
6879            }
6880            pub fn into_stream(self) -> azure_core::Pageable<models::SourceControlListResult, azure_core::error::Error> {
6881                let make_request = move |continuation: Option<String>| {
6882                    let this = self.clone();
6883                    async move {
6884                        let mut url = this.url()?;
6885                        let rsp = match continuation {
6886                            Some(value) => {
6887                                url.set_path("");
6888                                url = url.join(&value)?;
6889                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
6890                                let bearer_token = this.client.bearer_token().await?;
6891                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
6892                                let has_api_version_already =
6893                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
6894                                if !has_api_version_already {
6895                                    req.url_mut()
6896                                        .query_pairs_mut()
6897                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
6898                                }
6899                                let req_body = azure_core::EMPTY_BODY;
6900                                req.set_body(req_body);
6901                                this.client.send(&mut req).await?
6902                            }
6903                            None => {
6904                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
6905                                let bearer_token = this.client.bearer_token().await?;
6906                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
6907                                if let Some(filter) = &this.filter {
6908                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
6909                                }
6910                                let req_body = azure_core::EMPTY_BODY;
6911                                req.set_body(req_body);
6912                                this.client.send(&mut req).await?
6913                            }
6914                        };
6915                        let rsp = match rsp.status() {
6916                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
6917                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
6918                                status: status_code,
6919                                error_code: None,
6920                            })),
6921                        };
6922                        rsp?.into_body().await
6923                    }
6924                };
6925                azure_core::Pageable::new(make_request)
6926            }
6927            fn url(&self) -> azure_core::Result<azure_core::Url> {
6928                let mut url = self.client.endpoint().clone();
6929                url.set_path(&format!(
6930                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls",
6931                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
6932                ));
6933                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
6934                if !has_api_version_already {
6935                    url.query_pairs_mut()
6936                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
6937                }
6938                Ok(url)
6939            }
6940        }
6941    }
6942}
6943pub mod source_control_sync_job {
6944    use super::models;
6945    #[cfg(not(target_arch = "wasm32"))]
6946    use futures::future::BoxFuture;
6947    #[cfg(target_arch = "wasm32")]
6948    use futures::future::LocalBoxFuture as BoxFuture;
6949    pub struct Client(pub(crate) super::Client);
6950    impl Client {
6951        #[doc = "Retrieve the source control sync job identified by job id."]
6952        #[doc = ""]
6953        #[doc = "Arguments:"]
6954        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6955        #[doc = "* `automation_account_name`: The name of the automation account."]
6956        #[doc = "* `source_control_name`: The source control name."]
6957        #[doc = "* `source_control_sync_job_id`: The source control sync job id."]
6958        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6959        pub fn get(
6960            &self,
6961            resource_group_name: impl Into<String>,
6962            automation_account_name: impl Into<String>,
6963            source_control_name: impl Into<String>,
6964            source_control_sync_job_id: impl Into<String>,
6965            subscription_id: impl Into<String>,
6966        ) -> get::RequestBuilder {
6967            get::RequestBuilder {
6968                client: self.0.clone(),
6969                resource_group_name: resource_group_name.into(),
6970                automation_account_name: automation_account_name.into(),
6971                source_control_name: source_control_name.into(),
6972                source_control_sync_job_id: source_control_sync_job_id.into(),
6973                subscription_id: subscription_id.into(),
6974            }
6975        }
6976        #[doc = "Creates the sync job for a source control."]
6977        #[doc = ""]
6978        #[doc = "Arguments:"]
6979        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
6980        #[doc = "* `automation_account_name`: The name of the automation account."]
6981        #[doc = "* `source_control_name`: The source control name."]
6982        #[doc = "* `source_control_sync_job_id`: The source control sync job id."]
6983        #[doc = "* `parameters`: The parameters supplied to the create source control sync job operation."]
6984        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
6985        pub fn create(
6986            &self,
6987            resource_group_name: impl Into<String>,
6988            automation_account_name: impl Into<String>,
6989            source_control_name: impl Into<String>,
6990            source_control_sync_job_id: impl Into<String>,
6991            parameters: impl Into<models::SourceControlSyncJobCreateParameters>,
6992            subscription_id: impl Into<String>,
6993        ) -> create::RequestBuilder {
6994            create::RequestBuilder {
6995                client: self.0.clone(),
6996                resource_group_name: resource_group_name.into(),
6997                automation_account_name: automation_account_name.into(),
6998                source_control_name: source_control_name.into(),
6999                source_control_sync_job_id: source_control_sync_job_id.into(),
7000                parameters: parameters.into(),
7001                subscription_id: subscription_id.into(),
7002            }
7003        }
7004        #[doc = "Retrieve a list of source control sync jobs."]
7005        #[doc = ""]
7006        #[doc = "Arguments:"]
7007        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7008        #[doc = "* `automation_account_name`: The name of the automation account."]
7009        #[doc = "* `source_control_name`: The source control name."]
7010        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7011        pub fn list_by_automation_account(
7012            &self,
7013            resource_group_name: impl Into<String>,
7014            automation_account_name: impl Into<String>,
7015            source_control_name: impl Into<String>,
7016            subscription_id: impl Into<String>,
7017        ) -> list_by_automation_account::RequestBuilder {
7018            list_by_automation_account::RequestBuilder {
7019                client: self.0.clone(),
7020                resource_group_name: resource_group_name.into(),
7021                automation_account_name: automation_account_name.into(),
7022                source_control_name: source_control_name.into(),
7023                subscription_id: subscription_id.into(),
7024                filter: None,
7025            }
7026        }
7027    }
7028    pub mod get {
7029        use super::models;
7030        #[cfg(not(target_arch = "wasm32"))]
7031        use futures::future::BoxFuture;
7032        #[cfg(target_arch = "wasm32")]
7033        use futures::future::LocalBoxFuture as BoxFuture;
7034        #[derive(Debug)]
7035        pub struct Response(azure_core::Response);
7036        impl Response {
7037            pub async fn into_body(self) -> azure_core::Result<models::SourceControlSyncJobById> {
7038                let bytes = self.0.into_body().collect().await?;
7039                let body: models::SourceControlSyncJobById = serde_json::from_slice(&bytes)?;
7040                Ok(body)
7041            }
7042            pub fn into_raw_response(self) -> azure_core::Response {
7043                self.0
7044            }
7045            pub fn as_raw_response(&self) -> &azure_core::Response {
7046                &self.0
7047            }
7048        }
7049        impl From<Response> for azure_core::Response {
7050            fn from(rsp: Response) -> Self {
7051                rsp.into_raw_response()
7052            }
7053        }
7054        impl AsRef<azure_core::Response> for Response {
7055            fn as_ref(&self) -> &azure_core::Response {
7056                self.as_raw_response()
7057            }
7058        }
7059        #[derive(Clone)]
7060        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7061        #[doc = r""]
7062        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7063        #[doc = r" parameters can be chained."]
7064        #[doc = r""]
7065        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7066        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
7067        #[doc = r" executes the request and returns a `Result` with the parsed"]
7068        #[doc = r" response."]
7069        #[doc = r""]
7070        #[doc = r" In order to execute the request without polling the service"]
7071        #[doc = r" until the operation completes, use `.send().await` instead."]
7072        #[doc = r""]
7073        #[doc = r" If you need lower-level access to the raw response details"]
7074        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7075        #[doc = r" can finalize the request using the"]
7076        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7077        #[doc = r" that resolves to a lower-level [`Response`] value."]
7078        pub struct RequestBuilder {
7079            pub(crate) client: super::super::Client,
7080            pub(crate) resource_group_name: String,
7081            pub(crate) automation_account_name: String,
7082            pub(crate) source_control_name: String,
7083            pub(crate) source_control_sync_job_id: String,
7084            pub(crate) subscription_id: String,
7085        }
7086        impl RequestBuilder {
7087            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7088            #[doc = ""]
7089            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7090            #[doc = "However, this function can provide more flexibility when required."]
7091            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7092                Box::pin({
7093                    let this = self.clone();
7094                    async move {
7095                        let url = this.url()?;
7096                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
7097                        let bearer_token = this.client.bearer_token().await?;
7098                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
7099                        let req_body = azure_core::EMPTY_BODY;
7100                        req.set_body(req_body);
7101                        Ok(Response(this.client.send(&mut req).await?))
7102                    }
7103                })
7104            }
7105            fn url(&self) -> azure_core::Result<azure_core::Url> {
7106                let mut url = self.client.endpoint().clone();
7107                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}/sourceControlSyncJobs/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . source_control_name , & self . source_control_sync_job_id)) ;
7108                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
7109                if !has_api_version_already {
7110                    url.query_pairs_mut()
7111                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
7112                }
7113                Ok(url)
7114            }
7115        }
7116        impl std::future::IntoFuture for RequestBuilder {
7117            type Output = azure_core::Result<models::SourceControlSyncJobById>;
7118            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SourceControlSyncJobById>>;
7119            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7120            #[doc = ""]
7121            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7122            #[doc = ""]
7123            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7124            fn into_future(self) -> Self::IntoFuture {
7125                Box::pin(async move { self.send().await?.into_body().await })
7126            }
7127        }
7128    }
7129    pub mod create {
7130        use super::models;
7131        #[cfg(not(target_arch = "wasm32"))]
7132        use futures::future::BoxFuture;
7133        #[cfg(target_arch = "wasm32")]
7134        use futures::future::LocalBoxFuture as BoxFuture;
7135        #[derive(Debug)]
7136        pub struct Response(azure_core::Response);
7137        impl Response {
7138            pub async fn into_body(self) -> azure_core::Result<models::SourceControlSyncJob> {
7139                let bytes = self.0.into_body().collect().await?;
7140                let body: models::SourceControlSyncJob = serde_json::from_slice(&bytes)?;
7141                Ok(body)
7142            }
7143            pub fn into_raw_response(self) -> azure_core::Response {
7144                self.0
7145            }
7146            pub fn as_raw_response(&self) -> &azure_core::Response {
7147                &self.0
7148            }
7149        }
7150        impl From<Response> for azure_core::Response {
7151            fn from(rsp: Response) -> Self {
7152                rsp.into_raw_response()
7153            }
7154        }
7155        impl AsRef<azure_core::Response> for Response {
7156            fn as_ref(&self) -> &azure_core::Response {
7157                self.as_raw_response()
7158            }
7159        }
7160        #[derive(Clone)]
7161        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7162        #[doc = r""]
7163        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7164        #[doc = r" parameters can be chained."]
7165        #[doc = r""]
7166        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7167        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
7168        #[doc = r" executes the request and returns a `Result` with the parsed"]
7169        #[doc = r" response."]
7170        #[doc = r""]
7171        #[doc = r" In order to execute the request without polling the service"]
7172        #[doc = r" until the operation completes, use `.send().await` instead."]
7173        #[doc = r""]
7174        #[doc = r" If you need lower-level access to the raw response details"]
7175        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7176        #[doc = r" can finalize the request using the"]
7177        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7178        #[doc = r" that resolves to a lower-level [`Response`] value."]
7179        pub struct RequestBuilder {
7180            pub(crate) client: super::super::Client,
7181            pub(crate) resource_group_name: String,
7182            pub(crate) automation_account_name: String,
7183            pub(crate) source_control_name: String,
7184            pub(crate) source_control_sync_job_id: String,
7185            pub(crate) parameters: models::SourceControlSyncJobCreateParameters,
7186            pub(crate) subscription_id: String,
7187        }
7188        impl RequestBuilder {
7189            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7190            #[doc = ""]
7191            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7192            #[doc = "However, this function can provide more flexibility when required."]
7193            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7194                Box::pin({
7195                    let this = self.clone();
7196                    async move {
7197                        let url = this.url()?;
7198                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
7199                        let bearer_token = this.client.bearer_token().await?;
7200                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
7201                        req.insert_header("content-type", "application/json");
7202                        let req_body = azure_core::to_json(&this.parameters)?;
7203                        req.set_body(req_body);
7204                        Ok(Response(this.client.send(&mut req).await?))
7205                    }
7206                })
7207            }
7208            fn url(&self) -> azure_core::Result<azure_core::Url> {
7209                let mut url = self.client.endpoint().clone();
7210                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}/sourceControlSyncJobs/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . source_control_name , & self . source_control_sync_job_id)) ;
7211                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
7212                if !has_api_version_already {
7213                    url.query_pairs_mut()
7214                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
7215                }
7216                Ok(url)
7217            }
7218        }
7219        impl std::future::IntoFuture for RequestBuilder {
7220            type Output = azure_core::Result<models::SourceControlSyncJob>;
7221            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SourceControlSyncJob>>;
7222            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7223            #[doc = ""]
7224            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7225            #[doc = ""]
7226            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7227            fn into_future(self) -> Self::IntoFuture {
7228                Box::pin(async move { self.send().await?.into_body().await })
7229            }
7230        }
7231    }
7232    pub mod list_by_automation_account {
7233        use super::models;
7234        #[cfg(not(target_arch = "wasm32"))]
7235        use futures::future::BoxFuture;
7236        #[cfg(target_arch = "wasm32")]
7237        use futures::future::LocalBoxFuture as BoxFuture;
7238        #[derive(Debug)]
7239        pub struct Response(azure_core::Response);
7240        impl Response {
7241            pub async fn into_body(self) -> azure_core::Result<models::SourceControlSyncJobListResult> {
7242                let bytes = self.0.into_body().collect().await?;
7243                let body: models::SourceControlSyncJobListResult = serde_json::from_slice(&bytes)?;
7244                Ok(body)
7245            }
7246            pub fn into_raw_response(self) -> azure_core::Response {
7247                self.0
7248            }
7249            pub fn as_raw_response(&self) -> &azure_core::Response {
7250                &self.0
7251            }
7252        }
7253        impl From<Response> for azure_core::Response {
7254            fn from(rsp: Response) -> Self {
7255                rsp.into_raw_response()
7256            }
7257        }
7258        impl AsRef<azure_core::Response> for Response {
7259            fn as_ref(&self) -> &azure_core::Response {
7260                self.as_raw_response()
7261            }
7262        }
7263        #[derive(Clone)]
7264        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7265        #[doc = r""]
7266        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7267        #[doc = r" parameters can be chained."]
7268        #[doc = r""]
7269        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7270        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
7271        #[doc = r" executes the request and returns a `Result` with the parsed"]
7272        #[doc = r" response."]
7273        #[doc = r""]
7274        #[doc = r" In order to execute the request without polling the service"]
7275        #[doc = r" until the operation completes, use `.send().await` instead."]
7276        #[doc = r""]
7277        #[doc = r" If you need lower-level access to the raw response details"]
7278        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7279        #[doc = r" can finalize the request using the"]
7280        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7281        #[doc = r" that resolves to a lower-level [`Response`] value."]
7282        pub struct RequestBuilder {
7283            pub(crate) client: super::super::Client,
7284            pub(crate) resource_group_name: String,
7285            pub(crate) automation_account_name: String,
7286            pub(crate) source_control_name: String,
7287            pub(crate) subscription_id: String,
7288            pub(crate) filter: Option<String>,
7289        }
7290        impl RequestBuilder {
7291            #[doc = "The filter to apply on the operation."]
7292            pub fn filter(mut self, filter: impl Into<String>) -> Self {
7293                self.filter = Some(filter.into());
7294                self
7295            }
7296            pub fn into_stream(self) -> azure_core::Pageable<models::SourceControlSyncJobListResult, azure_core::error::Error> {
7297                let make_request = move |continuation: Option<String>| {
7298                    let this = self.clone();
7299                    async move {
7300                        let mut url = this.url()?;
7301                        let rsp = match continuation {
7302                            Some(value) => {
7303                                url.set_path("");
7304                                url = url.join(&value)?;
7305                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
7306                                let bearer_token = this.client.bearer_token().await?;
7307                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
7308                                let has_api_version_already =
7309                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
7310                                if !has_api_version_already {
7311                                    req.url_mut()
7312                                        .query_pairs_mut()
7313                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
7314                                }
7315                                let req_body = azure_core::EMPTY_BODY;
7316                                req.set_body(req_body);
7317                                this.client.send(&mut req).await?
7318                            }
7319                            None => {
7320                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
7321                                let bearer_token = this.client.bearer_token().await?;
7322                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
7323                                if let Some(filter) = &this.filter {
7324                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
7325                                }
7326                                let req_body = azure_core::EMPTY_BODY;
7327                                req.set_body(req_body);
7328                                this.client.send(&mut req).await?
7329                            }
7330                        };
7331                        let rsp = match rsp.status() {
7332                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
7333                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
7334                                status: status_code,
7335                                error_code: None,
7336                            })),
7337                        };
7338                        rsp?.into_body().await
7339                    }
7340                };
7341                azure_core::Pageable::new(make_request)
7342            }
7343            fn url(&self) -> azure_core::Result<azure_core::Url> {
7344                let mut url = self.client.endpoint().clone();
7345                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}/sourceControlSyncJobs" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . source_control_name)) ;
7346                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
7347                if !has_api_version_already {
7348                    url.query_pairs_mut()
7349                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
7350                }
7351                Ok(url)
7352            }
7353        }
7354    }
7355}
7356pub mod source_control_sync_job_streams {
7357    use super::models;
7358    #[cfg(not(target_arch = "wasm32"))]
7359    use futures::future::BoxFuture;
7360    #[cfg(target_arch = "wasm32")]
7361    use futures::future::LocalBoxFuture as BoxFuture;
7362    pub struct Client(pub(crate) super::Client);
7363    impl Client {
7364        #[doc = "Retrieve a list of sync job streams identified by sync job id."]
7365        #[doc = ""]
7366        #[doc = "Arguments:"]
7367        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7368        #[doc = "* `automation_account_name`: The name of the automation account."]
7369        #[doc = "* `source_control_name`: The source control name."]
7370        #[doc = "* `source_control_sync_job_id`: The source control sync job id."]
7371        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7372        pub fn list_by_sync_job(
7373            &self,
7374            resource_group_name: impl Into<String>,
7375            automation_account_name: impl Into<String>,
7376            source_control_name: impl Into<String>,
7377            source_control_sync_job_id: impl Into<String>,
7378            subscription_id: impl Into<String>,
7379        ) -> list_by_sync_job::RequestBuilder {
7380            list_by_sync_job::RequestBuilder {
7381                client: self.0.clone(),
7382                resource_group_name: resource_group_name.into(),
7383                automation_account_name: automation_account_name.into(),
7384                source_control_name: source_control_name.into(),
7385                source_control_sync_job_id: source_control_sync_job_id.into(),
7386                subscription_id: subscription_id.into(),
7387                filter: None,
7388            }
7389        }
7390        #[doc = "Retrieve a sync job stream identified by stream id."]
7391        #[doc = ""]
7392        #[doc = "Arguments:"]
7393        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7394        #[doc = "* `automation_account_name`: The name of the automation account."]
7395        #[doc = "* `source_control_name`: The source control name."]
7396        #[doc = "* `source_control_sync_job_id`: The source control sync job id."]
7397        #[doc = "* `stream_id`: The id of the sync job stream."]
7398        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7399        pub fn get(
7400            &self,
7401            resource_group_name: impl Into<String>,
7402            automation_account_name: impl Into<String>,
7403            source_control_name: impl Into<String>,
7404            source_control_sync_job_id: impl Into<String>,
7405            stream_id: impl Into<String>,
7406            subscription_id: impl Into<String>,
7407        ) -> get::RequestBuilder {
7408            get::RequestBuilder {
7409                client: self.0.clone(),
7410                resource_group_name: resource_group_name.into(),
7411                automation_account_name: automation_account_name.into(),
7412                source_control_name: source_control_name.into(),
7413                source_control_sync_job_id: source_control_sync_job_id.into(),
7414                stream_id: stream_id.into(),
7415                subscription_id: subscription_id.into(),
7416            }
7417        }
7418    }
7419    pub mod list_by_sync_job {
7420        use super::models;
7421        #[cfg(not(target_arch = "wasm32"))]
7422        use futures::future::BoxFuture;
7423        #[cfg(target_arch = "wasm32")]
7424        use futures::future::LocalBoxFuture as BoxFuture;
7425        #[derive(Debug)]
7426        pub struct Response(azure_core::Response);
7427        impl Response {
7428            pub async fn into_body(self) -> azure_core::Result<models::SourceControlSyncJobStreamsListBySyncJob> {
7429                let bytes = self.0.into_body().collect().await?;
7430                let body: models::SourceControlSyncJobStreamsListBySyncJob = serde_json::from_slice(&bytes)?;
7431                Ok(body)
7432            }
7433            pub fn into_raw_response(self) -> azure_core::Response {
7434                self.0
7435            }
7436            pub fn as_raw_response(&self) -> &azure_core::Response {
7437                &self.0
7438            }
7439        }
7440        impl From<Response> for azure_core::Response {
7441            fn from(rsp: Response) -> Self {
7442                rsp.into_raw_response()
7443            }
7444        }
7445        impl AsRef<azure_core::Response> for Response {
7446            fn as_ref(&self) -> &azure_core::Response {
7447                self.as_raw_response()
7448            }
7449        }
7450        #[derive(Clone)]
7451        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7452        #[doc = r""]
7453        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7454        #[doc = r" parameters can be chained."]
7455        #[doc = r""]
7456        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7457        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
7458        #[doc = r" executes the request and returns a `Result` with the parsed"]
7459        #[doc = r" response."]
7460        #[doc = r""]
7461        #[doc = r" In order to execute the request without polling the service"]
7462        #[doc = r" until the operation completes, use `.send().await` instead."]
7463        #[doc = r""]
7464        #[doc = r" If you need lower-level access to the raw response details"]
7465        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7466        #[doc = r" can finalize the request using the"]
7467        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7468        #[doc = r" that resolves to a lower-level [`Response`] value."]
7469        pub struct RequestBuilder {
7470            pub(crate) client: super::super::Client,
7471            pub(crate) resource_group_name: String,
7472            pub(crate) automation_account_name: String,
7473            pub(crate) source_control_name: String,
7474            pub(crate) source_control_sync_job_id: String,
7475            pub(crate) subscription_id: String,
7476            pub(crate) filter: Option<String>,
7477        }
7478        impl RequestBuilder {
7479            #[doc = "The filter to apply on the operation."]
7480            pub fn filter(mut self, filter: impl Into<String>) -> Self {
7481                self.filter = Some(filter.into());
7482                self
7483            }
7484            pub fn into_stream(self) -> azure_core::Pageable<models::SourceControlSyncJobStreamsListBySyncJob, azure_core::error::Error> {
7485                let make_request = move |continuation: Option<String>| {
7486                    let this = self.clone();
7487                    async move {
7488                        let mut url = this.url()?;
7489                        let rsp = match continuation {
7490                            Some(value) => {
7491                                url.set_path("");
7492                                url = url.join(&value)?;
7493                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
7494                                let bearer_token = this.client.bearer_token().await?;
7495                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
7496                                let has_api_version_already =
7497                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
7498                                if !has_api_version_already {
7499                                    req.url_mut()
7500                                        .query_pairs_mut()
7501                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
7502                                }
7503                                let req_body = azure_core::EMPTY_BODY;
7504                                req.set_body(req_body);
7505                                this.client.send(&mut req).await?
7506                            }
7507                            None => {
7508                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
7509                                let bearer_token = this.client.bearer_token().await?;
7510                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
7511                                if let Some(filter) = &this.filter {
7512                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
7513                                }
7514                                let req_body = azure_core::EMPTY_BODY;
7515                                req.set_body(req_body);
7516                                this.client.send(&mut req).await?
7517                            }
7518                        };
7519                        let rsp = match rsp.status() {
7520                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
7521                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
7522                                status: status_code,
7523                                error_code: None,
7524                            })),
7525                        };
7526                        rsp?.into_body().await
7527                    }
7528                };
7529                azure_core::Pageable::new(make_request)
7530            }
7531            fn url(&self) -> azure_core::Result<azure_core::Url> {
7532                let mut url = self.client.endpoint().clone();
7533                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}/sourceControlSyncJobs/{}/streams" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . source_control_name , & self . source_control_sync_job_id)) ;
7534                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
7535                if !has_api_version_already {
7536                    url.query_pairs_mut()
7537                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
7538                }
7539                Ok(url)
7540            }
7541        }
7542    }
7543    pub mod get {
7544        use super::models;
7545        #[cfg(not(target_arch = "wasm32"))]
7546        use futures::future::BoxFuture;
7547        #[cfg(target_arch = "wasm32")]
7548        use futures::future::LocalBoxFuture as BoxFuture;
7549        #[derive(Debug)]
7550        pub struct Response(azure_core::Response);
7551        impl Response {
7552            pub async fn into_body(self) -> azure_core::Result<models::SourceControlSyncJobStreamById> {
7553                let bytes = self.0.into_body().collect().await?;
7554                let body: models::SourceControlSyncJobStreamById = serde_json::from_slice(&bytes)?;
7555                Ok(body)
7556            }
7557            pub fn into_raw_response(self) -> azure_core::Response {
7558                self.0
7559            }
7560            pub fn as_raw_response(&self) -> &azure_core::Response {
7561                &self.0
7562            }
7563        }
7564        impl From<Response> for azure_core::Response {
7565            fn from(rsp: Response) -> Self {
7566                rsp.into_raw_response()
7567            }
7568        }
7569        impl AsRef<azure_core::Response> for Response {
7570            fn as_ref(&self) -> &azure_core::Response {
7571                self.as_raw_response()
7572            }
7573        }
7574        #[derive(Clone)]
7575        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7576        #[doc = r""]
7577        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7578        #[doc = r" parameters can be chained."]
7579        #[doc = r""]
7580        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7581        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
7582        #[doc = r" executes the request and returns a `Result` with the parsed"]
7583        #[doc = r" response."]
7584        #[doc = r""]
7585        #[doc = r" In order to execute the request without polling the service"]
7586        #[doc = r" until the operation completes, use `.send().await` instead."]
7587        #[doc = r""]
7588        #[doc = r" If you need lower-level access to the raw response details"]
7589        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7590        #[doc = r" can finalize the request using the"]
7591        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7592        #[doc = r" that resolves to a lower-level [`Response`] value."]
7593        pub struct RequestBuilder {
7594            pub(crate) client: super::super::Client,
7595            pub(crate) resource_group_name: String,
7596            pub(crate) automation_account_name: String,
7597            pub(crate) source_control_name: String,
7598            pub(crate) source_control_sync_job_id: String,
7599            pub(crate) stream_id: String,
7600            pub(crate) subscription_id: String,
7601        }
7602        impl RequestBuilder {
7603            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7604            #[doc = ""]
7605            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7606            #[doc = "However, this function can provide more flexibility when required."]
7607            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7608                Box::pin({
7609                    let this = self.clone();
7610                    async move {
7611                        let url = this.url()?;
7612                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
7613                        let bearer_token = this.client.bearer_token().await?;
7614                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
7615                        let req_body = azure_core::EMPTY_BODY;
7616                        req.set_body(req_body);
7617                        Ok(Response(this.client.send(&mut req).await?))
7618                    }
7619                })
7620            }
7621            fn url(&self) -> azure_core::Result<azure_core::Url> {
7622                let mut url = self.client.endpoint().clone();
7623                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/sourceControls/{}/sourceControlSyncJobs/{}/streams/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . source_control_name , & self . source_control_sync_job_id , & self . stream_id)) ;
7624                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
7625                if !has_api_version_already {
7626                    url.query_pairs_mut()
7627                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
7628                }
7629                Ok(url)
7630            }
7631        }
7632        impl std::future::IntoFuture for RequestBuilder {
7633            type Output = azure_core::Result<models::SourceControlSyncJobStreamById>;
7634            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SourceControlSyncJobStreamById>>;
7635            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7636            #[doc = ""]
7637            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7638            #[doc = ""]
7639            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7640            fn into_future(self) -> Self::IntoFuture {
7641                Box::pin(async move { self.send().await?.into_body().await })
7642            }
7643        }
7644    }
7645}
7646pub mod job {
7647    use super::models;
7648    #[cfg(not(target_arch = "wasm32"))]
7649    use futures::future::BoxFuture;
7650    #[cfg(target_arch = "wasm32")]
7651    use futures::future::LocalBoxFuture as BoxFuture;
7652    pub struct Client(pub(crate) super::Client);
7653    impl Client {
7654        #[doc = "Retrieve the job output identified by job name."]
7655        #[doc = ""]
7656        #[doc = "Arguments:"]
7657        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7658        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7659        #[doc = "* `automation_account_name`: The name of the automation account."]
7660        #[doc = "* `job_name`: The name of the job to be created."]
7661        pub fn get_output(
7662            &self,
7663            subscription_id: impl Into<String>,
7664            resource_group_name: impl Into<String>,
7665            automation_account_name: impl Into<String>,
7666            job_name: impl Into<String>,
7667        ) -> get_output::RequestBuilder {
7668            get_output::RequestBuilder {
7669                client: self.0.clone(),
7670                subscription_id: subscription_id.into(),
7671                resource_group_name: resource_group_name.into(),
7672                automation_account_name: automation_account_name.into(),
7673                job_name: job_name.into(),
7674                client_request_id: None,
7675            }
7676        }
7677        #[doc = "Retrieve the runbook content of the job identified by job name."]
7678        #[doc = ""]
7679        #[doc = "Arguments:"]
7680        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7681        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7682        #[doc = "* `automation_account_name`: The name of the automation account."]
7683        #[doc = "* `job_name`: The job name."]
7684        pub fn get_runbook_content(
7685            &self,
7686            subscription_id: impl Into<String>,
7687            resource_group_name: impl Into<String>,
7688            automation_account_name: impl Into<String>,
7689            job_name: impl Into<String>,
7690        ) -> get_runbook_content::RequestBuilder {
7691            get_runbook_content::RequestBuilder {
7692                client: self.0.clone(),
7693                subscription_id: subscription_id.into(),
7694                resource_group_name: resource_group_name.into(),
7695                automation_account_name: automation_account_name.into(),
7696                job_name: job_name.into(),
7697                client_request_id: None,
7698            }
7699        }
7700        #[doc = "Suspend the job identified by job name."]
7701        #[doc = ""]
7702        #[doc = "Arguments:"]
7703        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7704        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7705        #[doc = "* `automation_account_name`: The name of the automation account."]
7706        #[doc = "* `job_name`: The job name."]
7707        pub fn suspend(
7708            &self,
7709            subscription_id: impl Into<String>,
7710            resource_group_name: impl Into<String>,
7711            automation_account_name: impl Into<String>,
7712            job_name: impl Into<String>,
7713        ) -> suspend::RequestBuilder {
7714            suspend::RequestBuilder {
7715                client: self.0.clone(),
7716                subscription_id: subscription_id.into(),
7717                resource_group_name: resource_group_name.into(),
7718                automation_account_name: automation_account_name.into(),
7719                job_name: job_name.into(),
7720                client_request_id: None,
7721            }
7722        }
7723        #[doc = "Stop the job identified by jobName."]
7724        #[doc = ""]
7725        #[doc = "Arguments:"]
7726        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7727        #[doc = "* `automation_account_name`: The name of the automation account."]
7728        #[doc = "* `job_name`: The job name."]
7729        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7730        pub fn stop(
7731            &self,
7732            resource_group_name: impl Into<String>,
7733            automation_account_name: impl Into<String>,
7734            job_name: impl Into<String>,
7735            subscription_id: impl Into<String>,
7736        ) -> stop::RequestBuilder {
7737            stop::RequestBuilder {
7738                client: self.0.clone(),
7739                resource_group_name: resource_group_name.into(),
7740                automation_account_name: automation_account_name.into(),
7741                job_name: job_name.into(),
7742                subscription_id: subscription_id.into(),
7743                client_request_id: None,
7744            }
7745        }
7746        #[doc = "Retrieve the job identified by job name."]
7747        #[doc = ""]
7748        #[doc = "Arguments:"]
7749        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7750        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7751        #[doc = "* `automation_account_name`: The name of the automation account."]
7752        #[doc = "* `job_name`: The job name."]
7753        pub fn get(
7754            &self,
7755            subscription_id: impl Into<String>,
7756            resource_group_name: impl Into<String>,
7757            automation_account_name: impl Into<String>,
7758            job_name: impl Into<String>,
7759        ) -> get::RequestBuilder {
7760            get::RequestBuilder {
7761                client: self.0.clone(),
7762                subscription_id: subscription_id.into(),
7763                resource_group_name: resource_group_name.into(),
7764                automation_account_name: automation_account_name.into(),
7765                job_name: job_name.into(),
7766                client_request_id: None,
7767            }
7768        }
7769        #[doc = "Create a job of the runbook."]
7770        #[doc = ""]
7771        #[doc = "Arguments:"]
7772        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7773        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7774        #[doc = "* `automation_account_name`: The name of the automation account."]
7775        #[doc = "* `job_name`: The job name."]
7776        #[doc = "* `parameters`: The parameters supplied to the create job operation."]
7777        pub fn create(
7778            &self,
7779            subscription_id: impl Into<String>,
7780            resource_group_name: impl Into<String>,
7781            automation_account_name: impl Into<String>,
7782            job_name: impl Into<String>,
7783            parameters: impl Into<models::JobCreateParameters>,
7784        ) -> create::RequestBuilder {
7785            create::RequestBuilder {
7786                client: self.0.clone(),
7787                subscription_id: subscription_id.into(),
7788                resource_group_name: resource_group_name.into(),
7789                automation_account_name: automation_account_name.into(),
7790                job_name: job_name.into(),
7791                parameters: parameters.into(),
7792                client_request_id: None,
7793            }
7794        }
7795        #[doc = "Retrieve a list of jobs."]
7796        #[doc = ""]
7797        #[doc = "Arguments:"]
7798        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7799        #[doc = "* `automation_account_name`: The name of the automation account."]
7800        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7801        pub fn list_by_automation_account(
7802            &self,
7803            resource_group_name: impl Into<String>,
7804            automation_account_name: impl Into<String>,
7805            subscription_id: impl Into<String>,
7806        ) -> list_by_automation_account::RequestBuilder {
7807            list_by_automation_account::RequestBuilder {
7808                client: self.0.clone(),
7809                resource_group_name: resource_group_name.into(),
7810                automation_account_name: automation_account_name.into(),
7811                subscription_id: subscription_id.into(),
7812                filter: None,
7813                client_request_id: None,
7814            }
7815        }
7816        #[doc = "Resume the job identified by jobName."]
7817        #[doc = ""]
7818        #[doc = "Arguments:"]
7819        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
7820        #[doc = "* `automation_account_name`: The name of the automation account."]
7821        #[doc = "* `job_name`: The job name."]
7822        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
7823        pub fn resume(
7824            &self,
7825            resource_group_name: impl Into<String>,
7826            automation_account_name: impl Into<String>,
7827            job_name: impl Into<String>,
7828            subscription_id: impl Into<String>,
7829        ) -> resume::RequestBuilder {
7830            resume::RequestBuilder {
7831                client: self.0.clone(),
7832                resource_group_name: resource_group_name.into(),
7833                automation_account_name: automation_account_name.into(),
7834                job_name: job_name.into(),
7835                subscription_id: subscription_id.into(),
7836                client_request_id: None,
7837            }
7838        }
7839    }
7840    pub mod get_output {
7841        use super::models;
7842        #[cfg(not(target_arch = "wasm32"))]
7843        use futures::future::BoxFuture;
7844        #[cfg(target_arch = "wasm32")]
7845        use futures::future::LocalBoxFuture as BoxFuture;
7846        #[derive(Debug)]
7847        pub struct Response(azure_core::Response);
7848        impl Response {
7849            pub async fn into_body(self) -> azure_core::Result<String> {
7850                let bytes = self.0.into_body().collect().await?;
7851                let body: String = serde_json::from_slice(&bytes)?;
7852                Ok(body)
7853            }
7854            pub fn into_raw_response(self) -> azure_core::Response {
7855                self.0
7856            }
7857            pub fn as_raw_response(&self) -> &azure_core::Response {
7858                &self.0
7859            }
7860        }
7861        impl From<Response> for azure_core::Response {
7862            fn from(rsp: Response) -> Self {
7863                rsp.into_raw_response()
7864            }
7865        }
7866        impl AsRef<azure_core::Response> for Response {
7867            fn as_ref(&self) -> &azure_core::Response {
7868                self.as_raw_response()
7869            }
7870        }
7871        #[derive(Clone)]
7872        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7873        #[doc = r""]
7874        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7875        #[doc = r" parameters can be chained."]
7876        #[doc = r""]
7877        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7878        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
7879        #[doc = r" executes the request and returns a `Result` with the parsed"]
7880        #[doc = r" response."]
7881        #[doc = r""]
7882        #[doc = r" In order to execute the request without polling the service"]
7883        #[doc = r" until the operation completes, use `.send().await` instead."]
7884        #[doc = r""]
7885        #[doc = r" If you need lower-level access to the raw response details"]
7886        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7887        #[doc = r" can finalize the request using the"]
7888        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7889        #[doc = r" that resolves to a lower-level [`Response`] value."]
7890        pub struct RequestBuilder {
7891            pub(crate) client: super::super::Client,
7892            pub(crate) subscription_id: String,
7893            pub(crate) resource_group_name: String,
7894            pub(crate) automation_account_name: String,
7895            pub(crate) job_name: String,
7896            pub(crate) client_request_id: Option<String>,
7897        }
7898        impl RequestBuilder {
7899            #[doc = "Identifies this specific client request."]
7900            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
7901                self.client_request_id = Some(client_request_id.into());
7902                self
7903            }
7904            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7905            #[doc = ""]
7906            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7907            #[doc = "However, this function can provide more flexibility when required."]
7908            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7909                Box::pin({
7910                    let this = self.clone();
7911                    async move {
7912                        let url = this.url()?;
7913                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
7914                        let bearer_token = this.client.bearer_token().await?;
7915                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
7916                        if let Some(client_request_id) = &this.client_request_id {
7917                            req.insert_header("clientrequestid", client_request_id);
7918                        }
7919                        let req_body = azure_core::EMPTY_BODY;
7920                        req.set_body(req_body);
7921                        Ok(Response(this.client.send(&mut req).await?))
7922                    }
7923                })
7924            }
7925            fn url(&self) -> azure_core::Result<azure_core::Url> {
7926                let mut url = self.client.endpoint().clone();
7927                url.set_path(&format!(
7928                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}/output",
7929                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name
7930                ));
7931                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
7932                if !has_api_version_already {
7933                    url.query_pairs_mut()
7934                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
7935                }
7936                Ok(url)
7937            }
7938        }
7939        impl std::future::IntoFuture for RequestBuilder {
7940            type Output = azure_core::Result<String>;
7941            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
7942            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7943            #[doc = ""]
7944            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7945            #[doc = ""]
7946            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7947            fn into_future(self) -> Self::IntoFuture {
7948                Box::pin(async move { self.send().await?.into_body().await })
7949            }
7950        }
7951    }
7952    pub mod get_runbook_content {
7953        use super::models;
7954        #[cfg(not(target_arch = "wasm32"))]
7955        use futures::future::BoxFuture;
7956        #[cfg(target_arch = "wasm32")]
7957        use futures::future::LocalBoxFuture as BoxFuture;
7958        #[derive(Debug)]
7959        pub struct Response(azure_core::Response);
7960        impl Response {
7961            pub async fn into_body(self) -> azure_core::Result<String> {
7962                let bytes = self.0.into_body().collect().await?;
7963                let body: String = serde_json::from_slice(&bytes)?;
7964                Ok(body)
7965            }
7966            pub fn into_raw_response(self) -> azure_core::Response {
7967                self.0
7968            }
7969            pub fn as_raw_response(&self) -> &azure_core::Response {
7970                &self.0
7971            }
7972        }
7973        impl From<Response> for azure_core::Response {
7974            fn from(rsp: Response) -> Self {
7975                rsp.into_raw_response()
7976            }
7977        }
7978        impl AsRef<azure_core::Response> for Response {
7979            fn as_ref(&self) -> &azure_core::Response {
7980                self.as_raw_response()
7981            }
7982        }
7983        #[derive(Clone)]
7984        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7985        #[doc = r""]
7986        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7987        #[doc = r" parameters can be chained."]
7988        #[doc = r""]
7989        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7990        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
7991        #[doc = r" executes the request and returns a `Result` with the parsed"]
7992        #[doc = r" response."]
7993        #[doc = r""]
7994        #[doc = r" In order to execute the request without polling the service"]
7995        #[doc = r" until the operation completes, use `.send().await` instead."]
7996        #[doc = r""]
7997        #[doc = r" If you need lower-level access to the raw response details"]
7998        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7999        #[doc = r" can finalize the request using the"]
8000        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8001        #[doc = r" that resolves to a lower-level [`Response`] value."]
8002        pub struct RequestBuilder {
8003            pub(crate) client: super::super::Client,
8004            pub(crate) subscription_id: String,
8005            pub(crate) resource_group_name: String,
8006            pub(crate) automation_account_name: String,
8007            pub(crate) job_name: String,
8008            pub(crate) client_request_id: Option<String>,
8009        }
8010        impl RequestBuilder {
8011            #[doc = "Identifies this specific client request."]
8012            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8013                self.client_request_id = Some(client_request_id.into());
8014                self
8015            }
8016            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8017            #[doc = ""]
8018            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8019            #[doc = "However, this function can provide more flexibility when required."]
8020            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8021                Box::pin({
8022                    let this = self.clone();
8023                    async move {
8024                        let url = this.url()?;
8025                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8026                        let bearer_token = this.client.bearer_token().await?;
8027                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8028                        if let Some(client_request_id) = &this.client_request_id {
8029                            req.insert_header("clientrequestid", client_request_id);
8030                        }
8031                        let req_body = azure_core::EMPTY_BODY;
8032                        req.set_body(req_body);
8033                        Ok(Response(this.client.send(&mut req).await?))
8034                    }
8035                })
8036            }
8037            fn url(&self) -> azure_core::Result<azure_core::Url> {
8038                let mut url = self.client.endpoint().clone();
8039                url.set_path(&format!(
8040                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}/runbookContent",
8041                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name
8042                ));
8043                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8044                if !has_api_version_already {
8045                    url.query_pairs_mut()
8046                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8047                }
8048                Ok(url)
8049            }
8050        }
8051        impl std::future::IntoFuture for RequestBuilder {
8052            type Output = azure_core::Result<String>;
8053            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
8054            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8055            #[doc = ""]
8056            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8057            #[doc = ""]
8058            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8059            fn into_future(self) -> Self::IntoFuture {
8060                Box::pin(async move { self.send().await?.into_body().await })
8061            }
8062        }
8063    }
8064    pub mod suspend {
8065        use super::models;
8066        #[cfg(not(target_arch = "wasm32"))]
8067        use futures::future::BoxFuture;
8068        #[cfg(target_arch = "wasm32")]
8069        use futures::future::LocalBoxFuture as BoxFuture;
8070        #[derive(Debug)]
8071        pub struct Response(azure_core::Response);
8072        impl Response {
8073            pub fn into_raw_response(self) -> azure_core::Response {
8074                self.0
8075            }
8076            pub fn as_raw_response(&self) -> &azure_core::Response {
8077                &self.0
8078            }
8079        }
8080        impl From<Response> for azure_core::Response {
8081            fn from(rsp: Response) -> Self {
8082                rsp.into_raw_response()
8083            }
8084        }
8085        impl AsRef<azure_core::Response> for Response {
8086            fn as_ref(&self) -> &azure_core::Response {
8087                self.as_raw_response()
8088            }
8089        }
8090        #[derive(Clone)]
8091        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8092        #[doc = r""]
8093        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8094        #[doc = r" parameters can be chained."]
8095        #[doc = r""]
8096        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8097        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
8098        #[doc = r" executes the request and returns a `Result` with the parsed"]
8099        #[doc = r" response."]
8100        #[doc = r""]
8101        #[doc = r" In order to execute the request without polling the service"]
8102        #[doc = r" until the operation completes, use `.send().await` instead."]
8103        #[doc = r""]
8104        #[doc = r" If you need lower-level access to the raw response details"]
8105        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8106        #[doc = r" can finalize the request using the"]
8107        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8108        #[doc = r" that resolves to a lower-level [`Response`] value."]
8109        pub struct RequestBuilder {
8110            pub(crate) client: super::super::Client,
8111            pub(crate) subscription_id: String,
8112            pub(crate) resource_group_name: String,
8113            pub(crate) automation_account_name: String,
8114            pub(crate) job_name: String,
8115            pub(crate) client_request_id: Option<String>,
8116        }
8117        impl RequestBuilder {
8118            #[doc = "Identifies this specific client request."]
8119            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8120                self.client_request_id = Some(client_request_id.into());
8121                self
8122            }
8123            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8124            #[doc = ""]
8125            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8126            #[doc = "However, this function can provide more flexibility when required."]
8127            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8128                Box::pin({
8129                    let this = self.clone();
8130                    async move {
8131                        let url = this.url()?;
8132                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
8133                        let bearer_token = this.client.bearer_token().await?;
8134                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8135                        if let Some(client_request_id) = &this.client_request_id {
8136                            req.insert_header("clientrequestid", client_request_id);
8137                        }
8138                        let req_body = azure_core::EMPTY_BODY;
8139                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
8140                        req.set_body(req_body);
8141                        Ok(Response(this.client.send(&mut req).await?))
8142                    }
8143                })
8144            }
8145            fn url(&self) -> azure_core::Result<azure_core::Url> {
8146                let mut url = self.client.endpoint().clone();
8147                url.set_path(&format!(
8148                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}/suspend",
8149                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name
8150                ));
8151                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8152                if !has_api_version_already {
8153                    url.query_pairs_mut()
8154                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8155                }
8156                Ok(url)
8157            }
8158        }
8159    }
8160    pub mod stop {
8161        use super::models;
8162        #[cfg(not(target_arch = "wasm32"))]
8163        use futures::future::BoxFuture;
8164        #[cfg(target_arch = "wasm32")]
8165        use futures::future::LocalBoxFuture as BoxFuture;
8166        #[derive(Debug)]
8167        pub struct Response(azure_core::Response);
8168        impl Response {
8169            pub fn into_raw_response(self) -> azure_core::Response {
8170                self.0
8171            }
8172            pub fn as_raw_response(&self) -> &azure_core::Response {
8173                &self.0
8174            }
8175        }
8176        impl From<Response> for azure_core::Response {
8177            fn from(rsp: Response) -> Self {
8178                rsp.into_raw_response()
8179            }
8180        }
8181        impl AsRef<azure_core::Response> for Response {
8182            fn as_ref(&self) -> &azure_core::Response {
8183                self.as_raw_response()
8184            }
8185        }
8186        #[derive(Clone)]
8187        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8188        #[doc = r""]
8189        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8190        #[doc = r" parameters can be chained."]
8191        #[doc = r""]
8192        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8193        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
8194        #[doc = r" executes the request and returns a `Result` with the parsed"]
8195        #[doc = r" response."]
8196        #[doc = r""]
8197        #[doc = r" In order to execute the request without polling the service"]
8198        #[doc = r" until the operation completes, use `.send().await` instead."]
8199        #[doc = r""]
8200        #[doc = r" If you need lower-level access to the raw response details"]
8201        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8202        #[doc = r" can finalize the request using the"]
8203        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8204        #[doc = r" that resolves to a lower-level [`Response`] value."]
8205        pub struct RequestBuilder {
8206            pub(crate) client: super::super::Client,
8207            pub(crate) resource_group_name: String,
8208            pub(crate) automation_account_name: String,
8209            pub(crate) job_name: String,
8210            pub(crate) subscription_id: String,
8211            pub(crate) client_request_id: Option<String>,
8212        }
8213        impl RequestBuilder {
8214            #[doc = "Identifies this specific client request."]
8215            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8216                self.client_request_id = Some(client_request_id.into());
8217                self
8218            }
8219            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8220            #[doc = ""]
8221            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8222            #[doc = "However, this function can provide more flexibility when required."]
8223            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8224                Box::pin({
8225                    let this = self.clone();
8226                    async move {
8227                        let url = this.url()?;
8228                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
8229                        let bearer_token = this.client.bearer_token().await?;
8230                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8231                        if let Some(client_request_id) = &this.client_request_id {
8232                            req.insert_header("clientrequestid", client_request_id);
8233                        }
8234                        let req_body = azure_core::EMPTY_BODY;
8235                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
8236                        req.set_body(req_body);
8237                        Ok(Response(this.client.send(&mut req).await?))
8238                    }
8239                })
8240            }
8241            fn url(&self) -> azure_core::Result<azure_core::Url> {
8242                let mut url = self.client.endpoint().clone();
8243                url.set_path(&format!(
8244                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}/stop",
8245                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name
8246                ));
8247                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8248                if !has_api_version_already {
8249                    url.query_pairs_mut()
8250                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8251                }
8252                Ok(url)
8253            }
8254        }
8255    }
8256    pub mod get {
8257        use super::models;
8258        #[cfg(not(target_arch = "wasm32"))]
8259        use futures::future::BoxFuture;
8260        #[cfg(target_arch = "wasm32")]
8261        use futures::future::LocalBoxFuture as BoxFuture;
8262        #[derive(Debug)]
8263        pub struct Response(azure_core::Response);
8264        impl Response {
8265            pub async fn into_body(self) -> azure_core::Result<models::Job> {
8266                let bytes = self.0.into_body().collect().await?;
8267                let body: models::Job = serde_json::from_slice(&bytes)?;
8268                Ok(body)
8269            }
8270            pub fn into_raw_response(self) -> azure_core::Response {
8271                self.0
8272            }
8273            pub fn as_raw_response(&self) -> &azure_core::Response {
8274                &self.0
8275            }
8276        }
8277        impl From<Response> for azure_core::Response {
8278            fn from(rsp: Response) -> Self {
8279                rsp.into_raw_response()
8280            }
8281        }
8282        impl AsRef<azure_core::Response> for Response {
8283            fn as_ref(&self) -> &azure_core::Response {
8284                self.as_raw_response()
8285            }
8286        }
8287        #[derive(Clone)]
8288        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8289        #[doc = r""]
8290        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8291        #[doc = r" parameters can be chained."]
8292        #[doc = r""]
8293        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8294        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
8295        #[doc = r" executes the request and returns a `Result` with the parsed"]
8296        #[doc = r" response."]
8297        #[doc = r""]
8298        #[doc = r" In order to execute the request without polling the service"]
8299        #[doc = r" until the operation completes, use `.send().await` instead."]
8300        #[doc = r""]
8301        #[doc = r" If you need lower-level access to the raw response details"]
8302        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8303        #[doc = r" can finalize the request using the"]
8304        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8305        #[doc = r" that resolves to a lower-level [`Response`] value."]
8306        pub struct RequestBuilder {
8307            pub(crate) client: super::super::Client,
8308            pub(crate) subscription_id: String,
8309            pub(crate) resource_group_name: String,
8310            pub(crate) automation_account_name: String,
8311            pub(crate) job_name: String,
8312            pub(crate) client_request_id: Option<String>,
8313        }
8314        impl RequestBuilder {
8315            #[doc = "Identifies this specific client request."]
8316            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8317                self.client_request_id = Some(client_request_id.into());
8318                self
8319            }
8320            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8321            #[doc = ""]
8322            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8323            #[doc = "However, this function can provide more flexibility when required."]
8324            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8325                Box::pin({
8326                    let this = self.clone();
8327                    async move {
8328                        let url = this.url()?;
8329                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8330                        let bearer_token = this.client.bearer_token().await?;
8331                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8332                        if let Some(client_request_id) = &this.client_request_id {
8333                            req.insert_header("clientrequestid", client_request_id);
8334                        }
8335                        let req_body = azure_core::EMPTY_BODY;
8336                        req.set_body(req_body);
8337                        Ok(Response(this.client.send(&mut req).await?))
8338                    }
8339                })
8340            }
8341            fn url(&self) -> azure_core::Result<azure_core::Url> {
8342                let mut url = self.client.endpoint().clone();
8343                url.set_path(&format!(
8344                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}",
8345                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name
8346                ));
8347                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8348                if !has_api_version_already {
8349                    url.query_pairs_mut()
8350                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8351                }
8352                Ok(url)
8353            }
8354        }
8355        impl std::future::IntoFuture for RequestBuilder {
8356            type Output = azure_core::Result<models::Job>;
8357            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Job>>;
8358            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8359            #[doc = ""]
8360            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8361            #[doc = ""]
8362            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8363            fn into_future(self) -> Self::IntoFuture {
8364                Box::pin(async move { self.send().await?.into_body().await })
8365            }
8366        }
8367    }
8368    pub mod create {
8369        use super::models;
8370        #[cfg(not(target_arch = "wasm32"))]
8371        use futures::future::BoxFuture;
8372        #[cfg(target_arch = "wasm32")]
8373        use futures::future::LocalBoxFuture as BoxFuture;
8374        #[derive(Debug)]
8375        pub struct Response(azure_core::Response);
8376        impl Response {
8377            pub async fn into_body(self) -> azure_core::Result<models::Job> {
8378                let bytes = self.0.into_body().collect().await?;
8379                let body: models::Job = serde_json::from_slice(&bytes)?;
8380                Ok(body)
8381            }
8382            pub fn into_raw_response(self) -> azure_core::Response {
8383                self.0
8384            }
8385            pub fn as_raw_response(&self) -> &azure_core::Response {
8386                &self.0
8387            }
8388        }
8389        impl From<Response> for azure_core::Response {
8390            fn from(rsp: Response) -> Self {
8391                rsp.into_raw_response()
8392            }
8393        }
8394        impl AsRef<azure_core::Response> for Response {
8395            fn as_ref(&self) -> &azure_core::Response {
8396                self.as_raw_response()
8397            }
8398        }
8399        #[derive(Clone)]
8400        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8401        #[doc = r""]
8402        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8403        #[doc = r" parameters can be chained."]
8404        #[doc = r""]
8405        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8406        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
8407        #[doc = r" executes the request and returns a `Result` with the parsed"]
8408        #[doc = r" response."]
8409        #[doc = r""]
8410        #[doc = r" In order to execute the request without polling the service"]
8411        #[doc = r" until the operation completes, use `.send().await` instead."]
8412        #[doc = r""]
8413        #[doc = r" If you need lower-level access to the raw response details"]
8414        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8415        #[doc = r" can finalize the request using the"]
8416        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8417        #[doc = r" that resolves to a lower-level [`Response`] value."]
8418        pub struct RequestBuilder {
8419            pub(crate) client: super::super::Client,
8420            pub(crate) subscription_id: String,
8421            pub(crate) resource_group_name: String,
8422            pub(crate) automation_account_name: String,
8423            pub(crate) job_name: String,
8424            pub(crate) parameters: models::JobCreateParameters,
8425            pub(crate) client_request_id: Option<String>,
8426        }
8427        impl RequestBuilder {
8428            #[doc = "Identifies this specific client request."]
8429            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8430                self.client_request_id = Some(client_request_id.into());
8431                self
8432            }
8433            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8434            #[doc = ""]
8435            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8436            #[doc = "However, this function can provide more flexibility when required."]
8437            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8438                Box::pin({
8439                    let this = self.clone();
8440                    async move {
8441                        let url = this.url()?;
8442                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
8443                        let bearer_token = this.client.bearer_token().await?;
8444                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8445                        req.insert_header("content-type", "application/json");
8446                        let req_body = azure_core::to_json(&this.parameters)?;
8447                        if let Some(client_request_id) = &this.client_request_id {
8448                            req.insert_header("clientrequestid", client_request_id);
8449                        }
8450                        req.set_body(req_body);
8451                        Ok(Response(this.client.send(&mut req).await?))
8452                    }
8453                })
8454            }
8455            fn url(&self) -> azure_core::Result<azure_core::Url> {
8456                let mut url = self.client.endpoint().clone();
8457                url.set_path(&format!(
8458                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}",
8459                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name
8460                ));
8461                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8462                if !has_api_version_already {
8463                    url.query_pairs_mut()
8464                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8465                }
8466                Ok(url)
8467            }
8468        }
8469        impl std::future::IntoFuture for RequestBuilder {
8470            type Output = azure_core::Result<models::Job>;
8471            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Job>>;
8472            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8473            #[doc = ""]
8474            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8475            #[doc = ""]
8476            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8477            fn into_future(self) -> Self::IntoFuture {
8478                Box::pin(async move { self.send().await?.into_body().await })
8479            }
8480        }
8481    }
8482    pub mod list_by_automation_account {
8483        use super::models;
8484        #[cfg(not(target_arch = "wasm32"))]
8485        use futures::future::BoxFuture;
8486        #[cfg(target_arch = "wasm32")]
8487        use futures::future::LocalBoxFuture as BoxFuture;
8488        #[derive(Debug)]
8489        pub struct Response(azure_core::Response);
8490        impl Response {
8491            pub async fn into_body(self) -> azure_core::Result<models::JobListResultV2> {
8492                let bytes = self.0.into_body().collect().await?;
8493                let body: models::JobListResultV2 = serde_json::from_slice(&bytes)?;
8494                Ok(body)
8495            }
8496            pub fn into_raw_response(self) -> azure_core::Response {
8497                self.0
8498            }
8499            pub fn as_raw_response(&self) -> &azure_core::Response {
8500                &self.0
8501            }
8502        }
8503        impl From<Response> for azure_core::Response {
8504            fn from(rsp: Response) -> Self {
8505                rsp.into_raw_response()
8506            }
8507        }
8508        impl AsRef<azure_core::Response> for Response {
8509            fn as_ref(&self) -> &azure_core::Response {
8510                self.as_raw_response()
8511            }
8512        }
8513        #[derive(Clone)]
8514        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8515        #[doc = r""]
8516        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8517        #[doc = r" parameters can be chained."]
8518        #[doc = r""]
8519        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8520        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
8521        #[doc = r" executes the request and returns a `Result` with the parsed"]
8522        #[doc = r" response."]
8523        #[doc = r""]
8524        #[doc = r" In order to execute the request without polling the service"]
8525        #[doc = r" until the operation completes, use `.send().await` instead."]
8526        #[doc = r""]
8527        #[doc = r" If you need lower-level access to the raw response details"]
8528        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8529        #[doc = r" can finalize the request using the"]
8530        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8531        #[doc = r" that resolves to a lower-level [`Response`] value."]
8532        pub struct RequestBuilder {
8533            pub(crate) client: super::super::Client,
8534            pub(crate) resource_group_name: String,
8535            pub(crate) automation_account_name: String,
8536            pub(crate) subscription_id: String,
8537            pub(crate) filter: Option<String>,
8538            pub(crate) client_request_id: Option<String>,
8539        }
8540        impl RequestBuilder {
8541            #[doc = "The filter to apply on the operation."]
8542            pub fn filter(mut self, filter: impl Into<String>) -> Self {
8543                self.filter = Some(filter.into());
8544                self
8545            }
8546            #[doc = "Identifies this specific client request."]
8547            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8548                self.client_request_id = Some(client_request_id.into());
8549                self
8550            }
8551            pub fn into_stream(self) -> azure_core::Pageable<models::JobListResultV2, azure_core::error::Error> {
8552                let make_request = move |continuation: Option<String>| {
8553                    let this = self.clone();
8554                    async move {
8555                        let mut url = this.url()?;
8556                        let rsp = match continuation {
8557                            Some(value) => {
8558                                url.set_path("");
8559                                url = url.join(&value)?;
8560                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8561                                let bearer_token = this.client.bearer_token().await?;
8562                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8563                                let has_api_version_already =
8564                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8565                                if !has_api_version_already {
8566                                    req.url_mut()
8567                                        .query_pairs_mut()
8568                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8569                                }
8570                                let req_body = azure_core::EMPTY_BODY;
8571                                req.set_body(req_body);
8572                                this.client.send(&mut req).await?
8573                            }
8574                            None => {
8575                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8576                                let bearer_token = this.client.bearer_token().await?;
8577                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8578                                if let Some(filter) = &this.filter {
8579                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
8580                                }
8581                                if let Some(client_request_id) = &this.client_request_id {
8582                                    req.insert_header("clientrequestid", client_request_id);
8583                                }
8584                                let req_body = azure_core::EMPTY_BODY;
8585                                req.set_body(req_body);
8586                                this.client.send(&mut req).await?
8587                            }
8588                        };
8589                        let rsp = match rsp.status() {
8590                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
8591                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
8592                                status: status_code,
8593                                error_code: None,
8594                            })),
8595                        };
8596                        rsp?.into_body().await
8597                    }
8598                };
8599                azure_core::Pageable::new(make_request)
8600            }
8601            fn url(&self) -> azure_core::Result<azure_core::Url> {
8602                let mut url = self.client.endpoint().clone();
8603                url.set_path(&format!(
8604                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs",
8605                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
8606                ));
8607                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8608                if !has_api_version_already {
8609                    url.query_pairs_mut()
8610                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8611                }
8612                Ok(url)
8613            }
8614        }
8615    }
8616    pub mod resume {
8617        use super::models;
8618        #[cfg(not(target_arch = "wasm32"))]
8619        use futures::future::BoxFuture;
8620        #[cfg(target_arch = "wasm32")]
8621        use futures::future::LocalBoxFuture as BoxFuture;
8622        #[derive(Debug)]
8623        pub struct Response(azure_core::Response);
8624        impl Response {
8625            pub fn into_raw_response(self) -> azure_core::Response {
8626                self.0
8627            }
8628            pub fn as_raw_response(&self) -> &azure_core::Response {
8629                &self.0
8630            }
8631        }
8632        impl From<Response> for azure_core::Response {
8633            fn from(rsp: Response) -> Self {
8634                rsp.into_raw_response()
8635            }
8636        }
8637        impl AsRef<azure_core::Response> for Response {
8638            fn as_ref(&self) -> &azure_core::Response {
8639                self.as_raw_response()
8640            }
8641        }
8642        #[derive(Clone)]
8643        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8644        #[doc = r""]
8645        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8646        #[doc = r" parameters can be chained."]
8647        #[doc = r""]
8648        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8649        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
8650        #[doc = r" executes the request and returns a `Result` with the parsed"]
8651        #[doc = r" response."]
8652        #[doc = r""]
8653        #[doc = r" In order to execute the request without polling the service"]
8654        #[doc = r" until the operation completes, use `.send().await` instead."]
8655        #[doc = r""]
8656        #[doc = r" If you need lower-level access to the raw response details"]
8657        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8658        #[doc = r" can finalize the request using the"]
8659        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8660        #[doc = r" that resolves to a lower-level [`Response`] value."]
8661        pub struct RequestBuilder {
8662            pub(crate) client: super::super::Client,
8663            pub(crate) resource_group_name: String,
8664            pub(crate) automation_account_name: String,
8665            pub(crate) job_name: String,
8666            pub(crate) subscription_id: String,
8667            pub(crate) client_request_id: Option<String>,
8668        }
8669        impl RequestBuilder {
8670            #[doc = "Identifies this specific client request."]
8671            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8672                self.client_request_id = Some(client_request_id.into());
8673                self
8674            }
8675            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8676            #[doc = ""]
8677            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8678            #[doc = "However, this function can provide more flexibility when required."]
8679            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8680                Box::pin({
8681                    let this = self.clone();
8682                    async move {
8683                        let url = this.url()?;
8684                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
8685                        let bearer_token = this.client.bearer_token().await?;
8686                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8687                        if let Some(client_request_id) = &this.client_request_id {
8688                            req.insert_header("clientrequestid", client_request_id);
8689                        }
8690                        let req_body = azure_core::EMPTY_BODY;
8691                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
8692                        req.set_body(req_body);
8693                        Ok(Response(this.client.send(&mut req).await?))
8694                    }
8695                })
8696            }
8697            fn url(&self) -> azure_core::Result<azure_core::Url> {
8698                let mut url = self.client.endpoint().clone();
8699                url.set_path(&format!(
8700                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}/resume",
8701                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name
8702                ));
8703                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8704                if !has_api_version_already {
8705                    url.query_pairs_mut()
8706                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8707                }
8708                Ok(url)
8709            }
8710        }
8711    }
8712}
8713pub mod job_stream {
8714    use super::models;
8715    #[cfg(not(target_arch = "wasm32"))]
8716    use futures::future::BoxFuture;
8717    #[cfg(target_arch = "wasm32")]
8718    use futures::future::LocalBoxFuture as BoxFuture;
8719    pub struct Client(pub(crate) super::Client);
8720    impl Client {
8721        #[doc = "Retrieve the job stream identified by job stream id."]
8722        #[doc = ""]
8723        #[doc = "Arguments:"]
8724        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
8725        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
8726        #[doc = "* `automation_account_name`: The name of the automation account."]
8727        #[doc = "* `job_name`: The job name."]
8728        #[doc = "* `job_stream_id`: The job stream id."]
8729        pub fn get(
8730            &self,
8731            subscription_id: impl Into<String>,
8732            resource_group_name: impl Into<String>,
8733            automation_account_name: impl Into<String>,
8734            job_name: impl Into<String>,
8735            job_stream_id: impl Into<String>,
8736        ) -> get::RequestBuilder {
8737            get::RequestBuilder {
8738                client: self.0.clone(),
8739                subscription_id: subscription_id.into(),
8740                resource_group_name: resource_group_name.into(),
8741                automation_account_name: automation_account_name.into(),
8742                job_name: job_name.into(),
8743                job_stream_id: job_stream_id.into(),
8744                client_request_id: None,
8745            }
8746        }
8747        #[doc = "Retrieve a list of jobs streams identified by job name."]
8748        #[doc = ""]
8749        #[doc = "Arguments:"]
8750        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
8751        #[doc = "* `automation_account_name`: The name of the automation account."]
8752        #[doc = "* `job_name`: The job name."]
8753        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
8754        pub fn list_by_job(
8755            &self,
8756            resource_group_name: impl Into<String>,
8757            automation_account_name: impl Into<String>,
8758            job_name: impl Into<String>,
8759            subscription_id: impl Into<String>,
8760        ) -> list_by_job::RequestBuilder {
8761            list_by_job::RequestBuilder {
8762                client: self.0.clone(),
8763                resource_group_name: resource_group_name.into(),
8764                automation_account_name: automation_account_name.into(),
8765                job_name: job_name.into(),
8766                subscription_id: subscription_id.into(),
8767                filter: None,
8768                client_request_id: None,
8769            }
8770        }
8771    }
8772    pub mod get {
8773        use super::models;
8774        #[cfg(not(target_arch = "wasm32"))]
8775        use futures::future::BoxFuture;
8776        #[cfg(target_arch = "wasm32")]
8777        use futures::future::LocalBoxFuture as BoxFuture;
8778        #[derive(Debug)]
8779        pub struct Response(azure_core::Response);
8780        impl Response {
8781            pub async fn into_body(self) -> azure_core::Result<models::JobStream> {
8782                let bytes = self.0.into_body().collect().await?;
8783                let body: models::JobStream = serde_json::from_slice(&bytes)?;
8784                Ok(body)
8785            }
8786            pub fn into_raw_response(self) -> azure_core::Response {
8787                self.0
8788            }
8789            pub fn as_raw_response(&self) -> &azure_core::Response {
8790                &self.0
8791            }
8792        }
8793        impl From<Response> for azure_core::Response {
8794            fn from(rsp: Response) -> Self {
8795                rsp.into_raw_response()
8796            }
8797        }
8798        impl AsRef<azure_core::Response> for Response {
8799            fn as_ref(&self) -> &azure_core::Response {
8800                self.as_raw_response()
8801            }
8802        }
8803        #[derive(Clone)]
8804        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8805        #[doc = r""]
8806        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8807        #[doc = r" parameters can be chained."]
8808        #[doc = r""]
8809        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8810        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
8811        #[doc = r" executes the request and returns a `Result` with the parsed"]
8812        #[doc = r" response."]
8813        #[doc = r""]
8814        #[doc = r" In order to execute the request without polling the service"]
8815        #[doc = r" until the operation completes, use `.send().await` instead."]
8816        #[doc = r""]
8817        #[doc = r" If you need lower-level access to the raw response details"]
8818        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8819        #[doc = r" can finalize the request using the"]
8820        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8821        #[doc = r" that resolves to a lower-level [`Response`] value."]
8822        pub struct RequestBuilder {
8823            pub(crate) client: super::super::Client,
8824            pub(crate) subscription_id: String,
8825            pub(crate) resource_group_name: String,
8826            pub(crate) automation_account_name: String,
8827            pub(crate) job_name: String,
8828            pub(crate) job_stream_id: String,
8829            pub(crate) client_request_id: Option<String>,
8830        }
8831        impl RequestBuilder {
8832            #[doc = "Identifies this specific client request."]
8833            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8834                self.client_request_id = Some(client_request_id.into());
8835                self
8836            }
8837            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8838            #[doc = ""]
8839            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8840            #[doc = "However, this function can provide more flexibility when required."]
8841            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8842                Box::pin({
8843                    let this = self.clone();
8844                    async move {
8845                        let url = this.url()?;
8846                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8847                        let bearer_token = this.client.bearer_token().await?;
8848                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8849                        if let Some(client_request_id) = &this.client_request_id {
8850                            req.insert_header("clientrequestid", client_request_id);
8851                        }
8852                        let req_body = azure_core::EMPTY_BODY;
8853                        req.set_body(req_body);
8854                        Ok(Response(this.client.send(&mut req).await?))
8855                    }
8856                })
8857            }
8858            fn url(&self) -> azure_core::Result<azure_core::Url> {
8859                let mut url = self.client.endpoint().clone();
8860                url.set_path(&format!(
8861                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}/streams/{}",
8862                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name, &self.job_stream_id
8863                ));
8864                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8865                if !has_api_version_already {
8866                    url.query_pairs_mut()
8867                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8868                }
8869                Ok(url)
8870            }
8871        }
8872        impl std::future::IntoFuture for RequestBuilder {
8873            type Output = azure_core::Result<models::JobStream>;
8874            type IntoFuture = BoxFuture<'static, azure_core::Result<models::JobStream>>;
8875            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8876            #[doc = ""]
8877            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8878            #[doc = ""]
8879            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8880            fn into_future(self) -> Self::IntoFuture {
8881                Box::pin(async move { self.send().await?.into_body().await })
8882            }
8883        }
8884    }
8885    pub mod list_by_job {
8886        use super::models;
8887        #[cfg(not(target_arch = "wasm32"))]
8888        use futures::future::BoxFuture;
8889        #[cfg(target_arch = "wasm32")]
8890        use futures::future::LocalBoxFuture as BoxFuture;
8891        #[derive(Debug)]
8892        pub struct Response(azure_core::Response);
8893        impl Response {
8894            pub async fn into_body(self) -> azure_core::Result<models::JobStreamListResult> {
8895                let bytes = self.0.into_body().collect().await?;
8896                let body: models::JobStreamListResult = serde_json::from_slice(&bytes)?;
8897                Ok(body)
8898            }
8899            pub fn into_raw_response(self) -> azure_core::Response {
8900                self.0
8901            }
8902            pub fn as_raw_response(&self) -> &azure_core::Response {
8903                &self.0
8904            }
8905        }
8906        impl From<Response> for azure_core::Response {
8907            fn from(rsp: Response) -> Self {
8908                rsp.into_raw_response()
8909            }
8910        }
8911        impl AsRef<azure_core::Response> for Response {
8912            fn as_ref(&self) -> &azure_core::Response {
8913                self.as_raw_response()
8914            }
8915        }
8916        #[derive(Clone)]
8917        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8918        #[doc = r""]
8919        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8920        #[doc = r" parameters can be chained."]
8921        #[doc = r""]
8922        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8923        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
8924        #[doc = r" executes the request and returns a `Result` with the parsed"]
8925        #[doc = r" response."]
8926        #[doc = r""]
8927        #[doc = r" In order to execute the request without polling the service"]
8928        #[doc = r" until the operation completes, use `.send().await` instead."]
8929        #[doc = r""]
8930        #[doc = r" If you need lower-level access to the raw response details"]
8931        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8932        #[doc = r" can finalize the request using the"]
8933        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8934        #[doc = r" that resolves to a lower-level [`Response`] value."]
8935        pub struct RequestBuilder {
8936            pub(crate) client: super::super::Client,
8937            pub(crate) resource_group_name: String,
8938            pub(crate) automation_account_name: String,
8939            pub(crate) job_name: String,
8940            pub(crate) subscription_id: String,
8941            pub(crate) filter: Option<String>,
8942            pub(crate) client_request_id: Option<String>,
8943        }
8944        impl RequestBuilder {
8945            #[doc = "The filter to apply on the operation."]
8946            pub fn filter(mut self, filter: impl Into<String>) -> Self {
8947                self.filter = Some(filter.into());
8948                self
8949            }
8950            #[doc = "Identifies this specific client request."]
8951            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
8952                self.client_request_id = Some(client_request_id.into());
8953                self
8954            }
8955            pub fn into_stream(self) -> azure_core::Pageable<models::JobStreamListResult, azure_core::error::Error> {
8956                let make_request = move |continuation: Option<String>| {
8957                    let this = self.clone();
8958                    async move {
8959                        let mut url = this.url()?;
8960                        let rsp = match continuation {
8961                            Some(value) => {
8962                                url.set_path("");
8963                                url = url.join(&value)?;
8964                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8965                                let bearer_token = this.client.bearer_token().await?;
8966                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8967                                let has_api_version_already =
8968                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
8969                                if !has_api_version_already {
8970                                    req.url_mut()
8971                                        .query_pairs_mut()
8972                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
8973                                }
8974                                let req_body = azure_core::EMPTY_BODY;
8975                                req.set_body(req_body);
8976                                this.client.send(&mut req).await?
8977                            }
8978                            None => {
8979                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8980                                let bearer_token = this.client.bearer_token().await?;
8981                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
8982                                if let Some(filter) = &this.filter {
8983                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
8984                                }
8985                                if let Some(client_request_id) = &this.client_request_id {
8986                                    req.insert_header("clientrequestid", client_request_id);
8987                                }
8988                                let req_body = azure_core::EMPTY_BODY;
8989                                req.set_body(req_body);
8990                                this.client.send(&mut req).await?
8991                            }
8992                        };
8993                        let rsp = match rsp.status() {
8994                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
8995                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
8996                                status: status_code,
8997                                error_code: None,
8998                            })),
8999                        };
9000                        rsp?.into_body().await
9001                    }
9002                };
9003                azure_core::Pageable::new(make_request)
9004            }
9005            fn url(&self) -> azure_core::Result<azure_core::Url> {
9006                let mut url = self.client.endpoint().clone();
9007                url.set_path(&format!(
9008                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobs/{}/streams",
9009                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_name
9010                ));
9011                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9012                if !has_api_version_already {
9013                    url.query_pairs_mut()
9014                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9015                }
9016                Ok(url)
9017            }
9018        }
9019    }
9020}
9021pub mod automation_account {
9022    use super::models;
9023    #[cfg(not(target_arch = "wasm32"))]
9024    use futures::future::BoxFuture;
9025    #[cfg(target_arch = "wasm32")]
9026    use futures::future::LocalBoxFuture as BoxFuture;
9027    pub struct Client(pub(crate) super::Client);
9028    impl Client {
9029        #[doc = "Get information about an Automation Account."]
9030        #[doc = ""]
9031        #[doc = "Arguments:"]
9032        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
9033        #[doc = "* `automation_account_name`: The name of the automation account."]
9034        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
9035        pub fn get(
9036            &self,
9037            resource_group_name: impl Into<String>,
9038            automation_account_name: impl Into<String>,
9039            subscription_id: impl Into<String>,
9040        ) -> get::RequestBuilder {
9041            get::RequestBuilder {
9042                client: self.0.clone(),
9043                resource_group_name: resource_group_name.into(),
9044                automation_account_name: automation_account_name.into(),
9045                subscription_id: subscription_id.into(),
9046            }
9047        }
9048        #[doc = "Create or update automation account."]
9049        #[doc = ""]
9050        #[doc = "Arguments:"]
9051        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
9052        #[doc = "* `automation_account_name`: The name of the automation account."]
9053        #[doc = "* `parameters`: Parameters supplied to the create or update automation account."]
9054        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
9055        pub fn create_or_update(
9056            &self,
9057            resource_group_name: impl Into<String>,
9058            automation_account_name: impl Into<String>,
9059            parameters: impl Into<models::AutomationAccountCreateOrUpdateParameters>,
9060            subscription_id: impl Into<String>,
9061        ) -> create_or_update::RequestBuilder {
9062            create_or_update::RequestBuilder {
9063                client: self.0.clone(),
9064                resource_group_name: resource_group_name.into(),
9065                automation_account_name: automation_account_name.into(),
9066                parameters: parameters.into(),
9067                subscription_id: subscription_id.into(),
9068            }
9069        }
9070        #[doc = "Update an automation account."]
9071        #[doc = ""]
9072        #[doc = "Arguments:"]
9073        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
9074        #[doc = "* `automation_account_name`: The name of the automation account."]
9075        #[doc = "* `parameters`: Parameters supplied to the update automation account."]
9076        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
9077        pub fn update(
9078            &self,
9079            resource_group_name: impl Into<String>,
9080            automation_account_name: impl Into<String>,
9081            parameters: impl Into<models::AutomationAccountUpdateParameters>,
9082            subscription_id: impl Into<String>,
9083        ) -> update::RequestBuilder {
9084            update::RequestBuilder {
9085                client: self.0.clone(),
9086                resource_group_name: resource_group_name.into(),
9087                automation_account_name: automation_account_name.into(),
9088                parameters: parameters.into(),
9089                subscription_id: subscription_id.into(),
9090            }
9091        }
9092        #[doc = "Delete an automation account."]
9093        #[doc = ""]
9094        #[doc = "Arguments:"]
9095        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
9096        #[doc = "* `automation_account_name`: The name of the automation account."]
9097        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
9098        pub fn delete(
9099            &self,
9100            resource_group_name: impl Into<String>,
9101            automation_account_name: impl Into<String>,
9102            subscription_id: impl Into<String>,
9103        ) -> delete::RequestBuilder {
9104            delete::RequestBuilder {
9105                client: self.0.clone(),
9106                resource_group_name: resource_group_name.into(),
9107                automation_account_name: automation_account_name.into(),
9108                subscription_id: subscription_id.into(),
9109            }
9110        }
9111        #[doc = "Retrieve a list of accounts within a given resource group."]
9112        #[doc = ""]
9113        #[doc = "Arguments:"]
9114        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
9115        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
9116        pub fn list_by_resource_group(
9117            &self,
9118            resource_group_name: impl Into<String>,
9119            subscription_id: impl Into<String>,
9120        ) -> list_by_resource_group::RequestBuilder {
9121            list_by_resource_group::RequestBuilder {
9122                client: self.0.clone(),
9123                resource_group_name: resource_group_name.into(),
9124                subscription_id: subscription_id.into(),
9125            }
9126        }
9127        #[doc = "Lists the Automation Accounts within an Azure subscription."]
9128        #[doc = "Retrieve a list of accounts within a given subscription."]
9129        #[doc = ""]
9130        #[doc = "Arguments:"]
9131        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
9132        pub fn list(&self, subscription_id: impl Into<String>) -> list::RequestBuilder {
9133            list::RequestBuilder {
9134                client: self.0.clone(),
9135                subscription_id: subscription_id.into(),
9136            }
9137        }
9138    }
9139    pub mod get {
9140        use super::models;
9141        #[cfg(not(target_arch = "wasm32"))]
9142        use futures::future::BoxFuture;
9143        #[cfg(target_arch = "wasm32")]
9144        use futures::future::LocalBoxFuture as BoxFuture;
9145        #[derive(Debug)]
9146        pub struct Response(azure_core::Response);
9147        impl Response {
9148            pub async fn into_body(self) -> azure_core::Result<models::AutomationAccount> {
9149                let bytes = self.0.into_body().collect().await?;
9150                let body: models::AutomationAccount = serde_json::from_slice(&bytes)?;
9151                Ok(body)
9152            }
9153            pub fn into_raw_response(self) -> azure_core::Response {
9154                self.0
9155            }
9156            pub fn as_raw_response(&self) -> &azure_core::Response {
9157                &self.0
9158            }
9159        }
9160        impl From<Response> for azure_core::Response {
9161            fn from(rsp: Response) -> Self {
9162                rsp.into_raw_response()
9163            }
9164        }
9165        impl AsRef<azure_core::Response> for Response {
9166            fn as_ref(&self) -> &azure_core::Response {
9167                self.as_raw_response()
9168            }
9169        }
9170        #[derive(Clone)]
9171        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9172        #[doc = r""]
9173        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9174        #[doc = r" parameters can be chained."]
9175        #[doc = r""]
9176        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9177        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
9178        #[doc = r" executes the request and returns a `Result` with the parsed"]
9179        #[doc = r" response."]
9180        #[doc = r""]
9181        #[doc = r" In order to execute the request without polling the service"]
9182        #[doc = r" until the operation completes, use `.send().await` instead."]
9183        #[doc = r""]
9184        #[doc = r" If you need lower-level access to the raw response details"]
9185        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9186        #[doc = r" can finalize the request using the"]
9187        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9188        #[doc = r" that resolves to a lower-level [`Response`] value."]
9189        pub struct RequestBuilder {
9190            pub(crate) client: super::super::Client,
9191            pub(crate) resource_group_name: String,
9192            pub(crate) automation_account_name: String,
9193            pub(crate) subscription_id: String,
9194        }
9195        impl RequestBuilder {
9196            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9197            #[doc = ""]
9198            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9199            #[doc = "However, this function can provide more flexibility when required."]
9200            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9201                Box::pin({
9202                    let this = self.clone();
9203                    async move {
9204                        let url = this.url()?;
9205                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9206                        let bearer_token = this.client.bearer_token().await?;
9207                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9208                        let req_body = azure_core::EMPTY_BODY;
9209                        req.set_body(req_body);
9210                        Ok(Response(this.client.send(&mut req).await?))
9211                    }
9212                })
9213            }
9214            fn url(&self) -> azure_core::Result<azure_core::Url> {
9215                let mut url = self.client.endpoint().clone();
9216                url.set_path(&format!(
9217                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}",
9218                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
9219                ));
9220                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9221                if !has_api_version_already {
9222                    url.query_pairs_mut()
9223                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9224                }
9225                Ok(url)
9226            }
9227        }
9228        impl std::future::IntoFuture for RequestBuilder {
9229            type Output = azure_core::Result<models::AutomationAccount>;
9230            type IntoFuture = BoxFuture<'static, azure_core::Result<models::AutomationAccount>>;
9231            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9232            #[doc = ""]
9233            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9234            #[doc = ""]
9235            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9236            fn into_future(self) -> Self::IntoFuture {
9237                Box::pin(async move { self.send().await?.into_body().await })
9238            }
9239        }
9240    }
9241    pub mod create_or_update {
9242        use super::models;
9243        #[cfg(not(target_arch = "wasm32"))]
9244        use futures::future::BoxFuture;
9245        #[cfg(target_arch = "wasm32")]
9246        use futures::future::LocalBoxFuture as BoxFuture;
9247        #[derive(Debug)]
9248        pub struct Response(azure_core::Response);
9249        impl Response {
9250            pub async fn into_body(self) -> azure_core::Result<models::AutomationAccount> {
9251                let bytes = self.0.into_body().collect().await?;
9252                let body: models::AutomationAccount = serde_json::from_slice(&bytes)?;
9253                Ok(body)
9254            }
9255            pub fn into_raw_response(self) -> azure_core::Response {
9256                self.0
9257            }
9258            pub fn as_raw_response(&self) -> &azure_core::Response {
9259                &self.0
9260            }
9261        }
9262        impl From<Response> for azure_core::Response {
9263            fn from(rsp: Response) -> Self {
9264                rsp.into_raw_response()
9265            }
9266        }
9267        impl AsRef<azure_core::Response> for Response {
9268            fn as_ref(&self) -> &azure_core::Response {
9269                self.as_raw_response()
9270            }
9271        }
9272        #[derive(Clone)]
9273        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9274        #[doc = r""]
9275        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9276        #[doc = r" parameters can be chained."]
9277        #[doc = r""]
9278        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9279        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
9280        #[doc = r" executes the request and returns a `Result` with the parsed"]
9281        #[doc = r" response."]
9282        #[doc = r""]
9283        #[doc = r" In order to execute the request without polling the service"]
9284        #[doc = r" until the operation completes, use `.send().await` instead."]
9285        #[doc = r""]
9286        #[doc = r" If you need lower-level access to the raw response details"]
9287        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9288        #[doc = r" can finalize the request using the"]
9289        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9290        #[doc = r" that resolves to a lower-level [`Response`] value."]
9291        pub struct RequestBuilder {
9292            pub(crate) client: super::super::Client,
9293            pub(crate) resource_group_name: String,
9294            pub(crate) automation_account_name: String,
9295            pub(crate) parameters: models::AutomationAccountCreateOrUpdateParameters,
9296            pub(crate) subscription_id: String,
9297        }
9298        impl RequestBuilder {
9299            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9300            #[doc = ""]
9301            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9302            #[doc = "However, this function can provide more flexibility when required."]
9303            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9304                Box::pin({
9305                    let this = self.clone();
9306                    async move {
9307                        let url = this.url()?;
9308                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
9309                        let bearer_token = this.client.bearer_token().await?;
9310                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9311                        req.insert_header("content-type", "application/json");
9312                        let req_body = azure_core::to_json(&this.parameters)?;
9313                        req.set_body(req_body);
9314                        Ok(Response(this.client.send(&mut req).await?))
9315                    }
9316                })
9317            }
9318            fn url(&self) -> azure_core::Result<azure_core::Url> {
9319                let mut url = self.client.endpoint().clone();
9320                url.set_path(&format!(
9321                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}",
9322                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
9323                ));
9324                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9325                if !has_api_version_already {
9326                    url.query_pairs_mut()
9327                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9328                }
9329                Ok(url)
9330            }
9331        }
9332        impl std::future::IntoFuture for RequestBuilder {
9333            type Output = azure_core::Result<models::AutomationAccount>;
9334            type IntoFuture = BoxFuture<'static, azure_core::Result<models::AutomationAccount>>;
9335            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9336            #[doc = ""]
9337            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9338            #[doc = ""]
9339            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9340            fn into_future(self) -> Self::IntoFuture {
9341                Box::pin(async move { self.send().await?.into_body().await })
9342            }
9343        }
9344    }
9345    pub mod update {
9346        use super::models;
9347        #[cfg(not(target_arch = "wasm32"))]
9348        use futures::future::BoxFuture;
9349        #[cfg(target_arch = "wasm32")]
9350        use futures::future::LocalBoxFuture as BoxFuture;
9351        #[derive(Debug)]
9352        pub struct Response(azure_core::Response);
9353        impl Response {
9354            pub async fn into_body(self) -> azure_core::Result<models::AutomationAccount> {
9355                let bytes = self.0.into_body().collect().await?;
9356                let body: models::AutomationAccount = serde_json::from_slice(&bytes)?;
9357                Ok(body)
9358            }
9359            pub fn into_raw_response(self) -> azure_core::Response {
9360                self.0
9361            }
9362            pub fn as_raw_response(&self) -> &azure_core::Response {
9363                &self.0
9364            }
9365        }
9366        impl From<Response> for azure_core::Response {
9367            fn from(rsp: Response) -> Self {
9368                rsp.into_raw_response()
9369            }
9370        }
9371        impl AsRef<azure_core::Response> for Response {
9372            fn as_ref(&self) -> &azure_core::Response {
9373                self.as_raw_response()
9374            }
9375        }
9376        #[derive(Clone)]
9377        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9378        #[doc = r""]
9379        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9380        #[doc = r" parameters can be chained."]
9381        #[doc = r""]
9382        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9383        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
9384        #[doc = r" executes the request and returns a `Result` with the parsed"]
9385        #[doc = r" response."]
9386        #[doc = r""]
9387        #[doc = r" In order to execute the request without polling the service"]
9388        #[doc = r" until the operation completes, use `.send().await` instead."]
9389        #[doc = r""]
9390        #[doc = r" If you need lower-level access to the raw response details"]
9391        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9392        #[doc = r" can finalize the request using the"]
9393        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9394        #[doc = r" that resolves to a lower-level [`Response`] value."]
9395        pub struct RequestBuilder {
9396            pub(crate) client: super::super::Client,
9397            pub(crate) resource_group_name: String,
9398            pub(crate) automation_account_name: String,
9399            pub(crate) parameters: models::AutomationAccountUpdateParameters,
9400            pub(crate) subscription_id: String,
9401        }
9402        impl RequestBuilder {
9403            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9404            #[doc = ""]
9405            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9406            #[doc = "However, this function can provide more flexibility when required."]
9407            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9408                Box::pin({
9409                    let this = self.clone();
9410                    async move {
9411                        let url = this.url()?;
9412                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
9413                        let bearer_token = this.client.bearer_token().await?;
9414                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9415                        req.insert_header("content-type", "application/json");
9416                        let req_body = azure_core::to_json(&this.parameters)?;
9417                        req.set_body(req_body);
9418                        Ok(Response(this.client.send(&mut req).await?))
9419                    }
9420                })
9421            }
9422            fn url(&self) -> azure_core::Result<azure_core::Url> {
9423                let mut url = self.client.endpoint().clone();
9424                url.set_path(&format!(
9425                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}",
9426                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
9427                ));
9428                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9429                if !has_api_version_already {
9430                    url.query_pairs_mut()
9431                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9432                }
9433                Ok(url)
9434            }
9435        }
9436        impl std::future::IntoFuture for RequestBuilder {
9437            type Output = azure_core::Result<models::AutomationAccount>;
9438            type IntoFuture = BoxFuture<'static, azure_core::Result<models::AutomationAccount>>;
9439            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9440            #[doc = ""]
9441            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9442            #[doc = ""]
9443            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9444            fn into_future(self) -> Self::IntoFuture {
9445                Box::pin(async move { self.send().await?.into_body().await })
9446            }
9447        }
9448    }
9449    pub mod delete {
9450        use super::models;
9451        #[cfg(not(target_arch = "wasm32"))]
9452        use futures::future::BoxFuture;
9453        #[cfg(target_arch = "wasm32")]
9454        use futures::future::LocalBoxFuture as BoxFuture;
9455        #[derive(Debug)]
9456        pub struct Response(azure_core::Response);
9457        impl Response {
9458            pub fn into_raw_response(self) -> azure_core::Response {
9459                self.0
9460            }
9461            pub fn as_raw_response(&self) -> &azure_core::Response {
9462                &self.0
9463            }
9464        }
9465        impl From<Response> for azure_core::Response {
9466            fn from(rsp: Response) -> Self {
9467                rsp.into_raw_response()
9468            }
9469        }
9470        impl AsRef<azure_core::Response> for Response {
9471            fn as_ref(&self) -> &azure_core::Response {
9472                self.as_raw_response()
9473            }
9474        }
9475        #[derive(Clone)]
9476        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9477        #[doc = r""]
9478        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9479        #[doc = r" parameters can be chained."]
9480        #[doc = r""]
9481        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9482        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
9483        #[doc = r" executes the request and returns a `Result` with the parsed"]
9484        #[doc = r" response."]
9485        #[doc = r""]
9486        #[doc = r" In order to execute the request without polling the service"]
9487        #[doc = r" until the operation completes, use `.send().await` instead."]
9488        #[doc = r""]
9489        #[doc = r" If you need lower-level access to the raw response details"]
9490        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9491        #[doc = r" can finalize the request using the"]
9492        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9493        #[doc = r" that resolves to a lower-level [`Response`] value."]
9494        pub struct RequestBuilder {
9495            pub(crate) client: super::super::Client,
9496            pub(crate) resource_group_name: String,
9497            pub(crate) automation_account_name: String,
9498            pub(crate) subscription_id: String,
9499        }
9500        impl RequestBuilder {
9501            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9502            #[doc = ""]
9503            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9504            #[doc = "However, this function can provide more flexibility when required."]
9505            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9506                Box::pin({
9507                    let this = self.clone();
9508                    async move {
9509                        let url = this.url()?;
9510                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
9511                        let bearer_token = this.client.bearer_token().await?;
9512                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9513                        let req_body = azure_core::EMPTY_BODY;
9514                        req.set_body(req_body);
9515                        Ok(Response(this.client.send(&mut req).await?))
9516                    }
9517                })
9518            }
9519            fn url(&self) -> azure_core::Result<azure_core::Url> {
9520                let mut url = self.client.endpoint().clone();
9521                url.set_path(&format!(
9522                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}",
9523                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
9524                ));
9525                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9526                if !has_api_version_already {
9527                    url.query_pairs_mut()
9528                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9529                }
9530                Ok(url)
9531            }
9532        }
9533    }
9534    pub mod list_by_resource_group {
9535        use super::models;
9536        #[cfg(not(target_arch = "wasm32"))]
9537        use futures::future::BoxFuture;
9538        #[cfg(target_arch = "wasm32")]
9539        use futures::future::LocalBoxFuture as BoxFuture;
9540        #[derive(Debug)]
9541        pub struct Response(azure_core::Response);
9542        impl Response {
9543            pub async fn into_body(self) -> azure_core::Result<models::AutomationAccountListResult> {
9544                let bytes = self.0.into_body().collect().await?;
9545                let body: models::AutomationAccountListResult = serde_json::from_slice(&bytes)?;
9546                Ok(body)
9547            }
9548            pub fn into_raw_response(self) -> azure_core::Response {
9549                self.0
9550            }
9551            pub fn as_raw_response(&self) -> &azure_core::Response {
9552                &self.0
9553            }
9554        }
9555        impl From<Response> for azure_core::Response {
9556            fn from(rsp: Response) -> Self {
9557                rsp.into_raw_response()
9558            }
9559        }
9560        impl AsRef<azure_core::Response> for Response {
9561            fn as_ref(&self) -> &azure_core::Response {
9562                self.as_raw_response()
9563            }
9564        }
9565        #[derive(Clone)]
9566        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9567        #[doc = r""]
9568        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9569        #[doc = r" parameters can be chained."]
9570        #[doc = r""]
9571        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9572        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
9573        #[doc = r" executes the request and returns a `Result` with the parsed"]
9574        #[doc = r" response."]
9575        #[doc = r""]
9576        #[doc = r" In order to execute the request without polling the service"]
9577        #[doc = r" until the operation completes, use `.send().await` instead."]
9578        #[doc = r""]
9579        #[doc = r" If you need lower-level access to the raw response details"]
9580        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9581        #[doc = r" can finalize the request using the"]
9582        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9583        #[doc = r" that resolves to a lower-level [`Response`] value."]
9584        pub struct RequestBuilder {
9585            pub(crate) client: super::super::Client,
9586            pub(crate) resource_group_name: String,
9587            pub(crate) subscription_id: String,
9588        }
9589        impl RequestBuilder {
9590            pub fn into_stream(self) -> azure_core::Pageable<models::AutomationAccountListResult, azure_core::error::Error> {
9591                let make_request = move |continuation: Option<String>| {
9592                    let this = self.clone();
9593                    async move {
9594                        let mut url = this.url()?;
9595                        let rsp = match continuation {
9596                            Some(value) => {
9597                                url.set_path("");
9598                                url = url.join(&value)?;
9599                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9600                                let bearer_token = this.client.bearer_token().await?;
9601                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9602                                let has_api_version_already =
9603                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9604                                if !has_api_version_already {
9605                                    req.url_mut()
9606                                        .query_pairs_mut()
9607                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9608                                }
9609                                let req_body = azure_core::EMPTY_BODY;
9610                                req.set_body(req_body);
9611                                this.client.send(&mut req).await?
9612                            }
9613                            None => {
9614                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9615                                let bearer_token = this.client.bearer_token().await?;
9616                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9617                                let req_body = azure_core::EMPTY_BODY;
9618                                req.set_body(req_body);
9619                                this.client.send(&mut req).await?
9620                            }
9621                        };
9622                        let rsp = match rsp.status() {
9623                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
9624                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
9625                                status: status_code,
9626                                error_code: None,
9627                            })),
9628                        };
9629                        rsp?.into_body().await
9630                    }
9631                };
9632                azure_core::Pageable::new(make_request)
9633            }
9634            fn url(&self) -> azure_core::Result<azure_core::Url> {
9635                let mut url = self.client.endpoint().clone();
9636                url.set_path(&format!(
9637                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts",
9638                    &self.subscription_id, &self.resource_group_name
9639                ));
9640                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9641                if !has_api_version_already {
9642                    url.query_pairs_mut()
9643                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9644                }
9645                Ok(url)
9646            }
9647        }
9648    }
9649    pub mod list {
9650        use super::models;
9651        #[cfg(not(target_arch = "wasm32"))]
9652        use futures::future::BoxFuture;
9653        #[cfg(target_arch = "wasm32")]
9654        use futures::future::LocalBoxFuture as BoxFuture;
9655        #[derive(Debug)]
9656        pub struct Response(azure_core::Response);
9657        impl Response {
9658            pub async fn into_body(self) -> azure_core::Result<models::AutomationAccountListResult> {
9659                let bytes = self.0.into_body().collect().await?;
9660                let body: models::AutomationAccountListResult = serde_json::from_slice(&bytes)?;
9661                Ok(body)
9662            }
9663            pub fn into_raw_response(self) -> azure_core::Response {
9664                self.0
9665            }
9666            pub fn as_raw_response(&self) -> &azure_core::Response {
9667                &self.0
9668            }
9669        }
9670        impl From<Response> for azure_core::Response {
9671            fn from(rsp: Response) -> Self {
9672                rsp.into_raw_response()
9673            }
9674        }
9675        impl AsRef<azure_core::Response> for Response {
9676            fn as_ref(&self) -> &azure_core::Response {
9677                self.as_raw_response()
9678            }
9679        }
9680        #[derive(Clone)]
9681        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9682        #[doc = r""]
9683        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9684        #[doc = r" parameters can be chained."]
9685        #[doc = r""]
9686        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9687        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
9688        #[doc = r" executes the request and returns a `Result` with the parsed"]
9689        #[doc = r" response."]
9690        #[doc = r""]
9691        #[doc = r" In order to execute the request without polling the service"]
9692        #[doc = r" until the operation completes, use `.send().await` instead."]
9693        #[doc = r""]
9694        #[doc = r" If you need lower-level access to the raw response details"]
9695        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9696        #[doc = r" can finalize the request using the"]
9697        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9698        #[doc = r" that resolves to a lower-level [`Response`] value."]
9699        pub struct RequestBuilder {
9700            pub(crate) client: super::super::Client,
9701            pub(crate) subscription_id: String,
9702        }
9703        impl RequestBuilder {
9704            pub fn into_stream(self) -> azure_core::Pageable<models::AutomationAccountListResult, azure_core::error::Error> {
9705                let make_request = move |continuation: Option<String>| {
9706                    let this = self.clone();
9707                    async move {
9708                        let mut url = this.url()?;
9709                        let rsp = match continuation {
9710                            Some(value) => {
9711                                url.set_path("");
9712                                url = url.join(&value)?;
9713                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9714                                let bearer_token = this.client.bearer_token().await?;
9715                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9716                                let has_api_version_already =
9717                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9718                                if !has_api_version_already {
9719                                    req.url_mut()
9720                                        .query_pairs_mut()
9721                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9722                                }
9723                                let req_body = azure_core::EMPTY_BODY;
9724                                req.set_body(req_body);
9725                                this.client.send(&mut req).await?
9726                            }
9727                            None => {
9728                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9729                                let bearer_token = this.client.bearer_token().await?;
9730                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9731                                let req_body = azure_core::EMPTY_BODY;
9732                                req.set_body(req_body);
9733                                this.client.send(&mut req).await?
9734                            }
9735                        };
9736                        let rsp = match rsp.status() {
9737                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
9738                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
9739                                status: status_code,
9740                                error_code: None,
9741                            })),
9742                        };
9743                        rsp?.into_body().await
9744                    }
9745                };
9746                azure_core::Pageable::new(make_request)
9747            }
9748            fn url(&self) -> azure_core::Result<azure_core::Url> {
9749                let mut url = self.client.endpoint().clone();
9750                url.set_path(&format!(
9751                    "/subscriptions/{}/providers/Microsoft.Automation/automationAccounts",
9752                    &self.subscription_id
9753                ));
9754                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9755                if !has_api_version_already {
9756                    url.query_pairs_mut()
9757                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9758                }
9759                Ok(url)
9760            }
9761        }
9762    }
9763}
9764pub mod statistics {
9765    use super::models;
9766    #[cfg(not(target_arch = "wasm32"))]
9767    use futures::future::BoxFuture;
9768    #[cfg(target_arch = "wasm32")]
9769    use futures::future::LocalBoxFuture as BoxFuture;
9770    pub struct Client(pub(crate) super::Client);
9771    impl Client {
9772        #[doc = "Retrieve the statistics for the account."]
9773        #[doc = ""]
9774        #[doc = "Arguments:"]
9775        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
9776        #[doc = "* `automation_account_name`: The name of the automation account."]
9777        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
9778        pub fn list_by_automation_account(
9779            &self,
9780            resource_group_name: impl Into<String>,
9781            automation_account_name: impl Into<String>,
9782            subscription_id: impl Into<String>,
9783        ) -> list_by_automation_account::RequestBuilder {
9784            list_by_automation_account::RequestBuilder {
9785                client: self.0.clone(),
9786                resource_group_name: resource_group_name.into(),
9787                automation_account_name: automation_account_name.into(),
9788                subscription_id: subscription_id.into(),
9789                filter: None,
9790            }
9791        }
9792    }
9793    pub mod list_by_automation_account {
9794        use super::models;
9795        #[cfg(not(target_arch = "wasm32"))]
9796        use futures::future::BoxFuture;
9797        #[cfg(target_arch = "wasm32")]
9798        use futures::future::LocalBoxFuture as BoxFuture;
9799        #[derive(Debug)]
9800        pub struct Response(azure_core::Response);
9801        impl Response {
9802            pub async fn into_body(self) -> azure_core::Result<models::StatisticsListResult> {
9803                let bytes = self.0.into_body().collect().await?;
9804                let body: models::StatisticsListResult = serde_json::from_slice(&bytes)?;
9805                Ok(body)
9806            }
9807            pub fn into_raw_response(self) -> azure_core::Response {
9808                self.0
9809            }
9810            pub fn as_raw_response(&self) -> &azure_core::Response {
9811                &self.0
9812            }
9813        }
9814        impl From<Response> for azure_core::Response {
9815            fn from(rsp: Response) -> Self {
9816                rsp.into_raw_response()
9817            }
9818        }
9819        impl AsRef<azure_core::Response> for Response {
9820            fn as_ref(&self) -> &azure_core::Response {
9821                self.as_raw_response()
9822            }
9823        }
9824        #[derive(Clone)]
9825        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9826        #[doc = r""]
9827        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9828        #[doc = r" parameters can be chained."]
9829        #[doc = r""]
9830        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9831        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
9832        #[doc = r" executes the request and returns a `Result` with the parsed"]
9833        #[doc = r" response."]
9834        #[doc = r""]
9835        #[doc = r" In order to execute the request without polling the service"]
9836        #[doc = r" until the operation completes, use `.send().await` instead."]
9837        #[doc = r""]
9838        #[doc = r" If you need lower-level access to the raw response details"]
9839        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9840        #[doc = r" can finalize the request using the"]
9841        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9842        #[doc = r" that resolves to a lower-level [`Response`] value."]
9843        pub struct RequestBuilder {
9844            pub(crate) client: super::super::Client,
9845            pub(crate) resource_group_name: String,
9846            pub(crate) automation_account_name: String,
9847            pub(crate) subscription_id: String,
9848            pub(crate) filter: Option<String>,
9849        }
9850        impl RequestBuilder {
9851            #[doc = "The filter to apply on the operation."]
9852            pub fn filter(mut self, filter: impl Into<String>) -> Self {
9853                self.filter = Some(filter.into());
9854                self
9855            }
9856            #[doc = "Only the first response will be fetched as the continuation token is not part of the response schema"]
9857            #[doc = ""]
9858            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9859            #[doc = ""]
9860            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9861            #[doc = "However, this function can provide more flexibility when required."]
9862            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9863                Box::pin({
9864                    let this = self.clone();
9865                    async move {
9866                        let url = this.url()?;
9867                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9868                        let bearer_token = this.client.bearer_token().await?;
9869                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9870                        if let Some(filter) = &this.filter {
9871                            req.url_mut().query_pairs_mut().append_pair("$filter", filter);
9872                        }
9873                        let req_body = azure_core::EMPTY_BODY;
9874                        req.set_body(req_body);
9875                        Ok(Response(this.client.send(&mut req).await?))
9876                    }
9877                })
9878            }
9879            fn url(&self) -> azure_core::Result<azure_core::Url> {
9880                let mut url = self.client.endpoint().clone();
9881                url.set_path(&format!(
9882                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/statistics",
9883                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
9884                ));
9885                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
9886                if !has_api_version_already {
9887                    url.query_pairs_mut()
9888                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
9889                }
9890                Ok(url)
9891            }
9892        }
9893    }
9894}
9895pub mod usages {
9896    use super::models;
9897    #[cfg(not(target_arch = "wasm32"))]
9898    use futures::future::BoxFuture;
9899    #[cfg(target_arch = "wasm32")]
9900    use futures::future::LocalBoxFuture as BoxFuture;
9901    pub struct Client(pub(crate) super::Client);
9902    impl Client {
9903        #[doc = "Retrieve the usage for the account id."]
9904        #[doc = ""]
9905        #[doc = "Arguments:"]
9906        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
9907        #[doc = "* `automation_account_name`: The name of the automation account."]
9908        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
9909        pub fn list_by_automation_account(
9910            &self,
9911            resource_group_name: impl Into<String>,
9912            automation_account_name: impl Into<String>,
9913            subscription_id: impl Into<String>,
9914        ) -> list_by_automation_account::RequestBuilder {
9915            list_by_automation_account::RequestBuilder {
9916                client: self.0.clone(),
9917                resource_group_name: resource_group_name.into(),
9918                automation_account_name: automation_account_name.into(),
9919                subscription_id: subscription_id.into(),
9920            }
9921        }
9922    }
9923    pub mod list_by_automation_account {
9924        use super::models;
9925        #[cfg(not(target_arch = "wasm32"))]
9926        use futures::future::BoxFuture;
9927        #[cfg(target_arch = "wasm32")]
9928        use futures::future::LocalBoxFuture as BoxFuture;
9929        #[derive(Debug)]
9930        pub struct Response(azure_core::Response);
9931        impl Response {
9932            pub async fn into_body(self) -> azure_core::Result<models::UsageListResult> {
9933                let bytes = self.0.into_body().collect().await?;
9934                let body: models::UsageListResult = serde_json::from_slice(&bytes)?;
9935                Ok(body)
9936            }
9937            pub fn into_raw_response(self) -> azure_core::Response {
9938                self.0
9939            }
9940            pub fn as_raw_response(&self) -> &azure_core::Response {
9941                &self.0
9942            }
9943        }
9944        impl From<Response> for azure_core::Response {
9945            fn from(rsp: Response) -> Self {
9946                rsp.into_raw_response()
9947            }
9948        }
9949        impl AsRef<azure_core::Response> for Response {
9950            fn as_ref(&self) -> &azure_core::Response {
9951                self.as_raw_response()
9952            }
9953        }
9954        #[derive(Clone)]
9955        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9956        #[doc = r""]
9957        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9958        #[doc = r" parameters can be chained."]
9959        #[doc = r""]
9960        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9961        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
9962        #[doc = r" executes the request and returns a `Result` with the parsed"]
9963        #[doc = r" response."]
9964        #[doc = r""]
9965        #[doc = r" In order to execute the request without polling the service"]
9966        #[doc = r" until the operation completes, use `.send().await` instead."]
9967        #[doc = r""]
9968        #[doc = r" If you need lower-level access to the raw response details"]
9969        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9970        #[doc = r" can finalize the request using the"]
9971        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9972        #[doc = r" that resolves to a lower-level [`Response`] value."]
9973        pub struct RequestBuilder {
9974            pub(crate) client: super::super::Client,
9975            pub(crate) resource_group_name: String,
9976            pub(crate) automation_account_name: String,
9977            pub(crate) subscription_id: String,
9978        }
9979        impl RequestBuilder {
9980            #[doc = "Only the first response will be fetched as the continuation token is not part of the response schema"]
9981            #[doc = ""]
9982            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9983            #[doc = ""]
9984            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9985            #[doc = "However, this function can provide more flexibility when required."]
9986            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9987                Box::pin({
9988                    let this = self.clone();
9989                    async move {
9990                        let url = this.url()?;
9991                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9992                        let bearer_token = this.client.bearer_token().await?;
9993                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
9994                        let req_body = azure_core::EMPTY_BODY;
9995                        req.set_body(req_body);
9996                        Ok(Response(this.client.send(&mut req).await?))
9997                    }
9998                })
9999            }
10000            fn url(&self) -> azure_core::Result<azure_core::Url> {
10001                let mut url = self.client.endpoint().clone();
10002                url.set_path(&format!(
10003                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/usages",
10004                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
10005                ));
10006                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10007                if !has_api_version_already {
10008                    url.query_pairs_mut()
10009                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10010                }
10011                Ok(url)
10012            }
10013        }
10014    }
10015}
10016pub mod keys {
10017    use super::models;
10018    #[cfg(not(target_arch = "wasm32"))]
10019    use futures::future::BoxFuture;
10020    #[cfg(target_arch = "wasm32")]
10021    use futures::future::LocalBoxFuture as BoxFuture;
10022    pub struct Client(pub(crate) super::Client);
10023    impl Client {
10024        #[doc = "Retrieve the automation keys for an account."]
10025        #[doc = ""]
10026        #[doc = "Arguments:"]
10027        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10028        #[doc = "* `automation_account_name`: The name of the automation account."]
10029        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10030        pub fn list_by_automation_account(
10031            &self,
10032            resource_group_name: impl Into<String>,
10033            automation_account_name: impl Into<String>,
10034            subscription_id: impl Into<String>,
10035        ) -> list_by_automation_account::RequestBuilder {
10036            list_by_automation_account::RequestBuilder {
10037                client: self.0.clone(),
10038                resource_group_name: resource_group_name.into(),
10039                automation_account_name: automation_account_name.into(),
10040                subscription_id: subscription_id.into(),
10041            }
10042        }
10043    }
10044    pub mod list_by_automation_account {
10045        use super::models;
10046        #[cfg(not(target_arch = "wasm32"))]
10047        use futures::future::BoxFuture;
10048        #[cfg(target_arch = "wasm32")]
10049        use futures::future::LocalBoxFuture as BoxFuture;
10050        #[derive(Debug)]
10051        pub struct Response(azure_core::Response);
10052        impl Response {
10053            pub async fn into_body(self) -> azure_core::Result<models::KeyListResult> {
10054                let bytes = self.0.into_body().collect().await?;
10055                let body: models::KeyListResult = serde_json::from_slice(&bytes)?;
10056                Ok(body)
10057            }
10058            pub fn into_raw_response(self) -> azure_core::Response {
10059                self.0
10060            }
10061            pub fn as_raw_response(&self) -> &azure_core::Response {
10062                &self.0
10063            }
10064        }
10065        impl From<Response> for azure_core::Response {
10066            fn from(rsp: Response) -> Self {
10067                rsp.into_raw_response()
10068            }
10069        }
10070        impl AsRef<azure_core::Response> for Response {
10071            fn as_ref(&self) -> &azure_core::Response {
10072                self.as_raw_response()
10073            }
10074        }
10075        #[derive(Clone)]
10076        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10077        #[doc = r""]
10078        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10079        #[doc = r" parameters can be chained."]
10080        #[doc = r""]
10081        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10082        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
10083        #[doc = r" executes the request and returns a `Result` with the parsed"]
10084        #[doc = r" response."]
10085        #[doc = r""]
10086        #[doc = r" In order to execute the request without polling the service"]
10087        #[doc = r" until the operation completes, use `.send().await` instead."]
10088        #[doc = r""]
10089        #[doc = r" If you need lower-level access to the raw response details"]
10090        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10091        #[doc = r" can finalize the request using the"]
10092        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10093        #[doc = r" that resolves to a lower-level [`Response`] value."]
10094        pub struct RequestBuilder {
10095            pub(crate) client: super::super::Client,
10096            pub(crate) resource_group_name: String,
10097            pub(crate) automation_account_name: String,
10098            pub(crate) subscription_id: String,
10099        }
10100        impl RequestBuilder {
10101            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10102            #[doc = ""]
10103            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10104            #[doc = "However, this function can provide more flexibility when required."]
10105            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10106                Box::pin({
10107                    let this = self.clone();
10108                    async move {
10109                        let url = this.url()?;
10110                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
10111                        let bearer_token = this.client.bearer_token().await?;
10112                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
10113                        let req_body = azure_core::EMPTY_BODY;
10114                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
10115                        req.set_body(req_body);
10116                        Ok(Response(this.client.send(&mut req).await?))
10117                    }
10118                })
10119            }
10120            fn url(&self) -> azure_core::Result<azure_core::Url> {
10121                let mut url = self.client.endpoint().clone();
10122                url.set_path(&format!(
10123                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/listKeys",
10124                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
10125                ));
10126                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10127                if !has_api_version_already {
10128                    url.query_pairs_mut()
10129                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10130                }
10131                Ok(url)
10132            }
10133        }
10134        impl std::future::IntoFuture for RequestBuilder {
10135            type Output = azure_core::Result<models::KeyListResult>;
10136            type IntoFuture = BoxFuture<'static, azure_core::Result<models::KeyListResult>>;
10137            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10138            #[doc = ""]
10139            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10140            #[doc = ""]
10141            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10142            fn into_future(self) -> Self::IntoFuture {
10143                Box::pin(async move { self.send().await?.into_body().await })
10144            }
10145        }
10146    }
10147}
10148pub mod certificate {
10149    use super::models;
10150    #[cfg(not(target_arch = "wasm32"))]
10151    use futures::future::BoxFuture;
10152    #[cfg(target_arch = "wasm32")]
10153    use futures::future::LocalBoxFuture as BoxFuture;
10154    pub struct Client(pub(crate) super::Client);
10155    impl Client {
10156        #[doc = "Retrieve the certificate identified by certificate name."]
10157        #[doc = ""]
10158        #[doc = "Arguments:"]
10159        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10160        #[doc = "* `automation_account_name`: The name of the automation account."]
10161        #[doc = "* `certificate_name`: The name of certificate."]
10162        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10163        pub fn get(
10164            &self,
10165            resource_group_name: impl Into<String>,
10166            automation_account_name: impl Into<String>,
10167            certificate_name: impl Into<String>,
10168            subscription_id: impl Into<String>,
10169        ) -> get::RequestBuilder {
10170            get::RequestBuilder {
10171                client: self.0.clone(),
10172                resource_group_name: resource_group_name.into(),
10173                automation_account_name: automation_account_name.into(),
10174                certificate_name: certificate_name.into(),
10175                subscription_id: subscription_id.into(),
10176            }
10177        }
10178        #[doc = "Create a certificate."]
10179        #[doc = ""]
10180        #[doc = "Arguments:"]
10181        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10182        #[doc = "* `automation_account_name`: The name of the automation account."]
10183        #[doc = "* `certificate_name`: The parameters supplied to the create or update certificate operation."]
10184        #[doc = "* `parameters`: The parameters supplied to the create or update certificate operation."]
10185        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10186        pub fn create_or_update(
10187            &self,
10188            resource_group_name: impl Into<String>,
10189            automation_account_name: impl Into<String>,
10190            certificate_name: impl Into<String>,
10191            parameters: impl Into<models::CertificateCreateOrUpdateParameters>,
10192            subscription_id: impl Into<String>,
10193        ) -> create_or_update::RequestBuilder {
10194            create_or_update::RequestBuilder {
10195                client: self.0.clone(),
10196                resource_group_name: resource_group_name.into(),
10197                automation_account_name: automation_account_name.into(),
10198                certificate_name: certificate_name.into(),
10199                parameters: parameters.into(),
10200                subscription_id: subscription_id.into(),
10201            }
10202        }
10203        #[doc = "Update a certificate."]
10204        #[doc = ""]
10205        #[doc = "Arguments:"]
10206        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10207        #[doc = "* `automation_account_name`: The name of the automation account."]
10208        #[doc = "* `certificate_name`: The parameters supplied to the update certificate operation."]
10209        #[doc = "* `parameters`: The parameters supplied to the update certificate operation."]
10210        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10211        pub fn update(
10212            &self,
10213            resource_group_name: impl Into<String>,
10214            automation_account_name: impl Into<String>,
10215            certificate_name: impl Into<String>,
10216            parameters: impl Into<models::CertificateUpdateParameters>,
10217            subscription_id: impl Into<String>,
10218        ) -> update::RequestBuilder {
10219            update::RequestBuilder {
10220                client: self.0.clone(),
10221                resource_group_name: resource_group_name.into(),
10222                automation_account_name: automation_account_name.into(),
10223                certificate_name: certificate_name.into(),
10224                parameters: parameters.into(),
10225                subscription_id: subscription_id.into(),
10226            }
10227        }
10228        #[doc = "Delete the certificate."]
10229        #[doc = ""]
10230        #[doc = "Arguments:"]
10231        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10232        #[doc = "* `automation_account_name`: The name of the automation account."]
10233        #[doc = "* `certificate_name`: The name of certificate."]
10234        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10235        pub fn delete(
10236            &self,
10237            resource_group_name: impl Into<String>,
10238            automation_account_name: impl Into<String>,
10239            certificate_name: impl Into<String>,
10240            subscription_id: impl Into<String>,
10241        ) -> delete::RequestBuilder {
10242            delete::RequestBuilder {
10243                client: self.0.clone(),
10244                resource_group_name: resource_group_name.into(),
10245                automation_account_name: automation_account_name.into(),
10246                certificate_name: certificate_name.into(),
10247                subscription_id: subscription_id.into(),
10248            }
10249        }
10250        #[doc = "Retrieve a list of certificates."]
10251        #[doc = ""]
10252        #[doc = "Arguments:"]
10253        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10254        #[doc = "* `automation_account_name`: The name of the automation account."]
10255        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10256        pub fn list_by_automation_account(
10257            &self,
10258            resource_group_name: impl Into<String>,
10259            automation_account_name: impl Into<String>,
10260            subscription_id: impl Into<String>,
10261        ) -> list_by_automation_account::RequestBuilder {
10262            list_by_automation_account::RequestBuilder {
10263                client: self.0.clone(),
10264                resource_group_name: resource_group_name.into(),
10265                automation_account_name: automation_account_name.into(),
10266                subscription_id: subscription_id.into(),
10267            }
10268        }
10269    }
10270    pub mod get {
10271        use super::models;
10272        #[cfg(not(target_arch = "wasm32"))]
10273        use futures::future::BoxFuture;
10274        #[cfg(target_arch = "wasm32")]
10275        use futures::future::LocalBoxFuture as BoxFuture;
10276        #[derive(Debug)]
10277        pub struct Response(azure_core::Response);
10278        impl Response {
10279            pub async fn into_body(self) -> azure_core::Result<models::Certificate> {
10280                let bytes = self.0.into_body().collect().await?;
10281                let body: models::Certificate = serde_json::from_slice(&bytes)?;
10282                Ok(body)
10283            }
10284            pub fn into_raw_response(self) -> azure_core::Response {
10285                self.0
10286            }
10287            pub fn as_raw_response(&self) -> &azure_core::Response {
10288                &self.0
10289            }
10290        }
10291        impl From<Response> for azure_core::Response {
10292            fn from(rsp: Response) -> Self {
10293                rsp.into_raw_response()
10294            }
10295        }
10296        impl AsRef<azure_core::Response> for Response {
10297            fn as_ref(&self) -> &azure_core::Response {
10298                self.as_raw_response()
10299            }
10300        }
10301        #[derive(Clone)]
10302        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10303        #[doc = r""]
10304        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10305        #[doc = r" parameters can be chained."]
10306        #[doc = r""]
10307        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10308        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
10309        #[doc = r" executes the request and returns a `Result` with the parsed"]
10310        #[doc = r" response."]
10311        #[doc = r""]
10312        #[doc = r" In order to execute the request without polling the service"]
10313        #[doc = r" until the operation completes, use `.send().await` instead."]
10314        #[doc = r""]
10315        #[doc = r" If you need lower-level access to the raw response details"]
10316        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10317        #[doc = r" can finalize the request using the"]
10318        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10319        #[doc = r" that resolves to a lower-level [`Response`] value."]
10320        pub struct RequestBuilder {
10321            pub(crate) client: super::super::Client,
10322            pub(crate) resource_group_name: String,
10323            pub(crate) automation_account_name: String,
10324            pub(crate) certificate_name: String,
10325            pub(crate) subscription_id: String,
10326        }
10327        impl RequestBuilder {
10328            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10329            #[doc = ""]
10330            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10331            #[doc = "However, this function can provide more flexibility when required."]
10332            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10333                Box::pin({
10334                    let this = self.clone();
10335                    async move {
10336                        let url = this.url()?;
10337                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10338                        let bearer_token = this.client.bearer_token().await?;
10339                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
10340                        let req_body = azure_core::EMPTY_BODY;
10341                        req.set_body(req_body);
10342                        Ok(Response(this.client.send(&mut req).await?))
10343                    }
10344                })
10345            }
10346            fn url(&self) -> azure_core::Result<azure_core::Url> {
10347                let mut url = self.client.endpoint().clone();
10348                url.set_path(&format!(
10349                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/certificates/{}",
10350                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.certificate_name
10351                ));
10352                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10353                if !has_api_version_already {
10354                    url.query_pairs_mut()
10355                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10356                }
10357                Ok(url)
10358            }
10359        }
10360        impl std::future::IntoFuture for RequestBuilder {
10361            type Output = azure_core::Result<models::Certificate>;
10362            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Certificate>>;
10363            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10364            #[doc = ""]
10365            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10366            #[doc = ""]
10367            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10368            fn into_future(self) -> Self::IntoFuture {
10369                Box::pin(async move { self.send().await?.into_body().await })
10370            }
10371        }
10372    }
10373    pub mod create_or_update {
10374        use super::models;
10375        #[cfg(not(target_arch = "wasm32"))]
10376        use futures::future::BoxFuture;
10377        #[cfg(target_arch = "wasm32")]
10378        use futures::future::LocalBoxFuture as BoxFuture;
10379        #[derive(Debug)]
10380        pub struct Response(azure_core::Response);
10381        impl Response {
10382            pub async fn into_body(self) -> azure_core::Result<models::Certificate> {
10383                let bytes = self.0.into_body().collect().await?;
10384                let body: models::Certificate = serde_json::from_slice(&bytes)?;
10385                Ok(body)
10386            }
10387            pub fn into_raw_response(self) -> azure_core::Response {
10388                self.0
10389            }
10390            pub fn as_raw_response(&self) -> &azure_core::Response {
10391                &self.0
10392            }
10393        }
10394        impl From<Response> for azure_core::Response {
10395            fn from(rsp: Response) -> Self {
10396                rsp.into_raw_response()
10397            }
10398        }
10399        impl AsRef<azure_core::Response> for Response {
10400            fn as_ref(&self) -> &azure_core::Response {
10401                self.as_raw_response()
10402            }
10403        }
10404        #[derive(Clone)]
10405        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10406        #[doc = r""]
10407        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10408        #[doc = r" parameters can be chained."]
10409        #[doc = r""]
10410        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10411        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
10412        #[doc = r" executes the request and returns a `Result` with the parsed"]
10413        #[doc = r" response."]
10414        #[doc = r""]
10415        #[doc = r" In order to execute the request without polling the service"]
10416        #[doc = r" until the operation completes, use `.send().await` instead."]
10417        #[doc = r""]
10418        #[doc = r" If you need lower-level access to the raw response details"]
10419        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10420        #[doc = r" can finalize the request using the"]
10421        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10422        #[doc = r" that resolves to a lower-level [`Response`] value."]
10423        pub struct RequestBuilder {
10424            pub(crate) client: super::super::Client,
10425            pub(crate) resource_group_name: String,
10426            pub(crate) automation_account_name: String,
10427            pub(crate) certificate_name: String,
10428            pub(crate) parameters: models::CertificateCreateOrUpdateParameters,
10429            pub(crate) subscription_id: String,
10430        }
10431        impl RequestBuilder {
10432            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10433            #[doc = ""]
10434            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10435            #[doc = "However, this function can provide more flexibility when required."]
10436            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10437                Box::pin({
10438                    let this = self.clone();
10439                    async move {
10440                        let url = this.url()?;
10441                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
10442                        let bearer_token = this.client.bearer_token().await?;
10443                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
10444                        req.insert_header("content-type", "application/json");
10445                        let req_body = azure_core::to_json(&this.parameters)?;
10446                        req.set_body(req_body);
10447                        Ok(Response(this.client.send(&mut req).await?))
10448                    }
10449                })
10450            }
10451            fn url(&self) -> azure_core::Result<azure_core::Url> {
10452                let mut url = self.client.endpoint().clone();
10453                url.set_path(&format!(
10454                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/certificates/{}",
10455                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.certificate_name
10456                ));
10457                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10458                if !has_api_version_already {
10459                    url.query_pairs_mut()
10460                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10461                }
10462                Ok(url)
10463            }
10464        }
10465        impl std::future::IntoFuture for RequestBuilder {
10466            type Output = azure_core::Result<models::Certificate>;
10467            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Certificate>>;
10468            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10469            #[doc = ""]
10470            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10471            #[doc = ""]
10472            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10473            fn into_future(self) -> Self::IntoFuture {
10474                Box::pin(async move { self.send().await?.into_body().await })
10475            }
10476        }
10477    }
10478    pub mod update {
10479        use super::models;
10480        #[cfg(not(target_arch = "wasm32"))]
10481        use futures::future::BoxFuture;
10482        #[cfg(target_arch = "wasm32")]
10483        use futures::future::LocalBoxFuture as BoxFuture;
10484        #[derive(Debug)]
10485        pub struct Response(azure_core::Response);
10486        impl Response {
10487            pub async fn into_body(self) -> azure_core::Result<models::Certificate> {
10488                let bytes = self.0.into_body().collect().await?;
10489                let body: models::Certificate = serde_json::from_slice(&bytes)?;
10490                Ok(body)
10491            }
10492            pub fn into_raw_response(self) -> azure_core::Response {
10493                self.0
10494            }
10495            pub fn as_raw_response(&self) -> &azure_core::Response {
10496                &self.0
10497            }
10498        }
10499        impl From<Response> for azure_core::Response {
10500            fn from(rsp: Response) -> Self {
10501                rsp.into_raw_response()
10502            }
10503        }
10504        impl AsRef<azure_core::Response> for Response {
10505            fn as_ref(&self) -> &azure_core::Response {
10506                self.as_raw_response()
10507            }
10508        }
10509        #[derive(Clone)]
10510        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10511        #[doc = r""]
10512        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10513        #[doc = r" parameters can be chained."]
10514        #[doc = r""]
10515        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10516        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
10517        #[doc = r" executes the request and returns a `Result` with the parsed"]
10518        #[doc = r" response."]
10519        #[doc = r""]
10520        #[doc = r" In order to execute the request without polling the service"]
10521        #[doc = r" until the operation completes, use `.send().await` instead."]
10522        #[doc = r""]
10523        #[doc = r" If you need lower-level access to the raw response details"]
10524        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10525        #[doc = r" can finalize the request using the"]
10526        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10527        #[doc = r" that resolves to a lower-level [`Response`] value."]
10528        pub struct RequestBuilder {
10529            pub(crate) client: super::super::Client,
10530            pub(crate) resource_group_name: String,
10531            pub(crate) automation_account_name: String,
10532            pub(crate) certificate_name: String,
10533            pub(crate) parameters: models::CertificateUpdateParameters,
10534            pub(crate) subscription_id: String,
10535        }
10536        impl RequestBuilder {
10537            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10538            #[doc = ""]
10539            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10540            #[doc = "However, this function can provide more flexibility when required."]
10541            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10542                Box::pin({
10543                    let this = self.clone();
10544                    async move {
10545                        let url = this.url()?;
10546                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
10547                        let bearer_token = this.client.bearer_token().await?;
10548                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
10549                        req.insert_header("content-type", "application/json");
10550                        let req_body = azure_core::to_json(&this.parameters)?;
10551                        req.set_body(req_body);
10552                        Ok(Response(this.client.send(&mut req).await?))
10553                    }
10554                })
10555            }
10556            fn url(&self) -> azure_core::Result<azure_core::Url> {
10557                let mut url = self.client.endpoint().clone();
10558                url.set_path(&format!(
10559                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/certificates/{}",
10560                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.certificate_name
10561                ));
10562                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10563                if !has_api_version_already {
10564                    url.query_pairs_mut()
10565                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10566                }
10567                Ok(url)
10568            }
10569        }
10570        impl std::future::IntoFuture for RequestBuilder {
10571            type Output = azure_core::Result<models::Certificate>;
10572            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Certificate>>;
10573            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10574            #[doc = ""]
10575            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10576            #[doc = ""]
10577            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10578            fn into_future(self) -> Self::IntoFuture {
10579                Box::pin(async move { self.send().await?.into_body().await })
10580            }
10581        }
10582    }
10583    pub mod delete {
10584        use super::models;
10585        #[cfg(not(target_arch = "wasm32"))]
10586        use futures::future::BoxFuture;
10587        #[cfg(target_arch = "wasm32")]
10588        use futures::future::LocalBoxFuture as BoxFuture;
10589        #[derive(Debug)]
10590        pub struct Response(azure_core::Response);
10591        impl Response {
10592            pub fn into_raw_response(self) -> azure_core::Response {
10593                self.0
10594            }
10595            pub fn as_raw_response(&self) -> &azure_core::Response {
10596                &self.0
10597            }
10598        }
10599        impl From<Response> for azure_core::Response {
10600            fn from(rsp: Response) -> Self {
10601                rsp.into_raw_response()
10602            }
10603        }
10604        impl AsRef<azure_core::Response> for Response {
10605            fn as_ref(&self) -> &azure_core::Response {
10606                self.as_raw_response()
10607            }
10608        }
10609        #[derive(Clone)]
10610        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10611        #[doc = r""]
10612        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10613        #[doc = r" parameters can be chained."]
10614        #[doc = r""]
10615        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10616        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
10617        #[doc = r" executes the request and returns a `Result` with the parsed"]
10618        #[doc = r" response."]
10619        #[doc = r""]
10620        #[doc = r" In order to execute the request without polling the service"]
10621        #[doc = r" until the operation completes, use `.send().await` instead."]
10622        #[doc = r""]
10623        #[doc = r" If you need lower-level access to the raw response details"]
10624        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10625        #[doc = r" can finalize the request using the"]
10626        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10627        #[doc = r" that resolves to a lower-level [`Response`] value."]
10628        pub struct RequestBuilder {
10629            pub(crate) client: super::super::Client,
10630            pub(crate) resource_group_name: String,
10631            pub(crate) automation_account_name: String,
10632            pub(crate) certificate_name: String,
10633            pub(crate) subscription_id: String,
10634        }
10635        impl RequestBuilder {
10636            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10637            #[doc = ""]
10638            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10639            #[doc = "However, this function can provide more flexibility when required."]
10640            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10641                Box::pin({
10642                    let this = self.clone();
10643                    async move {
10644                        let url = this.url()?;
10645                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
10646                        let bearer_token = this.client.bearer_token().await?;
10647                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
10648                        let req_body = azure_core::EMPTY_BODY;
10649                        req.set_body(req_body);
10650                        Ok(Response(this.client.send(&mut req).await?))
10651                    }
10652                })
10653            }
10654            fn url(&self) -> azure_core::Result<azure_core::Url> {
10655                let mut url = self.client.endpoint().clone();
10656                url.set_path(&format!(
10657                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/certificates/{}",
10658                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.certificate_name
10659                ));
10660                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10661                if !has_api_version_already {
10662                    url.query_pairs_mut()
10663                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10664                }
10665                Ok(url)
10666            }
10667        }
10668    }
10669    pub mod list_by_automation_account {
10670        use super::models;
10671        #[cfg(not(target_arch = "wasm32"))]
10672        use futures::future::BoxFuture;
10673        #[cfg(target_arch = "wasm32")]
10674        use futures::future::LocalBoxFuture as BoxFuture;
10675        #[derive(Debug)]
10676        pub struct Response(azure_core::Response);
10677        impl Response {
10678            pub async fn into_body(self) -> azure_core::Result<models::CertificateListResult> {
10679                let bytes = self.0.into_body().collect().await?;
10680                let body: models::CertificateListResult = serde_json::from_slice(&bytes)?;
10681                Ok(body)
10682            }
10683            pub fn into_raw_response(self) -> azure_core::Response {
10684                self.0
10685            }
10686            pub fn as_raw_response(&self) -> &azure_core::Response {
10687                &self.0
10688            }
10689        }
10690        impl From<Response> for azure_core::Response {
10691            fn from(rsp: Response) -> Self {
10692                rsp.into_raw_response()
10693            }
10694        }
10695        impl AsRef<azure_core::Response> for Response {
10696            fn as_ref(&self) -> &azure_core::Response {
10697                self.as_raw_response()
10698            }
10699        }
10700        #[derive(Clone)]
10701        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10702        #[doc = r""]
10703        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10704        #[doc = r" parameters can be chained."]
10705        #[doc = r""]
10706        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10707        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
10708        #[doc = r" executes the request and returns a `Result` with the parsed"]
10709        #[doc = r" response."]
10710        #[doc = r""]
10711        #[doc = r" In order to execute the request without polling the service"]
10712        #[doc = r" until the operation completes, use `.send().await` instead."]
10713        #[doc = r""]
10714        #[doc = r" If you need lower-level access to the raw response details"]
10715        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10716        #[doc = r" can finalize the request using the"]
10717        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10718        #[doc = r" that resolves to a lower-level [`Response`] value."]
10719        pub struct RequestBuilder {
10720            pub(crate) client: super::super::Client,
10721            pub(crate) resource_group_name: String,
10722            pub(crate) automation_account_name: String,
10723            pub(crate) subscription_id: String,
10724        }
10725        impl RequestBuilder {
10726            pub fn into_stream(self) -> azure_core::Pageable<models::CertificateListResult, azure_core::error::Error> {
10727                let make_request = move |continuation: Option<String>| {
10728                    let this = self.clone();
10729                    async move {
10730                        let mut url = this.url()?;
10731                        let rsp = match continuation {
10732                            Some(value) => {
10733                                url.set_path("");
10734                                url = url.join(&value)?;
10735                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10736                                let bearer_token = this.client.bearer_token().await?;
10737                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
10738                                let has_api_version_already =
10739                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10740                                if !has_api_version_already {
10741                                    req.url_mut()
10742                                        .query_pairs_mut()
10743                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10744                                }
10745                                let req_body = azure_core::EMPTY_BODY;
10746                                req.set_body(req_body);
10747                                this.client.send(&mut req).await?
10748                            }
10749                            None => {
10750                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10751                                let bearer_token = this.client.bearer_token().await?;
10752                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
10753                                let req_body = azure_core::EMPTY_BODY;
10754                                req.set_body(req_body);
10755                                this.client.send(&mut req).await?
10756                            }
10757                        };
10758                        let rsp = match rsp.status() {
10759                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
10760                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
10761                                status: status_code,
10762                                error_code: None,
10763                            })),
10764                        };
10765                        rsp?.into_body().await
10766                    }
10767                };
10768                azure_core::Pageable::new(make_request)
10769            }
10770            fn url(&self) -> azure_core::Result<azure_core::Url> {
10771                let mut url = self.client.endpoint().clone();
10772                url.set_path(&format!(
10773                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/certificates",
10774                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
10775                ));
10776                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10777                if !has_api_version_already {
10778                    url.query_pairs_mut()
10779                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10780                }
10781                Ok(url)
10782            }
10783        }
10784    }
10785}
10786pub mod connection {
10787    use super::models;
10788    #[cfg(not(target_arch = "wasm32"))]
10789    use futures::future::BoxFuture;
10790    #[cfg(target_arch = "wasm32")]
10791    use futures::future::LocalBoxFuture as BoxFuture;
10792    pub struct Client(pub(crate) super::Client);
10793    impl Client {
10794        #[doc = "Retrieve the connection identified by connection name."]
10795        #[doc = ""]
10796        #[doc = "Arguments:"]
10797        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10798        #[doc = "* `automation_account_name`: The name of the automation account."]
10799        #[doc = "* `connection_name`: The name of connection."]
10800        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10801        pub fn get(
10802            &self,
10803            resource_group_name: impl Into<String>,
10804            automation_account_name: impl Into<String>,
10805            connection_name: impl Into<String>,
10806            subscription_id: impl Into<String>,
10807        ) -> get::RequestBuilder {
10808            get::RequestBuilder {
10809                client: self.0.clone(),
10810                resource_group_name: resource_group_name.into(),
10811                automation_account_name: automation_account_name.into(),
10812                connection_name: connection_name.into(),
10813                subscription_id: subscription_id.into(),
10814            }
10815        }
10816        #[doc = "Create or update a connection."]
10817        #[doc = ""]
10818        #[doc = "Arguments:"]
10819        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10820        #[doc = "* `automation_account_name`: The name of the automation account."]
10821        #[doc = "* `connection_name`: The parameters supplied to the create or update connection operation."]
10822        #[doc = "* `parameters`: The parameters supplied to the create or update connection operation."]
10823        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10824        pub fn create_or_update(
10825            &self,
10826            resource_group_name: impl Into<String>,
10827            automation_account_name: impl Into<String>,
10828            connection_name: impl Into<String>,
10829            parameters: impl Into<models::ConnectionCreateOrUpdateParameters>,
10830            subscription_id: impl Into<String>,
10831        ) -> create_or_update::RequestBuilder {
10832            create_or_update::RequestBuilder {
10833                client: self.0.clone(),
10834                resource_group_name: resource_group_name.into(),
10835                automation_account_name: automation_account_name.into(),
10836                connection_name: connection_name.into(),
10837                parameters: parameters.into(),
10838                subscription_id: subscription_id.into(),
10839            }
10840        }
10841        #[doc = "Update a connection."]
10842        #[doc = ""]
10843        #[doc = "Arguments:"]
10844        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10845        #[doc = "* `automation_account_name`: The name of the automation account."]
10846        #[doc = "* `connection_name`: The parameters supplied to the update a connection operation."]
10847        #[doc = "* `parameters`: The parameters supplied to the update a connection operation."]
10848        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10849        pub fn update(
10850            &self,
10851            resource_group_name: impl Into<String>,
10852            automation_account_name: impl Into<String>,
10853            connection_name: impl Into<String>,
10854            parameters: impl Into<models::ConnectionUpdateParameters>,
10855            subscription_id: impl Into<String>,
10856        ) -> update::RequestBuilder {
10857            update::RequestBuilder {
10858                client: self.0.clone(),
10859                resource_group_name: resource_group_name.into(),
10860                automation_account_name: automation_account_name.into(),
10861                connection_name: connection_name.into(),
10862                parameters: parameters.into(),
10863                subscription_id: subscription_id.into(),
10864            }
10865        }
10866        #[doc = "Delete the connection."]
10867        #[doc = ""]
10868        #[doc = "Arguments:"]
10869        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10870        #[doc = "* `automation_account_name`: The name of the automation account."]
10871        #[doc = "* `connection_name`: The name of connection."]
10872        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10873        pub fn delete(
10874            &self,
10875            resource_group_name: impl Into<String>,
10876            automation_account_name: impl Into<String>,
10877            connection_name: impl Into<String>,
10878            subscription_id: impl Into<String>,
10879        ) -> delete::RequestBuilder {
10880            delete::RequestBuilder {
10881                client: self.0.clone(),
10882                resource_group_name: resource_group_name.into(),
10883                automation_account_name: automation_account_name.into(),
10884                connection_name: connection_name.into(),
10885                subscription_id: subscription_id.into(),
10886            }
10887        }
10888        #[doc = "Retrieve a list of connections."]
10889        #[doc = ""]
10890        #[doc = "Arguments:"]
10891        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
10892        #[doc = "* `automation_account_name`: The name of the automation account."]
10893        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
10894        pub fn list_by_automation_account(
10895            &self,
10896            resource_group_name: impl Into<String>,
10897            automation_account_name: impl Into<String>,
10898            subscription_id: impl Into<String>,
10899        ) -> list_by_automation_account::RequestBuilder {
10900            list_by_automation_account::RequestBuilder {
10901                client: self.0.clone(),
10902                resource_group_name: resource_group_name.into(),
10903                automation_account_name: automation_account_name.into(),
10904                subscription_id: subscription_id.into(),
10905            }
10906        }
10907    }
10908    pub mod get {
10909        use super::models;
10910        #[cfg(not(target_arch = "wasm32"))]
10911        use futures::future::BoxFuture;
10912        #[cfg(target_arch = "wasm32")]
10913        use futures::future::LocalBoxFuture as BoxFuture;
10914        #[derive(Debug)]
10915        pub struct Response(azure_core::Response);
10916        impl Response {
10917            pub async fn into_body(self) -> azure_core::Result<models::Connection> {
10918                let bytes = self.0.into_body().collect().await?;
10919                let body: models::Connection = serde_json::from_slice(&bytes)?;
10920                Ok(body)
10921            }
10922            pub fn into_raw_response(self) -> azure_core::Response {
10923                self.0
10924            }
10925            pub fn as_raw_response(&self) -> &azure_core::Response {
10926                &self.0
10927            }
10928        }
10929        impl From<Response> for azure_core::Response {
10930            fn from(rsp: Response) -> Self {
10931                rsp.into_raw_response()
10932            }
10933        }
10934        impl AsRef<azure_core::Response> for Response {
10935            fn as_ref(&self) -> &azure_core::Response {
10936                self.as_raw_response()
10937            }
10938        }
10939        #[derive(Clone)]
10940        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10941        #[doc = r""]
10942        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10943        #[doc = r" parameters can be chained."]
10944        #[doc = r""]
10945        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10946        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
10947        #[doc = r" executes the request and returns a `Result` with the parsed"]
10948        #[doc = r" response."]
10949        #[doc = r""]
10950        #[doc = r" In order to execute the request without polling the service"]
10951        #[doc = r" until the operation completes, use `.send().await` instead."]
10952        #[doc = r""]
10953        #[doc = r" If you need lower-level access to the raw response details"]
10954        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10955        #[doc = r" can finalize the request using the"]
10956        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10957        #[doc = r" that resolves to a lower-level [`Response`] value."]
10958        pub struct RequestBuilder {
10959            pub(crate) client: super::super::Client,
10960            pub(crate) resource_group_name: String,
10961            pub(crate) automation_account_name: String,
10962            pub(crate) connection_name: String,
10963            pub(crate) subscription_id: String,
10964        }
10965        impl RequestBuilder {
10966            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10967            #[doc = ""]
10968            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10969            #[doc = "However, this function can provide more flexibility when required."]
10970            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10971                Box::pin({
10972                    let this = self.clone();
10973                    async move {
10974                        let url = this.url()?;
10975                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10976                        let bearer_token = this.client.bearer_token().await?;
10977                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
10978                        let req_body = azure_core::EMPTY_BODY;
10979                        req.set_body(req_body);
10980                        Ok(Response(this.client.send(&mut req).await?))
10981                    }
10982                })
10983            }
10984            fn url(&self) -> azure_core::Result<azure_core::Url> {
10985                let mut url = self.client.endpoint().clone();
10986                url.set_path(&format!(
10987                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connections/{}",
10988                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.connection_name
10989                ));
10990                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
10991                if !has_api_version_already {
10992                    url.query_pairs_mut()
10993                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
10994                }
10995                Ok(url)
10996            }
10997        }
10998        impl std::future::IntoFuture for RequestBuilder {
10999            type Output = azure_core::Result<models::Connection>;
11000            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Connection>>;
11001            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11002            #[doc = ""]
11003            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11004            #[doc = ""]
11005            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11006            fn into_future(self) -> Self::IntoFuture {
11007                Box::pin(async move { self.send().await?.into_body().await })
11008            }
11009        }
11010    }
11011    pub mod create_or_update {
11012        use super::models;
11013        #[cfg(not(target_arch = "wasm32"))]
11014        use futures::future::BoxFuture;
11015        #[cfg(target_arch = "wasm32")]
11016        use futures::future::LocalBoxFuture as BoxFuture;
11017        #[derive(Debug)]
11018        pub struct Response(azure_core::Response);
11019        impl Response {
11020            pub async fn into_body(self) -> azure_core::Result<models::Connection> {
11021                let bytes = self.0.into_body().collect().await?;
11022                let body: models::Connection = serde_json::from_slice(&bytes)?;
11023                Ok(body)
11024            }
11025            pub fn into_raw_response(self) -> azure_core::Response {
11026                self.0
11027            }
11028            pub fn as_raw_response(&self) -> &azure_core::Response {
11029                &self.0
11030            }
11031        }
11032        impl From<Response> for azure_core::Response {
11033            fn from(rsp: Response) -> Self {
11034                rsp.into_raw_response()
11035            }
11036        }
11037        impl AsRef<azure_core::Response> for Response {
11038            fn as_ref(&self) -> &azure_core::Response {
11039                self.as_raw_response()
11040            }
11041        }
11042        #[derive(Clone)]
11043        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11044        #[doc = r""]
11045        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11046        #[doc = r" parameters can be chained."]
11047        #[doc = r""]
11048        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11049        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
11050        #[doc = r" executes the request and returns a `Result` with the parsed"]
11051        #[doc = r" response."]
11052        #[doc = r""]
11053        #[doc = r" In order to execute the request without polling the service"]
11054        #[doc = r" until the operation completes, use `.send().await` instead."]
11055        #[doc = r""]
11056        #[doc = r" If you need lower-level access to the raw response details"]
11057        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11058        #[doc = r" can finalize the request using the"]
11059        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11060        #[doc = r" that resolves to a lower-level [`Response`] value."]
11061        pub struct RequestBuilder {
11062            pub(crate) client: super::super::Client,
11063            pub(crate) resource_group_name: String,
11064            pub(crate) automation_account_name: String,
11065            pub(crate) connection_name: String,
11066            pub(crate) parameters: models::ConnectionCreateOrUpdateParameters,
11067            pub(crate) subscription_id: String,
11068        }
11069        impl RequestBuilder {
11070            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11071            #[doc = ""]
11072            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11073            #[doc = "However, this function can provide more flexibility when required."]
11074            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11075                Box::pin({
11076                    let this = self.clone();
11077                    async move {
11078                        let url = this.url()?;
11079                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
11080                        let bearer_token = this.client.bearer_token().await?;
11081                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11082                        req.insert_header("content-type", "application/json");
11083                        let req_body = azure_core::to_json(&this.parameters)?;
11084                        req.set_body(req_body);
11085                        Ok(Response(this.client.send(&mut req).await?))
11086                    }
11087                })
11088            }
11089            fn url(&self) -> azure_core::Result<azure_core::Url> {
11090                let mut url = self.client.endpoint().clone();
11091                url.set_path(&format!(
11092                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connections/{}",
11093                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.connection_name
11094                ));
11095                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11096                if !has_api_version_already {
11097                    url.query_pairs_mut()
11098                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11099                }
11100                Ok(url)
11101            }
11102        }
11103        impl std::future::IntoFuture for RequestBuilder {
11104            type Output = azure_core::Result<models::Connection>;
11105            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Connection>>;
11106            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11107            #[doc = ""]
11108            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11109            #[doc = ""]
11110            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11111            fn into_future(self) -> Self::IntoFuture {
11112                Box::pin(async move { self.send().await?.into_body().await })
11113            }
11114        }
11115    }
11116    pub mod update {
11117        use super::models;
11118        #[cfg(not(target_arch = "wasm32"))]
11119        use futures::future::BoxFuture;
11120        #[cfg(target_arch = "wasm32")]
11121        use futures::future::LocalBoxFuture as BoxFuture;
11122        #[derive(Debug)]
11123        pub struct Response(azure_core::Response);
11124        impl Response {
11125            pub async fn into_body(self) -> azure_core::Result<models::Connection> {
11126                let bytes = self.0.into_body().collect().await?;
11127                let body: models::Connection = serde_json::from_slice(&bytes)?;
11128                Ok(body)
11129            }
11130            pub fn into_raw_response(self) -> azure_core::Response {
11131                self.0
11132            }
11133            pub fn as_raw_response(&self) -> &azure_core::Response {
11134                &self.0
11135            }
11136        }
11137        impl From<Response> for azure_core::Response {
11138            fn from(rsp: Response) -> Self {
11139                rsp.into_raw_response()
11140            }
11141        }
11142        impl AsRef<azure_core::Response> for Response {
11143            fn as_ref(&self) -> &azure_core::Response {
11144                self.as_raw_response()
11145            }
11146        }
11147        #[derive(Clone)]
11148        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11149        #[doc = r""]
11150        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11151        #[doc = r" parameters can be chained."]
11152        #[doc = r""]
11153        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11154        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
11155        #[doc = r" executes the request and returns a `Result` with the parsed"]
11156        #[doc = r" response."]
11157        #[doc = r""]
11158        #[doc = r" In order to execute the request without polling the service"]
11159        #[doc = r" until the operation completes, use `.send().await` instead."]
11160        #[doc = r""]
11161        #[doc = r" If you need lower-level access to the raw response details"]
11162        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11163        #[doc = r" can finalize the request using the"]
11164        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11165        #[doc = r" that resolves to a lower-level [`Response`] value."]
11166        pub struct RequestBuilder {
11167            pub(crate) client: super::super::Client,
11168            pub(crate) resource_group_name: String,
11169            pub(crate) automation_account_name: String,
11170            pub(crate) connection_name: String,
11171            pub(crate) parameters: models::ConnectionUpdateParameters,
11172            pub(crate) subscription_id: String,
11173        }
11174        impl RequestBuilder {
11175            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11176            #[doc = ""]
11177            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11178            #[doc = "However, this function can provide more flexibility when required."]
11179            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11180                Box::pin({
11181                    let this = self.clone();
11182                    async move {
11183                        let url = this.url()?;
11184                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
11185                        let bearer_token = this.client.bearer_token().await?;
11186                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11187                        req.insert_header("content-type", "application/json");
11188                        let req_body = azure_core::to_json(&this.parameters)?;
11189                        req.set_body(req_body);
11190                        Ok(Response(this.client.send(&mut req).await?))
11191                    }
11192                })
11193            }
11194            fn url(&self) -> azure_core::Result<azure_core::Url> {
11195                let mut url = self.client.endpoint().clone();
11196                url.set_path(&format!(
11197                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connections/{}",
11198                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.connection_name
11199                ));
11200                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11201                if !has_api_version_already {
11202                    url.query_pairs_mut()
11203                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11204                }
11205                Ok(url)
11206            }
11207        }
11208        impl std::future::IntoFuture for RequestBuilder {
11209            type Output = azure_core::Result<models::Connection>;
11210            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Connection>>;
11211            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11212            #[doc = ""]
11213            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11214            #[doc = ""]
11215            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11216            fn into_future(self) -> Self::IntoFuture {
11217                Box::pin(async move { self.send().await?.into_body().await })
11218            }
11219        }
11220    }
11221    pub mod delete {
11222        use super::models;
11223        #[cfg(not(target_arch = "wasm32"))]
11224        use futures::future::BoxFuture;
11225        #[cfg(target_arch = "wasm32")]
11226        use futures::future::LocalBoxFuture as BoxFuture;
11227        #[derive(Debug)]
11228        pub struct Response(azure_core::Response);
11229        impl Response {
11230            pub fn into_raw_response(self) -> azure_core::Response {
11231                self.0
11232            }
11233            pub fn as_raw_response(&self) -> &azure_core::Response {
11234                &self.0
11235            }
11236        }
11237        impl From<Response> for azure_core::Response {
11238            fn from(rsp: Response) -> Self {
11239                rsp.into_raw_response()
11240            }
11241        }
11242        impl AsRef<azure_core::Response> for Response {
11243            fn as_ref(&self) -> &azure_core::Response {
11244                self.as_raw_response()
11245            }
11246        }
11247        #[derive(Clone)]
11248        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11249        #[doc = r""]
11250        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11251        #[doc = r" parameters can be chained."]
11252        #[doc = r""]
11253        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11254        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
11255        #[doc = r" executes the request and returns a `Result` with the parsed"]
11256        #[doc = r" response."]
11257        #[doc = r""]
11258        #[doc = r" In order to execute the request without polling the service"]
11259        #[doc = r" until the operation completes, use `.send().await` instead."]
11260        #[doc = r""]
11261        #[doc = r" If you need lower-level access to the raw response details"]
11262        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11263        #[doc = r" can finalize the request using the"]
11264        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11265        #[doc = r" that resolves to a lower-level [`Response`] value."]
11266        pub struct RequestBuilder {
11267            pub(crate) client: super::super::Client,
11268            pub(crate) resource_group_name: String,
11269            pub(crate) automation_account_name: String,
11270            pub(crate) connection_name: String,
11271            pub(crate) subscription_id: String,
11272        }
11273        impl RequestBuilder {
11274            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11275            #[doc = ""]
11276            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11277            #[doc = "However, this function can provide more flexibility when required."]
11278            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11279                Box::pin({
11280                    let this = self.clone();
11281                    async move {
11282                        let url = this.url()?;
11283                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
11284                        let bearer_token = this.client.bearer_token().await?;
11285                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11286                        let req_body = azure_core::EMPTY_BODY;
11287                        req.set_body(req_body);
11288                        Ok(Response(this.client.send(&mut req).await?))
11289                    }
11290                })
11291            }
11292            fn url(&self) -> azure_core::Result<azure_core::Url> {
11293                let mut url = self.client.endpoint().clone();
11294                url.set_path(&format!(
11295                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connections/{}",
11296                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.connection_name
11297                ));
11298                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11299                if !has_api_version_already {
11300                    url.query_pairs_mut()
11301                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11302                }
11303                Ok(url)
11304            }
11305        }
11306    }
11307    pub mod list_by_automation_account {
11308        use super::models;
11309        #[cfg(not(target_arch = "wasm32"))]
11310        use futures::future::BoxFuture;
11311        #[cfg(target_arch = "wasm32")]
11312        use futures::future::LocalBoxFuture as BoxFuture;
11313        #[derive(Debug)]
11314        pub struct Response(azure_core::Response);
11315        impl Response {
11316            pub async fn into_body(self) -> azure_core::Result<models::ConnectionListResult> {
11317                let bytes = self.0.into_body().collect().await?;
11318                let body: models::ConnectionListResult = serde_json::from_slice(&bytes)?;
11319                Ok(body)
11320            }
11321            pub fn into_raw_response(self) -> azure_core::Response {
11322                self.0
11323            }
11324            pub fn as_raw_response(&self) -> &azure_core::Response {
11325                &self.0
11326            }
11327        }
11328        impl From<Response> for azure_core::Response {
11329            fn from(rsp: Response) -> Self {
11330                rsp.into_raw_response()
11331            }
11332        }
11333        impl AsRef<azure_core::Response> for Response {
11334            fn as_ref(&self) -> &azure_core::Response {
11335                self.as_raw_response()
11336            }
11337        }
11338        #[derive(Clone)]
11339        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11340        #[doc = r""]
11341        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11342        #[doc = r" parameters can be chained."]
11343        #[doc = r""]
11344        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11345        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
11346        #[doc = r" executes the request and returns a `Result` with the parsed"]
11347        #[doc = r" response."]
11348        #[doc = r""]
11349        #[doc = r" In order to execute the request without polling the service"]
11350        #[doc = r" until the operation completes, use `.send().await` instead."]
11351        #[doc = r""]
11352        #[doc = r" If you need lower-level access to the raw response details"]
11353        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11354        #[doc = r" can finalize the request using the"]
11355        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11356        #[doc = r" that resolves to a lower-level [`Response`] value."]
11357        pub struct RequestBuilder {
11358            pub(crate) client: super::super::Client,
11359            pub(crate) resource_group_name: String,
11360            pub(crate) automation_account_name: String,
11361            pub(crate) subscription_id: String,
11362        }
11363        impl RequestBuilder {
11364            pub fn into_stream(self) -> azure_core::Pageable<models::ConnectionListResult, azure_core::error::Error> {
11365                let make_request = move |continuation: Option<String>| {
11366                    let this = self.clone();
11367                    async move {
11368                        let mut url = this.url()?;
11369                        let rsp = match continuation {
11370                            Some(value) => {
11371                                url.set_path("");
11372                                url = url.join(&value)?;
11373                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
11374                                let bearer_token = this.client.bearer_token().await?;
11375                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11376                                let has_api_version_already =
11377                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11378                                if !has_api_version_already {
11379                                    req.url_mut()
11380                                        .query_pairs_mut()
11381                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11382                                }
11383                                let req_body = azure_core::EMPTY_BODY;
11384                                req.set_body(req_body);
11385                                this.client.send(&mut req).await?
11386                            }
11387                            None => {
11388                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
11389                                let bearer_token = this.client.bearer_token().await?;
11390                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11391                                let req_body = azure_core::EMPTY_BODY;
11392                                req.set_body(req_body);
11393                                this.client.send(&mut req).await?
11394                            }
11395                        };
11396                        let rsp = match rsp.status() {
11397                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
11398                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
11399                                status: status_code,
11400                                error_code: None,
11401                            })),
11402                        };
11403                        rsp?.into_body().await
11404                    }
11405                };
11406                azure_core::Pageable::new(make_request)
11407            }
11408            fn url(&self) -> azure_core::Result<azure_core::Url> {
11409                let mut url = self.client.endpoint().clone();
11410                url.set_path(&format!(
11411                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connections",
11412                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
11413                ));
11414                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11415                if !has_api_version_already {
11416                    url.query_pairs_mut()
11417                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11418                }
11419                Ok(url)
11420            }
11421        }
11422    }
11423}
11424pub mod connection_type {
11425    use super::models;
11426    #[cfg(not(target_arch = "wasm32"))]
11427    use futures::future::BoxFuture;
11428    #[cfg(target_arch = "wasm32")]
11429    use futures::future::LocalBoxFuture as BoxFuture;
11430    pub struct Client(pub(crate) super::Client);
11431    impl Client {
11432        #[doc = "Retrieve the connection type identified by connection type name."]
11433        #[doc = ""]
11434        #[doc = "Arguments:"]
11435        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
11436        #[doc = "* `automation_account_name`: The name of the automation account."]
11437        #[doc = "* `connection_type_name`: The name of connection type."]
11438        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
11439        pub fn get(
11440            &self,
11441            resource_group_name: impl Into<String>,
11442            automation_account_name: impl Into<String>,
11443            connection_type_name: impl Into<String>,
11444            subscription_id: impl Into<String>,
11445        ) -> get::RequestBuilder {
11446            get::RequestBuilder {
11447                client: self.0.clone(),
11448                resource_group_name: resource_group_name.into(),
11449                automation_account_name: automation_account_name.into(),
11450                connection_type_name: connection_type_name.into(),
11451                subscription_id: subscription_id.into(),
11452            }
11453        }
11454        #[doc = "Create a connection type."]
11455        #[doc = ""]
11456        #[doc = "Arguments:"]
11457        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
11458        #[doc = "* `automation_account_name`: The name of the automation account."]
11459        #[doc = "* `connection_type_name`: The parameters supplied to the create or update connection type operation."]
11460        #[doc = "* `parameters`: The parameters supplied to the create or update connection type operation."]
11461        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
11462        pub fn create_or_update(
11463            &self,
11464            resource_group_name: impl Into<String>,
11465            automation_account_name: impl Into<String>,
11466            connection_type_name: impl Into<String>,
11467            parameters: impl Into<models::ConnectionTypeCreateOrUpdateParameters>,
11468            subscription_id: impl Into<String>,
11469        ) -> create_or_update::RequestBuilder {
11470            create_or_update::RequestBuilder {
11471                client: self.0.clone(),
11472                resource_group_name: resource_group_name.into(),
11473                automation_account_name: automation_account_name.into(),
11474                connection_type_name: connection_type_name.into(),
11475                parameters: parameters.into(),
11476                subscription_id: subscription_id.into(),
11477            }
11478        }
11479        #[doc = "Delete the connection type."]
11480        #[doc = ""]
11481        #[doc = "Arguments:"]
11482        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
11483        #[doc = "* `automation_account_name`: The name of the automation account."]
11484        #[doc = "* `connection_type_name`: The name of connection type."]
11485        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
11486        pub fn delete(
11487            &self,
11488            resource_group_name: impl Into<String>,
11489            automation_account_name: impl Into<String>,
11490            connection_type_name: impl Into<String>,
11491            subscription_id: impl Into<String>,
11492        ) -> delete::RequestBuilder {
11493            delete::RequestBuilder {
11494                client: self.0.clone(),
11495                resource_group_name: resource_group_name.into(),
11496                automation_account_name: automation_account_name.into(),
11497                connection_type_name: connection_type_name.into(),
11498                subscription_id: subscription_id.into(),
11499            }
11500        }
11501        #[doc = "Retrieve a list of connection types."]
11502        #[doc = ""]
11503        #[doc = "Arguments:"]
11504        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
11505        #[doc = "* `automation_account_name`: The name of the automation account."]
11506        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
11507        pub fn list_by_automation_account(
11508            &self,
11509            resource_group_name: impl Into<String>,
11510            automation_account_name: impl Into<String>,
11511            subscription_id: impl Into<String>,
11512        ) -> list_by_automation_account::RequestBuilder {
11513            list_by_automation_account::RequestBuilder {
11514                client: self.0.clone(),
11515                resource_group_name: resource_group_name.into(),
11516                automation_account_name: automation_account_name.into(),
11517                subscription_id: subscription_id.into(),
11518            }
11519        }
11520    }
11521    pub mod get {
11522        use super::models;
11523        #[cfg(not(target_arch = "wasm32"))]
11524        use futures::future::BoxFuture;
11525        #[cfg(target_arch = "wasm32")]
11526        use futures::future::LocalBoxFuture as BoxFuture;
11527        #[derive(Debug)]
11528        pub struct Response(azure_core::Response);
11529        impl Response {
11530            pub async fn into_body(self) -> azure_core::Result<models::ConnectionType> {
11531                let bytes = self.0.into_body().collect().await?;
11532                let body: models::ConnectionType = serde_json::from_slice(&bytes)?;
11533                Ok(body)
11534            }
11535            pub fn into_raw_response(self) -> azure_core::Response {
11536                self.0
11537            }
11538            pub fn as_raw_response(&self) -> &azure_core::Response {
11539                &self.0
11540            }
11541        }
11542        impl From<Response> for azure_core::Response {
11543            fn from(rsp: Response) -> Self {
11544                rsp.into_raw_response()
11545            }
11546        }
11547        impl AsRef<azure_core::Response> for Response {
11548            fn as_ref(&self) -> &azure_core::Response {
11549                self.as_raw_response()
11550            }
11551        }
11552        #[derive(Clone)]
11553        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11554        #[doc = r""]
11555        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11556        #[doc = r" parameters can be chained."]
11557        #[doc = r""]
11558        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11559        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
11560        #[doc = r" executes the request and returns a `Result` with the parsed"]
11561        #[doc = r" response."]
11562        #[doc = r""]
11563        #[doc = r" In order to execute the request without polling the service"]
11564        #[doc = r" until the operation completes, use `.send().await` instead."]
11565        #[doc = r""]
11566        #[doc = r" If you need lower-level access to the raw response details"]
11567        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11568        #[doc = r" can finalize the request using the"]
11569        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11570        #[doc = r" that resolves to a lower-level [`Response`] value."]
11571        pub struct RequestBuilder {
11572            pub(crate) client: super::super::Client,
11573            pub(crate) resource_group_name: String,
11574            pub(crate) automation_account_name: String,
11575            pub(crate) connection_type_name: String,
11576            pub(crate) subscription_id: String,
11577        }
11578        impl RequestBuilder {
11579            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11580            #[doc = ""]
11581            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11582            #[doc = "However, this function can provide more flexibility when required."]
11583            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11584                Box::pin({
11585                    let this = self.clone();
11586                    async move {
11587                        let url = this.url()?;
11588                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
11589                        let bearer_token = this.client.bearer_token().await?;
11590                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11591                        let req_body = azure_core::EMPTY_BODY;
11592                        req.set_body(req_body);
11593                        Ok(Response(this.client.send(&mut req).await?))
11594                    }
11595                })
11596            }
11597            fn url(&self) -> azure_core::Result<azure_core::Url> {
11598                let mut url = self.client.endpoint().clone();
11599                url.set_path(&format!(
11600                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connectionTypes/{}",
11601                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.connection_type_name
11602                ));
11603                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11604                if !has_api_version_already {
11605                    url.query_pairs_mut()
11606                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11607                }
11608                Ok(url)
11609            }
11610        }
11611        impl std::future::IntoFuture for RequestBuilder {
11612            type Output = azure_core::Result<models::ConnectionType>;
11613            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ConnectionType>>;
11614            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11615            #[doc = ""]
11616            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11617            #[doc = ""]
11618            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11619            fn into_future(self) -> Self::IntoFuture {
11620                Box::pin(async move { self.send().await?.into_body().await })
11621            }
11622        }
11623    }
11624    pub mod create_or_update {
11625        use super::models;
11626        #[cfg(not(target_arch = "wasm32"))]
11627        use futures::future::BoxFuture;
11628        #[cfg(target_arch = "wasm32")]
11629        use futures::future::LocalBoxFuture as BoxFuture;
11630        #[derive(Debug)]
11631        pub struct Response(azure_core::Response);
11632        impl Response {
11633            pub async fn into_body(self) -> azure_core::Result<models::ConnectionType> {
11634                let bytes = self.0.into_body().collect().await?;
11635                let body: models::ConnectionType = serde_json::from_slice(&bytes)?;
11636                Ok(body)
11637            }
11638            pub fn into_raw_response(self) -> azure_core::Response {
11639                self.0
11640            }
11641            pub fn as_raw_response(&self) -> &azure_core::Response {
11642                &self.0
11643            }
11644        }
11645        impl From<Response> for azure_core::Response {
11646            fn from(rsp: Response) -> Self {
11647                rsp.into_raw_response()
11648            }
11649        }
11650        impl AsRef<azure_core::Response> for Response {
11651            fn as_ref(&self) -> &azure_core::Response {
11652                self.as_raw_response()
11653            }
11654        }
11655        #[derive(Clone)]
11656        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11657        #[doc = r""]
11658        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11659        #[doc = r" parameters can be chained."]
11660        #[doc = r""]
11661        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11662        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
11663        #[doc = r" executes the request and returns a `Result` with the parsed"]
11664        #[doc = r" response."]
11665        #[doc = r""]
11666        #[doc = r" In order to execute the request without polling the service"]
11667        #[doc = r" until the operation completes, use `.send().await` instead."]
11668        #[doc = r""]
11669        #[doc = r" If you need lower-level access to the raw response details"]
11670        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11671        #[doc = r" can finalize the request using the"]
11672        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11673        #[doc = r" that resolves to a lower-level [`Response`] value."]
11674        pub struct RequestBuilder {
11675            pub(crate) client: super::super::Client,
11676            pub(crate) resource_group_name: String,
11677            pub(crate) automation_account_name: String,
11678            pub(crate) connection_type_name: String,
11679            pub(crate) parameters: models::ConnectionTypeCreateOrUpdateParameters,
11680            pub(crate) subscription_id: String,
11681        }
11682        impl RequestBuilder {
11683            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11684            #[doc = ""]
11685            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11686            #[doc = "However, this function can provide more flexibility when required."]
11687            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11688                Box::pin({
11689                    let this = self.clone();
11690                    async move {
11691                        let url = this.url()?;
11692                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
11693                        let bearer_token = this.client.bearer_token().await?;
11694                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11695                        req.insert_header("content-type", "application/json");
11696                        let req_body = azure_core::to_json(&this.parameters)?;
11697                        req.set_body(req_body);
11698                        Ok(Response(this.client.send(&mut req).await?))
11699                    }
11700                })
11701            }
11702            fn url(&self) -> azure_core::Result<azure_core::Url> {
11703                let mut url = self.client.endpoint().clone();
11704                url.set_path(&format!(
11705                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connectionTypes/{}",
11706                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.connection_type_name
11707                ));
11708                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11709                if !has_api_version_already {
11710                    url.query_pairs_mut()
11711                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11712                }
11713                Ok(url)
11714            }
11715        }
11716        impl std::future::IntoFuture for RequestBuilder {
11717            type Output = azure_core::Result<models::ConnectionType>;
11718            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ConnectionType>>;
11719            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11720            #[doc = ""]
11721            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11722            #[doc = ""]
11723            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11724            fn into_future(self) -> Self::IntoFuture {
11725                Box::pin(async move { self.send().await?.into_body().await })
11726            }
11727        }
11728    }
11729    pub mod delete {
11730        use super::models;
11731        #[cfg(not(target_arch = "wasm32"))]
11732        use futures::future::BoxFuture;
11733        #[cfg(target_arch = "wasm32")]
11734        use futures::future::LocalBoxFuture as BoxFuture;
11735        #[derive(Debug)]
11736        pub struct Response(azure_core::Response);
11737        impl Response {
11738            pub fn into_raw_response(self) -> azure_core::Response {
11739                self.0
11740            }
11741            pub fn as_raw_response(&self) -> &azure_core::Response {
11742                &self.0
11743            }
11744        }
11745        impl From<Response> for azure_core::Response {
11746            fn from(rsp: Response) -> Self {
11747                rsp.into_raw_response()
11748            }
11749        }
11750        impl AsRef<azure_core::Response> for Response {
11751            fn as_ref(&self) -> &azure_core::Response {
11752                self.as_raw_response()
11753            }
11754        }
11755        #[derive(Clone)]
11756        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11757        #[doc = r""]
11758        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11759        #[doc = r" parameters can be chained."]
11760        #[doc = r""]
11761        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11762        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
11763        #[doc = r" executes the request and returns a `Result` with the parsed"]
11764        #[doc = r" response."]
11765        #[doc = r""]
11766        #[doc = r" In order to execute the request without polling the service"]
11767        #[doc = r" until the operation completes, use `.send().await` instead."]
11768        #[doc = r""]
11769        #[doc = r" If you need lower-level access to the raw response details"]
11770        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11771        #[doc = r" can finalize the request using the"]
11772        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11773        #[doc = r" that resolves to a lower-level [`Response`] value."]
11774        pub struct RequestBuilder {
11775            pub(crate) client: super::super::Client,
11776            pub(crate) resource_group_name: String,
11777            pub(crate) automation_account_name: String,
11778            pub(crate) connection_type_name: String,
11779            pub(crate) subscription_id: String,
11780        }
11781        impl RequestBuilder {
11782            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11783            #[doc = ""]
11784            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11785            #[doc = "However, this function can provide more flexibility when required."]
11786            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11787                Box::pin({
11788                    let this = self.clone();
11789                    async move {
11790                        let url = this.url()?;
11791                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
11792                        let bearer_token = this.client.bearer_token().await?;
11793                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11794                        let req_body = azure_core::EMPTY_BODY;
11795                        req.set_body(req_body);
11796                        Ok(Response(this.client.send(&mut req).await?))
11797                    }
11798                })
11799            }
11800            fn url(&self) -> azure_core::Result<azure_core::Url> {
11801                let mut url = self.client.endpoint().clone();
11802                url.set_path(&format!(
11803                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connectionTypes/{}",
11804                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.connection_type_name
11805                ));
11806                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11807                if !has_api_version_already {
11808                    url.query_pairs_mut()
11809                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11810                }
11811                Ok(url)
11812            }
11813        }
11814    }
11815    pub mod list_by_automation_account {
11816        use super::models;
11817        #[cfg(not(target_arch = "wasm32"))]
11818        use futures::future::BoxFuture;
11819        #[cfg(target_arch = "wasm32")]
11820        use futures::future::LocalBoxFuture as BoxFuture;
11821        #[derive(Debug)]
11822        pub struct Response(azure_core::Response);
11823        impl Response {
11824            pub async fn into_body(self) -> azure_core::Result<models::ConnectionTypeListResult> {
11825                let bytes = self.0.into_body().collect().await?;
11826                let body: models::ConnectionTypeListResult = serde_json::from_slice(&bytes)?;
11827                Ok(body)
11828            }
11829            pub fn into_raw_response(self) -> azure_core::Response {
11830                self.0
11831            }
11832            pub fn as_raw_response(&self) -> &azure_core::Response {
11833                &self.0
11834            }
11835        }
11836        impl From<Response> for azure_core::Response {
11837            fn from(rsp: Response) -> Self {
11838                rsp.into_raw_response()
11839            }
11840        }
11841        impl AsRef<azure_core::Response> for Response {
11842            fn as_ref(&self) -> &azure_core::Response {
11843                self.as_raw_response()
11844            }
11845        }
11846        #[derive(Clone)]
11847        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11848        #[doc = r""]
11849        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11850        #[doc = r" parameters can be chained."]
11851        #[doc = r""]
11852        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11853        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
11854        #[doc = r" executes the request and returns a `Result` with the parsed"]
11855        #[doc = r" response."]
11856        #[doc = r""]
11857        #[doc = r" In order to execute the request without polling the service"]
11858        #[doc = r" until the operation completes, use `.send().await` instead."]
11859        #[doc = r""]
11860        #[doc = r" If you need lower-level access to the raw response details"]
11861        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11862        #[doc = r" can finalize the request using the"]
11863        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11864        #[doc = r" that resolves to a lower-level [`Response`] value."]
11865        pub struct RequestBuilder {
11866            pub(crate) client: super::super::Client,
11867            pub(crate) resource_group_name: String,
11868            pub(crate) automation_account_name: String,
11869            pub(crate) subscription_id: String,
11870        }
11871        impl RequestBuilder {
11872            pub fn into_stream(self) -> azure_core::Pageable<models::ConnectionTypeListResult, azure_core::error::Error> {
11873                let make_request = move |continuation: Option<String>| {
11874                    let this = self.clone();
11875                    async move {
11876                        let mut url = this.url()?;
11877                        let rsp = match continuation {
11878                            Some(value) => {
11879                                url.set_path("");
11880                                url = url.join(&value)?;
11881                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
11882                                let bearer_token = this.client.bearer_token().await?;
11883                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11884                                let has_api_version_already =
11885                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11886                                if !has_api_version_already {
11887                                    req.url_mut()
11888                                        .query_pairs_mut()
11889                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11890                                }
11891                                let req_body = azure_core::EMPTY_BODY;
11892                                req.set_body(req_body);
11893                                this.client.send(&mut req).await?
11894                            }
11895                            None => {
11896                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
11897                                let bearer_token = this.client.bearer_token().await?;
11898                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
11899                                let req_body = azure_core::EMPTY_BODY;
11900                                req.set_body(req_body);
11901                                this.client.send(&mut req).await?
11902                            }
11903                        };
11904                        let rsp = match rsp.status() {
11905                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
11906                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
11907                                status: status_code,
11908                                error_code: None,
11909                            })),
11910                        };
11911                        rsp?.into_body().await
11912                    }
11913                };
11914                azure_core::Pageable::new(make_request)
11915            }
11916            fn url(&self) -> azure_core::Result<azure_core::Url> {
11917                let mut url = self.client.endpoint().clone();
11918                url.set_path(&format!(
11919                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/connectionTypes",
11920                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
11921                ));
11922                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
11923                if !has_api_version_already {
11924                    url.query_pairs_mut()
11925                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
11926                }
11927                Ok(url)
11928            }
11929        }
11930    }
11931}
11932pub mod credential {
11933    use super::models;
11934    #[cfg(not(target_arch = "wasm32"))]
11935    use futures::future::BoxFuture;
11936    #[cfg(target_arch = "wasm32")]
11937    use futures::future::LocalBoxFuture as BoxFuture;
11938    pub struct Client(pub(crate) super::Client);
11939    impl Client {
11940        #[doc = "Retrieve the credential identified by credential name."]
11941        #[doc = ""]
11942        #[doc = "Arguments:"]
11943        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
11944        #[doc = "* `automation_account_name`: The name of the automation account."]
11945        #[doc = "* `credential_name`: The name of credential."]
11946        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
11947        pub fn get(
11948            &self,
11949            resource_group_name: impl Into<String>,
11950            automation_account_name: impl Into<String>,
11951            credential_name: impl Into<String>,
11952            subscription_id: impl Into<String>,
11953        ) -> get::RequestBuilder {
11954            get::RequestBuilder {
11955                client: self.0.clone(),
11956                resource_group_name: resource_group_name.into(),
11957                automation_account_name: automation_account_name.into(),
11958                credential_name: credential_name.into(),
11959                subscription_id: subscription_id.into(),
11960            }
11961        }
11962        #[doc = "Create a credential."]
11963        #[doc = ""]
11964        #[doc = "Arguments:"]
11965        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
11966        #[doc = "* `automation_account_name`: The name of the automation account."]
11967        #[doc = "* `credential_name`: The parameters supplied to the create or update credential operation."]
11968        #[doc = "* `parameters`: The parameters supplied to the create or update credential operation."]
11969        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
11970        pub fn create_or_update(
11971            &self,
11972            resource_group_name: impl Into<String>,
11973            automation_account_name: impl Into<String>,
11974            credential_name: impl Into<String>,
11975            parameters: impl Into<models::CredentialCreateOrUpdateParameters>,
11976            subscription_id: impl Into<String>,
11977        ) -> create_or_update::RequestBuilder {
11978            create_or_update::RequestBuilder {
11979                client: self.0.clone(),
11980                resource_group_name: resource_group_name.into(),
11981                automation_account_name: automation_account_name.into(),
11982                credential_name: credential_name.into(),
11983                parameters: parameters.into(),
11984                subscription_id: subscription_id.into(),
11985            }
11986        }
11987        #[doc = "Update a credential."]
11988        #[doc = ""]
11989        #[doc = "Arguments:"]
11990        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
11991        #[doc = "* `automation_account_name`: The name of the automation account."]
11992        #[doc = "* `credential_name`: The parameters supplied to the Update credential operation."]
11993        #[doc = "* `parameters`: The parameters supplied to the Update credential operation."]
11994        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
11995        pub fn update(
11996            &self,
11997            resource_group_name: impl Into<String>,
11998            automation_account_name: impl Into<String>,
11999            credential_name: impl Into<String>,
12000            parameters: impl Into<models::CredentialUpdateParameters>,
12001            subscription_id: impl Into<String>,
12002        ) -> update::RequestBuilder {
12003            update::RequestBuilder {
12004                client: self.0.clone(),
12005                resource_group_name: resource_group_name.into(),
12006                automation_account_name: automation_account_name.into(),
12007                credential_name: credential_name.into(),
12008                parameters: parameters.into(),
12009                subscription_id: subscription_id.into(),
12010            }
12011        }
12012        #[doc = "Delete the credential."]
12013        #[doc = ""]
12014        #[doc = "Arguments:"]
12015        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
12016        #[doc = "* `automation_account_name`: The name of the automation account."]
12017        #[doc = "* `credential_name`: The name of credential."]
12018        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
12019        pub fn delete(
12020            &self,
12021            resource_group_name: impl Into<String>,
12022            automation_account_name: impl Into<String>,
12023            credential_name: impl Into<String>,
12024            subscription_id: impl Into<String>,
12025        ) -> delete::RequestBuilder {
12026            delete::RequestBuilder {
12027                client: self.0.clone(),
12028                resource_group_name: resource_group_name.into(),
12029                automation_account_name: automation_account_name.into(),
12030                credential_name: credential_name.into(),
12031                subscription_id: subscription_id.into(),
12032            }
12033        }
12034        #[doc = "Retrieve a list of credentials."]
12035        #[doc = ""]
12036        #[doc = "Arguments:"]
12037        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
12038        #[doc = "* `automation_account_name`: The name of the automation account."]
12039        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
12040        pub fn list_by_automation_account(
12041            &self,
12042            resource_group_name: impl Into<String>,
12043            automation_account_name: impl Into<String>,
12044            subscription_id: impl Into<String>,
12045        ) -> list_by_automation_account::RequestBuilder {
12046            list_by_automation_account::RequestBuilder {
12047                client: self.0.clone(),
12048                resource_group_name: resource_group_name.into(),
12049                automation_account_name: automation_account_name.into(),
12050                subscription_id: subscription_id.into(),
12051            }
12052        }
12053    }
12054    pub mod get {
12055        use super::models;
12056        #[cfg(not(target_arch = "wasm32"))]
12057        use futures::future::BoxFuture;
12058        #[cfg(target_arch = "wasm32")]
12059        use futures::future::LocalBoxFuture as BoxFuture;
12060        #[derive(Debug)]
12061        pub struct Response(azure_core::Response);
12062        impl Response {
12063            pub async fn into_body(self) -> azure_core::Result<models::Credential> {
12064                let bytes = self.0.into_body().collect().await?;
12065                let body: models::Credential = serde_json::from_slice(&bytes)?;
12066                Ok(body)
12067            }
12068            pub fn into_raw_response(self) -> azure_core::Response {
12069                self.0
12070            }
12071            pub fn as_raw_response(&self) -> &azure_core::Response {
12072                &self.0
12073            }
12074        }
12075        impl From<Response> for azure_core::Response {
12076            fn from(rsp: Response) -> Self {
12077                rsp.into_raw_response()
12078            }
12079        }
12080        impl AsRef<azure_core::Response> for Response {
12081            fn as_ref(&self) -> &azure_core::Response {
12082                self.as_raw_response()
12083            }
12084        }
12085        #[derive(Clone)]
12086        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12087        #[doc = r""]
12088        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12089        #[doc = r" parameters can be chained."]
12090        #[doc = r""]
12091        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12092        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
12093        #[doc = r" executes the request and returns a `Result` with the parsed"]
12094        #[doc = r" response."]
12095        #[doc = r""]
12096        #[doc = r" In order to execute the request without polling the service"]
12097        #[doc = r" until the operation completes, use `.send().await` instead."]
12098        #[doc = r""]
12099        #[doc = r" If you need lower-level access to the raw response details"]
12100        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12101        #[doc = r" can finalize the request using the"]
12102        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12103        #[doc = r" that resolves to a lower-level [`Response`] value."]
12104        pub struct RequestBuilder {
12105            pub(crate) client: super::super::Client,
12106            pub(crate) resource_group_name: String,
12107            pub(crate) automation_account_name: String,
12108            pub(crate) credential_name: String,
12109            pub(crate) subscription_id: String,
12110        }
12111        impl RequestBuilder {
12112            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12113            #[doc = ""]
12114            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12115            #[doc = "However, this function can provide more flexibility when required."]
12116            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12117                Box::pin({
12118                    let this = self.clone();
12119                    async move {
12120                        let url = this.url()?;
12121                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12122                        let bearer_token = this.client.bearer_token().await?;
12123                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
12124                        let req_body = azure_core::EMPTY_BODY;
12125                        req.set_body(req_body);
12126                        Ok(Response(this.client.send(&mut req).await?))
12127                    }
12128                })
12129            }
12130            fn url(&self) -> azure_core::Result<azure_core::Url> {
12131                let mut url = self.client.endpoint().clone();
12132                url.set_path(&format!(
12133                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/credentials/{}",
12134                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.credential_name
12135                ));
12136                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
12137                if !has_api_version_already {
12138                    url.query_pairs_mut()
12139                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
12140                }
12141                Ok(url)
12142            }
12143        }
12144        impl std::future::IntoFuture for RequestBuilder {
12145            type Output = azure_core::Result<models::Credential>;
12146            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Credential>>;
12147            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12148            #[doc = ""]
12149            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12150            #[doc = ""]
12151            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12152            fn into_future(self) -> Self::IntoFuture {
12153                Box::pin(async move { self.send().await?.into_body().await })
12154            }
12155        }
12156    }
12157    pub mod create_or_update {
12158        use super::models;
12159        #[cfg(not(target_arch = "wasm32"))]
12160        use futures::future::BoxFuture;
12161        #[cfg(target_arch = "wasm32")]
12162        use futures::future::LocalBoxFuture as BoxFuture;
12163        #[derive(Debug)]
12164        pub struct Response(azure_core::Response);
12165        impl Response {
12166            pub async fn into_body(self) -> azure_core::Result<models::Credential> {
12167                let bytes = self.0.into_body().collect().await?;
12168                let body: models::Credential = serde_json::from_slice(&bytes)?;
12169                Ok(body)
12170            }
12171            pub fn into_raw_response(self) -> azure_core::Response {
12172                self.0
12173            }
12174            pub fn as_raw_response(&self) -> &azure_core::Response {
12175                &self.0
12176            }
12177        }
12178        impl From<Response> for azure_core::Response {
12179            fn from(rsp: Response) -> Self {
12180                rsp.into_raw_response()
12181            }
12182        }
12183        impl AsRef<azure_core::Response> for Response {
12184            fn as_ref(&self) -> &azure_core::Response {
12185                self.as_raw_response()
12186            }
12187        }
12188        #[derive(Clone)]
12189        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12190        #[doc = r""]
12191        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12192        #[doc = r" parameters can be chained."]
12193        #[doc = r""]
12194        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12195        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
12196        #[doc = r" executes the request and returns a `Result` with the parsed"]
12197        #[doc = r" response."]
12198        #[doc = r""]
12199        #[doc = r" In order to execute the request without polling the service"]
12200        #[doc = r" until the operation completes, use `.send().await` instead."]
12201        #[doc = r""]
12202        #[doc = r" If you need lower-level access to the raw response details"]
12203        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12204        #[doc = r" can finalize the request using the"]
12205        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12206        #[doc = r" that resolves to a lower-level [`Response`] value."]
12207        pub struct RequestBuilder {
12208            pub(crate) client: super::super::Client,
12209            pub(crate) resource_group_name: String,
12210            pub(crate) automation_account_name: String,
12211            pub(crate) credential_name: String,
12212            pub(crate) parameters: models::CredentialCreateOrUpdateParameters,
12213            pub(crate) subscription_id: String,
12214        }
12215        impl RequestBuilder {
12216            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12217            #[doc = ""]
12218            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12219            #[doc = "However, this function can provide more flexibility when required."]
12220            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12221                Box::pin({
12222                    let this = self.clone();
12223                    async move {
12224                        let url = this.url()?;
12225                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
12226                        let bearer_token = this.client.bearer_token().await?;
12227                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
12228                        req.insert_header("content-type", "application/json");
12229                        let req_body = azure_core::to_json(&this.parameters)?;
12230                        req.set_body(req_body);
12231                        Ok(Response(this.client.send(&mut req).await?))
12232                    }
12233                })
12234            }
12235            fn url(&self) -> azure_core::Result<azure_core::Url> {
12236                let mut url = self.client.endpoint().clone();
12237                url.set_path(&format!(
12238                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/credentials/{}",
12239                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.credential_name
12240                ));
12241                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
12242                if !has_api_version_already {
12243                    url.query_pairs_mut()
12244                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
12245                }
12246                Ok(url)
12247            }
12248        }
12249        impl std::future::IntoFuture for RequestBuilder {
12250            type Output = azure_core::Result<models::Credential>;
12251            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Credential>>;
12252            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12253            #[doc = ""]
12254            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12255            #[doc = ""]
12256            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12257            fn into_future(self) -> Self::IntoFuture {
12258                Box::pin(async move { self.send().await?.into_body().await })
12259            }
12260        }
12261    }
12262    pub mod update {
12263        use super::models;
12264        #[cfg(not(target_arch = "wasm32"))]
12265        use futures::future::BoxFuture;
12266        #[cfg(target_arch = "wasm32")]
12267        use futures::future::LocalBoxFuture as BoxFuture;
12268        #[derive(Debug)]
12269        pub struct Response(azure_core::Response);
12270        impl Response {
12271            pub async fn into_body(self) -> azure_core::Result<models::Credential> {
12272                let bytes = self.0.into_body().collect().await?;
12273                let body: models::Credential = serde_json::from_slice(&bytes)?;
12274                Ok(body)
12275            }
12276            pub fn into_raw_response(self) -> azure_core::Response {
12277                self.0
12278            }
12279            pub fn as_raw_response(&self) -> &azure_core::Response {
12280                &self.0
12281            }
12282        }
12283        impl From<Response> for azure_core::Response {
12284            fn from(rsp: Response) -> Self {
12285                rsp.into_raw_response()
12286            }
12287        }
12288        impl AsRef<azure_core::Response> for Response {
12289            fn as_ref(&self) -> &azure_core::Response {
12290                self.as_raw_response()
12291            }
12292        }
12293        #[derive(Clone)]
12294        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12295        #[doc = r""]
12296        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12297        #[doc = r" parameters can be chained."]
12298        #[doc = r""]
12299        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12300        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
12301        #[doc = r" executes the request and returns a `Result` with the parsed"]
12302        #[doc = r" response."]
12303        #[doc = r""]
12304        #[doc = r" In order to execute the request without polling the service"]
12305        #[doc = r" until the operation completes, use `.send().await` instead."]
12306        #[doc = r""]
12307        #[doc = r" If you need lower-level access to the raw response details"]
12308        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12309        #[doc = r" can finalize the request using the"]
12310        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12311        #[doc = r" that resolves to a lower-level [`Response`] value."]
12312        pub struct RequestBuilder {
12313            pub(crate) client: super::super::Client,
12314            pub(crate) resource_group_name: String,
12315            pub(crate) automation_account_name: String,
12316            pub(crate) credential_name: String,
12317            pub(crate) parameters: models::CredentialUpdateParameters,
12318            pub(crate) subscription_id: String,
12319        }
12320        impl RequestBuilder {
12321            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12322            #[doc = ""]
12323            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12324            #[doc = "However, this function can provide more flexibility when required."]
12325            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12326                Box::pin({
12327                    let this = self.clone();
12328                    async move {
12329                        let url = this.url()?;
12330                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
12331                        let bearer_token = this.client.bearer_token().await?;
12332                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
12333                        req.insert_header("content-type", "application/json");
12334                        let req_body = azure_core::to_json(&this.parameters)?;
12335                        req.set_body(req_body);
12336                        Ok(Response(this.client.send(&mut req).await?))
12337                    }
12338                })
12339            }
12340            fn url(&self) -> azure_core::Result<azure_core::Url> {
12341                let mut url = self.client.endpoint().clone();
12342                url.set_path(&format!(
12343                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/credentials/{}",
12344                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.credential_name
12345                ));
12346                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
12347                if !has_api_version_already {
12348                    url.query_pairs_mut()
12349                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
12350                }
12351                Ok(url)
12352            }
12353        }
12354        impl std::future::IntoFuture for RequestBuilder {
12355            type Output = azure_core::Result<models::Credential>;
12356            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Credential>>;
12357            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12358            #[doc = ""]
12359            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12360            #[doc = ""]
12361            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12362            fn into_future(self) -> Self::IntoFuture {
12363                Box::pin(async move { self.send().await?.into_body().await })
12364            }
12365        }
12366    }
12367    pub mod delete {
12368        use super::models;
12369        #[cfg(not(target_arch = "wasm32"))]
12370        use futures::future::BoxFuture;
12371        #[cfg(target_arch = "wasm32")]
12372        use futures::future::LocalBoxFuture as BoxFuture;
12373        #[derive(Debug)]
12374        pub struct Response(azure_core::Response);
12375        impl Response {
12376            pub fn into_raw_response(self) -> azure_core::Response {
12377                self.0
12378            }
12379            pub fn as_raw_response(&self) -> &azure_core::Response {
12380                &self.0
12381            }
12382        }
12383        impl From<Response> for azure_core::Response {
12384            fn from(rsp: Response) -> Self {
12385                rsp.into_raw_response()
12386            }
12387        }
12388        impl AsRef<azure_core::Response> for Response {
12389            fn as_ref(&self) -> &azure_core::Response {
12390                self.as_raw_response()
12391            }
12392        }
12393        #[derive(Clone)]
12394        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12395        #[doc = r""]
12396        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12397        #[doc = r" parameters can be chained."]
12398        #[doc = r""]
12399        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12400        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
12401        #[doc = r" executes the request and returns a `Result` with the parsed"]
12402        #[doc = r" response."]
12403        #[doc = r""]
12404        #[doc = r" In order to execute the request without polling the service"]
12405        #[doc = r" until the operation completes, use `.send().await` instead."]
12406        #[doc = r""]
12407        #[doc = r" If you need lower-level access to the raw response details"]
12408        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12409        #[doc = r" can finalize the request using the"]
12410        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12411        #[doc = r" that resolves to a lower-level [`Response`] value."]
12412        pub struct RequestBuilder {
12413            pub(crate) client: super::super::Client,
12414            pub(crate) resource_group_name: String,
12415            pub(crate) automation_account_name: String,
12416            pub(crate) credential_name: String,
12417            pub(crate) subscription_id: String,
12418        }
12419        impl RequestBuilder {
12420            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12421            #[doc = ""]
12422            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12423            #[doc = "However, this function can provide more flexibility when required."]
12424            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12425                Box::pin({
12426                    let this = self.clone();
12427                    async move {
12428                        let url = this.url()?;
12429                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
12430                        let bearer_token = this.client.bearer_token().await?;
12431                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
12432                        let req_body = azure_core::EMPTY_BODY;
12433                        req.set_body(req_body);
12434                        Ok(Response(this.client.send(&mut req).await?))
12435                    }
12436                })
12437            }
12438            fn url(&self) -> azure_core::Result<azure_core::Url> {
12439                let mut url = self.client.endpoint().clone();
12440                url.set_path(&format!(
12441                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/credentials/{}",
12442                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.credential_name
12443                ));
12444                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
12445                if !has_api_version_already {
12446                    url.query_pairs_mut()
12447                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
12448                }
12449                Ok(url)
12450            }
12451        }
12452    }
12453    pub mod list_by_automation_account {
12454        use super::models;
12455        #[cfg(not(target_arch = "wasm32"))]
12456        use futures::future::BoxFuture;
12457        #[cfg(target_arch = "wasm32")]
12458        use futures::future::LocalBoxFuture as BoxFuture;
12459        #[derive(Debug)]
12460        pub struct Response(azure_core::Response);
12461        impl Response {
12462            pub async fn into_body(self) -> azure_core::Result<models::CredentialListResult> {
12463                let bytes = self.0.into_body().collect().await?;
12464                let body: models::CredentialListResult = serde_json::from_slice(&bytes)?;
12465                Ok(body)
12466            }
12467            pub fn into_raw_response(self) -> azure_core::Response {
12468                self.0
12469            }
12470            pub fn as_raw_response(&self) -> &azure_core::Response {
12471                &self.0
12472            }
12473        }
12474        impl From<Response> for azure_core::Response {
12475            fn from(rsp: Response) -> Self {
12476                rsp.into_raw_response()
12477            }
12478        }
12479        impl AsRef<azure_core::Response> for Response {
12480            fn as_ref(&self) -> &azure_core::Response {
12481                self.as_raw_response()
12482            }
12483        }
12484        #[derive(Clone)]
12485        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12486        #[doc = r""]
12487        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12488        #[doc = r" parameters can be chained."]
12489        #[doc = r""]
12490        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12491        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
12492        #[doc = r" executes the request and returns a `Result` with the parsed"]
12493        #[doc = r" response."]
12494        #[doc = r""]
12495        #[doc = r" In order to execute the request without polling the service"]
12496        #[doc = r" until the operation completes, use `.send().await` instead."]
12497        #[doc = r""]
12498        #[doc = r" If you need lower-level access to the raw response details"]
12499        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12500        #[doc = r" can finalize the request using the"]
12501        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12502        #[doc = r" that resolves to a lower-level [`Response`] value."]
12503        pub struct RequestBuilder {
12504            pub(crate) client: super::super::Client,
12505            pub(crate) resource_group_name: String,
12506            pub(crate) automation_account_name: String,
12507            pub(crate) subscription_id: String,
12508        }
12509        impl RequestBuilder {
12510            pub fn into_stream(self) -> azure_core::Pageable<models::CredentialListResult, azure_core::error::Error> {
12511                let make_request = move |continuation: Option<String>| {
12512                    let this = self.clone();
12513                    async move {
12514                        let mut url = this.url()?;
12515                        let rsp = match continuation {
12516                            Some(value) => {
12517                                url.set_path("");
12518                                url = url.join(&value)?;
12519                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12520                                let bearer_token = this.client.bearer_token().await?;
12521                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
12522                                let has_api_version_already =
12523                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
12524                                if !has_api_version_already {
12525                                    req.url_mut()
12526                                        .query_pairs_mut()
12527                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
12528                                }
12529                                let req_body = azure_core::EMPTY_BODY;
12530                                req.set_body(req_body);
12531                                this.client.send(&mut req).await?
12532                            }
12533                            None => {
12534                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12535                                let bearer_token = this.client.bearer_token().await?;
12536                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
12537                                let req_body = azure_core::EMPTY_BODY;
12538                                req.set_body(req_body);
12539                                this.client.send(&mut req).await?
12540                            }
12541                        };
12542                        let rsp = match rsp.status() {
12543                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
12544                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
12545                                status: status_code,
12546                                error_code: None,
12547                            })),
12548                        };
12549                        rsp?.into_body().await
12550                    }
12551                };
12552                azure_core::Pageable::new(make_request)
12553            }
12554            fn url(&self) -> azure_core::Result<azure_core::Url> {
12555                let mut url = self.client.endpoint().clone();
12556                url.set_path(&format!(
12557                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/credentials",
12558                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
12559                ));
12560                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
12561                if !has_api_version_already {
12562                    url.query_pairs_mut()
12563                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
12564                }
12565                Ok(url)
12566            }
12567        }
12568    }
12569}
12570pub mod dsc_configuration {
12571    use super::models;
12572    #[cfg(not(target_arch = "wasm32"))]
12573    use futures::future::BoxFuture;
12574    #[cfg(target_arch = "wasm32")]
12575    use futures::future::LocalBoxFuture as BoxFuture;
12576    pub struct Client(pub(crate) super::Client);
12577    impl Client {
12578        #[doc = "Retrieve the configuration identified by configuration name."]
12579        #[doc = ""]
12580        #[doc = "Arguments:"]
12581        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
12582        #[doc = "* `automation_account_name`: The name of the automation account."]
12583        #[doc = "* `configuration_name`: The configuration name."]
12584        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
12585        pub fn get(
12586            &self,
12587            resource_group_name: impl Into<String>,
12588            automation_account_name: impl Into<String>,
12589            configuration_name: impl Into<String>,
12590            subscription_id: impl Into<String>,
12591        ) -> get::RequestBuilder {
12592            get::RequestBuilder {
12593                client: self.0.clone(),
12594                resource_group_name: resource_group_name.into(),
12595                automation_account_name: automation_account_name.into(),
12596                configuration_name: configuration_name.into(),
12597                subscription_id: subscription_id.into(),
12598            }
12599        }
12600        #[doc = "Create the configuration identified by configuration name."]
12601        #[doc = ""]
12602        #[doc = "Arguments:"]
12603        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
12604        #[doc = "* `automation_account_name`: The name of the automation account."]
12605        #[doc = "* `configuration_name`: The create or update parameters for configuration."]
12606        #[doc = "* `parameters`: The create or update parameters for configuration."]
12607        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
12608        pub fn create_or_update(
12609            &self,
12610            resource_group_name: impl Into<String>,
12611            automation_account_name: impl Into<String>,
12612            configuration_name: impl Into<String>,
12613            parameters: impl Into<models::DscConfigurationCreateOrUpdateParameters>,
12614            subscription_id: impl Into<String>,
12615        ) -> create_or_update::RequestBuilder {
12616            create_or_update::RequestBuilder {
12617                client: self.0.clone(),
12618                resource_group_name: resource_group_name.into(),
12619                automation_account_name: automation_account_name.into(),
12620                configuration_name: configuration_name.into(),
12621                parameters: parameters.into(),
12622                subscription_id: subscription_id.into(),
12623            }
12624        }
12625        #[doc = "Create the configuration identified by configuration name."]
12626        #[doc = ""]
12627        #[doc = "Arguments:"]
12628        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
12629        #[doc = "* `automation_account_name`: The name of the automation account."]
12630        #[doc = "* `configuration_name`: The create or update parameters for configuration."]
12631        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
12632        pub fn update(
12633            &self,
12634            resource_group_name: impl Into<String>,
12635            automation_account_name: impl Into<String>,
12636            configuration_name: impl Into<String>,
12637            subscription_id: impl Into<String>,
12638        ) -> update::RequestBuilder {
12639            update::RequestBuilder {
12640                client: self.0.clone(),
12641                resource_group_name: resource_group_name.into(),
12642                automation_account_name: automation_account_name.into(),
12643                configuration_name: configuration_name.into(),
12644                subscription_id: subscription_id.into(),
12645                parameters: None,
12646            }
12647        }
12648        #[doc = "Delete the dsc configuration identified by configuration name."]
12649        #[doc = ""]
12650        #[doc = "Arguments:"]
12651        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
12652        #[doc = "* `automation_account_name`: The name of the automation account."]
12653        #[doc = "* `configuration_name`: The configuration name."]
12654        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
12655        pub fn delete(
12656            &self,
12657            resource_group_name: impl Into<String>,
12658            automation_account_name: impl Into<String>,
12659            configuration_name: impl Into<String>,
12660            subscription_id: impl Into<String>,
12661        ) -> delete::RequestBuilder {
12662            delete::RequestBuilder {
12663                client: self.0.clone(),
12664                resource_group_name: resource_group_name.into(),
12665                automation_account_name: automation_account_name.into(),
12666                configuration_name: configuration_name.into(),
12667                subscription_id: subscription_id.into(),
12668            }
12669        }
12670        #[doc = "Retrieve the configuration script identified by configuration name."]
12671        #[doc = ""]
12672        #[doc = "Arguments:"]
12673        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
12674        #[doc = "* `automation_account_name`: The name of the automation account."]
12675        #[doc = "* `configuration_name`: The configuration name."]
12676        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
12677        pub fn get_content(
12678            &self,
12679            resource_group_name: impl Into<String>,
12680            automation_account_name: impl Into<String>,
12681            configuration_name: impl Into<String>,
12682            subscription_id: impl Into<String>,
12683        ) -> get_content::RequestBuilder {
12684            get_content::RequestBuilder {
12685                client: self.0.clone(),
12686                resource_group_name: resource_group_name.into(),
12687                automation_account_name: automation_account_name.into(),
12688                configuration_name: configuration_name.into(),
12689                subscription_id: subscription_id.into(),
12690            }
12691        }
12692        #[doc = "Retrieve a list of configurations."]
12693        #[doc = ""]
12694        #[doc = "Arguments:"]
12695        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
12696        #[doc = "* `automation_account_name`: The name of the automation account."]
12697        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
12698        pub fn list_by_automation_account(
12699            &self,
12700            resource_group_name: impl Into<String>,
12701            automation_account_name: impl Into<String>,
12702            subscription_id: impl Into<String>,
12703        ) -> list_by_automation_account::RequestBuilder {
12704            list_by_automation_account::RequestBuilder {
12705                client: self.0.clone(),
12706                resource_group_name: resource_group_name.into(),
12707                automation_account_name: automation_account_name.into(),
12708                subscription_id: subscription_id.into(),
12709                filter: None,
12710                skip: None,
12711                top: None,
12712                inlinecount: None,
12713            }
12714        }
12715    }
12716    pub mod get {
12717        use super::models;
12718        #[cfg(not(target_arch = "wasm32"))]
12719        use futures::future::BoxFuture;
12720        #[cfg(target_arch = "wasm32")]
12721        use futures::future::LocalBoxFuture as BoxFuture;
12722        #[derive(Debug)]
12723        pub struct Response(azure_core::Response);
12724        impl Response {
12725            pub async fn into_body(self) -> azure_core::Result<models::DscConfiguration> {
12726                let bytes = self.0.into_body().collect().await?;
12727                let body: models::DscConfiguration = serde_json::from_slice(&bytes)?;
12728                Ok(body)
12729            }
12730            pub fn into_raw_response(self) -> azure_core::Response {
12731                self.0
12732            }
12733            pub fn as_raw_response(&self) -> &azure_core::Response {
12734                &self.0
12735            }
12736        }
12737        impl From<Response> for azure_core::Response {
12738            fn from(rsp: Response) -> Self {
12739                rsp.into_raw_response()
12740            }
12741        }
12742        impl AsRef<azure_core::Response> for Response {
12743            fn as_ref(&self) -> &azure_core::Response {
12744                self.as_raw_response()
12745            }
12746        }
12747        #[derive(Clone)]
12748        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12749        #[doc = r""]
12750        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12751        #[doc = r" parameters can be chained."]
12752        #[doc = r""]
12753        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12754        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
12755        #[doc = r" executes the request and returns a `Result` with the parsed"]
12756        #[doc = r" response."]
12757        #[doc = r""]
12758        #[doc = r" In order to execute the request without polling the service"]
12759        #[doc = r" until the operation completes, use `.send().await` instead."]
12760        #[doc = r""]
12761        #[doc = r" If you need lower-level access to the raw response details"]
12762        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12763        #[doc = r" can finalize the request using the"]
12764        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12765        #[doc = r" that resolves to a lower-level [`Response`] value."]
12766        pub struct RequestBuilder {
12767            pub(crate) client: super::super::Client,
12768            pub(crate) resource_group_name: String,
12769            pub(crate) automation_account_name: String,
12770            pub(crate) configuration_name: String,
12771            pub(crate) subscription_id: String,
12772        }
12773        impl RequestBuilder {
12774            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12775            #[doc = ""]
12776            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12777            #[doc = "However, this function can provide more flexibility when required."]
12778            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12779                Box::pin({
12780                    let this = self.clone();
12781                    async move {
12782                        let url = this.url()?;
12783                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12784                        let bearer_token = this.client.bearer_token().await?;
12785                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
12786                        let req_body = azure_core::EMPTY_BODY;
12787                        req.set_body(req_body);
12788                        Ok(Response(this.client.send(&mut req).await?))
12789                    }
12790                })
12791            }
12792            fn url(&self) -> azure_core::Result<azure_core::Url> {
12793                let mut url = self.client.endpoint().clone();
12794                url.set_path(&format!(
12795                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/configurations/{}",
12796                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.configuration_name
12797                ));
12798                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
12799                if !has_api_version_already {
12800                    url.query_pairs_mut()
12801                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
12802                }
12803                Ok(url)
12804            }
12805        }
12806        impl std::future::IntoFuture for RequestBuilder {
12807            type Output = azure_core::Result<models::DscConfiguration>;
12808            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscConfiguration>>;
12809            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12810            #[doc = ""]
12811            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12812            #[doc = ""]
12813            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12814            fn into_future(self) -> Self::IntoFuture {
12815                Box::pin(async move { self.send().await?.into_body().await })
12816            }
12817        }
12818    }
12819    pub mod create_or_update {
12820        use super::models;
12821        #[cfg(not(target_arch = "wasm32"))]
12822        use futures::future::BoxFuture;
12823        #[cfg(target_arch = "wasm32")]
12824        use futures::future::LocalBoxFuture as BoxFuture;
12825        #[derive(Debug)]
12826        pub struct Response(azure_core::Response);
12827        impl Response {
12828            pub async fn into_body(self) -> azure_core::Result<models::DscConfiguration> {
12829                let bytes = self.0.into_body().collect().await?;
12830                let body: models::DscConfiguration = serde_json::from_slice(&bytes)?;
12831                Ok(body)
12832            }
12833            pub fn into_raw_response(self) -> azure_core::Response {
12834                self.0
12835            }
12836            pub fn as_raw_response(&self) -> &azure_core::Response {
12837                &self.0
12838            }
12839        }
12840        impl From<Response> for azure_core::Response {
12841            fn from(rsp: Response) -> Self {
12842                rsp.into_raw_response()
12843            }
12844        }
12845        impl AsRef<azure_core::Response> for Response {
12846            fn as_ref(&self) -> &azure_core::Response {
12847                self.as_raw_response()
12848            }
12849        }
12850        #[derive(Clone)]
12851        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12852        #[doc = r""]
12853        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12854        #[doc = r" parameters can be chained."]
12855        #[doc = r""]
12856        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12857        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
12858        #[doc = r" executes the request and returns a `Result` with the parsed"]
12859        #[doc = r" response."]
12860        #[doc = r""]
12861        #[doc = r" In order to execute the request without polling the service"]
12862        #[doc = r" until the operation completes, use `.send().await` instead."]
12863        #[doc = r""]
12864        #[doc = r" If you need lower-level access to the raw response details"]
12865        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12866        #[doc = r" can finalize the request using the"]
12867        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12868        #[doc = r" that resolves to a lower-level [`Response`] value."]
12869        pub struct RequestBuilder {
12870            pub(crate) client: super::super::Client,
12871            pub(crate) resource_group_name: String,
12872            pub(crate) automation_account_name: String,
12873            pub(crate) configuration_name: String,
12874            pub(crate) parameters: models::DscConfigurationCreateOrUpdateParameters,
12875            pub(crate) subscription_id: String,
12876        }
12877        impl RequestBuilder {
12878            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12879            #[doc = ""]
12880            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12881            #[doc = "However, this function can provide more flexibility when required."]
12882            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12883                Box::pin({
12884                    let this = self.clone();
12885                    async move {
12886                        let url = this.url()?;
12887                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
12888                        let bearer_token = this.client.bearer_token().await?;
12889                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
12890                        req.insert_header("content-type", "application/json");
12891                        let req_body = azure_core::to_json(&this.parameters)?;
12892                        req.set_body(req_body);
12893                        Ok(Response(this.client.send(&mut req).await?))
12894                    }
12895                })
12896            }
12897            fn url(&self) -> azure_core::Result<azure_core::Url> {
12898                let mut url = self.client.endpoint().clone();
12899                url.set_path(&format!(
12900                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/configurations/{}",
12901                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.configuration_name
12902                ));
12903                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
12904                if !has_api_version_already {
12905                    url.query_pairs_mut()
12906                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
12907                }
12908                Ok(url)
12909            }
12910        }
12911        impl std::future::IntoFuture for RequestBuilder {
12912            type Output = azure_core::Result<models::DscConfiguration>;
12913            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscConfiguration>>;
12914            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12915            #[doc = ""]
12916            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12917            #[doc = ""]
12918            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12919            fn into_future(self) -> Self::IntoFuture {
12920                Box::pin(async move { self.send().await?.into_body().await })
12921            }
12922        }
12923    }
12924    pub mod update {
12925        use super::models;
12926        #[cfg(not(target_arch = "wasm32"))]
12927        use futures::future::BoxFuture;
12928        #[cfg(target_arch = "wasm32")]
12929        use futures::future::LocalBoxFuture as BoxFuture;
12930        #[derive(Debug)]
12931        pub struct Response(azure_core::Response);
12932        impl Response {
12933            pub async fn into_body(self) -> azure_core::Result<models::DscConfiguration> {
12934                let bytes = self.0.into_body().collect().await?;
12935                let body: models::DscConfiguration = serde_json::from_slice(&bytes)?;
12936                Ok(body)
12937            }
12938            pub fn into_raw_response(self) -> azure_core::Response {
12939                self.0
12940            }
12941            pub fn as_raw_response(&self) -> &azure_core::Response {
12942                &self.0
12943            }
12944        }
12945        impl From<Response> for azure_core::Response {
12946            fn from(rsp: Response) -> Self {
12947                rsp.into_raw_response()
12948            }
12949        }
12950        impl AsRef<azure_core::Response> for Response {
12951            fn as_ref(&self) -> &azure_core::Response {
12952                self.as_raw_response()
12953            }
12954        }
12955        #[derive(Clone)]
12956        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12957        #[doc = r""]
12958        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12959        #[doc = r" parameters can be chained."]
12960        #[doc = r""]
12961        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12962        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
12963        #[doc = r" executes the request and returns a `Result` with the parsed"]
12964        #[doc = r" response."]
12965        #[doc = r""]
12966        #[doc = r" In order to execute the request without polling the service"]
12967        #[doc = r" until the operation completes, use `.send().await` instead."]
12968        #[doc = r""]
12969        #[doc = r" If you need lower-level access to the raw response details"]
12970        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12971        #[doc = r" can finalize the request using the"]
12972        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12973        #[doc = r" that resolves to a lower-level [`Response`] value."]
12974        pub struct RequestBuilder {
12975            pub(crate) client: super::super::Client,
12976            pub(crate) resource_group_name: String,
12977            pub(crate) automation_account_name: String,
12978            pub(crate) configuration_name: String,
12979            pub(crate) subscription_id: String,
12980            pub(crate) parameters: Option<models::DscConfigurationUpdateParameters>,
12981        }
12982        impl RequestBuilder {
12983            #[doc = "The create or update parameters for configuration."]
12984            pub fn parameters(mut self, parameters: impl Into<models::DscConfigurationUpdateParameters>) -> Self {
12985                self.parameters = Some(parameters.into());
12986                self
12987            }
12988            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12989            #[doc = ""]
12990            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12991            #[doc = "However, this function can provide more flexibility when required."]
12992            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12993                Box::pin({
12994                    let this = self.clone();
12995                    async move {
12996                        let url = this.url()?;
12997                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
12998                        let bearer_token = this.client.bearer_token().await?;
12999                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13000                        let req_body = if let Some(parameters) = &this.parameters {
13001                            req.insert_header("content-type", "application/json");
13002                            azure_core::to_json(parameters)?
13003                        } else {
13004                            azure_core::EMPTY_BODY
13005                        };
13006                        req.set_body(req_body);
13007                        Ok(Response(this.client.send(&mut req).await?))
13008                    }
13009                })
13010            }
13011            fn url(&self) -> azure_core::Result<azure_core::Url> {
13012                let mut url = self.client.endpoint().clone();
13013                url.set_path(&format!(
13014                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/configurations/{}",
13015                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.configuration_name
13016                ));
13017                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13018                if !has_api_version_already {
13019                    url.query_pairs_mut()
13020                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13021                }
13022                Ok(url)
13023            }
13024        }
13025        impl std::future::IntoFuture for RequestBuilder {
13026            type Output = azure_core::Result<models::DscConfiguration>;
13027            type IntoFuture = BoxFuture<'static, azure_core::Result<models::DscConfiguration>>;
13028            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13029            #[doc = ""]
13030            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13031            #[doc = ""]
13032            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13033            fn into_future(self) -> Self::IntoFuture {
13034                Box::pin(async move { self.send().await?.into_body().await })
13035            }
13036        }
13037    }
13038    pub mod delete {
13039        use super::models;
13040        #[cfg(not(target_arch = "wasm32"))]
13041        use futures::future::BoxFuture;
13042        #[cfg(target_arch = "wasm32")]
13043        use futures::future::LocalBoxFuture as BoxFuture;
13044        #[derive(Debug)]
13045        pub struct Response(azure_core::Response);
13046        impl Response {
13047            pub fn into_raw_response(self) -> azure_core::Response {
13048                self.0
13049            }
13050            pub fn as_raw_response(&self) -> &azure_core::Response {
13051                &self.0
13052            }
13053        }
13054        impl From<Response> for azure_core::Response {
13055            fn from(rsp: Response) -> Self {
13056                rsp.into_raw_response()
13057            }
13058        }
13059        impl AsRef<azure_core::Response> for Response {
13060            fn as_ref(&self) -> &azure_core::Response {
13061                self.as_raw_response()
13062            }
13063        }
13064        #[derive(Clone)]
13065        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13066        #[doc = r""]
13067        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13068        #[doc = r" parameters can be chained."]
13069        #[doc = r""]
13070        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13071        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
13072        #[doc = r" executes the request and returns a `Result` with the parsed"]
13073        #[doc = r" response."]
13074        #[doc = r""]
13075        #[doc = r" In order to execute the request without polling the service"]
13076        #[doc = r" until the operation completes, use `.send().await` instead."]
13077        #[doc = r""]
13078        #[doc = r" If you need lower-level access to the raw response details"]
13079        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13080        #[doc = r" can finalize the request using the"]
13081        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13082        #[doc = r" that resolves to a lower-level [`Response`] value."]
13083        pub struct RequestBuilder {
13084            pub(crate) client: super::super::Client,
13085            pub(crate) resource_group_name: String,
13086            pub(crate) automation_account_name: String,
13087            pub(crate) configuration_name: String,
13088            pub(crate) subscription_id: String,
13089        }
13090        impl RequestBuilder {
13091            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13092            #[doc = ""]
13093            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13094            #[doc = "However, this function can provide more flexibility when required."]
13095            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13096                Box::pin({
13097                    let this = self.clone();
13098                    async move {
13099                        let url = this.url()?;
13100                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
13101                        let bearer_token = this.client.bearer_token().await?;
13102                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13103                        let req_body = azure_core::EMPTY_BODY;
13104                        req.set_body(req_body);
13105                        Ok(Response(this.client.send(&mut req).await?))
13106                    }
13107                })
13108            }
13109            fn url(&self) -> azure_core::Result<azure_core::Url> {
13110                let mut url = self.client.endpoint().clone();
13111                url.set_path(&format!(
13112                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/configurations/{}",
13113                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.configuration_name
13114                ));
13115                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13116                if !has_api_version_already {
13117                    url.query_pairs_mut()
13118                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13119                }
13120                Ok(url)
13121            }
13122        }
13123    }
13124    pub mod get_content {
13125        use super::models;
13126        #[cfg(not(target_arch = "wasm32"))]
13127        use futures::future::BoxFuture;
13128        #[cfg(target_arch = "wasm32")]
13129        use futures::future::LocalBoxFuture as BoxFuture;
13130        #[derive(Debug)]
13131        pub struct Response(azure_core::Response);
13132        impl Response {
13133            pub async fn into_body(self) -> azure_core::Result<String> {
13134                let bytes = self.0.into_body().collect().await?;
13135                let body: String = serde_json::from_slice(&bytes)?;
13136                Ok(body)
13137            }
13138            pub fn into_raw_response(self) -> azure_core::Response {
13139                self.0
13140            }
13141            pub fn as_raw_response(&self) -> &azure_core::Response {
13142                &self.0
13143            }
13144        }
13145        impl From<Response> for azure_core::Response {
13146            fn from(rsp: Response) -> Self {
13147                rsp.into_raw_response()
13148            }
13149        }
13150        impl AsRef<azure_core::Response> for Response {
13151            fn as_ref(&self) -> &azure_core::Response {
13152                self.as_raw_response()
13153            }
13154        }
13155        #[derive(Clone)]
13156        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13157        #[doc = r""]
13158        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13159        #[doc = r" parameters can be chained."]
13160        #[doc = r""]
13161        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13162        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
13163        #[doc = r" executes the request and returns a `Result` with the parsed"]
13164        #[doc = r" response."]
13165        #[doc = r""]
13166        #[doc = r" In order to execute the request without polling the service"]
13167        #[doc = r" until the operation completes, use `.send().await` instead."]
13168        #[doc = r""]
13169        #[doc = r" If you need lower-level access to the raw response details"]
13170        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13171        #[doc = r" can finalize the request using the"]
13172        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13173        #[doc = r" that resolves to a lower-level [`Response`] value."]
13174        pub struct RequestBuilder {
13175            pub(crate) client: super::super::Client,
13176            pub(crate) resource_group_name: String,
13177            pub(crate) automation_account_name: String,
13178            pub(crate) configuration_name: String,
13179            pub(crate) subscription_id: String,
13180        }
13181        impl RequestBuilder {
13182            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13183            #[doc = ""]
13184            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13185            #[doc = "However, this function can provide more flexibility when required."]
13186            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13187                Box::pin({
13188                    let this = self.clone();
13189                    async move {
13190                        let url = this.url()?;
13191                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13192                        let bearer_token = this.client.bearer_token().await?;
13193                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13194                        let req_body = azure_core::EMPTY_BODY;
13195                        req.set_body(req_body);
13196                        Ok(Response(this.client.send(&mut req).await?))
13197                    }
13198                })
13199            }
13200            fn url(&self) -> azure_core::Result<azure_core::Url> {
13201                let mut url = self.client.endpoint().clone();
13202                url.set_path(&format!(
13203                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/configurations/{}/content",
13204                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.configuration_name
13205                ));
13206                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13207                if !has_api_version_already {
13208                    url.query_pairs_mut()
13209                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13210                }
13211                Ok(url)
13212            }
13213        }
13214        impl std::future::IntoFuture for RequestBuilder {
13215            type Output = azure_core::Result<String>;
13216            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
13217            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13218            #[doc = ""]
13219            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13220            #[doc = ""]
13221            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13222            fn into_future(self) -> Self::IntoFuture {
13223                Box::pin(async move { self.send().await?.into_body().await })
13224            }
13225        }
13226    }
13227    pub mod list_by_automation_account {
13228        use super::models;
13229        #[cfg(not(target_arch = "wasm32"))]
13230        use futures::future::BoxFuture;
13231        #[cfg(target_arch = "wasm32")]
13232        use futures::future::LocalBoxFuture as BoxFuture;
13233        #[derive(Debug)]
13234        pub struct Response(azure_core::Response);
13235        impl Response {
13236            pub async fn into_body(self) -> azure_core::Result<models::DscConfigurationListResult> {
13237                let bytes = self.0.into_body().collect().await?;
13238                let body: models::DscConfigurationListResult = serde_json::from_slice(&bytes)?;
13239                Ok(body)
13240            }
13241            pub fn into_raw_response(self) -> azure_core::Response {
13242                self.0
13243            }
13244            pub fn as_raw_response(&self) -> &azure_core::Response {
13245                &self.0
13246            }
13247        }
13248        impl From<Response> for azure_core::Response {
13249            fn from(rsp: Response) -> Self {
13250                rsp.into_raw_response()
13251            }
13252        }
13253        impl AsRef<azure_core::Response> for Response {
13254            fn as_ref(&self) -> &azure_core::Response {
13255                self.as_raw_response()
13256            }
13257        }
13258        #[derive(Clone)]
13259        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13260        #[doc = r""]
13261        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13262        #[doc = r" parameters can be chained."]
13263        #[doc = r""]
13264        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13265        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
13266        #[doc = r" executes the request and returns a `Result` with the parsed"]
13267        #[doc = r" response."]
13268        #[doc = r""]
13269        #[doc = r" In order to execute the request without polling the service"]
13270        #[doc = r" until the operation completes, use `.send().await` instead."]
13271        #[doc = r""]
13272        #[doc = r" If you need lower-level access to the raw response details"]
13273        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13274        #[doc = r" can finalize the request using the"]
13275        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13276        #[doc = r" that resolves to a lower-level [`Response`] value."]
13277        pub struct RequestBuilder {
13278            pub(crate) client: super::super::Client,
13279            pub(crate) resource_group_name: String,
13280            pub(crate) automation_account_name: String,
13281            pub(crate) subscription_id: String,
13282            pub(crate) filter: Option<String>,
13283            pub(crate) skip: Option<i64>,
13284            pub(crate) top: Option<i64>,
13285            pub(crate) inlinecount: Option<String>,
13286        }
13287        impl RequestBuilder {
13288            #[doc = "The filter to apply on the operation."]
13289            pub fn filter(mut self, filter: impl Into<String>) -> Self {
13290                self.filter = Some(filter.into());
13291                self
13292            }
13293            #[doc = "The number of rows to skip."]
13294            pub fn skip(mut self, skip: i64) -> Self {
13295                self.skip = Some(skip);
13296                self
13297            }
13298            #[doc = "The number of rows to take."]
13299            pub fn top(mut self, top: i64) -> Self {
13300                self.top = Some(top);
13301                self
13302            }
13303            #[doc = "Return total rows."]
13304            pub fn inlinecount(mut self, inlinecount: impl Into<String>) -> Self {
13305                self.inlinecount = Some(inlinecount.into());
13306                self
13307            }
13308            pub fn into_stream(self) -> azure_core::Pageable<models::DscConfigurationListResult, azure_core::error::Error> {
13309                let make_request = move |continuation: Option<String>| {
13310                    let this = self.clone();
13311                    async move {
13312                        let mut url = this.url()?;
13313                        let rsp = match continuation {
13314                            Some(value) => {
13315                                url.set_path("");
13316                                url = url.join(&value)?;
13317                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13318                                let bearer_token = this.client.bearer_token().await?;
13319                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13320                                let has_api_version_already =
13321                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13322                                if !has_api_version_already {
13323                                    req.url_mut()
13324                                        .query_pairs_mut()
13325                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13326                                }
13327                                let req_body = azure_core::EMPTY_BODY;
13328                                req.set_body(req_body);
13329                                this.client.send(&mut req).await?
13330                            }
13331                            None => {
13332                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13333                                let bearer_token = this.client.bearer_token().await?;
13334                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13335                                if let Some(filter) = &this.filter {
13336                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
13337                                }
13338                                if let Some(skip) = &this.skip {
13339                                    req.url_mut().query_pairs_mut().append_pair("$skip", &skip.to_string());
13340                                }
13341                                if let Some(top) = &this.top {
13342                                    req.url_mut().query_pairs_mut().append_pair("$top", &top.to_string());
13343                                }
13344                                if let Some(inlinecount) = &this.inlinecount {
13345                                    req.url_mut().query_pairs_mut().append_pair("$inlinecount", inlinecount);
13346                                }
13347                                let req_body = azure_core::EMPTY_BODY;
13348                                req.set_body(req_body);
13349                                this.client.send(&mut req).await?
13350                            }
13351                        };
13352                        let rsp = match rsp.status() {
13353                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
13354                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
13355                                status: status_code,
13356                                error_code: None,
13357                            })),
13358                        };
13359                        rsp?.into_body().await
13360                    }
13361                };
13362                azure_core::Pageable::new(make_request)
13363            }
13364            fn url(&self) -> azure_core::Result<azure_core::Url> {
13365                let mut url = self.client.endpoint().clone();
13366                url.set_path(&format!(
13367                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/configurations",
13368                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
13369                ));
13370                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13371                if !has_api_version_already {
13372                    url.query_pairs_mut()
13373                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13374                }
13375                Ok(url)
13376            }
13377        }
13378    }
13379}
13380pub mod software_update_configurations {
13381    use super::models;
13382    #[cfg(not(target_arch = "wasm32"))]
13383    use futures::future::BoxFuture;
13384    #[cfg(target_arch = "wasm32")]
13385    use futures::future::LocalBoxFuture as BoxFuture;
13386    pub struct Client(pub(crate) super::Client);
13387    impl Client {
13388        #[doc = "Get a single software update configuration by name."]
13389        #[doc = ""]
13390        #[doc = "Arguments:"]
13391        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
13392        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
13393        #[doc = "* `automation_account_name`: The name of the automation account."]
13394        #[doc = "* `software_update_configuration_name`: The name of the software update configuration to be created."]
13395        pub fn get_by_name(
13396            &self,
13397            subscription_id: impl Into<String>,
13398            resource_group_name: impl Into<String>,
13399            automation_account_name: impl Into<String>,
13400            software_update_configuration_name: impl Into<String>,
13401        ) -> get_by_name::RequestBuilder {
13402            get_by_name::RequestBuilder {
13403                client: self.0.clone(),
13404                subscription_id: subscription_id.into(),
13405                resource_group_name: resource_group_name.into(),
13406                automation_account_name: automation_account_name.into(),
13407                software_update_configuration_name: software_update_configuration_name.into(),
13408                client_request_id: None,
13409            }
13410        }
13411        #[doc = "Create a new software update configuration with the name given in the URI."]
13412        #[doc = ""]
13413        #[doc = "Arguments:"]
13414        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
13415        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
13416        #[doc = "* `automation_account_name`: The name of the automation account."]
13417        #[doc = "* `software_update_configuration_name`: The name of the software update configuration to be created."]
13418        #[doc = "* `parameters`: Request body."]
13419        pub fn create(
13420            &self,
13421            subscription_id: impl Into<String>,
13422            resource_group_name: impl Into<String>,
13423            automation_account_name: impl Into<String>,
13424            software_update_configuration_name: impl Into<String>,
13425            parameters: impl Into<models::SoftwareUpdateConfiguration>,
13426        ) -> create::RequestBuilder {
13427            create::RequestBuilder {
13428                client: self.0.clone(),
13429                subscription_id: subscription_id.into(),
13430                resource_group_name: resource_group_name.into(),
13431                automation_account_name: automation_account_name.into(),
13432                software_update_configuration_name: software_update_configuration_name.into(),
13433                parameters: parameters.into(),
13434                client_request_id: None,
13435            }
13436        }
13437        #[doc = "delete a specific software update configuration."]
13438        #[doc = ""]
13439        #[doc = "Arguments:"]
13440        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
13441        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
13442        #[doc = "* `automation_account_name`: The name of the automation account."]
13443        #[doc = "* `software_update_configuration_name`: The name of the software update configuration to be created."]
13444        pub fn delete(
13445            &self,
13446            subscription_id: impl Into<String>,
13447            resource_group_name: impl Into<String>,
13448            automation_account_name: impl Into<String>,
13449            software_update_configuration_name: impl Into<String>,
13450        ) -> delete::RequestBuilder {
13451            delete::RequestBuilder {
13452                client: self.0.clone(),
13453                subscription_id: subscription_id.into(),
13454                resource_group_name: resource_group_name.into(),
13455                automation_account_name: automation_account_name.into(),
13456                software_update_configuration_name: software_update_configuration_name.into(),
13457                client_request_id: None,
13458            }
13459        }
13460        #[doc = "Get all software update configurations for the account."]
13461        #[doc = ""]
13462        #[doc = "Arguments:"]
13463        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
13464        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
13465        #[doc = "* `automation_account_name`: The name of the automation account."]
13466        pub fn list(
13467            &self,
13468            subscription_id: impl Into<String>,
13469            resource_group_name: impl Into<String>,
13470            automation_account_name: impl Into<String>,
13471        ) -> list::RequestBuilder {
13472            list::RequestBuilder {
13473                client: self.0.clone(),
13474                subscription_id: subscription_id.into(),
13475                resource_group_name: resource_group_name.into(),
13476                automation_account_name: automation_account_name.into(),
13477                client_request_id: None,
13478                filter: None,
13479            }
13480        }
13481    }
13482    pub mod get_by_name {
13483        use super::models;
13484        #[cfg(not(target_arch = "wasm32"))]
13485        use futures::future::BoxFuture;
13486        #[cfg(target_arch = "wasm32")]
13487        use futures::future::LocalBoxFuture as BoxFuture;
13488        #[derive(Debug)]
13489        pub struct Response(azure_core::Response);
13490        impl Response {
13491            pub async fn into_body(self) -> azure_core::Result<models::SoftwareUpdateConfiguration> {
13492                let bytes = self.0.into_body().collect().await?;
13493                let body: models::SoftwareUpdateConfiguration = serde_json::from_slice(&bytes)?;
13494                Ok(body)
13495            }
13496            pub fn into_raw_response(self) -> azure_core::Response {
13497                self.0
13498            }
13499            pub fn as_raw_response(&self) -> &azure_core::Response {
13500                &self.0
13501            }
13502        }
13503        impl From<Response> for azure_core::Response {
13504            fn from(rsp: Response) -> Self {
13505                rsp.into_raw_response()
13506            }
13507        }
13508        impl AsRef<azure_core::Response> for Response {
13509            fn as_ref(&self) -> &azure_core::Response {
13510                self.as_raw_response()
13511            }
13512        }
13513        #[derive(Clone)]
13514        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13515        #[doc = r""]
13516        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13517        #[doc = r" parameters can be chained."]
13518        #[doc = r""]
13519        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13520        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
13521        #[doc = r" executes the request and returns a `Result` with the parsed"]
13522        #[doc = r" response."]
13523        #[doc = r""]
13524        #[doc = r" In order to execute the request without polling the service"]
13525        #[doc = r" until the operation completes, use `.send().await` instead."]
13526        #[doc = r""]
13527        #[doc = r" If you need lower-level access to the raw response details"]
13528        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13529        #[doc = r" can finalize the request using the"]
13530        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13531        #[doc = r" that resolves to a lower-level [`Response`] value."]
13532        pub struct RequestBuilder {
13533            pub(crate) client: super::super::Client,
13534            pub(crate) subscription_id: String,
13535            pub(crate) resource_group_name: String,
13536            pub(crate) automation_account_name: String,
13537            pub(crate) software_update_configuration_name: String,
13538            pub(crate) client_request_id: Option<String>,
13539        }
13540        impl RequestBuilder {
13541            #[doc = "Identifies this specific client request."]
13542            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
13543                self.client_request_id = Some(client_request_id.into());
13544                self
13545            }
13546            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13547            #[doc = ""]
13548            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13549            #[doc = "However, this function can provide more flexibility when required."]
13550            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13551                Box::pin({
13552                    let this = self.clone();
13553                    async move {
13554                        let url = this.url()?;
13555                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13556                        let bearer_token = this.client.bearer_token().await?;
13557                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13558                        if let Some(client_request_id) = &this.client_request_id {
13559                            req.insert_header("clientrequestid", client_request_id);
13560                        }
13561                        let req_body = azure_core::EMPTY_BODY;
13562                        req.set_body(req_body);
13563                        Ok(Response(this.client.send(&mut req).await?))
13564                    }
13565                })
13566            }
13567            fn url(&self) -> azure_core::Result<azure_core::Url> {
13568                let mut url = self.client.endpoint().clone();
13569                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/softwareUpdateConfigurations/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . software_update_configuration_name)) ;
13570                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13571                if !has_api_version_already {
13572                    url.query_pairs_mut()
13573                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13574                }
13575                Ok(url)
13576            }
13577        }
13578        impl std::future::IntoFuture for RequestBuilder {
13579            type Output = azure_core::Result<models::SoftwareUpdateConfiguration>;
13580            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SoftwareUpdateConfiguration>>;
13581            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13582            #[doc = ""]
13583            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13584            #[doc = ""]
13585            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13586            fn into_future(self) -> Self::IntoFuture {
13587                Box::pin(async move { self.send().await?.into_body().await })
13588            }
13589        }
13590    }
13591    pub mod create {
13592        use super::models;
13593        #[cfg(not(target_arch = "wasm32"))]
13594        use futures::future::BoxFuture;
13595        #[cfg(target_arch = "wasm32")]
13596        use futures::future::LocalBoxFuture as BoxFuture;
13597        #[derive(Debug)]
13598        pub struct Response(azure_core::Response);
13599        impl Response {
13600            pub async fn into_body(self) -> azure_core::Result<models::SoftwareUpdateConfiguration> {
13601                let bytes = self.0.into_body().collect().await?;
13602                let body: models::SoftwareUpdateConfiguration = serde_json::from_slice(&bytes)?;
13603                Ok(body)
13604            }
13605            pub fn into_raw_response(self) -> azure_core::Response {
13606                self.0
13607            }
13608            pub fn as_raw_response(&self) -> &azure_core::Response {
13609                &self.0
13610            }
13611        }
13612        impl From<Response> for azure_core::Response {
13613            fn from(rsp: Response) -> Self {
13614                rsp.into_raw_response()
13615            }
13616        }
13617        impl AsRef<azure_core::Response> for Response {
13618            fn as_ref(&self) -> &azure_core::Response {
13619                self.as_raw_response()
13620            }
13621        }
13622        #[derive(Clone)]
13623        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13624        #[doc = r""]
13625        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13626        #[doc = r" parameters can be chained."]
13627        #[doc = r""]
13628        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13629        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
13630        #[doc = r" executes the request and returns a `Result` with the parsed"]
13631        #[doc = r" response."]
13632        #[doc = r""]
13633        #[doc = r" In order to execute the request without polling the service"]
13634        #[doc = r" until the operation completes, use `.send().await` instead."]
13635        #[doc = r""]
13636        #[doc = r" If you need lower-level access to the raw response details"]
13637        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13638        #[doc = r" can finalize the request using the"]
13639        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13640        #[doc = r" that resolves to a lower-level [`Response`] value."]
13641        pub struct RequestBuilder {
13642            pub(crate) client: super::super::Client,
13643            pub(crate) subscription_id: String,
13644            pub(crate) resource_group_name: String,
13645            pub(crate) automation_account_name: String,
13646            pub(crate) software_update_configuration_name: String,
13647            pub(crate) parameters: models::SoftwareUpdateConfiguration,
13648            pub(crate) client_request_id: Option<String>,
13649        }
13650        impl RequestBuilder {
13651            #[doc = "Identifies this specific client request."]
13652            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
13653                self.client_request_id = Some(client_request_id.into());
13654                self
13655            }
13656            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13657            #[doc = ""]
13658            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13659            #[doc = "However, this function can provide more flexibility when required."]
13660            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13661                Box::pin({
13662                    let this = self.clone();
13663                    async move {
13664                        let url = this.url()?;
13665                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
13666                        let bearer_token = this.client.bearer_token().await?;
13667                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13668                        if let Some(client_request_id) = &this.client_request_id {
13669                            req.insert_header("clientrequestid", client_request_id);
13670                        }
13671                        req.insert_header("content-type", "application/json");
13672                        let req_body = azure_core::to_json(&this.parameters)?;
13673                        req.set_body(req_body);
13674                        Ok(Response(this.client.send(&mut req).await?))
13675                    }
13676                })
13677            }
13678            fn url(&self) -> azure_core::Result<azure_core::Url> {
13679                let mut url = self.client.endpoint().clone();
13680                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/softwareUpdateConfigurations/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . software_update_configuration_name)) ;
13681                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13682                if !has_api_version_already {
13683                    url.query_pairs_mut()
13684                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13685                }
13686                Ok(url)
13687            }
13688        }
13689        impl std::future::IntoFuture for RequestBuilder {
13690            type Output = azure_core::Result<models::SoftwareUpdateConfiguration>;
13691            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SoftwareUpdateConfiguration>>;
13692            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13693            #[doc = ""]
13694            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13695            #[doc = ""]
13696            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13697            fn into_future(self) -> Self::IntoFuture {
13698                Box::pin(async move { self.send().await?.into_body().await })
13699            }
13700        }
13701    }
13702    pub mod delete {
13703        use super::models;
13704        #[cfg(not(target_arch = "wasm32"))]
13705        use futures::future::BoxFuture;
13706        #[cfg(target_arch = "wasm32")]
13707        use futures::future::LocalBoxFuture as BoxFuture;
13708        #[derive(Debug)]
13709        pub struct Response(azure_core::Response);
13710        impl Response {
13711            pub fn into_raw_response(self) -> azure_core::Response {
13712                self.0
13713            }
13714            pub fn as_raw_response(&self) -> &azure_core::Response {
13715                &self.0
13716            }
13717        }
13718        impl From<Response> for azure_core::Response {
13719            fn from(rsp: Response) -> Self {
13720                rsp.into_raw_response()
13721            }
13722        }
13723        impl AsRef<azure_core::Response> for Response {
13724            fn as_ref(&self) -> &azure_core::Response {
13725                self.as_raw_response()
13726            }
13727        }
13728        #[derive(Clone)]
13729        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13730        #[doc = r""]
13731        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13732        #[doc = r" parameters can be chained."]
13733        #[doc = r""]
13734        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13735        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
13736        #[doc = r" executes the request and returns a `Result` with the parsed"]
13737        #[doc = r" response."]
13738        #[doc = r""]
13739        #[doc = r" In order to execute the request without polling the service"]
13740        #[doc = r" until the operation completes, use `.send().await` instead."]
13741        #[doc = r""]
13742        #[doc = r" If you need lower-level access to the raw response details"]
13743        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13744        #[doc = r" can finalize the request using the"]
13745        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13746        #[doc = r" that resolves to a lower-level [`Response`] value."]
13747        pub struct RequestBuilder {
13748            pub(crate) client: super::super::Client,
13749            pub(crate) subscription_id: String,
13750            pub(crate) resource_group_name: String,
13751            pub(crate) automation_account_name: String,
13752            pub(crate) software_update_configuration_name: String,
13753            pub(crate) client_request_id: Option<String>,
13754        }
13755        impl RequestBuilder {
13756            #[doc = "Identifies this specific client request."]
13757            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
13758                self.client_request_id = Some(client_request_id.into());
13759                self
13760            }
13761            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13762            #[doc = ""]
13763            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13764            #[doc = "However, this function can provide more flexibility when required."]
13765            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13766                Box::pin({
13767                    let this = self.clone();
13768                    async move {
13769                        let url = this.url()?;
13770                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
13771                        let bearer_token = this.client.bearer_token().await?;
13772                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13773                        if let Some(client_request_id) = &this.client_request_id {
13774                            req.insert_header("clientrequestid", client_request_id);
13775                        }
13776                        let req_body = azure_core::EMPTY_BODY;
13777                        req.set_body(req_body);
13778                        Ok(Response(this.client.send(&mut req).await?))
13779                    }
13780                })
13781            }
13782            fn url(&self) -> azure_core::Result<azure_core::Url> {
13783                let mut url = self.client.endpoint().clone();
13784                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/softwareUpdateConfigurations/{}" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . software_update_configuration_name)) ;
13785                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13786                if !has_api_version_already {
13787                    url.query_pairs_mut()
13788                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13789                }
13790                Ok(url)
13791            }
13792        }
13793    }
13794    pub mod list {
13795        use super::models;
13796        #[cfg(not(target_arch = "wasm32"))]
13797        use futures::future::BoxFuture;
13798        #[cfg(target_arch = "wasm32")]
13799        use futures::future::LocalBoxFuture as BoxFuture;
13800        #[derive(Debug)]
13801        pub struct Response(azure_core::Response);
13802        impl Response {
13803            pub async fn into_body(self) -> azure_core::Result<models::SoftwareUpdateConfigurationListResult> {
13804                let bytes = self.0.into_body().collect().await?;
13805                let body: models::SoftwareUpdateConfigurationListResult = serde_json::from_slice(&bytes)?;
13806                Ok(body)
13807            }
13808            pub fn into_raw_response(self) -> azure_core::Response {
13809                self.0
13810            }
13811            pub fn as_raw_response(&self) -> &azure_core::Response {
13812                &self.0
13813            }
13814        }
13815        impl From<Response> for azure_core::Response {
13816            fn from(rsp: Response) -> Self {
13817                rsp.into_raw_response()
13818            }
13819        }
13820        impl AsRef<azure_core::Response> for Response {
13821            fn as_ref(&self) -> &azure_core::Response {
13822                self.as_raw_response()
13823            }
13824        }
13825        #[derive(Clone)]
13826        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13827        #[doc = r""]
13828        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13829        #[doc = r" parameters can be chained."]
13830        #[doc = r""]
13831        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13832        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
13833        #[doc = r" executes the request and returns a `Result` with the parsed"]
13834        #[doc = r" response."]
13835        #[doc = r""]
13836        #[doc = r" In order to execute the request without polling the service"]
13837        #[doc = r" until the operation completes, use `.send().await` instead."]
13838        #[doc = r""]
13839        #[doc = r" If you need lower-level access to the raw response details"]
13840        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13841        #[doc = r" can finalize the request using the"]
13842        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13843        #[doc = r" that resolves to a lower-level [`Response`] value."]
13844        pub struct RequestBuilder {
13845            pub(crate) client: super::super::Client,
13846            pub(crate) subscription_id: String,
13847            pub(crate) resource_group_name: String,
13848            pub(crate) automation_account_name: String,
13849            pub(crate) client_request_id: Option<String>,
13850            pub(crate) filter: Option<String>,
13851        }
13852        impl RequestBuilder {
13853            #[doc = "Identifies this specific client request."]
13854            pub fn client_request_id(mut self, client_request_id: impl Into<String>) -> Self {
13855                self.client_request_id = Some(client_request_id.into());
13856                self
13857            }
13858            #[doc = "The filter to apply on the operation."]
13859            pub fn filter(mut self, filter: impl Into<String>) -> Self {
13860                self.filter = Some(filter.into());
13861                self
13862            }
13863            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13864            #[doc = ""]
13865            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13866            #[doc = "However, this function can provide more flexibility when required."]
13867            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13868                Box::pin({
13869                    let this = self.clone();
13870                    async move {
13871                        let url = this.url()?;
13872                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13873                        let bearer_token = this.client.bearer_token().await?;
13874                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
13875                        if let Some(client_request_id) = &this.client_request_id {
13876                            req.insert_header("clientrequestid", client_request_id);
13877                        }
13878                        if let Some(filter) = &this.filter {
13879                            req.url_mut().query_pairs_mut().append_pair("$filter", filter);
13880                        }
13881                        let req_body = azure_core::EMPTY_BODY;
13882                        req.set_body(req_body);
13883                        Ok(Response(this.client.send(&mut req).await?))
13884                    }
13885                })
13886            }
13887            fn url(&self) -> azure_core::Result<azure_core::Url> {
13888                let mut url = self.client.endpoint().clone();
13889                url.set_path(&format!(
13890                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/softwareUpdateConfigurations",
13891                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
13892                ));
13893                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
13894                if !has_api_version_already {
13895                    url.query_pairs_mut()
13896                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
13897                }
13898                Ok(url)
13899            }
13900        }
13901        impl std::future::IntoFuture for RequestBuilder {
13902            type Output = azure_core::Result<models::SoftwareUpdateConfigurationListResult>;
13903            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SoftwareUpdateConfigurationListResult>>;
13904            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13905            #[doc = ""]
13906            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13907            #[doc = ""]
13908            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13909            fn into_future(self) -> Self::IntoFuture {
13910                Box::pin(async move { self.send().await?.into_body().await })
13911            }
13912        }
13913    }
13914}
13915pub mod hybrid_runbook_worker_group {
13916    use super::models;
13917    #[cfg(not(target_arch = "wasm32"))]
13918    use futures::future::BoxFuture;
13919    #[cfg(target_arch = "wasm32")]
13920    use futures::future::LocalBoxFuture as BoxFuture;
13921    pub struct Client(pub(crate) super::Client);
13922    impl Client {
13923        #[doc = "Retrieve a hybrid runbook worker group."]
13924        #[doc = ""]
13925        #[doc = "Arguments:"]
13926        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
13927        #[doc = "* `automation_account_name`: The name of the automation account."]
13928        #[doc = "* `hybrid_runbook_worker_group_name`: The hybrid runbook worker group name"]
13929        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
13930        pub fn get(
13931            &self,
13932            resource_group_name: impl Into<String>,
13933            automation_account_name: impl Into<String>,
13934            hybrid_runbook_worker_group_name: impl Into<String>,
13935            subscription_id: impl Into<String>,
13936        ) -> get::RequestBuilder {
13937            get::RequestBuilder {
13938                client: self.0.clone(),
13939                resource_group_name: resource_group_name.into(),
13940                automation_account_name: automation_account_name.into(),
13941                hybrid_runbook_worker_group_name: hybrid_runbook_worker_group_name.into(),
13942                subscription_id: subscription_id.into(),
13943            }
13944        }
13945        #[doc = "Update a hybrid runbook worker group."]
13946        #[doc = ""]
13947        #[doc = "Arguments:"]
13948        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
13949        #[doc = "* `automation_account_name`: The name of the automation account."]
13950        #[doc = "* `hybrid_runbook_worker_group_name`: The hybrid runbook worker group name"]
13951        #[doc = "* `parameters`: The hybrid runbook worker group"]
13952        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
13953        pub fn update(
13954            &self,
13955            resource_group_name: impl Into<String>,
13956            automation_account_name: impl Into<String>,
13957            hybrid_runbook_worker_group_name: impl Into<String>,
13958            parameters: impl Into<models::HybridRunbookWorkerGroupUpdateParameters>,
13959            subscription_id: impl Into<String>,
13960        ) -> update::RequestBuilder {
13961            update::RequestBuilder {
13962                client: self.0.clone(),
13963                resource_group_name: resource_group_name.into(),
13964                automation_account_name: automation_account_name.into(),
13965                hybrid_runbook_worker_group_name: hybrid_runbook_worker_group_name.into(),
13966                parameters: parameters.into(),
13967                subscription_id: subscription_id.into(),
13968            }
13969        }
13970        #[doc = "Delete a hybrid runbook worker group."]
13971        #[doc = ""]
13972        #[doc = "Arguments:"]
13973        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
13974        #[doc = "* `automation_account_name`: The name of the automation account."]
13975        #[doc = "* `hybrid_runbook_worker_group_name`: The hybrid runbook worker group name"]
13976        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
13977        pub fn delete(
13978            &self,
13979            resource_group_name: impl Into<String>,
13980            automation_account_name: impl Into<String>,
13981            hybrid_runbook_worker_group_name: impl Into<String>,
13982            subscription_id: impl Into<String>,
13983        ) -> delete::RequestBuilder {
13984            delete::RequestBuilder {
13985                client: self.0.clone(),
13986                resource_group_name: resource_group_name.into(),
13987                automation_account_name: automation_account_name.into(),
13988                hybrid_runbook_worker_group_name: hybrid_runbook_worker_group_name.into(),
13989                subscription_id: subscription_id.into(),
13990            }
13991        }
13992        #[doc = "Retrieve a list of hybrid runbook worker groups."]
13993        #[doc = ""]
13994        #[doc = "Arguments:"]
13995        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
13996        #[doc = "* `automation_account_name`: The name of the automation account."]
13997        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
13998        pub fn list_by_automation_account(
13999            &self,
14000            resource_group_name: impl Into<String>,
14001            automation_account_name: impl Into<String>,
14002            subscription_id: impl Into<String>,
14003        ) -> list_by_automation_account::RequestBuilder {
14004            list_by_automation_account::RequestBuilder {
14005                client: self.0.clone(),
14006                resource_group_name: resource_group_name.into(),
14007                automation_account_name: automation_account_name.into(),
14008                subscription_id: subscription_id.into(),
14009                filter: None,
14010            }
14011        }
14012    }
14013    pub mod get {
14014        use super::models;
14015        #[cfg(not(target_arch = "wasm32"))]
14016        use futures::future::BoxFuture;
14017        #[cfg(target_arch = "wasm32")]
14018        use futures::future::LocalBoxFuture as BoxFuture;
14019        #[derive(Debug)]
14020        pub struct Response(azure_core::Response);
14021        impl Response {
14022            pub async fn into_body(self) -> azure_core::Result<models::HybridRunbookWorkerGroup> {
14023                let bytes = self.0.into_body().collect().await?;
14024                let body: models::HybridRunbookWorkerGroup = serde_json::from_slice(&bytes)?;
14025                Ok(body)
14026            }
14027            pub fn into_raw_response(self) -> azure_core::Response {
14028                self.0
14029            }
14030            pub fn as_raw_response(&self) -> &azure_core::Response {
14031                &self.0
14032            }
14033        }
14034        impl From<Response> for azure_core::Response {
14035            fn from(rsp: Response) -> Self {
14036                rsp.into_raw_response()
14037            }
14038        }
14039        impl AsRef<azure_core::Response> for Response {
14040            fn as_ref(&self) -> &azure_core::Response {
14041                self.as_raw_response()
14042            }
14043        }
14044        #[derive(Clone)]
14045        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14046        #[doc = r""]
14047        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14048        #[doc = r" parameters can be chained."]
14049        #[doc = r""]
14050        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14051        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
14052        #[doc = r" executes the request and returns a `Result` with the parsed"]
14053        #[doc = r" response."]
14054        #[doc = r""]
14055        #[doc = r" In order to execute the request without polling the service"]
14056        #[doc = r" until the operation completes, use `.send().await` instead."]
14057        #[doc = r""]
14058        #[doc = r" If you need lower-level access to the raw response details"]
14059        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14060        #[doc = r" can finalize the request using the"]
14061        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14062        #[doc = r" that resolves to a lower-level [`Response`] value."]
14063        pub struct RequestBuilder {
14064            pub(crate) client: super::super::Client,
14065            pub(crate) resource_group_name: String,
14066            pub(crate) automation_account_name: String,
14067            pub(crate) hybrid_runbook_worker_group_name: String,
14068            pub(crate) subscription_id: String,
14069        }
14070        impl RequestBuilder {
14071            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14072            #[doc = ""]
14073            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14074            #[doc = "However, this function can provide more flexibility when required."]
14075            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14076                Box::pin({
14077                    let this = self.clone();
14078                    async move {
14079                        let url = this.url()?;
14080                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
14081                        let bearer_token = this.client.bearer_token().await?;
14082                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14083                        let req_body = azure_core::EMPTY_BODY;
14084                        req.set_body(req_body);
14085                        Ok(Response(this.client.send(&mut req).await?))
14086                    }
14087                })
14088            }
14089            fn url(&self) -> azure_core::Result<azure_core::Url> {
14090                let mut url = self.client.endpoint().clone();
14091                url.set_path(&format!(
14092                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/hybridRunbookWorkerGroups/{}",
14093                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.hybrid_runbook_worker_group_name
14094                ));
14095                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14096                if !has_api_version_already {
14097                    url.query_pairs_mut()
14098                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14099                }
14100                Ok(url)
14101            }
14102        }
14103        impl std::future::IntoFuture for RequestBuilder {
14104            type Output = azure_core::Result<models::HybridRunbookWorkerGroup>;
14105            type IntoFuture = BoxFuture<'static, azure_core::Result<models::HybridRunbookWorkerGroup>>;
14106            #[doc = "Returns a future that sends the request and returns the parsed response body."]
14107            #[doc = ""]
14108            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
14109            #[doc = ""]
14110            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
14111            fn into_future(self) -> Self::IntoFuture {
14112                Box::pin(async move { self.send().await?.into_body().await })
14113            }
14114        }
14115    }
14116    pub mod update {
14117        use super::models;
14118        #[cfg(not(target_arch = "wasm32"))]
14119        use futures::future::BoxFuture;
14120        #[cfg(target_arch = "wasm32")]
14121        use futures::future::LocalBoxFuture as BoxFuture;
14122        #[derive(Debug)]
14123        pub struct Response(azure_core::Response);
14124        impl Response {
14125            pub async fn into_body(self) -> azure_core::Result<models::HybridRunbookWorkerGroup> {
14126                let bytes = self.0.into_body().collect().await?;
14127                let body: models::HybridRunbookWorkerGroup = serde_json::from_slice(&bytes)?;
14128                Ok(body)
14129            }
14130            pub fn into_raw_response(self) -> azure_core::Response {
14131                self.0
14132            }
14133            pub fn as_raw_response(&self) -> &azure_core::Response {
14134                &self.0
14135            }
14136        }
14137        impl From<Response> for azure_core::Response {
14138            fn from(rsp: Response) -> Self {
14139                rsp.into_raw_response()
14140            }
14141        }
14142        impl AsRef<azure_core::Response> for Response {
14143            fn as_ref(&self) -> &azure_core::Response {
14144                self.as_raw_response()
14145            }
14146        }
14147        #[derive(Clone)]
14148        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14149        #[doc = r""]
14150        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14151        #[doc = r" parameters can be chained."]
14152        #[doc = r""]
14153        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14154        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
14155        #[doc = r" executes the request and returns a `Result` with the parsed"]
14156        #[doc = r" response."]
14157        #[doc = r""]
14158        #[doc = r" In order to execute the request without polling the service"]
14159        #[doc = r" until the operation completes, use `.send().await` instead."]
14160        #[doc = r""]
14161        #[doc = r" If you need lower-level access to the raw response details"]
14162        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14163        #[doc = r" can finalize the request using the"]
14164        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14165        #[doc = r" that resolves to a lower-level [`Response`] value."]
14166        pub struct RequestBuilder {
14167            pub(crate) client: super::super::Client,
14168            pub(crate) resource_group_name: String,
14169            pub(crate) automation_account_name: String,
14170            pub(crate) hybrid_runbook_worker_group_name: String,
14171            pub(crate) parameters: models::HybridRunbookWorkerGroupUpdateParameters,
14172            pub(crate) subscription_id: String,
14173        }
14174        impl RequestBuilder {
14175            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14176            #[doc = ""]
14177            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14178            #[doc = "However, this function can provide more flexibility when required."]
14179            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14180                Box::pin({
14181                    let this = self.clone();
14182                    async move {
14183                        let url = this.url()?;
14184                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
14185                        let bearer_token = this.client.bearer_token().await?;
14186                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14187                        req.insert_header("content-type", "application/json");
14188                        let req_body = azure_core::to_json(&this.parameters)?;
14189                        req.set_body(req_body);
14190                        Ok(Response(this.client.send(&mut req).await?))
14191                    }
14192                })
14193            }
14194            fn url(&self) -> azure_core::Result<azure_core::Url> {
14195                let mut url = self.client.endpoint().clone();
14196                url.set_path(&format!(
14197                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/hybridRunbookWorkerGroups/{}",
14198                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.hybrid_runbook_worker_group_name
14199                ));
14200                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14201                if !has_api_version_already {
14202                    url.query_pairs_mut()
14203                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14204                }
14205                Ok(url)
14206            }
14207        }
14208        impl std::future::IntoFuture for RequestBuilder {
14209            type Output = azure_core::Result<models::HybridRunbookWorkerGroup>;
14210            type IntoFuture = BoxFuture<'static, azure_core::Result<models::HybridRunbookWorkerGroup>>;
14211            #[doc = "Returns a future that sends the request and returns the parsed response body."]
14212            #[doc = ""]
14213            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
14214            #[doc = ""]
14215            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
14216            fn into_future(self) -> Self::IntoFuture {
14217                Box::pin(async move { self.send().await?.into_body().await })
14218            }
14219        }
14220    }
14221    pub mod delete {
14222        use super::models;
14223        #[cfg(not(target_arch = "wasm32"))]
14224        use futures::future::BoxFuture;
14225        #[cfg(target_arch = "wasm32")]
14226        use futures::future::LocalBoxFuture as BoxFuture;
14227        #[derive(Debug)]
14228        pub struct Response(azure_core::Response);
14229        impl Response {
14230            pub fn into_raw_response(self) -> azure_core::Response {
14231                self.0
14232            }
14233            pub fn as_raw_response(&self) -> &azure_core::Response {
14234                &self.0
14235            }
14236        }
14237        impl From<Response> for azure_core::Response {
14238            fn from(rsp: Response) -> Self {
14239                rsp.into_raw_response()
14240            }
14241        }
14242        impl AsRef<azure_core::Response> for Response {
14243            fn as_ref(&self) -> &azure_core::Response {
14244                self.as_raw_response()
14245            }
14246        }
14247        #[derive(Clone)]
14248        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14249        #[doc = r""]
14250        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14251        #[doc = r" parameters can be chained."]
14252        #[doc = r""]
14253        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14254        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
14255        #[doc = r" executes the request and returns a `Result` with the parsed"]
14256        #[doc = r" response."]
14257        #[doc = r""]
14258        #[doc = r" In order to execute the request without polling the service"]
14259        #[doc = r" until the operation completes, use `.send().await` instead."]
14260        #[doc = r""]
14261        #[doc = r" If you need lower-level access to the raw response details"]
14262        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14263        #[doc = r" can finalize the request using the"]
14264        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14265        #[doc = r" that resolves to a lower-level [`Response`] value."]
14266        pub struct RequestBuilder {
14267            pub(crate) client: super::super::Client,
14268            pub(crate) resource_group_name: String,
14269            pub(crate) automation_account_name: String,
14270            pub(crate) hybrid_runbook_worker_group_name: String,
14271            pub(crate) subscription_id: String,
14272        }
14273        impl RequestBuilder {
14274            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14275            #[doc = ""]
14276            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14277            #[doc = "However, this function can provide more flexibility when required."]
14278            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14279                Box::pin({
14280                    let this = self.clone();
14281                    async move {
14282                        let url = this.url()?;
14283                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
14284                        let bearer_token = this.client.bearer_token().await?;
14285                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14286                        let req_body = azure_core::EMPTY_BODY;
14287                        req.set_body(req_body);
14288                        Ok(Response(this.client.send(&mut req).await?))
14289                    }
14290                })
14291            }
14292            fn url(&self) -> azure_core::Result<azure_core::Url> {
14293                let mut url = self.client.endpoint().clone();
14294                url.set_path(&format!(
14295                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/hybridRunbookWorkerGroups/{}",
14296                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.hybrid_runbook_worker_group_name
14297                ));
14298                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14299                if !has_api_version_already {
14300                    url.query_pairs_mut()
14301                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14302                }
14303                Ok(url)
14304            }
14305        }
14306    }
14307    pub mod list_by_automation_account {
14308        use super::models;
14309        #[cfg(not(target_arch = "wasm32"))]
14310        use futures::future::BoxFuture;
14311        #[cfg(target_arch = "wasm32")]
14312        use futures::future::LocalBoxFuture as BoxFuture;
14313        #[derive(Debug)]
14314        pub struct Response(azure_core::Response);
14315        impl Response {
14316            pub async fn into_body(self) -> azure_core::Result<models::HybridRunbookWorkerGroupsListResult> {
14317                let bytes = self.0.into_body().collect().await?;
14318                let body: models::HybridRunbookWorkerGroupsListResult = serde_json::from_slice(&bytes)?;
14319                Ok(body)
14320            }
14321            pub fn into_raw_response(self) -> azure_core::Response {
14322                self.0
14323            }
14324            pub fn as_raw_response(&self) -> &azure_core::Response {
14325                &self.0
14326            }
14327        }
14328        impl From<Response> for azure_core::Response {
14329            fn from(rsp: Response) -> Self {
14330                rsp.into_raw_response()
14331            }
14332        }
14333        impl AsRef<azure_core::Response> for Response {
14334            fn as_ref(&self) -> &azure_core::Response {
14335                self.as_raw_response()
14336            }
14337        }
14338        #[derive(Clone)]
14339        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14340        #[doc = r""]
14341        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14342        #[doc = r" parameters can be chained."]
14343        #[doc = r""]
14344        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14345        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
14346        #[doc = r" executes the request and returns a `Result` with the parsed"]
14347        #[doc = r" response."]
14348        #[doc = r""]
14349        #[doc = r" In order to execute the request without polling the service"]
14350        #[doc = r" until the operation completes, use `.send().await` instead."]
14351        #[doc = r""]
14352        #[doc = r" If you need lower-level access to the raw response details"]
14353        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14354        #[doc = r" can finalize the request using the"]
14355        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14356        #[doc = r" that resolves to a lower-level [`Response`] value."]
14357        pub struct RequestBuilder {
14358            pub(crate) client: super::super::Client,
14359            pub(crate) resource_group_name: String,
14360            pub(crate) automation_account_name: String,
14361            pub(crate) subscription_id: String,
14362            pub(crate) filter: Option<String>,
14363        }
14364        impl RequestBuilder {
14365            #[doc = "The filter to apply on the operation."]
14366            pub fn filter(mut self, filter: impl Into<String>) -> Self {
14367                self.filter = Some(filter.into());
14368                self
14369            }
14370            pub fn into_stream(self) -> azure_core::Pageable<models::HybridRunbookWorkerGroupsListResult, azure_core::error::Error> {
14371                let make_request = move |continuation: Option<String>| {
14372                    let this = self.clone();
14373                    async move {
14374                        let mut url = this.url()?;
14375                        let rsp = match continuation {
14376                            Some(value) => {
14377                                url.set_path("");
14378                                url = url.join(&value)?;
14379                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
14380                                let bearer_token = this.client.bearer_token().await?;
14381                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14382                                let has_api_version_already =
14383                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14384                                if !has_api_version_already {
14385                                    req.url_mut()
14386                                        .query_pairs_mut()
14387                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14388                                }
14389                                let req_body = azure_core::EMPTY_BODY;
14390                                req.set_body(req_body);
14391                                this.client.send(&mut req).await?
14392                            }
14393                            None => {
14394                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
14395                                let bearer_token = this.client.bearer_token().await?;
14396                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14397                                if let Some(filter) = &this.filter {
14398                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
14399                                }
14400                                let req_body = azure_core::EMPTY_BODY;
14401                                req.set_body(req_body);
14402                                this.client.send(&mut req).await?
14403                            }
14404                        };
14405                        let rsp = match rsp.status() {
14406                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
14407                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
14408                                status: status_code,
14409                                error_code: None,
14410                            })),
14411                        };
14412                        rsp?.into_body().await
14413                    }
14414                };
14415                azure_core::Pageable::new(make_request)
14416            }
14417            fn url(&self) -> azure_core::Result<azure_core::Url> {
14418                let mut url = self.client.endpoint().clone();
14419                url.set_path(&format!(
14420                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/hybridRunbookWorkerGroups",
14421                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
14422                ));
14423                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14424                if !has_api_version_already {
14425                    url.query_pairs_mut()
14426                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14427                }
14428                Ok(url)
14429            }
14430        }
14431    }
14432}
14433pub mod job_schedule {
14434    use super::models;
14435    #[cfg(not(target_arch = "wasm32"))]
14436    use futures::future::BoxFuture;
14437    #[cfg(target_arch = "wasm32")]
14438    use futures::future::LocalBoxFuture as BoxFuture;
14439    pub struct Client(pub(crate) super::Client);
14440    impl Client {
14441        #[doc = "Retrieve the job schedule identified by job schedule name."]
14442        #[doc = ""]
14443        #[doc = "Arguments:"]
14444        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
14445        #[doc = "* `automation_account_name`: The name of the automation account."]
14446        #[doc = "* `job_schedule_id`: The job schedule name."]
14447        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
14448        pub fn get(
14449            &self,
14450            resource_group_name: impl Into<String>,
14451            automation_account_name: impl Into<String>,
14452            job_schedule_id: impl Into<String>,
14453            subscription_id: impl Into<String>,
14454        ) -> get::RequestBuilder {
14455            get::RequestBuilder {
14456                client: self.0.clone(),
14457                resource_group_name: resource_group_name.into(),
14458                automation_account_name: automation_account_name.into(),
14459                job_schedule_id: job_schedule_id.into(),
14460                subscription_id: subscription_id.into(),
14461            }
14462        }
14463        #[doc = "Create a job schedule."]
14464        #[doc = ""]
14465        #[doc = "Arguments:"]
14466        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
14467        #[doc = "* `automation_account_name`: The name of the automation account."]
14468        #[doc = "* `job_schedule_id`: The job schedule name."]
14469        #[doc = "* `parameters`: The parameters supplied to the create job schedule operation."]
14470        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
14471        pub fn create(
14472            &self,
14473            resource_group_name: impl Into<String>,
14474            automation_account_name: impl Into<String>,
14475            job_schedule_id: impl Into<String>,
14476            parameters: impl Into<models::JobScheduleCreateParameters>,
14477            subscription_id: impl Into<String>,
14478        ) -> create::RequestBuilder {
14479            create::RequestBuilder {
14480                client: self.0.clone(),
14481                resource_group_name: resource_group_name.into(),
14482                automation_account_name: automation_account_name.into(),
14483                job_schedule_id: job_schedule_id.into(),
14484                parameters: parameters.into(),
14485                subscription_id: subscription_id.into(),
14486            }
14487        }
14488        #[doc = "Delete the job schedule identified by job schedule name."]
14489        #[doc = ""]
14490        #[doc = "Arguments:"]
14491        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
14492        #[doc = "* `automation_account_name`: The name of the automation account."]
14493        #[doc = "* `job_schedule_id`: The job schedule name."]
14494        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
14495        pub fn delete(
14496            &self,
14497            resource_group_name: impl Into<String>,
14498            automation_account_name: impl Into<String>,
14499            job_schedule_id: impl Into<String>,
14500            subscription_id: impl Into<String>,
14501        ) -> delete::RequestBuilder {
14502            delete::RequestBuilder {
14503                client: self.0.clone(),
14504                resource_group_name: resource_group_name.into(),
14505                automation_account_name: automation_account_name.into(),
14506                job_schedule_id: job_schedule_id.into(),
14507                subscription_id: subscription_id.into(),
14508            }
14509        }
14510        #[doc = "Retrieve a list of job schedules."]
14511        #[doc = ""]
14512        #[doc = "Arguments:"]
14513        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
14514        #[doc = "* `automation_account_name`: The name of the automation account."]
14515        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
14516        pub fn list_by_automation_account(
14517            &self,
14518            resource_group_name: impl Into<String>,
14519            automation_account_name: impl Into<String>,
14520            subscription_id: impl Into<String>,
14521        ) -> list_by_automation_account::RequestBuilder {
14522            list_by_automation_account::RequestBuilder {
14523                client: self.0.clone(),
14524                resource_group_name: resource_group_name.into(),
14525                automation_account_name: automation_account_name.into(),
14526                subscription_id: subscription_id.into(),
14527                filter: None,
14528            }
14529        }
14530    }
14531    pub mod get {
14532        use super::models;
14533        #[cfg(not(target_arch = "wasm32"))]
14534        use futures::future::BoxFuture;
14535        #[cfg(target_arch = "wasm32")]
14536        use futures::future::LocalBoxFuture as BoxFuture;
14537        #[derive(Debug)]
14538        pub struct Response(azure_core::Response);
14539        impl Response {
14540            pub async fn into_body(self) -> azure_core::Result<models::JobSchedule> {
14541                let bytes = self.0.into_body().collect().await?;
14542                let body: models::JobSchedule = serde_json::from_slice(&bytes)?;
14543                Ok(body)
14544            }
14545            pub fn into_raw_response(self) -> azure_core::Response {
14546                self.0
14547            }
14548            pub fn as_raw_response(&self) -> &azure_core::Response {
14549                &self.0
14550            }
14551        }
14552        impl From<Response> for azure_core::Response {
14553            fn from(rsp: Response) -> Self {
14554                rsp.into_raw_response()
14555            }
14556        }
14557        impl AsRef<azure_core::Response> for Response {
14558            fn as_ref(&self) -> &azure_core::Response {
14559                self.as_raw_response()
14560            }
14561        }
14562        #[derive(Clone)]
14563        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14564        #[doc = r""]
14565        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14566        #[doc = r" parameters can be chained."]
14567        #[doc = r""]
14568        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14569        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
14570        #[doc = r" executes the request and returns a `Result` with the parsed"]
14571        #[doc = r" response."]
14572        #[doc = r""]
14573        #[doc = r" In order to execute the request without polling the service"]
14574        #[doc = r" until the operation completes, use `.send().await` instead."]
14575        #[doc = r""]
14576        #[doc = r" If you need lower-level access to the raw response details"]
14577        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14578        #[doc = r" can finalize the request using the"]
14579        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14580        #[doc = r" that resolves to a lower-level [`Response`] value."]
14581        pub struct RequestBuilder {
14582            pub(crate) client: super::super::Client,
14583            pub(crate) resource_group_name: String,
14584            pub(crate) automation_account_name: String,
14585            pub(crate) job_schedule_id: String,
14586            pub(crate) subscription_id: String,
14587        }
14588        impl RequestBuilder {
14589            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14590            #[doc = ""]
14591            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14592            #[doc = "However, this function can provide more flexibility when required."]
14593            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14594                Box::pin({
14595                    let this = self.clone();
14596                    async move {
14597                        let url = this.url()?;
14598                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
14599                        let bearer_token = this.client.bearer_token().await?;
14600                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14601                        let req_body = azure_core::EMPTY_BODY;
14602                        req.set_body(req_body);
14603                        Ok(Response(this.client.send(&mut req).await?))
14604                    }
14605                })
14606            }
14607            fn url(&self) -> azure_core::Result<azure_core::Url> {
14608                let mut url = self.client.endpoint().clone();
14609                url.set_path(&format!(
14610                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobSchedules/{}",
14611                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_schedule_id
14612                ));
14613                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14614                if !has_api_version_already {
14615                    url.query_pairs_mut()
14616                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14617                }
14618                Ok(url)
14619            }
14620        }
14621        impl std::future::IntoFuture for RequestBuilder {
14622            type Output = azure_core::Result<models::JobSchedule>;
14623            type IntoFuture = BoxFuture<'static, azure_core::Result<models::JobSchedule>>;
14624            #[doc = "Returns a future that sends the request and returns the parsed response body."]
14625            #[doc = ""]
14626            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
14627            #[doc = ""]
14628            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
14629            fn into_future(self) -> Self::IntoFuture {
14630                Box::pin(async move { self.send().await?.into_body().await })
14631            }
14632        }
14633    }
14634    pub mod create {
14635        use super::models;
14636        #[cfg(not(target_arch = "wasm32"))]
14637        use futures::future::BoxFuture;
14638        #[cfg(target_arch = "wasm32")]
14639        use futures::future::LocalBoxFuture as BoxFuture;
14640        #[derive(Debug)]
14641        pub struct Response(azure_core::Response);
14642        impl Response {
14643            pub async fn into_body(self) -> azure_core::Result<models::JobSchedule> {
14644                let bytes = self.0.into_body().collect().await?;
14645                let body: models::JobSchedule = serde_json::from_slice(&bytes)?;
14646                Ok(body)
14647            }
14648            pub fn into_raw_response(self) -> azure_core::Response {
14649                self.0
14650            }
14651            pub fn as_raw_response(&self) -> &azure_core::Response {
14652                &self.0
14653            }
14654        }
14655        impl From<Response> for azure_core::Response {
14656            fn from(rsp: Response) -> Self {
14657                rsp.into_raw_response()
14658            }
14659        }
14660        impl AsRef<azure_core::Response> for Response {
14661            fn as_ref(&self) -> &azure_core::Response {
14662                self.as_raw_response()
14663            }
14664        }
14665        #[derive(Clone)]
14666        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14667        #[doc = r""]
14668        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14669        #[doc = r" parameters can be chained."]
14670        #[doc = r""]
14671        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14672        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
14673        #[doc = r" executes the request and returns a `Result` with the parsed"]
14674        #[doc = r" response."]
14675        #[doc = r""]
14676        #[doc = r" In order to execute the request without polling the service"]
14677        #[doc = r" until the operation completes, use `.send().await` instead."]
14678        #[doc = r""]
14679        #[doc = r" If you need lower-level access to the raw response details"]
14680        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14681        #[doc = r" can finalize the request using the"]
14682        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14683        #[doc = r" that resolves to a lower-level [`Response`] value."]
14684        pub struct RequestBuilder {
14685            pub(crate) client: super::super::Client,
14686            pub(crate) resource_group_name: String,
14687            pub(crate) automation_account_name: String,
14688            pub(crate) job_schedule_id: String,
14689            pub(crate) parameters: models::JobScheduleCreateParameters,
14690            pub(crate) subscription_id: String,
14691        }
14692        impl RequestBuilder {
14693            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14694            #[doc = ""]
14695            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14696            #[doc = "However, this function can provide more flexibility when required."]
14697            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14698                Box::pin({
14699                    let this = self.clone();
14700                    async move {
14701                        let url = this.url()?;
14702                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
14703                        let bearer_token = this.client.bearer_token().await?;
14704                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14705                        req.insert_header("content-type", "application/json");
14706                        let req_body = azure_core::to_json(&this.parameters)?;
14707                        req.set_body(req_body);
14708                        Ok(Response(this.client.send(&mut req).await?))
14709                    }
14710                })
14711            }
14712            fn url(&self) -> azure_core::Result<azure_core::Url> {
14713                let mut url = self.client.endpoint().clone();
14714                url.set_path(&format!(
14715                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobSchedules/{}",
14716                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_schedule_id
14717                ));
14718                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14719                if !has_api_version_already {
14720                    url.query_pairs_mut()
14721                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14722                }
14723                Ok(url)
14724            }
14725        }
14726        impl std::future::IntoFuture for RequestBuilder {
14727            type Output = azure_core::Result<models::JobSchedule>;
14728            type IntoFuture = BoxFuture<'static, azure_core::Result<models::JobSchedule>>;
14729            #[doc = "Returns a future that sends the request and returns the parsed response body."]
14730            #[doc = ""]
14731            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
14732            #[doc = ""]
14733            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
14734            fn into_future(self) -> Self::IntoFuture {
14735                Box::pin(async move { self.send().await?.into_body().await })
14736            }
14737        }
14738    }
14739    pub mod delete {
14740        use super::models;
14741        #[cfg(not(target_arch = "wasm32"))]
14742        use futures::future::BoxFuture;
14743        #[cfg(target_arch = "wasm32")]
14744        use futures::future::LocalBoxFuture as BoxFuture;
14745        #[derive(Debug)]
14746        pub struct Response(azure_core::Response);
14747        impl Response {
14748            pub fn into_raw_response(self) -> azure_core::Response {
14749                self.0
14750            }
14751            pub fn as_raw_response(&self) -> &azure_core::Response {
14752                &self.0
14753            }
14754        }
14755        impl From<Response> for azure_core::Response {
14756            fn from(rsp: Response) -> Self {
14757                rsp.into_raw_response()
14758            }
14759        }
14760        impl AsRef<azure_core::Response> for Response {
14761            fn as_ref(&self) -> &azure_core::Response {
14762                self.as_raw_response()
14763            }
14764        }
14765        #[derive(Clone)]
14766        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14767        #[doc = r""]
14768        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14769        #[doc = r" parameters can be chained."]
14770        #[doc = r""]
14771        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14772        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
14773        #[doc = r" executes the request and returns a `Result` with the parsed"]
14774        #[doc = r" response."]
14775        #[doc = r""]
14776        #[doc = r" In order to execute the request without polling the service"]
14777        #[doc = r" until the operation completes, use `.send().await` instead."]
14778        #[doc = r""]
14779        #[doc = r" If you need lower-level access to the raw response details"]
14780        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14781        #[doc = r" can finalize the request using the"]
14782        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14783        #[doc = r" that resolves to a lower-level [`Response`] value."]
14784        pub struct RequestBuilder {
14785            pub(crate) client: super::super::Client,
14786            pub(crate) resource_group_name: String,
14787            pub(crate) automation_account_name: String,
14788            pub(crate) job_schedule_id: String,
14789            pub(crate) subscription_id: String,
14790        }
14791        impl RequestBuilder {
14792            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14793            #[doc = ""]
14794            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14795            #[doc = "However, this function can provide more flexibility when required."]
14796            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14797                Box::pin({
14798                    let this = self.clone();
14799                    async move {
14800                        let url = this.url()?;
14801                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
14802                        let bearer_token = this.client.bearer_token().await?;
14803                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14804                        let req_body = azure_core::EMPTY_BODY;
14805                        req.set_body(req_body);
14806                        Ok(Response(this.client.send(&mut req).await?))
14807                    }
14808                })
14809            }
14810            fn url(&self) -> azure_core::Result<azure_core::Url> {
14811                let mut url = self.client.endpoint().clone();
14812                url.set_path(&format!(
14813                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobSchedules/{}",
14814                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.job_schedule_id
14815                ));
14816                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14817                if !has_api_version_already {
14818                    url.query_pairs_mut()
14819                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14820                }
14821                Ok(url)
14822            }
14823        }
14824    }
14825    pub mod list_by_automation_account {
14826        use super::models;
14827        #[cfg(not(target_arch = "wasm32"))]
14828        use futures::future::BoxFuture;
14829        #[cfg(target_arch = "wasm32")]
14830        use futures::future::LocalBoxFuture as BoxFuture;
14831        #[derive(Debug)]
14832        pub struct Response(azure_core::Response);
14833        impl Response {
14834            pub async fn into_body(self) -> azure_core::Result<models::JobScheduleListResult> {
14835                let bytes = self.0.into_body().collect().await?;
14836                let body: models::JobScheduleListResult = serde_json::from_slice(&bytes)?;
14837                Ok(body)
14838            }
14839            pub fn into_raw_response(self) -> azure_core::Response {
14840                self.0
14841            }
14842            pub fn as_raw_response(&self) -> &azure_core::Response {
14843                &self.0
14844            }
14845        }
14846        impl From<Response> for azure_core::Response {
14847            fn from(rsp: Response) -> Self {
14848                rsp.into_raw_response()
14849            }
14850        }
14851        impl AsRef<azure_core::Response> for Response {
14852            fn as_ref(&self) -> &azure_core::Response {
14853                self.as_raw_response()
14854            }
14855        }
14856        #[derive(Clone)]
14857        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14858        #[doc = r""]
14859        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14860        #[doc = r" parameters can be chained."]
14861        #[doc = r""]
14862        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14863        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
14864        #[doc = r" executes the request and returns a `Result` with the parsed"]
14865        #[doc = r" response."]
14866        #[doc = r""]
14867        #[doc = r" In order to execute the request without polling the service"]
14868        #[doc = r" until the operation completes, use `.send().await` instead."]
14869        #[doc = r""]
14870        #[doc = r" If you need lower-level access to the raw response details"]
14871        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14872        #[doc = r" can finalize the request using the"]
14873        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14874        #[doc = r" that resolves to a lower-level [`Response`] value."]
14875        pub struct RequestBuilder {
14876            pub(crate) client: super::super::Client,
14877            pub(crate) resource_group_name: String,
14878            pub(crate) automation_account_name: String,
14879            pub(crate) subscription_id: String,
14880            pub(crate) filter: Option<String>,
14881        }
14882        impl RequestBuilder {
14883            #[doc = "The filter to apply on the operation."]
14884            pub fn filter(mut self, filter: impl Into<String>) -> Self {
14885                self.filter = Some(filter.into());
14886                self
14887            }
14888            pub fn into_stream(self) -> azure_core::Pageable<models::JobScheduleListResult, azure_core::error::Error> {
14889                let make_request = move |continuation: Option<String>| {
14890                    let this = self.clone();
14891                    async move {
14892                        let mut url = this.url()?;
14893                        let rsp = match continuation {
14894                            Some(value) => {
14895                                url.set_path("");
14896                                url = url.join(&value)?;
14897                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
14898                                let bearer_token = this.client.bearer_token().await?;
14899                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14900                                let has_api_version_already =
14901                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14902                                if !has_api_version_already {
14903                                    req.url_mut()
14904                                        .query_pairs_mut()
14905                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14906                                }
14907                                let req_body = azure_core::EMPTY_BODY;
14908                                req.set_body(req_body);
14909                                this.client.send(&mut req).await?
14910                            }
14911                            None => {
14912                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
14913                                let bearer_token = this.client.bearer_token().await?;
14914                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
14915                                if let Some(filter) = &this.filter {
14916                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
14917                                }
14918                                let req_body = azure_core::EMPTY_BODY;
14919                                req.set_body(req_body);
14920                                this.client.send(&mut req).await?
14921                            }
14922                        };
14923                        let rsp = match rsp.status() {
14924                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
14925                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
14926                                status: status_code,
14927                                error_code: None,
14928                            })),
14929                        };
14930                        rsp?.into_body().await
14931                    }
14932                };
14933                azure_core::Pageable::new(make_request)
14934            }
14935            fn url(&self) -> azure_core::Result<azure_core::Url> {
14936                let mut url = self.client.endpoint().clone();
14937                url.set_path(&format!(
14938                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/jobSchedules",
14939                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
14940                ));
14941                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
14942                if !has_api_version_already {
14943                    url.query_pairs_mut()
14944                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
14945                }
14946                Ok(url)
14947            }
14948        }
14949    }
14950}
14951pub mod linked_workspace {
14952    use super::models;
14953    #[cfg(not(target_arch = "wasm32"))]
14954    use futures::future::BoxFuture;
14955    #[cfg(target_arch = "wasm32")]
14956    use futures::future::LocalBoxFuture as BoxFuture;
14957    pub struct Client(pub(crate) super::Client);
14958    impl Client {
14959        #[doc = "Retrieve the linked workspace for the account id."]
14960        #[doc = ""]
14961        #[doc = "Arguments:"]
14962        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
14963        #[doc = "* `automation_account_name`: The name of the automation account."]
14964        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
14965        pub fn get(
14966            &self,
14967            resource_group_name: impl Into<String>,
14968            automation_account_name: impl Into<String>,
14969            subscription_id: impl Into<String>,
14970        ) -> get::RequestBuilder {
14971            get::RequestBuilder {
14972                client: self.0.clone(),
14973                resource_group_name: resource_group_name.into(),
14974                automation_account_name: automation_account_name.into(),
14975                subscription_id: subscription_id.into(),
14976            }
14977        }
14978    }
14979    pub mod get {
14980        use super::models;
14981        #[cfg(not(target_arch = "wasm32"))]
14982        use futures::future::BoxFuture;
14983        #[cfg(target_arch = "wasm32")]
14984        use futures::future::LocalBoxFuture as BoxFuture;
14985        #[derive(Debug)]
14986        pub struct Response(azure_core::Response);
14987        impl Response {
14988            pub async fn into_body(self) -> azure_core::Result<models::LinkedWorkspace> {
14989                let bytes = self.0.into_body().collect().await?;
14990                let body: models::LinkedWorkspace = serde_json::from_slice(&bytes)?;
14991                Ok(body)
14992            }
14993            pub fn into_raw_response(self) -> azure_core::Response {
14994                self.0
14995            }
14996            pub fn as_raw_response(&self) -> &azure_core::Response {
14997                &self.0
14998            }
14999        }
15000        impl From<Response> for azure_core::Response {
15001            fn from(rsp: Response) -> Self {
15002                rsp.into_raw_response()
15003            }
15004        }
15005        impl AsRef<azure_core::Response> for Response {
15006            fn as_ref(&self) -> &azure_core::Response {
15007                self.as_raw_response()
15008            }
15009        }
15010        #[derive(Clone)]
15011        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
15012        #[doc = r""]
15013        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
15014        #[doc = r" parameters can be chained."]
15015        #[doc = r""]
15016        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
15017        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
15018        #[doc = r" executes the request and returns a `Result` with the parsed"]
15019        #[doc = r" response."]
15020        #[doc = r""]
15021        #[doc = r" In order to execute the request without polling the service"]
15022        #[doc = r" until the operation completes, use `.send().await` instead."]
15023        #[doc = r""]
15024        #[doc = r" If you need lower-level access to the raw response details"]
15025        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
15026        #[doc = r" can finalize the request using the"]
15027        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
15028        #[doc = r" that resolves to a lower-level [`Response`] value."]
15029        pub struct RequestBuilder {
15030            pub(crate) client: super::super::Client,
15031            pub(crate) resource_group_name: String,
15032            pub(crate) automation_account_name: String,
15033            pub(crate) subscription_id: String,
15034        }
15035        impl RequestBuilder {
15036            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
15037            #[doc = ""]
15038            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
15039            #[doc = "However, this function can provide more flexibility when required."]
15040            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
15041                Box::pin({
15042                    let this = self.clone();
15043                    async move {
15044                        let url = this.url()?;
15045                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
15046                        let bearer_token = this.client.bearer_token().await?;
15047                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15048                        let req_body = azure_core::EMPTY_BODY;
15049                        req.set_body(req_body);
15050                        Ok(Response(this.client.send(&mut req).await?))
15051                    }
15052                })
15053            }
15054            fn url(&self) -> azure_core::Result<azure_core::Url> {
15055                let mut url = self.client.endpoint().clone();
15056                url.set_path(&format!(
15057                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/linkedWorkspace",
15058                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
15059                ));
15060                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15061                if !has_api_version_already {
15062                    url.query_pairs_mut()
15063                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15064                }
15065                Ok(url)
15066            }
15067        }
15068        impl std::future::IntoFuture for RequestBuilder {
15069            type Output = azure_core::Result<models::LinkedWorkspace>;
15070            type IntoFuture = BoxFuture<'static, azure_core::Result<models::LinkedWorkspace>>;
15071            #[doc = "Returns a future that sends the request and returns the parsed response body."]
15072            #[doc = ""]
15073            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
15074            #[doc = ""]
15075            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
15076            fn into_future(self) -> Self::IntoFuture {
15077                Box::pin(async move { self.send().await?.into_body().await })
15078            }
15079        }
15080    }
15081}
15082pub mod activity {
15083    use super::models;
15084    #[cfg(not(target_arch = "wasm32"))]
15085    use futures::future::BoxFuture;
15086    #[cfg(target_arch = "wasm32")]
15087    use futures::future::LocalBoxFuture as BoxFuture;
15088    pub struct Client(pub(crate) super::Client);
15089    impl Client {
15090        #[doc = "Retrieve the activity in the module identified by module name and activity name."]
15091        #[doc = ""]
15092        #[doc = "Arguments:"]
15093        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
15094        #[doc = "* `automation_account_name`: The name of the automation account."]
15095        #[doc = "* `module_name`: The name of module."]
15096        #[doc = "* `activity_name`: The name of activity."]
15097        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
15098        pub fn get(
15099            &self,
15100            resource_group_name: impl Into<String>,
15101            automation_account_name: impl Into<String>,
15102            module_name: impl Into<String>,
15103            activity_name: impl Into<String>,
15104            subscription_id: impl Into<String>,
15105        ) -> get::RequestBuilder {
15106            get::RequestBuilder {
15107                client: self.0.clone(),
15108                resource_group_name: resource_group_name.into(),
15109                automation_account_name: automation_account_name.into(),
15110                module_name: module_name.into(),
15111                activity_name: activity_name.into(),
15112                subscription_id: subscription_id.into(),
15113            }
15114        }
15115        #[doc = "Retrieve a list of activities in the module identified by module name."]
15116        #[doc = ""]
15117        #[doc = "Arguments:"]
15118        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
15119        #[doc = "* `automation_account_name`: The name of the automation account."]
15120        #[doc = "* `module_name`: The name of module."]
15121        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
15122        pub fn list_by_module(
15123            &self,
15124            resource_group_name: impl Into<String>,
15125            automation_account_name: impl Into<String>,
15126            module_name: impl Into<String>,
15127            subscription_id: impl Into<String>,
15128        ) -> list_by_module::RequestBuilder {
15129            list_by_module::RequestBuilder {
15130                client: self.0.clone(),
15131                resource_group_name: resource_group_name.into(),
15132                automation_account_name: automation_account_name.into(),
15133                module_name: module_name.into(),
15134                subscription_id: subscription_id.into(),
15135            }
15136        }
15137    }
15138    pub mod get {
15139        use super::models;
15140        #[cfg(not(target_arch = "wasm32"))]
15141        use futures::future::BoxFuture;
15142        #[cfg(target_arch = "wasm32")]
15143        use futures::future::LocalBoxFuture as BoxFuture;
15144        #[derive(Debug)]
15145        pub struct Response(azure_core::Response);
15146        impl Response {
15147            pub async fn into_body(self) -> azure_core::Result<models::Activity> {
15148                let bytes = self.0.into_body().collect().await?;
15149                let body: models::Activity = serde_json::from_slice(&bytes)?;
15150                Ok(body)
15151            }
15152            pub fn into_raw_response(self) -> azure_core::Response {
15153                self.0
15154            }
15155            pub fn as_raw_response(&self) -> &azure_core::Response {
15156                &self.0
15157            }
15158        }
15159        impl From<Response> for azure_core::Response {
15160            fn from(rsp: Response) -> Self {
15161                rsp.into_raw_response()
15162            }
15163        }
15164        impl AsRef<azure_core::Response> for Response {
15165            fn as_ref(&self) -> &azure_core::Response {
15166                self.as_raw_response()
15167            }
15168        }
15169        #[derive(Clone)]
15170        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
15171        #[doc = r""]
15172        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
15173        #[doc = r" parameters can be chained."]
15174        #[doc = r""]
15175        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
15176        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
15177        #[doc = r" executes the request and returns a `Result` with the parsed"]
15178        #[doc = r" response."]
15179        #[doc = r""]
15180        #[doc = r" In order to execute the request without polling the service"]
15181        #[doc = r" until the operation completes, use `.send().await` instead."]
15182        #[doc = r""]
15183        #[doc = r" If you need lower-level access to the raw response details"]
15184        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
15185        #[doc = r" can finalize the request using the"]
15186        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
15187        #[doc = r" that resolves to a lower-level [`Response`] value."]
15188        pub struct RequestBuilder {
15189            pub(crate) client: super::super::Client,
15190            pub(crate) resource_group_name: String,
15191            pub(crate) automation_account_name: String,
15192            pub(crate) module_name: String,
15193            pub(crate) activity_name: String,
15194            pub(crate) subscription_id: String,
15195        }
15196        impl RequestBuilder {
15197            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
15198            #[doc = ""]
15199            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
15200            #[doc = "However, this function can provide more flexibility when required."]
15201            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
15202                Box::pin({
15203                    let this = self.clone();
15204                    async move {
15205                        let url = this.url()?;
15206                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
15207                        let bearer_token = this.client.bearer_token().await?;
15208                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15209                        let req_body = azure_core::EMPTY_BODY;
15210                        req.set_body(req_body);
15211                        Ok(Response(this.client.send(&mut req).await?))
15212                    }
15213                })
15214            }
15215            fn url(&self) -> azure_core::Result<azure_core::Url> {
15216                let mut url = self.client.endpoint().clone();
15217                url.set_path(&format!(
15218                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules/{}/activities/{}",
15219                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.module_name, &self.activity_name
15220                ));
15221                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15222                if !has_api_version_already {
15223                    url.query_pairs_mut()
15224                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15225                }
15226                Ok(url)
15227            }
15228        }
15229        impl std::future::IntoFuture for RequestBuilder {
15230            type Output = azure_core::Result<models::Activity>;
15231            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Activity>>;
15232            #[doc = "Returns a future that sends the request and returns the parsed response body."]
15233            #[doc = ""]
15234            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
15235            #[doc = ""]
15236            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
15237            fn into_future(self) -> Self::IntoFuture {
15238                Box::pin(async move { self.send().await?.into_body().await })
15239            }
15240        }
15241    }
15242    pub mod list_by_module {
15243        use super::models;
15244        #[cfg(not(target_arch = "wasm32"))]
15245        use futures::future::BoxFuture;
15246        #[cfg(target_arch = "wasm32")]
15247        use futures::future::LocalBoxFuture as BoxFuture;
15248        #[derive(Debug)]
15249        pub struct Response(azure_core::Response);
15250        impl Response {
15251            pub async fn into_body(self) -> azure_core::Result<models::ActivityListResult> {
15252                let bytes = self.0.into_body().collect().await?;
15253                let body: models::ActivityListResult = serde_json::from_slice(&bytes)?;
15254                Ok(body)
15255            }
15256            pub fn into_raw_response(self) -> azure_core::Response {
15257                self.0
15258            }
15259            pub fn as_raw_response(&self) -> &azure_core::Response {
15260                &self.0
15261            }
15262        }
15263        impl From<Response> for azure_core::Response {
15264            fn from(rsp: Response) -> Self {
15265                rsp.into_raw_response()
15266            }
15267        }
15268        impl AsRef<azure_core::Response> for Response {
15269            fn as_ref(&self) -> &azure_core::Response {
15270                self.as_raw_response()
15271            }
15272        }
15273        #[derive(Clone)]
15274        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
15275        #[doc = r""]
15276        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
15277        #[doc = r" parameters can be chained."]
15278        #[doc = r""]
15279        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
15280        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
15281        #[doc = r" executes the request and returns a `Result` with the parsed"]
15282        #[doc = r" response."]
15283        #[doc = r""]
15284        #[doc = r" In order to execute the request without polling the service"]
15285        #[doc = r" until the operation completes, use `.send().await` instead."]
15286        #[doc = r""]
15287        #[doc = r" If you need lower-level access to the raw response details"]
15288        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
15289        #[doc = r" can finalize the request using the"]
15290        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
15291        #[doc = r" that resolves to a lower-level [`Response`] value."]
15292        pub struct RequestBuilder {
15293            pub(crate) client: super::super::Client,
15294            pub(crate) resource_group_name: String,
15295            pub(crate) automation_account_name: String,
15296            pub(crate) module_name: String,
15297            pub(crate) subscription_id: String,
15298        }
15299        impl RequestBuilder {
15300            pub fn into_stream(self) -> azure_core::Pageable<models::ActivityListResult, azure_core::error::Error> {
15301                let make_request = move |continuation: Option<String>| {
15302                    let this = self.clone();
15303                    async move {
15304                        let mut url = this.url()?;
15305                        let rsp = match continuation {
15306                            Some(value) => {
15307                                url.set_path("");
15308                                url = url.join(&value)?;
15309                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
15310                                let bearer_token = this.client.bearer_token().await?;
15311                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15312                                let has_api_version_already =
15313                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15314                                if !has_api_version_already {
15315                                    req.url_mut()
15316                                        .query_pairs_mut()
15317                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15318                                }
15319                                let req_body = azure_core::EMPTY_BODY;
15320                                req.set_body(req_body);
15321                                this.client.send(&mut req).await?
15322                            }
15323                            None => {
15324                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
15325                                let bearer_token = this.client.bearer_token().await?;
15326                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15327                                let req_body = azure_core::EMPTY_BODY;
15328                                req.set_body(req_body);
15329                                this.client.send(&mut req).await?
15330                            }
15331                        };
15332                        let rsp = match rsp.status() {
15333                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
15334                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
15335                                status: status_code,
15336                                error_code: None,
15337                            })),
15338                        };
15339                        rsp?.into_body().await
15340                    }
15341                };
15342                azure_core::Pageable::new(make_request)
15343            }
15344            fn url(&self) -> azure_core::Result<azure_core::Url> {
15345                let mut url = self.client.endpoint().clone();
15346                url.set_path(&format!(
15347                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules/{}/activities",
15348                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.module_name
15349                ));
15350                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15351                if !has_api_version_already {
15352                    url.query_pairs_mut()
15353                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15354                }
15355                Ok(url)
15356            }
15357        }
15358    }
15359}
15360pub mod module {
15361    use super::models;
15362    #[cfg(not(target_arch = "wasm32"))]
15363    use futures::future::BoxFuture;
15364    #[cfg(target_arch = "wasm32")]
15365    use futures::future::LocalBoxFuture as BoxFuture;
15366    pub struct Client(pub(crate) super::Client);
15367    impl Client {
15368        #[doc = "Retrieve the module identified by module name."]
15369        #[doc = ""]
15370        #[doc = "Arguments:"]
15371        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
15372        #[doc = "* `automation_account_name`: The name of the automation account."]
15373        #[doc = "* `module_name`: The module name."]
15374        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
15375        pub fn get(
15376            &self,
15377            resource_group_name: impl Into<String>,
15378            automation_account_name: impl Into<String>,
15379            module_name: impl Into<String>,
15380            subscription_id: impl Into<String>,
15381        ) -> get::RequestBuilder {
15382            get::RequestBuilder {
15383                client: self.0.clone(),
15384                resource_group_name: resource_group_name.into(),
15385                automation_account_name: automation_account_name.into(),
15386                module_name: module_name.into(),
15387                subscription_id: subscription_id.into(),
15388            }
15389        }
15390        #[doc = "Create or Update the module identified by module name."]
15391        #[doc = ""]
15392        #[doc = "Arguments:"]
15393        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
15394        #[doc = "* `automation_account_name`: The name of the automation account."]
15395        #[doc = "* `module_name`: The name of module."]
15396        #[doc = "* `parameters`: The create or update parameters for module."]
15397        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
15398        pub fn create_or_update(
15399            &self,
15400            resource_group_name: impl Into<String>,
15401            automation_account_name: impl Into<String>,
15402            module_name: impl Into<String>,
15403            parameters: impl Into<models::ModuleCreateOrUpdateParameters>,
15404            subscription_id: impl Into<String>,
15405        ) -> create_or_update::RequestBuilder {
15406            create_or_update::RequestBuilder {
15407                client: self.0.clone(),
15408                resource_group_name: resource_group_name.into(),
15409                automation_account_name: automation_account_name.into(),
15410                module_name: module_name.into(),
15411                parameters: parameters.into(),
15412                subscription_id: subscription_id.into(),
15413            }
15414        }
15415        #[doc = "Update the module identified by module name."]
15416        #[doc = ""]
15417        #[doc = "Arguments:"]
15418        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
15419        #[doc = "* `automation_account_name`: The name of the automation account."]
15420        #[doc = "* `module_name`: The name of module."]
15421        #[doc = "* `parameters`: The update parameters for module."]
15422        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
15423        pub fn update(
15424            &self,
15425            resource_group_name: impl Into<String>,
15426            automation_account_name: impl Into<String>,
15427            module_name: impl Into<String>,
15428            parameters: impl Into<models::ModuleUpdateParameters>,
15429            subscription_id: impl Into<String>,
15430        ) -> update::RequestBuilder {
15431            update::RequestBuilder {
15432                client: self.0.clone(),
15433                resource_group_name: resource_group_name.into(),
15434                automation_account_name: automation_account_name.into(),
15435                module_name: module_name.into(),
15436                parameters: parameters.into(),
15437                subscription_id: subscription_id.into(),
15438            }
15439        }
15440        #[doc = "Delete the module by name."]
15441        #[doc = ""]
15442        #[doc = "Arguments:"]
15443        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
15444        #[doc = "* `automation_account_name`: The name of the automation account."]
15445        #[doc = "* `module_name`: The module name."]
15446        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
15447        pub fn delete(
15448            &self,
15449            resource_group_name: impl Into<String>,
15450            automation_account_name: impl Into<String>,
15451            module_name: impl Into<String>,
15452            subscription_id: impl Into<String>,
15453        ) -> delete::RequestBuilder {
15454            delete::RequestBuilder {
15455                client: self.0.clone(),
15456                resource_group_name: resource_group_name.into(),
15457                automation_account_name: automation_account_name.into(),
15458                module_name: module_name.into(),
15459                subscription_id: subscription_id.into(),
15460            }
15461        }
15462        #[doc = "Retrieve a list of modules."]
15463        #[doc = ""]
15464        #[doc = "Arguments:"]
15465        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
15466        #[doc = "* `automation_account_name`: The name of the automation account."]
15467        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
15468        pub fn list_by_automation_account(
15469            &self,
15470            resource_group_name: impl Into<String>,
15471            automation_account_name: impl Into<String>,
15472            subscription_id: impl Into<String>,
15473        ) -> list_by_automation_account::RequestBuilder {
15474            list_by_automation_account::RequestBuilder {
15475                client: self.0.clone(),
15476                resource_group_name: resource_group_name.into(),
15477                automation_account_name: automation_account_name.into(),
15478                subscription_id: subscription_id.into(),
15479            }
15480        }
15481    }
15482    pub mod get {
15483        use super::models;
15484        #[cfg(not(target_arch = "wasm32"))]
15485        use futures::future::BoxFuture;
15486        #[cfg(target_arch = "wasm32")]
15487        use futures::future::LocalBoxFuture as BoxFuture;
15488        #[derive(Debug)]
15489        pub struct Response(azure_core::Response);
15490        impl Response {
15491            pub async fn into_body(self) -> azure_core::Result<models::Module> {
15492                let bytes = self.0.into_body().collect().await?;
15493                let body: models::Module = serde_json::from_slice(&bytes)?;
15494                Ok(body)
15495            }
15496            pub fn into_raw_response(self) -> azure_core::Response {
15497                self.0
15498            }
15499            pub fn as_raw_response(&self) -> &azure_core::Response {
15500                &self.0
15501            }
15502        }
15503        impl From<Response> for azure_core::Response {
15504            fn from(rsp: Response) -> Self {
15505                rsp.into_raw_response()
15506            }
15507        }
15508        impl AsRef<azure_core::Response> for Response {
15509            fn as_ref(&self) -> &azure_core::Response {
15510                self.as_raw_response()
15511            }
15512        }
15513        #[derive(Clone)]
15514        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
15515        #[doc = r""]
15516        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
15517        #[doc = r" parameters can be chained."]
15518        #[doc = r""]
15519        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
15520        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
15521        #[doc = r" executes the request and returns a `Result` with the parsed"]
15522        #[doc = r" response."]
15523        #[doc = r""]
15524        #[doc = r" In order to execute the request without polling the service"]
15525        #[doc = r" until the operation completes, use `.send().await` instead."]
15526        #[doc = r""]
15527        #[doc = r" If you need lower-level access to the raw response details"]
15528        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
15529        #[doc = r" can finalize the request using the"]
15530        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
15531        #[doc = r" that resolves to a lower-level [`Response`] value."]
15532        pub struct RequestBuilder {
15533            pub(crate) client: super::super::Client,
15534            pub(crate) resource_group_name: String,
15535            pub(crate) automation_account_name: String,
15536            pub(crate) module_name: String,
15537            pub(crate) subscription_id: String,
15538        }
15539        impl RequestBuilder {
15540            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
15541            #[doc = ""]
15542            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
15543            #[doc = "However, this function can provide more flexibility when required."]
15544            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
15545                Box::pin({
15546                    let this = self.clone();
15547                    async move {
15548                        let url = this.url()?;
15549                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
15550                        let bearer_token = this.client.bearer_token().await?;
15551                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15552                        let req_body = azure_core::EMPTY_BODY;
15553                        req.set_body(req_body);
15554                        Ok(Response(this.client.send(&mut req).await?))
15555                    }
15556                })
15557            }
15558            fn url(&self) -> azure_core::Result<azure_core::Url> {
15559                let mut url = self.client.endpoint().clone();
15560                url.set_path(&format!(
15561                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules/{}",
15562                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.module_name
15563                ));
15564                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15565                if !has_api_version_already {
15566                    url.query_pairs_mut()
15567                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15568                }
15569                Ok(url)
15570            }
15571        }
15572        impl std::future::IntoFuture for RequestBuilder {
15573            type Output = azure_core::Result<models::Module>;
15574            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Module>>;
15575            #[doc = "Returns a future that sends the request and returns the parsed response body."]
15576            #[doc = ""]
15577            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
15578            #[doc = ""]
15579            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
15580            fn into_future(self) -> Self::IntoFuture {
15581                Box::pin(async move { self.send().await?.into_body().await })
15582            }
15583        }
15584    }
15585    pub mod create_or_update {
15586        use super::models;
15587        #[cfg(not(target_arch = "wasm32"))]
15588        use futures::future::BoxFuture;
15589        #[cfg(target_arch = "wasm32")]
15590        use futures::future::LocalBoxFuture as BoxFuture;
15591        #[derive(Debug)]
15592        pub struct Response(azure_core::Response);
15593        impl Response {
15594            pub async fn into_body(self) -> azure_core::Result<models::Module> {
15595                let bytes = self.0.into_body().collect().await?;
15596                let body: models::Module = serde_json::from_slice(&bytes)?;
15597                Ok(body)
15598            }
15599            pub fn into_raw_response(self) -> azure_core::Response {
15600                self.0
15601            }
15602            pub fn as_raw_response(&self) -> &azure_core::Response {
15603                &self.0
15604            }
15605        }
15606        impl From<Response> for azure_core::Response {
15607            fn from(rsp: Response) -> Self {
15608                rsp.into_raw_response()
15609            }
15610        }
15611        impl AsRef<azure_core::Response> for Response {
15612            fn as_ref(&self) -> &azure_core::Response {
15613                self.as_raw_response()
15614            }
15615        }
15616        #[derive(Clone)]
15617        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
15618        #[doc = r""]
15619        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
15620        #[doc = r" parameters can be chained."]
15621        #[doc = r""]
15622        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
15623        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
15624        #[doc = r" executes the request and returns a `Result` with the parsed"]
15625        #[doc = r" response."]
15626        #[doc = r""]
15627        #[doc = r" In order to execute the request without polling the service"]
15628        #[doc = r" until the operation completes, use `.send().await` instead."]
15629        #[doc = r""]
15630        #[doc = r" If you need lower-level access to the raw response details"]
15631        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
15632        #[doc = r" can finalize the request using the"]
15633        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
15634        #[doc = r" that resolves to a lower-level [`Response`] value."]
15635        pub struct RequestBuilder {
15636            pub(crate) client: super::super::Client,
15637            pub(crate) resource_group_name: String,
15638            pub(crate) automation_account_name: String,
15639            pub(crate) module_name: String,
15640            pub(crate) parameters: models::ModuleCreateOrUpdateParameters,
15641            pub(crate) subscription_id: String,
15642        }
15643        impl RequestBuilder {
15644            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
15645            #[doc = ""]
15646            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
15647            #[doc = "However, this function can provide more flexibility when required."]
15648            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
15649                Box::pin({
15650                    let this = self.clone();
15651                    async move {
15652                        let url = this.url()?;
15653                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
15654                        let bearer_token = this.client.bearer_token().await?;
15655                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15656                        req.insert_header("content-type", "application/json");
15657                        let req_body = azure_core::to_json(&this.parameters)?;
15658                        req.set_body(req_body);
15659                        Ok(Response(this.client.send(&mut req).await?))
15660                    }
15661                })
15662            }
15663            fn url(&self) -> azure_core::Result<azure_core::Url> {
15664                let mut url = self.client.endpoint().clone();
15665                url.set_path(&format!(
15666                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules/{}",
15667                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.module_name
15668                ));
15669                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15670                if !has_api_version_already {
15671                    url.query_pairs_mut()
15672                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15673                }
15674                Ok(url)
15675            }
15676        }
15677        impl std::future::IntoFuture for RequestBuilder {
15678            type Output = azure_core::Result<models::Module>;
15679            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Module>>;
15680            #[doc = "Returns a future that sends the request and returns the parsed response body."]
15681            #[doc = ""]
15682            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
15683            #[doc = ""]
15684            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
15685            fn into_future(self) -> Self::IntoFuture {
15686                Box::pin(async move { self.send().await?.into_body().await })
15687            }
15688        }
15689    }
15690    pub mod update {
15691        use super::models;
15692        #[cfg(not(target_arch = "wasm32"))]
15693        use futures::future::BoxFuture;
15694        #[cfg(target_arch = "wasm32")]
15695        use futures::future::LocalBoxFuture as BoxFuture;
15696        #[derive(Debug)]
15697        pub struct Response(azure_core::Response);
15698        impl Response {
15699            pub async fn into_body(self) -> azure_core::Result<models::Module> {
15700                let bytes = self.0.into_body().collect().await?;
15701                let body: models::Module = serde_json::from_slice(&bytes)?;
15702                Ok(body)
15703            }
15704            pub fn into_raw_response(self) -> azure_core::Response {
15705                self.0
15706            }
15707            pub fn as_raw_response(&self) -> &azure_core::Response {
15708                &self.0
15709            }
15710        }
15711        impl From<Response> for azure_core::Response {
15712            fn from(rsp: Response) -> Self {
15713                rsp.into_raw_response()
15714            }
15715        }
15716        impl AsRef<azure_core::Response> for Response {
15717            fn as_ref(&self) -> &azure_core::Response {
15718                self.as_raw_response()
15719            }
15720        }
15721        #[derive(Clone)]
15722        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
15723        #[doc = r""]
15724        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
15725        #[doc = r" parameters can be chained."]
15726        #[doc = r""]
15727        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
15728        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
15729        #[doc = r" executes the request and returns a `Result` with the parsed"]
15730        #[doc = r" response."]
15731        #[doc = r""]
15732        #[doc = r" In order to execute the request without polling the service"]
15733        #[doc = r" until the operation completes, use `.send().await` instead."]
15734        #[doc = r""]
15735        #[doc = r" If you need lower-level access to the raw response details"]
15736        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
15737        #[doc = r" can finalize the request using the"]
15738        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
15739        #[doc = r" that resolves to a lower-level [`Response`] value."]
15740        pub struct RequestBuilder {
15741            pub(crate) client: super::super::Client,
15742            pub(crate) resource_group_name: String,
15743            pub(crate) automation_account_name: String,
15744            pub(crate) module_name: String,
15745            pub(crate) parameters: models::ModuleUpdateParameters,
15746            pub(crate) subscription_id: String,
15747        }
15748        impl RequestBuilder {
15749            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
15750            #[doc = ""]
15751            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
15752            #[doc = "However, this function can provide more flexibility when required."]
15753            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
15754                Box::pin({
15755                    let this = self.clone();
15756                    async move {
15757                        let url = this.url()?;
15758                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
15759                        let bearer_token = this.client.bearer_token().await?;
15760                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15761                        req.insert_header("content-type", "application/json");
15762                        let req_body = azure_core::to_json(&this.parameters)?;
15763                        req.set_body(req_body);
15764                        Ok(Response(this.client.send(&mut req).await?))
15765                    }
15766                })
15767            }
15768            fn url(&self) -> azure_core::Result<azure_core::Url> {
15769                let mut url = self.client.endpoint().clone();
15770                url.set_path(&format!(
15771                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules/{}",
15772                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.module_name
15773                ));
15774                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15775                if !has_api_version_already {
15776                    url.query_pairs_mut()
15777                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15778                }
15779                Ok(url)
15780            }
15781        }
15782        impl std::future::IntoFuture for RequestBuilder {
15783            type Output = azure_core::Result<models::Module>;
15784            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Module>>;
15785            #[doc = "Returns a future that sends the request and returns the parsed response body."]
15786            #[doc = ""]
15787            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
15788            #[doc = ""]
15789            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
15790            fn into_future(self) -> Self::IntoFuture {
15791                Box::pin(async move { self.send().await?.into_body().await })
15792            }
15793        }
15794    }
15795    pub mod delete {
15796        use super::models;
15797        #[cfg(not(target_arch = "wasm32"))]
15798        use futures::future::BoxFuture;
15799        #[cfg(target_arch = "wasm32")]
15800        use futures::future::LocalBoxFuture as BoxFuture;
15801        #[derive(Debug)]
15802        pub struct Response(azure_core::Response);
15803        impl Response {
15804            pub fn into_raw_response(self) -> azure_core::Response {
15805                self.0
15806            }
15807            pub fn as_raw_response(&self) -> &azure_core::Response {
15808                &self.0
15809            }
15810        }
15811        impl From<Response> for azure_core::Response {
15812            fn from(rsp: Response) -> Self {
15813                rsp.into_raw_response()
15814            }
15815        }
15816        impl AsRef<azure_core::Response> for Response {
15817            fn as_ref(&self) -> &azure_core::Response {
15818                self.as_raw_response()
15819            }
15820        }
15821        #[derive(Clone)]
15822        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
15823        #[doc = r""]
15824        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
15825        #[doc = r" parameters can be chained."]
15826        #[doc = r""]
15827        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
15828        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
15829        #[doc = r" executes the request and returns a `Result` with the parsed"]
15830        #[doc = r" response."]
15831        #[doc = r""]
15832        #[doc = r" In order to execute the request without polling the service"]
15833        #[doc = r" until the operation completes, use `.send().await` instead."]
15834        #[doc = r""]
15835        #[doc = r" If you need lower-level access to the raw response details"]
15836        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
15837        #[doc = r" can finalize the request using the"]
15838        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
15839        #[doc = r" that resolves to a lower-level [`Response`] value."]
15840        pub struct RequestBuilder {
15841            pub(crate) client: super::super::Client,
15842            pub(crate) resource_group_name: String,
15843            pub(crate) automation_account_name: String,
15844            pub(crate) module_name: String,
15845            pub(crate) subscription_id: String,
15846        }
15847        impl RequestBuilder {
15848            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
15849            #[doc = ""]
15850            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
15851            #[doc = "However, this function can provide more flexibility when required."]
15852            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
15853                Box::pin({
15854                    let this = self.clone();
15855                    async move {
15856                        let url = this.url()?;
15857                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
15858                        let bearer_token = this.client.bearer_token().await?;
15859                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15860                        let req_body = azure_core::EMPTY_BODY;
15861                        req.set_body(req_body);
15862                        Ok(Response(this.client.send(&mut req).await?))
15863                    }
15864                })
15865            }
15866            fn url(&self) -> azure_core::Result<azure_core::Url> {
15867                let mut url = self.client.endpoint().clone();
15868                url.set_path(&format!(
15869                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules/{}",
15870                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.module_name
15871                ));
15872                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15873                if !has_api_version_already {
15874                    url.query_pairs_mut()
15875                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15876                }
15877                Ok(url)
15878            }
15879        }
15880    }
15881    pub mod list_by_automation_account {
15882        use super::models;
15883        #[cfg(not(target_arch = "wasm32"))]
15884        use futures::future::BoxFuture;
15885        #[cfg(target_arch = "wasm32")]
15886        use futures::future::LocalBoxFuture as BoxFuture;
15887        #[derive(Debug)]
15888        pub struct Response(azure_core::Response);
15889        impl Response {
15890            pub async fn into_body(self) -> azure_core::Result<models::ModuleListResult> {
15891                let bytes = self.0.into_body().collect().await?;
15892                let body: models::ModuleListResult = serde_json::from_slice(&bytes)?;
15893                Ok(body)
15894            }
15895            pub fn into_raw_response(self) -> azure_core::Response {
15896                self.0
15897            }
15898            pub fn as_raw_response(&self) -> &azure_core::Response {
15899                &self.0
15900            }
15901        }
15902        impl From<Response> for azure_core::Response {
15903            fn from(rsp: Response) -> Self {
15904                rsp.into_raw_response()
15905            }
15906        }
15907        impl AsRef<azure_core::Response> for Response {
15908            fn as_ref(&self) -> &azure_core::Response {
15909                self.as_raw_response()
15910            }
15911        }
15912        #[derive(Clone)]
15913        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
15914        #[doc = r""]
15915        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
15916        #[doc = r" parameters can be chained."]
15917        #[doc = r""]
15918        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
15919        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
15920        #[doc = r" executes the request and returns a `Result` with the parsed"]
15921        #[doc = r" response."]
15922        #[doc = r""]
15923        #[doc = r" In order to execute the request without polling the service"]
15924        #[doc = r" until the operation completes, use `.send().await` instead."]
15925        #[doc = r""]
15926        #[doc = r" If you need lower-level access to the raw response details"]
15927        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
15928        #[doc = r" can finalize the request using the"]
15929        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
15930        #[doc = r" that resolves to a lower-level [`Response`] value."]
15931        pub struct RequestBuilder {
15932            pub(crate) client: super::super::Client,
15933            pub(crate) resource_group_name: String,
15934            pub(crate) automation_account_name: String,
15935            pub(crate) subscription_id: String,
15936        }
15937        impl RequestBuilder {
15938            pub fn into_stream(self) -> azure_core::Pageable<models::ModuleListResult, azure_core::error::Error> {
15939                let make_request = move |continuation: Option<String>| {
15940                    let this = self.clone();
15941                    async move {
15942                        let mut url = this.url()?;
15943                        let rsp = match continuation {
15944                            Some(value) => {
15945                                url.set_path("");
15946                                url = url.join(&value)?;
15947                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
15948                                let bearer_token = this.client.bearer_token().await?;
15949                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15950                                let has_api_version_already =
15951                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15952                                if !has_api_version_already {
15953                                    req.url_mut()
15954                                        .query_pairs_mut()
15955                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15956                                }
15957                                let req_body = azure_core::EMPTY_BODY;
15958                                req.set_body(req_body);
15959                                this.client.send(&mut req).await?
15960                            }
15961                            None => {
15962                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
15963                                let bearer_token = this.client.bearer_token().await?;
15964                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
15965                                let req_body = azure_core::EMPTY_BODY;
15966                                req.set_body(req_body);
15967                                this.client.send(&mut req).await?
15968                            }
15969                        };
15970                        let rsp = match rsp.status() {
15971                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
15972                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
15973                                status: status_code,
15974                                error_code: None,
15975                            })),
15976                        };
15977                        rsp?.into_body().await
15978                    }
15979                };
15980                azure_core::Pageable::new(make_request)
15981            }
15982            fn url(&self) -> azure_core::Result<azure_core::Url> {
15983                let mut url = self.client.endpoint().clone();
15984                url.set_path(&format!(
15985                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules",
15986                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
15987                ));
15988                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
15989                if !has_api_version_already {
15990                    url.query_pairs_mut()
15991                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
15992                }
15993                Ok(url)
15994            }
15995        }
15996    }
15997}
15998pub mod object_data_types {
15999    use super::models;
16000    #[cfg(not(target_arch = "wasm32"))]
16001    use futures::future::BoxFuture;
16002    #[cfg(target_arch = "wasm32")]
16003    use futures::future::LocalBoxFuture as BoxFuture;
16004    pub struct Client(pub(crate) super::Client);
16005    impl Client {
16006        #[doc = "Retrieve a list of fields of a given type identified by module name."]
16007        #[doc = ""]
16008        #[doc = "Arguments:"]
16009        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
16010        #[doc = "* `automation_account_name`: The name of the automation account."]
16011        #[doc = "* `module_name`: The name of module."]
16012        #[doc = "* `type_name`: The name of type."]
16013        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
16014        pub fn list_fields_by_module_and_type(
16015            &self,
16016            resource_group_name: impl Into<String>,
16017            automation_account_name: impl Into<String>,
16018            module_name: impl Into<String>,
16019            type_name: impl Into<String>,
16020            subscription_id: impl Into<String>,
16021        ) -> list_fields_by_module_and_type::RequestBuilder {
16022            list_fields_by_module_and_type::RequestBuilder {
16023                client: self.0.clone(),
16024                resource_group_name: resource_group_name.into(),
16025                automation_account_name: automation_account_name.into(),
16026                module_name: module_name.into(),
16027                type_name: type_name.into(),
16028                subscription_id: subscription_id.into(),
16029            }
16030        }
16031        #[doc = "Retrieve a list of fields of a given type across all accessible modules."]
16032        #[doc = ""]
16033        #[doc = "Arguments:"]
16034        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
16035        #[doc = "* `automation_account_name`: The name of the automation account."]
16036        #[doc = "* `type_name`: The name of type."]
16037        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
16038        pub fn list_fields_by_type(
16039            &self,
16040            resource_group_name: impl Into<String>,
16041            automation_account_name: impl Into<String>,
16042            type_name: impl Into<String>,
16043            subscription_id: impl Into<String>,
16044        ) -> list_fields_by_type::RequestBuilder {
16045            list_fields_by_type::RequestBuilder {
16046                client: self.0.clone(),
16047                resource_group_name: resource_group_name.into(),
16048                automation_account_name: automation_account_name.into(),
16049                type_name: type_name.into(),
16050                subscription_id: subscription_id.into(),
16051            }
16052        }
16053    }
16054    pub mod list_fields_by_module_and_type {
16055        use super::models;
16056        #[cfg(not(target_arch = "wasm32"))]
16057        use futures::future::BoxFuture;
16058        #[cfg(target_arch = "wasm32")]
16059        use futures::future::LocalBoxFuture as BoxFuture;
16060        #[derive(Debug)]
16061        pub struct Response(azure_core::Response);
16062        impl Response {
16063            pub async fn into_body(self) -> azure_core::Result<models::TypeFieldListResult> {
16064                let bytes = self.0.into_body().collect().await?;
16065                let body: models::TypeFieldListResult = serde_json::from_slice(&bytes)?;
16066                Ok(body)
16067            }
16068            pub fn into_raw_response(self) -> azure_core::Response {
16069                self.0
16070            }
16071            pub fn as_raw_response(&self) -> &azure_core::Response {
16072                &self.0
16073            }
16074        }
16075        impl From<Response> for azure_core::Response {
16076            fn from(rsp: Response) -> Self {
16077                rsp.into_raw_response()
16078            }
16079        }
16080        impl AsRef<azure_core::Response> for Response {
16081            fn as_ref(&self) -> &azure_core::Response {
16082                self.as_raw_response()
16083            }
16084        }
16085        #[derive(Clone)]
16086        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
16087        #[doc = r""]
16088        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
16089        #[doc = r" parameters can be chained."]
16090        #[doc = r""]
16091        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
16092        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
16093        #[doc = r" executes the request and returns a `Result` with the parsed"]
16094        #[doc = r" response."]
16095        #[doc = r""]
16096        #[doc = r" In order to execute the request without polling the service"]
16097        #[doc = r" until the operation completes, use `.send().await` instead."]
16098        #[doc = r""]
16099        #[doc = r" If you need lower-level access to the raw response details"]
16100        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
16101        #[doc = r" can finalize the request using the"]
16102        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
16103        #[doc = r" that resolves to a lower-level [`Response`] value."]
16104        pub struct RequestBuilder {
16105            pub(crate) client: super::super::Client,
16106            pub(crate) resource_group_name: String,
16107            pub(crate) automation_account_name: String,
16108            pub(crate) module_name: String,
16109            pub(crate) type_name: String,
16110            pub(crate) subscription_id: String,
16111        }
16112        impl RequestBuilder {
16113            #[doc = "Only the first response will be fetched as the continuation token is not part of the response schema"]
16114            #[doc = ""]
16115            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
16116            #[doc = ""]
16117            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
16118            #[doc = "However, this function can provide more flexibility when required."]
16119            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
16120                Box::pin({
16121                    let this = self.clone();
16122                    async move {
16123                        let url = this.url()?;
16124                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
16125                        let bearer_token = this.client.bearer_token().await?;
16126                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
16127                        let req_body = azure_core::EMPTY_BODY;
16128                        req.set_body(req_body);
16129                        Ok(Response(this.client.send(&mut req).await?))
16130                    }
16131                })
16132            }
16133            fn url(&self) -> azure_core::Result<azure_core::Url> {
16134                let mut url = self.client.endpoint().clone();
16135                url . set_path (& format ! ("/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules/{}/objectDataTypes/{}/fields" , & self . subscription_id , & self . resource_group_name , & self . automation_account_name , & self . module_name , & self . type_name)) ;
16136                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
16137                if !has_api_version_already {
16138                    url.query_pairs_mut()
16139                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
16140                }
16141                Ok(url)
16142            }
16143        }
16144    }
16145    pub mod list_fields_by_type {
16146        use super::models;
16147        #[cfg(not(target_arch = "wasm32"))]
16148        use futures::future::BoxFuture;
16149        #[cfg(target_arch = "wasm32")]
16150        use futures::future::LocalBoxFuture as BoxFuture;
16151        #[derive(Debug)]
16152        pub struct Response(azure_core::Response);
16153        impl Response {
16154            pub async fn into_body(self) -> azure_core::Result<models::TypeFieldListResult> {
16155                let bytes = self.0.into_body().collect().await?;
16156                let body: models::TypeFieldListResult = serde_json::from_slice(&bytes)?;
16157                Ok(body)
16158            }
16159            pub fn into_raw_response(self) -> azure_core::Response {
16160                self.0
16161            }
16162            pub fn as_raw_response(&self) -> &azure_core::Response {
16163                &self.0
16164            }
16165        }
16166        impl From<Response> for azure_core::Response {
16167            fn from(rsp: Response) -> Self {
16168                rsp.into_raw_response()
16169            }
16170        }
16171        impl AsRef<azure_core::Response> for Response {
16172            fn as_ref(&self) -> &azure_core::Response {
16173                self.as_raw_response()
16174            }
16175        }
16176        #[derive(Clone)]
16177        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
16178        #[doc = r""]
16179        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
16180        #[doc = r" parameters can be chained."]
16181        #[doc = r""]
16182        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
16183        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
16184        #[doc = r" executes the request and returns a `Result` with the parsed"]
16185        #[doc = r" response."]
16186        #[doc = r""]
16187        #[doc = r" In order to execute the request without polling the service"]
16188        #[doc = r" until the operation completes, use `.send().await` instead."]
16189        #[doc = r""]
16190        #[doc = r" If you need lower-level access to the raw response details"]
16191        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
16192        #[doc = r" can finalize the request using the"]
16193        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
16194        #[doc = r" that resolves to a lower-level [`Response`] value."]
16195        pub struct RequestBuilder {
16196            pub(crate) client: super::super::Client,
16197            pub(crate) resource_group_name: String,
16198            pub(crate) automation_account_name: String,
16199            pub(crate) type_name: String,
16200            pub(crate) subscription_id: String,
16201        }
16202        impl RequestBuilder {
16203            #[doc = "Only the first response will be fetched as the continuation token is not part of the response schema"]
16204            #[doc = ""]
16205            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
16206            #[doc = ""]
16207            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
16208            #[doc = "However, this function can provide more flexibility when required."]
16209            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
16210                Box::pin({
16211                    let this = self.clone();
16212                    async move {
16213                        let url = this.url()?;
16214                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
16215                        let bearer_token = this.client.bearer_token().await?;
16216                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
16217                        let req_body = azure_core::EMPTY_BODY;
16218                        req.set_body(req_body);
16219                        Ok(Response(this.client.send(&mut req).await?))
16220                    }
16221                })
16222            }
16223            fn url(&self) -> azure_core::Result<azure_core::Url> {
16224                let mut url = self.client.endpoint().clone();
16225                url.set_path(&format!(
16226                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/objectDataTypes/{}/fields",
16227                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.type_name
16228                ));
16229                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
16230                if !has_api_version_already {
16231                    url.query_pairs_mut()
16232                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
16233                }
16234                Ok(url)
16235            }
16236        }
16237    }
16238}
16239pub mod fields {
16240    use super::models;
16241    #[cfg(not(target_arch = "wasm32"))]
16242    use futures::future::BoxFuture;
16243    #[cfg(target_arch = "wasm32")]
16244    use futures::future::LocalBoxFuture as BoxFuture;
16245    pub struct Client(pub(crate) super::Client);
16246    impl Client {
16247        #[doc = "Retrieve a list of fields of a given type identified by module name."]
16248        #[doc = ""]
16249        #[doc = "Arguments:"]
16250        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
16251        #[doc = "* `automation_account_name`: The name of the automation account."]
16252        #[doc = "* `module_name`: The name of module."]
16253        #[doc = "* `type_name`: The name of type."]
16254        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
16255        pub fn list_by_type(
16256            &self,
16257            resource_group_name: impl Into<String>,
16258            automation_account_name: impl Into<String>,
16259            module_name: impl Into<String>,
16260            type_name: impl Into<String>,
16261            subscription_id: impl Into<String>,
16262        ) -> list_by_type::RequestBuilder {
16263            list_by_type::RequestBuilder {
16264                client: self.0.clone(),
16265                resource_group_name: resource_group_name.into(),
16266                automation_account_name: automation_account_name.into(),
16267                module_name: module_name.into(),
16268                type_name: type_name.into(),
16269                subscription_id: subscription_id.into(),
16270            }
16271        }
16272    }
16273    pub mod list_by_type {
16274        use super::models;
16275        #[cfg(not(target_arch = "wasm32"))]
16276        use futures::future::BoxFuture;
16277        #[cfg(target_arch = "wasm32")]
16278        use futures::future::LocalBoxFuture as BoxFuture;
16279        #[derive(Debug)]
16280        pub struct Response(azure_core::Response);
16281        impl Response {
16282            pub async fn into_body(self) -> azure_core::Result<models::TypeFieldListResult> {
16283                let bytes = self.0.into_body().collect().await?;
16284                let body: models::TypeFieldListResult = serde_json::from_slice(&bytes)?;
16285                Ok(body)
16286            }
16287            pub fn into_raw_response(self) -> azure_core::Response {
16288                self.0
16289            }
16290            pub fn as_raw_response(&self) -> &azure_core::Response {
16291                &self.0
16292            }
16293        }
16294        impl From<Response> for azure_core::Response {
16295            fn from(rsp: Response) -> Self {
16296                rsp.into_raw_response()
16297            }
16298        }
16299        impl AsRef<azure_core::Response> for Response {
16300            fn as_ref(&self) -> &azure_core::Response {
16301                self.as_raw_response()
16302            }
16303        }
16304        #[derive(Clone)]
16305        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
16306        #[doc = r""]
16307        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
16308        #[doc = r" parameters can be chained."]
16309        #[doc = r""]
16310        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
16311        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
16312        #[doc = r" executes the request and returns a `Result` with the parsed"]
16313        #[doc = r" response."]
16314        #[doc = r""]
16315        #[doc = r" In order to execute the request without polling the service"]
16316        #[doc = r" until the operation completes, use `.send().await` instead."]
16317        #[doc = r""]
16318        #[doc = r" If you need lower-level access to the raw response details"]
16319        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
16320        #[doc = r" can finalize the request using the"]
16321        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
16322        #[doc = r" that resolves to a lower-level [`Response`] value."]
16323        pub struct RequestBuilder {
16324            pub(crate) client: super::super::Client,
16325            pub(crate) resource_group_name: String,
16326            pub(crate) automation_account_name: String,
16327            pub(crate) module_name: String,
16328            pub(crate) type_name: String,
16329            pub(crate) subscription_id: String,
16330        }
16331        impl RequestBuilder {
16332            #[doc = "Only the first response will be fetched as the continuation token is not part of the response schema"]
16333            #[doc = ""]
16334            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
16335            #[doc = ""]
16336            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
16337            #[doc = "However, this function can provide more flexibility when required."]
16338            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
16339                Box::pin({
16340                    let this = self.clone();
16341                    async move {
16342                        let url = this.url()?;
16343                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
16344                        let bearer_token = this.client.bearer_token().await?;
16345                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
16346                        let req_body = azure_core::EMPTY_BODY;
16347                        req.set_body(req_body);
16348                        Ok(Response(this.client.send(&mut req).await?))
16349                    }
16350                })
16351            }
16352            fn url(&self) -> azure_core::Result<azure_core::Url> {
16353                let mut url = self.client.endpoint().clone();
16354                url.set_path(&format!(
16355                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/modules/{}/types/{}/fields",
16356                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.module_name, &self.type_name
16357                ));
16358                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
16359                if !has_api_version_already {
16360                    url.query_pairs_mut()
16361                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
16362                }
16363                Ok(url)
16364            }
16365        }
16366    }
16367}
16368pub mod operations {
16369    use super::models;
16370    #[cfg(not(target_arch = "wasm32"))]
16371    use futures::future::BoxFuture;
16372    #[cfg(target_arch = "wasm32")]
16373    use futures::future::LocalBoxFuture as BoxFuture;
16374    pub struct Client(pub(crate) super::Client);
16375    impl Client {
16376        #[doc = "Lists all of the available Automation REST API operations."]
16377        pub fn list(&self) -> list::RequestBuilder {
16378            list::RequestBuilder { client: self.0.clone() }
16379        }
16380    }
16381    pub mod list {
16382        use super::models;
16383        #[cfg(not(target_arch = "wasm32"))]
16384        use futures::future::BoxFuture;
16385        #[cfg(target_arch = "wasm32")]
16386        use futures::future::LocalBoxFuture as BoxFuture;
16387        #[derive(Debug)]
16388        pub struct Response(azure_core::Response);
16389        impl Response {
16390            pub async fn into_body(self) -> azure_core::Result<models::OperationListResult> {
16391                let bytes = self.0.into_body().collect().await?;
16392                let body: models::OperationListResult = serde_json::from_slice(&bytes)?;
16393                Ok(body)
16394            }
16395            pub fn into_raw_response(self) -> azure_core::Response {
16396                self.0
16397            }
16398            pub fn as_raw_response(&self) -> &azure_core::Response {
16399                &self.0
16400            }
16401        }
16402        impl From<Response> for azure_core::Response {
16403            fn from(rsp: Response) -> Self {
16404                rsp.into_raw_response()
16405            }
16406        }
16407        impl AsRef<azure_core::Response> for Response {
16408            fn as_ref(&self) -> &azure_core::Response {
16409                self.as_raw_response()
16410            }
16411        }
16412        #[derive(Clone)]
16413        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
16414        #[doc = r""]
16415        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
16416        #[doc = r" parameters can be chained."]
16417        #[doc = r""]
16418        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
16419        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
16420        #[doc = r" executes the request and returns a `Result` with the parsed"]
16421        #[doc = r" response."]
16422        #[doc = r""]
16423        #[doc = r" In order to execute the request without polling the service"]
16424        #[doc = r" until the operation completes, use `.send().await` instead."]
16425        #[doc = r""]
16426        #[doc = r" If you need lower-level access to the raw response details"]
16427        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
16428        #[doc = r" can finalize the request using the"]
16429        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
16430        #[doc = r" that resolves to a lower-level [`Response`] value."]
16431        pub struct RequestBuilder {
16432            pub(crate) client: super::super::Client,
16433        }
16434        impl RequestBuilder {
16435            #[doc = "Only the first response will be fetched as the continuation token is not part of the response schema"]
16436            #[doc = ""]
16437            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
16438            #[doc = ""]
16439            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
16440            #[doc = "However, this function can provide more flexibility when required."]
16441            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
16442                Box::pin({
16443                    let this = self.clone();
16444                    async move {
16445                        let url = this.url()?;
16446                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
16447                        let bearer_token = this.client.bearer_token().await?;
16448                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
16449                        let req_body = azure_core::EMPTY_BODY;
16450                        req.set_body(req_body);
16451                        Ok(Response(this.client.send(&mut req).await?))
16452                    }
16453                })
16454            }
16455            fn url(&self) -> azure_core::Result<azure_core::Url> {
16456                let mut url = self.client.endpoint().clone();
16457                url.set_path("/providers/Microsoft.Automation/operations");
16458                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
16459                if !has_api_version_already {
16460                    url.query_pairs_mut()
16461                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
16462                }
16463                Ok(url)
16464            }
16465        }
16466    }
16467}
16468pub mod schedule {
16469    use super::models;
16470    #[cfg(not(target_arch = "wasm32"))]
16471    use futures::future::BoxFuture;
16472    #[cfg(target_arch = "wasm32")]
16473    use futures::future::LocalBoxFuture as BoxFuture;
16474    pub struct Client(pub(crate) super::Client);
16475    impl Client {
16476        #[doc = "Retrieve the schedule identified by schedule name."]
16477        #[doc = ""]
16478        #[doc = "Arguments:"]
16479        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
16480        #[doc = "* `automation_account_name`: The name of the automation account."]
16481        #[doc = "* `schedule_name`: The schedule name."]
16482        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
16483        pub fn get(
16484            &self,
16485            resource_group_name: impl Into<String>,
16486            automation_account_name: impl Into<String>,
16487            schedule_name: impl Into<String>,
16488            subscription_id: impl Into<String>,
16489        ) -> get::RequestBuilder {
16490            get::RequestBuilder {
16491                client: self.0.clone(),
16492                resource_group_name: resource_group_name.into(),
16493                automation_account_name: automation_account_name.into(),
16494                schedule_name: schedule_name.into(),
16495                subscription_id: subscription_id.into(),
16496            }
16497        }
16498        #[doc = "Create a schedule."]
16499        #[doc = ""]
16500        #[doc = "Arguments:"]
16501        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
16502        #[doc = "* `automation_account_name`: The name of the automation account."]
16503        #[doc = "* `schedule_name`: The schedule name."]
16504        #[doc = "* `parameters`: The parameters supplied to the create or update schedule operation."]
16505        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
16506        pub fn create_or_update(
16507            &self,
16508            resource_group_name: impl Into<String>,
16509            automation_account_name: impl Into<String>,
16510            schedule_name: impl Into<String>,
16511            parameters: impl Into<models::ScheduleCreateOrUpdateParameters>,
16512            subscription_id: impl Into<String>,
16513        ) -> create_or_update::RequestBuilder {
16514            create_or_update::RequestBuilder {
16515                client: self.0.clone(),
16516                resource_group_name: resource_group_name.into(),
16517                automation_account_name: automation_account_name.into(),
16518                schedule_name: schedule_name.into(),
16519                parameters: parameters.into(),
16520                subscription_id: subscription_id.into(),
16521            }
16522        }
16523        #[doc = "Update the schedule identified by schedule name."]
16524        #[doc = ""]
16525        #[doc = "Arguments:"]
16526        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
16527        #[doc = "* `automation_account_name`: The name of the automation account."]
16528        #[doc = "* `schedule_name`: The schedule name."]
16529        #[doc = "* `parameters`: The parameters supplied to the update schedule operation."]
16530        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
16531        pub fn update(
16532            &self,
16533            resource_group_name: impl Into<String>,
16534            automation_account_name: impl Into<String>,
16535            schedule_name: impl Into<String>,
16536            parameters: impl Into<models::ScheduleUpdateParameters>,
16537            subscription_id: impl Into<String>,
16538        ) -> update::RequestBuilder {
16539            update::RequestBuilder {
16540                client: self.0.clone(),
16541                resource_group_name: resource_group_name.into(),
16542                automation_account_name: automation_account_name.into(),
16543                schedule_name: schedule_name.into(),
16544                parameters: parameters.into(),
16545                subscription_id: subscription_id.into(),
16546            }
16547        }
16548        #[doc = "Delete the schedule identified by schedule name."]
16549        #[doc = ""]
16550        #[doc = "Arguments:"]
16551        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
16552        #[doc = "* `automation_account_name`: The name of the automation account."]
16553        #[doc = "* `schedule_name`: The schedule name."]
16554        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
16555        pub fn delete(
16556            &self,
16557            resource_group_name: impl Into<String>,
16558            automation_account_name: impl Into<String>,
16559            schedule_name: impl Into<String>,
16560            subscription_id: impl Into<String>,
16561        ) -> delete::RequestBuilder {
16562            delete::RequestBuilder {
16563                client: self.0.clone(),
16564                resource_group_name: resource_group_name.into(),
16565                automation_account_name: automation_account_name.into(),
16566                schedule_name: schedule_name.into(),
16567                subscription_id: subscription_id.into(),
16568            }
16569        }
16570        #[doc = "Retrieve a list of schedules."]
16571        #[doc = ""]
16572        #[doc = "Arguments:"]
16573        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
16574        #[doc = "* `automation_account_name`: The name of the automation account."]
16575        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
16576        pub fn list_by_automation_account(
16577            &self,
16578            resource_group_name: impl Into<String>,
16579            automation_account_name: impl Into<String>,
16580            subscription_id: impl Into<String>,
16581        ) -> list_by_automation_account::RequestBuilder {
16582            list_by_automation_account::RequestBuilder {
16583                client: self.0.clone(),
16584                resource_group_name: resource_group_name.into(),
16585                automation_account_name: automation_account_name.into(),
16586                subscription_id: subscription_id.into(),
16587            }
16588        }
16589    }
16590    pub mod get {
16591        use super::models;
16592        #[cfg(not(target_arch = "wasm32"))]
16593        use futures::future::BoxFuture;
16594        #[cfg(target_arch = "wasm32")]
16595        use futures::future::LocalBoxFuture as BoxFuture;
16596        #[derive(Debug)]
16597        pub struct Response(azure_core::Response);
16598        impl Response {
16599            pub async fn into_body(self) -> azure_core::Result<models::Schedule> {
16600                let bytes = self.0.into_body().collect().await?;
16601                let body: models::Schedule = serde_json::from_slice(&bytes)?;
16602                Ok(body)
16603            }
16604            pub fn into_raw_response(self) -> azure_core::Response {
16605                self.0
16606            }
16607            pub fn as_raw_response(&self) -> &azure_core::Response {
16608                &self.0
16609            }
16610        }
16611        impl From<Response> for azure_core::Response {
16612            fn from(rsp: Response) -> Self {
16613                rsp.into_raw_response()
16614            }
16615        }
16616        impl AsRef<azure_core::Response> for Response {
16617            fn as_ref(&self) -> &azure_core::Response {
16618                self.as_raw_response()
16619            }
16620        }
16621        #[derive(Clone)]
16622        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
16623        #[doc = r""]
16624        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
16625        #[doc = r" parameters can be chained."]
16626        #[doc = r""]
16627        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
16628        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
16629        #[doc = r" executes the request and returns a `Result` with the parsed"]
16630        #[doc = r" response."]
16631        #[doc = r""]
16632        #[doc = r" In order to execute the request without polling the service"]
16633        #[doc = r" until the operation completes, use `.send().await` instead."]
16634        #[doc = r""]
16635        #[doc = r" If you need lower-level access to the raw response details"]
16636        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
16637        #[doc = r" can finalize the request using the"]
16638        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
16639        #[doc = r" that resolves to a lower-level [`Response`] value."]
16640        pub struct RequestBuilder {
16641            pub(crate) client: super::super::Client,
16642            pub(crate) resource_group_name: String,
16643            pub(crate) automation_account_name: String,
16644            pub(crate) schedule_name: String,
16645            pub(crate) subscription_id: String,
16646        }
16647        impl RequestBuilder {
16648            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
16649            #[doc = ""]
16650            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
16651            #[doc = "However, this function can provide more flexibility when required."]
16652            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
16653                Box::pin({
16654                    let this = self.clone();
16655                    async move {
16656                        let url = this.url()?;
16657                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
16658                        let bearer_token = this.client.bearer_token().await?;
16659                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
16660                        let req_body = azure_core::EMPTY_BODY;
16661                        req.set_body(req_body);
16662                        Ok(Response(this.client.send(&mut req).await?))
16663                    }
16664                })
16665            }
16666            fn url(&self) -> azure_core::Result<azure_core::Url> {
16667                let mut url = self.client.endpoint().clone();
16668                url.set_path(&format!(
16669                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/schedules/{}",
16670                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.schedule_name
16671                ));
16672                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
16673                if !has_api_version_already {
16674                    url.query_pairs_mut()
16675                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
16676                }
16677                Ok(url)
16678            }
16679        }
16680        impl std::future::IntoFuture for RequestBuilder {
16681            type Output = azure_core::Result<models::Schedule>;
16682            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Schedule>>;
16683            #[doc = "Returns a future that sends the request and returns the parsed response body."]
16684            #[doc = ""]
16685            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
16686            #[doc = ""]
16687            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
16688            fn into_future(self) -> Self::IntoFuture {
16689                Box::pin(async move { self.send().await?.into_body().await })
16690            }
16691        }
16692    }
16693    pub mod create_or_update {
16694        use super::models;
16695        #[cfg(not(target_arch = "wasm32"))]
16696        use futures::future::BoxFuture;
16697        #[cfg(target_arch = "wasm32")]
16698        use futures::future::LocalBoxFuture as BoxFuture;
16699        #[derive(Debug)]
16700        pub struct Response(azure_core::Response);
16701        impl Response {
16702            pub async fn into_body(self) -> azure_core::Result<models::Schedule> {
16703                let bytes = self.0.into_body().collect().await?;
16704                let body: models::Schedule = serde_json::from_slice(&bytes)?;
16705                Ok(body)
16706            }
16707            pub fn into_raw_response(self) -> azure_core::Response {
16708                self.0
16709            }
16710            pub fn as_raw_response(&self) -> &azure_core::Response {
16711                &self.0
16712            }
16713        }
16714        impl From<Response> for azure_core::Response {
16715            fn from(rsp: Response) -> Self {
16716                rsp.into_raw_response()
16717            }
16718        }
16719        impl AsRef<azure_core::Response> for Response {
16720            fn as_ref(&self) -> &azure_core::Response {
16721                self.as_raw_response()
16722            }
16723        }
16724        #[derive(Clone)]
16725        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
16726        #[doc = r""]
16727        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
16728        #[doc = r" parameters can be chained."]
16729        #[doc = r""]
16730        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
16731        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
16732        #[doc = r" executes the request and returns a `Result` with the parsed"]
16733        #[doc = r" response."]
16734        #[doc = r""]
16735        #[doc = r" In order to execute the request without polling the service"]
16736        #[doc = r" until the operation completes, use `.send().await` instead."]
16737        #[doc = r""]
16738        #[doc = r" If you need lower-level access to the raw response details"]
16739        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
16740        #[doc = r" can finalize the request using the"]
16741        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
16742        #[doc = r" that resolves to a lower-level [`Response`] value."]
16743        pub struct RequestBuilder {
16744            pub(crate) client: super::super::Client,
16745            pub(crate) resource_group_name: String,
16746            pub(crate) automation_account_name: String,
16747            pub(crate) schedule_name: String,
16748            pub(crate) parameters: models::ScheduleCreateOrUpdateParameters,
16749            pub(crate) subscription_id: String,
16750        }
16751        impl RequestBuilder {
16752            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
16753            #[doc = ""]
16754            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
16755            #[doc = "However, this function can provide more flexibility when required."]
16756            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
16757                Box::pin({
16758                    let this = self.clone();
16759                    async move {
16760                        let url = this.url()?;
16761                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
16762                        let bearer_token = this.client.bearer_token().await?;
16763                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
16764                        req.insert_header("content-type", "application/json");
16765                        let req_body = azure_core::to_json(&this.parameters)?;
16766                        req.set_body(req_body);
16767                        Ok(Response(this.client.send(&mut req).await?))
16768                    }
16769                })
16770            }
16771            fn url(&self) -> azure_core::Result<azure_core::Url> {
16772                let mut url = self.client.endpoint().clone();
16773                url.set_path(&format!(
16774                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/schedules/{}",
16775                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.schedule_name
16776                ));
16777                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
16778                if !has_api_version_already {
16779                    url.query_pairs_mut()
16780                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
16781                }
16782                Ok(url)
16783            }
16784        }
16785        impl std::future::IntoFuture for RequestBuilder {
16786            type Output = azure_core::Result<models::Schedule>;
16787            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Schedule>>;
16788            #[doc = "Returns a future that sends the request and returns the parsed response body."]
16789            #[doc = ""]
16790            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
16791            #[doc = ""]
16792            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
16793            fn into_future(self) -> Self::IntoFuture {
16794                Box::pin(async move { self.send().await?.into_body().await })
16795            }
16796        }
16797    }
16798    pub mod update {
16799        use super::models;
16800        #[cfg(not(target_arch = "wasm32"))]
16801        use futures::future::BoxFuture;
16802        #[cfg(target_arch = "wasm32")]
16803        use futures::future::LocalBoxFuture as BoxFuture;
16804        #[derive(Debug)]
16805        pub struct Response(azure_core::Response);
16806        impl Response {
16807            pub async fn into_body(self) -> azure_core::Result<models::Schedule> {
16808                let bytes = self.0.into_body().collect().await?;
16809                let body: models::Schedule = serde_json::from_slice(&bytes)?;
16810                Ok(body)
16811            }
16812            pub fn into_raw_response(self) -> azure_core::Response {
16813                self.0
16814            }
16815            pub fn as_raw_response(&self) -> &azure_core::Response {
16816                &self.0
16817            }
16818        }
16819        impl From<Response> for azure_core::Response {
16820            fn from(rsp: Response) -> Self {
16821                rsp.into_raw_response()
16822            }
16823        }
16824        impl AsRef<azure_core::Response> for Response {
16825            fn as_ref(&self) -> &azure_core::Response {
16826                self.as_raw_response()
16827            }
16828        }
16829        #[derive(Clone)]
16830        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
16831        #[doc = r""]
16832        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
16833        #[doc = r" parameters can be chained."]
16834        #[doc = r""]
16835        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
16836        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
16837        #[doc = r" executes the request and returns a `Result` with the parsed"]
16838        #[doc = r" response."]
16839        #[doc = r""]
16840        #[doc = r" In order to execute the request without polling the service"]
16841        #[doc = r" until the operation completes, use `.send().await` instead."]
16842        #[doc = r""]
16843        #[doc = r" If you need lower-level access to the raw response details"]
16844        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
16845        #[doc = r" can finalize the request using the"]
16846        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
16847        #[doc = r" that resolves to a lower-level [`Response`] value."]
16848        pub struct RequestBuilder {
16849            pub(crate) client: super::super::Client,
16850            pub(crate) resource_group_name: String,
16851            pub(crate) automation_account_name: String,
16852            pub(crate) schedule_name: String,
16853            pub(crate) parameters: models::ScheduleUpdateParameters,
16854            pub(crate) subscription_id: String,
16855        }
16856        impl RequestBuilder {
16857            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
16858            #[doc = ""]
16859            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
16860            #[doc = "However, this function can provide more flexibility when required."]
16861            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
16862                Box::pin({
16863                    let this = self.clone();
16864                    async move {
16865                        let url = this.url()?;
16866                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
16867                        let bearer_token = this.client.bearer_token().await?;
16868                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
16869                        req.insert_header("content-type", "application/json");
16870                        let req_body = azure_core::to_json(&this.parameters)?;
16871                        req.set_body(req_body);
16872                        Ok(Response(this.client.send(&mut req).await?))
16873                    }
16874                })
16875            }
16876            fn url(&self) -> azure_core::Result<azure_core::Url> {
16877                let mut url = self.client.endpoint().clone();
16878                url.set_path(&format!(
16879                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/schedules/{}",
16880                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.schedule_name
16881                ));
16882                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
16883                if !has_api_version_already {
16884                    url.query_pairs_mut()
16885                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
16886                }
16887                Ok(url)
16888            }
16889        }
16890        impl std::future::IntoFuture for RequestBuilder {
16891            type Output = azure_core::Result<models::Schedule>;
16892            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Schedule>>;
16893            #[doc = "Returns a future that sends the request and returns the parsed response body."]
16894            #[doc = ""]
16895            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
16896            #[doc = ""]
16897            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
16898            fn into_future(self) -> Self::IntoFuture {
16899                Box::pin(async move { self.send().await?.into_body().await })
16900            }
16901        }
16902    }
16903    pub mod delete {
16904        use super::models;
16905        #[cfg(not(target_arch = "wasm32"))]
16906        use futures::future::BoxFuture;
16907        #[cfg(target_arch = "wasm32")]
16908        use futures::future::LocalBoxFuture as BoxFuture;
16909        #[derive(Debug)]
16910        pub struct Response(azure_core::Response);
16911        impl Response {
16912            pub fn into_raw_response(self) -> azure_core::Response {
16913                self.0
16914            }
16915            pub fn as_raw_response(&self) -> &azure_core::Response {
16916                &self.0
16917            }
16918        }
16919        impl From<Response> for azure_core::Response {
16920            fn from(rsp: Response) -> Self {
16921                rsp.into_raw_response()
16922            }
16923        }
16924        impl AsRef<azure_core::Response> for Response {
16925            fn as_ref(&self) -> &azure_core::Response {
16926                self.as_raw_response()
16927            }
16928        }
16929        #[derive(Clone)]
16930        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
16931        #[doc = r""]
16932        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
16933        #[doc = r" parameters can be chained."]
16934        #[doc = r""]
16935        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
16936        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
16937        #[doc = r" executes the request and returns a `Result` with the parsed"]
16938        #[doc = r" response."]
16939        #[doc = r""]
16940        #[doc = r" In order to execute the request without polling the service"]
16941        #[doc = r" until the operation completes, use `.send().await` instead."]
16942        #[doc = r""]
16943        #[doc = r" If you need lower-level access to the raw response details"]
16944        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
16945        #[doc = r" can finalize the request using the"]
16946        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
16947        #[doc = r" that resolves to a lower-level [`Response`] value."]
16948        pub struct RequestBuilder {
16949            pub(crate) client: super::super::Client,
16950            pub(crate) resource_group_name: String,
16951            pub(crate) automation_account_name: String,
16952            pub(crate) schedule_name: String,
16953            pub(crate) subscription_id: String,
16954        }
16955        impl RequestBuilder {
16956            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
16957            #[doc = ""]
16958            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
16959            #[doc = "However, this function can provide more flexibility when required."]
16960            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
16961                Box::pin({
16962                    let this = self.clone();
16963                    async move {
16964                        let url = this.url()?;
16965                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
16966                        let bearer_token = this.client.bearer_token().await?;
16967                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
16968                        let req_body = azure_core::EMPTY_BODY;
16969                        req.set_body(req_body);
16970                        Ok(Response(this.client.send(&mut req).await?))
16971                    }
16972                })
16973            }
16974            fn url(&self) -> azure_core::Result<azure_core::Url> {
16975                let mut url = self.client.endpoint().clone();
16976                url.set_path(&format!(
16977                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/schedules/{}",
16978                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.schedule_name
16979                ));
16980                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
16981                if !has_api_version_already {
16982                    url.query_pairs_mut()
16983                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
16984                }
16985                Ok(url)
16986            }
16987        }
16988    }
16989    pub mod list_by_automation_account {
16990        use super::models;
16991        #[cfg(not(target_arch = "wasm32"))]
16992        use futures::future::BoxFuture;
16993        #[cfg(target_arch = "wasm32")]
16994        use futures::future::LocalBoxFuture as BoxFuture;
16995        #[derive(Debug)]
16996        pub struct Response(azure_core::Response);
16997        impl Response {
16998            pub async fn into_body(self) -> azure_core::Result<models::ScheduleListResult> {
16999                let bytes = self.0.into_body().collect().await?;
17000                let body: models::ScheduleListResult = serde_json::from_slice(&bytes)?;
17001                Ok(body)
17002            }
17003            pub fn into_raw_response(self) -> azure_core::Response {
17004                self.0
17005            }
17006            pub fn as_raw_response(&self) -> &azure_core::Response {
17007                &self.0
17008            }
17009        }
17010        impl From<Response> for azure_core::Response {
17011            fn from(rsp: Response) -> Self {
17012                rsp.into_raw_response()
17013            }
17014        }
17015        impl AsRef<azure_core::Response> for Response {
17016            fn as_ref(&self) -> &azure_core::Response {
17017                self.as_raw_response()
17018            }
17019        }
17020        #[derive(Clone)]
17021        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
17022        #[doc = r""]
17023        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
17024        #[doc = r" parameters can be chained."]
17025        #[doc = r""]
17026        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
17027        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
17028        #[doc = r" executes the request and returns a `Result` with the parsed"]
17029        #[doc = r" response."]
17030        #[doc = r""]
17031        #[doc = r" In order to execute the request without polling the service"]
17032        #[doc = r" until the operation completes, use `.send().await` instead."]
17033        #[doc = r""]
17034        #[doc = r" If you need lower-level access to the raw response details"]
17035        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
17036        #[doc = r" can finalize the request using the"]
17037        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
17038        #[doc = r" that resolves to a lower-level [`Response`] value."]
17039        pub struct RequestBuilder {
17040            pub(crate) client: super::super::Client,
17041            pub(crate) resource_group_name: String,
17042            pub(crate) automation_account_name: String,
17043            pub(crate) subscription_id: String,
17044        }
17045        impl RequestBuilder {
17046            pub fn into_stream(self) -> azure_core::Pageable<models::ScheduleListResult, azure_core::error::Error> {
17047                let make_request = move |continuation: Option<String>| {
17048                    let this = self.clone();
17049                    async move {
17050                        let mut url = this.url()?;
17051                        let rsp = match continuation {
17052                            Some(value) => {
17053                                url.set_path("");
17054                                url = url.join(&value)?;
17055                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
17056                                let bearer_token = this.client.bearer_token().await?;
17057                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17058                                let has_api_version_already =
17059                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17060                                if !has_api_version_already {
17061                                    req.url_mut()
17062                                        .query_pairs_mut()
17063                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17064                                }
17065                                let req_body = azure_core::EMPTY_BODY;
17066                                req.set_body(req_body);
17067                                this.client.send(&mut req).await?
17068                            }
17069                            None => {
17070                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
17071                                let bearer_token = this.client.bearer_token().await?;
17072                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17073                                let req_body = azure_core::EMPTY_BODY;
17074                                req.set_body(req_body);
17075                                this.client.send(&mut req).await?
17076                            }
17077                        };
17078                        let rsp = match rsp.status() {
17079                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
17080                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
17081                                status: status_code,
17082                                error_code: None,
17083                            })),
17084                        };
17085                        rsp?.into_body().await
17086                    }
17087                };
17088                azure_core::Pageable::new(make_request)
17089            }
17090            fn url(&self) -> azure_core::Result<azure_core::Url> {
17091                let mut url = self.client.endpoint().clone();
17092                url.set_path(&format!(
17093                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/schedules",
17094                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
17095                ));
17096                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17097                if !has_api_version_already {
17098                    url.query_pairs_mut()
17099                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17100                }
17101                Ok(url)
17102            }
17103        }
17104    }
17105}
17106pub mod variable {
17107    use super::models;
17108    #[cfg(not(target_arch = "wasm32"))]
17109    use futures::future::BoxFuture;
17110    #[cfg(target_arch = "wasm32")]
17111    use futures::future::LocalBoxFuture as BoxFuture;
17112    pub struct Client(pub(crate) super::Client);
17113    impl Client {
17114        #[doc = "Retrieve the variable identified by variable name."]
17115        #[doc = ""]
17116        #[doc = "Arguments:"]
17117        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17118        #[doc = "* `automation_account_name`: The name of the automation account."]
17119        #[doc = "* `variable_name`: The name of variable."]
17120        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17121        pub fn get(
17122            &self,
17123            resource_group_name: impl Into<String>,
17124            automation_account_name: impl Into<String>,
17125            variable_name: impl Into<String>,
17126            subscription_id: impl Into<String>,
17127        ) -> get::RequestBuilder {
17128            get::RequestBuilder {
17129                client: self.0.clone(),
17130                resource_group_name: resource_group_name.into(),
17131                automation_account_name: automation_account_name.into(),
17132                variable_name: variable_name.into(),
17133                subscription_id: subscription_id.into(),
17134            }
17135        }
17136        #[doc = "Create a variable."]
17137        #[doc = ""]
17138        #[doc = "Arguments:"]
17139        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17140        #[doc = "* `automation_account_name`: The name of the automation account."]
17141        #[doc = "* `variable_name`: The variable name."]
17142        #[doc = "* `parameters`: The parameters supplied to the create or update variable operation."]
17143        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17144        pub fn create_or_update(
17145            &self,
17146            resource_group_name: impl Into<String>,
17147            automation_account_name: impl Into<String>,
17148            variable_name: impl Into<String>,
17149            parameters: impl Into<models::VariableCreateOrUpdateParameters>,
17150            subscription_id: impl Into<String>,
17151        ) -> create_or_update::RequestBuilder {
17152            create_or_update::RequestBuilder {
17153                client: self.0.clone(),
17154                resource_group_name: resource_group_name.into(),
17155                automation_account_name: automation_account_name.into(),
17156                variable_name: variable_name.into(),
17157                parameters: parameters.into(),
17158                subscription_id: subscription_id.into(),
17159            }
17160        }
17161        #[doc = "Update a variable."]
17162        #[doc = ""]
17163        #[doc = "Arguments:"]
17164        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17165        #[doc = "* `automation_account_name`: The name of the automation account."]
17166        #[doc = "* `variable_name`: The variable name."]
17167        #[doc = "* `parameters`: The parameters supplied to the update variable operation."]
17168        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17169        pub fn update(
17170            &self,
17171            resource_group_name: impl Into<String>,
17172            automation_account_name: impl Into<String>,
17173            variable_name: impl Into<String>,
17174            parameters: impl Into<models::VariableUpdateParameters>,
17175            subscription_id: impl Into<String>,
17176        ) -> update::RequestBuilder {
17177            update::RequestBuilder {
17178                client: self.0.clone(),
17179                resource_group_name: resource_group_name.into(),
17180                automation_account_name: automation_account_name.into(),
17181                variable_name: variable_name.into(),
17182                parameters: parameters.into(),
17183                subscription_id: subscription_id.into(),
17184            }
17185        }
17186        #[doc = "Delete the variable."]
17187        #[doc = ""]
17188        #[doc = "Arguments:"]
17189        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17190        #[doc = "* `automation_account_name`: The name of the automation account."]
17191        #[doc = "* `variable_name`: The name of variable."]
17192        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17193        pub fn delete(
17194            &self,
17195            resource_group_name: impl Into<String>,
17196            automation_account_name: impl Into<String>,
17197            variable_name: impl Into<String>,
17198            subscription_id: impl Into<String>,
17199        ) -> delete::RequestBuilder {
17200            delete::RequestBuilder {
17201                client: self.0.clone(),
17202                resource_group_name: resource_group_name.into(),
17203                automation_account_name: automation_account_name.into(),
17204                variable_name: variable_name.into(),
17205                subscription_id: subscription_id.into(),
17206            }
17207        }
17208        #[doc = "Retrieve a list of variables."]
17209        #[doc = ""]
17210        #[doc = "Arguments:"]
17211        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17212        #[doc = "* `automation_account_name`: The name of the automation account."]
17213        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17214        pub fn list_by_automation_account(
17215            &self,
17216            resource_group_name: impl Into<String>,
17217            automation_account_name: impl Into<String>,
17218            subscription_id: impl Into<String>,
17219        ) -> list_by_automation_account::RequestBuilder {
17220            list_by_automation_account::RequestBuilder {
17221                client: self.0.clone(),
17222                resource_group_name: resource_group_name.into(),
17223                automation_account_name: automation_account_name.into(),
17224                subscription_id: subscription_id.into(),
17225            }
17226        }
17227    }
17228    pub mod get {
17229        use super::models;
17230        #[cfg(not(target_arch = "wasm32"))]
17231        use futures::future::BoxFuture;
17232        #[cfg(target_arch = "wasm32")]
17233        use futures::future::LocalBoxFuture as BoxFuture;
17234        #[derive(Debug)]
17235        pub struct Response(azure_core::Response);
17236        impl Response {
17237            pub async fn into_body(self) -> azure_core::Result<models::Variable> {
17238                let bytes = self.0.into_body().collect().await?;
17239                let body: models::Variable = serde_json::from_slice(&bytes)?;
17240                Ok(body)
17241            }
17242            pub fn into_raw_response(self) -> azure_core::Response {
17243                self.0
17244            }
17245            pub fn as_raw_response(&self) -> &azure_core::Response {
17246                &self.0
17247            }
17248        }
17249        impl From<Response> for azure_core::Response {
17250            fn from(rsp: Response) -> Self {
17251                rsp.into_raw_response()
17252            }
17253        }
17254        impl AsRef<azure_core::Response> for Response {
17255            fn as_ref(&self) -> &azure_core::Response {
17256                self.as_raw_response()
17257            }
17258        }
17259        #[derive(Clone)]
17260        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
17261        #[doc = r""]
17262        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
17263        #[doc = r" parameters can be chained."]
17264        #[doc = r""]
17265        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
17266        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
17267        #[doc = r" executes the request and returns a `Result` with the parsed"]
17268        #[doc = r" response."]
17269        #[doc = r""]
17270        #[doc = r" In order to execute the request without polling the service"]
17271        #[doc = r" until the operation completes, use `.send().await` instead."]
17272        #[doc = r""]
17273        #[doc = r" If you need lower-level access to the raw response details"]
17274        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
17275        #[doc = r" can finalize the request using the"]
17276        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
17277        #[doc = r" that resolves to a lower-level [`Response`] value."]
17278        pub struct RequestBuilder {
17279            pub(crate) client: super::super::Client,
17280            pub(crate) resource_group_name: String,
17281            pub(crate) automation_account_name: String,
17282            pub(crate) variable_name: String,
17283            pub(crate) subscription_id: String,
17284        }
17285        impl RequestBuilder {
17286            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
17287            #[doc = ""]
17288            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
17289            #[doc = "However, this function can provide more flexibility when required."]
17290            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
17291                Box::pin({
17292                    let this = self.clone();
17293                    async move {
17294                        let url = this.url()?;
17295                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
17296                        let bearer_token = this.client.bearer_token().await?;
17297                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17298                        let req_body = azure_core::EMPTY_BODY;
17299                        req.set_body(req_body);
17300                        Ok(Response(this.client.send(&mut req).await?))
17301                    }
17302                })
17303            }
17304            fn url(&self) -> azure_core::Result<azure_core::Url> {
17305                let mut url = self.client.endpoint().clone();
17306                url.set_path(&format!(
17307                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/variables/{}",
17308                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.variable_name
17309                ));
17310                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17311                if !has_api_version_already {
17312                    url.query_pairs_mut()
17313                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17314                }
17315                Ok(url)
17316            }
17317        }
17318        impl std::future::IntoFuture for RequestBuilder {
17319            type Output = azure_core::Result<models::Variable>;
17320            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Variable>>;
17321            #[doc = "Returns a future that sends the request and returns the parsed response body."]
17322            #[doc = ""]
17323            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
17324            #[doc = ""]
17325            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
17326            fn into_future(self) -> Self::IntoFuture {
17327                Box::pin(async move { self.send().await?.into_body().await })
17328            }
17329        }
17330    }
17331    pub mod create_or_update {
17332        use super::models;
17333        #[cfg(not(target_arch = "wasm32"))]
17334        use futures::future::BoxFuture;
17335        #[cfg(target_arch = "wasm32")]
17336        use futures::future::LocalBoxFuture as BoxFuture;
17337        #[derive(Debug)]
17338        pub struct Response(azure_core::Response);
17339        impl Response {
17340            pub async fn into_body(self) -> azure_core::Result<models::Variable> {
17341                let bytes = self.0.into_body().collect().await?;
17342                let body: models::Variable = serde_json::from_slice(&bytes)?;
17343                Ok(body)
17344            }
17345            pub fn into_raw_response(self) -> azure_core::Response {
17346                self.0
17347            }
17348            pub fn as_raw_response(&self) -> &azure_core::Response {
17349                &self.0
17350            }
17351        }
17352        impl From<Response> for azure_core::Response {
17353            fn from(rsp: Response) -> Self {
17354                rsp.into_raw_response()
17355            }
17356        }
17357        impl AsRef<azure_core::Response> for Response {
17358            fn as_ref(&self) -> &azure_core::Response {
17359                self.as_raw_response()
17360            }
17361        }
17362        #[derive(Clone)]
17363        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
17364        #[doc = r""]
17365        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
17366        #[doc = r" parameters can be chained."]
17367        #[doc = r""]
17368        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
17369        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
17370        #[doc = r" executes the request and returns a `Result` with the parsed"]
17371        #[doc = r" response."]
17372        #[doc = r""]
17373        #[doc = r" In order to execute the request without polling the service"]
17374        #[doc = r" until the operation completes, use `.send().await` instead."]
17375        #[doc = r""]
17376        #[doc = r" If you need lower-level access to the raw response details"]
17377        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
17378        #[doc = r" can finalize the request using the"]
17379        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
17380        #[doc = r" that resolves to a lower-level [`Response`] value."]
17381        pub struct RequestBuilder {
17382            pub(crate) client: super::super::Client,
17383            pub(crate) resource_group_name: String,
17384            pub(crate) automation_account_name: String,
17385            pub(crate) variable_name: String,
17386            pub(crate) parameters: models::VariableCreateOrUpdateParameters,
17387            pub(crate) subscription_id: String,
17388        }
17389        impl RequestBuilder {
17390            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
17391            #[doc = ""]
17392            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
17393            #[doc = "However, this function can provide more flexibility when required."]
17394            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
17395                Box::pin({
17396                    let this = self.clone();
17397                    async move {
17398                        let url = this.url()?;
17399                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
17400                        let bearer_token = this.client.bearer_token().await?;
17401                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17402                        req.insert_header("content-type", "application/json");
17403                        let req_body = azure_core::to_json(&this.parameters)?;
17404                        req.set_body(req_body);
17405                        Ok(Response(this.client.send(&mut req).await?))
17406                    }
17407                })
17408            }
17409            fn url(&self) -> azure_core::Result<azure_core::Url> {
17410                let mut url = self.client.endpoint().clone();
17411                url.set_path(&format!(
17412                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/variables/{}",
17413                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.variable_name
17414                ));
17415                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17416                if !has_api_version_already {
17417                    url.query_pairs_mut()
17418                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17419                }
17420                Ok(url)
17421            }
17422        }
17423        impl std::future::IntoFuture for RequestBuilder {
17424            type Output = azure_core::Result<models::Variable>;
17425            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Variable>>;
17426            #[doc = "Returns a future that sends the request and returns the parsed response body."]
17427            #[doc = ""]
17428            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
17429            #[doc = ""]
17430            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
17431            fn into_future(self) -> Self::IntoFuture {
17432                Box::pin(async move { self.send().await?.into_body().await })
17433            }
17434        }
17435    }
17436    pub mod update {
17437        use super::models;
17438        #[cfg(not(target_arch = "wasm32"))]
17439        use futures::future::BoxFuture;
17440        #[cfg(target_arch = "wasm32")]
17441        use futures::future::LocalBoxFuture as BoxFuture;
17442        #[derive(Debug)]
17443        pub struct Response(azure_core::Response);
17444        impl Response {
17445            pub async fn into_body(self) -> azure_core::Result<models::Variable> {
17446                let bytes = self.0.into_body().collect().await?;
17447                let body: models::Variable = serde_json::from_slice(&bytes)?;
17448                Ok(body)
17449            }
17450            pub fn into_raw_response(self) -> azure_core::Response {
17451                self.0
17452            }
17453            pub fn as_raw_response(&self) -> &azure_core::Response {
17454                &self.0
17455            }
17456        }
17457        impl From<Response> for azure_core::Response {
17458            fn from(rsp: Response) -> Self {
17459                rsp.into_raw_response()
17460            }
17461        }
17462        impl AsRef<azure_core::Response> for Response {
17463            fn as_ref(&self) -> &azure_core::Response {
17464                self.as_raw_response()
17465            }
17466        }
17467        #[derive(Clone)]
17468        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
17469        #[doc = r""]
17470        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
17471        #[doc = r" parameters can be chained."]
17472        #[doc = r""]
17473        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
17474        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
17475        #[doc = r" executes the request and returns a `Result` with the parsed"]
17476        #[doc = r" response."]
17477        #[doc = r""]
17478        #[doc = r" In order to execute the request without polling the service"]
17479        #[doc = r" until the operation completes, use `.send().await` instead."]
17480        #[doc = r""]
17481        #[doc = r" If you need lower-level access to the raw response details"]
17482        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
17483        #[doc = r" can finalize the request using the"]
17484        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
17485        #[doc = r" that resolves to a lower-level [`Response`] value."]
17486        pub struct RequestBuilder {
17487            pub(crate) client: super::super::Client,
17488            pub(crate) resource_group_name: String,
17489            pub(crate) automation_account_name: String,
17490            pub(crate) variable_name: String,
17491            pub(crate) parameters: models::VariableUpdateParameters,
17492            pub(crate) subscription_id: String,
17493        }
17494        impl RequestBuilder {
17495            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
17496            #[doc = ""]
17497            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
17498            #[doc = "However, this function can provide more flexibility when required."]
17499            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
17500                Box::pin({
17501                    let this = self.clone();
17502                    async move {
17503                        let url = this.url()?;
17504                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
17505                        let bearer_token = this.client.bearer_token().await?;
17506                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17507                        req.insert_header("content-type", "application/json");
17508                        let req_body = azure_core::to_json(&this.parameters)?;
17509                        req.set_body(req_body);
17510                        Ok(Response(this.client.send(&mut req).await?))
17511                    }
17512                })
17513            }
17514            fn url(&self) -> azure_core::Result<azure_core::Url> {
17515                let mut url = self.client.endpoint().clone();
17516                url.set_path(&format!(
17517                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/variables/{}",
17518                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.variable_name
17519                ));
17520                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17521                if !has_api_version_already {
17522                    url.query_pairs_mut()
17523                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17524                }
17525                Ok(url)
17526            }
17527        }
17528        impl std::future::IntoFuture for RequestBuilder {
17529            type Output = azure_core::Result<models::Variable>;
17530            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Variable>>;
17531            #[doc = "Returns a future that sends the request and returns the parsed response body."]
17532            #[doc = ""]
17533            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
17534            #[doc = ""]
17535            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
17536            fn into_future(self) -> Self::IntoFuture {
17537                Box::pin(async move { self.send().await?.into_body().await })
17538            }
17539        }
17540    }
17541    pub mod delete {
17542        use super::models;
17543        #[cfg(not(target_arch = "wasm32"))]
17544        use futures::future::BoxFuture;
17545        #[cfg(target_arch = "wasm32")]
17546        use futures::future::LocalBoxFuture as BoxFuture;
17547        #[derive(Debug)]
17548        pub struct Response(azure_core::Response);
17549        impl Response {
17550            pub fn into_raw_response(self) -> azure_core::Response {
17551                self.0
17552            }
17553            pub fn as_raw_response(&self) -> &azure_core::Response {
17554                &self.0
17555            }
17556        }
17557        impl From<Response> for azure_core::Response {
17558            fn from(rsp: Response) -> Self {
17559                rsp.into_raw_response()
17560            }
17561        }
17562        impl AsRef<azure_core::Response> for Response {
17563            fn as_ref(&self) -> &azure_core::Response {
17564                self.as_raw_response()
17565            }
17566        }
17567        #[derive(Clone)]
17568        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
17569        #[doc = r""]
17570        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
17571        #[doc = r" parameters can be chained."]
17572        #[doc = r""]
17573        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
17574        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
17575        #[doc = r" executes the request and returns a `Result` with the parsed"]
17576        #[doc = r" response."]
17577        #[doc = r""]
17578        #[doc = r" In order to execute the request without polling the service"]
17579        #[doc = r" until the operation completes, use `.send().await` instead."]
17580        #[doc = r""]
17581        #[doc = r" If you need lower-level access to the raw response details"]
17582        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
17583        #[doc = r" can finalize the request using the"]
17584        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
17585        #[doc = r" that resolves to a lower-level [`Response`] value."]
17586        pub struct RequestBuilder {
17587            pub(crate) client: super::super::Client,
17588            pub(crate) resource_group_name: String,
17589            pub(crate) automation_account_name: String,
17590            pub(crate) variable_name: String,
17591            pub(crate) subscription_id: String,
17592        }
17593        impl RequestBuilder {
17594            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
17595            #[doc = ""]
17596            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
17597            #[doc = "However, this function can provide more flexibility when required."]
17598            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
17599                Box::pin({
17600                    let this = self.clone();
17601                    async move {
17602                        let url = this.url()?;
17603                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
17604                        let bearer_token = this.client.bearer_token().await?;
17605                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17606                        let req_body = azure_core::EMPTY_BODY;
17607                        req.set_body(req_body);
17608                        Ok(Response(this.client.send(&mut req).await?))
17609                    }
17610                })
17611            }
17612            fn url(&self) -> azure_core::Result<azure_core::Url> {
17613                let mut url = self.client.endpoint().clone();
17614                url.set_path(&format!(
17615                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/variables/{}",
17616                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.variable_name
17617                ));
17618                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17619                if !has_api_version_already {
17620                    url.query_pairs_mut()
17621                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17622                }
17623                Ok(url)
17624            }
17625        }
17626    }
17627    pub mod list_by_automation_account {
17628        use super::models;
17629        #[cfg(not(target_arch = "wasm32"))]
17630        use futures::future::BoxFuture;
17631        #[cfg(target_arch = "wasm32")]
17632        use futures::future::LocalBoxFuture as BoxFuture;
17633        #[derive(Debug)]
17634        pub struct Response(azure_core::Response);
17635        impl Response {
17636            pub async fn into_body(self) -> azure_core::Result<models::VariableListResult> {
17637                let bytes = self.0.into_body().collect().await?;
17638                let body: models::VariableListResult = serde_json::from_slice(&bytes)?;
17639                Ok(body)
17640            }
17641            pub fn into_raw_response(self) -> azure_core::Response {
17642                self.0
17643            }
17644            pub fn as_raw_response(&self) -> &azure_core::Response {
17645                &self.0
17646            }
17647        }
17648        impl From<Response> for azure_core::Response {
17649            fn from(rsp: Response) -> Self {
17650                rsp.into_raw_response()
17651            }
17652        }
17653        impl AsRef<azure_core::Response> for Response {
17654            fn as_ref(&self) -> &azure_core::Response {
17655                self.as_raw_response()
17656            }
17657        }
17658        #[derive(Clone)]
17659        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
17660        #[doc = r""]
17661        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
17662        #[doc = r" parameters can be chained."]
17663        #[doc = r""]
17664        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
17665        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
17666        #[doc = r" executes the request and returns a `Result` with the parsed"]
17667        #[doc = r" response."]
17668        #[doc = r""]
17669        #[doc = r" In order to execute the request without polling the service"]
17670        #[doc = r" until the operation completes, use `.send().await` instead."]
17671        #[doc = r""]
17672        #[doc = r" If you need lower-level access to the raw response details"]
17673        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
17674        #[doc = r" can finalize the request using the"]
17675        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
17676        #[doc = r" that resolves to a lower-level [`Response`] value."]
17677        pub struct RequestBuilder {
17678            pub(crate) client: super::super::Client,
17679            pub(crate) resource_group_name: String,
17680            pub(crate) automation_account_name: String,
17681            pub(crate) subscription_id: String,
17682        }
17683        impl RequestBuilder {
17684            pub fn into_stream(self) -> azure_core::Pageable<models::VariableListResult, azure_core::error::Error> {
17685                let make_request = move |continuation: Option<String>| {
17686                    let this = self.clone();
17687                    async move {
17688                        let mut url = this.url()?;
17689                        let rsp = match continuation {
17690                            Some(value) => {
17691                                url.set_path("");
17692                                url = url.join(&value)?;
17693                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
17694                                let bearer_token = this.client.bearer_token().await?;
17695                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17696                                let has_api_version_already =
17697                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17698                                if !has_api_version_already {
17699                                    req.url_mut()
17700                                        .query_pairs_mut()
17701                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17702                                }
17703                                let req_body = azure_core::EMPTY_BODY;
17704                                req.set_body(req_body);
17705                                this.client.send(&mut req).await?
17706                            }
17707                            None => {
17708                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
17709                                let bearer_token = this.client.bearer_token().await?;
17710                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17711                                let req_body = azure_core::EMPTY_BODY;
17712                                req.set_body(req_body);
17713                                this.client.send(&mut req).await?
17714                            }
17715                        };
17716                        let rsp = match rsp.status() {
17717                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
17718                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
17719                                status: status_code,
17720                                error_code: None,
17721                            })),
17722                        };
17723                        rsp?.into_body().await
17724                    }
17725                };
17726                azure_core::Pageable::new(make_request)
17727            }
17728            fn url(&self) -> azure_core::Result<azure_core::Url> {
17729                let mut url = self.client.endpoint().clone();
17730                url.set_path(&format!(
17731                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/variables",
17732                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
17733                ));
17734                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17735                if !has_api_version_already {
17736                    url.query_pairs_mut()
17737                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17738                }
17739                Ok(url)
17740            }
17741        }
17742    }
17743}
17744pub mod watcher {
17745    use super::models;
17746    #[cfg(not(target_arch = "wasm32"))]
17747    use futures::future::BoxFuture;
17748    #[cfg(target_arch = "wasm32")]
17749    use futures::future::LocalBoxFuture as BoxFuture;
17750    pub struct Client(pub(crate) super::Client);
17751    impl Client {
17752        #[doc = "Retrieve the watcher identified by watcher name."]
17753        #[doc = ""]
17754        #[doc = "Arguments:"]
17755        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17756        #[doc = "* `automation_account_name`: The name of the automation account."]
17757        #[doc = "* `watcher_name`: The watcher name."]
17758        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17759        pub fn get(
17760            &self,
17761            resource_group_name: impl Into<String>,
17762            automation_account_name: impl Into<String>,
17763            watcher_name: impl Into<String>,
17764            subscription_id: impl Into<String>,
17765        ) -> get::RequestBuilder {
17766            get::RequestBuilder {
17767                client: self.0.clone(),
17768                resource_group_name: resource_group_name.into(),
17769                automation_account_name: automation_account_name.into(),
17770                watcher_name: watcher_name.into(),
17771                subscription_id: subscription_id.into(),
17772            }
17773        }
17774        #[doc = "Create the watcher identified by watcher name."]
17775        #[doc = ""]
17776        #[doc = "Arguments:"]
17777        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17778        #[doc = "* `automation_account_name`: The name of the automation account."]
17779        #[doc = "* `watcher_name`: The watcher name."]
17780        #[doc = "* `parameters`: The create or update parameters for watcher."]
17781        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17782        pub fn create_or_update(
17783            &self,
17784            resource_group_name: impl Into<String>,
17785            automation_account_name: impl Into<String>,
17786            watcher_name: impl Into<String>,
17787            parameters: impl Into<models::Watcher>,
17788            subscription_id: impl Into<String>,
17789        ) -> create_or_update::RequestBuilder {
17790            create_or_update::RequestBuilder {
17791                client: self.0.clone(),
17792                resource_group_name: resource_group_name.into(),
17793                automation_account_name: automation_account_name.into(),
17794                watcher_name: watcher_name.into(),
17795                parameters: parameters.into(),
17796                subscription_id: subscription_id.into(),
17797            }
17798        }
17799        #[doc = "Update the watcher identified by watcher name."]
17800        #[doc = ""]
17801        #[doc = "Arguments:"]
17802        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17803        #[doc = "* `automation_account_name`: The name of the automation account."]
17804        #[doc = "* `watcher_name`: The watcher name."]
17805        #[doc = "* `parameters`: The update parameters for watcher."]
17806        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17807        pub fn update(
17808            &self,
17809            resource_group_name: impl Into<String>,
17810            automation_account_name: impl Into<String>,
17811            watcher_name: impl Into<String>,
17812            parameters: impl Into<models::WatcherUpdateParameters>,
17813            subscription_id: impl Into<String>,
17814        ) -> update::RequestBuilder {
17815            update::RequestBuilder {
17816                client: self.0.clone(),
17817                resource_group_name: resource_group_name.into(),
17818                automation_account_name: automation_account_name.into(),
17819                watcher_name: watcher_name.into(),
17820                parameters: parameters.into(),
17821                subscription_id: subscription_id.into(),
17822            }
17823        }
17824        #[doc = "Delete the watcher by name."]
17825        #[doc = ""]
17826        #[doc = "Arguments:"]
17827        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17828        #[doc = "* `automation_account_name`: The name of the automation account."]
17829        #[doc = "* `watcher_name`: The watcher name."]
17830        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17831        pub fn delete(
17832            &self,
17833            resource_group_name: impl Into<String>,
17834            automation_account_name: impl Into<String>,
17835            watcher_name: impl Into<String>,
17836            subscription_id: impl Into<String>,
17837        ) -> delete::RequestBuilder {
17838            delete::RequestBuilder {
17839                client: self.0.clone(),
17840                resource_group_name: resource_group_name.into(),
17841                automation_account_name: automation_account_name.into(),
17842                watcher_name: watcher_name.into(),
17843                subscription_id: subscription_id.into(),
17844            }
17845        }
17846        #[doc = "Resume the watcher identified by watcher name."]
17847        #[doc = ""]
17848        #[doc = "Arguments:"]
17849        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17850        #[doc = "* `automation_account_name`: The name of the automation account."]
17851        #[doc = "* `watcher_name`: The watcher name."]
17852        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17853        pub fn start(
17854            &self,
17855            resource_group_name: impl Into<String>,
17856            automation_account_name: impl Into<String>,
17857            watcher_name: impl Into<String>,
17858            subscription_id: impl Into<String>,
17859        ) -> start::RequestBuilder {
17860            start::RequestBuilder {
17861                client: self.0.clone(),
17862                resource_group_name: resource_group_name.into(),
17863                automation_account_name: automation_account_name.into(),
17864                watcher_name: watcher_name.into(),
17865                subscription_id: subscription_id.into(),
17866            }
17867        }
17868        #[doc = "Resume the watcher identified by watcher name."]
17869        #[doc = ""]
17870        #[doc = "Arguments:"]
17871        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17872        #[doc = "* `automation_account_name`: The name of the automation account."]
17873        #[doc = "* `watcher_name`: The watcher name."]
17874        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17875        pub fn stop(
17876            &self,
17877            resource_group_name: impl Into<String>,
17878            automation_account_name: impl Into<String>,
17879            watcher_name: impl Into<String>,
17880            subscription_id: impl Into<String>,
17881        ) -> stop::RequestBuilder {
17882            stop::RequestBuilder {
17883                client: self.0.clone(),
17884                resource_group_name: resource_group_name.into(),
17885                automation_account_name: automation_account_name.into(),
17886                watcher_name: watcher_name.into(),
17887                subscription_id: subscription_id.into(),
17888            }
17889        }
17890        #[doc = "Retrieve a list of watchers."]
17891        #[doc = ""]
17892        #[doc = "Arguments:"]
17893        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
17894        #[doc = "* `automation_account_name`: The name of the automation account."]
17895        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
17896        pub fn list_by_automation_account(
17897            &self,
17898            resource_group_name: impl Into<String>,
17899            automation_account_name: impl Into<String>,
17900            subscription_id: impl Into<String>,
17901        ) -> list_by_automation_account::RequestBuilder {
17902            list_by_automation_account::RequestBuilder {
17903                client: self.0.clone(),
17904                resource_group_name: resource_group_name.into(),
17905                automation_account_name: automation_account_name.into(),
17906                subscription_id: subscription_id.into(),
17907                filter: None,
17908            }
17909        }
17910    }
17911    pub mod get {
17912        use super::models;
17913        #[cfg(not(target_arch = "wasm32"))]
17914        use futures::future::BoxFuture;
17915        #[cfg(target_arch = "wasm32")]
17916        use futures::future::LocalBoxFuture as BoxFuture;
17917        #[derive(Debug)]
17918        pub struct Response(azure_core::Response);
17919        impl Response {
17920            pub async fn into_body(self) -> azure_core::Result<models::Watcher> {
17921                let bytes = self.0.into_body().collect().await?;
17922                let body: models::Watcher = serde_json::from_slice(&bytes)?;
17923                Ok(body)
17924            }
17925            pub fn into_raw_response(self) -> azure_core::Response {
17926                self.0
17927            }
17928            pub fn as_raw_response(&self) -> &azure_core::Response {
17929                &self.0
17930            }
17931        }
17932        impl From<Response> for azure_core::Response {
17933            fn from(rsp: Response) -> Self {
17934                rsp.into_raw_response()
17935            }
17936        }
17937        impl AsRef<azure_core::Response> for Response {
17938            fn as_ref(&self) -> &azure_core::Response {
17939                self.as_raw_response()
17940            }
17941        }
17942        #[derive(Clone)]
17943        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
17944        #[doc = r""]
17945        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
17946        #[doc = r" parameters can be chained."]
17947        #[doc = r""]
17948        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
17949        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
17950        #[doc = r" executes the request and returns a `Result` with the parsed"]
17951        #[doc = r" response."]
17952        #[doc = r""]
17953        #[doc = r" In order to execute the request without polling the service"]
17954        #[doc = r" until the operation completes, use `.send().await` instead."]
17955        #[doc = r""]
17956        #[doc = r" If you need lower-level access to the raw response details"]
17957        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
17958        #[doc = r" can finalize the request using the"]
17959        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
17960        #[doc = r" that resolves to a lower-level [`Response`] value."]
17961        pub struct RequestBuilder {
17962            pub(crate) client: super::super::Client,
17963            pub(crate) resource_group_name: String,
17964            pub(crate) automation_account_name: String,
17965            pub(crate) watcher_name: String,
17966            pub(crate) subscription_id: String,
17967        }
17968        impl RequestBuilder {
17969            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
17970            #[doc = ""]
17971            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
17972            #[doc = "However, this function can provide more flexibility when required."]
17973            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
17974                Box::pin({
17975                    let this = self.clone();
17976                    async move {
17977                        let url = this.url()?;
17978                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
17979                        let bearer_token = this.client.bearer_token().await?;
17980                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
17981                        let req_body = azure_core::EMPTY_BODY;
17982                        req.set_body(req_body);
17983                        Ok(Response(this.client.send(&mut req).await?))
17984                    }
17985                })
17986            }
17987            fn url(&self) -> azure_core::Result<azure_core::Url> {
17988                let mut url = self.client.endpoint().clone();
17989                url.set_path(&format!(
17990                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/watchers/{}",
17991                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.watcher_name
17992                ));
17993                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
17994                if !has_api_version_already {
17995                    url.query_pairs_mut()
17996                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
17997                }
17998                Ok(url)
17999            }
18000        }
18001        impl std::future::IntoFuture for RequestBuilder {
18002            type Output = azure_core::Result<models::Watcher>;
18003            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Watcher>>;
18004            #[doc = "Returns a future that sends the request and returns the parsed response body."]
18005            #[doc = ""]
18006            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
18007            #[doc = ""]
18008            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
18009            fn into_future(self) -> Self::IntoFuture {
18010                Box::pin(async move { self.send().await?.into_body().await })
18011            }
18012        }
18013    }
18014    pub mod create_or_update {
18015        use super::models;
18016        #[cfg(not(target_arch = "wasm32"))]
18017        use futures::future::BoxFuture;
18018        #[cfg(target_arch = "wasm32")]
18019        use futures::future::LocalBoxFuture as BoxFuture;
18020        #[derive(Debug)]
18021        pub struct Response(azure_core::Response);
18022        impl Response {
18023            pub async fn into_body(self) -> azure_core::Result<models::Watcher> {
18024                let bytes = self.0.into_body().collect().await?;
18025                let body: models::Watcher = serde_json::from_slice(&bytes)?;
18026                Ok(body)
18027            }
18028            pub fn into_raw_response(self) -> azure_core::Response {
18029                self.0
18030            }
18031            pub fn as_raw_response(&self) -> &azure_core::Response {
18032                &self.0
18033            }
18034        }
18035        impl From<Response> for azure_core::Response {
18036            fn from(rsp: Response) -> Self {
18037                rsp.into_raw_response()
18038            }
18039        }
18040        impl AsRef<azure_core::Response> for Response {
18041            fn as_ref(&self) -> &azure_core::Response {
18042                self.as_raw_response()
18043            }
18044        }
18045        #[derive(Clone)]
18046        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18047        #[doc = r""]
18048        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18049        #[doc = r" parameters can be chained."]
18050        #[doc = r""]
18051        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18052        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18053        #[doc = r" executes the request and returns a `Result` with the parsed"]
18054        #[doc = r" response."]
18055        #[doc = r""]
18056        #[doc = r" In order to execute the request without polling the service"]
18057        #[doc = r" until the operation completes, use `.send().await` instead."]
18058        #[doc = r""]
18059        #[doc = r" If you need lower-level access to the raw response details"]
18060        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
18061        #[doc = r" can finalize the request using the"]
18062        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
18063        #[doc = r" that resolves to a lower-level [`Response`] value."]
18064        pub struct RequestBuilder {
18065            pub(crate) client: super::super::Client,
18066            pub(crate) resource_group_name: String,
18067            pub(crate) automation_account_name: String,
18068            pub(crate) watcher_name: String,
18069            pub(crate) parameters: models::Watcher,
18070            pub(crate) subscription_id: String,
18071        }
18072        impl RequestBuilder {
18073            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
18074            #[doc = ""]
18075            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
18076            #[doc = "However, this function can provide more flexibility when required."]
18077            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
18078                Box::pin({
18079                    let this = self.clone();
18080                    async move {
18081                        let url = this.url()?;
18082                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
18083                        let bearer_token = this.client.bearer_token().await?;
18084                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18085                        req.insert_header("content-type", "application/json");
18086                        let req_body = azure_core::to_json(&this.parameters)?;
18087                        req.set_body(req_body);
18088                        Ok(Response(this.client.send(&mut req).await?))
18089                    }
18090                })
18091            }
18092            fn url(&self) -> azure_core::Result<azure_core::Url> {
18093                let mut url = self.client.endpoint().clone();
18094                url.set_path(&format!(
18095                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/watchers/{}",
18096                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.watcher_name
18097                ));
18098                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18099                if !has_api_version_already {
18100                    url.query_pairs_mut()
18101                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
18102                }
18103                Ok(url)
18104            }
18105        }
18106        impl std::future::IntoFuture for RequestBuilder {
18107            type Output = azure_core::Result<models::Watcher>;
18108            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Watcher>>;
18109            #[doc = "Returns a future that sends the request and returns the parsed response body."]
18110            #[doc = ""]
18111            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
18112            #[doc = ""]
18113            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
18114            fn into_future(self) -> Self::IntoFuture {
18115                Box::pin(async move { self.send().await?.into_body().await })
18116            }
18117        }
18118    }
18119    pub mod update {
18120        use super::models;
18121        #[cfg(not(target_arch = "wasm32"))]
18122        use futures::future::BoxFuture;
18123        #[cfg(target_arch = "wasm32")]
18124        use futures::future::LocalBoxFuture as BoxFuture;
18125        #[derive(Debug)]
18126        pub struct Response(azure_core::Response);
18127        impl Response {
18128            pub async fn into_body(self) -> azure_core::Result<models::Watcher> {
18129                let bytes = self.0.into_body().collect().await?;
18130                let body: models::Watcher = serde_json::from_slice(&bytes)?;
18131                Ok(body)
18132            }
18133            pub fn into_raw_response(self) -> azure_core::Response {
18134                self.0
18135            }
18136            pub fn as_raw_response(&self) -> &azure_core::Response {
18137                &self.0
18138            }
18139        }
18140        impl From<Response> for azure_core::Response {
18141            fn from(rsp: Response) -> Self {
18142                rsp.into_raw_response()
18143            }
18144        }
18145        impl AsRef<azure_core::Response> for Response {
18146            fn as_ref(&self) -> &azure_core::Response {
18147                self.as_raw_response()
18148            }
18149        }
18150        #[derive(Clone)]
18151        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18152        #[doc = r""]
18153        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18154        #[doc = r" parameters can be chained."]
18155        #[doc = r""]
18156        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18157        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18158        #[doc = r" executes the request and returns a `Result` with the parsed"]
18159        #[doc = r" response."]
18160        #[doc = r""]
18161        #[doc = r" In order to execute the request without polling the service"]
18162        #[doc = r" until the operation completes, use `.send().await` instead."]
18163        #[doc = r""]
18164        #[doc = r" If you need lower-level access to the raw response details"]
18165        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
18166        #[doc = r" can finalize the request using the"]
18167        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
18168        #[doc = r" that resolves to a lower-level [`Response`] value."]
18169        pub struct RequestBuilder {
18170            pub(crate) client: super::super::Client,
18171            pub(crate) resource_group_name: String,
18172            pub(crate) automation_account_name: String,
18173            pub(crate) watcher_name: String,
18174            pub(crate) parameters: models::WatcherUpdateParameters,
18175            pub(crate) subscription_id: String,
18176        }
18177        impl RequestBuilder {
18178            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
18179            #[doc = ""]
18180            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
18181            #[doc = "However, this function can provide more flexibility when required."]
18182            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
18183                Box::pin({
18184                    let this = self.clone();
18185                    async move {
18186                        let url = this.url()?;
18187                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
18188                        let bearer_token = this.client.bearer_token().await?;
18189                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18190                        req.insert_header("content-type", "application/json");
18191                        let req_body = azure_core::to_json(&this.parameters)?;
18192                        req.set_body(req_body);
18193                        Ok(Response(this.client.send(&mut req).await?))
18194                    }
18195                })
18196            }
18197            fn url(&self) -> azure_core::Result<azure_core::Url> {
18198                let mut url = self.client.endpoint().clone();
18199                url.set_path(&format!(
18200                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/watchers/{}",
18201                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.watcher_name
18202                ));
18203                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18204                if !has_api_version_already {
18205                    url.query_pairs_mut()
18206                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
18207                }
18208                Ok(url)
18209            }
18210        }
18211        impl std::future::IntoFuture for RequestBuilder {
18212            type Output = azure_core::Result<models::Watcher>;
18213            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Watcher>>;
18214            #[doc = "Returns a future that sends the request and returns the parsed response body."]
18215            #[doc = ""]
18216            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
18217            #[doc = ""]
18218            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
18219            fn into_future(self) -> Self::IntoFuture {
18220                Box::pin(async move { self.send().await?.into_body().await })
18221            }
18222        }
18223    }
18224    pub mod delete {
18225        use super::models;
18226        #[cfg(not(target_arch = "wasm32"))]
18227        use futures::future::BoxFuture;
18228        #[cfg(target_arch = "wasm32")]
18229        use futures::future::LocalBoxFuture as BoxFuture;
18230        #[derive(Debug)]
18231        pub struct Response(azure_core::Response);
18232        impl Response {
18233            pub fn into_raw_response(self) -> azure_core::Response {
18234                self.0
18235            }
18236            pub fn as_raw_response(&self) -> &azure_core::Response {
18237                &self.0
18238            }
18239        }
18240        impl From<Response> for azure_core::Response {
18241            fn from(rsp: Response) -> Self {
18242                rsp.into_raw_response()
18243            }
18244        }
18245        impl AsRef<azure_core::Response> for Response {
18246            fn as_ref(&self) -> &azure_core::Response {
18247                self.as_raw_response()
18248            }
18249        }
18250        #[derive(Clone)]
18251        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18252        #[doc = r""]
18253        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18254        #[doc = r" parameters can be chained."]
18255        #[doc = r""]
18256        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18257        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18258        #[doc = r" executes the request and returns a `Result` with the parsed"]
18259        #[doc = r" response."]
18260        #[doc = r""]
18261        #[doc = r" In order to execute the request without polling the service"]
18262        #[doc = r" until the operation completes, use `.send().await` instead."]
18263        #[doc = r""]
18264        #[doc = r" If you need lower-level access to the raw response details"]
18265        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
18266        #[doc = r" can finalize the request using the"]
18267        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
18268        #[doc = r" that resolves to a lower-level [`Response`] value."]
18269        pub struct RequestBuilder {
18270            pub(crate) client: super::super::Client,
18271            pub(crate) resource_group_name: String,
18272            pub(crate) automation_account_name: String,
18273            pub(crate) watcher_name: String,
18274            pub(crate) subscription_id: String,
18275        }
18276        impl RequestBuilder {
18277            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
18278            #[doc = ""]
18279            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
18280            #[doc = "However, this function can provide more flexibility when required."]
18281            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
18282                Box::pin({
18283                    let this = self.clone();
18284                    async move {
18285                        let url = this.url()?;
18286                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
18287                        let bearer_token = this.client.bearer_token().await?;
18288                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18289                        let req_body = azure_core::EMPTY_BODY;
18290                        req.set_body(req_body);
18291                        Ok(Response(this.client.send(&mut req).await?))
18292                    }
18293                })
18294            }
18295            fn url(&self) -> azure_core::Result<azure_core::Url> {
18296                let mut url = self.client.endpoint().clone();
18297                url.set_path(&format!(
18298                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/watchers/{}",
18299                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.watcher_name
18300                ));
18301                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18302                if !has_api_version_already {
18303                    url.query_pairs_mut()
18304                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
18305                }
18306                Ok(url)
18307            }
18308        }
18309    }
18310    pub mod start {
18311        use super::models;
18312        #[cfg(not(target_arch = "wasm32"))]
18313        use futures::future::BoxFuture;
18314        #[cfg(target_arch = "wasm32")]
18315        use futures::future::LocalBoxFuture as BoxFuture;
18316        #[derive(Debug)]
18317        pub struct Response(azure_core::Response);
18318        impl Response {
18319            pub fn into_raw_response(self) -> azure_core::Response {
18320                self.0
18321            }
18322            pub fn as_raw_response(&self) -> &azure_core::Response {
18323                &self.0
18324            }
18325        }
18326        impl From<Response> for azure_core::Response {
18327            fn from(rsp: Response) -> Self {
18328                rsp.into_raw_response()
18329            }
18330        }
18331        impl AsRef<azure_core::Response> for Response {
18332            fn as_ref(&self) -> &azure_core::Response {
18333                self.as_raw_response()
18334            }
18335        }
18336        #[derive(Clone)]
18337        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18338        #[doc = r""]
18339        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18340        #[doc = r" parameters can be chained."]
18341        #[doc = r""]
18342        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18343        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18344        #[doc = r" executes the request and returns a `Result` with the parsed"]
18345        #[doc = r" response."]
18346        #[doc = r""]
18347        #[doc = r" In order to execute the request without polling the service"]
18348        #[doc = r" until the operation completes, use `.send().await` instead."]
18349        #[doc = r""]
18350        #[doc = r" If you need lower-level access to the raw response details"]
18351        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
18352        #[doc = r" can finalize the request using the"]
18353        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
18354        #[doc = r" that resolves to a lower-level [`Response`] value."]
18355        pub struct RequestBuilder {
18356            pub(crate) client: super::super::Client,
18357            pub(crate) resource_group_name: String,
18358            pub(crate) automation_account_name: String,
18359            pub(crate) watcher_name: String,
18360            pub(crate) subscription_id: String,
18361        }
18362        impl RequestBuilder {
18363            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
18364            #[doc = ""]
18365            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
18366            #[doc = "However, this function can provide more flexibility when required."]
18367            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
18368                Box::pin({
18369                    let this = self.clone();
18370                    async move {
18371                        let url = this.url()?;
18372                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
18373                        let bearer_token = this.client.bearer_token().await?;
18374                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18375                        let req_body = azure_core::EMPTY_BODY;
18376                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
18377                        req.set_body(req_body);
18378                        Ok(Response(this.client.send(&mut req).await?))
18379                    }
18380                })
18381            }
18382            fn url(&self) -> azure_core::Result<azure_core::Url> {
18383                let mut url = self.client.endpoint().clone();
18384                url.set_path(&format!(
18385                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/watchers/{}/start",
18386                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.watcher_name
18387                ));
18388                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18389                if !has_api_version_already {
18390                    url.query_pairs_mut()
18391                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
18392                }
18393                Ok(url)
18394            }
18395        }
18396    }
18397    pub mod stop {
18398        use super::models;
18399        #[cfg(not(target_arch = "wasm32"))]
18400        use futures::future::BoxFuture;
18401        #[cfg(target_arch = "wasm32")]
18402        use futures::future::LocalBoxFuture as BoxFuture;
18403        #[derive(Debug)]
18404        pub struct Response(azure_core::Response);
18405        impl Response {
18406            pub fn into_raw_response(self) -> azure_core::Response {
18407                self.0
18408            }
18409            pub fn as_raw_response(&self) -> &azure_core::Response {
18410                &self.0
18411            }
18412        }
18413        impl From<Response> for azure_core::Response {
18414            fn from(rsp: Response) -> Self {
18415                rsp.into_raw_response()
18416            }
18417        }
18418        impl AsRef<azure_core::Response> for Response {
18419            fn as_ref(&self) -> &azure_core::Response {
18420                self.as_raw_response()
18421            }
18422        }
18423        #[derive(Clone)]
18424        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18425        #[doc = r""]
18426        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18427        #[doc = r" parameters can be chained."]
18428        #[doc = r""]
18429        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18430        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18431        #[doc = r" executes the request and returns a `Result` with the parsed"]
18432        #[doc = r" response."]
18433        #[doc = r""]
18434        #[doc = r" In order to execute the request without polling the service"]
18435        #[doc = r" until the operation completes, use `.send().await` instead."]
18436        #[doc = r""]
18437        #[doc = r" If you need lower-level access to the raw response details"]
18438        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
18439        #[doc = r" can finalize the request using the"]
18440        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
18441        #[doc = r" that resolves to a lower-level [`Response`] value."]
18442        pub struct RequestBuilder {
18443            pub(crate) client: super::super::Client,
18444            pub(crate) resource_group_name: String,
18445            pub(crate) automation_account_name: String,
18446            pub(crate) watcher_name: String,
18447            pub(crate) subscription_id: String,
18448        }
18449        impl RequestBuilder {
18450            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
18451            #[doc = ""]
18452            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
18453            #[doc = "However, this function can provide more flexibility when required."]
18454            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
18455                Box::pin({
18456                    let this = self.clone();
18457                    async move {
18458                        let url = this.url()?;
18459                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
18460                        let bearer_token = this.client.bearer_token().await?;
18461                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18462                        let req_body = azure_core::EMPTY_BODY;
18463                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
18464                        req.set_body(req_body);
18465                        Ok(Response(this.client.send(&mut req).await?))
18466                    }
18467                })
18468            }
18469            fn url(&self) -> azure_core::Result<azure_core::Url> {
18470                let mut url = self.client.endpoint().clone();
18471                url.set_path(&format!(
18472                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/watchers/{}/stop",
18473                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.watcher_name
18474                ));
18475                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18476                if !has_api_version_already {
18477                    url.query_pairs_mut()
18478                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
18479                }
18480                Ok(url)
18481            }
18482        }
18483    }
18484    pub mod list_by_automation_account {
18485        use super::models;
18486        #[cfg(not(target_arch = "wasm32"))]
18487        use futures::future::BoxFuture;
18488        #[cfg(target_arch = "wasm32")]
18489        use futures::future::LocalBoxFuture as BoxFuture;
18490        #[derive(Debug)]
18491        pub struct Response(azure_core::Response);
18492        impl Response {
18493            pub async fn into_body(self) -> azure_core::Result<models::WatcherListResult> {
18494                let bytes = self.0.into_body().collect().await?;
18495                let body: models::WatcherListResult = serde_json::from_slice(&bytes)?;
18496                Ok(body)
18497            }
18498            pub fn into_raw_response(self) -> azure_core::Response {
18499                self.0
18500            }
18501            pub fn as_raw_response(&self) -> &azure_core::Response {
18502                &self.0
18503            }
18504        }
18505        impl From<Response> for azure_core::Response {
18506            fn from(rsp: Response) -> Self {
18507                rsp.into_raw_response()
18508            }
18509        }
18510        impl AsRef<azure_core::Response> for Response {
18511            fn as_ref(&self) -> &azure_core::Response {
18512                self.as_raw_response()
18513            }
18514        }
18515        #[derive(Clone)]
18516        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18517        #[doc = r""]
18518        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18519        #[doc = r" parameters can be chained."]
18520        #[doc = r""]
18521        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18522        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18523        #[doc = r" executes the request and returns a `Result` with the parsed"]
18524        #[doc = r" response."]
18525        #[doc = r""]
18526        #[doc = r" In order to execute the request without polling the service"]
18527        #[doc = r" until the operation completes, use `.send().await` instead."]
18528        #[doc = r""]
18529        #[doc = r" If you need lower-level access to the raw response details"]
18530        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
18531        #[doc = r" can finalize the request using the"]
18532        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
18533        #[doc = r" that resolves to a lower-level [`Response`] value."]
18534        pub struct RequestBuilder {
18535            pub(crate) client: super::super::Client,
18536            pub(crate) resource_group_name: String,
18537            pub(crate) automation_account_name: String,
18538            pub(crate) subscription_id: String,
18539            pub(crate) filter: Option<String>,
18540        }
18541        impl RequestBuilder {
18542            #[doc = "The filter to apply on the operation."]
18543            pub fn filter(mut self, filter: impl Into<String>) -> Self {
18544                self.filter = Some(filter.into());
18545                self
18546            }
18547            pub fn into_stream(self) -> azure_core::Pageable<models::WatcherListResult, azure_core::error::Error> {
18548                let make_request = move |continuation: Option<String>| {
18549                    let this = self.clone();
18550                    async move {
18551                        let mut url = this.url()?;
18552                        let rsp = match continuation {
18553                            Some(value) => {
18554                                url.set_path("");
18555                                url = url.join(&value)?;
18556                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
18557                                let bearer_token = this.client.bearer_token().await?;
18558                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18559                                let has_api_version_already =
18560                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18561                                if !has_api_version_already {
18562                                    req.url_mut()
18563                                        .query_pairs_mut()
18564                                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
18565                                }
18566                                let req_body = azure_core::EMPTY_BODY;
18567                                req.set_body(req_body);
18568                                this.client.send(&mut req).await?
18569                            }
18570                            None => {
18571                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
18572                                let bearer_token = this.client.bearer_token().await?;
18573                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18574                                if let Some(filter) = &this.filter {
18575                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
18576                                }
18577                                let req_body = azure_core::EMPTY_BODY;
18578                                req.set_body(req_body);
18579                                this.client.send(&mut req).await?
18580                            }
18581                        };
18582                        let rsp = match rsp.status() {
18583                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
18584                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
18585                                status: status_code,
18586                                error_code: None,
18587                            })),
18588                        };
18589                        rsp?.into_body().await
18590                    }
18591                };
18592                azure_core::Pageable::new(make_request)
18593            }
18594            fn url(&self) -> azure_core::Result<azure_core::Url> {
18595                let mut url = self.client.endpoint().clone();
18596                url.set_path(&format!(
18597                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/watchers",
18598                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
18599                ));
18600                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18601                if !has_api_version_already {
18602                    url.query_pairs_mut()
18603                        .append_pair(azure_core::query_param::API_VERSION, "2019-06-01");
18604                }
18605                Ok(url)
18606            }
18607        }
18608    }
18609}
18610pub mod webhook {
18611    use super::models;
18612    #[cfg(not(target_arch = "wasm32"))]
18613    use futures::future::BoxFuture;
18614    #[cfg(target_arch = "wasm32")]
18615    use futures::future::LocalBoxFuture as BoxFuture;
18616    pub struct Client(pub(crate) super::Client);
18617    impl Client {
18618        #[doc = "Generates a Uri for use in creating a webhook."]
18619        #[doc = ""]
18620        #[doc = "Arguments:"]
18621        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
18622        #[doc = "* `automation_account_name`: The name of the automation account."]
18623        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
18624        pub fn generate_uri(
18625            &self,
18626            resource_group_name: impl Into<String>,
18627            automation_account_name: impl Into<String>,
18628            subscription_id: impl Into<String>,
18629        ) -> generate_uri::RequestBuilder {
18630            generate_uri::RequestBuilder {
18631                client: self.0.clone(),
18632                resource_group_name: resource_group_name.into(),
18633                automation_account_name: automation_account_name.into(),
18634                subscription_id: subscription_id.into(),
18635            }
18636        }
18637        #[doc = "Retrieve the webhook identified by webhook name."]
18638        #[doc = ""]
18639        #[doc = "Arguments:"]
18640        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
18641        #[doc = "* `automation_account_name`: The name of the automation account."]
18642        #[doc = "* `webhook_name`: The webhook name."]
18643        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
18644        pub fn get(
18645            &self,
18646            resource_group_name: impl Into<String>,
18647            automation_account_name: impl Into<String>,
18648            webhook_name: impl Into<String>,
18649            subscription_id: impl Into<String>,
18650        ) -> get::RequestBuilder {
18651            get::RequestBuilder {
18652                client: self.0.clone(),
18653                resource_group_name: resource_group_name.into(),
18654                automation_account_name: automation_account_name.into(),
18655                webhook_name: webhook_name.into(),
18656                subscription_id: subscription_id.into(),
18657            }
18658        }
18659        #[doc = "Create the webhook identified by webhook name."]
18660        #[doc = ""]
18661        #[doc = "Arguments:"]
18662        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
18663        #[doc = "* `automation_account_name`: The name of the automation account."]
18664        #[doc = "* `webhook_name`: The webhook name."]
18665        #[doc = "* `parameters`: The create or update parameters for webhook."]
18666        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
18667        pub fn create_or_update(
18668            &self,
18669            resource_group_name: impl Into<String>,
18670            automation_account_name: impl Into<String>,
18671            webhook_name: impl Into<String>,
18672            parameters: impl Into<models::WebhookCreateOrUpdateParameters>,
18673            subscription_id: impl Into<String>,
18674        ) -> create_or_update::RequestBuilder {
18675            create_or_update::RequestBuilder {
18676                client: self.0.clone(),
18677                resource_group_name: resource_group_name.into(),
18678                automation_account_name: automation_account_name.into(),
18679                webhook_name: webhook_name.into(),
18680                parameters: parameters.into(),
18681                subscription_id: subscription_id.into(),
18682            }
18683        }
18684        #[doc = "Update the webhook identified by webhook name."]
18685        #[doc = ""]
18686        #[doc = "Arguments:"]
18687        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
18688        #[doc = "* `automation_account_name`: The name of the automation account."]
18689        #[doc = "* `webhook_name`: The webhook name."]
18690        #[doc = "* `parameters`: The update parameters for webhook."]
18691        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
18692        pub fn update(
18693            &self,
18694            resource_group_name: impl Into<String>,
18695            automation_account_name: impl Into<String>,
18696            webhook_name: impl Into<String>,
18697            parameters: impl Into<models::WebhookUpdateParameters>,
18698            subscription_id: impl Into<String>,
18699        ) -> update::RequestBuilder {
18700            update::RequestBuilder {
18701                client: self.0.clone(),
18702                resource_group_name: resource_group_name.into(),
18703                automation_account_name: automation_account_name.into(),
18704                webhook_name: webhook_name.into(),
18705                parameters: parameters.into(),
18706                subscription_id: subscription_id.into(),
18707            }
18708        }
18709        #[doc = "Delete the webhook by name."]
18710        #[doc = ""]
18711        #[doc = "Arguments:"]
18712        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
18713        #[doc = "* `automation_account_name`: The name of the automation account."]
18714        #[doc = "* `webhook_name`: The webhook name."]
18715        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
18716        pub fn delete(
18717            &self,
18718            resource_group_name: impl Into<String>,
18719            automation_account_name: impl Into<String>,
18720            webhook_name: impl Into<String>,
18721            subscription_id: impl Into<String>,
18722        ) -> delete::RequestBuilder {
18723            delete::RequestBuilder {
18724                client: self.0.clone(),
18725                resource_group_name: resource_group_name.into(),
18726                automation_account_name: automation_account_name.into(),
18727                webhook_name: webhook_name.into(),
18728                subscription_id: subscription_id.into(),
18729            }
18730        }
18731        #[doc = "Retrieve a list of webhooks."]
18732        #[doc = ""]
18733        #[doc = "Arguments:"]
18734        #[doc = "* `resource_group_name`: Name of an Azure Resource group."]
18735        #[doc = "* `automation_account_name`: The name of the automation account."]
18736        #[doc = "* `subscription_id`: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."]
18737        pub fn list_by_automation_account(
18738            &self,
18739            resource_group_name: impl Into<String>,
18740            automation_account_name: impl Into<String>,
18741            subscription_id: impl Into<String>,
18742        ) -> list_by_automation_account::RequestBuilder {
18743            list_by_automation_account::RequestBuilder {
18744                client: self.0.clone(),
18745                resource_group_name: resource_group_name.into(),
18746                automation_account_name: automation_account_name.into(),
18747                subscription_id: subscription_id.into(),
18748                filter: None,
18749            }
18750        }
18751    }
18752    pub mod generate_uri {
18753        use super::models;
18754        #[cfg(not(target_arch = "wasm32"))]
18755        use futures::future::BoxFuture;
18756        #[cfg(target_arch = "wasm32")]
18757        use futures::future::LocalBoxFuture as BoxFuture;
18758        #[derive(Debug)]
18759        pub struct Response(azure_core::Response);
18760        impl Response {
18761            pub async fn into_body(self) -> azure_core::Result<String> {
18762                let bytes = self.0.into_body().collect().await?;
18763                let body: String = serde_json::from_slice(&bytes)?;
18764                Ok(body)
18765            }
18766            pub fn into_raw_response(self) -> azure_core::Response {
18767                self.0
18768            }
18769            pub fn as_raw_response(&self) -> &azure_core::Response {
18770                &self.0
18771            }
18772        }
18773        impl From<Response> for azure_core::Response {
18774            fn from(rsp: Response) -> Self {
18775                rsp.into_raw_response()
18776            }
18777        }
18778        impl AsRef<azure_core::Response> for Response {
18779            fn as_ref(&self) -> &azure_core::Response {
18780                self.as_raw_response()
18781            }
18782        }
18783        #[derive(Clone)]
18784        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18785        #[doc = r""]
18786        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18787        #[doc = r" parameters can be chained."]
18788        #[doc = r""]
18789        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18790        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18791        #[doc = r" executes the request and returns a `Result` with the parsed"]
18792        #[doc = r" response."]
18793        #[doc = r""]
18794        #[doc = r" In order to execute the request without polling the service"]
18795        #[doc = r" until the operation completes, use `.send().await` instead."]
18796        #[doc = r""]
18797        #[doc = r" If you need lower-level access to the raw response details"]
18798        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
18799        #[doc = r" can finalize the request using the"]
18800        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
18801        #[doc = r" that resolves to a lower-level [`Response`] value."]
18802        pub struct RequestBuilder {
18803            pub(crate) client: super::super::Client,
18804            pub(crate) resource_group_name: String,
18805            pub(crate) automation_account_name: String,
18806            pub(crate) subscription_id: String,
18807        }
18808        impl RequestBuilder {
18809            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
18810            #[doc = ""]
18811            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
18812            #[doc = "However, this function can provide more flexibility when required."]
18813            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
18814                Box::pin({
18815                    let this = self.clone();
18816                    async move {
18817                        let url = this.url()?;
18818                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
18819                        let bearer_token = this.client.bearer_token().await?;
18820                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18821                        let req_body = azure_core::EMPTY_BODY;
18822                        req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
18823                        req.set_body(req_body);
18824                        Ok(Response(this.client.send(&mut req).await?))
18825                    }
18826                })
18827            }
18828            fn url(&self) -> azure_core::Result<azure_core::Url> {
18829                let mut url = self.client.endpoint().clone();
18830                url.set_path(&format!(
18831                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/webhooks/generateUri",
18832                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
18833                ));
18834                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18835                if !has_api_version_already {
18836                    url.query_pairs_mut()
18837                        .append_pair(azure_core::query_param::API_VERSION, "2015-10-31");
18838                }
18839                Ok(url)
18840            }
18841        }
18842        impl std::future::IntoFuture for RequestBuilder {
18843            type Output = azure_core::Result<String>;
18844            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
18845            #[doc = "Returns a future that sends the request and returns the parsed response body."]
18846            #[doc = ""]
18847            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
18848            #[doc = ""]
18849            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
18850            fn into_future(self) -> Self::IntoFuture {
18851                Box::pin(async move { self.send().await?.into_body().await })
18852            }
18853        }
18854    }
18855    pub mod get {
18856        use super::models;
18857        #[cfg(not(target_arch = "wasm32"))]
18858        use futures::future::BoxFuture;
18859        #[cfg(target_arch = "wasm32")]
18860        use futures::future::LocalBoxFuture as BoxFuture;
18861        #[derive(Debug)]
18862        pub struct Response(azure_core::Response);
18863        impl Response {
18864            pub async fn into_body(self) -> azure_core::Result<models::Webhook> {
18865                let bytes = self.0.into_body().collect().await?;
18866                let body: models::Webhook = serde_json::from_slice(&bytes)?;
18867                Ok(body)
18868            }
18869            pub fn into_raw_response(self) -> azure_core::Response {
18870                self.0
18871            }
18872            pub fn as_raw_response(&self) -> &azure_core::Response {
18873                &self.0
18874            }
18875        }
18876        impl From<Response> for azure_core::Response {
18877            fn from(rsp: Response) -> Self {
18878                rsp.into_raw_response()
18879            }
18880        }
18881        impl AsRef<azure_core::Response> for Response {
18882            fn as_ref(&self) -> &azure_core::Response {
18883                self.as_raw_response()
18884            }
18885        }
18886        #[derive(Clone)]
18887        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18888        #[doc = r""]
18889        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18890        #[doc = r" parameters can be chained."]
18891        #[doc = r""]
18892        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18893        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18894        #[doc = r" executes the request and returns a `Result` with the parsed"]
18895        #[doc = r" response."]
18896        #[doc = r""]
18897        #[doc = r" In order to execute the request without polling the service"]
18898        #[doc = r" until the operation completes, use `.send().await` instead."]
18899        #[doc = r""]
18900        #[doc = r" If you need lower-level access to the raw response details"]
18901        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
18902        #[doc = r" can finalize the request using the"]
18903        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
18904        #[doc = r" that resolves to a lower-level [`Response`] value."]
18905        pub struct RequestBuilder {
18906            pub(crate) client: super::super::Client,
18907            pub(crate) resource_group_name: String,
18908            pub(crate) automation_account_name: String,
18909            pub(crate) webhook_name: String,
18910            pub(crate) subscription_id: String,
18911        }
18912        impl RequestBuilder {
18913            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
18914            #[doc = ""]
18915            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
18916            #[doc = "However, this function can provide more flexibility when required."]
18917            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
18918                Box::pin({
18919                    let this = self.clone();
18920                    async move {
18921                        let url = this.url()?;
18922                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
18923                        let bearer_token = this.client.bearer_token().await?;
18924                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
18925                        let req_body = azure_core::EMPTY_BODY;
18926                        req.set_body(req_body);
18927                        Ok(Response(this.client.send(&mut req).await?))
18928                    }
18929                })
18930            }
18931            fn url(&self) -> azure_core::Result<azure_core::Url> {
18932                let mut url = self.client.endpoint().clone();
18933                url.set_path(&format!(
18934                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/webhooks/{}",
18935                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.webhook_name
18936                ));
18937                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
18938                if !has_api_version_already {
18939                    url.query_pairs_mut()
18940                        .append_pair(azure_core::query_param::API_VERSION, "2015-10-31");
18941                }
18942                Ok(url)
18943            }
18944        }
18945        impl std::future::IntoFuture for RequestBuilder {
18946            type Output = azure_core::Result<models::Webhook>;
18947            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Webhook>>;
18948            #[doc = "Returns a future that sends the request and returns the parsed response body."]
18949            #[doc = ""]
18950            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
18951            #[doc = ""]
18952            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
18953            fn into_future(self) -> Self::IntoFuture {
18954                Box::pin(async move { self.send().await?.into_body().await })
18955            }
18956        }
18957    }
18958    pub mod create_or_update {
18959        use super::models;
18960        #[cfg(not(target_arch = "wasm32"))]
18961        use futures::future::BoxFuture;
18962        #[cfg(target_arch = "wasm32")]
18963        use futures::future::LocalBoxFuture as BoxFuture;
18964        #[derive(Debug)]
18965        pub struct Response(azure_core::Response);
18966        impl Response {
18967            pub async fn into_body(self) -> azure_core::Result<models::Webhook> {
18968                let bytes = self.0.into_body().collect().await?;
18969                let body: models::Webhook = serde_json::from_slice(&bytes)?;
18970                Ok(body)
18971            }
18972            pub fn into_raw_response(self) -> azure_core::Response {
18973                self.0
18974            }
18975            pub fn as_raw_response(&self) -> &azure_core::Response {
18976                &self.0
18977            }
18978        }
18979        impl From<Response> for azure_core::Response {
18980            fn from(rsp: Response) -> Self {
18981                rsp.into_raw_response()
18982            }
18983        }
18984        impl AsRef<azure_core::Response> for Response {
18985            fn as_ref(&self) -> &azure_core::Response {
18986                self.as_raw_response()
18987            }
18988        }
18989        #[derive(Clone)]
18990        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
18991        #[doc = r""]
18992        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
18993        #[doc = r" parameters can be chained."]
18994        #[doc = r""]
18995        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
18996        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
18997        #[doc = r" executes the request and returns a `Result` with the parsed"]
18998        #[doc = r" response."]
18999        #[doc = r""]
19000        #[doc = r" In order to execute the request without polling the service"]
19001        #[doc = r" until the operation completes, use `.send().await` instead."]
19002        #[doc = r""]
19003        #[doc = r" If you need lower-level access to the raw response details"]
19004        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
19005        #[doc = r" can finalize the request using the"]
19006        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
19007        #[doc = r" that resolves to a lower-level [`Response`] value."]
19008        pub struct RequestBuilder {
19009            pub(crate) client: super::super::Client,
19010            pub(crate) resource_group_name: String,
19011            pub(crate) automation_account_name: String,
19012            pub(crate) webhook_name: String,
19013            pub(crate) parameters: models::WebhookCreateOrUpdateParameters,
19014            pub(crate) subscription_id: String,
19015        }
19016        impl RequestBuilder {
19017            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
19018            #[doc = ""]
19019            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
19020            #[doc = "However, this function can provide more flexibility when required."]
19021            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
19022                Box::pin({
19023                    let this = self.clone();
19024                    async move {
19025                        let url = this.url()?;
19026                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
19027                        let bearer_token = this.client.bearer_token().await?;
19028                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
19029                        req.insert_header("content-type", "application/json");
19030                        let req_body = azure_core::to_json(&this.parameters)?;
19031                        req.set_body(req_body);
19032                        Ok(Response(this.client.send(&mut req).await?))
19033                    }
19034                })
19035            }
19036            fn url(&self) -> azure_core::Result<azure_core::Url> {
19037                let mut url = self.client.endpoint().clone();
19038                url.set_path(&format!(
19039                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/webhooks/{}",
19040                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.webhook_name
19041                ));
19042                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
19043                if !has_api_version_already {
19044                    url.query_pairs_mut()
19045                        .append_pair(azure_core::query_param::API_VERSION, "2015-10-31");
19046                }
19047                Ok(url)
19048            }
19049        }
19050        impl std::future::IntoFuture for RequestBuilder {
19051            type Output = azure_core::Result<models::Webhook>;
19052            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Webhook>>;
19053            #[doc = "Returns a future that sends the request and returns the parsed response body."]
19054            #[doc = ""]
19055            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
19056            #[doc = ""]
19057            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
19058            fn into_future(self) -> Self::IntoFuture {
19059                Box::pin(async move { self.send().await?.into_body().await })
19060            }
19061        }
19062    }
19063    pub mod update {
19064        use super::models;
19065        #[cfg(not(target_arch = "wasm32"))]
19066        use futures::future::BoxFuture;
19067        #[cfg(target_arch = "wasm32")]
19068        use futures::future::LocalBoxFuture as BoxFuture;
19069        #[derive(Debug)]
19070        pub struct Response(azure_core::Response);
19071        impl Response {
19072            pub async fn into_body(self) -> azure_core::Result<models::Webhook> {
19073                let bytes = self.0.into_body().collect().await?;
19074                let body: models::Webhook = serde_json::from_slice(&bytes)?;
19075                Ok(body)
19076            }
19077            pub fn into_raw_response(self) -> azure_core::Response {
19078                self.0
19079            }
19080            pub fn as_raw_response(&self) -> &azure_core::Response {
19081                &self.0
19082            }
19083        }
19084        impl From<Response> for azure_core::Response {
19085            fn from(rsp: Response) -> Self {
19086                rsp.into_raw_response()
19087            }
19088        }
19089        impl AsRef<azure_core::Response> for Response {
19090            fn as_ref(&self) -> &azure_core::Response {
19091                self.as_raw_response()
19092            }
19093        }
19094        #[derive(Clone)]
19095        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
19096        #[doc = r""]
19097        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
19098        #[doc = r" parameters can be chained."]
19099        #[doc = r""]
19100        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
19101        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
19102        #[doc = r" executes the request and returns a `Result` with the parsed"]
19103        #[doc = r" response."]
19104        #[doc = r""]
19105        #[doc = r" In order to execute the request without polling the service"]
19106        #[doc = r" until the operation completes, use `.send().await` instead."]
19107        #[doc = r""]
19108        #[doc = r" If you need lower-level access to the raw response details"]
19109        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
19110        #[doc = r" can finalize the request using the"]
19111        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
19112        #[doc = r" that resolves to a lower-level [`Response`] value."]
19113        pub struct RequestBuilder {
19114            pub(crate) client: super::super::Client,
19115            pub(crate) resource_group_name: String,
19116            pub(crate) automation_account_name: String,
19117            pub(crate) webhook_name: String,
19118            pub(crate) parameters: models::WebhookUpdateParameters,
19119            pub(crate) subscription_id: String,
19120        }
19121        impl RequestBuilder {
19122            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
19123            #[doc = ""]
19124            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
19125            #[doc = "However, this function can provide more flexibility when required."]
19126            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
19127                Box::pin({
19128                    let this = self.clone();
19129                    async move {
19130                        let url = this.url()?;
19131                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
19132                        let bearer_token = this.client.bearer_token().await?;
19133                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
19134                        req.insert_header("content-type", "application/json");
19135                        let req_body = azure_core::to_json(&this.parameters)?;
19136                        req.set_body(req_body);
19137                        Ok(Response(this.client.send(&mut req).await?))
19138                    }
19139                })
19140            }
19141            fn url(&self) -> azure_core::Result<azure_core::Url> {
19142                let mut url = self.client.endpoint().clone();
19143                url.set_path(&format!(
19144                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/webhooks/{}",
19145                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.webhook_name
19146                ));
19147                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
19148                if !has_api_version_already {
19149                    url.query_pairs_mut()
19150                        .append_pair(azure_core::query_param::API_VERSION, "2015-10-31");
19151                }
19152                Ok(url)
19153            }
19154        }
19155        impl std::future::IntoFuture for RequestBuilder {
19156            type Output = azure_core::Result<models::Webhook>;
19157            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Webhook>>;
19158            #[doc = "Returns a future that sends the request and returns the parsed response body."]
19159            #[doc = ""]
19160            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
19161            #[doc = ""]
19162            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
19163            fn into_future(self) -> Self::IntoFuture {
19164                Box::pin(async move { self.send().await?.into_body().await })
19165            }
19166        }
19167    }
19168    pub mod delete {
19169        use super::models;
19170        #[cfg(not(target_arch = "wasm32"))]
19171        use futures::future::BoxFuture;
19172        #[cfg(target_arch = "wasm32")]
19173        use futures::future::LocalBoxFuture as BoxFuture;
19174        #[derive(Debug)]
19175        pub struct Response(azure_core::Response);
19176        impl Response {
19177            pub fn into_raw_response(self) -> azure_core::Response {
19178                self.0
19179            }
19180            pub fn as_raw_response(&self) -> &azure_core::Response {
19181                &self.0
19182            }
19183        }
19184        impl From<Response> for azure_core::Response {
19185            fn from(rsp: Response) -> Self {
19186                rsp.into_raw_response()
19187            }
19188        }
19189        impl AsRef<azure_core::Response> for Response {
19190            fn as_ref(&self) -> &azure_core::Response {
19191                self.as_raw_response()
19192            }
19193        }
19194        #[derive(Clone)]
19195        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
19196        #[doc = r""]
19197        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
19198        #[doc = r" parameters can be chained."]
19199        #[doc = r""]
19200        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
19201        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
19202        #[doc = r" executes the request and returns a `Result` with the parsed"]
19203        #[doc = r" response."]
19204        #[doc = r""]
19205        #[doc = r" In order to execute the request without polling the service"]
19206        #[doc = r" until the operation completes, use `.send().await` instead."]
19207        #[doc = r""]
19208        #[doc = r" If you need lower-level access to the raw response details"]
19209        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
19210        #[doc = r" can finalize the request using the"]
19211        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
19212        #[doc = r" that resolves to a lower-level [`Response`] value."]
19213        pub struct RequestBuilder {
19214            pub(crate) client: super::super::Client,
19215            pub(crate) resource_group_name: String,
19216            pub(crate) automation_account_name: String,
19217            pub(crate) webhook_name: String,
19218            pub(crate) subscription_id: String,
19219        }
19220        impl RequestBuilder {
19221            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
19222            #[doc = ""]
19223            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
19224            #[doc = "However, this function can provide more flexibility when required."]
19225            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
19226                Box::pin({
19227                    let this = self.clone();
19228                    async move {
19229                        let url = this.url()?;
19230                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
19231                        let bearer_token = this.client.bearer_token().await?;
19232                        req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
19233                        let req_body = azure_core::EMPTY_BODY;
19234                        req.set_body(req_body);
19235                        Ok(Response(this.client.send(&mut req).await?))
19236                    }
19237                })
19238            }
19239            fn url(&self) -> azure_core::Result<azure_core::Url> {
19240                let mut url = self.client.endpoint().clone();
19241                url.set_path(&format!(
19242                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/webhooks/{}",
19243                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name, &self.webhook_name
19244                ));
19245                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
19246                if !has_api_version_already {
19247                    url.query_pairs_mut()
19248                        .append_pair(azure_core::query_param::API_VERSION, "2015-10-31");
19249                }
19250                Ok(url)
19251            }
19252        }
19253    }
19254    pub mod list_by_automation_account {
19255        use super::models;
19256        #[cfg(not(target_arch = "wasm32"))]
19257        use futures::future::BoxFuture;
19258        #[cfg(target_arch = "wasm32")]
19259        use futures::future::LocalBoxFuture as BoxFuture;
19260        #[derive(Debug)]
19261        pub struct Response(azure_core::Response);
19262        impl Response {
19263            pub async fn into_body(self) -> azure_core::Result<models::WebhookListResult> {
19264                let bytes = self.0.into_body().collect().await?;
19265                let body: models::WebhookListResult = serde_json::from_slice(&bytes)?;
19266                Ok(body)
19267            }
19268            pub fn into_raw_response(self) -> azure_core::Response {
19269                self.0
19270            }
19271            pub fn as_raw_response(&self) -> &azure_core::Response {
19272                &self.0
19273            }
19274        }
19275        impl From<Response> for azure_core::Response {
19276            fn from(rsp: Response) -> Self {
19277                rsp.into_raw_response()
19278            }
19279        }
19280        impl AsRef<azure_core::Response> for Response {
19281            fn as_ref(&self) -> &azure_core::Response {
19282                self.as_raw_response()
19283            }
19284        }
19285        #[derive(Clone)]
19286        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
19287        #[doc = r""]
19288        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
19289        #[doc = r" parameters can be chained."]
19290        #[doc = r""]
19291        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
19292        #[doc = r" which will convert the [`RequestBuilder`] into a future"]
19293        #[doc = r" executes the request and returns a `Result` with the parsed"]
19294        #[doc = r" response."]
19295        #[doc = r""]
19296        #[doc = r" In order to execute the request without polling the service"]
19297        #[doc = r" until the operation completes, use `.send().await` instead."]
19298        #[doc = r""]
19299        #[doc = r" If you need lower-level access to the raw response details"]
19300        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
19301        #[doc = r" can finalize the request using the"]
19302        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
19303        #[doc = r" that resolves to a lower-level [`Response`] value."]
19304        pub struct RequestBuilder {
19305            pub(crate) client: super::super::Client,
19306            pub(crate) resource_group_name: String,
19307            pub(crate) automation_account_name: String,
19308            pub(crate) subscription_id: String,
19309            pub(crate) filter: Option<String>,
19310        }
19311        impl RequestBuilder {
19312            #[doc = "The filter to apply on the operation."]
19313            pub fn filter(mut self, filter: impl Into<String>) -> Self {
19314                self.filter = Some(filter.into());
19315                self
19316            }
19317            pub fn into_stream(self) -> azure_core::Pageable<models::WebhookListResult, azure_core::error::Error> {
19318                let make_request = move |continuation: Option<String>| {
19319                    let this = self.clone();
19320                    async move {
19321                        let mut url = this.url()?;
19322                        let rsp = match continuation {
19323                            Some(value) => {
19324                                url.set_path("");
19325                                url = url.join(&value)?;
19326                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
19327                                let bearer_token = this.client.bearer_token().await?;
19328                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
19329                                let has_api_version_already =
19330                                    req.url_mut().query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
19331                                if !has_api_version_already {
19332                                    req.url_mut()
19333                                        .query_pairs_mut()
19334                                        .append_pair(azure_core::query_param::API_VERSION, "2015-10-31");
19335                                }
19336                                let req_body = azure_core::EMPTY_BODY;
19337                                req.set_body(req_body);
19338                                this.client.send(&mut req).await?
19339                            }
19340                            None => {
19341                                let mut req = azure_core::Request::new(url, azure_core::Method::Get);
19342                                let bearer_token = this.client.bearer_token().await?;
19343                                req.insert_header(azure_core::headers::AUTHORIZATION, format!("Bearer {}", bearer_token.secret()));
19344                                if let Some(filter) = &this.filter {
19345                                    req.url_mut().query_pairs_mut().append_pair("$filter", filter);
19346                                }
19347                                let req_body = azure_core::EMPTY_BODY;
19348                                req.set_body(req_body);
19349                                this.client.send(&mut req).await?
19350                            }
19351                        };
19352                        let rsp = match rsp.status() {
19353                            azure_core::StatusCode::Ok => Ok(Response(rsp)),
19354                            status_code => Err(azure_core::error::Error::from(azure_core::error::ErrorKind::HttpResponse {
19355                                status: status_code,
19356                                error_code: None,
19357                            })),
19358                        };
19359                        rsp?.into_body().await
19360                    }
19361                };
19362                azure_core::Pageable::new(make_request)
19363            }
19364            fn url(&self) -> azure_core::Result<azure_core::Url> {
19365                let mut url = self.client.endpoint().clone();
19366                url.set_path(&format!(
19367                    "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Automation/automationAccounts/{}/webhooks",
19368                    &self.subscription_id, &self.resource_group_name, &self.automation_account_name
19369                ));
19370                let has_api_version_already = url.query_pairs().any(|(k, _)| k == azure_core::query_param::API_VERSION);
19371                if !has_api_version_already {
19372                    url.query_pairs_mut()
19373                        .append_pair(azure_core::query_param::API_VERSION, "2015-10-31");
19374                }
19375                Ok(url)
19376            }
19377        }
19378    }
19379}