azure_devops_rust_api/test/
mod.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#![allow(unused_mut)]
4#![allow(unused_variables)]
5#![allow(unused_imports)]
6#![allow(clippy::redundant_clone)]
7#![allow(clippy::too_many_arguments)]
8#![allow(clippy::module_inception)]
9pub mod models;
10#[derive(Clone)]
11pub struct Client {
12    endpoint: azure_core::http::Url,
13    credential: crate::Credential,
14    scopes: Vec<String>,
15    pipeline: azure_core::http::Pipeline,
16}
17#[derive(Clone)]
18pub struct ClientBuilder {
19    credential: crate::Credential,
20    endpoint: Option<azure_core::http::Url>,
21    scopes: Option<Vec<String>>,
22    options: azure_core::http::ClientOptions,
23}
24azure_core::static_url!(DEFAULT_ENDPOINT, "https://dev.azure.com");
25impl ClientBuilder {
26    #[doc = "Create a new instance of `ClientBuilder`."]
27    #[must_use]
28    pub fn new(credential: crate::Credential) -> Self {
29        Self {
30            credential,
31            endpoint: None,
32            scopes: None,
33            options: azure_core::http::ClientOptions::default(),
34        }
35    }
36    #[doc = "Set the endpoint."]
37    #[must_use]
38    pub fn endpoint(mut self, endpoint: impl Into<azure_core::http::Url>) -> Self {
39        self.endpoint = Some(endpoint.into());
40        self
41    }
42    #[doc = "Set the scopes."]
43    #[must_use]
44    pub fn scopes(mut self, scopes: &[&str]) -> Self {
45        self.scopes = Some(scopes.iter().map(|scope| (*scope).to_owned()).collect());
46        self
47    }
48    #[doc = "Set the retry options."]
49    #[must_use]
50    pub fn retry(mut self, retry: impl Into<azure_core::http::RetryOptions>) -> Self {
51        self.options.retry = Some(retry.into());
52        self
53    }
54    #[doc = "Set the transport options."]
55    #[must_use]
56    pub fn transport(mut self, transport: impl Into<azure_core::http::TransportOptions>) -> Self {
57        self.options.transport = Some(transport.into());
58        self
59    }
60    #[doc = "Set per-call policies."]
61    #[must_use]
62    pub fn per_call_policies(
63        mut self,
64        policies: impl Into<Vec<std::sync::Arc<dyn azure_core::http::policies::Policy>>>,
65    ) -> Self {
66        self.options.per_call_policies = policies.into();
67        self
68    }
69    #[doc = "Set per-try policies."]
70    #[must_use]
71    pub fn per_try_policies(
72        mut self,
73        policies: impl Into<Vec<std::sync::Arc<dyn azure_core::http::policies::Policy>>>,
74    ) -> Self {
75        self.options.per_try_policies = policies.into();
76        self
77    }
78    #[doc = "Convert the builder into a `Client` instance."]
79    pub fn build(self) -> Client {
80        let endpoint = self.endpoint.unwrap_or_else(|| DEFAULT_ENDPOINT.to_owned());
81        let scopes = self
82            .scopes
83            .unwrap_or_else(|| vec![crate::ADO_SCOPE.to_string()]);
84        Client::new(endpoint, self.credential, scopes, self.options)
85    }
86}
87impl Client {
88    pub(crate) fn endpoint(&self) -> &azure_core::http::Url {
89        &self.endpoint
90    }
91    pub(crate) fn token_credential(&self) -> &crate::Credential {
92        &self.credential
93    }
94    pub(crate) fn scopes(&self) -> Vec<&str> {
95        self.scopes.iter().map(String::as_str).collect()
96    }
97    pub(crate) async fn send(
98        &self,
99        request: &mut azure_core::http::Request,
100    ) -> azure_core::Result<azure_core::http::BufResponse> {
101        let context = azure_core::http::Context::default();
102        self.pipeline.send(&context, request).await
103    }
104    #[doc = "Create a new `ClientBuilder`."]
105    #[must_use]
106    pub fn builder(credential: crate::Credential) -> ClientBuilder {
107        ClientBuilder::new(credential)
108    }
109    #[doc = "Create a new `Client`."]
110    #[must_use]
111    pub fn new(
112        endpoint: impl Into<azure_core::http::Url>,
113        credential: crate::Credential,
114        scopes: Vec<String>,
115        options: azure_core::http::ClientOptions,
116    ) -> Self {
117        let endpoint = endpoint.into();
118        let pipeline = azure_core::http::Pipeline::new(
119            option_env!("CARGO_PKG_NAME"),
120            option_env!("CARGO_PKG_VERSION"),
121            options,
122            Vec::new(),
123            Vec::new(),
124            None,
125        );
126        Self {
127            endpoint,
128            credential,
129            scopes,
130            pipeline,
131        }
132    }
133    pub fn attachments_client(&self) -> attachments::Client {
134        attachments::Client(self.clone())
135    }
136    pub fn code_coverage_client(&self) -> code_coverage::Client {
137        code_coverage::Client(self.clone())
138    }
139    pub fn iterations_client(&self) -> iterations::Client {
140        iterations::Client(self.clone())
141    }
142    pub fn points_client(&self) -> points::Client {
143        points::Client(self.clone())
144    }
145    pub fn result_retention_settings_client(&self) -> result_retention_settings::Client {
146        result_retention_settings::Client(self.clone())
147    }
148    pub fn results_client(&self) -> results::Client {
149        results::Client(self.clone())
150    }
151    pub fn runs_client(&self) -> runs::Client {
152        runs::Client(self.clone())
153    }
154    pub fn session_client(&self) -> session::Client {
155        session::Client(self.clone())
156    }
157    pub fn test_cases_client(&self) -> test_cases::Client {
158        test_cases::Client(self.clone())
159    }
160    pub fn test_history_client(&self) -> test_history::Client {
161        test_history::Client(self.clone())
162    }
163    pub fn test_suites_client(&self) -> test_suites::Client {
164        test_suites::Client(self.clone())
165    }
166}
167pub mod runs {
168    use super::models;
169    #[cfg(not(target_arch = "wasm32"))]
170    use futures::future::BoxFuture;
171    #[cfg(target_arch = "wasm32")]
172    use futures::future::LocalBoxFuture as BoxFuture;
173    pub struct Client(pub(crate) super::Client);
174    impl Client {
175        #[doc = "Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate."]
176        #[doc = ""]
177        #[doc = "Arguments:"]
178        #[doc = "* `organization`: The name of the Azure DevOps organization."]
179        #[doc = "* `project`: Project ID or project name"]
180        #[doc = "* `min_last_updated_date`: Minimum Last Modified Date of run to be queried (Mandatory)."]
181        #[doc = "* `max_last_updated_date`: Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days)."]
182        pub fn query(
183            &self,
184            organization: impl Into<String>,
185            project: impl Into<String>,
186            min_last_updated_date: impl Into<time::OffsetDateTime>,
187            max_last_updated_date: impl Into<time::OffsetDateTime>,
188        ) -> query::RequestBuilder {
189            query::RequestBuilder {
190                client: self.0.clone(),
191                organization: organization.into(),
192                project: project.into(),
193                min_last_updated_date: min_last_updated_date.into(),
194                max_last_updated_date: max_last_updated_date.into(),
195                state: None,
196                plan_ids: None,
197                is_automated: None,
198                publish_context: None,
199                build_ids: None,
200                build_def_ids: None,
201                branch_name: None,
202                release_ids: None,
203                release_def_ids: None,
204                release_env_ids: None,
205                release_env_def_ids: None,
206                run_title: None,
207                top: None,
208                continuation_token: None,
209            }
210        }
211        #[doc = "Get a list of test runs."]
212        #[doc = ""]
213        #[doc = "Arguments:"]
214        #[doc = "* `organization`: The name of the Azure DevOps organization."]
215        #[doc = "* `project`: Project ID or project name"]
216        pub fn list(
217            &self,
218            organization: impl Into<String>,
219            project: impl Into<String>,
220        ) -> list::RequestBuilder {
221            list::RequestBuilder {
222                client: self.0.clone(),
223                organization: organization.into(),
224                project: project.into(),
225                build_uri: None,
226                owner: None,
227                tmi_run_id: None,
228                plan_id: None,
229                include_run_details: None,
230                automated: None,
231                skip: None,
232                top: None,
233            }
234        }
235        #[doc = "Create new test run."]
236        #[doc = ""]
237        #[doc = "Arguments:"]
238        #[doc = "* `organization`: The name of the Azure DevOps organization."]
239        #[doc = "* `body`: Run details RunCreateModel"]
240        #[doc = "* `project`: Project ID or project name"]
241        pub fn create(
242            &self,
243            organization: impl Into<String>,
244            body: impl Into<models::RunCreateModel>,
245            project: impl Into<String>,
246        ) -> create::RequestBuilder {
247            create::RequestBuilder {
248                client: self.0.clone(),
249                organization: organization.into(),
250                body: body.into(),
251                project: project.into(),
252            }
253        }
254        #[doc = "Get a test run by its ID."]
255        #[doc = ""]
256        #[doc = "Arguments:"]
257        #[doc = "* `organization`: The name of the Azure DevOps organization."]
258        #[doc = "* `project`: Project ID or project name"]
259        #[doc = "* `run_id`: ID of the run to get."]
260        pub fn get_test_run_by_id(
261            &self,
262            organization: impl Into<String>,
263            project: impl Into<String>,
264            run_id: i32,
265        ) -> get_test_run_by_id::RequestBuilder {
266            get_test_run_by_id::RequestBuilder {
267                client: self.0.clone(),
268                organization: organization.into(),
269                project: project.into(),
270                run_id,
271                include_details: None,
272            }
273        }
274        #[doc = "Update test run by its ID."]
275        #[doc = ""]
276        #[doc = "Arguments:"]
277        #[doc = "* `organization`: The name of the Azure DevOps organization."]
278        #[doc = "* `body`: Run details RunUpdateModel"]
279        #[doc = "* `project`: Project ID or project name"]
280        #[doc = "* `run_id`: ID of the run to update."]
281        pub fn update(
282            &self,
283            organization: impl Into<String>,
284            body: impl Into<models::RunUpdateModel>,
285            project: impl Into<String>,
286            run_id: i32,
287        ) -> update::RequestBuilder {
288            update::RequestBuilder {
289                client: self.0.clone(),
290                organization: organization.into(),
291                body: body.into(),
292                project: project.into(),
293                run_id,
294            }
295        }
296        #[doc = "Delete a test run by its ID."]
297        #[doc = ""]
298        #[doc = "Arguments:"]
299        #[doc = "* `organization`: The name of the Azure DevOps organization."]
300        #[doc = "* `project`: Project ID or project name"]
301        #[doc = "* `run_id`: ID of the run to delete."]
302        pub fn delete(
303            &self,
304            organization: impl Into<String>,
305            project: impl Into<String>,
306            run_id: i32,
307        ) -> delete::RequestBuilder {
308            delete::RequestBuilder {
309                client: self.0.clone(),
310                organization: organization.into(),
311                project: project.into(),
312                run_id,
313            }
314        }
315        #[doc = "Get test run statistics , used when we want to get summary of a run by outcome."]
316        #[doc = ""]
317        #[doc = "Arguments:"]
318        #[doc = "* `organization`: The name of the Azure DevOps organization."]
319        #[doc = "* `project`: Project ID or project name"]
320        #[doc = "* `run_id`: ID of the run to get."]
321        pub fn get_test_run_statistics(
322            &self,
323            organization: impl Into<String>,
324            project: impl Into<String>,
325            run_id: i32,
326        ) -> get_test_run_statistics::RequestBuilder {
327            get_test_run_statistics::RequestBuilder {
328                client: self.0.clone(),
329                organization: organization.into(),
330                project: project.into(),
331                run_id,
332            }
333        }
334    }
335    pub mod query {
336        use super::models;
337        #[cfg(not(target_arch = "wasm32"))]
338        use futures::future::BoxFuture;
339        #[cfg(target_arch = "wasm32")]
340        use futures::future::LocalBoxFuture as BoxFuture;
341        #[derive(Debug)]
342        pub struct Response(
343            azure_core::http::Response<models::TestRunList, azure_core::http::JsonFormat>,
344        );
345        impl Response {
346            pub async fn into_body(self) -> azure_core::Result<models::TestRunList> {
347                self.0.into_body().await
348            }
349            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
350                self.0.into()
351            }
352        }
353        #[derive(Clone)]
354        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
355        #[doc = r""]
356        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
357        #[doc = r" parameters can be chained."]
358        #[doc = r""]
359        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
360        #[doc = r" converts the [`RequestBuilder`] into a future,"]
361        #[doc = r" executes the request and returns a `Result` with the parsed"]
362        #[doc = r" response."]
363        #[doc = r""]
364        #[doc = r" If you need lower-level access to the raw response details"]
365        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
366        #[doc = r" can finalize the request using the"]
367        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
368        #[doc = r" that resolves to a lower-level [`Response`] value."]
369        pub struct RequestBuilder {
370            pub(crate) client: super::super::Client,
371            pub(crate) organization: String,
372            pub(crate) project: String,
373            pub(crate) min_last_updated_date: time::OffsetDateTime,
374            pub(crate) max_last_updated_date: time::OffsetDateTime,
375            pub(crate) state: Option<String>,
376            pub(crate) plan_ids: Option<String>,
377            pub(crate) is_automated: Option<bool>,
378            pub(crate) publish_context: Option<String>,
379            pub(crate) build_ids: Option<String>,
380            pub(crate) build_def_ids: Option<String>,
381            pub(crate) branch_name: Option<String>,
382            pub(crate) release_ids: Option<String>,
383            pub(crate) release_def_ids: Option<String>,
384            pub(crate) release_env_ids: Option<String>,
385            pub(crate) release_env_def_ids: Option<String>,
386            pub(crate) run_title: Option<String>,
387            pub(crate) top: Option<i32>,
388            pub(crate) continuation_token: Option<String>,
389        }
390        impl RequestBuilder {
391            #[doc = "Current state of the Runs to be queried."]
392            pub fn state(mut self, state: impl Into<String>) -> Self {
393                self.state = Some(state.into());
394                self
395            }
396            #[doc = "Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10)."]
397            pub fn plan_ids(mut self, plan_ids: impl Into<String>) -> Self {
398                self.plan_ids = Some(plan_ids.into());
399                self
400            }
401            #[doc = "Automation type of the Runs to be queried."]
402            pub fn is_automated(mut self, is_automated: bool) -> Self {
403                self.is_automated = Some(is_automated);
404                self
405            }
406            #[doc = "PublishContext of the Runs to be queried."]
407            pub fn publish_context(mut self, publish_context: impl Into<String>) -> Self {
408                self.publish_context = Some(publish_context.into());
409                self
410            }
411            #[doc = "Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10)."]
412            pub fn build_ids(mut self, build_ids: impl Into<String>) -> Self {
413                self.build_ids = Some(build_ids.into());
414                self
415            }
416            #[doc = "Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10)."]
417            pub fn build_def_ids(mut self, build_def_ids: impl Into<String>) -> Self {
418                self.build_def_ids = Some(build_def_ids.into());
419                self
420            }
421            #[doc = "Source Branch name of the Runs to be queried."]
422            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
423                self.branch_name = Some(branch_name.into());
424                self
425            }
426            #[doc = "Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10)."]
427            pub fn release_ids(mut self, release_ids: impl Into<String>) -> Self {
428                self.release_ids = Some(release_ids.into());
429                self
430            }
431            #[doc = "Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10)."]
432            pub fn release_def_ids(mut self, release_def_ids: impl Into<String>) -> Self {
433                self.release_def_ids = Some(release_def_ids.into());
434                self
435            }
436            #[doc = "Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10)."]
437            pub fn release_env_ids(mut self, release_env_ids: impl Into<String>) -> Self {
438                self.release_env_ids = Some(release_env_ids.into());
439                self
440            }
441            #[doc = "Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10)."]
442            pub fn release_env_def_ids(mut self, release_env_def_ids: impl Into<String>) -> Self {
443                self.release_env_def_ids = Some(release_env_def_ids.into());
444                self
445            }
446            #[doc = "Run Title of the Runs to be queried."]
447            pub fn run_title(mut self, run_title: impl Into<String>) -> Self {
448                self.run_title = Some(run_title.into());
449                self
450            }
451            #[doc = "Number of runs to be queried. Limit is 100"]
452            pub fn top(mut self, top: i32) -> Self {
453                self.top = Some(top);
454                self
455            }
456            #[doc = "continuation token received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user."]
457            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
458                self.continuation_token = Some(continuation_token.into());
459                self
460            }
461            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
462            #[doc = ""]
463            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
464            #[doc = "However, this function can provide more flexibility when required."]
465            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
466                Box::pin({
467                    let this = self.clone();
468                    async move {
469                        let url = this.url()?;
470                        let mut req =
471                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
472                        if let Some(auth_header) = this
473                            .client
474                            .token_credential()
475                            .http_authorization_header(&this.client.scopes())
476                            .await?
477                        {
478                            req.insert_header(
479                                azure_core::http::headers::AUTHORIZATION,
480                                auth_header,
481                            );
482                        }
483                        let min_last_updated_date = &this.min_last_updated_date;
484                        let formatted_date_time =
485                            crate::date_time::format_date_time(min_last_updated_date)?;
486                        req.url_mut()
487                            .query_pairs_mut()
488                            .append_pair("minLastUpdatedDate", &formatted_date_time);
489                        let max_last_updated_date = &this.max_last_updated_date;
490                        let formatted_date_time =
491                            crate::date_time::format_date_time(max_last_updated_date)?;
492                        req.url_mut()
493                            .query_pairs_mut()
494                            .append_pair("maxLastUpdatedDate", &formatted_date_time);
495                        if let Some(state) = &this.state {
496                            req.url_mut().query_pairs_mut().append_pair("state", state);
497                        }
498                        if let Some(plan_ids) = &this.plan_ids {
499                            req.url_mut()
500                                .query_pairs_mut()
501                                .append_pair("planIds", plan_ids);
502                        }
503                        if let Some(is_automated) = &this.is_automated {
504                            req.url_mut()
505                                .query_pairs_mut()
506                                .append_pair("isAutomated", &is_automated.to_string());
507                        }
508                        if let Some(publish_context) = &this.publish_context {
509                            req.url_mut()
510                                .query_pairs_mut()
511                                .append_pair("publishContext", publish_context);
512                        }
513                        if let Some(build_ids) = &this.build_ids {
514                            req.url_mut()
515                                .query_pairs_mut()
516                                .append_pair("buildIds", build_ids);
517                        }
518                        if let Some(build_def_ids) = &this.build_def_ids {
519                            req.url_mut()
520                                .query_pairs_mut()
521                                .append_pair("buildDefIds", build_def_ids);
522                        }
523                        if let Some(branch_name) = &this.branch_name {
524                            req.url_mut()
525                                .query_pairs_mut()
526                                .append_pair("branchName", branch_name);
527                        }
528                        if let Some(release_ids) = &this.release_ids {
529                            req.url_mut()
530                                .query_pairs_mut()
531                                .append_pair("releaseIds", release_ids);
532                        }
533                        if let Some(release_def_ids) = &this.release_def_ids {
534                            req.url_mut()
535                                .query_pairs_mut()
536                                .append_pair("releaseDefIds", release_def_ids);
537                        }
538                        if let Some(release_env_ids) = &this.release_env_ids {
539                            req.url_mut()
540                                .query_pairs_mut()
541                                .append_pair("releaseEnvIds", release_env_ids);
542                        }
543                        if let Some(release_env_def_ids) = &this.release_env_def_ids {
544                            req.url_mut()
545                                .query_pairs_mut()
546                                .append_pair("releaseEnvDefIds", release_env_def_ids);
547                        }
548                        if let Some(run_title) = &this.run_title {
549                            req.url_mut()
550                                .query_pairs_mut()
551                                .append_pair("runTitle", run_title);
552                        }
553                        if let Some(top) = &this.top {
554                            req.url_mut()
555                                .query_pairs_mut()
556                                .append_pair("$top", &top.to_string());
557                        }
558                        if let Some(continuation_token) = &this.continuation_token {
559                            req.url_mut()
560                                .query_pairs_mut()
561                                .append_pair("continuationToken", continuation_token);
562                        }
563                        let req_body = azure_core::Bytes::new();
564                        req.set_body(req_body);
565                        Ok(Response(this.client.send(&mut req).await?.into()))
566                    }
567                })
568            }
569            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
570                let mut url = azure_core::http::Url::parse(&format!(
571                    "{}/{}/{}/_apis/test/runs?minLastUpdatedDate={}&maxLastUpdatedDate={}",
572                    self.client.endpoint(),
573                    &self.organization,
574                    &self.project,
575                    &self.min_last_updated_date,
576                    &self.max_last_updated_date
577                ))?;
578                let has_api_version_already = url
579                    .query_pairs()
580                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
581                if !has_api_version_already {
582                    url.query_pairs_mut().append_pair(
583                        azure_core::http::headers::query_param::API_VERSION,
584                        "7.1-preview",
585                    );
586                }
587                Ok(url)
588            }
589        }
590        impl std::future::IntoFuture for RequestBuilder {
591            type Output = azure_core::Result<models::TestRunList>;
592            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestRunList>>;
593            #[doc = "Returns a future that sends the request and returns the parsed response body."]
594            #[doc = ""]
595            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
596            #[doc = ""]
597            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
598            fn into_future(self) -> Self::IntoFuture {
599                Box::pin(async move { self.send().await?.into_body().await })
600            }
601        }
602    }
603    pub mod list {
604        use super::models;
605        #[cfg(not(target_arch = "wasm32"))]
606        use futures::future::BoxFuture;
607        #[cfg(target_arch = "wasm32")]
608        use futures::future::LocalBoxFuture as BoxFuture;
609        #[derive(Debug)]
610        pub struct Response(
611            azure_core::http::Response<models::TestRunList, azure_core::http::JsonFormat>,
612        );
613        impl Response {
614            pub async fn into_body(self) -> azure_core::Result<models::TestRunList> {
615                self.0.into_body().await
616            }
617            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
618                self.0.into()
619            }
620        }
621        #[derive(Clone)]
622        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
623        #[doc = r""]
624        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
625        #[doc = r" parameters can be chained."]
626        #[doc = r""]
627        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
628        #[doc = r" converts the [`RequestBuilder`] into a future,"]
629        #[doc = r" executes the request and returns a `Result` with the parsed"]
630        #[doc = r" response."]
631        #[doc = r""]
632        #[doc = r" If you need lower-level access to the raw response details"]
633        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
634        #[doc = r" can finalize the request using the"]
635        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
636        #[doc = r" that resolves to a lower-level [`Response`] value."]
637        pub struct RequestBuilder {
638            pub(crate) client: super::super::Client,
639            pub(crate) organization: String,
640            pub(crate) project: String,
641            pub(crate) build_uri: Option<String>,
642            pub(crate) owner: Option<String>,
643            pub(crate) tmi_run_id: Option<String>,
644            pub(crate) plan_id: Option<i32>,
645            pub(crate) include_run_details: Option<bool>,
646            pub(crate) automated: Option<bool>,
647            pub(crate) skip: Option<i32>,
648            pub(crate) top: Option<i32>,
649        }
650        impl RequestBuilder {
651            #[doc = "URI of the build that the runs used."]
652            pub fn build_uri(mut self, build_uri: impl Into<String>) -> Self {
653                self.build_uri = Some(build_uri.into());
654                self
655            }
656            #[doc = "Team foundation ID of the owner of the runs."]
657            pub fn owner(mut self, owner: impl Into<String>) -> Self {
658                self.owner = Some(owner.into());
659                self
660            }
661            pub fn tmi_run_id(mut self, tmi_run_id: impl Into<String>) -> Self {
662                self.tmi_run_id = Some(tmi_run_id.into());
663                self
664            }
665            #[doc = "ID of the test plan that the runs are a part of."]
666            pub fn plan_id(mut self, plan_id: i32) -> Self {
667                self.plan_id = Some(plan_id);
668                self
669            }
670            #[doc = "If true, include all the properties of the runs."]
671            pub fn include_run_details(mut self, include_run_details: bool) -> Self {
672                self.include_run_details = Some(include_run_details);
673                self
674            }
675            #[doc = "If true, only returns automated runs."]
676            pub fn automated(mut self, automated: bool) -> Self {
677                self.automated = Some(automated);
678                self
679            }
680            #[doc = "Number of test runs to skip."]
681            pub fn skip(mut self, skip: i32) -> Self {
682                self.skip = Some(skip);
683                self
684            }
685            #[doc = "Number of test runs to return."]
686            pub fn top(mut self, top: i32) -> Self {
687                self.top = Some(top);
688                self
689            }
690            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
691            #[doc = ""]
692            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
693            #[doc = "However, this function can provide more flexibility when required."]
694            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
695                Box::pin({
696                    let this = self.clone();
697                    async move {
698                        let url = this.url()?;
699                        let mut req =
700                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
701                        if let Some(auth_header) = this
702                            .client
703                            .token_credential()
704                            .http_authorization_header(&this.client.scopes())
705                            .await?
706                        {
707                            req.insert_header(
708                                azure_core::http::headers::AUTHORIZATION,
709                                auth_header,
710                            );
711                        }
712                        if let Some(build_uri) = &this.build_uri {
713                            req.url_mut()
714                                .query_pairs_mut()
715                                .append_pair("buildUri", build_uri);
716                        }
717                        if let Some(owner) = &this.owner {
718                            req.url_mut().query_pairs_mut().append_pair("owner", owner);
719                        }
720                        if let Some(tmi_run_id) = &this.tmi_run_id {
721                            req.url_mut()
722                                .query_pairs_mut()
723                                .append_pair("tmiRunId", tmi_run_id);
724                        }
725                        if let Some(plan_id) = &this.plan_id {
726                            req.url_mut()
727                                .query_pairs_mut()
728                                .append_pair("planId", &plan_id.to_string());
729                        }
730                        if let Some(include_run_details) = &this.include_run_details {
731                            req.url_mut()
732                                .query_pairs_mut()
733                                .append_pair("includeRunDetails", &include_run_details.to_string());
734                        }
735                        if let Some(automated) = &this.automated {
736                            req.url_mut()
737                                .query_pairs_mut()
738                                .append_pair("automated", &automated.to_string());
739                        }
740                        if let Some(skip) = &this.skip {
741                            req.url_mut()
742                                .query_pairs_mut()
743                                .append_pair("$skip", &skip.to_string());
744                        }
745                        if let Some(top) = &this.top {
746                            req.url_mut()
747                                .query_pairs_mut()
748                                .append_pair("$top", &top.to_string());
749                        }
750                        let req_body = azure_core::Bytes::new();
751                        req.set_body(req_body);
752                        Ok(Response(this.client.send(&mut req).await?.into()))
753                    }
754                })
755            }
756            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
757                let mut url = azure_core::http::Url::parse(&format!(
758                    "{}/{}/{}/_apis/test/runs",
759                    self.client.endpoint(),
760                    &self.organization,
761                    &self.project
762                ))?;
763                let has_api_version_already = url
764                    .query_pairs()
765                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
766                if !has_api_version_already {
767                    url.query_pairs_mut().append_pair(
768                        azure_core::http::headers::query_param::API_VERSION,
769                        "7.1-preview",
770                    );
771                }
772                Ok(url)
773            }
774        }
775        impl std::future::IntoFuture for RequestBuilder {
776            type Output = azure_core::Result<models::TestRunList>;
777            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestRunList>>;
778            #[doc = "Returns a future that sends the request and returns the parsed response body."]
779            #[doc = ""]
780            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
781            #[doc = ""]
782            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
783            fn into_future(self) -> Self::IntoFuture {
784                Box::pin(async move { self.send().await?.into_body().await })
785            }
786        }
787    }
788    pub mod create {
789        use super::models;
790        #[cfg(not(target_arch = "wasm32"))]
791        use futures::future::BoxFuture;
792        #[cfg(target_arch = "wasm32")]
793        use futures::future::LocalBoxFuture as BoxFuture;
794        #[derive(Debug)]
795        pub struct Response(
796            azure_core::http::Response<models::TestRun, azure_core::http::JsonFormat>,
797        );
798        impl Response {
799            pub async fn into_body(self) -> azure_core::Result<models::TestRun> {
800                self.0.into_body().await
801            }
802            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
803                self.0.into()
804            }
805        }
806        #[derive(Clone)]
807        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
808        #[doc = r""]
809        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
810        #[doc = r" parameters can be chained."]
811        #[doc = r""]
812        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
813        #[doc = r" converts the [`RequestBuilder`] into a future,"]
814        #[doc = r" executes the request and returns a `Result` with the parsed"]
815        #[doc = r" response."]
816        #[doc = r""]
817        #[doc = r" If you need lower-level access to the raw response details"]
818        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
819        #[doc = r" can finalize the request using the"]
820        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
821        #[doc = r" that resolves to a lower-level [`Response`] value."]
822        pub struct RequestBuilder {
823            pub(crate) client: super::super::Client,
824            pub(crate) organization: String,
825            pub(crate) body: models::RunCreateModel,
826            pub(crate) project: String,
827        }
828        impl RequestBuilder {
829            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
830            #[doc = ""]
831            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
832            #[doc = "However, this function can provide more flexibility when required."]
833            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
834                Box::pin({
835                    let this = self.clone();
836                    async move {
837                        let url = this.url()?;
838                        let mut req =
839                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
840                        if let Some(auth_header) = this
841                            .client
842                            .token_credential()
843                            .http_authorization_header(&this.client.scopes())
844                            .await?
845                        {
846                            req.insert_header(
847                                azure_core::http::headers::AUTHORIZATION,
848                                auth_header,
849                            );
850                        }
851                        req.insert_header("content-type", "application/json");
852                        let req_body = azure_core::json::to_json(&this.body)?;
853                        req.set_body(req_body);
854                        Ok(Response(this.client.send(&mut req).await?.into()))
855                    }
856                })
857            }
858            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
859                let mut url = azure_core::http::Url::parse(&format!(
860                    "{}/{}/{}/_apis/test/runs",
861                    self.client.endpoint(),
862                    &self.organization,
863                    &self.project
864                ))?;
865                let has_api_version_already = url
866                    .query_pairs()
867                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
868                if !has_api_version_already {
869                    url.query_pairs_mut().append_pair(
870                        azure_core::http::headers::query_param::API_VERSION,
871                        "7.1-preview",
872                    );
873                }
874                Ok(url)
875            }
876        }
877        impl std::future::IntoFuture for RequestBuilder {
878            type Output = azure_core::Result<models::TestRun>;
879            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestRun>>;
880            #[doc = "Returns a future that sends the request and returns the parsed response body."]
881            #[doc = ""]
882            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
883            #[doc = ""]
884            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
885            fn into_future(self) -> Self::IntoFuture {
886                Box::pin(async move { self.send().await?.into_body().await })
887            }
888        }
889    }
890    pub mod get_test_run_by_id {
891        use super::models;
892        #[cfg(not(target_arch = "wasm32"))]
893        use futures::future::BoxFuture;
894        #[cfg(target_arch = "wasm32")]
895        use futures::future::LocalBoxFuture as BoxFuture;
896        #[derive(Debug)]
897        pub struct Response(
898            azure_core::http::Response<models::TestRun, azure_core::http::JsonFormat>,
899        );
900        impl Response {
901            pub async fn into_body(self) -> azure_core::Result<models::TestRun> {
902                self.0.into_body().await
903            }
904            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
905                self.0.into()
906            }
907        }
908        #[derive(Clone)]
909        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
910        #[doc = r""]
911        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
912        #[doc = r" parameters can be chained."]
913        #[doc = r""]
914        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
915        #[doc = r" converts the [`RequestBuilder`] into a future,"]
916        #[doc = r" executes the request and returns a `Result` with the parsed"]
917        #[doc = r" response."]
918        #[doc = r""]
919        #[doc = r" If you need lower-level access to the raw response details"]
920        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
921        #[doc = r" can finalize the request using the"]
922        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
923        #[doc = r" that resolves to a lower-level [`Response`] value."]
924        pub struct RequestBuilder {
925            pub(crate) client: super::super::Client,
926            pub(crate) organization: String,
927            pub(crate) project: String,
928            pub(crate) run_id: i32,
929            pub(crate) include_details: Option<bool>,
930        }
931        impl RequestBuilder {
932            #[doc = "Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more."]
933            pub fn include_details(mut self, include_details: bool) -> Self {
934                self.include_details = Some(include_details);
935                self
936            }
937            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
938            #[doc = ""]
939            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
940            #[doc = "However, this function can provide more flexibility when required."]
941            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
942                Box::pin({
943                    let this = self.clone();
944                    async move {
945                        let url = this.url()?;
946                        let mut req =
947                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
948                        if let Some(auth_header) = this
949                            .client
950                            .token_credential()
951                            .http_authorization_header(&this.client.scopes())
952                            .await?
953                        {
954                            req.insert_header(
955                                azure_core::http::headers::AUTHORIZATION,
956                                auth_header,
957                            );
958                        }
959                        if let Some(include_details) = &this.include_details {
960                            req.url_mut()
961                                .query_pairs_mut()
962                                .append_pair("includeDetails", &include_details.to_string());
963                        }
964                        let req_body = azure_core::Bytes::new();
965                        req.set_body(req_body);
966                        Ok(Response(this.client.send(&mut req).await?.into()))
967                    }
968                })
969            }
970            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
971                let mut url = azure_core::http::Url::parse(&format!(
972                    "{}/{}/{}/_apis/test/runs/{}",
973                    self.client.endpoint(),
974                    &self.organization,
975                    &self.project,
976                    &self.run_id
977                ))?;
978                let has_api_version_already = url
979                    .query_pairs()
980                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
981                if !has_api_version_already {
982                    url.query_pairs_mut().append_pair(
983                        azure_core::http::headers::query_param::API_VERSION,
984                        "7.1-preview",
985                    );
986                }
987                Ok(url)
988            }
989        }
990        impl std::future::IntoFuture for RequestBuilder {
991            type Output = azure_core::Result<models::TestRun>;
992            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestRun>>;
993            #[doc = "Returns a future that sends the request and returns the parsed response body."]
994            #[doc = ""]
995            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
996            #[doc = ""]
997            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
998            fn into_future(self) -> Self::IntoFuture {
999                Box::pin(async move { self.send().await?.into_body().await })
1000            }
1001        }
1002    }
1003    pub mod update {
1004        use super::models;
1005        #[cfg(not(target_arch = "wasm32"))]
1006        use futures::future::BoxFuture;
1007        #[cfg(target_arch = "wasm32")]
1008        use futures::future::LocalBoxFuture as BoxFuture;
1009        #[derive(Debug)]
1010        pub struct Response(
1011            azure_core::http::Response<models::TestRun, azure_core::http::JsonFormat>,
1012        );
1013        impl Response {
1014            pub async fn into_body(self) -> azure_core::Result<models::TestRun> {
1015                self.0.into_body().await
1016            }
1017            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1018                self.0.into()
1019            }
1020        }
1021        #[derive(Clone)]
1022        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1023        #[doc = r""]
1024        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1025        #[doc = r" parameters can be chained."]
1026        #[doc = r""]
1027        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1028        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1029        #[doc = r" executes the request and returns a `Result` with the parsed"]
1030        #[doc = r" response."]
1031        #[doc = r""]
1032        #[doc = r" If you need lower-level access to the raw response details"]
1033        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1034        #[doc = r" can finalize the request using the"]
1035        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1036        #[doc = r" that resolves to a lower-level [`Response`] value."]
1037        pub struct RequestBuilder {
1038            pub(crate) client: super::super::Client,
1039            pub(crate) organization: String,
1040            pub(crate) body: models::RunUpdateModel,
1041            pub(crate) project: String,
1042            pub(crate) run_id: i32,
1043        }
1044        impl RequestBuilder {
1045            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1046            #[doc = ""]
1047            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1048            #[doc = "However, this function can provide more flexibility when required."]
1049            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1050                Box::pin({
1051                    let this = self.clone();
1052                    async move {
1053                        let url = this.url()?;
1054                        let mut req =
1055                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
1056                        if let Some(auth_header) = this
1057                            .client
1058                            .token_credential()
1059                            .http_authorization_header(&this.client.scopes())
1060                            .await?
1061                        {
1062                            req.insert_header(
1063                                azure_core::http::headers::AUTHORIZATION,
1064                                auth_header,
1065                            );
1066                        }
1067                        req.insert_header("content-type", "application/json");
1068                        let req_body = azure_core::json::to_json(&this.body)?;
1069                        req.set_body(req_body);
1070                        Ok(Response(this.client.send(&mut req).await?.into()))
1071                    }
1072                })
1073            }
1074            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1075                let mut url = azure_core::http::Url::parse(&format!(
1076                    "{}/{}/{}/_apis/test/runs/{}",
1077                    self.client.endpoint(),
1078                    &self.organization,
1079                    &self.project,
1080                    &self.run_id
1081                ))?;
1082                let has_api_version_already = url
1083                    .query_pairs()
1084                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1085                if !has_api_version_already {
1086                    url.query_pairs_mut().append_pair(
1087                        azure_core::http::headers::query_param::API_VERSION,
1088                        "7.1-preview",
1089                    );
1090                }
1091                Ok(url)
1092            }
1093        }
1094        impl std::future::IntoFuture for RequestBuilder {
1095            type Output = azure_core::Result<models::TestRun>;
1096            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestRun>>;
1097            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1098            #[doc = ""]
1099            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1100            #[doc = ""]
1101            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1102            fn into_future(self) -> Self::IntoFuture {
1103                Box::pin(async move { self.send().await?.into_body().await })
1104            }
1105        }
1106    }
1107    pub mod delete {
1108        use super::models;
1109        #[cfg(not(target_arch = "wasm32"))]
1110        use futures::future::BoxFuture;
1111        #[cfg(target_arch = "wasm32")]
1112        use futures::future::LocalBoxFuture as BoxFuture;
1113        #[derive(Debug)]
1114        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
1115        impl Response {
1116            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1117                self.0.into()
1118            }
1119        }
1120        #[derive(Clone)]
1121        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1122        #[doc = r""]
1123        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1124        #[doc = r" parameters can be chained."]
1125        #[doc = r""]
1126        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1127        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1128        #[doc = r" executes the request and returns a `Result` with the parsed"]
1129        #[doc = r" response."]
1130        #[doc = r""]
1131        #[doc = r" If you need lower-level access to the raw response details"]
1132        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1133        #[doc = r" can finalize the request using the"]
1134        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1135        #[doc = r" that resolves to a lower-level [`Response`] value."]
1136        pub struct RequestBuilder {
1137            pub(crate) client: super::super::Client,
1138            pub(crate) organization: String,
1139            pub(crate) project: String,
1140            pub(crate) run_id: i32,
1141        }
1142        impl RequestBuilder {
1143            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1144            #[doc = ""]
1145            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1146            #[doc = "However, this function can provide more flexibility when required."]
1147            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1148                Box::pin({
1149                    let this = self.clone();
1150                    async move {
1151                        let url = this.url()?;
1152                        let mut req =
1153                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
1154                        if let Some(auth_header) = this
1155                            .client
1156                            .token_credential()
1157                            .http_authorization_header(&this.client.scopes())
1158                            .await?
1159                        {
1160                            req.insert_header(
1161                                azure_core::http::headers::AUTHORIZATION,
1162                                auth_header,
1163                            );
1164                        }
1165                        let req_body = azure_core::Bytes::new();
1166                        req.set_body(req_body);
1167                        Ok(Response(this.client.send(&mut req).await?.into()))
1168                    }
1169                })
1170            }
1171            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1172                let mut url = azure_core::http::Url::parse(&format!(
1173                    "{}/{}/{}/_apis/test/runs/{}",
1174                    self.client.endpoint(),
1175                    &self.organization,
1176                    &self.project,
1177                    &self.run_id
1178                ))?;
1179                let has_api_version_already = url
1180                    .query_pairs()
1181                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1182                if !has_api_version_already {
1183                    url.query_pairs_mut().append_pair(
1184                        azure_core::http::headers::query_param::API_VERSION,
1185                        "7.1-preview",
1186                    );
1187                }
1188                Ok(url)
1189            }
1190        }
1191        impl std::future::IntoFuture for RequestBuilder {
1192            type Output = azure_core::Result<()>;
1193            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1194            #[doc = "Returns a future that sends the request and waits for the response."]
1195            #[doc = ""]
1196            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1197            #[doc = ""]
1198            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1199            fn into_future(self) -> Self::IntoFuture {
1200                Box::pin(async move {
1201                    let _rsp = self.send().await?;
1202                    Ok(())
1203                })
1204            }
1205        }
1206    }
1207    pub mod get_test_run_statistics {
1208        use super::models;
1209        #[cfg(not(target_arch = "wasm32"))]
1210        use futures::future::BoxFuture;
1211        #[cfg(target_arch = "wasm32")]
1212        use futures::future::LocalBoxFuture as BoxFuture;
1213        #[derive(Debug)]
1214        pub struct Response(
1215            azure_core::http::Response<models::TestRunStatistic, azure_core::http::JsonFormat>,
1216        );
1217        impl Response {
1218            pub async fn into_body(self) -> azure_core::Result<models::TestRunStatistic> {
1219                self.0.into_body().await
1220            }
1221            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1222                self.0.into()
1223            }
1224        }
1225        #[derive(Clone)]
1226        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1227        #[doc = r""]
1228        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1229        #[doc = r" parameters can be chained."]
1230        #[doc = r""]
1231        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1232        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1233        #[doc = r" executes the request and returns a `Result` with the parsed"]
1234        #[doc = r" response."]
1235        #[doc = r""]
1236        #[doc = r" If you need lower-level access to the raw response details"]
1237        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1238        #[doc = r" can finalize the request using the"]
1239        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1240        #[doc = r" that resolves to a lower-level [`Response`] value."]
1241        pub struct RequestBuilder {
1242            pub(crate) client: super::super::Client,
1243            pub(crate) organization: String,
1244            pub(crate) project: String,
1245            pub(crate) run_id: i32,
1246        }
1247        impl RequestBuilder {
1248            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1249            #[doc = ""]
1250            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1251            #[doc = "However, this function can provide more flexibility when required."]
1252            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1253                Box::pin({
1254                    let this = self.clone();
1255                    async move {
1256                        let url = this.url()?;
1257                        let mut req =
1258                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1259                        if let Some(auth_header) = this
1260                            .client
1261                            .token_credential()
1262                            .http_authorization_header(&this.client.scopes())
1263                            .await?
1264                        {
1265                            req.insert_header(
1266                                azure_core::http::headers::AUTHORIZATION,
1267                                auth_header,
1268                            );
1269                        }
1270                        let req_body = azure_core::Bytes::new();
1271                        req.set_body(req_body);
1272                        Ok(Response(this.client.send(&mut req).await?.into()))
1273                    }
1274                })
1275            }
1276            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1277                let mut url = azure_core::http::Url::parse(&format!(
1278                    "{}/{}/{}/_apis/test/runs/{}/Statistics",
1279                    self.client.endpoint(),
1280                    &self.organization,
1281                    &self.project,
1282                    &self.run_id
1283                ))?;
1284                let has_api_version_already = url
1285                    .query_pairs()
1286                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1287                if !has_api_version_already {
1288                    url.query_pairs_mut().append_pair(
1289                        azure_core::http::headers::query_param::API_VERSION,
1290                        "7.1-preview",
1291                    );
1292                }
1293                Ok(url)
1294            }
1295        }
1296        impl std::future::IntoFuture for RequestBuilder {
1297            type Output = azure_core::Result<models::TestRunStatistic>;
1298            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestRunStatistic>>;
1299            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1300            #[doc = ""]
1301            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1302            #[doc = ""]
1303            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1304            fn into_future(self) -> Self::IntoFuture {
1305                Box::pin(async move { self.send().await?.into_body().await })
1306            }
1307        }
1308    }
1309}
1310pub mod attachments {
1311    use super::models;
1312    #[cfg(not(target_arch = "wasm32"))]
1313    use futures::future::BoxFuture;
1314    #[cfg(target_arch = "wasm32")]
1315    use futures::future::LocalBoxFuture as BoxFuture;
1316    pub struct Client(pub(crate) super::Client);
1317    impl Client {
1318        #[doc = "Get list of test sub result attachments"]
1319        #[doc = ""]
1320        #[doc = "Arguments:"]
1321        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1322        #[doc = "* `project`: Project ID or project name"]
1323        #[doc = "* `run_id`: ID of the test run that contains the result."]
1324        #[doc = "* `test_case_result_id`: ID of the test results that contains sub result."]
1325        #[doc = "* `test_sub_result_id`: ID of the test sub result whose attachment has to be downloaded"]
1326        pub fn get_test_sub_result_attachments(
1327            &self,
1328            organization: impl Into<String>,
1329            project: impl Into<String>,
1330            run_id: i32,
1331            test_case_result_id: i32,
1332            test_sub_result_id: i32,
1333        ) -> get_test_sub_result_attachments::RequestBuilder {
1334            get_test_sub_result_attachments::RequestBuilder {
1335                client: self.0.clone(),
1336                organization: organization.into(),
1337                project: project.into(),
1338                run_id,
1339                test_case_result_id,
1340                test_sub_result_id,
1341            }
1342        }
1343        #[doc = "Attach a file to a test result"]
1344        #[doc = ""]
1345        #[doc = "Arguments:"]
1346        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1347        #[doc = "* `body`: Attachment Request Model."]
1348        #[doc = "* `project`: Project ID or project name"]
1349        #[doc = "* `run_id`: ID of the test run that contains the result."]
1350        #[doc = "* `test_case_result_id`: ID of the test results that contains sub result."]
1351        #[doc = "* `test_sub_result_id`: ID of the test sub results against which attachment has to be uploaded."]
1352        pub fn create_test_sub_result_attachment(
1353            &self,
1354            organization: impl Into<String>,
1355            body: impl Into<models::TestAttachmentRequestModel>,
1356            project: impl Into<String>,
1357            run_id: i32,
1358            test_case_result_id: i32,
1359            test_sub_result_id: i32,
1360        ) -> create_test_sub_result_attachment::RequestBuilder {
1361            create_test_sub_result_attachment::RequestBuilder {
1362                client: self.0.clone(),
1363                organization: organization.into(),
1364                body: body.into(),
1365                project: project.into(),
1366                run_id,
1367                test_case_result_id,
1368                test_sub_result_id,
1369            }
1370        }
1371        #[doc = "Download a test sub result attachment"]
1372        #[doc = ""]
1373        #[doc = "Arguments:"]
1374        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1375        #[doc = "* `project`: Project ID or project name"]
1376        #[doc = "* `run_id`: ID of the test run that contains the result."]
1377        #[doc = "* `test_case_result_id`: ID of the test results that contains sub result."]
1378        #[doc = "* `attachment_id`: ID of the test result attachment to be downloaded"]
1379        #[doc = "* `test_sub_result_id`: ID of the test sub result whose attachment has to be downloaded"]
1380        pub fn get_test_sub_result_attachment_zip(
1381            &self,
1382            organization: impl Into<String>,
1383            project: impl Into<String>,
1384            run_id: i32,
1385            test_case_result_id: i32,
1386            attachment_id: i32,
1387            test_sub_result_id: i32,
1388        ) -> get_test_sub_result_attachment_zip::RequestBuilder {
1389            get_test_sub_result_attachment_zip::RequestBuilder {
1390                client: self.0.clone(),
1391                organization: organization.into(),
1392                project: project.into(),
1393                run_id,
1394                test_case_result_id,
1395                attachment_id,
1396                test_sub_result_id,
1397            }
1398        }
1399        #[doc = "Get list of test run attachments reference."]
1400        #[doc = ""]
1401        #[doc = "Arguments:"]
1402        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1403        #[doc = "* `project`: Project ID or project name"]
1404        #[doc = "* `run_id`: ID of the test run."]
1405        pub fn get_test_run_attachments(
1406            &self,
1407            organization: impl Into<String>,
1408            project: impl Into<String>,
1409            run_id: i32,
1410        ) -> get_test_run_attachments::RequestBuilder {
1411            get_test_run_attachments::RequestBuilder {
1412                client: self.0.clone(),
1413                organization: organization.into(),
1414                project: project.into(),
1415                run_id,
1416            }
1417        }
1418        #[doc = "Attach a file to a test run."]
1419        #[doc = ""]
1420        #[doc = "Arguments:"]
1421        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1422        #[doc = "* `body`: Attachment details TestAttachmentRequestModel"]
1423        #[doc = "* `project`: Project ID or project name"]
1424        #[doc = "* `run_id`: ID of the test run against which attachment has to be uploaded."]
1425        pub fn create_test_run_attachment(
1426            &self,
1427            organization: impl Into<String>,
1428            body: impl Into<models::TestAttachmentRequestModel>,
1429            project: impl Into<String>,
1430            run_id: i32,
1431        ) -> create_test_run_attachment::RequestBuilder {
1432            create_test_run_attachment::RequestBuilder {
1433                client: self.0.clone(),
1434                organization: organization.into(),
1435                body: body.into(),
1436                project: project.into(),
1437                run_id,
1438            }
1439        }
1440        #[doc = "Download a test run attachment by its ID."]
1441        #[doc = ""]
1442        #[doc = "Arguments:"]
1443        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1444        #[doc = "* `project`: Project ID or project name"]
1445        #[doc = "* `run_id`: ID of the test run whose attachment has to be downloaded."]
1446        #[doc = "* `attachment_id`: ID of the test run attachment to be downloaded."]
1447        pub fn get_test_run_attachment_zip(
1448            &self,
1449            organization: impl Into<String>,
1450            project: impl Into<String>,
1451            run_id: i32,
1452            attachment_id: i32,
1453        ) -> get_test_run_attachment_zip::RequestBuilder {
1454            get_test_run_attachment_zip::RequestBuilder {
1455                client: self.0.clone(),
1456                organization: organization.into(),
1457                project: project.into(),
1458                run_id,
1459                attachment_id,
1460            }
1461        }
1462        #[doc = "Get list of test result attachments reference."]
1463        #[doc = ""]
1464        #[doc = "Arguments:"]
1465        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1466        #[doc = "* `project`: Project ID or project name"]
1467        #[doc = "* `run_id`: ID of the test run that contains the result."]
1468        #[doc = "* `test_case_result_id`: ID of the test result."]
1469        pub fn get_test_result_attachments(
1470            &self,
1471            organization: impl Into<String>,
1472            project: impl Into<String>,
1473            run_id: i32,
1474            test_case_result_id: i32,
1475        ) -> get_test_result_attachments::RequestBuilder {
1476            get_test_result_attachments::RequestBuilder {
1477                client: self.0.clone(),
1478                organization: organization.into(),
1479                project: project.into(),
1480                run_id,
1481                test_case_result_id,
1482            }
1483        }
1484        #[doc = "Attach a file to a test result."]
1485        #[doc = ""]
1486        #[doc = "Arguments:"]
1487        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1488        #[doc = "* `body`: Attachment details TestAttachmentRequestModel"]
1489        #[doc = "* `project`: Project ID or project name"]
1490        #[doc = "* `run_id`: ID of the test run that contains the result."]
1491        #[doc = "* `test_case_result_id`: ID of the test result against which attachment has to be uploaded."]
1492        pub fn create_test_result_attachment(
1493            &self,
1494            organization: impl Into<String>,
1495            body: impl Into<models::TestAttachmentRequestModel>,
1496            project: impl Into<String>,
1497            run_id: i32,
1498            test_case_result_id: i32,
1499        ) -> create_test_result_attachment::RequestBuilder {
1500            create_test_result_attachment::RequestBuilder {
1501                client: self.0.clone(),
1502                organization: organization.into(),
1503                body: body.into(),
1504                project: project.into(),
1505                run_id,
1506                test_case_result_id,
1507            }
1508        }
1509        #[doc = "Download a test result attachment by its ID."]
1510        #[doc = ""]
1511        #[doc = "Arguments:"]
1512        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1513        #[doc = "* `project`: Project ID or project name"]
1514        #[doc = "* `run_id`: ID of the test run that contains the testCaseResultId."]
1515        #[doc = "* `test_case_result_id`: ID of the test result whose attachment has to be downloaded."]
1516        #[doc = "* `attachment_id`: ID of the test result attachment to be downloaded."]
1517        pub fn get_test_result_attachment_zip(
1518            &self,
1519            organization: impl Into<String>,
1520            project: impl Into<String>,
1521            run_id: i32,
1522            test_case_result_id: i32,
1523            attachment_id: i32,
1524        ) -> get_test_result_attachment_zip::RequestBuilder {
1525            get_test_result_attachment_zip::RequestBuilder {
1526                client: self.0.clone(),
1527                organization: organization.into(),
1528                project: project.into(),
1529                run_id,
1530                test_case_result_id,
1531                attachment_id,
1532            }
1533        }
1534    }
1535    pub mod get_test_sub_result_attachments {
1536        use super::models;
1537        #[cfg(not(target_arch = "wasm32"))]
1538        use futures::future::BoxFuture;
1539        #[cfg(target_arch = "wasm32")]
1540        use futures::future::LocalBoxFuture as BoxFuture;
1541        #[derive(Debug)]
1542        pub struct Response(
1543            azure_core::http::Response<models::TestAttachmentList, azure_core::http::JsonFormat>,
1544        );
1545        impl Response {
1546            pub async fn into_body(self) -> azure_core::Result<models::TestAttachmentList> {
1547                self.0.into_body().await
1548            }
1549            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1550                self.0.into()
1551            }
1552        }
1553        #[derive(Clone)]
1554        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1555        #[doc = r""]
1556        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1557        #[doc = r" parameters can be chained."]
1558        #[doc = r""]
1559        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1560        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1561        #[doc = r" executes the request and returns a `Result` with the parsed"]
1562        #[doc = r" response."]
1563        #[doc = r""]
1564        #[doc = r" If you need lower-level access to the raw response details"]
1565        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1566        #[doc = r" can finalize the request using the"]
1567        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1568        #[doc = r" that resolves to a lower-level [`Response`] value."]
1569        pub struct RequestBuilder {
1570            pub(crate) client: super::super::Client,
1571            pub(crate) organization: String,
1572            pub(crate) project: String,
1573            pub(crate) run_id: i32,
1574            pub(crate) test_case_result_id: i32,
1575            pub(crate) test_sub_result_id: i32,
1576        }
1577        impl RequestBuilder {
1578            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1579            #[doc = ""]
1580            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1581            #[doc = "However, this function can provide more flexibility when required."]
1582            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1583                Box::pin({
1584                    let this = self.clone();
1585                    async move {
1586                        let url = this.url()?;
1587                        let mut req =
1588                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1589                        if let Some(auth_header) = this
1590                            .client
1591                            .token_credential()
1592                            .http_authorization_header(&this.client.scopes())
1593                            .await?
1594                        {
1595                            req.insert_header(
1596                                azure_core::http::headers::AUTHORIZATION,
1597                                auth_header,
1598                            );
1599                        }
1600                        let test_sub_result_id = &this.test_sub_result_id;
1601                        req.url_mut()
1602                            .query_pairs_mut()
1603                            .append_pair("testSubResultId", &test_sub_result_id.to_string());
1604                        let req_body = azure_core::Bytes::new();
1605                        req.set_body(req_body);
1606                        Ok(Response(this.client.send(&mut req).await?.into()))
1607                    }
1608                })
1609            }
1610            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1611                let mut url = azure_core::http::Url::parse(&format!(
1612                    "{}/{}/{}/_apis/test/Runs/{}/Results/{}/attachments?testSubResultId={}",
1613                    self.client.endpoint(),
1614                    &self.organization,
1615                    &self.project,
1616                    &self.run_id,
1617                    &self.test_case_result_id,
1618                    &self.test_sub_result_id
1619                ))?;
1620                let has_api_version_already = url
1621                    .query_pairs()
1622                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1623                if !has_api_version_already {
1624                    url.query_pairs_mut().append_pair(
1625                        azure_core::http::headers::query_param::API_VERSION,
1626                        "7.1-preview",
1627                    );
1628                }
1629                Ok(url)
1630            }
1631        }
1632        impl std::future::IntoFuture for RequestBuilder {
1633            type Output = azure_core::Result<models::TestAttachmentList>;
1634            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestAttachmentList>>;
1635            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1636            #[doc = ""]
1637            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1638            #[doc = ""]
1639            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1640            fn into_future(self) -> Self::IntoFuture {
1641                Box::pin(async move { self.send().await?.into_body().await })
1642            }
1643        }
1644    }
1645    pub mod create_test_sub_result_attachment {
1646        use super::models;
1647        #[cfg(not(target_arch = "wasm32"))]
1648        use futures::future::BoxFuture;
1649        #[cfg(target_arch = "wasm32")]
1650        use futures::future::LocalBoxFuture as BoxFuture;
1651        #[derive(Debug)]
1652        pub struct Response(
1653            azure_core::http::Response<
1654                models::TestAttachmentReference,
1655                azure_core::http::JsonFormat,
1656            >,
1657        );
1658        impl Response {
1659            pub async fn into_body(self) -> azure_core::Result<models::TestAttachmentReference> {
1660                self.0.into_body().await
1661            }
1662            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1663                self.0.into()
1664            }
1665        }
1666        #[derive(Clone)]
1667        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1668        #[doc = r""]
1669        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1670        #[doc = r" parameters can be chained."]
1671        #[doc = r""]
1672        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1673        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1674        #[doc = r" executes the request and returns a `Result` with the parsed"]
1675        #[doc = r" response."]
1676        #[doc = r""]
1677        #[doc = r" If you need lower-level access to the raw response details"]
1678        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1679        #[doc = r" can finalize the request using the"]
1680        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1681        #[doc = r" that resolves to a lower-level [`Response`] value."]
1682        pub struct RequestBuilder {
1683            pub(crate) client: super::super::Client,
1684            pub(crate) organization: String,
1685            pub(crate) body: models::TestAttachmentRequestModel,
1686            pub(crate) project: String,
1687            pub(crate) run_id: i32,
1688            pub(crate) test_case_result_id: i32,
1689            pub(crate) test_sub_result_id: i32,
1690        }
1691        impl RequestBuilder {
1692            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1693            #[doc = ""]
1694            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1695            #[doc = "However, this function can provide more flexibility when required."]
1696            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1697                Box::pin({
1698                    let this = self.clone();
1699                    async move {
1700                        let url = this.url()?;
1701                        let mut req =
1702                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
1703                        if let Some(auth_header) = this
1704                            .client
1705                            .token_credential()
1706                            .http_authorization_header(&this.client.scopes())
1707                            .await?
1708                        {
1709                            req.insert_header(
1710                                azure_core::http::headers::AUTHORIZATION,
1711                                auth_header,
1712                            );
1713                        }
1714                        req.insert_header("content-type", "application/json");
1715                        let req_body = azure_core::json::to_json(&this.body)?;
1716                        let test_sub_result_id = &this.test_sub_result_id;
1717                        req.url_mut()
1718                            .query_pairs_mut()
1719                            .append_pair("testSubResultId", &test_sub_result_id.to_string());
1720                        req.set_body(req_body);
1721                        Ok(Response(this.client.send(&mut req).await?.into()))
1722                    }
1723                })
1724            }
1725            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1726                let mut url = azure_core::http::Url::parse(&format!(
1727                    "{}/{}/{}/_apis/test/Runs/{}/Results/{}/attachments?testSubResultId={}",
1728                    self.client.endpoint(),
1729                    &self.organization,
1730                    &self.project,
1731                    &self.run_id,
1732                    &self.test_case_result_id,
1733                    &self.test_sub_result_id
1734                ))?;
1735                let has_api_version_already = url
1736                    .query_pairs()
1737                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1738                if !has_api_version_already {
1739                    url.query_pairs_mut().append_pair(
1740                        azure_core::http::headers::query_param::API_VERSION,
1741                        "7.1-preview",
1742                    );
1743                }
1744                Ok(url)
1745            }
1746        }
1747        impl std::future::IntoFuture for RequestBuilder {
1748            type Output = azure_core::Result<models::TestAttachmentReference>;
1749            type IntoFuture =
1750                BoxFuture<'static, azure_core::Result<models::TestAttachmentReference>>;
1751            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1752            #[doc = ""]
1753            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1754            #[doc = ""]
1755            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1756            fn into_future(self) -> Self::IntoFuture {
1757                Box::pin(async move { self.send().await?.into_body().await })
1758            }
1759        }
1760    }
1761    pub mod get_test_sub_result_attachment_zip {
1762        use super::models;
1763        #[cfg(not(target_arch = "wasm32"))]
1764        use futures::future::BoxFuture;
1765        #[cfg(target_arch = "wasm32")]
1766        use futures::future::LocalBoxFuture as BoxFuture;
1767        #[derive(Debug)]
1768        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
1769        impl Response {
1770            pub async fn into_body(self) -> azure_core::Result<String> {
1771                self.0.into_body().await
1772            }
1773            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1774                self.0.into()
1775            }
1776        }
1777        #[derive(Clone)]
1778        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1779        #[doc = r""]
1780        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1781        #[doc = r" parameters can be chained."]
1782        #[doc = r""]
1783        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1784        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1785        #[doc = r" executes the request and returns a `Result` with the parsed"]
1786        #[doc = r" response."]
1787        #[doc = r""]
1788        #[doc = r" If you need lower-level access to the raw response details"]
1789        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1790        #[doc = r" can finalize the request using the"]
1791        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1792        #[doc = r" that resolves to a lower-level [`Response`] value."]
1793        pub struct RequestBuilder {
1794            pub(crate) client: super::super::Client,
1795            pub(crate) organization: String,
1796            pub(crate) project: String,
1797            pub(crate) run_id: i32,
1798            pub(crate) test_case_result_id: i32,
1799            pub(crate) attachment_id: i32,
1800            pub(crate) test_sub_result_id: i32,
1801        }
1802        impl RequestBuilder {
1803            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1804            #[doc = ""]
1805            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1806            #[doc = "However, this function can provide more flexibility when required."]
1807            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1808                Box::pin({
1809                    let this = self.clone();
1810                    async move {
1811                        let url = this.url()?;
1812                        let mut req =
1813                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1814                        if let Some(auth_header) = this
1815                            .client
1816                            .token_credential()
1817                            .http_authorization_header(&this.client.scopes())
1818                            .await?
1819                        {
1820                            req.insert_header(
1821                                azure_core::http::headers::AUTHORIZATION,
1822                                auth_header,
1823                            );
1824                        }
1825                        let test_sub_result_id = &this.test_sub_result_id;
1826                        req.url_mut()
1827                            .query_pairs_mut()
1828                            .append_pair("testSubResultId", &test_sub_result_id.to_string());
1829                        let req_body = azure_core::Bytes::new();
1830                        req.set_body(req_body);
1831                        Ok(Response(this.client.send(&mut req).await?.into()))
1832                    }
1833                })
1834            }
1835            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1836                let mut url = azure_core::http::Url::parse(&format!(
1837                    "{}/{}/{}/_apis/test/Runs/{}/Results/{}/attachments/{}?testSubResultId={}",
1838                    self.client.endpoint(),
1839                    &self.organization,
1840                    &self.project,
1841                    &self.run_id,
1842                    &self.test_case_result_id,
1843                    &self.attachment_id,
1844                    &self.test_sub_result_id
1845                ))?;
1846                let has_api_version_already = url
1847                    .query_pairs()
1848                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1849                if !has_api_version_already {
1850                    url.query_pairs_mut().append_pair(
1851                        azure_core::http::headers::query_param::API_VERSION,
1852                        "7.1-preview",
1853                    );
1854                }
1855                Ok(url)
1856            }
1857        }
1858        impl std::future::IntoFuture for RequestBuilder {
1859            type Output = azure_core::Result<String>;
1860            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
1861            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1862            #[doc = ""]
1863            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1864            #[doc = ""]
1865            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1866            fn into_future(self) -> Self::IntoFuture {
1867                Box::pin(async move { self.send().await?.into_body().await })
1868            }
1869        }
1870    }
1871    pub mod get_test_run_attachments {
1872        use super::models;
1873        #[cfg(not(target_arch = "wasm32"))]
1874        use futures::future::BoxFuture;
1875        #[cfg(target_arch = "wasm32")]
1876        use futures::future::LocalBoxFuture as BoxFuture;
1877        #[derive(Debug)]
1878        pub struct Response(
1879            azure_core::http::Response<models::TestAttachmentList, azure_core::http::JsonFormat>,
1880        );
1881        impl Response {
1882            pub async fn into_body(self) -> azure_core::Result<models::TestAttachmentList> {
1883                self.0.into_body().await
1884            }
1885            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1886                self.0.into()
1887            }
1888        }
1889        #[derive(Clone)]
1890        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1891        #[doc = r""]
1892        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1893        #[doc = r" parameters can be chained."]
1894        #[doc = r""]
1895        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1896        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1897        #[doc = r" executes the request and returns a `Result` with the parsed"]
1898        #[doc = r" response."]
1899        #[doc = r""]
1900        #[doc = r" If you need lower-level access to the raw response details"]
1901        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1902        #[doc = r" can finalize the request using the"]
1903        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1904        #[doc = r" that resolves to a lower-level [`Response`] value."]
1905        pub struct RequestBuilder {
1906            pub(crate) client: super::super::Client,
1907            pub(crate) organization: String,
1908            pub(crate) project: String,
1909            pub(crate) run_id: i32,
1910        }
1911        impl RequestBuilder {
1912            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1913            #[doc = ""]
1914            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1915            #[doc = "However, this function can provide more flexibility when required."]
1916            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1917                Box::pin({
1918                    let this = self.clone();
1919                    async move {
1920                        let url = this.url()?;
1921                        let mut req =
1922                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1923                        if let Some(auth_header) = this
1924                            .client
1925                            .token_credential()
1926                            .http_authorization_header(&this.client.scopes())
1927                            .await?
1928                        {
1929                            req.insert_header(
1930                                azure_core::http::headers::AUTHORIZATION,
1931                                auth_header,
1932                            );
1933                        }
1934                        let req_body = azure_core::Bytes::new();
1935                        req.set_body(req_body);
1936                        Ok(Response(this.client.send(&mut req).await?.into()))
1937                    }
1938                })
1939            }
1940            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1941                let mut url = azure_core::http::Url::parse(&format!(
1942                    "{}/{}/{}/_apis/test/Runs/{}/attachments",
1943                    self.client.endpoint(),
1944                    &self.organization,
1945                    &self.project,
1946                    &self.run_id
1947                ))?;
1948                let has_api_version_already = url
1949                    .query_pairs()
1950                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1951                if !has_api_version_already {
1952                    url.query_pairs_mut().append_pair(
1953                        azure_core::http::headers::query_param::API_VERSION,
1954                        "7.1-preview",
1955                    );
1956                }
1957                Ok(url)
1958            }
1959        }
1960        impl std::future::IntoFuture for RequestBuilder {
1961            type Output = azure_core::Result<models::TestAttachmentList>;
1962            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestAttachmentList>>;
1963            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1964            #[doc = ""]
1965            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1966            #[doc = ""]
1967            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1968            fn into_future(self) -> Self::IntoFuture {
1969                Box::pin(async move { self.send().await?.into_body().await })
1970            }
1971        }
1972    }
1973    pub mod create_test_run_attachment {
1974        use super::models;
1975        #[cfg(not(target_arch = "wasm32"))]
1976        use futures::future::BoxFuture;
1977        #[cfg(target_arch = "wasm32")]
1978        use futures::future::LocalBoxFuture as BoxFuture;
1979        #[derive(Debug)]
1980        pub struct Response(
1981            azure_core::http::Response<
1982                models::TestAttachmentReference,
1983                azure_core::http::JsonFormat,
1984            >,
1985        );
1986        impl Response {
1987            pub async fn into_body(self) -> azure_core::Result<models::TestAttachmentReference> {
1988                self.0.into_body().await
1989            }
1990            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1991                self.0.into()
1992            }
1993        }
1994        #[derive(Clone)]
1995        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1996        #[doc = r""]
1997        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1998        #[doc = r" parameters can be chained."]
1999        #[doc = r""]
2000        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2001        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2002        #[doc = r" executes the request and returns a `Result` with the parsed"]
2003        #[doc = r" response."]
2004        #[doc = r""]
2005        #[doc = r" If you need lower-level access to the raw response details"]
2006        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2007        #[doc = r" can finalize the request using the"]
2008        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2009        #[doc = r" that resolves to a lower-level [`Response`] value."]
2010        pub struct RequestBuilder {
2011            pub(crate) client: super::super::Client,
2012            pub(crate) organization: String,
2013            pub(crate) body: models::TestAttachmentRequestModel,
2014            pub(crate) project: String,
2015            pub(crate) run_id: i32,
2016        }
2017        impl RequestBuilder {
2018            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2019            #[doc = ""]
2020            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2021            #[doc = "However, this function can provide more flexibility when required."]
2022            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2023                Box::pin({
2024                    let this = self.clone();
2025                    async move {
2026                        let url = this.url()?;
2027                        let mut req =
2028                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
2029                        if let Some(auth_header) = this
2030                            .client
2031                            .token_credential()
2032                            .http_authorization_header(&this.client.scopes())
2033                            .await?
2034                        {
2035                            req.insert_header(
2036                                azure_core::http::headers::AUTHORIZATION,
2037                                auth_header,
2038                            );
2039                        }
2040                        req.insert_header("content-type", "application/json");
2041                        let req_body = azure_core::json::to_json(&this.body)?;
2042                        req.set_body(req_body);
2043                        Ok(Response(this.client.send(&mut req).await?.into()))
2044                    }
2045                })
2046            }
2047            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2048                let mut url = azure_core::http::Url::parse(&format!(
2049                    "{}/{}/{}/_apis/test/Runs/{}/attachments",
2050                    self.client.endpoint(),
2051                    &self.organization,
2052                    &self.project,
2053                    &self.run_id
2054                ))?;
2055                let has_api_version_already = url
2056                    .query_pairs()
2057                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2058                if !has_api_version_already {
2059                    url.query_pairs_mut().append_pair(
2060                        azure_core::http::headers::query_param::API_VERSION,
2061                        "7.1-preview",
2062                    );
2063                }
2064                Ok(url)
2065            }
2066        }
2067        impl std::future::IntoFuture for RequestBuilder {
2068            type Output = azure_core::Result<models::TestAttachmentReference>;
2069            type IntoFuture =
2070                BoxFuture<'static, azure_core::Result<models::TestAttachmentReference>>;
2071            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2072            #[doc = ""]
2073            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2074            #[doc = ""]
2075            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2076            fn into_future(self) -> Self::IntoFuture {
2077                Box::pin(async move { self.send().await?.into_body().await })
2078            }
2079        }
2080    }
2081    pub mod get_test_run_attachment_zip {
2082        use super::models;
2083        #[cfg(not(target_arch = "wasm32"))]
2084        use futures::future::BoxFuture;
2085        #[cfg(target_arch = "wasm32")]
2086        use futures::future::LocalBoxFuture as BoxFuture;
2087        #[derive(Debug)]
2088        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
2089        impl Response {
2090            pub async fn into_body(self) -> azure_core::Result<String> {
2091                self.0.into_body().await
2092            }
2093            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2094                self.0.into()
2095            }
2096        }
2097        #[derive(Clone)]
2098        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2099        #[doc = r""]
2100        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2101        #[doc = r" parameters can be chained."]
2102        #[doc = r""]
2103        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2104        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2105        #[doc = r" executes the request and returns a `Result` with the parsed"]
2106        #[doc = r" response."]
2107        #[doc = r""]
2108        #[doc = r" If you need lower-level access to the raw response details"]
2109        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2110        #[doc = r" can finalize the request using the"]
2111        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2112        #[doc = r" that resolves to a lower-level [`Response`] value."]
2113        pub struct RequestBuilder {
2114            pub(crate) client: super::super::Client,
2115            pub(crate) organization: String,
2116            pub(crate) project: String,
2117            pub(crate) run_id: i32,
2118            pub(crate) attachment_id: i32,
2119        }
2120        impl RequestBuilder {
2121            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2122            #[doc = ""]
2123            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2124            #[doc = "However, this function can provide more flexibility when required."]
2125            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2126                Box::pin({
2127                    let this = self.clone();
2128                    async move {
2129                        let url = this.url()?;
2130                        let mut req =
2131                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2132                        if let Some(auth_header) = this
2133                            .client
2134                            .token_credential()
2135                            .http_authorization_header(&this.client.scopes())
2136                            .await?
2137                        {
2138                            req.insert_header(
2139                                azure_core::http::headers::AUTHORIZATION,
2140                                auth_header,
2141                            );
2142                        }
2143                        let req_body = azure_core::Bytes::new();
2144                        req.set_body(req_body);
2145                        Ok(Response(this.client.send(&mut req).await?.into()))
2146                    }
2147                })
2148            }
2149            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2150                let mut url = azure_core::http::Url::parse(&format!(
2151                    "{}/{}/{}/_apis/test/Runs/{}/attachments/{}",
2152                    self.client.endpoint(),
2153                    &self.organization,
2154                    &self.project,
2155                    &self.run_id,
2156                    &self.attachment_id
2157                ))?;
2158                let has_api_version_already = url
2159                    .query_pairs()
2160                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2161                if !has_api_version_already {
2162                    url.query_pairs_mut().append_pair(
2163                        azure_core::http::headers::query_param::API_VERSION,
2164                        "7.1-preview",
2165                    );
2166                }
2167                Ok(url)
2168            }
2169        }
2170        impl std::future::IntoFuture for RequestBuilder {
2171            type Output = azure_core::Result<String>;
2172            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
2173            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2174            #[doc = ""]
2175            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2176            #[doc = ""]
2177            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2178            fn into_future(self) -> Self::IntoFuture {
2179                Box::pin(async move { self.send().await?.into_body().await })
2180            }
2181        }
2182    }
2183    pub mod get_test_result_attachments {
2184        use super::models;
2185        #[cfg(not(target_arch = "wasm32"))]
2186        use futures::future::BoxFuture;
2187        #[cfg(target_arch = "wasm32")]
2188        use futures::future::LocalBoxFuture as BoxFuture;
2189        #[derive(Debug)]
2190        pub struct Response(
2191            azure_core::http::Response<models::TestAttachmentList, azure_core::http::JsonFormat>,
2192        );
2193        impl Response {
2194            pub async fn into_body(self) -> azure_core::Result<models::TestAttachmentList> {
2195                self.0.into_body().await
2196            }
2197            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2198                self.0.into()
2199            }
2200        }
2201        #[derive(Clone)]
2202        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2203        #[doc = r""]
2204        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2205        #[doc = r" parameters can be chained."]
2206        #[doc = r""]
2207        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2208        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2209        #[doc = r" executes the request and returns a `Result` with the parsed"]
2210        #[doc = r" response."]
2211        #[doc = r""]
2212        #[doc = r" If you need lower-level access to the raw response details"]
2213        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2214        #[doc = r" can finalize the request using the"]
2215        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2216        #[doc = r" that resolves to a lower-level [`Response`] value."]
2217        pub struct RequestBuilder {
2218            pub(crate) client: super::super::Client,
2219            pub(crate) organization: String,
2220            pub(crate) project: String,
2221            pub(crate) run_id: i32,
2222            pub(crate) test_case_result_id: i32,
2223        }
2224        impl RequestBuilder {
2225            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2226            #[doc = ""]
2227            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2228            #[doc = "However, this function can provide more flexibility when required."]
2229            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2230                Box::pin({
2231                    let this = self.clone();
2232                    async move {
2233                        let url = this.url()?;
2234                        let mut req =
2235                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2236                        if let Some(auth_header) = this
2237                            .client
2238                            .token_credential()
2239                            .http_authorization_header(&this.client.scopes())
2240                            .await?
2241                        {
2242                            req.insert_header(
2243                                azure_core::http::headers::AUTHORIZATION,
2244                                auth_header,
2245                            );
2246                        }
2247                        let req_body = azure_core::Bytes::new();
2248                        req.set_body(req_body);
2249                        Ok(Response(this.client.send(&mut req).await?.into()))
2250                    }
2251                })
2252            }
2253            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2254                let mut url = azure_core::http::Url::parse(&format!(
2255                    "{}/{}/{}/_apis/test/Runs/{}/Results/{}/attachments",
2256                    self.client.endpoint(),
2257                    &self.organization,
2258                    &self.project,
2259                    &self.run_id,
2260                    &self.test_case_result_id
2261                ))?;
2262                let has_api_version_already = url
2263                    .query_pairs()
2264                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2265                if !has_api_version_already {
2266                    url.query_pairs_mut().append_pair(
2267                        azure_core::http::headers::query_param::API_VERSION,
2268                        "7.1-preview",
2269                    );
2270                }
2271                Ok(url)
2272            }
2273        }
2274        impl std::future::IntoFuture for RequestBuilder {
2275            type Output = azure_core::Result<models::TestAttachmentList>;
2276            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestAttachmentList>>;
2277            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2278            #[doc = ""]
2279            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2280            #[doc = ""]
2281            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2282            fn into_future(self) -> Self::IntoFuture {
2283                Box::pin(async move { self.send().await?.into_body().await })
2284            }
2285        }
2286    }
2287    pub mod create_test_result_attachment {
2288        use super::models;
2289        #[cfg(not(target_arch = "wasm32"))]
2290        use futures::future::BoxFuture;
2291        #[cfg(target_arch = "wasm32")]
2292        use futures::future::LocalBoxFuture as BoxFuture;
2293        #[derive(Debug)]
2294        pub struct Response(
2295            azure_core::http::Response<
2296                models::TestAttachmentReference,
2297                azure_core::http::JsonFormat,
2298            >,
2299        );
2300        impl Response {
2301            pub async fn into_body(self) -> azure_core::Result<models::TestAttachmentReference> {
2302                self.0.into_body().await
2303            }
2304            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2305                self.0.into()
2306            }
2307        }
2308        #[derive(Clone)]
2309        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2310        #[doc = r""]
2311        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2312        #[doc = r" parameters can be chained."]
2313        #[doc = r""]
2314        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2315        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2316        #[doc = r" executes the request and returns a `Result` with the parsed"]
2317        #[doc = r" response."]
2318        #[doc = r""]
2319        #[doc = r" If you need lower-level access to the raw response details"]
2320        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2321        #[doc = r" can finalize the request using the"]
2322        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2323        #[doc = r" that resolves to a lower-level [`Response`] value."]
2324        pub struct RequestBuilder {
2325            pub(crate) client: super::super::Client,
2326            pub(crate) organization: String,
2327            pub(crate) body: models::TestAttachmentRequestModel,
2328            pub(crate) project: String,
2329            pub(crate) run_id: i32,
2330            pub(crate) test_case_result_id: i32,
2331        }
2332        impl RequestBuilder {
2333            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2334            #[doc = ""]
2335            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2336            #[doc = "However, this function can provide more flexibility when required."]
2337            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2338                Box::pin({
2339                    let this = self.clone();
2340                    async move {
2341                        let url = this.url()?;
2342                        let mut req =
2343                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
2344                        if let Some(auth_header) = this
2345                            .client
2346                            .token_credential()
2347                            .http_authorization_header(&this.client.scopes())
2348                            .await?
2349                        {
2350                            req.insert_header(
2351                                azure_core::http::headers::AUTHORIZATION,
2352                                auth_header,
2353                            );
2354                        }
2355                        req.insert_header("content-type", "application/json");
2356                        let req_body = azure_core::json::to_json(&this.body)?;
2357                        req.set_body(req_body);
2358                        Ok(Response(this.client.send(&mut req).await?.into()))
2359                    }
2360                })
2361            }
2362            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2363                let mut url = azure_core::http::Url::parse(&format!(
2364                    "{}/{}/{}/_apis/test/Runs/{}/Results/{}/attachments",
2365                    self.client.endpoint(),
2366                    &self.organization,
2367                    &self.project,
2368                    &self.run_id,
2369                    &self.test_case_result_id
2370                ))?;
2371                let has_api_version_already = url
2372                    .query_pairs()
2373                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2374                if !has_api_version_already {
2375                    url.query_pairs_mut().append_pair(
2376                        azure_core::http::headers::query_param::API_VERSION,
2377                        "7.1-preview",
2378                    );
2379                }
2380                Ok(url)
2381            }
2382        }
2383        impl std::future::IntoFuture for RequestBuilder {
2384            type Output = azure_core::Result<models::TestAttachmentReference>;
2385            type IntoFuture =
2386                BoxFuture<'static, azure_core::Result<models::TestAttachmentReference>>;
2387            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2388            #[doc = ""]
2389            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2390            #[doc = ""]
2391            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2392            fn into_future(self) -> Self::IntoFuture {
2393                Box::pin(async move { self.send().await?.into_body().await })
2394            }
2395        }
2396    }
2397    pub mod get_test_result_attachment_zip {
2398        use super::models;
2399        #[cfg(not(target_arch = "wasm32"))]
2400        use futures::future::BoxFuture;
2401        #[cfg(target_arch = "wasm32")]
2402        use futures::future::LocalBoxFuture as BoxFuture;
2403        #[derive(Debug)]
2404        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
2405        impl Response {
2406            pub async fn into_body(self) -> azure_core::Result<String> {
2407                self.0.into_body().await
2408            }
2409            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2410                self.0.into()
2411            }
2412        }
2413        #[derive(Clone)]
2414        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2415        #[doc = r""]
2416        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2417        #[doc = r" parameters can be chained."]
2418        #[doc = r""]
2419        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2420        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2421        #[doc = r" executes the request and returns a `Result` with the parsed"]
2422        #[doc = r" response."]
2423        #[doc = r""]
2424        #[doc = r" If you need lower-level access to the raw response details"]
2425        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2426        #[doc = r" can finalize the request using the"]
2427        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2428        #[doc = r" that resolves to a lower-level [`Response`] value."]
2429        pub struct RequestBuilder {
2430            pub(crate) client: super::super::Client,
2431            pub(crate) organization: String,
2432            pub(crate) project: String,
2433            pub(crate) run_id: i32,
2434            pub(crate) test_case_result_id: i32,
2435            pub(crate) attachment_id: i32,
2436        }
2437        impl RequestBuilder {
2438            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2439            #[doc = ""]
2440            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2441            #[doc = "However, this function can provide more flexibility when required."]
2442            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2443                Box::pin({
2444                    let this = self.clone();
2445                    async move {
2446                        let url = this.url()?;
2447                        let mut req =
2448                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2449                        if let Some(auth_header) = this
2450                            .client
2451                            .token_credential()
2452                            .http_authorization_header(&this.client.scopes())
2453                            .await?
2454                        {
2455                            req.insert_header(
2456                                azure_core::http::headers::AUTHORIZATION,
2457                                auth_header,
2458                            );
2459                        }
2460                        let req_body = azure_core::Bytes::new();
2461                        req.set_body(req_body);
2462                        Ok(Response(this.client.send(&mut req).await?.into()))
2463                    }
2464                })
2465            }
2466            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2467                let mut url = azure_core::http::Url::parse(&format!(
2468                    "{}/{}/{}/_apis/test/Runs/{}/Results/{}/attachments/{}",
2469                    self.client.endpoint(),
2470                    &self.organization,
2471                    &self.project,
2472                    &self.run_id,
2473                    &self.test_case_result_id,
2474                    &self.attachment_id
2475                ))?;
2476                let has_api_version_already = url
2477                    .query_pairs()
2478                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2479                if !has_api_version_already {
2480                    url.query_pairs_mut().append_pair(
2481                        azure_core::http::headers::query_param::API_VERSION,
2482                        "7.1-preview",
2483                    );
2484                }
2485                Ok(url)
2486            }
2487        }
2488        impl std::future::IntoFuture for RequestBuilder {
2489            type Output = azure_core::Result<String>;
2490            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
2491            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2492            #[doc = ""]
2493            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2494            #[doc = ""]
2495            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2496            fn into_future(self) -> Self::IntoFuture {
2497                Box::pin(async move { self.send().await?.into_body().await })
2498            }
2499        }
2500    }
2501}
2502pub mod code_coverage {
2503    use super::models;
2504    #[cfg(not(target_arch = "wasm32"))]
2505    use futures::future::BoxFuture;
2506    #[cfg(target_arch = "wasm32")]
2507    use futures::future::LocalBoxFuture as BoxFuture;
2508    pub struct Client(pub(crate) super::Client);
2509    impl Client {
2510        #[doc = "Get code coverage data for a build."]
2511        #[doc = ""]
2512        #[doc = "Arguments:"]
2513        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2514        #[doc = "* `project`: Project ID or project name"]
2515        #[doc = "* `build_id`: ID of the build for which code coverage data needs to be fetched."]
2516        #[doc = "* `flags`: Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData."]
2517        pub fn get_build_code_coverage(
2518            &self,
2519            organization: impl Into<String>,
2520            project: impl Into<String>,
2521            build_id: i32,
2522            flags: i32,
2523        ) -> get_build_code_coverage::RequestBuilder {
2524            get_build_code_coverage::RequestBuilder {
2525                client: self.0.clone(),
2526                organization: organization.into(),
2527                project: project.into(),
2528                build_id,
2529                flags,
2530            }
2531        }
2532        #[doc = "Get code coverage data for a test run"]
2533        #[doc = ""]
2534        #[doc = "Arguments:"]
2535        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2536        #[doc = "* `project`: Project ID or project name"]
2537        #[doc = "* `run_id`: ID of the test run for which code coverage data needs to be fetched."]
2538        #[doc = "* `flags`: Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData."]
2539        pub fn get_test_run_code_coverage(
2540            &self,
2541            organization: impl Into<String>,
2542            project: impl Into<String>,
2543            run_id: i32,
2544            flags: i32,
2545        ) -> get_test_run_code_coverage::RequestBuilder {
2546            get_test_run_code_coverage::RequestBuilder {
2547                client: self.0.clone(),
2548                organization: organization.into(),
2549                project: project.into(),
2550                run_id,
2551                flags,
2552            }
2553        }
2554    }
2555    pub mod get_build_code_coverage {
2556        use super::models;
2557        #[cfg(not(target_arch = "wasm32"))]
2558        use futures::future::BoxFuture;
2559        #[cfg(target_arch = "wasm32")]
2560        use futures::future::LocalBoxFuture as BoxFuture;
2561        #[derive(Debug)]
2562        pub struct Response(
2563            azure_core::http::Response<models::BuildCoverageList, azure_core::http::JsonFormat>,
2564        );
2565        impl Response {
2566            pub async fn into_body(self) -> azure_core::Result<models::BuildCoverageList> {
2567                self.0.into_body().await
2568            }
2569            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2570                self.0.into()
2571            }
2572        }
2573        #[derive(Clone)]
2574        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2575        #[doc = r""]
2576        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2577        #[doc = r" parameters can be chained."]
2578        #[doc = r""]
2579        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2580        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2581        #[doc = r" executes the request and returns a `Result` with the parsed"]
2582        #[doc = r" response."]
2583        #[doc = r""]
2584        #[doc = r" If you need lower-level access to the raw response details"]
2585        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2586        #[doc = r" can finalize the request using the"]
2587        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2588        #[doc = r" that resolves to a lower-level [`Response`] value."]
2589        pub struct RequestBuilder {
2590            pub(crate) client: super::super::Client,
2591            pub(crate) organization: String,
2592            pub(crate) project: String,
2593            pub(crate) build_id: i32,
2594            pub(crate) flags: i32,
2595        }
2596        impl RequestBuilder {
2597            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2598            #[doc = ""]
2599            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2600            #[doc = "However, this function can provide more flexibility when required."]
2601            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2602                Box::pin({
2603                    let this = self.clone();
2604                    async move {
2605                        let url = this.url()?;
2606                        let mut req =
2607                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2608                        if let Some(auth_header) = this
2609                            .client
2610                            .token_credential()
2611                            .http_authorization_header(&this.client.scopes())
2612                            .await?
2613                        {
2614                            req.insert_header(
2615                                azure_core::http::headers::AUTHORIZATION,
2616                                auth_header,
2617                            );
2618                        }
2619                        let build_id = &this.build_id;
2620                        req.url_mut()
2621                            .query_pairs_mut()
2622                            .append_pair("buildId", &build_id.to_string());
2623                        let flags = &this.flags;
2624                        req.url_mut()
2625                            .query_pairs_mut()
2626                            .append_pair("flags", &flags.to_string());
2627                        let req_body = azure_core::Bytes::new();
2628                        req.set_body(req_body);
2629                        Ok(Response(this.client.send(&mut req).await?.into()))
2630                    }
2631                })
2632            }
2633            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2634                let mut url = azure_core::http::Url::parse(&format!(
2635                    "{}/{}/{}/_apis/test/codecoverage",
2636                    self.client.endpoint(),
2637                    &self.organization,
2638                    &self.project
2639                ))?;
2640                let has_api_version_already = url
2641                    .query_pairs()
2642                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2643                if !has_api_version_already {
2644                    url.query_pairs_mut().append_pair(
2645                        azure_core::http::headers::query_param::API_VERSION,
2646                        "7.1-preview",
2647                    );
2648                }
2649                Ok(url)
2650            }
2651        }
2652        impl std::future::IntoFuture for RequestBuilder {
2653            type Output = azure_core::Result<models::BuildCoverageList>;
2654            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildCoverageList>>;
2655            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2656            #[doc = ""]
2657            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2658            #[doc = ""]
2659            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2660            fn into_future(self) -> Self::IntoFuture {
2661                Box::pin(async move { self.send().await?.into_body().await })
2662            }
2663        }
2664    }
2665    pub mod get_test_run_code_coverage {
2666        use super::models;
2667        #[cfg(not(target_arch = "wasm32"))]
2668        use futures::future::BoxFuture;
2669        #[cfg(target_arch = "wasm32")]
2670        use futures::future::LocalBoxFuture as BoxFuture;
2671        #[derive(Debug)]
2672        pub struct Response(
2673            azure_core::http::Response<models::TestRunCoverageList, azure_core::http::JsonFormat>,
2674        );
2675        impl Response {
2676            pub async fn into_body(self) -> azure_core::Result<models::TestRunCoverageList> {
2677                self.0.into_body().await
2678            }
2679            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2680                self.0.into()
2681            }
2682        }
2683        #[derive(Clone)]
2684        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2685        #[doc = r""]
2686        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2687        #[doc = r" parameters can be chained."]
2688        #[doc = r""]
2689        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2690        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2691        #[doc = r" executes the request and returns a `Result` with the parsed"]
2692        #[doc = r" response."]
2693        #[doc = r""]
2694        #[doc = r" If you need lower-level access to the raw response details"]
2695        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2696        #[doc = r" can finalize the request using the"]
2697        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2698        #[doc = r" that resolves to a lower-level [`Response`] value."]
2699        pub struct RequestBuilder {
2700            pub(crate) client: super::super::Client,
2701            pub(crate) organization: String,
2702            pub(crate) project: String,
2703            pub(crate) run_id: i32,
2704            pub(crate) flags: i32,
2705        }
2706        impl RequestBuilder {
2707            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2708            #[doc = ""]
2709            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2710            #[doc = "However, this function can provide more flexibility when required."]
2711            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2712                Box::pin({
2713                    let this = self.clone();
2714                    async move {
2715                        let url = this.url()?;
2716                        let mut req =
2717                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2718                        if let Some(auth_header) = this
2719                            .client
2720                            .token_credential()
2721                            .http_authorization_header(&this.client.scopes())
2722                            .await?
2723                        {
2724                            req.insert_header(
2725                                azure_core::http::headers::AUTHORIZATION,
2726                                auth_header,
2727                            );
2728                        }
2729                        let flags = &this.flags;
2730                        req.url_mut()
2731                            .query_pairs_mut()
2732                            .append_pair("flags", &flags.to_string());
2733                        let req_body = azure_core::Bytes::new();
2734                        req.set_body(req_body);
2735                        Ok(Response(this.client.send(&mut req).await?.into()))
2736                    }
2737                })
2738            }
2739            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2740                let mut url = azure_core::http::Url::parse(&format!(
2741                    "{}/{}/{}/_apis/test/Runs/{}/codecoverage",
2742                    self.client.endpoint(),
2743                    &self.organization,
2744                    &self.project,
2745                    &self.run_id
2746                ))?;
2747                let has_api_version_already = url
2748                    .query_pairs()
2749                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2750                if !has_api_version_already {
2751                    url.query_pairs_mut().append_pair(
2752                        azure_core::http::headers::query_param::API_VERSION,
2753                        "7.1-preview",
2754                    );
2755                }
2756                Ok(url)
2757            }
2758        }
2759        impl std::future::IntoFuture for RequestBuilder {
2760            type Output = azure_core::Result<models::TestRunCoverageList>;
2761            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestRunCoverageList>>;
2762            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2763            #[doc = ""]
2764            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2765            #[doc = ""]
2766            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2767            fn into_future(self) -> Self::IntoFuture {
2768                Box::pin(async move { self.send().await?.into_body().await })
2769            }
2770        }
2771    }
2772}
2773pub mod points {
2774    use super::models;
2775    #[cfg(not(target_arch = "wasm32"))]
2776    use futures::future::BoxFuture;
2777    #[cfg(target_arch = "wasm32")]
2778    use futures::future::LocalBoxFuture as BoxFuture;
2779    pub struct Client(pub(crate) super::Client);
2780    impl Client {
2781        #[doc = "Get a list of test points."]
2782        #[doc = ""]
2783        #[doc = "Arguments:"]
2784        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2785        #[doc = "* `project`: Project ID or project name"]
2786        #[doc = "* `plan_id`: ID of the test plan."]
2787        #[doc = "* `suite_id`: ID of the suite that contains the points."]
2788        pub fn list(
2789            &self,
2790            organization: impl Into<String>,
2791            project: impl Into<String>,
2792            plan_id: i32,
2793            suite_id: i32,
2794        ) -> list::RequestBuilder {
2795            list::RequestBuilder {
2796                client: self.0.clone(),
2797                organization: organization.into(),
2798                project: project.into(),
2799                plan_id,
2800                suite_id,
2801                wit_fields: None,
2802                configuration_id: None,
2803                test_case_id: None,
2804                test_point_ids: None,
2805                include_point_details: None,
2806                skip: None,
2807                top: None,
2808            }
2809        }
2810        #[doc = "Get a test point."]
2811        #[doc = ""]
2812        #[doc = "Arguments:"]
2813        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2814        #[doc = "* `project`: Project ID or project name"]
2815        #[doc = "* `plan_id`: ID of the test plan."]
2816        #[doc = "* `suite_id`: ID of the suite that contains the point."]
2817        #[doc = "* `point_ids`: ID of the test point to get."]
2818        pub fn get_point(
2819            &self,
2820            organization: impl Into<String>,
2821            project: impl Into<String>,
2822            plan_id: i32,
2823            suite_id: i32,
2824            point_ids: i32,
2825        ) -> get_point::RequestBuilder {
2826            get_point::RequestBuilder {
2827                client: self.0.clone(),
2828                organization: organization.into(),
2829                project: project.into(),
2830                plan_id,
2831                suite_id,
2832                point_ids,
2833                wit_fields: None,
2834            }
2835        }
2836        #[doc = "Update test points."]
2837        #[doc = ""]
2838        #[doc = "Arguments:"]
2839        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2840        #[doc = "* `body`: Data to update."]
2841        #[doc = "* `project`: Project ID or project name"]
2842        #[doc = "* `plan_id`: ID of the test plan."]
2843        #[doc = "* `suite_id`: ID of the suite that contains the points."]
2844        #[doc = "* `point_ids`: ID of the test point to get. Use a comma-separated list of IDs to update multiple test points."]
2845        pub fn update(
2846            &self,
2847            organization: impl Into<String>,
2848            body: impl Into<models::PointUpdateModel>,
2849            project: impl Into<String>,
2850            plan_id: i32,
2851            suite_id: i32,
2852            point_ids: impl Into<String>,
2853        ) -> update::RequestBuilder {
2854            update::RequestBuilder {
2855                client: self.0.clone(),
2856                organization: organization.into(),
2857                body: body.into(),
2858                project: project.into(),
2859                plan_id,
2860                suite_id,
2861                point_ids: point_ids.into(),
2862            }
2863        }
2864        #[doc = "Get test points using query."]
2865        #[doc = ""]
2866        #[doc = "Arguments:"]
2867        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2868        #[doc = "* `body`: TestPointsQuery to get test points."]
2869        #[doc = "* `project`: Project ID or project name"]
2870        pub fn get_points_by_query(
2871            &self,
2872            organization: impl Into<String>,
2873            body: impl Into<models::TestPointsQuery>,
2874            project: impl Into<String>,
2875        ) -> get_points_by_query::RequestBuilder {
2876            get_points_by_query::RequestBuilder {
2877                client: self.0.clone(),
2878                organization: organization.into(),
2879                body: body.into(),
2880                project: project.into(),
2881                skip: None,
2882                top: None,
2883            }
2884        }
2885    }
2886    pub mod list {
2887        use super::models;
2888        #[cfg(not(target_arch = "wasm32"))]
2889        use futures::future::BoxFuture;
2890        #[cfg(target_arch = "wasm32")]
2891        use futures::future::LocalBoxFuture as BoxFuture;
2892        #[derive(Debug)]
2893        pub struct Response(
2894            azure_core::http::Response<models::TestPointList, azure_core::http::JsonFormat>,
2895        );
2896        impl Response {
2897            pub async fn into_body(self) -> azure_core::Result<models::TestPointList> {
2898                self.0.into_body().await
2899            }
2900            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2901                self.0.into()
2902            }
2903        }
2904        #[derive(Clone)]
2905        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2906        #[doc = r""]
2907        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2908        #[doc = r" parameters can be chained."]
2909        #[doc = r""]
2910        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2911        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2912        #[doc = r" executes the request and returns a `Result` with the parsed"]
2913        #[doc = r" response."]
2914        #[doc = r""]
2915        #[doc = r" If you need lower-level access to the raw response details"]
2916        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2917        #[doc = r" can finalize the request using the"]
2918        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2919        #[doc = r" that resolves to a lower-level [`Response`] value."]
2920        pub struct RequestBuilder {
2921            pub(crate) client: super::super::Client,
2922            pub(crate) organization: String,
2923            pub(crate) project: String,
2924            pub(crate) plan_id: i32,
2925            pub(crate) suite_id: i32,
2926            pub(crate) wit_fields: Option<String>,
2927            pub(crate) configuration_id: Option<String>,
2928            pub(crate) test_case_id: Option<String>,
2929            pub(crate) test_point_ids: Option<String>,
2930            pub(crate) include_point_details: Option<bool>,
2931            pub(crate) skip: Option<i32>,
2932            pub(crate) top: Option<i32>,
2933        }
2934        impl RequestBuilder {
2935            #[doc = "Comma-separated list of work item field names."]
2936            pub fn wit_fields(mut self, wit_fields: impl Into<String>) -> Self {
2937                self.wit_fields = Some(wit_fields.into());
2938                self
2939            }
2940            #[doc = "Get test points for specific configuration."]
2941            pub fn configuration_id(mut self, configuration_id: impl Into<String>) -> Self {
2942                self.configuration_id = Some(configuration_id.into());
2943                self
2944            }
2945            #[doc = "Get test points for a specific test case, valid when configurationId is not set."]
2946            pub fn test_case_id(mut self, test_case_id: impl Into<String>) -> Self {
2947                self.test_case_id = Some(test_case_id.into());
2948                self
2949            }
2950            #[doc = "Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set."]
2951            pub fn test_point_ids(mut self, test_point_ids: impl Into<String>) -> Self {
2952                self.test_point_ids = Some(test_point_ids.into());
2953                self
2954            }
2955            #[doc = "Include all properties for the test point."]
2956            pub fn include_point_details(mut self, include_point_details: bool) -> Self {
2957                self.include_point_details = Some(include_point_details);
2958                self
2959            }
2960            #[doc = "Number of test points to skip."]
2961            pub fn skip(mut self, skip: i32) -> Self {
2962                self.skip = Some(skip);
2963                self
2964            }
2965            #[doc = "Number of test points to return."]
2966            pub fn top(mut self, top: i32) -> Self {
2967                self.top = Some(top);
2968                self
2969            }
2970            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2971            #[doc = ""]
2972            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2973            #[doc = "However, this function can provide more flexibility when required."]
2974            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2975                Box::pin({
2976                    let this = self.clone();
2977                    async move {
2978                        let url = this.url()?;
2979                        let mut req =
2980                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2981                        if let Some(auth_header) = this
2982                            .client
2983                            .token_credential()
2984                            .http_authorization_header(&this.client.scopes())
2985                            .await?
2986                        {
2987                            req.insert_header(
2988                                azure_core::http::headers::AUTHORIZATION,
2989                                auth_header,
2990                            );
2991                        }
2992                        if let Some(wit_fields) = &this.wit_fields {
2993                            req.url_mut()
2994                                .query_pairs_mut()
2995                                .append_pair("witFields", wit_fields);
2996                        }
2997                        if let Some(configuration_id) = &this.configuration_id {
2998                            req.url_mut()
2999                                .query_pairs_mut()
3000                                .append_pair("configurationId", configuration_id);
3001                        }
3002                        if let Some(test_case_id) = &this.test_case_id {
3003                            req.url_mut()
3004                                .query_pairs_mut()
3005                                .append_pair("testCaseId", test_case_id);
3006                        }
3007                        if let Some(test_point_ids) = &this.test_point_ids {
3008                            req.url_mut()
3009                                .query_pairs_mut()
3010                                .append_pair("testPointIds", test_point_ids);
3011                        }
3012                        if let Some(include_point_details) = &this.include_point_details {
3013                            req.url_mut().query_pairs_mut().append_pair(
3014                                "includePointDetails",
3015                                &include_point_details.to_string(),
3016                            );
3017                        }
3018                        if let Some(skip) = &this.skip {
3019                            req.url_mut()
3020                                .query_pairs_mut()
3021                                .append_pair("$skip", &skip.to_string());
3022                        }
3023                        if let Some(top) = &this.top {
3024                            req.url_mut()
3025                                .query_pairs_mut()
3026                                .append_pair("$top", &top.to_string());
3027                        }
3028                        let req_body = azure_core::Bytes::new();
3029                        req.set_body(req_body);
3030                        Ok(Response(this.client.send(&mut req).await?.into()))
3031                    }
3032                })
3033            }
3034            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3035                let mut url = azure_core::http::Url::parse(&format!(
3036                    "{}/{}/{}/_apis/test/Plans/{}/Suites/{}/points",
3037                    self.client.endpoint(),
3038                    &self.organization,
3039                    &self.project,
3040                    &self.plan_id,
3041                    &self.suite_id
3042                ))?;
3043                let has_api_version_already = url
3044                    .query_pairs()
3045                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3046                if !has_api_version_already {
3047                    url.query_pairs_mut().append_pair(
3048                        azure_core::http::headers::query_param::API_VERSION,
3049                        "7.1-preview",
3050                    );
3051                }
3052                Ok(url)
3053            }
3054        }
3055        impl std::future::IntoFuture for RequestBuilder {
3056            type Output = azure_core::Result<models::TestPointList>;
3057            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestPointList>>;
3058            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3059            #[doc = ""]
3060            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3061            #[doc = ""]
3062            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3063            fn into_future(self) -> Self::IntoFuture {
3064                Box::pin(async move { self.send().await?.into_body().await })
3065            }
3066        }
3067    }
3068    pub mod get_point {
3069        use super::models;
3070        #[cfg(not(target_arch = "wasm32"))]
3071        use futures::future::BoxFuture;
3072        #[cfg(target_arch = "wasm32")]
3073        use futures::future::LocalBoxFuture as BoxFuture;
3074        #[derive(Debug)]
3075        pub struct Response(
3076            azure_core::http::Response<models::TestPoint, azure_core::http::JsonFormat>,
3077        );
3078        impl Response {
3079            pub async fn into_body(self) -> azure_core::Result<models::TestPoint> {
3080                self.0.into_body().await
3081            }
3082            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3083                self.0.into()
3084            }
3085        }
3086        #[derive(Clone)]
3087        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3088        #[doc = r""]
3089        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3090        #[doc = r" parameters can be chained."]
3091        #[doc = r""]
3092        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3093        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3094        #[doc = r" executes the request and returns a `Result` with the parsed"]
3095        #[doc = r" response."]
3096        #[doc = r""]
3097        #[doc = r" If you need lower-level access to the raw response details"]
3098        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3099        #[doc = r" can finalize the request using the"]
3100        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3101        #[doc = r" that resolves to a lower-level [`Response`] value."]
3102        pub struct RequestBuilder {
3103            pub(crate) client: super::super::Client,
3104            pub(crate) organization: String,
3105            pub(crate) project: String,
3106            pub(crate) plan_id: i32,
3107            pub(crate) suite_id: i32,
3108            pub(crate) point_ids: i32,
3109            pub(crate) wit_fields: Option<String>,
3110        }
3111        impl RequestBuilder {
3112            #[doc = "Comma-separated list of work item field names."]
3113            pub fn wit_fields(mut self, wit_fields: impl Into<String>) -> Self {
3114                self.wit_fields = Some(wit_fields.into());
3115                self
3116            }
3117            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3118            #[doc = ""]
3119            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3120            #[doc = "However, this function can provide more flexibility when required."]
3121            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3122                Box::pin({
3123                    let this = self.clone();
3124                    async move {
3125                        let url = this.url()?;
3126                        let mut req =
3127                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
3128                        if let Some(auth_header) = this
3129                            .client
3130                            .token_credential()
3131                            .http_authorization_header(&this.client.scopes())
3132                            .await?
3133                        {
3134                            req.insert_header(
3135                                azure_core::http::headers::AUTHORIZATION,
3136                                auth_header,
3137                            );
3138                        }
3139                        if let Some(wit_fields) = &this.wit_fields {
3140                            req.url_mut()
3141                                .query_pairs_mut()
3142                                .append_pair("witFields", wit_fields);
3143                        }
3144                        let req_body = azure_core::Bytes::new();
3145                        req.set_body(req_body);
3146                        Ok(Response(this.client.send(&mut req).await?.into()))
3147                    }
3148                })
3149            }
3150            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3151                let mut url = azure_core::http::Url::parse(&format!(
3152                    "{}/{}/{}/_apis/test/Plans/{}/Suites/{}/points/{}",
3153                    self.client.endpoint(),
3154                    &self.organization,
3155                    &self.project,
3156                    &self.plan_id,
3157                    &self.suite_id,
3158                    &self.point_ids
3159                ))?;
3160                let has_api_version_already = url
3161                    .query_pairs()
3162                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3163                if !has_api_version_already {
3164                    url.query_pairs_mut().append_pair(
3165                        azure_core::http::headers::query_param::API_VERSION,
3166                        "7.1-preview",
3167                    );
3168                }
3169                Ok(url)
3170            }
3171        }
3172        impl std::future::IntoFuture for RequestBuilder {
3173            type Output = azure_core::Result<models::TestPoint>;
3174            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestPoint>>;
3175            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3176            #[doc = ""]
3177            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3178            #[doc = ""]
3179            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3180            fn into_future(self) -> Self::IntoFuture {
3181                Box::pin(async move { self.send().await?.into_body().await })
3182            }
3183        }
3184    }
3185    pub mod update {
3186        use super::models;
3187        #[cfg(not(target_arch = "wasm32"))]
3188        use futures::future::BoxFuture;
3189        #[cfg(target_arch = "wasm32")]
3190        use futures::future::LocalBoxFuture as BoxFuture;
3191        #[derive(Debug)]
3192        pub struct Response(
3193            azure_core::http::Response<models::TestPointList, azure_core::http::JsonFormat>,
3194        );
3195        impl Response {
3196            pub async fn into_body(self) -> azure_core::Result<models::TestPointList> {
3197                self.0.into_body().await
3198            }
3199            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3200                self.0.into()
3201            }
3202        }
3203        #[derive(Clone)]
3204        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3205        #[doc = r""]
3206        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3207        #[doc = r" parameters can be chained."]
3208        #[doc = r""]
3209        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3210        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3211        #[doc = r" executes the request and returns a `Result` with the parsed"]
3212        #[doc = r" response."]
3213        #[doc = r""]
3214        #[doc = r" If you need lower-level access to the raw response details"]
3215        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3216        #[doc = r" can finalize the request using the"]
3217        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3218        #[doc = r" that resolves to a lower-level [`Response`] value."]
3219        pub struct RequestBuilder {
3220            pub(crate) client: super::super::Client,
3221            pub(crate) organization: String,
3222            pub(crate) body: models::PointUpdateModel,
3223            pub(crate) project: String,
3224            pub(crate) plan_id: i32,
3225            pub(crate) suite_id: i32,
3226            pub(crate) point_ids: String,
3227        }
3228        impl RequestBuilder {
3229            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3230            #[doc = ""]
3231            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3232            #[doc = "However, this function can provide more flexibility when required."]
3233            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3234                Box::pin({
3235                    let this = self.clone();
3236                    async move {
3237                        let url = this.url()?;
3238                        let mut req =
3239                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
3240                        if let Some(auth_header) = this
3241                            .client
3242                            .token_credential()
3243                            .http_authorization_header(&this.client.scopes())
3244                            .await?
3245                        {
3246                            req.insert_header(
3247                                azure_core::http::headers::AUTHORIZATION,
3248                                auth_header,
3249                            );
3250                        }
3251                        req.insert_header("content-type", "application/json");
3252                        let req_body = azure_core::json::to_json(&this.body)?;
3253                        req.set_body(req_body);
3254                        Ok(Response(this.client.send(&mut req).await?.into()))
3255                    }
3256                })
3257            }
3258            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3259                let mut url = azure_core::http::Url::parse(&format!(
3260                    "{}/{}/{}/_apis/test/Plans/{}/Suites/{}/points/{}",
3261                    self.client.endpoint(),
3262                    &self.organization,
3263                    &self.project,
3264                    &self.plan_id,
3265                    &self.suite_id,
3266                    &self.point_ids
3267                ))?;
3268                let has_api_version_already = url
3269                    .query_pairs()
3270                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3271                if !has_api_version_already {
3272                    url.query_pairs_mut().append_pair(
3273                        azure_core::http::headers::query_param::API_VERSION,
3274                        "7.1-preview",
3275                    );
3276                }
3277                Ok(url)
3278            }
3279        }
3280        impl std::future::IntoFuture for RequestBuilder {
3281            type Output = azure_core::Result<models::TestPointList>;
3282            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestPointList>>;
3283            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3284            #[doc = ""]
3285            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3286            #[doc = ""]
3287            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3288            fn into_future(self) -> Self::IntoFuture {
3289                Box::pin(async move { self.send().await?.into_body().await })
3290            }
3291        }
3292    }
3293    pub mod get_points_by_query {
3294        use super::models;
3295        #[cfg(not(target_arch = "wasm32"))]
3296        use futures::future::BoxFuture;
3297        #[cfg(target_arch = "wasm32")]
3298        use futures::future::LocalBoxFuture as BoxFuture;
3299        #[derive(Debug)]
3300        pub struct Response(
3301            azure_core::http::Response<models::TestPointsQuery, azure_core::http::JsonFormat>,
3302        );
3303        impl Response {
3304            pub async fn into_body(self) -> azure_core::Result<models::TestPointsQuery> {
3305                self.0.into_body().await
3306            }
3307            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3308                self.0.into()
3309            }
3310        }
3311        #[derive(Clone)]
3312        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3313        #[doc = r""]
3314        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3315        #[doc = r" parameters can be chained."]
3316        #[doc = r""]
3317        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3318        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3319        #[doc = r" executes the request and returns a `Result` with the parsed"]
3320        #[doc = r" response."]
3321        #[doc = r""]
3322        #[doc = r" If you need lower-level access to the raw response details"]
3323        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3324        #[doc = r" can finalize the request using the"]
3325        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3326        #[doc = r" that resolves to a lower-level [`Response`] value."]
3327        pub struct RequestBuilder {
3328            pub(crate) client: super::super::Client,
3329            pub(crate) organization: String,
3330            pub(crate) body: models::TestPointsQuery,
3331            pub(crate) project: String,
3332            pub(crate) skip: Option<i32>,
3333            pub(crate) top: Option<i32>,
3334        }
3335        impl RequestBuilder {
3336            #[doc = "Number of test points to skip."]
3337            pub fn skip(mut self, skip: i32) -> Self {
3338                self.skip = Some(skip);
3339                self
3340            }
3341            #[doc = "Number of test points to return."]
3342            pub fn top(mut self, top: i32) -> Self {
3343                self.top = Some(top);
3344                self
3345            }
3346            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3347            #[doc = ""]
3348            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3349            #[doc = "However, this function can provide more flexibility when required."]
3350            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3351                Box::pin({
3352                    let this = self.clone();
3353                    async move {
3354                        let url = this.url()?;
3355                        let mut req =
3356                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
3357                        if let Some(auth_header) = this
3358                            .client
3359                            .token_credential()
3360                            .http_authorization_header(&this.client.scopes())
3361                            .await?
3362                        {
3363                            req.insert_header(
3364                                azure_core::http::headers::AUTHORIZATION,
3365                                auth_header,
3366                            );
3367                        }
3368                        req.insert_header("content-type", "application/json");
3369                        let req_body = azure_core::json::to_json(&this.body)?;
3370                        if let Some(skip) = &this.skip {
3371                            req.url_mut()
3372                                .query_pairs_mut()
3373                                .append_pair("$skip", &skip.to_string());
3374                        }
3375                        if let Some(top) = &this.top {
3376                            req.url_mut()
3377                                .query_pairs_mut()
3378                                .append_pair("$top", &top.to_string());
3379                        }
3380                        req.set_body(req_body);
3381                        Ok(Response(this.client.send(&mut req).await?.into()))
3382                    }
3383                })
3384            }
3385            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3386                let mut url = azure_core::http::Url::parse(&format!(
3387                    "{}/{}/{}/_apis/test/points",
3388                    self.client.endpoint(),
3389                    &self.organization,
3390                    &self.project
3391                ))?;
3392                let has_api_version_already = url
3393                    .query_pairs()
3394                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3395                if !has_api_version_already {
3396                    url.query_pairs_mut().append_pair(
3397                        azure_core::http::headers::query_param::API_VERSION,
3398                        "7.1-preview",
3399                    );
3400                }
3401                Ok(url)
3402            }
3403        }
3404        impl std::future::IntoFuture for RequestBuilder {
3405            type Output = azure_core::Result<models::TestPointsQuery>;
3406            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestPointsQuery>>;
3407            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3408            #[doc = ""]
3409            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3410            #[doc = ""]
3411            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3412            fn into_future(self) -> Self::IntoFuture {
3413                Box::pin(async move { self.send().await?.into_body().await })
3414            }
3415        }
3416    }
3417}
3418pub mod test_suites {
3419    use super::models;
3420    #[cfg(not(target_arch = "wasm32"))]
3421    use futures::future::BoxFuture;
3422    #[cfg(target_arch = "wasm32")]
3423    use futures::future::LocalBoxFuture as BoxFuture;
3424    pub struct Client(pub(crate) super::Client);
3425    impl Client {
3426        #[doc = "Get all test cases in a suite."]
3427        #[doc = ""]
3428        #[doc = "Arguments:"]
3429        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3430        #[doc = "* `project`: Project ID or project name"]
3431        #[doc = "* `plan_id`: ID of the test plan that contains the suites."]
3432        #[doc = "* `suite_id`: ID of the suite to get."]
3433        pub fn list(
3434            &self,
3435            organization: impl Into<String>,
3436            project: impl Into<String>,
3437            plan_id: i32,
3438            suite_id: i32,
3439        ) -> list::RequestBuilder {
3440            list::RequestBuilder {
3441                client: self.0.clone(),
3442                organization: organization.into(),
3443                project: project.into(),
3444                plan_id,
3445                suite_id,
3446            }
3447        }
3448        #[doc = "Get a specific test case in a test suite with test case id."]
3449        #[doc = ""]
3450        #[doc = "Arguments:"]
3451        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3452        #[doc = "* `project`: Project ID or project name"]
3453        #[doc = "* `plan_id`: ID of the test plan that contains the suites."]
3454        #[doc = "* `suite_id`: ID of the suite that contains the test case."]
3455        #[doc = "* `test_case_ids`: ID of the test case to get."]
3456        pub fn get(
3457            &self,
3458            organization: impl Into<String>,
3459            project: impl Into<String>,
3460            plan_id: i32,
3461            suite_id: i32,
3462            test_case_ids: i32,
3463        ) -> get::RequestBuilder {
3464            get::RequestBuilder {
3465                client: self.0.clone(),
3466                organization: organization.into(),
3467                project: project.into(),
3468                plan_id,
3469                suite_id,
3470                test_case_ids,
3471            }
3472        }
3473        #[doc = "Add test cases to suite."]
3474        #[doc = ""]
3475        #[doc = "Arguments:"]
3476        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3477        #[doc = "* `project`: Project ID or project name"]
3478        #[doc = "* `plan_id`: ID of the test plan that contains the suite."]
3479        #[doc = "* `suite_id`: ID of the test suite to which the test cases must be added."]
3480        #[doc = "* `test_case_ids`: IDs of the test cases to add to the suite. Ids are specified in comma separated format."]
3481        pub fn add(
3482            &self,
3483            organization: impl Into<String>,
3484            project: impl Into<String>,
3485            plan_id: i32,
3486            suite_id: i32,
3487            test_case_ids: impl Into<String>,
3488        ) -> add::RequestBuilder {
3489            add::RequestBuilder {
3490                client: self.0.clone(),
3491                organization: organization.into(),
3492                project: project.into(),
3493                plan_id,
3494                suite_id,
3495                test_case_ids: test_case_ids.into(),
3496            }
3497        }
3498        #[doc = "Updates the properties of the test case association in a suite."]
3499        #[doc = ""]
3500        #[doc = "Arguments:"]
3501        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3502        #[doc = "* `body`: Model for updation of the properties of test case suite association."]
3503        #[doc = "* `project`: Project ID or project name"]
3504        #[doc = "* `plan_id`: ID of the test plan that contains the suite."]
3505        #[doc = "* `suite_id`: ID of the test suite to which the test cases must be added."]
3506        #[doc = "* `test_case_ids`: IDs of the test cases to add to the suite. Ids are specified in comma separated format."]
3507        pub fn update(
3508            &self,
3509            organization: impl Into<String>,
3510            body: impl Into<models::SuiteTestCaseUpdateModel>,
3511            project: impl Into<String>,
3512            plan_id: i32,
3513            suite_id: i32,
3514            test_case_ids: impl Into<String>,
3515        ) -> update::RequestBuilder {
3516            update::RequestBuilder {
3517                client: self.0.clone(),
3518                organization: organization.into(),
3519                body: body.into(),
3520                project: project.into(),
3521                plan_id,
3522                suite_id,
3523                test_case_ids: test_case_ids.into(),
3524            }
3525        }
3526        #[doc = "The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently."]
3527        #[doc = ""]
3528        #[doc = "Arguments:"]
3529        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3530        #[doc = "* `project`: Project ID or project name"]
3531        #[doc = "* `plan_id`: ID of the test plan that contains the suite."]
3532        #[doc = "* `suite_id`: ID of the suite to get."]
3533        #[doc = "* `test_case_ids`: IDs of the test cases to remove from the suite."]
3534        pub fn remove_test_cases_from_suite_url(
3535            &self,
3536            organization: impl Into<String>,
3537            project: impl Into<String>,
3538            plan_id: i32,
3539            suite_id: i32,
3540            test_case_ids: impl Into<String>,
3541        ) -> remove_test_cases_from_suite_url::RequestBuilder {
3542            remove_test_cases_from_suite_url::RequestBuilder {
3543                client: self.0.clone(),
3544                organization: organization.into(),
3545                project: project.into(),
3546                plan_id,
3547                suite_id,
3548                test_case_ids: test_case_ids.into(),
3549            }
3550        }
3551    }
3552    pub mod list {
3553        use super::models;
3554        #[cfg(not(target_arch = "wasm32"))]
3555        use futures::future::BoxFuture;
3556        #[cfg(target_arch = "wasm32")]
3557        use futures::future::LocalBoxFuture as BoxFuture;
3558        #[derive(Debug)]
3559        pub struct Response(
3560            azure_core::http::Response<models::SuiteTestCaseList, azure_core::http::JsonFormat>,
3561        );
3562        impl Response {
3563            pub async fn into_body(self) -> azure_core::Result<models::SuiteTestCaseList> {
3564                self.0.into_body().await
3565            }
3566            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3567                self.0.into()
3568            }
3569        }
3570        #[derive(Clone)]
3571        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3572        #[doc = r""]
3573        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3574        #[doc = r" parameters can be chained."]
3575        #[doc = r""]
3576        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3577        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3578        #[doc = r" executes the request and returns a `Result` with the parsed"]
3579        #[doc = r" response."]
3580        #[doc = r""]
3581        #[doc = r" If you need lower-level access to the raw response details"]
3582        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3583        #[doc = r" can finalize the request using the"]
3584        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3585        #[doc = r" that resolves to a lower-level [`Response`] value."]
3586        pub struct RequestBuilder {
3587            pub(crate) client: super::super::Client,
3588            pub(crate) organization: String,
3589            pub(crate) project: String,
3590            pub(crate) plan_id: i32,
3591            pub(crate) suite_id: i32,
3592        }
3593        impl RequestBuilder {
3594            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3595            #[doc = ""]
3596            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3597            #[doc = "However, this function can provide more flexibility when required."]
3598            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3599                Box::pin({
3600                    let this = self.clone();
3601                    async move {
3602                        let url = this.url()?;
3603                        let mut req =
3604                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
3605                        if let Some(auth_header) = this
3606                            .client
3607                            .token_credential()
3608                            .http_authorization_header(&this.client.scopes())
3609                            .await?
3610                        {
3611                            req.insert_header(
3612                                azure_core::http::headers::AUTHORIZATION,
3613                                auth_header,
3614                            );
3615                        }
3616                        let req_body = azure_core::Bytes::new();
3617                        req.set_body(req_body);
3618                        Ok(Response(this.client.send(&mut req).await?.into()))
3619                    }
3620                })
3621            }
3622            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3623                let mut url = azure_core::http::Url::parse(&format!(
3624                    "{}/{}/{}/_apis/test/Plans/{}/suites/{}/testcases",
3625                    self.client.endpoint(),
3626                    &self.organization,
3627                    &self.project,
3628                    &self.plan_id,
3629                    &self.suite_id
3630                ))?;
3631                let has_api_version_already = url
3632                    .query_pairs()
3633                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3634                if !has_api_version_already {
3635                    url.query_pairs_mut().append_pair(
3636                        azure_core::http::headers::query_param::API_VERSION,
3637                        "7.1-preview",
3638                    );
3639                }
3640                Ok(url)
3641            }
3642        }
3643        impl std::future::IntoFuture for RequestBuilder {
3644            type Output = azure_core::Result<models::SuiteTestCaseList>;
3645            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SuiteTestCaseList>>;
3646            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3647            #[doc = ""]
3648            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3649            #[doc = ""]
3650            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3651            fn into_future(self) -> Self::IntoFuture {
3652                Box::pin(async move { self.send().await?.into_body().await })
3653            }
3654        }
3655    }
3656    pub mod get {
3657        use super::models;
3658        #[cfg(not(target_arch = "wasm32"))]
3659        use futures::future::BoxFuture;
3660        #[cfg(target_arch = "wasm32")]
3661        use futures::future::LocalBoxFuture as BoxFuture;
3662        #[derive(Debug)]
3663        pub struct Response(
3664            azure_core::http::Response<models::SuiteTestCase, azure_core::http::JsonFormat>,
3665        );
3666        impl Response {
3667            pub async fn into_body(self) -> azure_core::Result<models::SuiteTestCase> {
3668                self.0.into_body().await
3669            }
3670            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3671                self.0.into()
3672            }
3673        }
3674        #[derive(Clone)]
3675        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3676        #[doc = r""]
3677        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3678        #[doc = r" parameters can be chained."]
3679        #[doc = r""]
3680        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3681        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3682        #[doc = r" executes the request and returns a `Result` with the parsed"]
3683        #[doc = r" response."]
3684        #[doc = r""]
3685        #[doc = r" If you need lower-level access to the raw response details"]
3686        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3687        #[doc = r" can finalize the request using the"]
3688        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3689        #[doc = r" that resolves to a lower-level [`Response`] value."]
3690        pub struct RequestBuilder {
3691            pub(crate) client: super::super::Client,
3692            pub(crate) organization: String,
3693            pub(crate) project: String,
3694            pub(crate) plan_id: i32,
3695            pub(crate) suite_id: i32,
3696            pub(crate) test_case_ids: i32,
3697        }
3698        impl RequestBuilder {
3699            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3700            #[doc = ""]
3701            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3702            #[doc = "However, this function can provide more flexibility when required."]
3703            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3704                Box::pin({
3705                    let this = self.clone();
3706                    async move {
3707                        let url = this.url()?;
3708                        let mut req =
3709                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
3710                        if let Some(auth_header) = this
3711                            .client
3712                            .token_credential()
3713                            .http_authorization_header(&this.client.scopes())
3714                            .await?
3715                        {
3716                            req.insert_header(
3717                                azure_core::http::headers::AUTHORIZATION,
3718                                auth_header,
3719                            );
3720                        }
3721                        let req_body = azure_core::Bytes::new();
3722                        req.set_body(req_body);
3723                        Ok(Response(this.client.send(&mut req).await?.into()))
3724                    }
3725                })
3726            }
3727            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3728                let mut url = azure_core::http::Url::parse(&format!(
3729                    "{}/{}/{}/_apis/test/Plans/{}/suites/{}/testcases/{}",
3730                    self.client.endpoint(),
3731                    &self.organization,
3732                    &self.project,
3733                    &self.plan_id,
3734                    &self.suite_id,
3735                    &self.test_case_ids
3736                ))?;
3737                let has_api_version_already = url
3738                    .query_pairs()
3739                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3740                if !has_api_version_already {
3741                    url.query_pairs_mut().append_pair(
3742                        azure_core::http::headers::query_param::API_VERSION,
3743                        "7.1-preview",
3744                    );
3745                }
3746                Ok(url)
3747            }
3748        }
3749        impl std::future::IntoFuture for RequestBuilder {
3750            type Output = azure_core::Result<models::SuiteTestCase>;
3751            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SuiteTestCase>>;
3752            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3753            #[doc = ""]
3754            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3755            #[doc = ""]
3756            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3757            fn into_future(self) -> Self::IntoFuture {
3758                Box::pin(async move { self.send().await?.into_body().await })
3759            }
3760        }
3761    }
3762    pub mod add {
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(
3770            azure_core::http::Response<models::SuiteTestCaseList, azure_core::http::JsonFormat>,
3771        );
3772        impl Response {
3773            pub async fn into_body(self) -> azure_core::Result<models::SuiteTestCaseList> {
3774                self.0.into_body().await
3775            }
3776            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3777                self.0.into()
3778            }
3779        }
3780        #[derive(Clone)]
3781        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3782        #[doc = r""]
3783        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3784        #[doc = r" parameters can be chained."]
3785        #[doc = r""]
3786        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3787        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3788        #[doc = r" executes the request and returns a `Result` with the parsed"]
3789        #[doc = r" response."]
3790        #[doc = r""]
3791        #[doc = r" If you need lower-level access to the raw response details"]
3792        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3793        #[doc = r" can finalize the request using the"]
3794        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3795        #[doc = r" that resolves to a lower-level [`Response`] value."]
3796        pub struct RequestBuilder {
3797            pub(crate) client: super::super::Client,
3798            pub(crate) organization: String,
3799            pub(crate) project: String,
3800            pub(crate) plan_id: i32,
3801            pub(crate) suite_id: i32,
3802            pub(crate) test_case_ids: String,
3803        }
3804        impl RequestBuilder {
3805            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3806            #[doc = ""]
3807            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3808            #[doc = "However, this function can provide more flexibility when required."]
3809            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3810                Box::pin({
3811                    let this = self.clone();
3812                    async move {
3813                        let url = this.url()?;
3814                        let mut req =
3815                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
3816                        if let Some(auth_header) = this
3817                            .client
3818                            .token_credential()
3819                            .http_authorization_header(&this.client.scopes())
3820                            .await?
3821                        {
3822                            req.insert_header(
3823                                azure_core::http::headers::AUTHORIZATION,
3824                                auth_header,
3825                            );
3826                        }
3827                        let req_body = azure_core::Bytes::new();
3828                        req.insert_header(azure_core::http::headers::CONTENT_LENGTH, "0");
3829                        req.set_body(req_body);
3830                        Ok(Response(this.client.send(&mut req).await?.into()))
3831                    }
3832                })
3833            }
3834            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3835                let mut url = azure_core::http::Url::parse(&format!(
3836                    "{}/{}/{}/_apis/test/Plans/{}/suites/{}/testcases/{}",
3837                    self.client.endpoint(),
3838                    &self.organization,
3839                    &self.project,
3840                    &self.plan_id,
3841                    &self.suite_id,
3842                    &self.test_case_ids
3843                ))?;
3844                let has_api_version_already = url
3845                    .query_pairs()
3846                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3847                if !has_api_version_already {
3848                    url.query_pairs_mut().append_pair(
3849                        azure_core::http::headers::query_param::API_VERSION,
3850                        "7.1-preview",
3851                    );
3852                }
3853                Ok(url)
3854            }
3855        }
3856        impl std::future::IntoFuture for RequestBuilder {
3857            type Output = azure_core::Result<models::SuiteTestCaseList>;
3858            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SuiteTestCaseList>>;
3859            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3860            #[doc = ""]
3861            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3862            #[doc = ""]
3863            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3864            fn into_future(self) -> Self::IntoFuture {
3865                Box::pin(async move { self.send().await?.into_body().await })
3866            }
3867        }
3868    }
3869    pub mod update {
3870        use super::models;
3871        #[cfg(not(target_arch = "wasm32"))]
3872        use futures::future::BoxFuture;
3873        #[cfg(target_arch = "wasm32")]
3874        use futures::future::LocalBoxFuture as BoxFuture;
3875        #[derive(Debug)]
3876        pub struct Response(
3877            azure_core::http::Response<models::SuiteTestCaseList, azure_core::http::JsonFormat>,
3878        );
3879        impl Response {
3880            pub async fn into_body(self) -> azure_core::Result<models::SuiteTestCaseList> {
3881                self.0.into_body().await
3882            }
3883            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3884                self.0.into()
3885            }
3886        }
3887        #[derive(Clone)]
3888        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3889        #[doc = r""]
3890        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3891        #[doc = r" parameters can be chained."]
3892        #[doc = r""]
3893        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3894        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3895        #[doc = r" executes the request and returns a `Result` with the parsed"]
3896        #[doc = r" response."]
3897        #[doc = r""]
3898        #[doc = r" If you need lower-level access to the raw response details"]
3899        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3900        #[doc = r" can finalize the request using the"]
3901        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3902        #[doc = r" that resolves to a lower-level [`Response`] value."]
3903        pub struct RequestBuilder {
3904            pub(crate) client: super::super::Client,
3905            pub(crate) organization: String,
3906            pub(crate) body: models::SuiteTestCaseUpdateModel,
3907            pub(crate) project: String,
3908            pub(crate) plan_id: i32,
3909            pub(crate) suite_id: i32,
3910            pub(crate) test_case_ids: String,
3911        }
3912        impl RequestBuilder {
3913            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3914            #[doc = ""]
3915            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3916            #[doc = "However, this function can provide more flexibility when required."]
3917            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3918                Box::pin({
3919                    let this = self.clone();
3920                    async move {
3921                        let url = this.url()?;
3922                        let mut req =
3923                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
3924                        if let Some(auth_header) = this
3925                            .client
3926                            .token_credential()
3927                            .http_authorization_header(&this.client.scopes())
3928                            .await?
3929                        {
3930                            req.insert_header(
3931                                azure_core::http::headers::AUTHORIZATION,
3932                                auth_header,
3933                            );
3934                        }
3935                        req.insert_header("content-type", "application/json");
3936                        let req_body = azure_core::json::to_json(&this.body)?;
3937                        req.set_body(req_body);
3938                        Ok(Response(this.client.send(&mut req).await?.into()))
3939                    }
3940                })
3941            }
3942            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3943                let mut url = azure_core::http::Url::parse(&format!(
3944                    "{}/{}/{}/_apis/test/Plans/{}/suites/{}/testcases/{}",
3945                    self.client.endpoint(),
3946                    &self.organization,
3947                    &self.project,
3948                    &self.plan_id,
3949                    &self.suite_id,
3950                    &self.test_case_ids
3951                ))?;
3952                let has_api_version_already = url
3953                    .query_pairs()
3954                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3955                if !has_api_version_already {
3956                    url.query_pairs_mut().append_pair(
3957                        azure_core::http::headers::query_param::API_VERSION,
3958                        "7.1-preview",
3959                    );
3960                }
3961                Ok(url)
3962            }
3963        }
3964        impl std::future::IntoFuture for RequestBuilder {
3965            type Output = azure_core::Result<models::SuiteTestCaseList>;
3966            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SuiteTestCaseList>>;
3967            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3968            #[doc = ""]
3969            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3970            #[doc = ""]
3971            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3972            fn into_future(self) -> Self::IntoFuture {
3973                Box::pin(async move { self.send().await?.into_body().await })
3974            }
3975        }
3976    }
3977    pub mod remove_test_cases_from_suite_url {
3978        use super::models;
3979        #[cfg(not(target_arch = "wasm32"))]
3980        use futures::future::BoxFuture;
3981        #[cfg(target_arch = "wasm32")]
3982        use futures::future::LocalBoxFuture as BoxFuture;
3983        #[derive(Debug)]
3984        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
3985        impl Response {
3986            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3987                self.0.into()
3988            }
3989        }
3990        #[derive(Clone)]
3991        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3992        #[doc = r""]
3993        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3994        #[doc = r" parameters can be chained."]
3995        #[doc = r""]
3996        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3997        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3998        #[doc = r" executes the request and returns a `Result` with the parsed"]
3999        #[doc = r" response."]
4000        #[doc = r""]
4001        #[doc = r" If you need lower-level access to the raw response details"]
4002        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4003        #[doc = r" can finalize the request using the"]
4004        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4005        #[doc = r" that resolves to a lower-level [`Response`] value."]
4006        pub struct RequestBuilder {
4007            pub(crate) client: super::super::Client,
4008            pub(crate) organization: String,
4009            pub(crate) project: String,
4010            pub(crate) plan_id: i32,
4011            pub(crate) suite_id: i32,
4012            pub(crate) test_case_ids: String,
4013        }
4014        impl RequestBuilder {
4015            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4016            #[doc = ""]
4017            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4018            #[doc = "However, this function can provide more flexibility when required."]
4019            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4020                Box::pin({
4021                    let this = self.clone();
4022                    async move {
4023                        let url = this.url()?;
4024                        let mut req =
4025                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
4026                        if let Some(auth_header) = this
4027                            .client
4028                            .token_credential()
4029                            .http_authorization_header(&this.client.scopes())
4030                            .await?
4031                        {
4032                            req.insert_header(
4033                                azure_core::http::headers::AUTHORIZATION,
4034                                auth_header,
4035                            );
4036                        }
4037                        let req_body = azure_core::Bytes::new();
4038                        req.set_body(req_body);
4039                        Ok(Response(this.client.send(&mut req).await?.into()))
4040                    }
4041                })
4042            }
4043            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4044                let mut url = azure_core::http::Url::parse(&format!(
4045                    "{}/{}/{}/_apis/test/Plans/{}/suites/{}/testcases/{}",
4046                    self.client.endpoint(),
4047                    &self.organization,
4048                    &self.project,
4049                    &self.plan_id,
4050                    &self.suite_id,
4051                    &self.test_case_ids
4052                ))?;
4053                let has_api_version_already = url
4054                    .query_pairs()
4055                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4056                if !has_api_version_already {
4057                    url.query_pairs_mut().append_pair(
4058                        azure_core::http::headers::query_param::API_VERSION,
4059                        "7.1-preview",
4060                    );
4061                }
4062                Ok(url)
4063            }
4064        }
4065        impl std::future::IntoFuture for RequestBuilder {
4066            type Output = azure_core::Result<()>;
4067            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
4068            #[doc = "Returns a future that sends the request and waits for the response."]
4069            #[doc = ""]
4070            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4071            #[doc = ""]
4072            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4073            fn into_future(self) -> Self::IntoFuture {
4074                Box::pin(async move {
4075                    let _rsp = self.send().await?;
4076                    Ok(())
4077                })
4078            }
4079        }
4080    }
4081}
4082pub mod result_retention_settings {
4083    use super::models;
4084    #[cfg(not(target_arch = "wasm32"))]
4085    use futures::future::BoxFuture;
4086    #[cfg(target_arch = "wasm32")]
4087    use futures::future::LocalBoxFuture as BoxFuture;
4088    pub struct Client(pub(crate) super::Client);
4089    impl Client {
4090        #[doc = "Get test result retention settings"]
4091        #[doc = ""]
4092        #[doc = "Arguments:"]
4093        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4094        #[doc = "* `project`: Project ID or project name"]
4095        pub fn get(
4096            &self,
4097            organization: impl Into<String>,
4098            project: impl Into<String>,
4099        ) -> get::RequestBuilder {
4100            get::RequestBuilder {
4101                client: self.0.clone(),
4102                organization: organization.into(),
4103                project: project.into(),
4104            }
4105        }
4106        #[doc = "Update test result retention settings"]
4107        #[doc = ""]
4108        #[doc = "Arguments:"]
4109        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4110        #[doc = "* `body`: Test result retention settings details to be updated"]
4111        #[doc = "* `project`: Project ID or project name"]
4112        pub fn update(
4113            &self,
4114            organization: impl Into<String>,
4115            body: impl Into<models::ResultRetentionSettings>,
4116            project: impl Into<String>,
4117        ) -> update::RequestBuilder {
4118            update::RequestBuilder {
4119                client: self.0.clone(),
4120                organization: organization.into(),
4121                body: body.into(),
4122                project: project.into(),
4123            }
4124        }
4125    }
4126    pub mod get {
4127        use super::models;
4128        #[cfg(not(target_arch = "wasm32"))]
4129        use futures::future::BoxFuture;
4130        #[cfg(target_arch = "wasm32")]
4131        use futures::future::LocalBoxFuture as BoxFuture;
4132        #[derive(Debug)]
4133        pub struct Response(
4134            azure_core::http::Response<
4135                models::ResultRetentionSettings,
4136                azure_core::http::JsonFormat,
4137            >,
4138        );
4139        impl Response {
4140            pub async fn into_body(self) -> azure_core::Result<models::ResultRetentionSettings> {
4141                self.0.into_body().await
4142            }
4143            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4144                self.0.into()
4145            }
4146        }
4147        #[derive(Clone)]
4148        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4149        #[doc = r""]
4150        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4151        #[doc = r" parameters can be chained."]
4152        #[doc = r""]
4153        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4154        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4155        #[doc = r" executes the request and returns a `Result` with the parsed"]
4156        #[doc = r" response."]
4157        #[doc = r""]
4158        #[doc = r" If you need lower-level access to the raw response details"]
4159        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4160        #[doc = r" can finalize the request using the"]
4161        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4162        #[doc = r" that resolves to a lower-level [`Response`] value."]
4163        pub struct RequestBuilder {
4164            pub(crate) client: super::super::Client,
4165            pub(crate) organization: String,
4166            pub(crate) project: String,
4167        }
4168        impl RequestBuilder {
4169            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4170            #[doc = ""]
4171            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4172            #[doc = "However, this function can provide more flexibility when required."]
4173            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4174                Box::pin({
4175                    let this = self.clone();
4176                    async move {
4177                        let url = this.url()?;
4178                        let mut req =
4179                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4180                        if let Some(auth_header) = this
4181                            .client
4182                            .token_credential()
4183                            .http_authorization_header(&this.client.scopes())
4184                            .await?
4185                        {
4186                            req.insert_header(
4187                                azure_core::http::headers::AUTHORIZATION,
4188                                auth_header,
4189                            );
4190                        }
4191                        let req_body = azure_core::Bytes::new();
4192                        req.set_body(req_body);
4193                        Ok(Response(this.client.send(&mut req).await?.into()))
4194                    }
4195                })
4196            }
4197            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4198                let mut url = azure_core::http::Url::parse(&format!(
4199                    "{}/{}/{}/_apis/test/resultretentionsettings",
4200                    self.client.endpoint(),
4201                    &self.organization,
4202                    &self.project
4203                ))?;
4204                let has_api_version_already = url
4205                    .query_pairs()
4206                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4207                if !has_api_version_already {
4208                    url.query_pairs_mut().append_pair(
4209                        azure_core::http::headers::query_param::API_VERSION,
4210                        "7.1-preview",
4211                    );
4212                }
4213                Ok(url)
4214            }
4215        }
4216        impl std::future::IntoFuture for RequestBuilder {
4217            type Output = azure_core::Result<models::ResultRetentionSettings>;
4218            type IntoFuture =
4219                BoxFuture<'static, azure_core::Result<models::ResultRetentionSettings>>;
4220            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4221            #[doc = ""]
4222            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4223            #[doc = ""]
4224            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4225            fn into_future(self) -> Self::IntoFuture {
4226                Box::pin(async move { self.send().await?.into_body().await })
4227            }
4228        }
4229    }
4230    pub mod update {
4231        use super::models;
4232        #[cfg(not(target_arch = "wasm32"))]
4233        use futures::future::BoxFuture;
4234        #[cfg(target_arch = "wasm32")]
4235        use futures::future::LocalBoxFuture as BoxFuture;
4236        #[derive(Debug)]
4237        pub struct Response(
4238            azure_core::http::Response<
4239                models::ResultRetentionSettings,
4240                azure_core::http::JsonFormat,
4241            >,
4242        );
4243        impl Response {
4244            pub async fn into_body(self) -> azure_core::Result<models::ResultRetentionSettings> {
4245                self.0.into_body().await
4246            }
4247            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4248                self.0.into()
4249            }
4250        }
4251        #[derive(Clone)]
4252        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4253        #[doc = r""]
4254        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4255        #[doc = r" parameters can be chained."]
4256        #[doc = r""]
4257        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4258        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4259        #[doc = r" executes the request and returns a `Result` with the parsed"]
4260        #[doc = r" response."]
4261        #[doc = r""]
4262        #[doc = r" If you need lower-level access to the raw response details"]
4263        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4264        #[doc = r" can finalize the request using the"]
4265        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4266        #[doc = r" that resolves to a lower-level [`Response`] value."]
4267        pub struct RequestBuilder {
4268            pub(crate) client: super::super::Client,
4269            pub(crate) organization: String,
4270            pub(crate) body: models::ResultRetentionSettings,
4271            pub(crate) project: String,
4272        }
4273        impl RequestBuilder {
4274            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4275            #[doc = ""]
4276            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4277            #[doc = "However, this function can provide more flexibility when required."]
4278            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4279                Box::pin({
4280                    let this = self.clone();
4281                    async move {
4282                        let url = this.url()?;
4283                        let mut req =
4284                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
4285                        if let Some(auth_header) = this
4286                            .client
4287                            .token_credential()
4288                            .http_authorization_header(&this.client.scopes())
4289                            .await?
4290                        {
4291                            req.insert_header(
4292                                azure_core::http::headers::AUTHORIZATION,
4293                                auth_header,
4294                            );
4295                        }
4296                        req.insert_header("content-type", "application/json");
4297                        let req_body = azure_core::json::to_json(&this.body)?;
4298                        req.set_body(req_body);
4299                        Ok(Response(this.client.send(&mut req).await?.into()))
4300                    }
4301                })
4302            }
4303            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4304                let mut url = azure_core::http::Url::parse(&format!(
4305                    "{}/{}/{}/_apis/test/resultretentionsettings",
4306                    self.client.endpoint(),
4307                    &self.organization,
4308                    &self.project
4309                ))?;
4310                let has_api_version_already = url
4311                    .query_pairs()
4312                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4313                if !has_api_version_already {
4314                    url.query_pairs_mut().append_pair(
4315                        azure_core::http::headers::query_param::API_VERSION,
4316                        "7.1-preview",
4317                    );
4318                }
4319                Ok(url)
4320            }
4321        }
4322        impl std::future::IntoFuture for RequestBuilder {
4323            type Output = azure_core::Result<models::ResultRetentionSettings>;
4324            type IntoFuture =
4325                BoxFuture<'static, azure_core::Result<models::ResultRetentionSettings>>;
4326            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4327            #[doc = ""]
4328            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4329            #[doc = ""]
4330            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4331            fn into_future(self) -> Self::IntoFuture {
4332                Box::pin(async move { self.send().await?.into_body().await })
4333            }
4334        }
4335    }
4336}
4337pub mod test_history {
4338    use super::models;
4339    #[cfg(not(target_arch = "wasm32"))]
4340    use futures::future::BoxFuture;
4341    #[cfg(target_arch = "wasm32")]
4342    use futures::future::LocalBoxFuture as BoxFuture;
4343    pub struct Client(pub(crate) super::Client);
4344    impl Client {
4345        #[doc = "Get history of a test method using TestHistoryQuery"]
4346        #[doc = ""]
4347        #[doc = "Arguments:"]
4348        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4349        #[doc = "* `body`: TestHistoryQuery to get history"]
4350        #[doc = "* `project`: Project ID or project name"]
4351        pub fn query(
4352            &self,
4353            organization: impl Into<String>,
4354            body: impl Into<models::TestHistoryQuery>,
4355            project: impl Into<String>,
4356        ) -> query::RequestBuilder {
4357            query::RequestBuilder {
4358                client: self.0.clone(),
4359                organization: organization.into(),
4360                body: body.into(),
4361                project: project.into(),
4362            }
4363        }
4364    }
4365    pub mod query {
4366        use super::models;
4367        #[cfg(not(target_arch = "wasm32"))]
4368        use futures::future::BoxFuture;
4369        #[cfg(target_arch = "wasm32")]
4370        use futures::future::LocalBoxFuture as BoxFuture;
4371        #[derive(Debug)]
4372        pub struct Response(
4373            azure_core::http::Response<models::TestHistoryQuery, azure_core::http::JsonFormat>,
4374        );
4375        impl Response {
4376            pub async fn into_body(self) -> azure_core::Result<models::TestHistoryQuery> {
4377                self.0.into_body().await
4378            }
4379            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4380                self.0.into()
4381            }
4382        }
4383        #[derive(Clone)]
4384        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4385        #[doc = r""]
4386        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4387        #[doc = r" parameters can be chained."]
4388        #[doc = r""]
4389        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4390        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4391        #[doc = r" executes the request and returns a `Result` with the parsed"]
4392        #[doc = r" response."]
4393        #[doc = r""]
4394        #[doc = r" If you need lower-level access to the raw response details"]
4395        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4396        #[doc = r" can finalize the request using the"]
4397        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4398        #[doc = r" that resolves to a lower-level [`Response`] value."]
4399        pub struct RequestBuilder {
4400            pub(crate) client: super::super::Client,
4401            pub(crate) organization: String,
4402            pub(crate) body: models::TestHistoryQuery,
4403            pub(crate) project: String,
4404        }
4405        impl RequestBuilder {
4406            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4407            #[doc = ""]
4408            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4409            #[doc = "However, this function can provide more flexibility when required."]
4410            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4411                Box::pin({
4412                    let this = self.clone();
4413                    async move {
4414                        let url = this.url()?;
4415                        let mut req =
4416                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
4417                        if let Some(auth_header) = this
4418                            .client
4419                            .token_credential()
4420                            .http_authorization_header(&this.client.scopes())
4421                            .await?
4422                        {
4423                            req.insert_header(
4424                                azure_core::http::headers::AUTHORIZATION,
4425                                auth_header,
4426                            );
4427                        }
4428                        req.insert_header("content-type", "application/json");
4429                        let req_body = azure_core::json::to_json(&this.body)?;
4430                        req.set_body(req_body);
4431                        Ok(Response(this.client.send(&mut req).await?.into()))
4432                    }
4433                })
4434            }
4435            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4436                let mut url = azure_core::http::Url::parse(&format!(
4437                    "{}/{}/{}/_apis/test/Results/testhistory",
4438                    self.client.endpoint(),
4439                    &self.organization,
4440                    &self.project
4441                ))?;
4442                let has_api_version_already = url
4443                    .query_pairs()
4444                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4445                if !has_api_version_already {
4446                    url.query_pairs_mut().append_pair(
4447                        azure_core::http::headers::query_param::API_VERSION,
4448                        "7.1-preview",
4449                    );
4450                }
4451                Ok(url)
4452            }
4453        }
4454        impl std::future::IntoFuture for RequestBuilder {
4455            type Output = azure_core::Result<models::TestHistoryQuery>;
4456            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestHistoryQuery>>;
4457            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4458            #[doc = ""]
4459            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4460            #[doc = ""]
4461            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4462            fn into_future(self) -> Self::IntoFuture {
4463                Box::pin(async move { self.send().await?.into_body().await })
4464            }
4465        }
4466    }
4467}
4468pub mod results {
4469    use super::models;
4470    #[cfg(not(target_arch = "wasm32"))]
4471    use futures::future::BoxFuture;
4472    #[cfg(target_arch = "wasm32")]
4473    use futures::future::LocalBoxFuture as BoxFuture;
4474    pub struct Client(pub(crate) super::Client);
4475    impl Client {
4476        #[doc = "Get test results for a test run."]
4477        #[doc = ""]
4478        #[doc = "Arguments:"]
4479        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4480        #[doc = "* `project`: Project ID or project name"]
4481        #[doc = "* `run_id`: Test run ID of test results to fetch."]
4482        pub fn list(
4483            &self,
4484            organization: impl Into<String>,
4485            project: impl Into<String>,
4486            run_id: i32,
4487        ) -> list::RequestBuilder {
4488            list::RequestBuilder {
4489                client: self.0.clone(),
4490                organization: organization.into(),
4491                project: project.into(),
4492                run_id,
4493                details_to_include: None,
4494                skip: None,
4495                top: None,
4496                outcomes: None,
4497            }
4498        }
4499        #[doc = "Add test results to a test run."]
4500        #[doc = ""]
4501        #[doc = "Arguments:"]
4502        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4503        #[doc = "* `body`: List of test results to add."]
4504        #[doc = "* `project`: Project ID or project name"]
4505        #[doc = "* `run_id`: Test run ID into which test results to add."]
4506        pub fn add(
4507            &self,
4508            organization: impl Into<String>,
4509            body: Vec<models::TestCaseResult>,
4510            project: impl Into<String>,
4511            run_id: i32,
4512        ) -> add::RequestBuilder {
4513            add::RequestBuilder {
4514                client: self.0.clone(),
4515                organization: organization.into(),
4516                body,
4517                project: project.into(),
4518                run_id,
4519            }
4520        }
4521        #[doc = "Update test results in a test run."]
4522        #[doc = ""]
4523        #[doc = "Arguments:"]
4524        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4525        #[doc = "* `body`: List of test results to update."]
4526        #[doc = "* `project`: Project ID or project name"]
4527        #[doc = "* `run_id`: Test run ID whose test results to update."]
4528        pub fn update(
4529            &self,
4530            organization: impl Into<String>,
4531            body: Vec<models::TestCaseResult>,
4532            project: impl Into<String>,
4533            run_id: i32,
4534        ) -> update::RequestBuilder {
4535            update::RequestBuilder {
4536                client: self.0.clone(),
4537                organization: organization.into(),
4538                body,
4539                project: project.into(),
4540                run_id,
4541            }
4542        }
4543        #[doc = "Get a test result for a test run."]
4544        #[doc = ""]
4545        #[doc = "Arguments:"]
4546        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4547        #[doc = "* `project`: Project ID or project name"]
4548        #[doc = "* `run_id`: Test run ID of a test result to fetch."]
4549        #[doc = "* `test_case_result_id`: Test result ID."]
4550        pub fn get(
4551            &self,
4552            organization: impl Into<String>,
4553            project: impl Into<String>,
4554            run_id: i32,
4555            test_case_result_id: i32,
4556        ) -> get::RequestBuilder {
4557            get::RequestBuilder {
4558                client: self.0.clone(),
4559                organization: organization.into(),
4560                project: project.into(),
4561                run_id,
4562                test_case_result_id,
4563                details_to_include: None,
4564            }
4565        }
4566    }
4567    pub mod list {
4568        use super::models;
4569        #[cfg(not(target_arch = "wasm32"))]
4570        use futures::future::BoxFuture;
4571        #[cfg(target_arch = "wasm32")]
4572        use futures::future::LocalBoxFuture as BoxFuture;
4573        #[derive(Debug)]
4574        pub struct Response(
4575            azure_core::http::Response<models::TestCaseResultList, azure_core::http::JsonFormat>,
4576        );
4577        impl Response {
4578            pub async fn into_body(self) -> azure_core::Result<models::TestCaseResultList> {
4579                self.0.into_body().await
4580            }
4581            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4582                self.0.into()
4583            }
4584        }
4585        #[derive(Clone)]
4586        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4587        #[doc = r""]
4588        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4589        #[doc = r" parameters can be chained."]
4590        #[doc = r""]
4591        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4592        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4593        #[doc = r" executes the request and returns a `Result` with the parsed"]
4594        #[doc = r" response."]
4595        #[doc = r""]
4596        #[doc = r" If you need lower-level access to the raw response details"]
4597        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4598        #[doc = r" can finalize the request using the"]
4599        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4600        #[doc = r" that resolves to a lower-level [`Response`] value."]
4601        pub struct RequestBuilder {
4602            pub(crate) client: super::super::Client,
4603            pub(crate) organization: String,
4604            pub(crate) project: String,
4605            pub(crate) run_id: i32,
4606            pub(crate) details_to_include: Option<String>,
4607            pub(crate) skip: Option<i32>,
4608            pub(crate) top: Option<i32>,
4609            pub(crate) outcomes: Option<String>,
4610        }
4611        impl RequestBuilder {
4612            #[doc = "Details to include with test results. Default is None. Other values are Iterations and WorkItems."]
4613            pub fn details_to_include(mut self, details_to_include: impl Into<String>) -> Self {
4614                self.details_to_include = Some(details_to_include.into());
4615                self
4616            }
4617            #[doc = "Number of test results to skip from beginning."]
4618            pub fn skip(mut self, skip: i32) -> Self {
4619                self.skip = Some(skip);
4620                self
4621            }
4622            #[doc = "Number of test results to return. Maximum is 1000 when details_to_include is None and 200 otherwise."]
4623            pub fn top(mut self, top: i32) -> Self {
4624                self.top = Some(top);
4625                self
4626            }
4627            #[doc = "Comma separated list of test outcomes to filter test results."]
4628            pub fn outcomes(mut self, outcomes: impl Into<String>) -> Self {
4629                self.outcomes = Some(outcomes.into());
4630                self
4631            }
4632            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4633            #[doc = ""]
4634            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4635            #[doc = "However, this function can provide more flexibility when required."]
4636            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4637                Box::pin({
4638                    let this = self.clone();
4639                    async move {
4640                        let url = this.url()?;
4641                        let mut req =
4642                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4643                        if let Some(auth_header) = this
4644                            .client
4645                            .token_credential()
4646                            .http_authorization_header(&this.client.scopes())
4647                            .await?
4648                        {
4649                            req.insert_header(
4650                                azure_core::http::headers::AUTHORIZATION,
4651                                auth_header,
4652                            );
4653                        }
4654                        if let Some(details_to_include) = &this.details_to_include {
4655                            req.url_mut()
4656                                .query_pairs_mut()
4657                                .append_pair("detailsToInclude", details_to_include);
4658                        }
4659                        if let Some(skip) = &this.skip {
4660                            req.url_mut()
4661                                .query_pairs_mut()
4662                                .append_pair("$skip", &skip.to_string());
4663                        }
4664                        if let Some(top) = &this.top {
4665                            req.url_mut()
4666                                .query_pairs_mut()
4667                                .append_pair("$top", &top.to_string());
4668                        }
4669                        if let Some(outcomes) = &this.outcomes {
4670                            req.url_mut()
4671                                .query_pairs_mut()
4672                                .append_pair("outcomes", outcomes);
4673                        }
4674                        let req_body = azure_core::Bytes::new();
4675                        req.set_body(req_body);
4676                        Ok(Response(this.client.send(&mut req).await?.into()))
4677                    }
4678                })
4679            }
4680            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4681                let mut url = azure_core::http::Url::parse(&format!(
4682                    "{}/{}/{}/_apis/test/Runs/{}/results",
4683                    self.client.endpoint(),
4684                    &self.organization,
4685                    &self.project,
4686                    &self.run_id
4687                ))?;
4688                let has_api_version_already = url
4689                    .query_pairs()
4690                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4691                if !has_api_version_already {
4692                    url.query_pairs_mut().append_pair(
4693                        azure_core::http::headers::query_param::API_VERSION,
4694                        "7.1-preview",
4695                    );
4696                }
4697                Ok(url)
4698            }
4699        }
4700        impl std::future::IntoFuture for RequestBuilder {
4701            type Output = azure_core::Result<models::TestCaseResultList>;
4702            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestCaseResultList>>;
4703            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4704            #[doc = ""]
4705            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4706            #[doc = ""]
4707            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4708            fn into_future(self) -> Self::IntoFuture {
4709                Box::pin(async move { self.send().await?.into_body().await })
4710            }
4711        }
4712    }
4713    pub mod add {
4714        use super::models;
4715        #[cfg(not(target_arch = "wasm32"))]
4716        use futures::future::BoxFuture;
4717        #[cfg(target_arch = "wasm32")]
4718        use futures::future::LocalBoxFuture as BoxFuture;
4719        #[derive(Debug)]
4720        pub struct Response(
4721            azure_core::http::Response<models::TestCaseResultList, azure_core::http::JsonFormat>,
4722        );
4723        impl Response {
4724            pub async fn into_body(self) -> azure_core::Result<models::TestCaseResultList> {
4725                self.0.into_body().await
4726            }
4727            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4728                self.0.into()
4729            }
4730        }
4731        #[derive(Clone)]
4732        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4733        #[doc = r""]
4734        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4735        #[doc = r" parameters can be chained."]
4736        #[doc = r""]
4737        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4738        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4739        #[doc = r" executes the request and returns a `Result` with the parsed"]
4740        #[doc = r" response."]
4741        #[doc = r""]
4742        #[doc = r" If you need lower-level access to the raw response details"]
4743        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4744        #[doc = r" can finalize the request using the"]
4745        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4746        #[doc = r" that resolves to a lower-level [`Response`] value."]
4747        pub struct RequestBuilder {
4748            pub(crate) client: super::super::Client,
4749            pub(crate) organization: String,
4750            pub(crate) body: Vec<models::TestCaseResult>,
4751            pub(crate) project: String,
4752            pub(crate) run_id: i32,
4753        }
4754        impl RequestBuilder {
4755            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4756            #[doc = ""]
4757            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4758            #[doc = "However, this function can provide more flexibility when required."]
4759            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4760                Box::pin({
4761                    let this = self.clone();
4762                    async move {
4763                        let url = this.url()?;
4764                        let mut req =
4765                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
4766                        if let Some(auth_header) = this
4767                            .client
4768                            .token_credential()
4769                            .http_authorization_header(&this.client.scopes())
4770                            .await?
4771                        {
4772                            req.insert_header(
4773                                azure_core::http::headers::AUTHORIZATION,
4774                                auth_header,
4775                            );
4776                        }
4777                        req.insert_header("content-type", "application/json");
4778                        let req_body = azure_core::json::to_json(&this.body)?;
4779                        req.set_body(req_body);
4780                        Ok(Response(this.client.send(&mut req).await?.into()))
4781                    }
4782                })
4783            }
4784            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4785                let mut url = azure_core::http::Url::parse(&format!(
4786                    "{}/{}/{}/_apis/test/Runs/{}/results",
4787                    self.client.endpoint(),
4788                    &self.organization,
4789                    &self.project,
4790                    &self.run_id
4791                ))?;
4792                let has_api_version_already = url
4793                    .query_pairs()
4794                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4795                if !has_api_version_already {
4796                    url.query_pairs_mut().append_pair(
4797                        azure_core::http::headers::query_param::API_VERSION,
4798                        "7.1-preview",
4799                    );
4800                }
4801                Ok(url)
4802            }
4803        }
4804        impl std::future::IntoFuture for RequestBuilder {
4805            type Output = azure_core::Result<models::TestCaseResultList>;
4806            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestCaseResultList>>;
4807            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4808            #[doc = ""]
4809            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4810            #[doc = ""]
4811            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4812            fn into_future(self) -> Self::IntoFuture {
4813                Box::pin(async move { self.send().await?.into_body().await })
4814            }
4815        }
4816    }
4817    pub mod update {
4818        use super::models;
4819        #[cfg(not(target_arch = "wasm32"))]
4820        use futures::future::BoxFuture;
4821        #[cfg(target_arch = "wasm32")]
4822        use futures::future::LocalBoxFuture as BoxFuture;
4823        #[derive(Debug)]
4824        pub struct Response(
4825            azure_core::http::Response<models::TestCaseResultList, azure_core::http::JsonFormat>,
4826        );
4827        impl Response {
4828            pub async fn into_body(self) -> azure_core::Result<models::TestCaseResultList> {
4829                self.0.into_body().await
4830            }
4831            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4832                self.0.into()
4833            }
4834        }
4835        #[derive(Clone)]
4836        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4837        #[doc = r""]
4838        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4839        #[doc = r" parameters can be chained."]
4840        #[doc = r""]
4841        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4842        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4843        #[doc = r" executes the request and returns a `Result` with the parsed"]
4844        #[doc = r" response."]
4845        #[doc = r""]
4846        #[doc = r" If you need lower-level access to the raw response details"]
4847        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4848        #[doc = r" can finalize the request using the"]
4849        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4850        #[doc = r" that resolves to a lower-level [`Response`] value."]
4851        pub struct RequestBuilder {
4852            pub(crate) client: super::super::Client,
4853            pub(crate) organization: String,
4854            pub(crate) body: Vec<models::TestCaseResult>,
4855            pub(crate) project: String,
4856            pub(crate) run_id: i32,
4857        }
4858        impl RequestBuilder {
4859            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4860            #[doc = ""]
4861            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4862            #[doc = "However, this function can provide more flexibility when required."]
4863            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4864                Box::pin({
4865                    let this = self.clone();
4866                    async move {
4867                        let url = this.url()?;
4868                        let mut req =
4869                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
4870                        if let Some(auth_header) = this
4871                            .client
4872                            .token_credential()
4873                            .http_authorization_header(&this.client.scopes())
4874                            .await?
4875                        {
4876                            req.insert_header(
4877                                azure_core::http::headers::AUTHORIZATION,
4878                                auth_header,
4879                            );
4880                        }
4881                        req.insert_header("content-type", "application/json");
4882                        let req_body = azure_core::json::to_json(&this.body)?;
4883                        req.set_body(req_body);
4884                        Ok(Response(this.client.send(&mut req).await?.into()))
4885                    }
4886                })
4887            }
4888            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4889                let mut url = azure_core::http::Url::parse(&format!(
4890                    "{}/{}/{}/_apis/test/Runs/{}/results",
4891                    self.client.endpoint(),
4892                    &self.organization,
4893                    &self.project,
4894                    &self.run_id
4895                ))?;
4896                let has_api_version_already = url
4897                    .query_pairs()
4898                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4899                if !has_api_version_already {
4900                    url.query_pairs_mut().append_pair(
4901                        azure_core::http::headers::query_param::API_VERSION,
4902                        "7.1-preview",
4903                    );
4904                }
4905                Ok(url)
4906            }
4907        }
4908        impl std::future::IntoFuture for RequestBuilder {
4909            type Output = azure_core::Result<models::TestCaseResultList>;
4910            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestCaseResultList>>;
4911            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4912            #[doc = ""]
4913            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4914            #[doc = ""]
4915            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4916            fn into_future(self) -> Self::IntoFuture {
4917                Box::pin(async move { self.send().await?.into_body().await })
4918            }
4919        }
4920    }
4921    pub mod get {
4922        use super::models;
4923        #[cfg(not(target_arch = "wasm32"))]
4924        use futures::future::BoxFuture;
4925        #[cfg(target_arch = "wasm32")]
4926        use futures::future::LocalBoxFuture as BoxFuture;
4927        #[derive(Debug)]
4928        pub struct Response(
4929            azure_core::http::Response<models::TestCaseResult, azure_core::http::JsonFormat>,
4930        );
4931        impl Response {
4932            pub async fn into_body(self) -> azure_core::Result<models::TestCaseResult> {
4933                self.0.into_body().await
4934            }
4935            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4936                self.0.into()
4937            }
4938        }
4939        #[derive(Clone)]
4940        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4941        #[doc = r""]
4942        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4943        #[doc = r" parameters can be chained."]
4944        #[doc = r""]
4945        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4946        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4947        #[doc = r" executes the request and returns a `Result` with the parsed"]
4948        #[doc = r" response."]
4949        #[doc = r""]
4950        #[doc = r" If you need lower-level access to the raw response details"]
4951        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4952        #[doc = r" can finalize the request using the"]
4953        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4954        #[doc = r" that resolves to a lower-level [`Response`] value."]
4955        pub struct RequestBuilder {
4956            pub(crate) client: super::super::Client,
4957            pub(crate) organization: String,
4958            pub(crate) project: String,
4959            pub(crate) run_id: i32,
4960            pub(crate) test_case_result_id: i32,
4961            pub(crate) details_to_include: Option<String>,
4962        }
4963        impl RequestBuilder {
4964            #[doc = "Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults."]
4965            pub fn details_to_include(mut self, details_to_include: impl Into<String>) -> Self {
4966                self.details_to_include = Some(details_to_include.into());
4967                self
4968            }
4969            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4970            #[doc = ""]
4971            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4972            #[doc = "However, this function can provide more flexibility when required."]
4973            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4974                Box::pin({
4975                    let this = self.clone();
4976                    async move {
4977                        let url = this.url()?;
4978                        let mut req =
4979                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4980                        if let Some(auth_header) = this
4981                            .client
4982                            .token_credential()
4983                            .http_authorization_header(&this.client.scopes())
4984                            .await?
4985                        {
4986                            req.insert_header(
4987                                azure_core::http::headers::AUTHORIZATION,
4988                                auth_header,
4989                            );
4990                        }
4991                        if let Some(details_to_include) = &this.details_to_include {
4992                            req.url_mut()
4993                                .query_pairs_mut()
4994                                .append_pair("detailsToInclude", details_to_include);
4995                        }
4996                        let req_body = azure_core::Bytes::new();
4997                        req.set_body(req_body);
4998                        Ok(Response(this.client.send(&mut req).await?.into()))
4999                    }
5000                })
5001            }
5002            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5003                let mut url = azure_core::http::Url::parse(&format!(
5004                    "{}/{}/{}/_apis/test/Runs/{}/results/{}",
5005                    self.client.endpoint(),
5006                    &self.organization,
5007                    &self.project,
5008                    &self.run_id,
5009                    &self.test_case_result_id
5010                ))?;
5011                let has_api_version_already = url
5012                    .query_pairs()
5013                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5014                if !has_api_version_already {
5015                    url.query_pairs_mut().append_pair(
5016                        azure_core::http::headers::query_param::API_VERSION,
5017                        "7.1-preview",
5018                    );
5019                }
5020                Ok(url)
5021            }
5022        }
5023        impl std::future::IntoFuture for RequestBuilder {
5024            type Output = azure_core::Result<models::TestCaseResult>;
5025            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestCaseResult>>;
5026            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5027            #[doc = ""]
5028            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5029            #[doc = ""]
5030            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5031            fn into_future(self) -> Self::IntoFuture {
5032                Box::pin(async move { self.send().await?.into_body().await })
5033            }
5034        }
5035    }
5036}
5037pub mod iterations {
5038    use super::models;
5039    #[cfg(not(target_arch = "wasm32"))]
5040    use futures::future::BoxFuture;
5041    #[cfg(target_arch = "wasm32")]
5042    use futures::future::LocalBoxFuture as BoxFuture;
5043    pub struct Client(pub(crate) super::Client);
5044    impl Client {
5045        #[doc = "Get iterations for a result"]
5046        #[doc = ""]
5047        #[doc = "Arguments:"]
5048        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5049        #[doc = "* `project`: Project ID or project name"]
5050        #[doc = "* `run_id`: ID of the test run that contains the result."]
5051        #[doc = "* `test_case_result_id`: ID of the test result that contains the iterations."]
5052        pub fn list(
5053            &self,
5054            organization: impl Into<String>,
5055            project: impl Into<String>,
5056            run_id: i32,
5057            test_case_result_id: i32,
5058        ) -> list::RequestBuilder {
5059            list::RequestBuilder {
5060                client: self.0.clone(),
5061                organization: organization.into(),
5062                project: project.into(),
5063                run_id,
5064                test_case_result_id,
5065                include_action_results: None,
5066            }
5067        }
5068        #[doc = "Get iteration for a result"]
5069        #[doc = ""]
5070        #[doc = "Arguments:"]
5071        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5072        #[doc = "* `project`: Project ID or project name"]
5073        #[doc = "* `run_id`: ID of the test run that contains the result."]
5074        #[doc = "* `test_case_result_id`: ID of the test result that contains the iterations."]
5075        #[doc = "* `iteration_id`: Id of the test results Iteration."]
5076        pub fn get(
5077            &self,
5078            organization: impl Into<String>,
5079            project: impl Into<String>,
5080            run_id: i32,
5081            test_case_result_id: i32,
5082            iteration_id: i32,
5083        ) -> get::RequestBuilder {
5084            get::RequestBuilder {
5085                client: self.0.clone(),
5086                organization: organization.into(),
5087                project: project.into(),
5088                run_id,
5089                test_case_result_id,
5090                iteration_id,
5091                include_action_results: None,
5092            }
5093        }
5094    }
5095    pub mod list {
5096        use super::models;
5097        #[cfg(not(target_arch = "wasm32"))]
5098        use futures::future::BoxFuture;
5099        #[cfg(target_arch = "wasm32")]
5100        use futures::future::LocalBoxFuture as BoxFuture;
5101        #[derive(Debug)]
5102        pub struct Response(
5103            azure_core::http::Response<
5104                models::TestIterationDetailsModelList,
5105                azure_core::http::JsonFormat,
5106            >,
5107        );
5108        impl Response {
5109            pub async fn into_body(
5110                self,
5111            ) -> azure_core::Result<models::TestIterationDetailsModelList> {
5112                self.0.into_body().await
5113            }
5114            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5115                self.0.into()
5116            }
5117        }
5118        #[derive(Clone)]
5119        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5120        #[doc = r""]
5121        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5122        #[doc = r" parameters can be chained."]
5123        #[doc = r""]
5124        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5125        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5126        #[doc = r" executes the request and returns a `Result` with the parsed"]
5127        #[doc = r" response."]
5128        #[doc = r""]
5129        #[doc = r" If you need lower-level access to the raw response details"]
5130        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5131        #[doc = r" can finalize the request using the"]
5132        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5133        #[doc = r" that resolves to a lower-level [`Response`] value."]
5134        pub struct RequestBuilder {
5135            pub(crate) client: super::super::Client,
5136            pub(crate) organization: String,
5137            pub(crate) project: String,
5138            pub(crate) run_id: i32,
5139            pub(crate) test_case_result_id: i32,
5140            pub(crate) include_action_results: Option<bool>,
5141        }
5142        impl RequestBuilder {
5143            #[doc = "Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration."]
5144            pub fn include_action_results(mut self, include_action_results: bool) -> Self {
5145                self.include_action_results = Some(include_action_results);
5146                self
5147            }
5148            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5149            #[doc = ""]
5150            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5151            #[doc = "However, this function can provide more flexibility when required."]
5152            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5153                Box::pin({
5154                    let this = self.clone();
5155                    async move {
5156                        let url = this.url()?;
5157                        let mut req =
5158                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
5159                        if let Some(auth_header) = this
5160                            .client
5161                            .token_credential()
5162                            .http_authorization_header(&this.client.scopes())
5163                            .await?
5164                        {
5165                            req.insert_header(
5166                                azure_core::http::headers::AUTHORIZATION,
5167                                auth_header,
5168                            );
5169                        }
5170                        if let Some(include_action_results) = &this.include_action_results {
5171                            req.url_mut().query_pairs_mut().append_pair(
5172                                "includeActionResults",
5173                                &include_action_results.to_string(),
5174                            );
5175                        }
5176                        let req_body = azure_core::Bytes::new();
5177                        req.set_body(req_body);
5178                        Ok(Response(this.client.send(&mut req).await?.into()))
5179                    }
5180                })
5181            }
5182            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5183                let mut url = azure_core::http::Url::parse(&format!(
5184                    "{}/{}/{}/_apis/test/Runs/{}/Results/{}/iterations",
5185                    self.client.endpoint(),
5186                    &self.organization,
5187                    &self.project,
5188                    &self.run_id,
5189                    &self.test_case_result_id
5190                ))?;
5191                let has_api_version_already = url
5192                    .query_pairs()
5193                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5194                if !has_api_version_already {
5195                    url.query_pairs_mut().append_pair(
5196                        azure_core::http::headers::query_param::API_VERSION,
5197                        "7.1-preview",
5198                    );
5199                }
5200                Ok(url)
5201            }
5202        }
5203        impl std::future::IntoFuture for RequestBuilder {
5204            type Output = azure_core::Result<models::TestIterationDetailsModelList>;
5205            type IntoFuture =
5206                BoxFuture<'static, azure_core::Result<models::TestIterationDetailsModelList>>;
5207            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5208            #[doc = ""]
5209            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5210            #[doc = ""]
5211            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5212            fn into_future(self) -> Self::IntoFuture {
5213                Box::pin(async move { self.send().await?.into_body().await })
5214            }
5215        }
5216    }
5217    pub mod get {
5218        use super::models;
5219        #[cfg(not(target_arch = "wasm32"))]
5220        use futures::future::BoxFuture;
5221        #[cfg(target_arch = "wasm32")]
5222        use futures::future::LocalBoxFuture as BoxFuture;
5223        #[derive(Debug)]
5224        pub struct Response(
5225            azure_core::http::Response<
5226                models::TestIterationDetailsModel,
5227                azure_core::http::JsonFormat,
5228            >,
5229        );
5230        impl Response {
5231            pub async fn into_body(self) -> azure_core::Result<models::TestIterationDetailsModel> {
5232                self.0.into_body().await
5233            }
5234            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5235                self.0.into()
5236            }
5237        }
5238        #[derive(Clone)]
5239        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5240        #[doc = r""]
5241        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5242        #[doc = r" parameters can be chained."]
5243        #[doc = r""]
5244        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5245        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5246        #[doc = r" executes the request and returns a `Result` with the parsed"]
5247        #[doc = r" response."]
5248        #[doc = r""]
5249        #[doc = r" If you need lower-level access to the raw response details"]
5250        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5251        #[doc = r" can finalize the request using the"]
5252        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5253        #[doc = r" that resolves to a lower-level [`Response`] value."]
5254        pub struct RequestBuilder {
5255            pub(crate) client: super::super::Client,
5256            pub(crate) organization: String,
5257            pub(crate) project: String,
5258            pub(crate) run_id: i32,
5259            pub(crate) test_case_result_id: i32,
5260            pub(crate) iteration_id: i32,
5261            pub(crate) include_action_results: Option<bool>,
5262        }
5263        impl RequestBuilder {
5264            #[doc = "Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration."]
5265            pub fn include_action_results(mut self, include_action_results: bool) -> Self {
5266                self.include_action_results = Some(include_action_results);
5267                self
5268            }
5269            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5270            #[doc = ""]
5271            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5272            #[doc = "However, this function can provide more flexibility when required."]
5273            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5274                Box::pin({
5275                    let this = self.clone();
5276                    async move {
5277                        let url = this.url()?;
5278                        let mut req =
5279                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
5280                        if let Some(auth_header) = this
5281                            .client
5282                            .token_credential()
5283                            .http_authorization_header(&this.client.scopes())
5284                            .await?
5285                        {
5286                            req.insert_header(
5287                                azure_core::http::headers::AUTHORIZATION,
5288                                auth_header,
5289                            );
5290                        }
5291                        if let Some(include_action_results) = &this.include_action_results {
5292                            req.url_mut().query_pairs_mut().append_pair(
5293                                "includeActionResults",
5294                                &include_action_results.to_string(),
5295                            );
5296                        }
5297                        let req_body = azure_core::Bytes::new();
5298                        req.set_body(req_body);
5299                        Ok(Response(this.client.send(&mut req).await?.into()))
5300                    }
5301                })
5302            }
5303            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5304                let mut url = azure_core::http::Url::parse(&format!(
5305                    "{}/{}/{}/_apis/test/Runs/{}/Results/{}/iterations/{}",
5306                    self.client.endpoint(),
5307                    &self.organization,
5308                    &self.project,
5309                    &self.run_id,
5310                    &self.test_case_result_id,
5311                    &self.iteration_id
5312                ))?;
5313                let has_api_version_already = url
5314                    .query_pairs()
5315                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5316                if !has_api_version_already {
5317                    url.query_pairs_mut().append_pair(
5318                        azure_core::http::headers::query_param::API_VERSION,
5319                        "7.1-preview",
5320                    );
5321                }
5322                Ok(url)
5323            }
5324        }
5325        impl std::future::IntoFuture for RequestBuilder {
5326            type Output = azure_core::Result<models::TestIterationDetailsModel>;
5327            type IntoFuture =
5328                BoxFuture<'static, azure_core::Result<models::TestIterationDetailsModel>>;
5329            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5330            #[doc = ""]
5331            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5332            #[doc = ""]
5333            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5334            fn into_future(self) -> Self::IntoFuture {
5335                Box::pin(async move { self.send().await?.into_body().await })
5336            }
5337        }
5338    }
5339}
5340pub mod test_cases {
5341    use super::models;
5342    #[cfg(not(target_arch = "wasm32"))]
5343    use futures::future::BoxFuture;
5344    #[cfg(target_arch = "wasm32")]
5345    use futures::future::LocalBoxFuture as BoxFuture;
5346    pub struct Client(pub(crate) super::Client);
5347    impl Client {
5348        #[doc = "Delete a test case."]
5349        #[doc = ""]
5350        #[doc = "Arguments:"]
5351        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5352        #[doc = "* `project`: Project ID or project name"]
5353        #[doc = "* `test_case_id`: Id of test case to delete."]
5354        pub fn delete(
5355            &self,
5356            organization: impl Into<String>,
5357            project: impl Into<String>,
5358            test_case_id: i32,
5359        ) -> delete::RequestBuilder {
5360            delete::RequestBuilder {
5361                client: self.0.clone(),
5362                organization: organization.into(),
5363                project: project.into(),
5364                test_case_id,
5365            }
5366        }
5367    }
5368    pub mod delete {
5369        use super::models;
5370        #[cfg(not(target_arch = "wasm32"))]
5371        use futures::future::BoxFuture;
5372        #[cfg(target_arch = "wasm32")]
5373        use futures::future::LocalBoxFuture as BoxFuture;
5374        #[derive(Debug)]
5375        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
5376        impl Response {
5377            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5378                self.0.into()
5379            }
5380        }
5381        #[derive(Clone)]
5382        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5383        #[doc = r""]
5384        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5385        #[doc = r" parameters can be chained."]
5386        #[doc = r""]
5387        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5388        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5389        #[doc = r" executes the request and returns a `Result` with the parsed"]
5390        #[doc = r" response."]
5391        #[doc = r""]
5392        #[doc = r" If you need lower-level access to the raw response details"]
5393        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5394        #[doc = r" can finalize the request using the"]
5395        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5396        #[doc = r" that resolves to a lower-level [`Response`] value."]
5397        pub struct RequestBuilder {
5398            pub(crate) client: super::super::Client,
5399            pub(crate) organization: String,
5400            pub(crate) project: String,
5401            pub(crate) test_case_id: i32,
5402        }
5403        impl RequestBuilder {
5404            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5405            #[doc = ""]
5406            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5407            #[doc = "However, this function can provide more flexibility when required."]
5408            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5409                Box::pin({
5410                    let this = self.clone();
5411                    async move {
5412                        let url = this.url()?;
5413                        let mut req =
5414                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
5415                        if let Some(auth_header) = this
5416                            .client
5417                            .token_credential()
5418                            .http_authorization_header(&this.client.scopes())
5419                            .await?
5420                        {
5421                            req.insert_header(
5422                                azure_core::http::headers::AUTHORIZATION,
5423                                auth_header,
5424                            );
5425                        }
5426                        let req_body = azure_core::Bytes::new();
5427                        req.set_body(req_body);
5428                        Ok(Response(this.client.send(&mut req).await?.into()))
5429                    }
5430                })
5431            }
5432            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5433                let mut url = azure_core::http::Url::parse(&format!(
5434                    "{}/{}/{}/_apis/test/testcases/{}",
5435                    self.client.endpoint(),
5436                    &self.organization,
5437                    &self.project,
5438                    &self.test_case_id
5439                ))?;
5440                let has_api_version_already = url
5441                    .query_pairs()
5442                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5443                if !has_api_version_already {
5444                    url.query_pairs_mut().append_pair(
5445                        azure_core::http::headers::query_param::API_VERSION,
5446                        "7.1-preview",
5447                    );
5448                }
5449                Ok(url)
5450            }
5451        }
5452        impl std::future::IntoFuture for RequestBuilder {
5453            type Output = azure_core::Result<()>;
5454            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
5455            #[doc = "Returns a future that sends the request and waits for the response."]
5456            #[doc = ""]
5457            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5458            #[doc = ""]
5459            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5460            fn into_future(self) -> Self::IntoFuture {
5461                Box::pin(async move {
5462                    let _rsp = self.send().await?;
5463                    Ok(())
5464                })
5465            }
5466        }
5467    }
5468}
5469pub mod session {
5470    use super::models;
5471    #[cfg(not(target_arch = "wasm32"))]
5472    use futures::future::BoxFuture;
5473    #[cfg(target_arch = "wasm32")]
5474    use futures::future::LocalBoxFuture as BoxFuture;
5475    pub struct Client(pub(crate) super::Client);
5476    impl Client {
5477        #[doc = "Get a list of test sessions"]
5478        #[doc = ""]
5479        #[doc = "Arguments:"]
5480        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5481        #[doc = "* `project`: Project ID or project name"]
5482        #[doc = "* `team`: Team ID or team name"]
5483        pub fn list(
5484            &self,
5485            organization: impl Into<String>,
5486            project: impl Into<String>,
5487            team: impl Into<String>,
5488        ) -> list::RequestBuilder {
5489            list::RequestBuilder {
5490                client: self.0.clone(),
5491                organization: organization.into(),
5492                project: project.into(),
5493                team: team.into(),
5494                period: None,
5495                all_sessions: None,
5496                include_all_properties: None,
5497                source: None,
5498                include_only_completed_sessions: None,
5499            }
5500        }
5501        #[doc = "Create a test session"]
5502        #[doc = ""]
5503        #[doc = "Arguments:"]
5504        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5505        #[doc = "* `body`: Test session details for creation"]
5506        #[doc = "* `project`: Project ID or project name"]
5507        #[doc = "* `team`: Team ID or team name"]
5508        pub fn create(
5509            &self,
5510            organization: impl Into<String>,
5511            body: impl Into<models::TestSession>,
5512            project: impl Into<String>,
5513            team: impl Into<String>,
5514        ) -> create::RequestBuilder {
5515            create::RequestBuilder {
5516                client: self.0.clone(),
5517                organization: organization.into(),
5518                body: body.into(),
5519                project: project.into(),
5520                team: team.into(),
5521            }
5522        }
5523        #[doc = "Update a test session"]
5524        #[doc = ""]
5525        #[doc = "Arguments:"]
5526        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5527        #[doc = "* `body`: Test session details for update"]
5528        #[doc = "* `project`: Project ID or project name"]
5529        #[doc = "* `team`: Team ID or team name"]
5530        pub fn update(
5531            &self,
5532            organization: impl Into<String>,
5533            body: impl Into<models::TestSession>,
5534            project: impl Into<String>,
5535            team: impl Into<String>,
5536        ) -> update::RequestBuilder {
5537            update::RequestBuilder {
5538                client: self.0.clone(),
5539                organization: organization.into(),
5540                body: body.into(),
5541                project: project.into(),
5542                team: team.into(),
5543            }
5544        }
5545    }
5546    pub mod list {
5547        use super::models;
5548        #[cfg(not(target_arch = "wasm32"))]
5549        use futures::future::BoxFuture;
5550        #[cfg(target_arch = "wasm32")]
5551        use futures::future::LocalBoxFuture as BoxFuture;
5552        #[derive(Debug)]
5553        pub struct Response(
5554            azure_core::http::Response<models::TestSessionList, azure_core::http::JsonFormat>,
5555        );
5556        impl Response {
5557            pub async fn into_body(self) -> azure_core::Result<models::TestSessionList> {
5558                self.0.into_body().await
5559            }
5560            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5561                self.0.into()
5562            }
5563        }
5564        #[derive(Clone)]
5565        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5566        #[doc = r""]
5567        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5568        #[doc = r" parameters can be chained."]
5569        #[doc = r""]
5570        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5571        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5572        #[doc = r" executes the request and returns a `Result` with the parsed"]
5573        #[doc = r" response."]
5574        #[doc = r""]
5575        #[doc = r" If you need lower-level access to the raw response details"]
5576        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5577        #[doc = r" can finalize the request using the"]
5578        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5579        #[doc = r" that resolves to a lower-level [`Response`] value."]
5580        pub struct RequestBuilder {
5581            pub(crate) client: super::super::Client,
5582            pub(crate) organization: String,
5583            pub(crate) project: String,
5584            pub(crate) team: String,
5585            pub(crate) period: Option<i32>,
5586            pub(crate) all_sessions: Option<bool>,
5587            pub(crate) include_all_properties: Option<bool>,
5588            pub(crate) source: Option<String>,
5589            pub(crate) include_only_completed_sessions: Option<bool>,
5590        }
5591        impl RequestBuilder {
5592            #[doc = "Period in days from now, for which test sessions are fetched."]
5593            pub fn period(mut self, period: i32) -> Self {
5594                self.period = Some(period);
5595                self
5596            }
5597            #[doc = "If false, returns test sessions for current user. Otherwise, it returns test sessions for all users"]
5598            pub fn all_sessions(mut self, all_sessions: bool) -> Self {
5599                self.all_sessions = Some(all_sessions);
5600                self
5601            }
5602            #[doc = "If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version."]
5603            pub fn include_all_properties(mut self, include_all_properties: bool) -> Self {
5604                self.include_all_properties = Some(include_all_properties);
5605                self
5606            }
5607            #[doc = "Source of the test session."]
5608            pub fn source(mut self, source: impl Into<String>) -> Self {
5609                self.source = Some(source.into());
5610                self
5611            }
5612            #[doc = "If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states"]
5613            pub fn include_only_completed_sessions(
5614                mut self,
5615                include_only_completed_sessions: bool,
5616            ) -> Self {
5617                self.include_only_completed_sessions = Some(include_only_completed_sessions);
5618                self
5619            }
5620            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5621            #[doc = ""]
5622            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5623            #[doc = "However, this function can provide more flexibility when required."]
5624            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5625                Box::pin({
5626                    let this = self.clone();
5627                    async move {
5628                        let url = this.url()?;
5629                        let mut req =
5630                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
5631                        if let Some(auth_header) = this
5632                            .client
5633                            .token_credential()
5634                            .http_authorization_header(&this.client.scopes())
5635                            .await?
5636                        {
5637                            req.insert_header(
5638                                azure_core::http::headers::AUTHORIZATION,
5639                                auth_header,
5640                            );
5641                        }
5642                        if let Some(period) = &this.period {
5643                            req.url_mut()
5644                                .query_pairs_mut()
5645                                .append_pair("period", &period.to_string());
5646                        }
5647                        if let Some(all_sessions) = &this.all_sessions {
5648                            req.url_mut()
5649                                .query_pairs_mut()
5650                                .append_pair("allSessions", &all_sessions.to_string());
5651                        }
5652                        if let Some(include_all_properties) = &this.include_all_properties {
5653                            req.url_mut().query_pairs_mut().append_pair(
5654                                "includeAllProperties",
5655                                &include_all_properties.to_string(),
5656                            );
5657                        }
5658                        if let Some(source) = &this.source {
5659                            req.url_mut()
5660                                .query_pairs_mut()
5661                                .append_pair("source", source);
5662                        }
5663                        if let Some(include_only_completed_sessions) =
5664                            &this.include_only_completed_sessions
5665                        {
5666                            req.url_mut().query_pairs_mut().append_pair(
5667                                "includeOnlyCompletedSessions",
5668                                &include_only_completed_sessions.to_string(),
5669                            );
5670                        }
5671                        let req_body = azure_core::Bytes::new();
5672                        req.set_body(req_body);
5673                        Ok(Response(this.client.send(&mut req).await?.into()))
5674                    }
5675                })
5676            }
5677            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5678                let mut url = azure_core::http::Url::parse(&format!(
5679                    "{}/{}/{}/{}/_apis/test/session",
5680                    self.client.endpoint(),
5681                    &self.organization,
5682                    &self.project,
5683                    &self.team
5684                ))?;
5685                let has_api_version_already = url
5686                    .query_pairs()
5687                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5688                if !has_api_version_already {
5689                    url.query_pairs_mut().append_pair(
5690                        azure_core::http::headers::query_param::API_VERSION,
5691                        "7.1-preview",
5692                    );
5693                }
5694                Ok(url)
5695            }
5696        }
5697        impl std::future::IntoFuture for RequestBuilder {
5698            type Output = azure_core::Result<models::TestSessionList>;
5699            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestSessionList>>;
5700            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5701            #[doc = ""]
5702            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5703            #[doc = ""]
5704            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5705            fn into_future(self) -> Self::IntoFuture {
5706                Box::pin(async move { self.send().await?.into_body().await })
5707            }
5708        }
5709    }
5710    pub mod create {
5711        use super::models;
5712        #[cfg(not(target_arch = "wasm32"))]
5713        use futures::future::BoxFuture;
5714        #[cfg(target_arch = "wasm32")]
5715        use futures::future::LocalBoxFuture as BoxFuture;
5716        #[derive(Debug)]
5717        pub struct Response(
5718            azure_core::http::Response<models::TestSession, azure_core::http::JsonFormat>,
5719        );
5720        impl Response {
5721            pub async fn into_body(self) -> azure_core::Result<models::TestSession> {
5722                self.0.into_body().await
5723            }
5724            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5725                self.0.into()
5726            }
5727        }
5728        #[derive(Clone)]
5729        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5730        #[doc = r""]
5731        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5732        #[doc = r" parameters can be chained."]
5733        #[doc = r""]
5734        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5735        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5736        #[doc = r" executes the request and returns a `Result` with the parsed"]
5737        #[doc = r" response."]
5738        #[doc = r""]
5739        #[doc = r" If you need lower-level access to the raw response details"]
5740        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5741        #[doc = r" can finalize the request using the"]
5742        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5743        #[doc = r" that resolves to a lower-level [`Response`] value."]
5744        pub struct RequestBuilder {
5745            pub(crate) client: super::super::Client,
5746            pub(crate) organization: String,
5747            pub(crate) body: models::TestSession,
5748            pub(crate) project: String,
5749            pub(crate) team: String,
5750        }
5751        impl RequestBuilder {
5752            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5753            #[doc = ""]
5754            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5755            #[doc = "However, this function can provide more flexibility when required."]
5756            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5757                Box::pin({
5758                    let this = self.clone();
5759                    async move {
5760                        let url = this.url()?;
5761                        let mut req =
5762                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
5763                        if let Some(auth_header) = this
5764                            .client
5765                            .token_credential()
5766                            .http_authorization_header(&this.client.scopes())
5767                            .await?
5768                        {
5769                            req.insert_header(
5770                                azure_core::http::headers::AUTHORIZATION,
5771                                auth_header,
5772                            );
5773                        }
5774                        req.insert_header("content-type", "application/json");
5775                        let req_body = azure_core::json::to_json(&this.body)?;
5776                        req.set_body(req_body);
5777                        Ok(Response(this.client.send(&mut req).await?.into()))
5778                    }
5779                })
5780            }
5781            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5782                let mut url = azure_core::http::Url::parse(&format!(
5783                    "{}/{}/{}/{}/_apis/test/session",
5784                    self.client.endpoint(),
5785                    &self.organization,
5786                    &self.project,
5787                    &self.team
5788                ))?;
5789                let has_api_version_already = url
5790                    .query_pairs()
5791                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5792                if !has_api_version_already {
5793                    url.query_pairs_mut().append_pair(
5794                        azure_core::http::headers::query_param::API_VERSION,
5795                        "7.1-preview",
5796                    );
5797                }
5798                Ok(url)
5799            }
5800        }
5801        impl std::future::IntoFuture for RequestBuilder {
5802            type Output = azure_core::Result<models::TestSession>;
5803            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestSession>>;
5804            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5805            #[doc = ""]
5806            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5807            #[doc = ""]
5808            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5809            fn into_future(self) -> Self::IntoFuture {
5810                Box::pin(async move { self.send().await?.into_body().await })
5811            }
5812        }
5813    }
5814    pub mod update {
5815        use super::models;
5816        #[cfg(not(target_arch = "wasm32"))]
5817        use futures::future::BoxFuture;
5818        #[cfg(target_arch = "wasm32")]
5819        use futures::future::LocalBoxFuture as BoxFuture;
5820        #[derive(Debug)]
5821        pub struct Response(
5822            azure_core::http::Response<models::TestSession, azure_core::http::JsonFormat>,
5823        );
5824        impl Response {
5825            pub async fn into_body(self) -> azure_core::Result<models::TestSession> {
5826                self.0.into_body().await
5827            }
5828            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5829                self.0.into()
5830            }
5831        }
5832        #[derive(Clone)]
5833        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5834        #[doc = r""]
5835        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5836        #[doc = r" parameters can be chained."]
5837        #[doc = r""]
5838        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5839        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5840        #[doc = r" executes the request and returns a `Result` with the parsed"]
5841        #[doc = r" response."]
5842        #[doc = r""]
5843        #[doc = r" If you need lower-level access to the raw response details"]
5844        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5845        #[doc = r" can finalize the request using the"]
5846        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5847        #[doc = r" that resolves to a lower-level [`Response`] value."]
5848        pub struct RequestBuilder {
5849            pub(crate) client: super::super::Client,
5850            pub(crate) organization: String,
5851            pub(crate) body: models::TestSession,
5852            pub(crate) project: String,
5853            pub(crate) team: String,
5854        }
5855        impl RequestBuilder {
5856            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5857            #[doc = ""]
5858            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5859            #[doc = "However, this function can provide more flexibility when required."]
5860            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5861                Box::pin({
5862                    let this = self.clone();
5863                    async move {
5864                        let url = this.url()?;
5865                        let mut req =
5866                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
5867                        if let Some(auth_header) = this
5868                            .client
5869                            .token_credential()
5870                            .http_authorization_header(&this.client.scopes())
5871                            .await?
5872                        {
5873                            req.insert_header(
5874                                azure_core::http::headers::AUTHORIZATION,
5875                                auth_header,
5876                            );
5877                        }
5878                        req.insert_header("content-type", "application/json");
5879                        let req_body = azure_core::json::to_json(&this.body)?;
5880                        req.set_body(req_body);
5881                        Ok(Response(this.client.send(&mut req).await?.into()))
5882                    }
5883                })
5884            }
5885            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5886                let mut url = azure_core::http::Url::parse(&format!(
5887                    "{}/{}/{}/{}/_apis/test/session",
5888                    self.client.endpoint(),
5889                    &self.organization,
5890                    &self.project,
5891                    &self.team
5892                ))?;
5893                let has_api_version_already = url
5894                    .query_pairs()
5895                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5896                if !has_api_version_already {
5897                    url.query_pairs_mut().append_pair(
5898                        azure_core::http::headers::query_param::API_VERSION,
5899                        "7.1-preview",
5900                    );
5901                }
5902                Ok(url)
5903            }
5904        }
5905        impl std::future::IntoFuture for RequestBuilder {
5906            type Output = azure_core::Result<models::TestSession>;
5907            type IntoFuture = BoxFuture<'static, azure_core::Result<models::TestSession>>;
5908            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5909            #[doc = ""]
5910            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5911            #[doc = ""]
5912            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5913            fn into_future(self) -> Self::IntoFuture {
5914                Box::pin(async move { self.send().await?.into_body().await })
5915            }
5916        }
5917    }
5918}