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