azure_devops_rust_api/build/
mod.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#![allow(unused_mut)]
4#![allow(unused_variables)]
5#![allow(unused_imports)]
6#![allow(clippy::redundant_clone)]
7#![allow(clippy::too_many_arguments)]
8#![allow(clippy::module_inception)]
9pub mod models;
10#[derive(Clone)]
11pub struct Client {
12    endpoint: azure_core::http::Url,
13    credential: crate::Credential,
14    scopes: Vec<String>,
15    pipeline: azure_core::http::Pipeline,
16}
17#[derive(Clone)]
18pub struct ClientBuilder {
19    credential: crate::Credential,
20    endpoint: Option<azure_core::http::Url>,
21    scopes: Option<Vec<String>>,
22    options: azure_core::http::ClientOptions,
23}
24azure_core::static_url!(DEFAULT_ENDPOINT, "https://dev.azure.com");
25impl ClientBuilder {
26    #[doc = "Create a new instance of `ClientBuilder`."]
27    #[must_use]
28    pub fn new(credential: crate::Credential) -> Self {
29        Self {
30            credential,
31            endpoint: None,
32            scopes: None,
33            options: azure_core::http::ClientOptions::default(),
34        }
35    }
36    #[doc = "Set the endpoint."]
37    #[must_use]
38    pub fn endpoint(mut self, endpoint: impl Into<azure_core::http::Url>) -> Self {
39        self.endpoint = Some(endpoint.into());
40        self
41    }
42    #[doc = "Set the scopes."]
43    #[must_use]
44    pub fn scopes(mut self, scopes: &[&str]) -> Self {
45        self.scopes = Some(scopes.iter().map(|scope| (*scope).to_owned()).collect());
46        self
47    }
48    #[doc = "Set the retry options."]
49    #[must_use]
50    pub fn retry(mut self, retry: impl Into<azure_core::http::RetryOptions>) -> Self {
51        self.options.retry = Some(retry.into());
52        self
53    }
54    #[doc = "Set the transport options."]
55    #[must_use]
56    pub fn transport(mut self, transport: impl Into<azure_core::http::TransportOptions>) -> Self {
57        self.options.transport = Some(transport.into());
58        self
59    }
60    #[doc = "Set per-call policies."]
61    #[must_use]
62    pub fn per_call_policies(
63        mut self,
64        policies: impl Into<Vec<std::sync::Arc<dyn azure_core::http::policies::Policy>>>,
65    ) -> Self {
66        self.options.per_call_policies = policies.into();
67        self
68    }
69    #[doc = "Set per-try policies."]
70    #[must_use]
71    pub fn per_try_policies(
72        mut self,
73        policies: impl Into<Vec<std::sync::Arc<dyn azure_core::http::policies::Policy>>>,
74    ) -> Self {
75        self.options.per_try_policies = policies.into();
76        self
77    }
78    #[doc = "Convert the builder into a `Client` instance."]
79    pub fn build(self) -> Client {
80        let endpoint = self.endpoint.unwrap_or_else(|| DEFAULT_ENDPOINT.to_owned());
81        let scopes = self
82            .scopes
83            .unwrap_or_else(|| vec![crate::ADO_SCOPE.to_string()]);
84        Client::new(endpoint, self.credential, scopes, self.options)
85    }
86}
87impl Client {
88    pub(crate) fn endpoint(&self) -> &azure_core::http::Url {
89        &self.endpoint
90    }
91    pub(crate) fn token_credential(&self) -> &crate::Credential {
92        &self.credential
93    }
94    pub(crate) fn scopes(&self) -> Vec<&str> {
95        self.scopes.iter().map(String::as_str).collect()
96    }
97    pub(crate) async fn send(
98        &self,
99        request: &mut azure_core::http::Request,
100    ) -> azure_core::Result<azure_core::http::BufResponse> {
101        let context = azure_core::http::Context::default();
102        self.pipeline.send(&context, request).await
103    }
104    #[doc = "Create a new `ClientBuilder`."]
105    #[must_use]
106    pub fn builder(credential: crate::Credential) -> ClientBuilder {
107        ClientBuilder::new(credential)
108    }
109    #[doc = "Create a new `Client`."]
110    #[must_use]
111    pub fn new(
112        endpoint: impl Into<azure_core::http::Url>,
113        credential: crate::Credential,
114        scopes: Vec<String>,
115        options: azure_core::http::ClientOptions,
116    ) -> Self {
117        let endpoint = endpoint.into();
118        let pipeline = azure_core::http::Pipeline::new(
119            option_env!("CARGO_PKG_NAME"),
120            option_env!("CARGO_PKG_VERSION"),
121            options,
122            Vec::new(),
123            Vec::new(),
124            None,
125        );
126        Self {
127            endpoint,
128            credential,
129            scopes,
130            pipeline,
131        }
132    }
133    pub fn artifacts_client(&self) -> artifacts::Client {
134        artifacts::Client(self.clone())
135    }
136    pub fn attachments_client(&self) -> attachments::Client {
137        attachments::Client(self.clone())
138    }
139    pub fn authorizedresources_client(&self) -> authorizedresources::Client {
140        authorizedresources::Client(self.clone())
141    }
142    pub fn badge_client(&self) -> badge::Client {
143        badge::Client(self.clone())
144    }
145    pub fn builds_client(&self) -> builds::Client {
146        builds::Client(self.clone())
147    }
148    pub fn controllers_client(&self) -> controllers::Client {
149        controllers::Client(self.clone())
150    }
151    pub fn definitions_client(&self) -> definitions::Client {
152        definitions::Client(self.clone())
153    }
154    pub fn folders_client(&self) -> folders::Client {
155        folders::Client(self.clone())
156    }
157    pub fn general_settings_client(&self) -> general_settings::Client {
158        general_settings::Client(self.clone())
159    }
160    pub fn history_client(&self) -> history::Client {
161        history::Client(self.clone())
162    }
163    pub fn latest_client(&self) -> latest::Client {
164        latest::Client(self.clone())
165    }
166    pub fn leases_client(&self) -> leases::Client {
167        leases::Client(self.clone())
168    }
169    pub fn metrics_client(&self) -> metrics::Client {
170        metrics::Client(self.clone())
171    }
172    pub fn options_client(&self) -> options::Client {
173        options::Client(self.clone())
174    }
175    pub fn properties_client(&self) -> properties::Client {
176        properties::Client(self.clone())
177    }
178    pub fn report_client(&self) -> report::Client {
179        report::Client(self.clone())
180    }
181    pub fn resource_usage_client(&self) -> resource_usage::Client {
182        resource_usage::Client(self.clone())
183    }
184    pub fn resources_client(&self) -> resources::Client {
185        resources::Client(self.clone())
186    }
187    pub fn retention_client(&self) -> retention::Client {
188        retention::Client(self.clone())
189    }
190    pub fn settings_client(&self) -> settings::Client {
191        settings::Client(self.clone())
192    }
193    pub fn source_providers_client(&self) -> source_providers::Client {
194        source_providers::Client(self.clone())
195    }
196    pub fn stages_client(&self) -> stages::Client {
197        stages::Client(self.clone())
198    }
199    pub fn status_client(&self) -> status::Client {
200        status::Client(self.clone())
201    }
202    pub fn tags_client(&self) -> tags::Client {
203        tags::Client(self.clone())
204    }
205    pub fn templates_client(&self) -> templates::Client {
206        templates::Client(self.clone())
207    }
208    pub fn timeline_client(&self) -> timeline::Client {
209        timeline::Client(self.clone())
210    }
211    pub fn yaml_client(&self) -> yaml::Client {
212        yaml::Client(self.clone())
213    }
214}
215pub mod artifacts {
216    use super::models;
217    #[cfg(not(target_arch = "wasm32"))]
218    use futures::future::BoxFuture;
219    #[cfg(target_arch = "wasm32")]
220    use futures::future::LocalBoxFuture as BoxFuture;
221    pub struct Client(pub(crate) super::Client);
222    impl Client {
223        #[doc = "Gets a specific artifact for a build."]
224        #[doc = ""]
225        #[doc = "Arguments:"]
226        #[doc = "* `organization`: The name of the Azure DevOps organization."]
227        #[doc = "* `project`: Project ID or project name"]
228        #[doc = "* `build_id`: The ID of the build."]
229        #[doc = "* `artifact_name`: The name of the artifact."]
230        pub fn get_artifact(
231            &self,
232            organization: impl Into<String>,
233            project: impl Into<String>,
234            build_id: i32,
235            artifact_name: impl Into<String>,
236        ) -> get_artifact::RequestBuilder {
237            get_artifact::RequestBuilder {
238                client: self.0.clone(),
239                organization: organization.into(),
240                project: project.into(),
241                build_id,
242                artifact_name: artifact_name.into(),
243            }
244        }
245        #[doc = "Gets a file from the build."]
246        #[doc = ""]
247        #[doc = "Arguments:"]
248        #[doc = "* `organization`: The name of the Azure DevOps organization."]
249        #[doc = "* `project`: Project ID or project name"]
250        #[doc = "* `build_id`: The ID of the build."]
251        #[doc = "* `artifact_name`: The name of the artifact."]
252        #[doc = "* `file_id`: The primary key for the file."]
253        #[doc = "* `file_name`: The name that the file will be set to."]
254        pub fn get_file(
255            &self,
256            organization: impl Into<String>,
257            project: impl Into<String>,
258            build_id: i32,
259            artifact_name: impl Into<String>,
260            file_id: impl Into<String>,
261            file_name: impl Into<String>,
262        ) -> get_file::RequestBuilder {
263            get_file::RequestBuilder {
264                client: self.0.clone(),
265                organization: organization.into(),
266                project: project.into(),
267                build_id,
268                artifact_name: artifact_name.into(),
269                file_id: file_id.into(),
270                file_name: file_name.into(),
271            }
272        }
273        #[doc = "Gets all artifacts for a build."]
274        #[doc = ""]
275        #[doc = "Arguments:"]
276        #[doc = "* `organization`: The name of the Azure DevOps organization."]
277        #[doc = "* `project`: Project ID or project name"]
278        #[doc = "* `build_id`: The ID of the build."]
279        pub fn list(
280            &self,
281            organization: impl Into<String>,
282            project: impl Into<String>,
283            build_id: i32,
284        ) -> list::RequestBuilder {
285            list::RequestBuilder {
286                client: self.0.clone(),
287                organization: organization.into(),
288                project: project.into(),
289                build_id,
290            }
291        }
292        #[doc = "Associates an artifact with a build."]
293        #[doc = ""]
294        #[doc = "Arguments:"]
295        #[doc = "* `organization`: The name of the Azure DevOps organization."]
296        #[doc = "* `body`: The artifact."]
297        #[doc = "* `project`: Project ID or project name"]
298        #[doc = "* `build_id`: The ID of the build."]
299        pub fn create(
300            &self,
301            organization: impl Into<String>,
302            body: impl Into<models::BuildArtifact>,
303            project: impl Into<String>,
304            build_id: i32,
305        ) -> create::RequestBuilder {
306            create::RequestBuilder {
307                client: self.0.clone(),
308                organization: organization.into(),
309                body: body.into(),
310                project: project.into(),
311                build_id,
312            }
313        }
314    }
315    pub mod get_artifact {
316        use super::models;
317        #[cfg(not(target_arch = "wasm32"))]
318        use futures::future::BoxFuture;
319        #[cfg(target_arch = "wasm32")]
320        use futures::future::LocalBoxFuture as BoxFuture;
321        #[derive(Debug)]
322        pub struct Response(
323            azure_core::http::Response<models::BuildArtifact, azure_core::http::JsonFormat>,
324        );
325        impl Response {
326            pub async fn into_body(self) -> azure_core::Result<models::BuildArtifact> {
327                self.0.into_body().await
328            }
329            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
330                self.0.into()
331            }
332        }
333        #[derive(Clone)]
334        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
335        #[doc = r""]
336        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
337        #[doc = r" parameters can be chained."]
338        #[doc = r""]
339        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
340        #[doc = r" converts the [`RequestBuilder`] into a future,"]
341        #[doc = r" executes the request and returns a `Result` with the parsed"]
342        #[doc = r" response."]
343        #[doc = r""]
344        #[doc = r" If you need lower-level access to the raw response details"]
345        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
346        #[doc = r" can finalize the request using the"]
347        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
348        #[doc = r" that resolves to a lower-level [`Response`] value."]
349        pub struct RequestBuilder {
350            pub(crate) client: super::super::Client,
351            pub(crate) organization: String,
352            pub(crate) project: String,
353            pub(crate) build_id: i32,
354            pub(crate) artifact_name: String,
355        }
356        impl RequestBuilder {
357            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
358            #[doc = ""]
359            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
360            #[doc = "However, this function can provide more flexibility when required."]
361            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
362                Box::pin({
363                    let this = self.clone();
364                    async move {
365                        let url = this.url()?;
366                        let mut req =
367                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
368                        if let Some(auth_header) = this
369                            .client
370                            .token_credential()
371                            .http_authorization_header(&this.client.scopes())
372                            .await?
373                        {
374                            req.insert_header(
375                                azure_core::http::headers::AUTHORIZATION,
376                                auth_header,
377                            );
378                        }
379                        let artifact_name = &this.artifact_name;
380                        req.url_mut()
381                            .query_pairs_mut()
382                            .append_pair("artifactName", artifact_name);
383                        let req_body = azure_core::Bytes::new();
384                        req.set_body(req_body);
385                        Ok(Response(this.client.send(&mut req).await?.into()))
386                    }
387                })
388            }
389            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
390                let mut url = azure_core::http::Url::parse(&format!(
391                    "{}/{}/{}/_apis/build/builds/{}/artifacts?artifactName={}",
392                    self.client.endpoint(),
393                    &self.organization,
394                    &self.project,
395                    &self.build_id,
396                    &self.artifact_name
397                ))?;
398                let has_api_version_already = url
399                    .query_pairs()
400                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
401                if !has_api_version_already {
402                    url.query_pairs_mut().append_pair(
403                        azure_core::http::headers::query_param::API_VERSION,
404                        "7.1-preview",
405                    );
406                }
407                Ok(url)
408            }
409        }
410        impl std::future::IntoFuture for RequestBuilder {
411            type Output = azure_core::Result<models::BuildArtifact>;
412            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildArtifact>>;
413            #[doc = "Returns a future that sends the request and returns the parsed response body."]
414            #[doc = ""]
415            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
416            #[doc = ""]
417            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
418            fn into_future(self) -> Self::IntoFuture {
419                Box::pin(async move { self.send().await?.into_body().await })
420            }
421        }
422    }
423    pub mod get_file {
424        use super::models;
425        #[cfg(not(target_arch = "wasm32"))]
426        use futures::future::BoxFuture;
427        #[cfg(target_arch = "wasm32")]
428        use futures::future::LocalBoxFuture as BoxFuture;
429        #[derive(Debug)]
430        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
431        impl Response {
432            pub async fn into_body(self) -> azure_core::Result<String> {
433                self.0.into_body().await
434            }
435            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
436                self.0.into()
437            }
438        }
439        #[derive(Clone)]
440        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
441        #[doc = r""]
442        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
443        #[doc = r" parameters can be chained."]
444        #[doc = r""]
445        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
446        #[doc = r" converts the [`RequestBuilder`] into a future,"]
447        #[doc = r" executes the request and returns a `Result` with the parsed"]
448        #[doc = r" response."]
449        #[doc = r""]
450        #[doc = r" If you need lower-level access to the raw response details"]
451        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
452        #[doc = r" can finalize the request using the"]
453        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
454        #[doc = r" that resolves to a lower-level [`Response`] value."]
455        pub struct RequestBuilder {
456            pub(crate) client: super::super::Client,
457            pub(crate) organization: String,
458            pub(crate) project: String,
459            pub(crate) build_id: i32,
460            pub(crate) artifact_name: String,
461            pub(crate) file_id: String,
462            pub(crate) file_name: String,
463        }
464        impl RequestBuilder {
465            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
466            #[doc = ""]
467            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
468            #[doc = "However, this function can provide more flexibility when required."]
469            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
470                Box::pin({
471                    let this = self.clone();
472                    async move {
473                        let url = this.url()?;
474                        let mut req =
475                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
476                        if let Some(auth_header) = this
477                            .client
478                            .token_credential()
479                            .http_authorization_header(&this.client.scopes())
480                            .await?
481                        {
482                            req.insert_header(
483                                azure_core::http::headers::AUTHORIZATION,
484                                auth_header,
485                            );
486                        }
487                        let artifact_name = &this.artifact_name;
488                        req.url_mut()
489                            .query_pairs_mut()
490                            .append_pair("artifactName", artifact_name);
491                        let file_id = &this.file_id;
492                        req.url_mut()
493                            .query_pairs_mut()
494                            .append_pair("fileId", file_id);
495                        let file_name = &this.file_name;
496                        req.url_mut()
497                            .query_pairs_mut()
498                            .append_pair("fileName", file_name);
499                        let req_body = azure_core::Bytes::new();
500                        req.set_body(req_body);
501                        Ok(Response(this.client.send(&mut req).await?.into()))
502                    }
503                })
504            }
505            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
506                let mut url = azure_core :: http :: Url :: parse (& format ! ("{}/{}/{}/_apis/build/builds/{}/artifacts?artifactName={}&fileId={}&fileName={}" , self . client . endpoint () , & self . organization , & self . project , & self . build_id , & self . artifact_name , & self . file_id , & self . file_name)) ? ;
507                let has_api_version_already = url
508                    .query_pairs()
509                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
510                if !has_api_version_already {
511                    url.query_pairs_mut().append_pair(
512                        azure_core::http::headers::query_param::API_VERSION,
513                        "7.1-preview",
514                    );
515                }
516                Ok(url)
517            }
518        }
519        impl std::future::IntoFuture for RequestBuilder {
520            type Output = azure_core::Result<String>;
521            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
522            #[doc = "Returns a future that sends the request and returns the parsed response body."]
523            #[doc = ""]
524            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
525            #[doc = ""]
526            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
527            fn into_future(self) -> Self::IntoFuture {
528                Box::pin(async move { self.send().await?.into_body().await })
529            }
530        }
531    }
532    pub mod list {
533        use super::models;
534        #[cfg(not(target_arch = "wasm32"))]
535        use futures::future::BoxFuture;
536        #[cfg(target_arch = "wasm32")]
537        use futures::future::LocalBoxFuture as BoxFuture;
538        #[derive(Debug)]
539        pub struct Response(
540            azure_core::http::Response<models::BuildArtifactList, azure_core::http::JsonFormat>,
541        );
542        impl Response {
543            pub async fn into_body(self) -> azure_core::Result<models::BuildArtifactList> {
544                self.0.into_body().await
545            }
546            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
547                self.0.into()
548            }
549        }
550        #[derive(Clone)]
551        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
552        #[doc = r""]
553        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
554        #[doc = r" parameters can be chained."]
555        #[doc = r""]
556        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
557        #[doc = r" converts the [`RequestBuilder`] into a future,"]
558        #[doc = r" executes the request and returns a `Result` with the parsed"]
559        #[doc = r" response."]
560        #[doc = r""]
561        #[doc = r" If you need lower-level access to the raw response details"]
562        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
563        #[doc = r" can finalize the request using the"]
564        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
565        #[doc = r" that resolves to a lower-level [`Response`] value."]
566        pub struct RequestBuilder {
567            pub(crate) client: super::super::Client,
568            pub(crate) organization: String,
569            pub(crate) project: String,
570            pub(crate) build_id: i32,
571        }
572        impl RequestBuilder {
573            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
574            #[doc = ""]
575            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
576            #[doc = "However, this function can provide more flexibility when required."]
577            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
578                Box::pin({
579                    let this = self.clone();
580                    async move {
581                        let url = this.url()?;
582                        let mut req =
583                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
584                        if let Some(auth_header) = this
585                            .client
586                            .token_credential()
587                            .http_authorization_header(&this.client.scopes())
588                            .await?
589                        {
590                            req.insert_header(
591                                azure_core::http::headers::AUTHORIZATION,
592                                auth_header,
593                            );
594                        }
595                        let req_body = azure_core::Bytes::new();
596                        req.set_body(req_body);
597                        Ok(Response(this.client.send(&mut req).await?.into()))
598                    }
599                })
600            }
601            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
602                let mut url = azure_core::http::Url::parse(&format!(
603                    "{}/{}/{}/_apis/build/builds/{}/artifacts",
604                    self.client.endpoint(),
605                    &self.organization,
606                    &self.project,
607                    &self.build_id
608                ))?;
609                let has_api_version_already = url
610                    .query_pairs()
611                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
612                if !has_api_version_already {
613                    url.query_pairs_mut().append_pair(
614                        azure_core::http::headers::query_param::API_VERSION,
615                        "7.1-preview",
616                    );
617                }
618                Ok(url)
619            }
620        }
621        impl std::future::IntoFuture for RequestBuilder {
622            type Output = azure_core::Result<models::BuildArtifactList>;
623            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildArtifactList>>;
624            #[doc = "Returns a future that sends the request and returns the parsed response body."]
625            #[doc = ""]
626            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
627            #[doc = ""]
628            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
629            fn into_future(self) -> Self::IntoFuture {
630                Box::pin(async move { self.send().await?.into_body().await })
631            }
632        }
633    }
634    pub mod create {
635        use super::models;
636        #[cfg(not(target_arch = "wasm32"))]
637        use futures::future::BoxFuture;
638        #[cfg(target_arch = "wasm32")]
639        use futures::future::LocalBoxFuture as BoxFuture;
640        #[derive(Debug)]
641        pub struct Response(
642            azure_core::http::Response<models::BuildArtifact, azure_core::http::JsonFormat>,
643        );
644        impl Response {
645            pub async fn into_body(self) -> azure_core::Result<models::BuildArtifact> {
646                self.0.into_body().await
647            }
648            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
649                self.0.into()
650            }
651        }
652        #[derive(Clone)]
653        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
654        #[doc = r""]
655        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
656        #[doc = r" parameters can be chained."]
657        #[doc = r""]
658        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
659        #[doc = r" converts the [`RequestBuilder`] into a future,"]
660        #[doc = r" executes the request and returns a `Result` with the parsed"]
661        #[doc = r" response."]
662        #[doc = r""]
663        #[doc = r" If you need lower-level access to the raw response details"]
664        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
665        #[doc = r" can finalize the request using the"]
666        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
667        #[doc = r" that resolves to a lower-level [`Response`] value."]
668        pub struct RequestBuilder {
669            pub(crate) client: super::super::Client,
670            pub(crate) organization: String,
671            pub(crate) body: models::BuildArtifact,
672            pub(crate) project: String,
673            pub(crate) build_id: i32,
674        }
675        impl RequestBuilder {
676            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
677            #[doc = ""]
678            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
679            #[doc = "However, this function can provide more flexibility when required."]
680            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
681                Box::pin({
682                    let this = self.clone();
683                    async move {
684                        let url = this.url()?;
685                        let mut req =
686                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
687                        if let Some(auth_header) = this
688                            .client
689                            .token_credential()
690                            .http_authorization_header(&this.client.scopes())
691                            .await?
692                        {
693                            req.insert_header(
694                                azure_core::http::headers::AUTHORIZATION,
695                                auth_header,
696                            );
697                        }
698                        req.insert_header("content-type", "application/json");
699                        let req_body = azure_core::json::to_json(&this.body)?;
700                        req.set_body(req_body);
701                        Ok(Response(this.client.send(&mut req).await?.into()))
702                    }
703                })
704            }
705            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
706                let mut url = azure_core::http::Url::parse(&format!(
707                    "{}/{}/{}/_apis/build/builds/{}/artifacts",
708                    self.client.endpoint(),
709                    &self.organization,
710                    &self.project,
711                    &self.build_id
712                ))?;
713                let has_api_version_already = url
714                    .query_pairs()
715                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
716                if !has_api_version_already {
717                    url.query_pairs_mut().append_pair(
718                        azure_core::http::headers::query_param::API_VERSION,
719                        "7.1-preview",
720                    );
721                }
722                Ok(url)
723            }
724        }
725        impl std::future::IntoFuture for RequestBuilder {
726            type Output = azure_core::Result<models::BuildArtifact>;
727            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildArtifact>>;
728            #[doc = "Returns a future that sends the request and returns the parsed response body."]
729            #[doc = ""]
730            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
731            #[doc = ""]
732            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
733            fn into_future(self) -> Self::IntoFuture {
734                Box::pin(async move { self.send().await?.into_body().await })
735            }
736        }
737    }
738}
739pub mod leases {
740    use super::models;
741    #[cfg(not(target_arch = "wasm32"))]
742    use futures::future::BoxFuture;
743    #[cfg(target_arch = "wasm32")]
744    use futures::future::LocalBoxFuture as BoxFuture;
745    pub struct Client(pub(crate) super::Client);
746    impl Client {
747        #[doc = "Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run."]
748        #[doc = ""]
749        #[doc = "Arguments:"]
750        #[doc = "* `organization`: The name of the Azure DevOps organization."]
751        #[doc = "* `project`: Project ID or project name"]
752        #[doc = "* `user_owner_id`: The user id to search for."]
753        pub fn get_retention_leases_by_user_id(
754            &self,
755            organization: impl Into<String>,
756            project: impl Into<String>,
757            user_owner_id: impl Into<String>,
758        ) -> get_retention_leases_by_user_id::RequestBuilder {
759            get_retention_leases_by_user_id::RequestBuilder {
760                client: self.0.clone(),
761                organization: organization.into(),
762                project: project.into(),
763                user_owner_id: user_owner_id.into(),
764                definition_id: None,
765                run_id: None,
766            }
767        }
768        #[doc = "Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run."]
769        #[doc = ""]
770        #[doc = "Arguments:"]
771        #[doc = "* `organization`: The name of the Azure DevOps organization."]
772        #[doc = "* `project`: Project ID or project name"]
773        pub fn get_retention_leases_by_owner_id(
774            &self,
775            organization: impl Into<String>,
776            project: impl Into<String>,
777        ) -> get_retention_leases_by_owner_id::RequestBuilder {
778            get_retention_leases_by_owner_id::RequestBuilder {
779                client: self.0.clone(),
780                organization: organization.into(),
781                project: project.into(),
782                owner_id: None,
783                definition_id: None,
784                run_id: None,
785            }
786        }
787        #[doc = "Returns any leases matching the specified MinimalRetentionLeases"]
788        #[doc = ""]
789        #[doc = "Arguments:"]
790        #[doc = "* `organization`: The name of the Azure DevOps organization."]
791        #[doc = "* `project`: Project ID or project name"]
792        #[doc = "* `leases_to_fetch`: List of JSON-serialized MinimalRetentionLeases separated by '|'"]
793        pub fn get_retention_leases_by_minimal_retention_leases(
794            &self,
795            organization: impl Into<String>,
796            project: impl Into<String>,
797            leases_to_fetch: impl Into<String>,
798        ) -> get_retention_leases_by_minimal_retention_leases::RequestBuilder {
799            get_retention_leases_by_minimal_retention_leases::RequestBuilder {
800                client: self.0.clone(),
801                organization: organization.into(),
802                project: project.into(),
803                leases_to_fetch: leases_to_fetch.into(),
804            }
805        }
806        #[doc = "Adds new leases for pipeline runs."]
807        #[doc = ""]
808        #[doc = "Arguments:"]
809        #[doc = "* `organization`: The name of the Azure DevOps organization."]
810        #[doc = "* `project`: Project ID or project name"]
811        pub fn add(
812            &self,
813            organization: impl Into<String>,
814            body: Vec<models::NewRetentionLease>,
815            project: impl Into<String>,
816        ) -> add::RequestBuilder {
817            add::RequestBuilder {
818                client: self.0.clone(),
819                organization: organization.into(),
820                body,
821                project: project.into(),
822            }
823        }
824        #[doc = "Removes specific retention leases."]
825        #[doc = ""]
826        #[doc = "Arguments:"]
827        #[doc = "* `organization`: The name of the Azure DevOps organization."]
828        #[doc = "* `project`: Project ID or project name"]
829        pub fn delete(
830            &self,
831            organization: impl Into<String>,
832            project: impl Into<String>,
833            ids: impl Into<String>,
834        ) -> delete::RequestBuilder {
835            delete::RequestBuilder {
836                client: self.0.clone(),
837                organization: organization.into(),
838                project: project.into(),
839                ids: ids.into(),
840            }
841        }
842        #[doc = "Returns the details of the retention lease given a lease id."]
843        #[doc = ""]
844        #[doc = "Arguments:"]
845        #[doc = "* `organization`: The name of the Azure DevOps organization."]
846        #[doc = "* `project`: Project ID or project name"]
847        pub fn get(
848            &self,
849            organization: impl Into<String>,
850            project: impl Into<String>,
851            lease_id: i32,
852        ) -> get::RequestBuilder {
853            get::RequestBuilder {
854                client: self.0.clone(),
855                organization: organization.into(),
856                project: project.into(),
857                lease_id,
858            }
859        }
860        #[doc = "Updates the duration or pipeline protection status of a retention lease."]
861        #[doc = ""]
862        #[doc = "Arguments:"]
863        #[doc = "* `organization`: The name of the Azure DevOps organization."]
864        #[doc = "* `body`: The new data for the retention lease."]
865        #[doc = "* `project`: Project ID or project name"]
866        #[doc = "* `lease_id`: The ID of the lease to update."]
867        pub fn update(
868            &self,
869            organization: impl Into<String>,
870            body: impl Into<models::RetentionLeaseUpdate>,
871            project: impl Into<String>,
872            lease_id: i32,
873        ) -> update::RequestBuilder {
874            update::RequestBuilder {
875                client: self.0.clone(),
876                organization: organization.into(),
877                body: body.into(),
878                project: project.into(),
879                lease_id,
880            }
881        }
882    }
883    pub mod get_retention_leases_by_user_id {
884        use super::models;
885        #[cfg(not(target_arch = "wasm32"))]
886        use futures::future::BoxFuture;
887        #[cfg(target_arch = "wasm32")]
888        use futures::future::LocalBoxFuture as BoxFuture;
889        #[derive(Debug)]
890        pub struct Response(
891            azure_core::http::Response<models::RetentionLeaseList, azure_core::http::JsonFormat>,
892        );
893        impl Response {
894            pub async fn into_body(self) -> azure_core::Result<models::RetentionLeaseList> {
895                self.0.into_body().await
896            }
897            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
898                self.0.into()
899            }
900        }
901        #[derive(Clone)]
902        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
903        #[doc = r""]
904        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
905        #[doc = r" parameters can be chained."]
906        #[doc = r""]
907        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
908        #[doc = r" converts the [`RequestBuilder`] into a future,"]
909        #[doc = r" executes the request and returns a `Result` with the parsed"]
910        #[doc = r" response."]
911        #[doc = r""]
912        #[doc = r" If you need lower-level access to the raw response details"]
913        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
914        #[doc = r" can finalize the request using the"]
915        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
916        #[doc = r" that resolves to a lower-level [`Response`] value."]
917        pub struct RequestBuilder {
918            pub(crate) client: super::super::Client,
919            pub(crate) organization: String,
920            pub(crate) project: String,
921            pub(crate) user_owner_id: String,
922            pub(crate) definition_id: Option<i32>,
923            pub(crate) run_id: Option<i32>,
924        }
925        impl RequestBuilder {
926            #[doc = "An optional parameter to limit the search to a specific pipeline definition."]
927            pub fn definition_id(mut self, definition_id: i32) -> Self {
928                self.definition_id = Some(definition_id);
929                self
930            }
931            #[doc = "An optional parameter to limit the search to a single pipeline run. Requires definition_id."]
932            pub fn run_id(mut self, run_id: i32) -> Self {
933                self.run_id = Some(run_id);
934                self
935            }
936            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
937            #[doc = ""]
938            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
939            #[doc = "However, this function can provide more flexibility when required."]
940            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
941                Box::pin({
942                    let this = self.clone();
943                    async move {
944                        let url = this.url()?;
945                        let mut req =
946                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
947                        if let Some(auth_header) = this
948                            .client
949                            .token_credential()
950                            .http_authorization_header(&this.client.scopes())
951                            .await?
952                        {
953                            req.insert_header(
954                                azure_core::http::headers::AUTHORIZATION,
955                                auth_header,
956                            );
957                        }
958                        let user_owner_id = &this.user_owner_id;
959                        req.url_mut()
960                            .query_pairs_mut()
961                            .append_pair("userOwnerId", user_owner_id);
962                        if let Some(definition_id) = &this.definition_id {
963                            req.url_mut()
964                                .query_pairs_mut()
965                                .append_pair("definitionId", &definition_id.to_string());
966                        }
967                        if let Some(run_id) = &this.run_id {
968                            req.url_mut()
969                                .query_pairs_mut()
970                                .append_pair("runId", &run_id.to_string());
971                        }
972                        let req_body = azure_core::Bytes::new();
973                        req.set_body(req_body);
974                        Ok(Response(this.client.send(&mut req).await?.into()))
975                    }
976                })
977            }
978            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
979                let mut url = azure_core::http::Url::parse(&format!(
980                    "{}/{}/{}/_apis/build/retention/leases?userOwnerId={}",
981                    self.client.endpoint(),
982                    &self.organization,
983                    &self.project,
984                    &self.user_owner_id
985                ))?;
986                let has_api_version_already = url
987                    .query_pairs()
988                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
989                if !has_api_version_already {
990                    url.query_pairs_mut().append_pair(
991                        azure_core::http::headers::query_param::API_VERSION,
992                        "7.1-preview",
993                    );
994                }
995                Ok(url)
996            }
997        }
998        impl std::future::IntoFuture for RequestBuilder {
999            type Output = azure_core::Result<models::RetentionLeaseList>;
1000            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
1001            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1002            #[doc = ""]
1003            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1004            #[doc = ""]
1005            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1006            fn into_future(self) -> Self::IntoFuture {
1007                Box::pin(async move { self.send().await?.into_body().await })
1008            }
1009        }
1010    }
1011    pub mod get_retention_leases_by_owner_id {
1012        use super::models;
1013        #[cfg(not(target_arch = "wasm32"))]
1014        use futures::future::BoxFuture;
1015        #[cfg(target_arch = "wasm32")]
1016        use futures::future::LocalBoxFuture as BoxFuture;
1017        #[derive(Debug)]
1018        pub struct Response(
1019            azure_core::http::Response<models::RetentionLeaseList, azure_core::http::JsonFormat>,
1020        );
1021        impl Response {
1022            pub async fn into_body(self) -> azure_core::Result<models::RetentionLeaseList> {
1023                self.0.into_body().await
1024            }
1025            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1026                self.0.into()
1027            }
1028        }
1029        #[derive(Clone)]
1030        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1031        #[doc = r""]
1032        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1033        #[doc = r" parameters can be chained."]
1034        #[doc = r""]
1035        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1036        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1037        #[doc = r" executes the request and returns a `Result` with the parsed"]
1038        #[doc = r" response."]
1039        #[doc = r""]
1040        #[doc = r" If you need lower-level access to the raw response details"]
1041        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1042        #[doc = r" can finalize the request using the"]
1043        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1044        #[doc = r" that resolves to a lower-level [`Response`] value."]
1045        pub struct RequestBuilder {
1046            pub(crate) client: super::super::Client,
1047            pub(crate) organization: String,
1048            pub(crate) project: String,
1049            pub(crate) owner_id: Option<String>,
1050            pub(crate) definition_id: Option<i32>,
1051            pub(crate) run_id: Option<i32>,
1052        }
1053        impl RequestBuilder {
1054            pub fn owner_id(mut self, owner_id: impl Into<String>) -> Self {
1055                self.owner_id = Some(owner_id.into());
1056                self
1057            }
1058            #[doc = "An optional parameter to limit the search to a specific pipeline definition."]
1059            pub fn definition_id(mut self, definition_id: i32) -> Self {
1060                self.definition_id = Some(definition_id);
1061                self
1062            }
1063            #[doc = "An optional parameter to limit the search to a single pipeline run. Requires definition_id."]
1064            pub fn run_id(mut self, run_id: i32) -> Self {
1065                self.run_id = Some(run_id);
1066                self
1067            }
1068            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1069            #[doc = ""]
1070            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1071            #[doc = "However, this function can provide more flexibility when required."]
1072            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1073                Box::pin({
1074                    let this = self.clone();
1075                    async move {
1076                        let url = this.url()?;
1077                        let mut req =
1078                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1079                        if let Some(auth_header) = this
1080                            .client
1081                            .token_credential()
1082                            .http_authorization_header(&this.client.scopes())
1083                            .await?
1084                        {
1085                            req.insert_header(
1086                                azure_core::http::headers::AUTHORIZATION,
1087                                auth_header,
1088                            );
1089                        }
1090                        if let Some(owner_id) = &this.owner_id {
1091                            req.url_mut()
1092                                .query_pairs_mut()
1093                                .append_pair("ownerId", owner_id);
1094                        }
1095                        if let Some(definition_id) = &this.definition_id {
1096                            req.url_mut()
1097                                .query_pairs_mut()
1098                                .append_pair("definitionId", &definition_id.to_string());
1099                        }
1100                        if let Some(run_id) = &this.run_id {
1101                            req.url_mut()
1102                                .query_pairs_mut()
1103                                .append_pair("runId", &run_id.to_string());
1104                        }
1105                        let req_body = azure_core::Bytes::new();
1106                        req.set_body(req_body);
1107                        Ok(Response(this.client.send(&mut req).await?.into()))
1108                    }
1109                })
1110            }
1111            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1112                let mut url = azure_core::http::Url::parse(&format!(
1113                    "{}/{}/{}/_apis/build/retention/leases?",
1114                    self.client.endpoint(),
1115                    &self.organization,
1116                    &self.project
1117                ))?;
1118                let has_api_version_already = url
1119                    .query_pairs()
1120                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1121                if !has_api_version_already {
1122                    url.query_pairs_mut().append_pair(
1123                        azure_core::http::headers::query_param::API_VERSION,
1124                        "7.1-preview",
1125                    );
1126                }
1127                Ok(url)
1128            }
1129        }
1130        impl std::future::IntoFuture for RequestBuilder {
1131            type Output = azure_core::Result<models::RetentionLeaseList>;
1132            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
1133            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1134            #[doc = ""]
1135            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1136            #[doc = ""]
1137            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1138            fn into_future(self) -> Self::IntoFuture {
1139                Box::pin(async move { self.send().await?.into_body().await })
1140            }
1141        }
1142    }
1143    pub mod get_retention_leases_by_minimal_retention_leases {
1144        use super::models;
1145        #[cfg(not(target_arch = "wasm32"))]
1146        use futures::future::BoxFuture;
1147        #[cfg(target_arch = "wasm32")]
1148        use futures::future::LocalBoxFuture as BoxFuture;
1149        #[derive(Debug)]
1150        pub struct Response(
1151            azure_core::http::Response<models::RetentionLeaseList, azure_core::http::JsonFormat>,
1152        );
1153        impl Response {
1154            pub async fn into_body(self) -> azure_core::Result<models::RetentionLeaseList> {
1155                self.0.into_body().await
1156            }
1157            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1158                self.0.into()
1159            }
1160        }
1161        #[derive(Clone)]
1162        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1163        #[doc = r""]
1164        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1165        #[doc = r" parameters can be chained."]
1166        #[doc = r""]
1167        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1168        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1169        #[doc = r" executes the request and returns a `Result` with the parsed"]
1170        #[doc = r" response."]
1171        #[doc = r""]
1172        #[doc = r" If you need lower-level access to the raw response details"]
1173        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1174        #[doc = r" can finalize the request using the"]
1175        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1176        #[doc = r" that resolves to a lower-level [`Response`] value."]
1177        pub struct RequestBuilder {
1178            pub(crate) client: super::super::Client,
1179            pub(crate) organization: String,
1180            pub(crate) project: String,
1181            pub(crate) leases_to_fetch: String,
1182        }
1183        impl RequestBuilder {
1184            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1185            #[doc = ""]
1186            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1187            #[doc = "However, this function can provide more flexibility when required."]
1188            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1189                Box::pin({
1190                    let this = self.clone();
1191                    async move {
1192                        let url = this.url()?;
1193                        let mut req =
1194                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1195                        if let Some(auth_header) = this
1196                            .client
1197                            .token_credential()
1198                            .http_authorization_header(&this.client.scopes())
1199                            .await?
1200                        {
1201                            req.insert_header(
1202                                azure_core::http::headers::AUTHORIZATION,
1203                                auth_header,
1204                            );
1205                        }
1206                        let leases_to_fetch = &this.leases_to_fetch;
1207                        req.url_mut()
1208                            .query_pairs_mut()
1209                            .append_pair("leasesToFetch", leases_to_fetch);
1210                        let req_body = azure_core::Bytes::new();
1211                        req.set_body(req_body);
1212                        Ok(Response(this.client.send(&mut req).await?.into()))
1213                    }
1214                })
1215            }
1216            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1217                let mut url = azure_core::http::Url::parse(&format!(
1218                    "{}/{}/{}/_apis/build/retention/leases",
1219                    self.client.endpoint(),
1220                    &self.organization,
1221                    &self.project
1222                ))?;
1223                let has_api_version_already = url
1224                    .query_pairs()
1225                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1226                if !has_api_version_already {
1227                    url.query_pairs_mut().append_pair(
1228                        azure_core::http::headers::query_param::API_VERSION,
1229                        "7.1-preview",
1230                    );
1231                }
1232                Ok(url)
1233            }
1234        }
1235        impl std::future::IntoFuture for RequestBuilder {
1236            type Output = azure_core::Result<models::RetentionLeaseList>;
1237            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
1238            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1239            #[doc = ""]
1240            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1241            #[doc = ""]
1242            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1243            fn into_future(self) -> Self::IntoFuture {
1244                Box::pin(async move { self.send().await?.into_body().await })
1245            }
1246        }
1247    }
1248    pub mod add {
1249        use super::models;
1250        #[cfg(not(target_arch = "wasm32"))]
1251        use futures::future::BoxFuture;
1252        #[cfg(target_arch = "wasm32")]
1253        use futures::future::LocalBoxFuture as BoxFuture;
1254        #[derive(Debug)]
1255        pub struct Response(
1256            azure_core::http::Response<models::RetentionLeaseList, azure_core::http::JsonFormat>,
1257        );
1258        impl Response {
1259            pub async fn into_body(self) -> azure_core::Result<models::RetentionLeaseList> {
1260                self.0.into_body().await
1261            }
1262            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1263                self.0.into()
1264            }
1265        }
1266        #[derive(Clone)]
1267        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1268        #[doc = r""]
1269        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1270        #[doc = r" parameters can be chained."]
1271        #[doc = r""]
1272        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1273        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1274        #[doc = r" executes the request and returns a `Result` with the parsed"]
1275        #[doc = r" response."]
1276        #[doc = r""]
1277        #[doc = r" If you need lower-level access to the raw response details"]
1278        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1279        #[doc = r" can finalize the request using the"]
1280        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1281        #[doc = r" that resolves to a lower-level [`Response`] value."]
1282        pub struct RequestBuilder {
1283            pub(crate) client: super::super::Client,
1284            pub(crate) organization: String,
1285            pub(crate) body: Vec<models::NewRetentionLease>,
1286            pub(crate) project: String,
1287        }
1288        impl RequestBuilder {
1289            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1290            #[doc = ""]
1291            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1292            #[doc = "However, this function can provide more flexibility when required."]
1293            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1294                Box::pin({
1295                    let this = self.clone();
1296                    async move {
1297                        let url = this.url()?;
1298                        let mut req =
1299                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
1300                        if let Some(auth_header) = this
1301                            .client
1302                            .token_credential()
1303                            .http_authorization_header(&this.client.scopes())
1304                            .await?
1305                        {
1306                            req.insert_header(
1307                                azure_core::http::headers::AUTHORIZATION,
1308                                auth_header,
1309                            );
1310                        }
1311                        req.insert_header("content-type", "application/json");
1312                        let req_body = azure_core::json::to_json(&this.body)?;
1313                        req.set_body(req_body);
1314                        Ok(Response(this.client.send(&mut req).await?.into()))
1315                    }
1316                })
1317            }
1318            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1319                let mut url = azure_core::http::Url::parse(&format!(
1320                    "{}/{}/{}/_apis/build/retention/leases",
1321                    self.client.endpoint(),
1322                    &self.organization,
1323                    &self.project
1324                ))?;
1325                let has_api_version_already = url
1326                    .query_pairs()
1327                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1328                if !has_api_version_already {
1329                    url.query_pairs_mut().append_pair(
1330                        azure_core::http::headers::query_param::API_VERSION,
1331                        "7.1-preview",
1332                    );
1333                }
1334                Ok(url)
1335            }
1336        }
1337        impl std::future::IntoFuture for RequestBuilder {
1338            type Output = azure_core::Result<models::RetentionLeaseList>;
1339            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
1340            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1341            #[doc = ""]
1342            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1343            #[doc = ""]
1344            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1345            fn into_future(self) -> Self::IntoFuture {
1346                Box::pin(async move { self.send().await?.into_body().await })
1347            }
1348        }
1349    }
1350    pub mod delete {
1351        use super::models;
1352        #[cfg(not(target_arch = "wasm32"))]
1353        use futures::future::BoxFuture;
1354        #[cfg(target_arch = "wasm32")]
1355        use futures::future::LocalBoxFuture as BoxFuture;
1356        #[derive(Debug)]
1357        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
1358        impl Response {
1359            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1360                self.0.into()
1361            }
1362        }
1363        #[derive(Clone)]
1364        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1365        #[doc = r""]
1366        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1367        #[doc = r" parameters can be chained."]
1368        #[doc = r""]
1369        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1370        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1371        #[doc = r" executes the request and returns a `Result` with the parsed"]
1372        #[doc = r" response."]
1373        #[doc = r""]
1374        #[doc = r" If you need lower-level access to the raw response details"]
1375        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1376        #[doc = r" can finalize the request using the"]
1377        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1378        #[doc = r" that resolves to a lower-level [`Response`] value."]
1379        pub struct RequestBuilder {
1380            pub(crate) client: super::super::Client,
1381            pub(crate) organization: String,
1382            pub(crate) project: String,
1383            pub(crate) ids: String,
1384        }
1385        impl RequestBuilder {
1386            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1387            #[doc = ""]
1388            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1389            #[doc = "However, this function can provide more flexibility when required."]
1390            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1391                Box::pin({
1392                    let this = self.clone();
1393                    async move {
1394                        let url = this.url()?;
1395                        let mut req =
1396                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
1397                        if let Some(auth_header) = this
1398                            .client
1399                            .token_credential()
1400                            .http_authorization_header(&this.client.scopes())
1401                            .await?
1402                        {
1403                            req.insert_header(
1404                                azure_core::http::headers::AUTHORIZATION,
1405                                auth_header,
1406                            );
1407                        }
1408                        let ids = &this.ids;
1409                        req.url_mut().query_pairs_mut().append_pair("ids", ids);
1410                        let req_body = azure_core::Bytes::new();
1411                        req.set_body(req_body);
1412                        Ok(Response(this.client.send(&mut req).await?.into()))
1413                    }
1414                })
1415            }
1416            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1417                let mut url = azure_core::http::Url::parse(&format!(
1418                    "{}/{}/{}/_apis/build/retention/leases",
1419                    self.client.endpoint(),
1420                    &self.organization,
1421                    &self.project
1422                ))?;
1423                let has_api_version_already = url
1424                    .query_pairs()
1425                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1426                if !has_api_version_already {
1427                    url.query_pairs_mut().append_pair(
1428                        azure_core::http::headers::query_param::API_VERSION,
1429                        "7.1-preview",
1430                    );
1431                }
1432                Ok(url)
1433            }
1434        }
1435        impl std::future::IntoFuture for RequestBuilder {
1436            type Output = azure_core::Result<()>;
1437            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1438            #[doc = "Returns a future that sends the request and waits for the response."]
1439            #[doc = ""]
1440            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1441            #[doc = ""]
1442            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1443            fn into_future(self) -> Self::IntoFuture {
1444                Box::pin(async move {
1445                    let _rsp = self.send().await?;
1446                    Ok(())
1447                })
1448            }
1449        }
1450    }
1451    pub mod get {
1452        use super::models;
1453        #[cfg(not(target_arch = "wasm32"))]
1454        use futures::future::BoxFuture;
1455        #[cfg(target_arch = "wasm32")]
1456        use futures::future::LocalBoxFuture as BoxFuture;
1457        #[derive(Debug)]
1458        pub struct Response(
1459            azure_core::http::Response<models::RetentionLease, azure_core::http::JsonFormat>,
1460        );
1461        impl Response {
1462            pub async fn into_body(self) -> azure_core::Result<models::RetentionLease> {
1463                self.0.into_body().await
1464            }
1465            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1466                self.0.into()
1467            }
1468        }
1469        #[derive(Clone)]
1470        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1471        #[doc = r""]
1472        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1473        #[doc = r" parameters can be chained."]
1474        #[doc = r""]
1475        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1476        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1477        #[doc = r" executes the request and returns a `Result` with the parsed"]
1478        #[doc = r" response."]
1479        #[doc = r""]
1480        #[doc = r" If you need lower-level access to the raw response details"]
1481        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1482        #[doc = r" can finalize the request using the"]
1483        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1484        #[doc = r" that resolves to a lower-level [`Response`] value."]
1485        pub struct RequestBuilder {
1486            pub(crate) client: super::super::Client,
1487            pub(crate) organization: String,
1488            pub(crate) project: String,
1489            pub(crate) lease_id: i32,
1490        }
1491        impl RequestBuilder {
1492            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1493            #[doc = ""]
1494            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1495            #[doc = "However, this function can provide more flexibility when required."]
1496            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1497                Box::pin({
1498                    let this = self.clone();
1499                    async move {
1500                        let url = this.url()?;
1501                        let mut req =
1502                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1503                        if let Some(auth_header) = this
1504                            .client
1505                            .token_credential()
1506                            .http_authorization_header(&this.client.scopes())
1507                            .await?
1508                        {
1509                            req.insert_header(
1510                                azure_core::http::headers::AUTHORIZATION,
1511                                auth_header,
1512                            );
1513                        }
1514                        let req_body = azure_core::Bytes::new();
1515                        req.set_body(req_body);
1516                        Ok(Response(this.client.send(&mut req).await?.into()))
1517                    }
1518                })
1519            }
1520            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1521                let mut url = azure_core::http::Url::parse(&format!(
1522                    "{}/{}/{}/_apis/build/retention/leases/{}",
1523                    self.client.endpoint(),
1524                    &self.organization,
1525                    &self.project,
1526                    &self.lease_id
1527                ))?;
1528                let has_api_version_already = url
1529                    .query_pairs()
1530                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1531                if !has_api_version_already {
1532                    url.query_pairs_mut().append_pair(
1533                        azure_core::http::headers::query_param::API_VERSION,
1534                        "7.1-preview",
1535                    );
1536                }
1537                Ok(url)
1538            }
1539        }
1540        impl std::future::IntoFuture for RequestBuilder {
1541            type Output = azure_core::Result<models::RetentionLease>;
1542            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLease>>;
1543            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1544            #[doc = ""]
1545            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1546            #[doc = ""]
1547            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1548            fn into_future(self) -> Self::IntoFuture {
1549                Box::pin(async move { self.send().await?.into_body().await })
1550            }
1551        }
1552    }
1553    pub mod update {
1554        use super::models;
1555        #[cfg(not(target_arch = "wasm32"))]
1556        use futures::future::BoxFuture;
1557        #[cfg(target_arch = "wasm32")]
1558        use futures::future::LocalBoxFuture as BoxFuture;
1559        #[derive(Debug)]
1560        pub struct Response(
1561            azure_core::http::Response<models::RetentionLease, azure_core::http::JsonFormat>,
1562        );
1563        impl Response {
1564            pub async fn into_body(self) -> azure_core::Result<models::RetentionLease> {
1565                self.0.into_body().await
1566            }
1567            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1568                self.0.into()
1569            }
1570        }
1571        #[derive(Clone)]
1572        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1573        #[doc = r""]
1574        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1575        #[doc = r" parameters can be chained."]
1576        #[doc = r""]
1577        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1578        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1579        #[doc = r" executes the request and returns a `Result` with the parsed"]
1580        #[doc = r" response."]
1581        #[doc = r""]
1582        #[doc = r" If you need lower-level access to the raw response details"]
1583        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1584        #[doc = r" can finalize the request using the"]
1585        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1586        #[doc = r" that resolves to a lower-level [`Response`] value."]
1587        pub struct RequestBuilder {
1588            pub(crate) client: super::super::Client,
1589            pub(crate) organization: String,
1590            pub(crate) body: models::RetentionLeaseUpdate,
1591            pub(crate) project: String,
1592            pub(crate) lease_id: i32,
1593        }
1594        impl RequestBuilder {
1595            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1596            #[doc = ""]
1597            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1598            #[doc = "However, this function can provide more flexibility when required."]
1599            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1600                Box::pin({
1601                    let this = self.clone();
1602                    async move {
1603                        let url = this.url()?;
1604                        let mut req =
1605                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
1606                        if let Some(auth_header) = this
1607                            .client
1608                            .token_credential()
1609                            .http_authorization_header(&this.client.scopes())
1610                            .await?
1611                        {
1612                            req.insert_header(
1613                                azure_core::http::headers::AUTHORIZATION,
1614                                auth_header,
1615                            );
1616                        }
1617                        req.insert_header("content-type", "application/json");
1618                        let req_body = azure_core::json::to_json(&this.body)?;
1619                        req.set_body(req_body);
1620                        Ok(Response(this.client.send(&mut req).await?.into()))
1621                    }
1622                })
1623            }
1624            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1625                let mut url = azure_core::http::Url::parse(&format!(
1626                    "{}/{}/{}/_apis/build/retention/leases/{}",
1627                    self.client.endpoint(),
1628                    &self.organization,
1629                    &self.project,
1630                    &self.lease_id
1631                ))?;
1632                let has_api_version_already = url
1633                    .query_pairs()
1634                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1635                if !has_api_version_already {
1636                    url.query_pairs_mut().append_pair(
1637                        azure_core::http::headers::query_param::API_VERSION,
1638                        "7.1-preview",
1639                    );
1640                }
1641                Ok(url)
1642            }
1643        }
1644        impl std::future::IntoFuture for RequestBuilder {
1645            type Output = azure_core::Result<models::RetentionLease>;
1646            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLease>>;
1647            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1648            #[doc = ""]
1649            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1650            #[doc = ""]
1651            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1652            fn into_future(self) -> Self::IntoFuture {
1653                Box::pin(async move { self.send().await?.into_body().await })
1654            }
1655        }
1656    }
1657}
1658pub mod controllers {
1659    use super::models;
1660    #[cfg(not(target_arch = "wasm32"))]
1661    use futures::future::BoxFuture;
1662    #[cfg(target_arch = "wasm32")]
1663    use futures::future::LocalBoxFuture as BoxFuture;
1664    pub struct Client(pub(crate) super::Client);
1665    impl Client {
1666        #[doc = "Gets controller, optionally filtered by name"]
1667        #[doc = ""]
1668        #[doc = "Arguments:"]
1669        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1670        pub fn list(&self, organization: impl Into<String>) -> list::RequestBuilder {
1671            list::RequestBuilder {
1672                client: self.0.clone(),
1673                organization: organization.into(),
1674                name: None,
1675            }
1676        }
1677        #[doc = "Gets a controller"]
1678        #[doc = ""]
1679        #[doc = "Arguments:"]
1680        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1681        pub fn get(
1682            &self,
1683            organization: impl Into<String>,
1684            controller_id: i32,
1685        ) -> get::RequestBuilder {
1686            get::RequestBuilder {
1687                client: self.0.clone(),
1688                organization: organization.into(),
1689                controller_id,
1690            }
1691        }
1692    }
1693    pub mod list {
1694        use super::models;
1695        #[cfg(not(target_arch = "wasm32"))]
1696        use futures::future::BoxFuture;
1697        #[cfg(target_arch = "wasm32")]
1698        use futures::future::LocalBoxFuture as BoxFuture;
1699        #[derive(Debug)]
1700        pub struct Response(
1701            azure_core::http::Response<models::BuildControllerList, azure_core::http::JsonFormat>,
1702        );
1703        impl Response {
1704            pub async fn into_body(self) -> azure_core::Result<models::BuildControllerList> {
1705                self.0.into_body().await
1706            }
1707            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1708                self.0.into()
1709            }
1710        }
1711        #[derive(Clone)]
1712        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1713        #[doc = r""]
1714        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1715        #[doc = r" parameters can be chained."]
1716        #[doc = r""]
1717        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1718        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1719        #[doc = r" executes the request and returns a `Result` with the parsed"]
1720        #[doc = r" response."]
1721        #[doc = r""]
1722        #[doc = r" If you need lower-level access to the raw response details"]
1723        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1724        #[doc = r" can finalize the request using the"]
1725        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1726        #[doc = r" that resolves to a lower-level [`Response`] value."]
1727        pub struct RequestBuilder {
1728            pub(crate) client: super::super::Client,
1729            pub(crate) organization: String,
1730            pub(crate) name: Option<String>,
1731        }
1732        impl RequestBuilder {
1733            pub fn name(mut self, name: impl Into<String>) -> Self {
1734                self.name = Some(name.into());
1735                self
1736            }
1737            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1738            #[doc = ""]
1739            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1740            #[doc = "However, this function can provide more flexibility when required."]
1741            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1742                Box::pin({
1743                    let this = self.clone();
1744                    async move {
1745                        let url = this.url()?;
1746                        let mut req =
1747                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1748                        if let Some(auth_header) = this
1749                            .client
1750                            .token_credential()
1751                            .http_authorization_header(&this.client.scopes())
1752                            .await?
1753                        {
1754                            req.insert_header(
1755                                azure_core::http::headers::AUTHORIZATION,
1756                                auth_header,
1757                            );
1758                        }
1759                        if let Some(name) = &this.name {
1760                            req.url_mut().query_pairs_mut().append_pair("name", name);
1761                        }
1762                        let req_body = azure_core::Bytes::new();
1763                        req.set_body(req_body);
1764                        Ok(Response(this.client.send(&mut req).await?.into()))
1765                    }
1766                })
1767            }
1768            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1769                let mut url = azure_core::http::Url::parse(&format!(
1770                    "{}/{}/_apis/build/controllers",
1771                    self.client.endpoint(),
1772                    &self.organization
1773                ))?;
1774                let has_api_version_already = url
1775                    .query_pairs()
1776                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1777                if !has_api_version_already {
1778                    url.query_pairs_mut().append_pair(
1779                        azure_core::http::headers::query_param::API_VERSION,
1780                        "7.1-preview",
1781                    );
1782                }
1783                Ok(url)
1784            }
1785        }
1786        impl std::future::IntoFuture for RequestBuilder {
1787            type Output = azure_core::Result<models::BuildControllerList>;
1788            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildControllerList>>;
1789            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1790            #[doc = ""]
1791            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1792            #[doc = ""]
1793            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1794            fn into_future(self) -> Self::IntoFuture {
1795                Box::pin(async move { self.send().await?.into_body().await })
1796            }
1797        }
1798    }
1799    pub mod get {
1800        use super::models;
1801        #[cfg(not(target_arch = "wasm32"))]
1802        use futures::future::BoxFuture;
1803        #[cfg(target_arch = "wasm32")]
1804        use futures::future::LocalBoxFuture as BoxFuture;
1805        #[derive(Debug)]
1806        pub struct Response(
1807            azure_core::http::Response<models::BuildController, azure_core::http::JsonFormat>,
1808        );
1809        impl Response {
1810            pub async fn into_body(self) -> azure_core::Result<models::BuildController> {
1811                self.0.into_body().await
1812            }
1813            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1814                self.0.into()
1815            }
1816        }
1817        #[derive(Clone)]
1818        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1819        #[doc = r""]
1820        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1821        #[doc = r" parameters can be chained."]
1822        #[doc = r""]
1823        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1824        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1825        #[doc = r" executes the request and returns a `Result` with the parsed"]
1826        #[doc = r" response."]
1827        #[doc = r""]
1828        #[doc = r" If you need lower-level access to the raw response details"]
1829        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1830        #[doc = r" can finalize the request using the"]
1831        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1832        #[doc = r" that resolves to a lower-level [`Response`] value."]
1833        pub struct RequestBuilder {
1834            pub(crate) client: super::super::Client,
1835            pub(crate) organization: String,
1836            pub(crate) controller_id: i32,
1837        }
1838        impl RequestBuilder {
1839            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1840            #[doc = ""]
1841            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1842            #[doc = "However, this function can provide more flexibility when required."]
1843            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1844                Box::pin({
1845                    let this = self.clone();
1846                    async move {
1847                        let url = this.url()?;
1848                        let mut req =
1849                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1850                        if let Some(auth_header) = this
1851                            .client
1852                            .token_credential()
1853                            .http_authorization_header(&this.client.scopes())
1854                            .await?
1855                        {
1856                            req.insert_header(
1857                                azure_core::http::headers::AUTHORIZATION,
1858                                auth_header,
1859                            );
1860                        }
1861                        let req_body = azure_core::Bytes::new();
1862                        req.set_body(req_body);
1863                        Ok(Response(this.client.send(&mut req).await?.into()))
1864                    }
1865                })
1866            }
1867            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1868                let mut url = azure_core::http::Url::parse(&format!(
1869                    "{}/{}/_apis/build/controllers/{}",
1870                    self.client.endpoint(),
1871                    &self.organization,
1872                    &self.controller_id
1873                ))?;
1874                let has_api_version_already = url
1875                    .query_pairs()
1876                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1877                if !has_api_version_already {
1878                    url.query_pairs_mut().append_pair(
1879                        azure_core::http::headers::query_param::API_VERSION,
1880                        "7.1-preview",
1881                    );
1882                }
1883                Ok(url)
1884            }
1885        }
1886        impl std::future::IntoFuture for RequestBuilder {
1887            type Output = azure_core::Result<models::BuildController>;
1888            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildController>>;
1889            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1890            #[doc = ""]
1891            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1892            #[doc = ""]
1893            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1894            fn into_future(self) -> Self::IntoFuture {
1895                Box::pin(async move { self.send().await?.into_body().await })
1896            }
1897        }
1898    }
1899}
1900pub mod resource_usage {
1901    use super::models;
1902    #[cfg(not(target_arch = "wasm32"))]
1903    use futures::future::BoxFuture;
1904    #[cfg(target_arch = "wasm32")]
1905    use futures::future::LocalBoxFuture as BoxFuture;
1906    pub struct Client(pub(crate) super::Client);
1907    impl Client {
1908        #[doc = "Gets information about build resources in the system."]
1909        #[doc = ""]
1910        #[doc = "Arguments:"]
1911        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1912        pub fn get(&self, organization: impl Into<String>) -> get::RequestBuilder {
1913            get::RequestBuilder {
1914                client: self.0.clone(),
1915                organization: organization.into(),
1916            }
1917        }
1918    }
1919    pub mod get {
1920        use super::models;
1921        #[cfg(not(target_arch = "wasm32"))]
1922        use futures::future::BoxFuture;
1923        #[cfg(target_arch = "wasm32")]
1924        use futures::future::LocalBoxFuture as BoxFuture;
1925        #[derive(Debug)]
1926        pub struct Response(
1927            azure_core::http::Response<models::BuildResourceUsage, azure_core::http::JsonFormat>,
1928        );
1929        impl Response {
1930            pub async fn into_body(self) -> azure_core::Result<models::BuildResourceUsage> {
1931                self.0.into_body().await
1932            }
1933            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1934                self.0.into()
1935            }
1936        }
1937        #[derive(Clone)]
1938        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1939        #[doc = r""]
1940        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1941        #[doc = r" parameters can be chained."]
1942        #[doc = r""]
1943        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1944        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1945        #[doc = r" executes the request and returns a `Result` with the parsed"]
1946        #[doc = r" response."]
1947        #[doc = r""]
1948        #[doc = r" If you need lower-level access to the raw response details"]
1949        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1950        #[doc = r" can finalize the request using the"]
1951        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1952        #[doc = r" that resolves to a lower-level [`Response`] value."]
1953        pub struct RequestBuilder {
1954            pub(crate) client: super::super::Client,
1955            pub(crate) organization: String,
1956        }
1957        impl RequestBuilder {
1958            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1959            #[doc = ""]
1960            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1961            #[doc = "However, this function can provide more flexibility when required."]
1962            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1963                Box::pin({
1964                    let this = self.clone();
1965                    async move {
1966                        let url = this.url()?;
1967                        let mut req =
1968                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1969                        if let Some(auth_header) = this
1970                            .client
1971                            .token_credential()
1972                            .http_authorization_header(&this.client.scopes())
1973                            .await?
1974                        {
1975                            req.insert_header(
1976                                azure_core::http::headers::AUTHORIZATION,
1977                                auth_header,
1978                            );
1979                        }
1980                        let req_body = azure_core::Bytes::new();
1981                        req.set_body(req_body);
1982                        Ok(Response(this.client.send(&mut req).await?.into()))
1983                    }
1984                })
1985            }
1986            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1987                let mut url = azure_core::http::Url::parse(&format!(
1988                    "{}/{}/_apis/build/resourceusage",
1989                    self.client.endpoint(),
1990                    &self.organization
1991                ))?;
1992                let has_api_version_already = url
1993                    .query_pairs()
1994                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1995                if !has_api_version_already {
1996                    url.query_pairs_mut().append_pair(
1997                        azure_core::http::headers::query_param::API_VERSION,
1998                        "7.1-preview",
1999                    );
2000                }
2001                Ok(url)
2002            }
2003        }
2004        impl std::future::IntoFuture for RequestBuilder {
2005            type Output = azure_core::Result<models::BuildResourceUsage>;
2006            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildResourceUsage>>;
2007            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2008            #[doc = ""]
2009            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2010            #[doc = ""]
2011            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2012            fn into_future(self) -> Self::IntoFuture {
2013                Box::pin(async move { self.send().await?.into_body().await })
2014            }
2015        }
2016    }
2017}
2018pub mod history {
2019    use super::models;
2020    #[cfg(not(target_arch = "wasm32"))]
2021    use futures::future::BoxFuture;
2022    #[cfg(target_arch = "wasm32")]
2023    use futures::future::LocalBoxFuture as BoxFuture;
2024    pub struct Client(pub(crate) super::Client);
2025    impl Client {
2026        #[doc = "Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline."]
2027        #[doc = ""]
2028        #[doc = "Arguments:"]
2029        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2030        pub fn get(&self, organization: impl Into<String>) -> get::RequestBuilder {
2031            get::RequestBuilder {
2032                client: self.0.clone(),
2033                organization: organization.into(),
2034                days_to_lookback: None,
2035            }
2036        }
2037    }
2038    pub mod get {
2039        use super::models;
2040        #[cfg(not(target_arch = "wasm32"))]
2041        use futures::future::BoxFuture;
2042        #[cfg(target_arch = "wasm32")]
2043        use futures::future::LocalBoxFuture as BoxFuture;
2044        #[derive(Debug)]
2045        pub struct Response(
2046            azure_core::http::Response<models::BuildRetentionHistory, azure_core::http::JsonFormat>,
2047        );
2048        impl Response {
2049            pub async fn into_body(self) -> azure_core::Result<models::BuildRetentionHistory> {
2050                self.0.into_body().await
2051            }
2052            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2053                self.0.into()
2054            }
2055        }
2056        #[derive(Clone)]
2057        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2058        #[doc = r""]
2059        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2060        #[doc = r" parameters can be chained."]
2061        #[doc = r""]
2062        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2063        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2064        #[doc = r" executes the request and returns a `Result` with the parsed"]
2065        #[doc = r" response."]
2066        #[doc = r""]
2067        #[doc = r" If you need lower-level access to the raw response details"]
2068        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2069        #[doc = r" can finalize the request using the"]
2070        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2071        #[doc = r" that resolves to a lower-level [`Response`] value."]
2072        pub struct RequestBuilder {
2073            pub(crate) client: super::super::Client,
2074            pub(crate) organization: String,
2075            pub(crate) days_to_lookback: Option<i32>,
2076        }
2077        impl RequestBuilder {
2078            pub fn days_to_lookback(mut self, days_to_lookback: i32) -> Self {
2079                self.days_to_lookback = Some(days_to_lookback);
2080                self
2081            }
2082            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2083            #[doc = ""]
2084            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2085            #[doc = "However, this function can provide more flexibility when required."]
2086            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2087                Box::pin({
2088                    let this = self.clone();
2089                    async move {
2090                        let url = this.url()?;
2091                        let mut req =
2092                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2093                        if let Some(auth_header) = this
2094                            .client
2095                            .token_credential()
2096                            .http_authorization_header(&this.client.scopes())
2097                            .await?
2098                        {
2099                            req.insert_header(
2100                                azure_core::http::headers::AUTHORIZATION,
2101                                auth_header,
2102                            );
2103                        }
2104                        if let Some(days_to_lookback) = &this.days_to_lookback {
2105                            req.url_mut()
2106                                .query_pairs_mut()
2107                                .append_pair("daysToLookback", &days_to_lookback.to_string());
2108                        }
2109                        let req_body = azure_core::Bytes::new();
2110                        req.set_body(req_body);
2111                        Ok(Response(this.client.send(&mut req).await?.into()))
2112                    }
2113                })
2114            }
2115            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2116                let mut url = azure_core::http::Url::parse(&format!(
2117                    "{}/{}/_apis/build/retention/history",
2118                    self.client.endpoint(),
2119                    &self.organization
2120                ))?;
2121                let has_api_version_already = url
2122                    .query_pairs()
2123                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2124                if !has_api_version_already {
2125                    url.query_pairs_mut().append_pair(
2126                        azure_core::http::headers::query_param::API_VERSION,
2127                        "7.1-preview",
2128                    );
2129                }
2130                Ok(url)
2131            }
2132        }
2133        impl std::future::IntoFuture for RequestBuilder {
2134            type Output = azure_core::Result<models::BuildRetentionHistory>;
2135            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildRetentionHistory>>;
2136            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2137            #[doc = ""]
2138            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2139            #[doc = ""]
2140            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2141            fn into_future(self) -> Self::IntoFuture {
2142                Box::pin(async move { self.send().await?.into_body().await })
2143            }
2144        }
2145    }
2146}
2147pub mod badge {
2148    use super::models;
2149    #[cfg(not(target_arch = "wasm32"))]
2150    use futures::future::BoxFuture;
2151    #[cfg(target_arch = "wasm32")]
2152    use futures::future::LocalBoxFuture as BoxFuture;
2153    pub struct Client(pub(crate) super::Client);
2154    impl Client {
2155        #[doc = "This endpoint is deprecated. Please see the Build Status REST endpoint."]
2156        #[doc = ""]
2157        #[doc = "Arguments:"]
2158        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2159        #[doc = "* `project`: The project ID or name."]
2160        #[doc = "* `definition_id`: The ID of the definition."]
2161        pub fn get(
2162            &self,
2163            organization: impl Into<String>,
2164            project: impl Into<String>,
2165            definition_id: i32,
2166        ) -> get::RequestBuilder {
2167            get::RequestBuilder {
2168                client: self.0.clone(),
2169                organization: organization.into(),
2170                project: project.into(),
2171                definition_id,
2172                branch_name: None,
2173            }
2174        }
2175        #[doc = "Gets a badge that indicates the status of the most recent build for the specified branch."]
2176        #[doc = ""]
2177        #[doc = "Arguments:"]
2178        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2179        #[doc = "* `project`: Project ID or project name"]
2180        #[doc = "* `repo_type`: The repository type."]
2181        pub fn get_build_badge_data(
2182            &self,
2183            organization: impl Into<String>,
2184            project: impl Into<String>,
2185            repo_type: impl Into<String>,
2186        ) -> get_build_badge_data::RequestBuilder {
2187            get_build_badge_data::RequestBuilder {
2188                client: self.0.clone(),
2189                organization: organization.into(),
2190                project: project.into(),
2191                repo_type: repo_type.into(),
2192                repo_id: None,
2193                branch_name: None,
2194            }
2195        }
2196    }
2197    pub mod get {
2198        use super::models;
2199        #[cfg(not(target_arch = "wasm32"))]
2200        use futures::future::BoxFuture;
2201        #[cfg(target_arch = "wasm32")]
2202        use futures::future::LocalBoxFuture as BoxFuture;
2203        #[derive(Debug)]
2204        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
2205        impl Response {
2206            pub async fn into_body(self) -> azure_core::Result<String> {
2207                self.0.into_body().await
2208            }
2209            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2210                self.0.into()
2211            }
2212        }
2213        #[derive(Clone)]
2214        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2215        #[doc = r""]
2216        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2217        #[doc = r" parameters can be chained."]
2218        #[doc = r""]
2219        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2220        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2221        #[doc = r" executes the request and returns a `Result` with the parsed"]
2222        #[doc = r" response."]
2223        #[doc = r""]
2224        #[doc = r" If you need lower-level access to the raw response details"]
2225        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2226        #[doc = r" can finalize the request using the"]
2227        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2228        #[doc = r" that resolves to a lower-level [`Response`] value."]
2229        pub struct RequestBuilder {
2230            pub(crate) client: super::super::Client,
2231            pub(crate) organization: String,
2232            pub(crate) project: String,
2233            pub(crate) definition_id: i32,
2234            pub(crate) branch_name: Option<String>,
2235        }
2236        impl RequestBuilder {
2237            #[doc = "The name of the branch."]
2238            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
2239                self.branch_name = Some(branch_name.into());
2240                self
2241            }
2242            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2243            #[doc = ""]
2244            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2245            #[doc = "However, this function can provide more flexibility when required."]
2246            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2247                Box::pin({
2248                    let this = self.clone();
2249                    async move {
2250                        let url = this.url()?;
2251                        let mut req =
2252                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2253                        if let Some(auth_header) = this
2254                            .client
2255                            .token_credential()
2256                            .http_authorization_header(&this.client.scopes())
2257                            .await?
2258                        {
2259                            req.insert_header(
2260                                azure_core::http::headers::AUTHORIZATION,
2261                                auth_header,
2262                            );
2263                        }
2264                        if let Some(branch_name) = &this.branch_name {
2265                            req.url_mut()
2266                                .query_pairs_mut()
2267                                .append_pair("branchName", branch_name);
2268                        }
2269                        let req_body = azure_core::Bytes::new();
2270                        req.set_body(req_body);
2271                        Ok(Response(this.client.send(&mut req).await?.into()))
2272                    }
2273                })
2274            }
2275            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2276                let mut url = azure_core::http::Url::parse(&format!(
2277                    "{}/{}/_apis/public/build/definitions/{}/{}/badge",
2278                    self.client.endpoint(),
2279                    &self.organization,
2280                    &self.project,
2281                    &self.definition_id
2282                ))?;
2283                let has_api_version_already = url
2284                    .query_pairs()
2285                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2286                if !has_api_version_already {
2287                    url.query_pairs_mut().append_pair(
2288                        azure_core::http::headers::query_param::API_VERSION,
2289                        "7.1-preview",
2290                    );
2291                }
2292                Ok(url)
2293            }
2294        }
2295        impl std::future::IntoFuture for RequestBuilder {
2296            type Output = azure_core::Result<String>;
2297            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
2298            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2299            #[doc = ""]
2300            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2301            #[doc = ""]
2302            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2303            fn into_future(self) -> Self::IntoFuture {
2304                Box::pin(async move { self.send().await?.into_body().await })
2305            }
2306        }
2307    }
2308    pub mod get_build_badge_data {
2309        use super::models;
2310        #[cfg(not(target_arch = "wasm32"))]
2311        use futures::future::BoxFuture;
2312        #[cfg(target_arch = "wasm32")]
2313        use futures::future::LocalBoxFuture as BoxFuture;
2314        #[derive(Debug)]
2315        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
2316        impl Response {
2317            pub async fn into_body(self) -> azure_core::Result<String> {
2318                self.0.into_body().await
2319            }
2320            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2321                self.0.into()
2322            }
2323        }
2324        #[derive(Clone)]
2325        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2326        #[doc = r""]
2327        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2328        #[doc = r" parameters can be chained."]
2329        #[doc = r""]
2330        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2331        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2332        #[doc = r" executes the request and returns a `Result` with the parsed"]
2333        #[doc = r" response."]
2334        #[doc = r""]
2335        #[doc = r" If you need lower-level access to the raw response details"]
2336        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2337        #[doc = r" can finalize the request using the"]
2338        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2339        #[doc = r" that resolves to a lower-level [`Response`] value."]
2340        pub struct RequestBuilder {
2341            pub(crate) client: super::super::Client,
2342            pub(crate) organization: String,
2343            pub(crate) project: String,
2344            pub(crate) repo_type: String,
2345            pub(crate) repo_id: Option<String>,
2346            pub(crate) branch_name: Option<String>,
2347        }
2348        impl RequestBuilder {
2349            #[doc = "The repository ID."]
2350            pub fn repo_id(mut self, repo_id: impl Into<String>) -> Self {
2351                self.repo_id = Some(repo_id.into());
2352                self
2353            }
2354            #[doc = "The branch name."]
2355            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
2356                self.branch_name = Some(branch_name.into());
2357                self
2358            }
2359            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2360            #[doc = ""]
2361            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2362            #[doc = "However, this function can provide more flexibility when required."]
2363            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2364                Box::pin({
2365                    let this = self.clone();
2366                    async move {
2367                        let url = this.url()?;
2368                        let mut req =
2369                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2370                        if let Some(auth_header) = this
2371                            .client
2372                            .token_credential()
2373                            .http_authorization_header(&this.client.scopes())
2374                            .await?
2375                        {
2376                            req.insert_header(
2377                                azure_core::http::headers::AUTHORIZATION,
2378                                auth_header,
2379                            );
2380                        }
2381                        if let Some(repo_id) = &this.repo_id {
2382                            req.url_mut()
2383                                .query_pairs_mut()
2384                                .append_pair("repoId", repo_id);
2385                        }
2386                        if let Some(branch_name) = &this.branch_name {
2387                            req.url_mut()
2388                                .query_pairs_mut()
2389                                .append_pair("branchName", branch_name);
2390                        }
2391                        let req_body = azure_core::Bytes::new();
2392                        req.set_body(req_body);
2393                        Ok(Response(this.client.send(&mut req).await?.into()))
2394                    }
2395                })
2396            }
2397            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2398                let mut url = azure_core::http::Url::parse(&format!(
2399                    "{}/{}/{}/_apis/build/repos/{}/badge",
2400                    self.client.endpoint(),
2401                    &self.organization,
2402                    &self.project,
2403                    &self.repo_type
2404                ))?;
2405                let has_api_version_already = url
2406                    .query_pairs()
2407                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2408                if !has_api_version_already {
2409                    url.query_pairs_mut().append_pair(
2410                        azure_core::http::headers::query_param::API_VERSION,
2411                        "7.1-preview",
2412                    );
2413                }
2414                Ok(url)
2415            }
2416        }
2417        impl std::future::IntoFuture for RequestBuilder {
2418            type Output = azure_core::Result<String>;
2419            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
2420            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2421            #[doc = ""]
2422            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2423            #[doc = ""]
2424            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2425            fn into_future(self) -> Self::IntoFuture {
2426                Box::pin(async move { self.send().await?.into_body().await })
2427            }
2428        }
2429    }
2430}
2431pub mod authorizedresources {
2432    use super::models;
2433    #[cfg(not(target_arch = "wasm32"))]
2434    use futures::future::BoxFuture;
2435    #[cfg(target_arch = "wasm32")]
2436    use futures::future::LocalBoxFuture as BoxFuture;
2437    pub struct Client(pub(crate) super::Client);
2438    impl Client {
2439        #[doc = "Arguments:"]
2440        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2441        #[doc = "* `project`: Project ID or project name"]
2442        pub fn list(
2443            &self,
2444            organization: impl Into<String>,
2445            project: impl Into<String>,
2446        ) -> list::RequestBuilder {
2447            list::RequestBuilder {
2448                client: self.0.clone(),
2449                organization: organization.into(),
2450                project: project.into(),
2451                type_: None,
2452                id: None,
2453            }
2454        }
2455        #[doc = "Arguments:"]
2456        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2457        #[doc = "* `project`: Project ID or project name"]
2458        pub fn authorize_project_resources(
2459            &self,
2460            organization: impl Into<String>,
2461            body: Vec<models::DefinitionResourceReference>,
2462            project: impl Into<String>,
2463        ) -> authorize_project_resources::RequestBuilder {
2464            authorize_project_resources::RequestBuilder {
2465                client: self.0.clone(),
2466                organization: organization.into(),
2467                body,
2468                project: project.into(),
2469            }
2470        }
2471    }
2472    pub mod list {
2473        use super::models;
2474        #[cfg(not(target_arch = "wasm32"))]
2475        use futures::future::BoxFuture;
2476        #[cfg(target_arch = "wasm32")]
2477        use futures::future::LocalBoxFuture as BoxFuture;
2478        #[derive(Debug)]
2479        pub struct Response(
2480            azure_core::http::Response<
2481                models::DefinitionResourceReferenceList,
2482                azure_core::http::JsonFormat,
2483            >,
2484        );
2485        impl Response {
2486            pub async fn into_body(
2487                self,
2488            ) -> azure_core::Result<models::DefinitionResourceReferenceList> {
2489                self.0.into_body().await
2490            }
2491            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2492                self.0.into()
2493            }
2494        }
2495        #[derive(Clone)]
2496        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2497        #[doc = r""]
2498        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2499        #[doc = r" parameters can be chained."]
2500        #[doc = r""]
2501        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2502        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2503        #[doc = r" executes the request and returns a `Result` with the parsed"]
2504        #[doc = r" response."]
2505        #[doc = r""]
2506        #[doc = r" If you need lower-level access to the raw response details"]
2507        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2508        #[doc = r" can finalize the request using the"]
2509        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2510        #[doc = r" that resolves to a lower-level [`Response`] value."]
2511        pub struct RequestBuilder {
2512            pub(crate) client: super::super::Client,
2513            pub(crate) organization: String,
2514            pub(crate) project: String,
2515            pub(crate) type_: Option<String>,
2516            pub(crate) id: Option<String>,
2517        }
2518        impl RequestBuilder {
2519            pub fn type_(mut self, type_: impl Into<String>) -> Self {
2520                self.type_ = Some(type_.into());
2521                self
2522            }
2523            pub fn id(mut self, id: impl Into<String>) -> Self {
2524                self.id = Some(id.into());
2525                self
2526            }
2527            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2528            #[doc = ""]
2529            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2530            #[doc = "However, this function can provide more flexibility when required."]
2531            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2532                Box::pin({
2533                    let this = self.clone();
2534                    async move {
2535                        let url = this.url()?;
2536                        let mut req =
2537                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2538                        if let Some(auth_header) = this
2539                            .client
2540                            .token_credential()
2541                            .http_authorization_header(&this.client.scopes())
2542                            .await?
2543                        {
2544                            req.insert_header(
2545                                azure_core::http::headers::AUTHORIZATION,
2546                                auth_header,
2547                            );
2548                        }
2549                        if let Some(type_) = &this.type_ {
2550                            req.url_mut().query_pairs_mut().append_pair("type", type_);
2551                        }
2552                        if let Some(id) = &this.id {
2553                            req.url_mut().query_pairs_mut().append_pair("id", id);
2554                        }
2555                        let req_body = azure_core::Bytes::new();
2556                        req.set_body(req_body);
2557                        Ok(Response(this.client.send(&mut req).await?.into()))
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/build/authorizedresources",
2564                    self.client.endpoint(),
2565                    &self.organization,
2566                    &self.project
2567                ))?;
2568                let has_api_version_already = url
2569                    .query_pairs()
2570                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2571                if !has_api_version_already {
2572                    url.query_pairs_mut().append_pair(
2573                        azure_core::http::headers::query_param::API_VERSION,
2574                        "7.1-preview",
2575                    );
2576                }
2577                Ok(url)
2578            }
2579        }
2580        impl std::future::IntoFuture for RequestBuilder {
2581            type Output = azure_core::Result<models::DefinitionResourceReferenceList>;
2582            type IntoFuture =
2583                BoxFuture<'static, azure_core::Result<models::DefinitionResourceReferenceList>>;
2584            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2585            #[doc = ""]
2586            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2587            #[doc = ""]
2588            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2589            fn into_future(self) -> Self::IntoFuture {
2590                Box::pin(async move { self.send().await?.into_body().await })
2591            }
2592        }
2593    }
2594    pub mod authorize_project_resources {
2595        use super::models;
2596        #[cfg(not(target_arch = "wasm32"))]
2597        use futures::future::BoxFuture;
2598        #[cfg(target_arch = "wasm32")]
2599        use futures::future::LocalBoxFuture as BoxFuture;
2600        #[derive(Debug)]
2601        pub struct Response(
2602            azure_core::http::Response<
2603                models::DefinitionResourceReferenceList,
2604                azure_core::http::JsonFormat,
2605            >,
2606        );
2607        impl Response {
2608            pub async fn into_body(
2609                self,
2610            ) -> azure_core::Result<models::DefinitionResourceReferenceList> {
2611                self.0.into_body().await
2612            }
2613            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2614                self.0.into()
2615            }
2616        }
2617        #[derive(Clone)]
2618        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2619        #[doc = r""]
2620        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2621        #[doc = r" parameters can be chained."]
2622        #[doc = r""]
2623        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2624        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2625        #[doc = r" executes the request and returns a `Result` with the parsed"]
2626        #[doc = r" response."]
2627        #[doc = r""]
2628        #[doc = r" If you need lower-level access to the raw response details"]
2629        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2630        #[doc = r" can finalize the request using the"]
2631        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2632        #[doc = r" that resolves to a lower-level [`Response`] value."]
2633        pub struct RequestBuilder {
2634            pub(crate) client: super::super::Client,
2635            pub(crate) organization: String,
2636            pub(crate) body: Vec<models::DefinitionResourceReference>,
2637            pub(crate) project: String,
2638        }
2639        impl RequestBuilder {
2640            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2641            #[doc = ""]
2642            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2643            #[doc = "However, this function can provide more flexibility when required."]
2644            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2645                Box::pin({
2646                    let this = self.clone();
2647                    async move {
2648                        let url = this.url()?;
2649                        let mut req =
2650                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
2651                        if let Some(auth_header) = this
2652                            .client
2653                            .token_credential()
2654                            .http_authorization_header(&this.client.scopes())
2655                            .await?
2656                        {
2657                            req.insert_header(
2658                                azure_core::http::headers::AUTHORIZATION,
2659                                auth_header,
2660                            );
2661                        }
2662                        req.insert_header("content-type", "application/json");
2663                        let req_body = azure_core::json::to_json(&this.body)?;
2664                        req.set_body(req_body);
2665                        Ok(Response(this.client.send(&mut req).await?.into()))
2666                    }
2667                })
2668            }
2669            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2670                let mut url = azure_core::http::Url::parse(&format!(
2671                    "{}/{}/{}/_apis/build/authorizedresources",
2672                    self.client.endpoint(),
2673                    &self.organization,
2674                    &self.project
2675                ))?;
2676                let has_api_version_already = url
2677                    .query_pairs()
2678                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2679                if !has_api_version_already {
2680                    url.query_pairs_mut().append_pair(
2681                        azure_core::http::headers::query_param::API_VERSION,
2682                        "7.1-preview",
2683                    );
2684                }
2685                Ok(url)
2686            }
2687        }
2688        impl std::future::IntoFuture for RequestBuilder {
2689            type Output = azure_core::Result<models::DefinitionResourceReferenceList>;
2690            type IntoFuture =
2691                BoxFuture<'static, azure_core::Result<models::DefinitionResourceReferenceList>>;
2692            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2693            #[doc = ""]
2694            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2695            #[doc = ""]
2696            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2697            fn into_future(self) -> Self::IntoFuture {
2698                Box::pin(async move { self.send().await?.into_body().await })
2699            }
2700        }
2701    }
2702}
2703pub mod builds {
2704    use super::models;
2705    #[cfg(not(target_arch = "wasm32"))]
2706    use futures::future::BoxFuture;
2707    #[cfg(target_arch = "wasm32")]
2708    use futures::future::LocalBoxFuture as BoxFuture;
2709    pub struct Client(pub(crate) super::Client);
2710    impl Client {
2711        #[doc = "Gets a list of builds."]
2712        #[doc = ""]
2713        #[doc = "Arguments:"]
2714        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2715        #[doc = "* `project`: Project ID or project name"]
2716        pub fn list(
2717            &self,
2718            organization: impl Into<String>,
2719            project: impl Into<String>,
2720        ) -> list::RequestBuilder {
2721            list::RequestBuilder {
2722                client: self.0.clone(),
2723                organization: organization.into(),
2724                project: project.into(),
2725                definitions: None,
2726                queues: None,
2727                build_number: None,
2728                min_time: None,
2729                max_time: None,
2730                requested_for: None,
2731                reason_filter: None,
2732                status_filter: None,
2733                result_filter: None,
2734                tag_filters: None,
2735                properties: None,
2736                top: None,
2737                continuation_token: None,
2738                max_builds_per_definition: None,
2739                deleted_filter: None,
2740                query_order: None,
2741                branch_name: None,
2742                build_ids: None,
2743                repository_id: None,
2744                repository_type: None,
2745            }
2746        }
2747        #[doc = "Queues a build"]
2748        #[doc = ""]
2749        #[doc = "Arguments:"]
2750        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2751        #[doc = "* `project`: Project ID or project name"]
2752        pub fn queue(
2753            &self,
2754            organization: impl Into<String>,
2755            body: impl Into<models::Build>,
2756            project: impl Into<String>,
2757        ) -> queue::RequestBuilder {
2758            queue::RequestBuilder {
2759                client: self.0.clone(),
2760                organization: organization.into(),
2761                body: body.into(),
2762                project: project.into(),
2763                ignore_warnings: None,
2764                check_in_ticket: None,
2765                source_build_id: None,
2766                definition_id: None,
2767            }
2768        }
2769        #[doc = "Updates multiple builds."]
2770        #[doc = ""]
2771        #[doc = "Arguments:"]
2772        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2773        #[doc = "* `body`: The builds to update."]
2774        #[doc = "* `project`: Project ID or project name"]
2775        pub fn update_builds(
2776            &self,
2777            organization: impl Into<String>,
2778            body: Vec<models::Build>,
2779            project: impl Into<String>,
2780        ) -> update_builds::RequestBuilder {
2781            update_builds::RequestBuilder {
2782                client: self.0.clone(),
2783                organization: organization.into(),
2784                body,
2785                project: project.into(),
2786            }
2787        }
2788        #[doc = "Gets a build"]
2789        #[doc = ""]
2790        #[doc = "Arguments:"]
2791        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2792        #[doc = "* `project`: Project ID or project name"]
2793        pub fn get(
2794            &self,
2795            organization: impl Into<String>,
2796            project: impl Into<String>,
2797            build_id: i32,
2798        ) -> get::RequestBuilder {
2799            get::RequestBuilder {
2800                client: self.0.clone(),
2801                organization: organization.into(),
2802                project: project.into(),
2803                build_id,
2804                property_filters: None,
2805            }
2806        }
2807        #[doc = "Updates a build."]
2808        #[doc = ""]
2809        #[doc = "Arguments:"]
2810        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2811        #[doc = "* `body`: The build."]
2812        #[doc = "* `project`: Project ID or project name"]
2813        #[doc = "* `build_id`: The ID of the build."]
2814        pub fn update_build(
2815            &self,
2816            organization: impl Into<String>,
2817            body: impl Into<models::Build>,
2818            project: impl Into<String>,
2819            build_id: i32,
2820        ) -> update_build::RequestBuilder {
2821            update_build::RequestBuilder {
2822                client: self.0.clone(),
2823                organization: organization.into(),
2824                body: body.into(),
2825                project: project.into(),
2826                build_id,
2827                retry: None,
2828            }
2829        }
2830        #[doc = "Deletes a build."]
2831        #[doc = ""]
2832        #[doc = "Arguments:"]
2833        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2834        #[doc = "* `project`: Project ID or project name"]
2835        #[doc = "* `build_id`: The ID of the build."]
2836        pub fn delete(
2837            &self,
2838            organization: impl Into<String>,
2839            project: impl Into<String>,
2840            build_id: i32,
2841        ) -> delete::RequestBuilder {
2842            delete::RequestBuilder {
2843                client: self.0.clone(),
2844                organization: organization.into(),
2845                project: project.into(),
2846                build_id,
2847            }
2848        }
2849        #[doc = "Gets the changes associated with a build"]
2850        #[doc = ""]
2851        #[doc = "Arguments:"]
2852        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2853        #[doc = "* `project`: Project ID or project name"]
2854        pub fn get_build_changes(
2855            &self,
2856            organization: impl Into<String>,
2857            project: impl Into<String>,
2858            build_id: i32,
2859        ) -> get_build_changes::RequestBuilder {
2860            get_build_changes::RequestBuilder {
2861                client: self.0.clone(),
2862                organization: organization.into(),
2863                project: project.into(),
2864                build_id,
2865                continuation_token: None,
2866                top: None,
2867                include_source_change: None,
2868            }
2869        }
2870        #[doc = "Gets all retention leases that apply to a specific build."]
2871        #[doc = ""]
2872        #[doc = "Arguments:"]
2873        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2874        #[doc = "* `project`: Project ID or project name"]
2875        #[doc = "* `build_id`: The ID of the build."]
2876        pub fn get_retention_leases_for_build(
2877            &self,
2878            organization: impl Into<String>,
2879            project: impl Into<String>,
2880            build_id: i32,
2881        ) -> get_retention_leases_for_build::RequestBuilder {
2882            get_retention_leases_for_build::RequestBuilder {
2883                client: self.0.clone(),
2884                organization: organization.into(),
2885                project: project.into(),
2886                build_id,
2887            }
2888        }
2889        #[doc = "Gets the logs for a build."]
2890        #[doc = ""]
2891        #[doc = "Arguments:"]
2892        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2893        #[doc = "* `project`: Project ID or project name"]
2894        #[doc = "* `build_id`: The ID of the build."]
2895        pub fn get_build_logs(
2896            &self,
2897            organization: impl Into<String>,
2898            project: impl Into<String>,
2899            build_id: i32,
2900        ) -> get_build_logs::RequestBuilder {
2901            get_build_logs::RequestBuilder {
2902                client: self.0.clone(),
2903                organization: organization.into(),
2904                project: project.into(),
2905                build_id,
2906            }
2907        }
2908        #[doc = "Gets an individual log file for a build."]
2909        #[doc = ""]
2910        #[doc = "Arguments:"]
2911        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2912        #[doc = "* `project`: Project ID or project name"]
2913        #[doc = "* `build_id`: The ID of the build."]
2914        #[doc = "* `log_id`: The ID of the log file."]
2915        pub fn get_build_log(
2916            &self,
2917            organization: impl Into<String>,
2918            project: impl Into<String>,
2919            build_id: i32,
2920            log_id: i32,
2921        ) -> get_build_log::RequestBuilder {
2922            get_build_log::RequestBuilder {
2923                client: self.0.clone(),
2924                organization: organization.into(),
2925                project: project.into(),
2926                build_id,
2927                log_id,
2928                start_line: None,
2929                end_line: None,
2930            }
2931        }
2932        #[doc = "Gets the work items associated with a build. Only work items in the same project are returned."]
2933        #[doc = ""]
2934        #[doc = "Arguments:"]
2935        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2936        #[doc = "* `project`: Project ID or project name"]
2937        #[doc = "* `build_id`: The ID of the build."]
2938        pub fn get_build_work_items_refs(
2939            &self,
2940            organization: impl Into<String>,
2941            project: impl Into<String>,
2942            build_id: i32,
2943        ) -> get_build_work_items_refs::RequestBuilder {
2944            get_build_work_items_refs::RequestBuilder {
2945                client: self.0.clone(),
2946                organization: organization.into(),
2947                project: project.into(),
2948                build_id,
2949                top: None,
2950            }
2951        }
2952        #[doc = "Gets the work items associated with a build, filtered to specific commits."]
2953        #[doc = ""]
2954        #[doc = "Arguments:"]
2955        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2956        #[doc = "* `body`: A comma-delimited list of commit IDs."]
2957        #[doc = "* `project`: Project ID or project name"]
2958        #[doc = "* `build_id`: The ID of the build."]
2959        pub fn get_build_work_items_refs_from_commits(
2960            &self,
2961            organization: impl Into<String>,
2962            body: Vec<String>,
2963            project: impl Into<String>,
2964            build_id: i32,
2965        ) -> get_build_work_items_refs_from_commits::RequestBuilder {
2966            get_build_work_items_refs_from_commits::RequestBuilder {
2967                client: self.0.clone(),
2968                organization: organization.into(),
2969                body,
2970                project: project.into(),
2971                build_id,
2972                top: None,
2973            }
2974        }
2975        #[doc = "Gets the changes made to the repository between two given builds."]
2976        #[doc = ""]
2977        #[doc = "Arguments:"]
2978        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2979        #[doc = "* `project`: Project ID or project name"]
2980        pub fn get_changes_between_builds(
2981            &self,
2982            organization: impl Into<String>,
2983            project: impl Into<String>,
2984        ) -> get_changes_between_builds::RequestBuilder {
2985            get_changes_between_builds::RequestBuilder {
2986                client: self.0.clone(),
2987                organization: organization.into(),
2988                project: project.into(),
2989                from_build_id: None,
2990                to_build_id: None,
2991                top: None,
2992            }
2993        }
2994        #[doc = "Gets all the work items between two builds."]
2995        #[doc = ""]
2996        #[doc = "Arguments:"]
2997        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2998        #[doc = "* `project`: Project ID or project name"]
2999        #[doc = "* `from_build_id`: The ID of the first build."]
3000        #[doc = "* `to_build_id`: The ID of the last build."]
3001        pub fn get_work_items_between_builds(
3002            &self,
3003            organization: impl Into<String>,
3004            project: impl Into<String>,
3005            from_build_id: i32,
3006            to_build_id: i32,
3007        ) -> get_work_items_between_builds::RequestBuilder {
3008            get_work_items_between_builds::RequestBuilder {
3009                client: self.0.clone(),
3010                organization: organization.into(),
3011                project: project.into(),
3012                from_build_id,
3013                to_build_id,
3014                top: None,
3015            }
3016        }
3017    }
3018    pub mod list {
3019        use super::models;
3020        #[cfg(not(target_arch = "wasm32"))]
3021        use futures::future::BoxFuture;
3022        #[cfg(target_arch = "wasm32")]
3023        use futures::future::LocalBoxFuture as BoxFuture;
3024        #[derive(Debug)]
3025        pub struct Response(
3026            azure_core::http::Response<models::BuildList, azure_core::http::JsonFormat>,
3027        );
3028        impl Response {
3029            pub async fn into_body(self) -> azure_core::Result<models::BuildList> {
3030                self.0.into_body().await
3031            }
3032            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3033                self.0.into()
3034            }
3035        }
3036        #[derive(Clone)]
3037        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3038        #[doc = r""]
3039        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3040        #[doc = r" parameters can be chained."]
3041        #[doc = r""]
3042        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3043        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3044        #[doc = r" executes the request and returns a `Result` with the parsed"]
3045        #[doc = r" response."]
3046        #[doc = r""]
3047        #[doc = r" If you need lower-level access to the raw response details"]
3048        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3049        #[doc = r" can finalize the request using the"]
3050        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3051        #[doc = r" that resolves to a lower-level [`Response`] value."]
3052        pub struct RequestBuilder {
3053            pub(crate) client: super::super::Client,
3054            pub(crate) organization: String,
3055            pub(crate) project: String,
3056            pub(crate) definitions: Option<String>,
3057            pub(crate) queues: Option<String>,
3058            pub(crate) build_number: Option<String>,
3059            pub(crate) min_time: Option<time::OffsetDateTime>,
3060            pub(crate) max_time: Option<time::OffsetDateTime>,
3061            pub(crate) requested_for: Option<String>,
3062            pub(crate) reason_filter: Option<String>,
3063            pub(crate) status_filter: Option<String>,
3064            pub(crate) result_filter: Option<String>,
3065            pub(crate) tag_filters: Option<String>,
3066            pub(crate) properties: Option<String>,
3067            pub(crate) top: Option<i32>,
3068            pub(crate) continuation_token: Option<String>,
3069            pub(crate) max_builds_per_definition: Option<i32>,
3070            pub(crate) deleted_filter: Option<String>,
3071            pub(crate) query_order: Option<String>,
3072            pub(crate) branch_name: Option<String>,
3073            pub(crate) build_ids: Option<String>,
3074            pub(crate) repository_id: Option<String>,
3075            pub(crate) repository_type: Option<String>,
3076        }
3077        impl RequestBuilder {
3078            #[doc = "A comma-delimited list of definition IDs. If specified, filters to builds for these definitions."]
3079            pub fn definitions(mut self, definitions: impl Into<String>) -> Self {
3080                self.definitions = Some(definitions.into());
3081                self
3082            }
3083            #[doc = "A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues."]
3084            pub fn queues(mut self, queues: impl Into<String>) -> Self {
3085                self.queues = Some(queues.into());
3086                self
3087            }
3088            #[doc = "If specified, filters to builds that match this build number. Append * to do a prefix search."]
3089            pub fn build_number(mut self, build_number: impl Into<String>) -> Self {
3090                self.build_number = Some(build_number.into());
3091                self
3092            }
3093            #[doc = "If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified."]
3094            pub fn min_time(mut self, min_time: impl Into<time::OffsetDateTime>) -> Self {
3095                self.min_time = Some(min_time.into());
3096                self
3097            }
3098            #[doc = "If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified."]
3099            pub fn max_time(mut self, max_time: impl Into<time::OffsetDateTime>) -> Self {
3100                self.max_time = Some(max_time.into());
3101                self
3102            }
3103            #[doc = "If specified, filters to builds requested for the specified user."]
3104            pub fn requested_for(mut self, requested_for: impl Into<String>) -> Self {
3105                self.requested_for = Some(requested_for.into());
3106                self
3107            }
3108            #[doc = "If specified, filters to builds that match this reason."]
3109            pub fn reason_filter(mut self, reason_filter: impl Into<String>) -> Self {
3110                self.reason_filter = Some(reason_filter.into());
3111                self
3112            }
3113            #[doc = "If specified, filters to builds that match this status."]
3114            pub fn status_filter(mut self, status_filter: impl Into<String>) -> Self {
3115                self.status_filter = Some(status_filter.into());
3116                self
3117            }
3118            #[doc = "If specified, filters to builds that match this result."]
3119            pub fn result_filter(mut self, result_filter: impl Into<String>) -> Self {
3120                self.result_filter = Some(result_filter.into());
3121                self
3122            }
3123            #[doc = "A comma-delimited list of tags. If specified, filters to builds that have the specified tags."]
3124            pub fn tag_filters(mut self, tag_filters: impl Into<String>) -> Self {
3125                self.tag_filters = Some(tag_filters.into());
3126                self
3127            }
3128            #[doc = "A comma-delimited list of properties to retrieve."]
3129            pub fn properties(mut self, properties: impl Into<String>) -> Self {
3130                self.properties = Some(properties.into());
3131                self
3132            }
3133            #[doc = "The maximum number of builds to return."]
3134            pub fn top(mut self, top: i32) -> Self {
3135                self.top = Some(top);
3136                self
3137            }
3138            #[doc = "A continuation token, returned by a previous call to this method, that can be used to return the next set of builds."]
3139            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
3140                self.continuation_token = Some(continuation_token.into());
3141                self
3142            }
3143            #[doc = "The maximum number of builds to return per definition."]
3144            pub fn max_builds_per_definition(mut self, max_builds_per_definition: i32) -> Self {
3145                self.max_builds_per_definition = Some(max_builds_per_definition);
3146                self
3147            }
3148            #[doc = "Indicates whether to exclude, include, or only return deleted builds."]
3149            pub fn deleted_filter(mut self, deleted_filter: impl Into<String>) -> Self {
3150                self.deleted_filter = Some(deleted_filter.into());
3151                self
3152            }
3153            #[doc = "The order in which builds should be returned."]
3154            pub fn query_order(mut self, query_order: impl Into<String>) -> Self {
3155                self.query_order = Some(query_order.into());
3156                self
3157            }
3158            #[doc = "If specified, filters to builds that built branches that built this branch."]
3159            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
3160                self.branch_name = Some(branch_name.into());
3161                self
3162            }
3163            #[doc = "A comma-delimited list that specifies the IDs of builds to retrieve."]
3164            pub fn build_ids(mut self, build_ids: impl Into<String>) -> Self {
3165                self.build_ids = Some(build_ids.into());
3166                self
3167            }
3168            #[doc = "If specified, filters to builds that built from this repository."]
3169            pub fn repository_id(mut self, repository_id: impl Into<String>) -> Self {
3170                self.repository_id = Some(repository_id.into());
3171                self
3172            }
3173            #[doc = "If specified, filters to builds that built from repositories of this type."]
3174            pub fn repository_type(mut self, repository_type: impl Into<String>) -> Self {
3175                self.repository_type = Some(repository_type.into());
3176                self
3177            }
3178            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3179            #[doc = ""]
3180            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3181            #[doc = "However, this function can provide more flexibility when required."]
3182            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3183                Box::pin({
3184                    let this = self.clone();
3185                    async move {
3186                        let url = this.url()?;
3187                        let mut req =
3188                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
3189                        if let Some(auth_header) = this
3190                            .client
3191                            .token_credential()
3192                            .http_authorization_header(&this.client.scopes())
3193                            .await?
3194                        {
3195                            req.insert_header(
3196                                azure_core::http::headers::AUTHORIZATION,
3197                                auth_header,
3198                            );
3199                        }
3200                        if let Some(definitions) = &this.definitions {
3201                            req.url_mut()
3202                                .query_pairs_mut()
3203                                .append_pair("definitions", definitions);
3204                        }
3205                        if let Some(queues) = &this.queues {
3206                            req.url_mut()
3207                                .query_pairs_mut()
3208                                .append_pair("queues", queues);
3209                        }
3210                        if let Some(build_number) = &this.build_number {
3211                            req.url_mut()
3212                                .query_pairs_mut()
3213                                .append_pair("buildNumber", build_number);
3214                        }
3215                        if let Some(min_time) = &this.min_time {
3216                            let formatted_date_time = crate::date_time::format_date_time(min_time)?;
3217                            req.url_mut()
3218                                .query_pairs_mut()
3219                                .append_pair("minTime", &formatted_date_time);
3220                        }
3221                        if let Some(max_time) = &this.max_time {
3222                            let formatted_date_time = crate::date_time::format_date_time(max_time)?;
3223                            req.url_mut()
3224                                .query_pairs_mut()
3225                                .append_pair("maxTime", &formatted_date_time);
3226                        }
3227                        if let Some(requested_for) = &this.requested_for {
3228                            req.url_mut()
3229                                .query_pairs_mut()
3230                                .append_pair("requestedFor", requested_for);
3231                        }
3232                        if let Some(reason_filter) = &this.reason_filter {
3233                            req.url_mut()
3234                                .query_pairs_mut()
3235                                .append_pair("reasonFilter", reason_filter);
3236                        }
3237                        if let Some(status_filter) = &this.status_filter {
3238                            req.url_mut()
3239                                .query_pairs_mut()
3240                                .append_pair("statusFilter", status_filter);
3241                        }
3242                        if let Some(result_filter) = &this.result_filter {
3243                            req.url_mut()
3244                                .query_pairs_mut()
3245                                .append_pair("resultFilter", result_filter);
3246                        }
3247                        if let Some(tag_filters) = &this.tag_filters {
3248                            req.url_mut()
3249                                .query_pairs_mut()
3250                                .append_pair("tagFilters", tag_filters);
3251                        }
3252                        if let Some(properties) = &this.properties {
3253                            req.url_mut()
3254                                .query_pairs_mut()
3255                                .append_pair("properties", properties);
3256                        }
3257                        if let Some(top) = &this.top {
3258                            req.url_mut()
3259                                .query_pairs_mut()
3260                                .append_pair("$top", &top.to_string());
3261                        }
3262                        if let Some(continuation_token) = &this.continuation_token {
3263                            req.url_mut()
3264                                .query_pairs_mut()
3265                                .append_pair("continuationToken", continuation_token);
3266                        }
3267                        if let Some(max_builds_per_definition) = &this.max_builds_per_definition {
3268                            req.url_mut().query_pairs_mut().append_pair(
3269                                "maxBuildsPerDefinition",
3270                                &max_builds_per_definition.to_string(),
3271                            );
3272                        }
3273                        if let Some(deleted_filter) = &this.deleted_filter {
3274                            req.url_mut()
3275                                .query_pairs_mut()
3276                                .append_pair("deletedFilter", deleted_filter);
3277                        }
3278                        if let Some(query_order) = &this.query_order {
3279                            req.url_mut()
3280                                .query_pairs_mut()
3281                                .append_pair("queryOrder", query_order);
3282                        }
3283                        if let Some(branch_name) = &this.branch_name {
3284                            req.url_mut()
3285                                .query_pairs_mut()
3286                                .append_pair("branchName", branch_name);
3287                        }
3288                        if let Some(build_ids) = &this.build_ids {
3289                            req.url_mut()
3290                                .query_pairs_mut()
3291                                .append_pair("buildIds", build_ids);
3292                        }
3293                        if let Some(repository_id) = &this.repository_id {
3294                            req.url_mut()
3295                                .query_pairs_mut()
3296                                .append_pair("repositoryId", repository_id);
3297                        }
3298                        if let Some(repository_type) = &this.repository_type {
3299                            req.url_mut()
3300                                .query_pairs_mut()
3301                                .append_pair("repositoryType", repository_type);
3302                        }
3303                        let req_body = azure_core::Bytes::new();
3304                        req.set_body(req_body);
3305                        Ok(Response(this.client.send(&mut req).await?.into()))
3306                    }
3307                })
3308            }
3309            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3310                let mut url = azure_core::http::Url::parse(&format!(
3311                    "{}/{}/{}/_apis/build/builds",
3312                    self.client.endpoint(),
3313                    &self.organization,
3314                    &self.project
3315                ))?;
3316                let has_api_version_already = url
3317                    .query_pairs()
3318                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3319                if !has_api_version_already {
3320                    url.query_pairs_mut().append_pair(
3321                        azure_core::http::headers::query_param::API_VERSION,
3322                        "7.1-preview",
3323                    );
3324                }
3325                Ok(url)
3326            }
3327        }
3328        impl std::future::IntoFuture for RequestBuilder {
3329            type Output = azure_core::Result<models::BuildList>;
3330            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildList>>;
3331            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3332            #[doc = ""]
3333            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3334            #[doc = ""]
3335            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3336            fn into_future(self) -> Self::IntoFuture {
3337                Box::pin(async move { self.send().await?.into_body().await })
3338            }
3339        }
3340    }
3341    pub mod queue {
3342        use super::models;
3343        #[cfg(not(target_arch = "wasm32"))]
3344        use futures::future::BoxFuture;
3345        #[cfg(target_arch = "wasm32")]
3346        use futures::future::LocalBoxFuture as BoxFuture;
3347        #[derive(Debug)]
3348        pub struct Response(
3349            azure_core::http::Response<models::Build, azure_core::http::JsonFormat>,
3350        );
3351        impl Response {
3352            pub async fn into_body(self) -> azure_core::Result<models::Build> {
3353                self.0.into_body().await
3354            }
3355            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3356                self.0.into()
3357            }
3358        }
3359        #[derive(Clone)]
3360        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3361        #[doc = r""]
3362        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3363        #[doc = r" parameters can be chained."]
3364        #[doc = r""]
3365        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3366        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3367        #[doc = r" executes the request and returns a `Result` with the parsed"]
3368        #[doc = r" response."]
3369        #[doc = r""]
3370        #[doc = r" If you need lower-level access to the raw response details"]
3371        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3372        #[doc = r" can finalize the request using the"]
3373        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3374        #[doc = r" that resolves to a lower-level [`Response`] value."]
3375        pub struct RequestBuilder {
3376            pub(crate) client: super::super::Client,
3377            pub(crate) organization: String,
3378            pub(crate) body: models::Build,
3379            pub(crate) project: String,
3380            pub(crate) ignore_warnings: Option<bool>,
3381            pub(crate) check_in_ticket: Option<String>,
3382            pub(crate) source_build_id: Option<i32>,
3383            pub(crate) definition_id: Option<i32>,
3384        }
3385        impl RequestBuilder {
3386            pub fn ignore_warnings(mut self, ignore_warnings: bool) -> Self {
3387                self.ignore_warnings = Some(ignore_warnings);
3388                self
3389            }
3390            pub fn check_in_ticket(mut self, check_in_ticket: impl Into<String>) -> Self {
3391                self.check_in_ticket = Some(check_in_ticket.into());
3392                self
3393            }
3394            pub fn source_build_id(mut self, source_build_id: i32) -> Self {
3395                self.source_build_id = Some(source_build_id);
3396                self
3397            }
3398            #[doc = "Optional definition id to queue a build without a body. Ignored if there's a valid body"]
3399            pub fn definition_id(mut self, definition_id: i32) -> Self {
3400                self.definition_id = Some(definition_id);
3401                self
3402            }
3403            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3404            #[doc = ""]
3405            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3406            #[doc = "However, this function can provide more flexibility when required."]
3407            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3408                Box::pin({
3409                    let this = self.clone();
3410                    async move {
3411                        let url = this.url()?;
3412                        let mut req =
3413                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
3414                        if let Some(auth_header) = this
3415                            .client
3416                            .token_credential()
3417                            .http_authorization_header(&this.client.scopes())
3418                            .await?
3419                        {
3420                            req.insert_header(
3421                                azure_core::http::headers::AUTHORIZATION,
3422                                auth_header,
3423                            );
3424                        }
3425                        req.insert_header("content-type", "application/json");
3426                        let req_body = azure_core::json::to_json(&this.body)?;
3427                        if let Some(ignore_warnings) = &this.ignore_warnings {
3428                            req.url_mut()
3429                                .query_pairs_mut()
3430                                .append_pair("ignoreWarnings", &ignore_warnings.to_string());
3431                        }
3432                        if let Some(check_in_ticket) = &this.check_in_ticket {
3433                            req.url_mut()
3434                                .query_pairs_mut()
3435                                .append_pair("checkInTicket", check_in_ticket);
3436                        }
3437                        if let Some(source_build_id) = &this.source_build_id {
3438                            req.url_mut()
3439                                .query_pairs_mut()
3440                                .append_pair("sourceBuildId", &source_build_id.to_string());
3441                        }
3442                        if let Some(definition_id) = &this.definition_id {
3443                            req.url_mut()
3444                                .query_pairs_mut()
3445                                .append_pair("definitionId", &definition_id.to_string());
3446                        }
3447                        req.set_body(req_body);
3448                        Ok(Response(this.client.send(&mut req).await?.into()))
3449                    }
3450                })
3451            }
3452            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3453                let mut url = azure_core::http::Url::parse(&format!(
3454                    "{}/{}/{}/_apis/build/builds",
3455                    self.client.endpoint(),
3456                    &self.organization,
3457                    &self.project
3458                ))?;
3459                let has_api_version_already = url
3460                    .query_pairs()
3461                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3462                if !has_api_version_already {
3463                    url.query_pairs_mut().append_pair(
3464                        azure_core::http::headers::query_param::API_VERSION,
3465                        "7.1-preview",
3466                    );
3467                }
3468                Ok(url)
3469            }
3470        }
3471        impl std::future::IntoFuture for RequestBuilder {
3472            type Output = azure_core::Result<models::Build>;
3473            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Build>>;
3474            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3475            #[doc = ""]
3476            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3477            #[doc = ""]
3478            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3479            fn into_future(self) -> Self::IntoFuture {
3480                Box::pin(async move { self.send().await?.into_body().await })
3481            }
3482        }
3483    }
3484    pub mod update_builds {
3485        use super::models;
3486        #[cfg(not(target_arch = "wasm32"))]
3487        use futures::future::BoxFuture;
3488        #[cfg(target_arch = "wasm32")]
3489        use futures::future::LocalBoxFuture as BoxFuture;
3490        #[derive(Debug)]
3491        pub struct Response(
3492            azure_core::http::Response<models::BuildList, azure_core::http::JsonFormat>,
3493        );
3494        impl Response {
3495            pub async fn into_body(self) -> azure_core::Result<models::BuildList> {
3496                self.0.into_body().await
3497            }
3498            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3499                self.0.into()
3500            }
3501        }
3502        #[derive(Clone)]
3503        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3504        #[doc = r""]
3505        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3506        #[doc = r" parameters can be chained."]
3507        #[doc = r""]
3508        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3509        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3510        #[doc = r" executes the request and returns a `Result` with the parsed"]
3511        #[doc = r" response."]
3512        #[doc = r""]
3513        #[doc = r" If you need lower-level access to the raw response details"]
3514        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3515        #[doc = r" can finalize the request using the"]
3516        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3517        #[doc = r" that resolves to a lower-level [`Response`] value."]
3518        pub struct RequestBuilder {
3519            pub(crate) client: super::super::Client,
3520            pub(crate) organization: String,
3521            pub(crate) body: Vec<models::Build>,
3522            pub(crate) project: String,
3523        }
3524        impl RequestBuilder {
3525            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3526            #[doc = ""]
3527            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3528            #[doc = "However, this function can provide more flexibility when required."]
3529            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3530                Box::pin({
3531                    let this = self.clone();
3532                    async move {
3533                        let url = this.url()?;
3534                        let mut req =
3535                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
3536                        if let Some(auth_header) = this
3537                            .client
3538                            .token_credential()
3539                            .http_authorization_header(&this.client.scopes())
3540                            .await?
3541                        {
3542                            req.insert_header(
3543                                azure_core::http::headers::AUTHORIZATION,
3544                                auth_header,
3545                            );
3546                        }
3547                        req.insert_header("content-type", "application/json");
3548                        let req_body = azure_core::json::to_json(&this.body)?;
3549                        req.set_body(req_body);
3550                        Ok(Response(this.client.send(&mut req).await?.into()))
3551                    }
3552                })
3553            }
3554            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3555                let mut url = azure_core::http::Url::parse(&format!(
3556                    "{}/{}/{}/_apis/build/builds",
3557                    self.client.endpoint(),
3558                    &self.organization,
3559                    &self.project
3560                ))?;
3561                let has_api_version_already = url
3562                    .query_pairs()
3563                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3564                if !has_api_version_already {
3565                    url.query_pairs_mut().append_pair(
3566                        azure_core::http::headers::query_param::API_VERSION,
3567                        "7.1-preview",
3568                    );
3569                }
3570                Ok(url)
3571            }
3572        }
3573        impl std::future::IntoFuture for RequestBuilder {
3574            type Output = azure_core::Result<models::BuildList>;
3575            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildList>>;
3576            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3577            #[doc = ""]
3578            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3579            #[doc = ""]
3580            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3581            fn into_future(self) -> Self::IntoFuture {
3582                Box::pin(async move { self.send().await?.into_body().await })
3583            }
3584        }
3585    }
3586    pub mod get {
3587        use super::models;
3588        #[cfg(not(target_arch = "wasm32"))]
3589        use futures::future::BoxFuture;
3590        #[cfg(target_arch = "wasm32")]
3591        use futures::future::LocalBoxFuture as BoxFuture;
3592        #[derive(Debug)]
3593        pub struct Response(
3594            azure_core::http::Response<models::Build, azure_core::http::JsonFormat>,
3595        );
3596        impl Response {
3597            pub async fn into_body(self) -> azure_core::Result<models::Build> {
3598                self.0.into_body().await
3599            }
3600            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3601                self.0.into()
3602            }
3603        }
3604        #[derive(Clone)]
3605        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3606        #[doc = r""]
3607        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3608        #[doc = r" parameters can be chained."]
3609        #[doc = r""]
3610        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3611        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3612        #[doc = r" executes the request and returns a `Result` with the parsed"]
3613        #[doc = r" response."]
3614        #[doc = r""]
3615        #[doc = r" If you need lower-level access to the raw response details"]
3616        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3617        #[doc = r" can finalize the request using the"]
3618        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3619        #[doc = r" that resolves to a lower-level [`Response`] value."]
3620        pub struct RequestBuilder {
3621            pub(crate) client: super::super::Client,
3622            pub(crate) organization: String,
3623            pub(crate) project: String,
3624            pub(crate) build_id: i32,
3625            pub(crate) property_filters: Option<String>,
3626        }
3627        impl RequestBuilder {
3628            pub fn property_filters(mut self, property_filters: impl Into<String>) -> Self {
3629                self.property_filters = Some(property_filters.into());
3630                self
3631            }
3632            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3633            #[doc = ""]
3634            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3635            #[doc = "However, this function can provide more flexibility when required."]
3636            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3637                Box::pin({
3638                    let this = self.clone();
3639                    async move {
3640                        let url = this.url()?;
3641                        let mut req =
3642                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
3643                        if let Some(auth_header) = this
3644                            .client
3645                            .token_credential()
3646                            .http_authorization_header(&this.client.scopes())
3647                            .await?
3648                        {
3649                            req.insert_header(
3650                                azure_core::http::headers::AUTHORIZATION,
3651                                auth_header,
3652                            );
3653                        }
3654                        if let Some(property_filters) = &this.property_filters {
3655                            req.url_mut()
3656                                .query_pairs_mut()
3657                                .append_pair("propertyFilters", property_filters);
3658                        }
3659                        let req_body = azure_core::Bytes::new();
3660                        req.set_body(req_body);
3661                        Ok(Response(this.client.send(&mut req).await?.into()))
3662                    }
3663                })
3664            }
3665            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3666                let mut url = azure_core::http::Url::parse(&format!(
3667                    "{}/{}/{}/_apis/build/builds/{}",
3668                    self.client.endpoint(),
3669                    &self.organization,
3670                    &self.project,
3671                    &self.build_id
3672                ))?;
3673                let has_api_version_already = url
3674                    .query_pairs()
3675                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3676                if !has_api_version_already {
3677                    url.query_pairs_mut().append_pair(
3678                        azure_core::http::headers::query_param::API_VERSION,
3679                        "7.1-preview",
3680                    );
3681                }
3682                Ok(url)
3683            }
3684        }
3685        impl std::future::IntoFuture for RequestBuilder {
3686            type Output = azure_core::Result<models::Build>;
3687            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Build>>;
3688            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3689            #[doc = ""]
3690            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3691            #[doc = ""]
3692            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3693            fn into_future(self) -> Self::IntoFuture {
3694                Box::pin(async move { self.send().await?.into_body().await })
3695            }
3696        }
3697    }
3698    pub mod update_build {
3699        use super::models;
3700        #[cfg(not(target_arch = "wasm32"))]
3701        use futures::future::BoxFuture;
3702        #[cfg(target_arch = "wasm32")]
3703        use futures::future::LocalBoxFuture as BoxFuture;
3704        #[derive(Debug)]
3705        pub struct Response(
3706            azure_core::http::Response<models::Build, azure_core::http::JsonFormat>,
3707        );
3708        impl Response {
3709            pub async fn into_body(self) -> azure_core::Result<models::Build> {
3710                self.0.into_body().await
3711            }
3712            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3713                self.0.into()
3714            }
3715        }
3716        #[derive(Clone)]
3717        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3718        #[doc = r""]
3719        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3720        #[doc = r" parameters can be chained."]
3721        #[doc = r""]
3722        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3723        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3724        #[doc = r" executes the request and returns a `Result` with the parsed"]
3725        #[doc = r" response."]
3726        #[doc = r""]
3727        #[doc = r" If you need lower-level access to the raw response details"]
3728        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3729        #[doc = r" can finalize the request using the"]
3730        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3731        #[doc = r" that resolves to a lower-level [`Response`] value."]
3732        pub struct RequestBuilder {
3733            pub(crate) client: super::super::Client,
3734            pub(crate) organization: String,
3735            pub(crate) body: models::Build,
3736            pub(crate) project: String,
3737            pub(crate) build_id: i32,
3738            pub(crate) retry: Option<bool>,
3739        }
3740        impl RequestBuilder {
3741            pub fn retry(mut self, retry: bool) -> Self {
3742                self.retry = Some(retry);
3743                self
3744            }
3745            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3746            #[doc = ""]
3747            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3748            #[doc = "However, this function can provide more flexibility when required."]
3749            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3750                Box::pin({
3751                    let this = self.clone();
3752                    async move {
3753                        let url = this.url()?;
3754                        let mut req =
3755                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
3756                        if let Some(auth_header) = this
3757                            .client
3758                            .token_credential()
3759                            .http_authorization_header(&this.client.scopes())
3760                            .await?
3761                        {
3762                            req.insert_header(
3763                                azure_core::http::headers::AUTHORIZATION,
3764                                auth_header,
3765                            );
3766                        }
3767                        req.insert_header("content-type", "application/json");
3768                        let req_body = azure_core::json::to_json(&this.body)?;
3769                        if let Some(retry) = &this.retry {
3770                            req.url_mut()
3771                                .query_pairs_mut()
3772                                .append_pair("retry", &retry.to_string());
3773                        }
3774                        req.set_body(req_body);
3775                        Ok(Response(this.client.send(&mut req).await?.into()))
3776                    }
3777                })
3778            }
3779            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3780                let mut url = azure_core::http::Url::parse(&format!(
3781                    "{}/{}/{}/_apis/build/builds/{}",
3782                    self.client.endpoint(),
3783                    &self.organization,
3784                    &self.project,
3785                    &self.build_id
3786                ))?;
3787                let has_api_version_already = url
3788                    .query_pairs()
3789                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3790                if !has_api_version_already {
3791                    url.query_pairs_mut().append_pair(
3792                        azure_core::http::headers::query_param::API_VERSION,
3793                        "7.1-preview",
3794                    );
3795                }
3796                Ok(url)
3797            }
3798        }
3799        impl std::future::IntoFuture for RequestBuilder {
3800            type Output = azure_core::Result<models::Build>;
3801            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Build>>;
3802            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3803            #[doc = ""]
3804            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3805            #[doc = ""]
3806            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3807            fn into_future(self) -> Self::IntoFuture {
3808                Box::pin(async move { self.send().await?.into_body().await })
3809            }
3810        }
3811    }
3812    pub mod delete {
3813        use super::models;
3814        #[cfg(not(target_arch = "wasm32"))]
3815        use futures::future::BoxFuture;
3816        #[cfg(target_arch = "wasm32")]
3817        use futures::future::LocalBoxFuture as BoxFuture;
3818        #[derive(Debug)]
3819        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
3820        impl Response {
3821            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3822                self.0.into()
3823            }
3824        }
3825        #[derive(Clone)]
3826        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3827        #[doc = r""]
3828        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3829        #[doc = r" parameters can be chained."]
3830        #[doc = r""]
3831        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3832        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3833        #[doc = r" executes the request and returns a `Result` with the parsed"]
3834        #[doc = r" response."]
3835        #[doc = r""]
3836        #[doc = r" If you need lower-level access to the raw response details"]
3837        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3838        #[doc = r" can finalize the request using the"]
3839        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3840        #[doc = r" that resolves to a lower-level [`Response`] value."]
3841        pub struct RequestBuilder {
3842            pub(crate) client: super::super::Client,
3843            pub(crate) organization: String,
3844            pub(crate) project: String,
3845            pub(crate) build_id: i32,
3846        }
3847        impl RequestBuilder {
3848            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3849            #[doc = ""]
3850            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3851            #[doc = "However, this function can provide more flexibility when required."]
3852            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3853                Box::pin({
3854                    let this = self.clone();
3855                    async move {
3856                        let url = this.url()?;
3857                        let mut req =
3858                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
3859                        if let Some(auth_header) = this
3860                            .client
3861                            .token_credential()
3862                            .http_authorization_header(&this.client.scopes())
3863                            .await?
3864                        {
3865                            req.insert_header(
3866                                azure_core::http::headers::AUTHORIZATION,
3867                                auth_header,
3868                            );
3869                        }
3870                        let req_body = azure_core::Bytes::new();
3871                        req.set_body(req_body);
3872                        Ok(Response(this.client.send(&mut req).await?.into()))
3873                    }
3874                })
3875            }
3876            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3877                let mut url = azure_core::http::Url::parse(&format!(
3878                    "{}/{}/{}/_apis/build/builds/{}",
3879                    self.client.endpoint(),
3880                    &self.organization,
3881                    &self.project,
3882                    &self.build_id
3883                ))?;
3884                let has_api_version_already = url
3885                    .query_pairs()
3886                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3887                if !has_api_version_already {
3888                    url.query_pairs_mut().append_pair(
3889                        azure_core::http::headers::query_param::API_VERSION,
3890                        "7.1-preview",
3891                    );
3892                }
3893                Ok(url)
3894            }
3895        }
3896        impl std::future::IntoFuture for RequestBuilder {
3897            type Output = azure_core::Result<()>;
3898            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
3899            #[doc = "Returns a future that sends the request and waits for the response."]
3900            #[doc = ""]
3901            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3902            #[doc = ""]
3903            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3904            fn into_future(self) -> Self::IntoFuture {
3905                Box::pin(async move {
3906                    let _rsp = self.send().await?;
3907                    Ok(())
3908                })
3909            }
3910        }
3911    }
3912    pub mod get_build_changes {
3913        use super::models;
3914        #[cfg(not(target_arch = "wasm32"))]
3915        use futures::future::BoxFuture;
3916        #[cfg(target_arch = "wasm32")]
3917        use futures::future::LocalBoxFuture as BoxFuture;
3918        #[derive(Debug)]
3919        pub struct Response(
3920            azure_core::http::Response<models::ChangeList, azure_core::http::JsonFormat>,
3921        );
3922        impl Response {
3923            pub async fn into_body(self) -> azure_core::Result<models::ChangeList> {
3924                self.0.into_body().await
3925            }
3926            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3927                self.0.into()
3928            }
3929        }
3930        #[derive(Clone)]
3931        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3932        #[doc = r""]
3933        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3934        #[doc = r" parameters can be chained."]
3935        #[doc = r""]
3936        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3937        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3938        #[doc = r" executes the request and returns a `Result` with the parsed"]
3939        #[doc = r" response."]
3940        #[doc = r""]
3941        #[doc = r" If you need lower-level access to the raw response details"]
3942        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3943        #[doc = r" can finalize the request using the"]
3944        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3945        #[doc = r" that resolves to a lower-level [`Response`] value."]
3946        pub struct RequestBuilder {
3947            pub(crate) client: super::super::Client,
3948            pub(crate) organization: String,
3949            pub(crate) project: String,
3950            pub(crate) build_id: i32,
3951            pub(crate) continuation_token: Option<String>,
3952            pub(crate) top: Option<i32>,
3953            pub(crate) include_source_change: Option<bool>,
3954        }
3955        impl RequestBuilder {
3956            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
3957                self.continuation_token = Some(continuation_token.into());
3958                self
3959            }
3960            #[doc = "The maximum number of changes to return"]
3961            pub fn top(mut self, top: i32) -> Self {
3962                self.top = Some(top);
3963                self
3964            }
3965            pub fn include_source_change(mut self, include_source_change: bool) -> Self {
3966                self.include_source_change = Some(include_source_change);
3967                self
3968            }
3969            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3970            #[doc = ""]
3971            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3972            #[doc = "However, this function can provide more flexibility when required."]
3973            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3974                Box::pin({
3975                    let this = self.clone();
3976                    async move {
3977                        let url = this.url()?;
3978                        let mut req =
3979                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
3980                        if let Some(auth_header) = this
3981                            .client
3982                            .token_credential()
3983                            .http_authorization_header(&this.client.scopes())
3984                            .await?
3985                        {
3986                            req.insert_header(
3987                                azure_core::http::headers::AUTHORIZATION,
3988                                auth_header,
3989                            );
3990                        }
3991                        if let Some(continuation_token) = &this.continuation_token {
3992                            req.url_mut()
3993                                .query_pairs_mut()
3994                                .append_pair("continuationToken", continuation_token);
3995                        }
3996                        if let Some(top) = &this.top {
3997                            req.url_mut()
3998                                .query_pairs_mut()
3999                                .append_pair("$top", &top.to_string());
4000                        }
4001                        if let Some(include_source_change) = &this.include_source_change {
4002                            req.url_mut().query_pairs_mut().append_pair(
4003                                "includeSourceChange",
4004                                &include_source_change.to_string(),
4005                            );
4006                        }
4007                        let req_body = azure_core::Bytes::new();
4008                        req.set_body(req_body);
4009                        Ok(Response(this.client.send(&mut req).await?.into()))
4010                    }
4011                })
4012            }
4013            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4014                let mut url = azure_core::http::Url::parse(&format!(
4015                    "{}/{}/{}/_apis/build/builds/{}/changes",
4016                    self.client.endpoint(),
4017                    &self.organization,
4018                    &self.project,
4019                    &self.build_id
4020                ))?;
4021                let has_api_version_already = url
4022                    .query_pairs()
4023                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4024                if !has_api_version_already {
4025                    url.query_pairs_mut().append_pair(
4026                        azure_core::http::headers::query_param::API_VERSION,
4027                        "7.1-preview",
4028                    );
4029                }
4030                Ok(url)
4031            }
4032        }
4033        impl std::future::IntoFuture for RequestBuilder {
4034            type Output = azure_core::Result<models::ChangeList>;
4035            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ChangeList>>;
4036            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4037            #[doc = ""]
4038            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4039            #[doc = ""]
4040            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4041            fn into_future(self) -> Self::IntoFuture {
4042                Box::pin(async move { self.send().await?.into_body().await })
4043            }
4044        }
4045    }
4046    pub mod get_retention_leases_for_build {
4047        use super::models;
4048        #[cfg(not(target_arch = "wasm32"))]
4049        use futures::future::BoxFuture;
4050        #[cfg(target_arch = "wasm32")]
4051        use futures::future::LocalBoxFuture as BoxFuture;
4052        #[derive(Debug)]
4053        pub struct Response(
4054            azure_core::http::Response<models::RetentionLeaseList, azure_core::http::JsonFormat>,
4055        );
4056        impl Response {
4057            pub async fn into_body(self) -> azure_core::Result<models::RetentionLeaseList> {
4058                self.0.into_body().await
4059            }
4060            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4061                self.0.into()
4062            }
4063        }
4064        #[derive(Clone)]
4065        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4066        #[doc = r""]
4067        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4068        #[doc = r" parameters can be chained."]
4069        #[doc = r""]
4070        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4071        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4072        #[doc = r" executes the request and returns a `Result` with the parsed"]
4073        #[doc = r" response."]
4074        #[doc = r""]
4075        #[doc = r" If you need lower-level access to the raw response details"]
4076        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4077        #[doc = r" can finalize the request using the"]
4078        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4079        #[doc = r" that resolves to a lower-level [`Response`] value."]
4080        pub struct RequestBuilder {
4081            pub(crate) client: super::super::Client,
4082            pub(crate) organization: String,
4083            pub(crate) project: String,
4084            pub(crate) build_id: i32,
4085        }
4086        impl RequestBuilder {
4087            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4088            #[doc = ""]
4089            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4090            #[doc = "However, this function can provide more flexibility when required."]
4091            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4092                Box::pin({
4093                    let this = self.clone();
4094                    async move {
4095                        let url = this.url()?;
4096                        let mut req =
4097                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4098                        if let Some(auth_header) = this
4099                            .client
4100                            .token_credential()
4101                            .http_authorization_header(&this.client.scopes())
4102                            .await?
4103                        {
4104                            req.insert_header(
4105                                azure_core::http::headers::AUTHORIZATION,
4106                                auth_header,
4107                            );
4108                        }
4109                        let req_body = azure_core::Bytes::new();
4110                        req.set_body(req_body);
4111                        Ok(Response(this.client.send(&mut req).await?.into()))
4112                    }
4113                })
4114            }
4115            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4116                let mut url = azure_core::http::Url::parse(&format!(
4117                    "{}/{}/{}/_apis/build/builds/{}/leases",
4118                    self.client.endpoint(),
4119                    &self.organization,
4120                    &self.project,
4121                    &self.build_id
4122                ))?;
4123                let has_api_version_already = url
4124                    .query_pairs()
4125                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4126                if !has_api_version_already {
4127                    url.query_pairs_mut().append_pair(
4128                        azure_core::http::headers::query_param::API_VERSION,
4129                        "7.1-preview",
4130                    );
4131                }
4132                Ok(url)
4133            }
4134        }
4135        impl std::future::IntoFuture for RequestBuilder {
4136            type Output = azure_core::Result<models::RetentionLeaseList>;
4137            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
4138            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4139            #[doc = ""]
4140            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4141            #[doc = ""]
4142            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4143            fn into_future(self) -> Self::IntoFuture {
4144                Box::pin(async move { self.send().await?.into_body().await })
4145            }
4146        }
4147    }
4148    pub mod get_build_logs {
4149        use super::models;
4150        #[cfg(not(target_arch = "wasm32"))]
4151        use futures::future::BoxFuture;
4152        #[cfg(target_arch = "wasm32")]
4153        use futures::future::LocalBoxFuture as BoxFuture;
4154        #[derive(Debug)]
4155        pub struct Response(
4156            azure_core::http::Response<models::BuildLogList, azure_core::http::JsonFormat>,
4157        );
4158        impl Response {
4159            pub async fn into_body(self) -> azure_core::Result<models::BuildLogList> {
4160                self.0.into_body().await
4161            }
4162            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4163                self.0.into()
4164            }
4165        }
4166        #[derive(Clone)]
4167        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4168        #[doc = r""]
4169        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4170        #[doc = r" parameters can be chained."]
4171        #[doc = r""]
4172        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4173        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4174        #[doc = r" executes the request and returns a `Result` with the parsed"]
4175        #[doc = r" response."]
4176        #[doc = r""]
4177        #[doc = r" If you need lower-level access to the raw response details"]
4178        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4179        #[doc = r" can finalize the request using the"]
4180        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4181        #[doc = r" that resolves to a lower-level [`Response`] value."]
4182        pub struct RequestBuilder {
4183            pub(crate) client: super::super::Client,
4184            pub(crate) organization: String,
4185            pub(crate) project: String,
4186            pub(crate) build_id: i32,
4187        }
4188        impl RequestBuilder {
4189            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4190            #[doc = ""]
4191            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4192            #[doc = "However, this function can provide more flexibility when required."]
4193            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4194                Box::pin({
4195                    let this = self.clone();
4196                    async move {
4197                        let url = this.url()?;
4198                        let mut req =
4199                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4200                        if let Some(auth_header) = this
4201                            .client
4202                            .token_credential()
4203                            .http_authorization_header(&this.client.scopes())
4204                            .await?
4205                        {
4206                            req.insert_header(
4207                                azure_core::http::headers::AUTHORIZATION,
4208                                auth_header,
4209                            );
4210                        }
4211                        let req_body = azure_core::Bytes::new();
4212                        req.set_body(req_body);
4213                        Ok(Response(this.client.send(&mut req).await?.into()))
4214                    }
4215                })
4216            }
4217            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4218                let mut url = azure_core::http::Url::parse(&format!(
4219                    "{}/{}/{}/_apis/build/builds/{}/logs",
4220                    self.client.endpoint(),
4221                    &self.organization,
4222                    &self.project,
4223                    &self.build_id
4224                ))?;
4225                let has_api_version_already = url
4226                    .query_pairs()
4227                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4228                if !has_api_version_already {
4229                    url.query_pairs_mut().append_pair(
4230                        azure_core::http::headers::query_param::API_VERSION,
4231                        "7.1-preview",
4232                    );
4233                }
4234                Ok(url)
4235            }
4236        }
4237        impl std::future::IntoFuture for RequestBuilder {
4238            type Output = azure_core::Result<models::BuildLogList>;
4239            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildLogList>>;
4240            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4241            #[doc = ""]
4242            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4243            #[doc = ""]
4244            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4245            fn into_future(self) -> Self::IntoFuture {
4246                Box::pin(async move { self.send().await?.into_body().await })
4247            }
4248        }
4249    }
4250    pub mod get_build_log {
4251        use super::models;
4252        #[cfg(not(target_arch = "wasm32"))]
4253        use futures::future::BoxFuture;
4254        #[cfg(target_arch = "wasm32")]
4255        use futures::future::LocalBoxFuture as BoxFuture;
4256        #[derive(Debug)]
4257        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
4258        impl Response {
4259            pub async fn into_body(self) -> azure_core::Result<String> {
4260                self.0.into_body().await
4261            }
4262            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4263                self.0.into()
4264            }
4265        }
4266        #[derive(Clone)]
4267        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4268        #[doc = r""]
4269        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4270        #[doc = r" parameters can be chained."]
4271        #[doc = r""]
4272        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4273        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4274        #[doc = r" executes the request and returns a `Result` with the parsed"]
4275        #[doc = r" response."]
4276        #[doc = r""]
4277        #[doc = r" If you need lower-level access to the raw response details"]
4278        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4279        #[doc = r" can finalize the request using the"]
4280        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4281        #[doc = r" that resolves to a lower-level [`Response`] value."]
4282        pub struct RequestBuilder {
4283            pub(crate) client: super::super::Client,
4284            pub(crate) organization: String,
4285            pub(crate) project: String,
4286            pub(crate) build_id: i32,
4287            pub(crate) log_id: i32,
4288            pub(crate) start_line: Option<i64>,
4289            pub(crate) end_line: Option<i64>,
4290        }
4291        impl RequestBuilder {
4292            #[doc = "The start line."]
4293            pub fn start_line(mut self, start_line: i64) -> Self {
4294                self.start_line = Some(start_line);
4295                self
4296            }
4297            #[doc = "The end line."]
4298            pub fn end_line(mut self, end_line: i64) -> Self {
4299                self.end_line = Some(end_line);
4300                self
4301            }
4302            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4303            #[doc = ""]
4304            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4305            #[doc = "However, this function can provide more flexibility when required."]
4306            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4307                Box::pin({
4308                    let this = self.clone();
4309                    async move {
4310                        let url = this.url()?;
4311                        let mut req =
4312                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4313                        if let Some(auth_header) = this
4314                            .client
4315                            .token_credential()
4316                            .http_authorization_header(&this.client.scopes())
4317                            .await?
4318                        {
4319                            req.insert_header(
4320                                azure_core::http::headers::AUTHORIZATION,
4321                                auth_header,
4322                            );
4323                        }
4324                        if let Some(start_line) = &this.start_line {
4325                            req.url_mut()
4326                                .query_pairs_mut()
4327                                .append_pair("startLine", &start_line.to_string());
4328                        }
4329                        if let Some(end_line) = &this.end_line {
4330                            req.url_mut()
4331                                .query_pairs_mut()
4332                                .append_pair("endLine", &end_line.to_string());
4333                        }
4334                        let req_body = azure_core::Bytes::new();
4335                        req.set_body(req_body);
4336                        Ok(Response(this.client.send(&mut req).await?.into()))
4337                    }
4338                })
4339            }
4340            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4341                let mut url = azure_core::http::Url::parse(&format!(
4342                    "{}/{}/{}/_apis/build/builds/{}/logs/{}",
4343                    self.client.endpoint(),
4344                    &self.organization,
4345                    &self.project,
4346                    &self.build_id,
4347                    &self.log_id
4348                ))?;
4349                let has_api_version_already = url
4350                    .query_pairs()
4351                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4352                if !has_api_version_already {
4353                    url.query_pairs_mut().append_pair(
4354                        azure_core::http::headers::query_param::API_VERSION,
4355                        "7.1-preview",
4356                    );
4357                }
4358                Ok(url)
4359            }
4360        }
4361        impl std::future::IntoFuture for RequestBuilder {
4362            type Output = azure_core::Result<String>;
4363            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
4364            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4365            #[doc = ""]
4366            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4367            #[doc = ""]
4368            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4369            fn into_future(self) -> Self::IntoFuture {
4370                Box::pin(async move { self.send().await?.into_body().await })
4371            }
4372        }
4373    }
4374    pub mod get_build_work_items_refs {
4375        use super::models;
4376        #[cfg(not(target_arch = "wasm32"))]
4377        use futures::future::BoxFuture;
4378        #[cfg(target_arch = "wasm32")]
4379        use futures::future::LocalBoxFuture as BoxFuture;
4380        #[derive(Debug)]
4381        pub struct Response(
4382            azure_core::http::Response<models::ResourceRefList, azure_core::http::JsonFormat>,
4383        );
4384        impl Response {
4385            pub async fn into_body(self) -> azure_core::Result<models::ResourceRefList> {
4386                self.0.into_body().await
4387            }
4388            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4389                self.0.into()
4390            }
4391        }
4392        #[derive(Clone)]
4393        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4394        #[doc = r""]
4395        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4396        #[doc = r" parameters can be chained."]
4397        #[doc = r""]
4398        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4399        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4400        #[doc = r" executes the request and returns a `Result` with the parsed"]
4401        #[doc = r" response."]
4402        #[doc = r""]
4403        #[doc = r" If you need lower-level access to the raw response details"]
4404        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4405        #[doc = r" can finalize the request using the"]
4406        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4407        #[doc = r" that resolves to a lower-level [`Response`] value."]
4408        pub struct RequestBuilder {
4409            pub(crate) client: super::super::Client,
4410            pub(crate) organization: String,
4411            pub(crate) project: String,
4412            pub(crate) build_id: i32,
4413            pub(crate) top: Option<i32>,
4414        }
4415        impl RequestBuilder {
4416            #[doc = "The maximum number of work items to return."]
4417            pub fn top(mut self, top: i32) -> Self {
4418                self.top = Some(top);
4419                self
4420            }
4421            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4422            #[doc = ""]
4423            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4424            #[doc = "However, this function can provide more flexibility when required."]
4425            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4426                Box::pin({
4427                    let this = self.clone();
4428                    async move {
4429                        let url = this.url()?;
4430                        let mut req =
4431                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4432                        if let Some(auth_header) = this
4433                            .client
4434                            .token_credential()
4435                            .http_authorization_header(&this.client.scopes())
4436                            .await?
4437                        {
4438                            req.insert_header(
4439                                azure_core::http::headers::AUTHORIZATION,
4440                                auth_header,
4441                            );
4442                        }
4443                        if let Some(top) = &this.top {
4444                            req.url_mut()
4445                                .query_pairs_mut()
4446                                .append_pair("$top", &top.to_string());
4447                        }
4448                        let req_body = azure_core::Bytes::new();
4449                        req.set_body(req_body);
4450                        Ok(Response(this.client.send(&mut req).await?.into()))
4451                    }
4452                })
4453            }
4454            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4455                let mut url = azure_core::http::Url::parse(&format!(
4456                    "{}/{}/{}/_apis/build/builds/{}/workitems",
4457                    self.client.endpoint(),
4458                    &self.organization,
4459                    &self.project,
4460                    &self.build_id
4461                ))?;
4462                let has_api_version_already = url
4463                    .query_pairs()
4464                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4465                if !has_api_version_already {
4466                    url.query_pairs_mut().append_pair(
4467                        azure_core::http::headers::query_param::API_VERSION,
4468                        "7.1-preview",
4469                    );
4470                }
4471                Ok(url)
4472            }
4473        }
4474        impl std::future::IntoFuture for RequestBuilder {
4475            type Output = azure_core::Result<models::ResourceRefList>;
4476            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ResourceRefList>>;
4477            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4478            #[doc = ""]
4479            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4480            #[doc = ""]
4481            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4482            fn into_future(self) -> Self::IntoFuture {
4483                Box::pin(async move { self.send().await?.into_body().await })
4484            }
4485        }
4486    }
4487    pub mod get_build_work_items_refs_from_commits {
4488        use super::models;
4489        #[cfg(not(target_arch = "wasm32"))]
4490        use futures::future::BoxFuture;
4491        #[cfg(target_arch = "wasm32")]
4492        use futures::future::LocalBoxFuture as BoxFuture;
4493        #[derive(Debug)]
4494        pub struct Response(
4495            azure_core::http::Response<models::ResourceRefList, azure_core::http::JsonFormat>,
4496        );
4497        impl Response {
4498            pub async fn into_body(self) -> azure_core::Result<models::ResourceRefList> {
4499                self.0.into_body().await
4500            }
4501            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4502                self.0.into()
4503            }
4504        }
4505        #[derive(Clone)]
4506        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4507        #[doc = r""]
4508        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4509        #[doc = r" parameters can be chained."]
4510        #[doc = r""]
4511        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4512        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4513        #[doc = r" executes the request and returns a `Result` with the parsed"]
4514        #[doc = r" response."]
4515        #[doc = r""]
4516        #[doc = r" If you need lower-level access to the raw response details"]
4517        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4518        #[doc = r" can finalize the request using the"]
4519        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4520        #[doc = r" that resolves to a lower-level [`Response`] value."]
4521        pub struct RequestBuilder {
4522            pub(crate) client: super::super::Client,
4523            pub(crate) organization: String,
4524            pub(crate) body: Vec<String>,
4525            pub(crate) project: String,
4526            pub(crate) build_id: i32,
4527            pub(crate) top: Option<i32>,
4528        }
4529        impl RequestBuilder {
4530            #[doc = "The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified."]
4531            pub fn top(mut self, top: i32) -> Self {
4532                self.top = Some(top);
4533                self
4534            }
4535            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4536            #[doc = ""]
4537            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4538            #[doc = "However, this function can provide more flexibility when required."]
4539            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4540                Box::pin({
4541                    let this = self.clone();
4542                    async move {
4543                        let url = this.url()?;
4544                        let mut req =
4545                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
4546                        if let Some(auth_header) = this
4547                            .client
4548                            .token_credential()
4549                            .http_authorization_header(&this.client.scopes())
4550                            .await?
4551                        {
4552                            req.insert_header(
4553                                azure_core::http::headers::AUTHORIZATION,
4554                                auth_header,
4555                            );
4556                        }
4557                        req.insert_header("content-type", "application/json");
4558                        let req_body = azure_core::json::to_json(&this.body)?;
4559                        if let Some(top) = &this.top {
4560                            req.url_mut()
4561                                .query_pairs_mut()
4562                                .append_pair("$top", &top.to_string());
4563                        }
4564                        req.set_body(req_body);
4565                        Ok(Response(this.client.send(&mut req).await?.into()))
4566                    }
4567                })
4568            }
4569            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4570                let mut url = azure_core::http::Url::parse(&format!(
4571                    "{}/{}/{}/_apis/build/builds/{}/workitems",
4572                    self.client.endpoint(),
4573                    &self.organization,
4574                    &self.project,
4575                    &self.build_id
4576                ))?;
4577                let has_api_version_already = url
4578                    .query_pairs()
4579                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4580                if !has_api_version_already {
4581                    url.query_pairs_mut().append_pair(
4582                        azure_core::http::headers::query_param::API_VERSION,
4583                        "7.1-preview",
4584                    );
4585                }
4586                Ok(url)
4587            }
4588        }
4589        impl std::future::IntoFuture for RequestBuilder {
4590            type Output = azure_core::Result<models::ResourceRefList>;
4591            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ResourceRefList>>;
4592            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4593            #[doc = ""]
4594            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4595            #[doc = ""]
4596            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4597            fn into_future(self) -> Self::IntoFuture {
4598                Box::pin(async move { self.send().await?.into_body().await })
4599            }
4600        }
4601    }
4602    pub mod get_changes_between_builds {
4603        use super::models;
4604        #[cfg(not(target_arch = "wasm32"))]
4605        use futures::future::BoxFuture;
4606        #[cfg(target_arch = "wasm32")]
4607        use futures::future::LocalBoxFuture as BoxFuture;
4608        #[derive(Debug)]
4609        pub struct Response(
4610            azure_core::http::Response<models::ChangeList, azure_core::http::JsonFormat>,
4611        );
4612        impl Response {
4613            pub async fn into_body(self) -> azure_core::Result<models::ChangeList> {
4614                self.0.into_body().await
4615            }
4616            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4617                self.0.into()
4618            }
4619        }
4620        #[derive(Clone)]
4621        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4622        #[doc = r""]
4623        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4624        #[doc = r" parameters can be chained."]
4625        #[doc = r""]
4626        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4627        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4628        #[doc = r" executes the request and returns a `Result` with the parsed"]
4629        #[doc = r" response."]
4630        #[doc = r""]
4631        #[doc = r" If you need lower-level access to the raw response details"]
4632        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4633        #[doc = r" can finalize the request using the"]
4634        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4635        #[doc = r" that resolves to a lower-level [`Response`] value."]
4636        pub struct RequestBuilder {
4637            pub(crate) client: super::super::Client,
4638            pub(crate) organization: String,
4639            pub(crate) project: String,
4640            pub(crate) from_build_id: Option<i32>,
4641            pub(crate) to_build_id: Option<i32>,
4642            pub(crate) top: Option<i32>,
4643        }
4644        impl RequestBuilder {
4645            #[doc = "The ID of the first build."]
4646            pub fn from_build_id(mut self, from_build_id: i32) -> Self {
4647                self.from_build_id = Some(from_build_id);
4648                self
4649            }
4650            #[doc = "The ID of the last build."]
4651            pub fn to_build_id(mut self, to_build_id: i32) -> Self {
4652                self.to_build_id = Some(to_build_id);
4653                self
4654            }
4655            #[doc = "The maximum number of changes to return."]
4656            pub fn top(mut self, top: i32) -> Self {
4657                self.top = Some(top);
4658                self
4659            }
4660            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4661            #[doc = ""]
4662            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4663            #[doc = "However, this function can provide more flexibility when required."]
4664            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4665                Box::pin({
4666                    let this = self.clone();
4667                    async move {
4668                        let url = this.url()?;
4669                        let mut req =
4670                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4671                        if let Some(auth_header) = this
4672                            .client
4673                            .token_credential()
4674                            .http_authorization_header(&this.client.scopes())
4675                            .await?
4676                        {
4677                            req.insert_header(
4678                                azure_core::http::headers::AUTHORIZATION,
4679                                auth_header,
4680                            );
4681                        }
4682                        if let Some(from_build_id) = &this.from_build_id {
4683                            req.url_mut()
4684                                .query_pairs_mut()
4685                                .append_pair("fromBuildId", &from_build_id.to_string());
4686                        }
4687                        if let Some(to_build_id) = &this.to_build_id {
4688                            req.url_mut()
4689                                .query_pairs_mut()
4690                                .append_pair("toBuildId", &to_build_id.to_string());
4691                        }
4692                        if let Some(top) = &this.top {
4693                            req.url_mut()
4694                                .query_pairs_mut()
4695                                .append_pair("$top", &top.to_string());
4696                        }
4697                        let req_body = azure_core::Bytes::new();
4698                        req.set_body(req_body);
4699                        Ok(Response(this.client.send(&mut req).await?.into()))
4700                    }
4701                })
4702            }
4703            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4704                let mut url = azure_core::http::Url::parse(&format!(
4705                    "{}/{}/{}/_apis/build/changes",
4706                    self.client.endpoint(),
4707                    &self.organization,
4708                    &self.project
4709                ))?;
4710                let has_api_version_already = url
4711                    .query_pairs()
4712                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4713                if !has_api_version_already {
4714                    url.query_pairs_mut().append_pair(
4715                        azure_core::http::headers::query_param::API_VERSION,
4716                        "7.1-preview",
4717                    );
4718                }
4719                Ok(url)
4720            }
4721        }
4722        impl std::future::IntoFuture for RequestBuilder {
4723            type Output = azure_core::Result<models::ChangeList>;
4724            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ChangeList>>;
4725            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4726            #[doc = ""]
4727            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4728            #[doc = ""]
4729            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4730            fn into_future(self) -> Self::IntoFuture {
4731                Box::pin(async move { self.send().await?.into_body().await })
4732            }
4733        }
4734    }
4735    pub mod get_work_items_between_builds {
4736        use super::models;
4737        #[cfg(not(target_arch = "wasm32"))]
4738        use futures::future::BoxFuture;
4739        #[cfg(target_arch = "wasm32")]
4740        use futures::future::LocalBoxFuture as BoxFuture;
4741        #[derive(Debug)]
4742        pub struct Response(
4743            azure_core::http::Response<models::ResourceRefList, azure_core::http::JsonFormat>,
4744        );
4745        impl Response {
4746            pub async fn into_body(self) -> azure_core::Result<models::ResourceRefList> {
4747                self.0.into_body().await
4748            }
4749            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4750                self.0.into()
4751            }
4752        }
4753        #[derive(Clone)]
4754        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4755        #[doc = r""]
4756        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4757        #[doc = r" parameters can be chained."]
4758        #[doc = r""]
4759        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4760        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4761        #[doc = r" executes the request and returns a `Result` with the parsed"]
4762        #[doc = r" response."]
4763        #[doc = r""]
4764        #[doc = r" If you need lower-level access to the raw response details"]
4765        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4766        #[doc = r" can finalize the request using the"]
4767        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4768        #[doc = r" that resolves to a lower-level [`Response`] value."]
4769        pub struct RequestBuilder {
4770            pub(crate) client: super::super::Client,
4771            pub(crate) organization: String,
4772            pub(crate) project: String,
4773            pub(crate) from_build_id: i32,
4774            pub(crate) to_build_id: i32,
4775            pub(crate) top: Option<i32>,
4776        }
4777        impl RequestBuilder {
4778            #[doc = "The maximum number of work items to return."]
4779            pub fn top(mut self, top: i32) -> Self {
4780                self.top = Some(top);
4781                self
4782            }
4783            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4784            #[doc = ""]
4785            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4786            #[doc = "However, this function can provide more flexibility when required."]
4787            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4788                Box::pin({
4789                    let this = self.clone();
4790                    async move {
4791                        let url = this.url()?;
4792                        let mut req =
4793                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4794                        if let Some(auth_header) = this
4795                            .client
4796                            .token_credential()
4797                            .http_authorization_header(&this.client.scopes())
4798                            .await?
4799                        {
4800                            req.insert_header(
4801                                azure_core::http::headers::AUTHORIZATION,
4802                                auth_header,
4803                            );
4804                        }
4805                        let from_build_id = &this.from_build_id;
4806                        req.url_mut()
4807                            .query_pairs_mut()
4808                            .append_pair("fromBuildId", &from_build_id.to_string());
4809                        let to_build_id = &this.to_build_id;
4810                        req.url_mut()
4811                            .query_pairs_mut()
4812                            .append_pair("toBuildId", &to_build_id.to_string());
4813                        if let Some(top) = &this.top {
4814                            req.url_mut()
4815                                .query_pairs_mut()
4816                                .append_pair("$top", &top.to_string());
4817                        }
4818                        let req_body = azure_core::Bytes::new();
4819                        req.set_body(req_body);
4820                        Ok(Response(this.client.send(&mut req).await?.into()))
4821                    }
4822                })
4823            }
4824            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4825                let mut url = azure_core::http::Url::parse(&format!(
4826                    "{}/{}/{}/_apis/build/workitems",
4827                    self.client.endpoint(),
4828                    &self.organization,
4829                    &self.project
4830                ))?;
4831                let has_api_version_already = url
4832                    .query_pairs()
4833                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4834                if !has_api_version_already {
4835                    url.query_pairs_mut().append_pair(
4836                        azure_core::http::headers::query_param::API_VERSION,
4837                        "7.1-preview",
4838                    );
4839                }
4840                Ok(url)
4841            }
4842        }
4843        impl std::future::IntoFuture for RequestBuilder {
4844            type Output = azure_core::Result<models::ResourceRefList>;
4845            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ResourceRefList>>;
4846            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4847            #[doc = ""]
4848            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4849            #[doc = ""]
4850            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4851            fn into_future(self) -> Self::IntoFuture {
4852                Box::pin(async move { self.send().await?.into_body().await })
4853            }
4854        }
4855    }
4856}
4857pub mod attachments {
4858    use super::models;
4859    #[cfg(not(target_arch = "wasm32"))]
4860    use futures::future::BoxFuture;
4861    #[cfg(target_arch = "wasm32")]
4862    use futures::future::LocalBoxFuture as BoxFuture;
4863    pub struct Client(pub(crate) super::Client);
4864    impl Client {
4865        #[doc = "Gets a specific attachment."]
4866        #[doc = ""]
4867        #[doc = "Arguments:"]
4868        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4869        #[doc = "* `project`: Project ID or project name"]
4870        #[doc = "* `build_id`: The ID of the build."]
4871        #[doc = "* `timeline_id`: The ID of the timeline."]
4872        #[doc = "* `record_id`: The ID of the timeline record."]
4873        #[doc = "* `type_`: The type of the attachment."]
4874        #[doc = "* `name`: The name of the attachment."]
4875        pub fn get(
4876            &self,
4877            organization: impl Into<String>,
4878            project: impl Into<String>,
4879            build_id: i32,
4880            timeline_id: impl Into<String>,
4881            record_id: impl Into<String>,
4882            type_: impl Into<String>,
4883            name: impl Into<String>,
4884        ) -> get::RequestBuilder {
4885            get::RequestBuilder {
4886                client: self.0.clone(),
4887                organization: organization.into(),
4888                project: project.into(),
4889                build_id,
4890                timeline_id: timeline_id.into(),
4891                record_id: record_id.into(),
4892                type_: type_.into(),
4893                name: name.into(),
4894            }
4895        }
4896        #[doc = "Gets the list of attachments of a specific type that are associated with a build."]
4897        #[doc = ""]
4898        #[doc = "Arguments:"]
4899        #[doc = "* `organization`: The name of the Azure DevOps organization."]
4900        #[doc = "* `project`: Project ID or project name"]
4901        #[doc = "* `build_id`: The ID of the build."]
4902        #[doc = "* `type_`: The type of attachment."]
4903        pub fn list(
4904            &self,
4905            organization: impl Into<String>,
4906            project: impl Into<String>,
4907            build_id: i32,
4908            type_: impl Into<String>,
4909        ) -> list::RequestBuilder {
4910            list::RequestBuilder {
4911                client: self.0.clone(),
4912                organization: organization.into(),
4913                project: project.into(),
4914                build_id,
4915                type_: type_.into(),
4916            }
4917        }
4918    }
4919    pub mod get {
4920        use super::models;
4921        #[cfg(not(target_arch = "wasm32"))]
4922        use futures::future::BoxFuture;
4923        #[cfg(target_arch = "wasm32")]
4924        use futures::future::LocalBoxFuture as BoxFuture;
4925        #[derive(Debug)]
4926        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
4927        impl Response {
4928            pub async fn into_body(self) -> azure_core::Result<String> {
4929                self.0.into_body().await
4930            }
4931            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4932                self.0.into()
4933            }
4934        }
4935        #[derive(Clone)]
4936        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4937        #[doc = r""]
4938        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4939        #[doc = r" parameters can be chained."]
4940        #[doc = r""]
4941        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4942        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4943        #[doc = r" executes the request and returns a `Result` with the parsed"]
4944        #[doc = r" response."]
4945        #[doc = r""]
4946        #[doc = r" If you need lower-level access to the raw response details"]
4947        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4948        #[doc = r" can finalize the request using the"]
4949        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4950        #[doc = r" that resolves to a lower-level [`Response`] value."]
4951        pub struct RequestBuilder {
4952            pub(crate) client: super::super::Client,
4953            pub(crate) organization: String,
4954            pub(crate) project: String,
4955            pub(crate) build_id: i32,
4956            pub(crate) timeline_id: String,
4957            pub(crate) record_id: String,
4958            pub(crate) type_: String,
4959            pub(crate) name: String,
4960        }
4961        impl RequestBuilder {
4962            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4963            #[doc = ""]
4964            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4965            #[doc = "However, this function can provide more flexibility when required."]
4966            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4967                Box::pin({
4968                    let this = self.clone();
4969                    async move {
4970                        let url = this.url()?;
4971                        let mut req =
4972                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
4973                        if let Some(auth_header) = this
4974                            .client
4975                            .token_credential()
4976                            .http_authorization_header(&this.client.scopes())
4977                            .await?
4978                        {
4979                            req.insert_header(
4980                                azure_core::http::headers::AUTHORIZATION,
4981                                auth_header,
4982                            );
4983                        }
4984                        let req_body = azure_core::Bytes::new();
4985                        req.set_body(req_body);
4986                        Ok(Response(this.client.send(&mut req).await?.into()))
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/build/builds/{}/{}/{}/attachments/{}/{}",
4993                    self.client.endpoint(),
4994                    &self.organization,
4995                    &self.project,
4996                    &self.build_id,
4997                    &self.timeline_id,
4998                    &self.record_id,
4999                    &self.type_,
5000                    &self.name
5001                ))?;
5002                let has_api_version_already = url
5003                    .query_pairs()
5004                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5005                if !has_api_version_already {
5006                    url.query_pairs_mut().append_pair(
5007                        azure_core::http::headers::query_param::API_VERSION,
5008                        "7.1-preview",
5009                    );
5010                }
5011                Ok(url)
5012            }
5013        }
5014        impl std::future::IntoFuture for RequestBuilder {
5015            type Output = azure_core::Result<String>;
5016            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
5017            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5018            #[doc = ""]
5019            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5020            #[doc = ""]
5021            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5022            fn into_future(self) -> Self::IntoFuture {
5023                Box::pin(async move { self.send().await?.into_body().await })
5024            }
5025        }
5026    }
5027    pub mod list {
5028        use super::models;
5029        #[cfg(not(target_arch = "wasm32"))]
5030        use futures::future::BoxFuture;
5031        #[cfg(target_arch = "wasm32")]
5032        use futures::future::LocalBoxFuture as BoxFuture;
5033        #[derive(Debug)]
5034        pub struct Response(
5035            azure_core::http::Response<models::AttachmentList, azure_core::http::JsonFormat>,
5036        );
5037        impl Response {
5038            pub async fn into_body(self) -> azure_core::Result<models::AttachmentList> {
5039                self.0.into_body().await
5040            }
5041            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5042                self.0.into()
5043            }
5044        }
5045        #[derive(Clone)]
5046        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5047        #[doc = r""]
5048        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5049        #[doc = r" parameters can be chained."]
5050        #[doc = r""]
5051        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5052        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5053        #[doc = r" executes the request and returns a `Result` with the parsed"]
5054        #[doc = r" response."]
5055        #[doc = r""]
5056        #[doc = r" If you need lower-level access to the raw response details"]
5057        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5058        #[doc = r" can finalize the request using the"]
5059        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5060        #[doc = r" that resolves to a lower-level [`Response`] value."]
5061        pub struct RequestBuilder {
5062            pub(crate) client: super::super::Client,
5063            pub(crate) organization: String,
5064            pub(crate) project: String,
5065            pub(crate) build_id: i32,
5066            pub(crate) type_: String,
5067        }
5068        impl RequestBuilder {
5069            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5070            #[doc = ""]
5071            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5072            #[doc = "However, this function can provide more flexibility when required."]
5073            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5074                Box::pin({
5075                    let this = self.clone();
5076                    async move {
5077                        let url = this.url()?;
5078                        let mut req =
5079                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
5080                        if let Some(auth_header) = this
5081                            .client
5082                            .token_credential()
5083                            .http_authorization_header(&this.client.scopes())
5084                            .await?
5085                        {
5086                            req.insert_header(
5087                                azure_core::http::headers::AUTHORIZATION,
5088                                auth_header,
5089                            );
5090                        }
5091                        let req_body = azure_core::Bytes::new();
5092                        req.set_body(req_body);
5093                        Ok(Response(this.client.send(&mut req).await?.into()))
5094                    }
5095                })
5096            }
5097            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5098                let mut url = azure_core::http::Url::parse(&format!(
5099                    "{}/{}/{}/_apis/build/builds/{}/attachments/{}",
5100                    self.client.endpoint(),
5101                    &self.organization,
5102                    &self.project,
5103                    &self.build_id,
5104                    &self.type_
5105                ))?;
5106                let has_api_version_already = url
5107                    .query_pairs()
5108                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5109                if !has_api_version_already {
5110                    url.query_pairs_mut().append_pair(
5111                        azure_core::http::headers::query_param::API_VERSION,
5112                        "7.1-preview",
5113                    );
5114                }
5115                Ok(url)
5116            }
5117        }
5118        impl std::future::IntoFuture for RequestBuilder {
5119            type Output = azure_core::Result<models::AttachmentList>;
5120            type IntoFuture = BoxFuture<'static, azure_core::Result<models::AttachmentList>>;
5121            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5122            #[doc = ""]
5123            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5124            #[doc = ""]
5125            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5126            fn into_future(self) -> Self::IntoFuture {
5127                Box::pin(async move { self.send().await?.into_body().await })
5128            }
5129        }
5130    }
5131}
5132pub mod properties {
5133    use super::models;
5134    #[cfg(not(target_arch = "wasm32"))]
5135    use futures::future::BoxFuture;
5136    #[cfg(target_arch = "wasm32")]
5137    use futures::future::LocalBoxFuture as BoxFuture;
5138    pub struct Client(pub(crate) super::Client);
5139    impl Client {
5140        #[doc = "Gets properties for a build."]
5141        #[doc = ""]
5142        #[doc = "Arguments:"]
5143        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5144        #[doc = "* `project`: Project ID or project name"]
5145        #[doc = "* `build_id`: The ID of the build."]
5146        pub fn get_build_properties(
5147            &self,
5148            organization: impl Into<String>,
5149            project: impl Into<String>,
5150            build_id: i32,
5151        ) -> get_build_properties::RequestBuilder {
5152            get_build_properties::RequestBuilder {
5153                client: self.0.clone(),
5154                organization: organization.into(),
5155                project: project.into(),
5156                build_id,
5157                filter: None,
5158            }
5159        }
5160        #[doc = "Updates properties for a build."]
5161        #[doc = ""]
5162        #[doc = "Arguments:"]
5163        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5164        #[doc = "* `body`: A json-patch document describing the properties to update."]
5165        #[doc = "* `project`: Project ID or project name"]
5166        #[doc = "* `build_id`: The ID of the build."]
5167        pub fn update_build_properties(
5168            &self,
5169            organization: impl Into<String>,
5170            body: impl Into<models::JsonPatchDocument>,
5171            project: impl Into<String>,
5172            build_id: i32,
5173        ) -> update_build_properties::RequestBuilder {
5174            update_build_properties::RequestBuilder {
5175                client: self.0.clone(),
5176                organization: organization.into(),
5177                body: body.into(),
5178                project: project.into(),
5179                build_id,
5180            }
5181        }
5182        #[doc = "Gets properties for a definition."]
5183        #[doc = ""]
5184        #[doc = "Arguments:"]
5185        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5186        #[doc = "* `project`: Project ID or project name"]
5187        #[doc = "* `definition_id`: The ID of the definition."]
5188        pub fn get_definition_properties(
5189            &self,
5190            organization: impl Into<String>,
5191            project: impl Into<String>,
5192            definition_id: i32,
5193        ) -> get_definition_properties::RequestBuilder {
5194            get_definition_properties::RequestBuilder {
5195                client: self.0.clone(),
5196                organization: organization.into(),
5197                project: project.into(),
5198                definition_id,
5199                filter: None,
5200            }
5201        }
5202        #[doc = "Updates properties for a definition."]
5203        #[doc = ""]
5204        #[doc = "Arguments:"]
5205        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5206        #[doc = "* `body`: A json-patch document describing the properties to update."]
5207        #[doc = "* `project`: Project ID or project name"]
5208        #[doc = "* `definition_id`: The ID of the definition."]
5209        pub fn update_definition_properties(
5210            &self,
5211            organization: impl Into<String>,
5212            body: impl Into<models::JsonPatchDocument>,
5213            project: impl Into<String>,
5214            definition_id: i32,
5215        ) -> update_definition_properties::RequestBuilder {
5216            update_definition_properties::RequestBuilder {
5217                client: self.0.clone(),
5218                organization: organization.into(),
5219                body: body.into(),
5220                project: project.into(),
5221                definition_id,
5222            }
5223        }
5224    }
5225    pub mod get_build_properties {
5226        use super::models;
5227        #[cfg(not(target_arch = "wasm32"))]
5228        use futures::future::BoxFuture;
5229        #[cfg(target_arch = "wasm32")]
5230        use futures::future::LocalBoxFuture as BoxFuture;
5231        #[derive(Debug)]
5232        pub struct Response(
5233            azure_core::http::Response<models::PropertiesCollection, azure_core::http::JsonFormat>,
5234        );
5235        impl Response {
5236            pub async fn into_body(self) -> azure_core::Result<models::PropertiesCollection> {
5237                self.0.into_body().await
5238            }
5239            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5240                self.0.into()
5241            }
5242        }
5243        #[derive(Clone)]
5244        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5245        #[doc = r""]
5246        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5247        #[doc = r" parameters can be chained."]
5248        #[doc = r""]
5249        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5250        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5251        #[doc = r" executes the request and returns a `Result` with the parsed"]
5252        #[doc = r" response."]
5253        #[doc = r""]
5254        #[doc = r" If you need lower-level access to the raw response details"]
5255        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5256        #[doc = r" can finalize the request using the"]
5257        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5258        #[doc = r" that resolves to a lower-level [`Response`] value."]
5259        pub struct RequestBuilder {
5260            pub(crate) client: super::super::Client,
5261            pub(crate) organization: String,
5262            pub(crate) project: String,
5263            pub(crate) build_id: i32,
5264            pub(crate) filter: Option<String>,
5265        }
5266        impl RequestBuilder {
5267            #[doc = "A comma-delimited list of properties. If specified, filters to these specific properties."]
5268            pub fn filter(mut self, filter: impl Into<String>) -> Self {
5269                self.filter = Some(filter.into());
5270                self
5271            }
5272            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5273            #[doc = ""]
5274            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5275            #[doc = "However, this function can provide more flexibility when required."]
5276            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5277                Box::pin({
5278                    let this = self.clone();
5279                    async move {
5280                        let url = this.url()?;
5281                        let mut req =
5282                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
5283                        if let Some(auth_header) = this
5284                            .client
5285                            .token_credential()
5286                            .http_authorization_header(&this.client.scopes())
5287                            .await?
5288                        {
5289                            req.insert_header(
5290                                azure_core::http::headers::AUTHORIZATION,
5291                                auth_header,
5292                            );
5293                        }
5294                        if let Some(filter) = &this.filter {
5295                            req.url_mut()
5296                                .query_pairs_mut()
5297                                .append_pair("filter", filter);
5298                        }
5299                        let req_body = azure_core::Bytes::new();
5300                        req.set_body(req_body);
5301                        Ok(Response(this.client.send(&mut req).await?.into()))
5302                    }
5303                })
5304            }
5305            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5306                let mut url = azure_core::http::Url::parse(&format!(
5307                    "{}/{}/{}/_apis/build/builds/{}/properties",
5308                    self.client.endpoint(),
5309                    &self.organization,
5310                    &self.project,
5311                    &self.build_id
5312                ))?;
5313                let has_api_version_already = url
5314                    .query_pairs()
5315                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5316                if !has_api_version_already {
5317                    url.query_pairs_mut().append_pair(
5318                        azure_core::http::headers::query_param::API_VERSION,
5319                        "7.1-preview",
5320                    );
5321                }
5322                Ok(url)
5323            }
5324        }
5325        impl std::future::IntoFuture for RequestBuilder {
5326            type Output = azure_core::Result<models::PropertiesCollection>;
5327            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PropertiesCollection>>;
5328            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5329            #[doc = ""]
5330            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5331            #[doc = ""]
5332            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5333            fn into_future(self) -> Self::IntoFuture {
5334                Box::pin(async move { self.send().await?.into_body().await })
5335            }
5336        }
5337    }
5338    pub mod update_build_properties {
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(
5346            azure_core::http::Response<models::PropertiesCollection, azure_core::http::JsonFormat>,
5347        );
5348        impl Response {
5349            pub async fn into_body(self) -> azure_core::Result<models::PropertiesCollection> {
5350                self.0.into_body().await
5351            }
5352            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5353                self.0.into()
5354            }
5355        }
5356        #[derive(Clone)]
5357        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5358        #[doc = r""]
5359        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5360        #[doc = r" parameters can be chained."]
5361        #[doc = r""]
5362        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5363        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5364        #[doc = r" executes the request and returns a `Result` with the parsed"]
5365        #[doc = r" response."]
5366        #[doc = r""]
5367        #[doc = r" If you need lower-level access to the raw response details"]
5368        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5369        #[doc = r" can finalize the request using the"]
5370        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5371        #[doc = r" that resolves to a lower-level [`Response`] value."]
5372        pub struct RequestBuilder {
5373            pub(crate) client: super::super::Client,
5374            pub(crate) organization: String,
5375            pub(crate) body: models::JsonPatchDocument,
5376            pub(crate) project: String,
5377            pub(crate) build_id: i32,
5378        }
5379        impl RequestBuilder {
5380            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5381            #[doc = ""]
5382            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5383            #[doc = "However, this function can provide more flexibility when required."]
5384            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5385                Box::pin({
5386                    let this = self.clone();
5387                    async move {
5388                        let url = this.url()?;
5389                        let mut req =
5390                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
5391                        if let Some(auth_header) = this
5392                            .client
5393                            .token_credential()
5394                            .http_authorization_header(&this.client.scopes())
5395                            .await?
5396                        {
5397                            req.insert_header(
5398                                azure_core::http::headers::AUTHORIZATION,
5399                                auth_header,
5400                            );
5401                        }
5402                        req.insert_header("content-type", "application/json-patch+json");
5403                        let req_body = azure_core::json::to_json(&this.body)?;
5404                        req.set_body(req_body);
5405                        Ok(Response(this.client.send(&mut req).await?.into()))
5406                    }
5407                })
5408            }
5409            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5410                let mut url = azure_core::http::Url::parse(&format!(
5411                    "{}/{}/{}/_apis/build/builds/{}/properties",
5412                    self.client.endpoint(),
5413                    &self.organization,
5414                    &self.project,
5415                    &self.build_id
5416                ))?;
5417                let has_api_version_already = url
5418                    .query_pairs()
5419                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5420                if !has_api_version_already {
5421                    url.query_pairs_mut().append_pair(
5422                        azure_core::http::headers::query_param::API_VERSION,
5423                        "7.1-preview",
5424                    );
5425                }
5426                Ok(url)
5427            }
5428        }
5429        impl std::future::IntoFuture for RequestBuilder {
5430            type Output = azure_core::Result<models::PropertiesCollection>;
5431            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PropertiesCollection>>;
5432            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5433            #[doc = ""]
5434            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5435            #[doc = ""]
5436            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5437            fn into_future(self) -> Self::IntoFuture {
5438                Box::pin(async move { self.send().await?.into_body().await })
5439            }
5440        }
5441    }
5442    pub mod get_definition_properties {
5443        use super::models;
5444        #[cfg(not(target_arch = "wasm32"))]
5445        use futures::future::BoxFuture;
5446        #[cfg(target_arch = "wasm32")]
5447        use futures::future::LocalBoxFuture as BoxFuture;
5448        #[derive(Debug)]
5449        pub struct Response(
5450            azure_core::http::Response<models::PropertiesCollection, azure_core::http::JsonFormat>,
5451        );
5452        impl Response {
5453            pub async fn into_body(self) -> azure_core::Result<models::PropertiesCollection> {
5454                self.0.into_body().await
5455            }
5456            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5457                self.0.into()
5458            }
5459        }
5460        #[derive(Clone)]
5461        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5462        #[doc = r""]
5463        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5464        #[doc = r" parameters can be chained."]
5465        #[doc = r""]
5466        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5467        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5468        #[doc = r" executes the request and returns a `Result` with the parsed"]
5469        #[doc = r" response."]
5470        #[doc = r""]
5471        #[doc = r" If you need lower-level access to the raw response details"]
5472        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5473        #[doc = r" can finalize the request using the"]
5474        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5475        #[doc = r" that resolves to a lower-level [`Response`] value."]
5476        pub struct RequestBuilder {
5477            pub(crate) client: super::super::Client,
5478            pub(crate) organization: String,
5479            pub(crate) project: String,
5480            pub(crate) definition_id: i32,
5481            pub(crate) filter: Option<String>,
5482        }
5483        impl RequestBuilder {
5484            #[doc = "A comma-delimited list of properties. If specified, filters to these specific properties."]
5485            pub fn filter(mut self, filter: impl Into<String>) -> Self {
5486                self.filter = Some(filter.into());
5487                self
5488            }
5489            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5490            #[doc = ""]
5491            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5492            #[doc = "However, this function can provide more flexibility when required."]
5493            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5494                Box::pin({
5495                    let this = self.clone();
5496                    async move {
5497                        let url = this.url()?;
5498                        let mut req =
5499                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
5500                        if let Some(auth_header) = this
5501                            .client
5502                            .token_credential()
5503                            .http_authorization_header(&this.client.scopes())
5504                            .await?
5505                        {
5506                            req.insert_header(
5507                                azure_core::http::headers::AUTHORIZATION,
5508                                auth_header,
5509                            );
5510                        }
5511                        if let Some(filter) = &this.filter {
5512                            req.url_mut()
5513                                .query_pairs_mut()
5514                                .append_pair("filter", filter);
5515                        }
5516                        let req_body = azure_core::Bytes::new();
5517                        req.set_body(req_body);
5518                        Ok(Response(this.client.send(&mut req).await?.into()))
5519                    }
5520                })
5521            }
5522            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5523                let mut url = azure_core::http::Url::parse(&format!(
5524                    "{}/{}/{}/_apis/build/definitions/{}/properties",
5525                    self.client.endpoint(),
5526                    &self.organization,
5527                    &self.project,
5528                    &self.definition_id
5529                ))?;
5530                let has_api_version_already = url
5531                    .query_pairs()
5532                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5533                if !has_api_version_already {
5534                    url.query_pairs_mut().append_pair(
5535                        azure_core::http::headers::query_param::API_VERSION,
5536                        "7.1-preview",
5537                    );
5538                }
5539                Ok(url)
5540            }
5541        }
5542        impl std::future::IntoFuture for RequestBuilder {
5543            type Output = azure_core::Result<models::PropertiesCollection>;
5544            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PropertiesCollection>>;
5545            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5546            #[doc = ""]
5547            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5548            #[doc = ""]
5549            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5550            fn into_future(self) -> Self::IntoFuture {
5551                Box::pin(async move { self.send().await?.into_body().await })
5552            }
5553        }
5554    }
5555    pub mod update_definition_properties {
5556        use super::models;
5557        #[cfg(not(target_arch = "wasm32"))]
5558        use futures::future::BoxFuture;
5559        #[cfg(target_arch = "wasm32")]
5560        use futures::future::LocalBoxFuture as BoxFuture;
5561        #[derive(Debug)]
5562        pub struct Response(
5563            azure_core::http::Response<models::PropertiesCollection, azure_core::http::JsonFormat>,
5564        );
5565        impl Response {
5566            pub async fn into_body(self) -> azure_core::Result<models::PropertiesCollection> {
5567                self.0.into_body().await
5568            }
5569            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5570                self.0.into()
5571            }
5572        }
5573        #[derive(Clone)]
5574        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5575        #[doc = r""]
5576        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5577        #[doc = r" parameters can be chained."]
5578        #[doc = r""]
5579        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5580        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5581        #[doc = r" executes the request and returns a `Result` with the parsed"]
5582        #[doc = r" response."]
5583        #[doc = r""]
5584        #[doc = r" If you need lower-level access to the raw response details"]
5585        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5586        #[doc = r" can finalize the request using the"]
5587        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5588        #[doc = r" that resolves to a lower-level [`Response`] value."]
5589        pub struct RequestBuilder {
5590            pub(crate) client: super::super::Client,
5591            pub(crate) organization: String,
5592            pub(crate) body: models::JsonPatchDocument,
5593            pub(crate) project: String,
5594            pub(crate) definition_id: i32,
5595        }
5596        impl RequestBuilder {
5597            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5598            #[doc = ""]
5599            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5600            #[doc = "However, this function can provide more flexibility when required."]
5601            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5602                Box::pin({
5603                    let this = self.clone();
5604                    async move {
5605                        let url = this.url()?;
5606                        let mut req =
5607                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
5608                        if let Some(auth_header) = this
5609                            .client
5610                            .token_credential()
5611                            .http_authorization_header(&this.client.scopes())
5612                            .await?
5613                        {
5614                            req.insert_header(
5615                                azure_core::http::headers::AUTHORIZATION,
5616                                auth_header,
5617                            );
5618                        }
5619                        req.insert_header("content-type", "application/json-patch+json");
5620                        let req_body = azure_core::json::to_json(&this.body)?;
5621                        req.set_body(req_body);
5622                        Ok(Response(this.client.send(&mut req).await?.into()))
5623                    }
5624                })
5625            }
5626            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5627                let mut url = azure_core::http::Url::parse(&format!(
5628                    "{}/{}/{}/_apis/build/definitions/{}/properties",
5629                    self.client.endpoint(),
5630                    &self.organization,
5631                    &self.project,
5632                    &self.definition_id
5633                ))?;
5634                let has_api_version_already = url
5635                    .query_pairs()
5636                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5637                if !has_api_version_already {
5638                    url.query_pairs_mut().append_pair(
5639                        azure_core::http::headers::query_param::API_VERSION,
5640                        "7.1-preview",
5641                    );
5642                }
5643                Ok(url)
5644            }
5645        }
5646        impl std::future::IntoFuture for RequestBuilder {
5647            type Output = azure_core::Result<models::PropertiesCollection>;
5648            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PropertiesCollection>>;
5649            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5650            #[doc = ""]
5651            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5652            #[doc = ""]
5653            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5654            fn into_future(self) -> Self::IntoFuture {
5655                Box::pin(async move { self.send().await?.into_body().await })
5656            }
5657        }
5658    }
5659}
5660pub mod report {
5661    use super::models;
5662    #[cfg(not(target_arch = "wasm32"))]
5663    use futures::future::BoxFuture;
5664    #[cfg(target_arch = "wasm32")]
5665    use futures::future::LocalBoxFuture as BoxFuture;
5666    pub struct Client(pub(crate) super::Client);
5667    impl Client {
5668        #[doc = "Gets a build report."]
5669        #[doc = ""]
5670        #[doc = "Arguments:"]
5671        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5672        #[doc = "* `project`: Project ID or project name"]
5673        #[doc = "* `build_id`: The ID of the build."]
5674        pub fn get(
5675            &self,
5676            organization: impl Into<String>,
5677            project: impl Into<String>,
5678            build_id: i32,
5679        ) -> get::RequestBuilder {
5680            get::RequestBuilder {
5681                client: self.0.clone(),
5682                organization: organization.into(),
5683                project: project.into(),
5684                build_id,
5685                type_: None,
5686            }
5687        }
5688    }
5689    pub mod get {
5690        use super::models;
5691        #[cfg(not(target_arch = "wasm32"))]
5692        use futures::future::BoxFuture;
5693        #[cfg(target_arch = "wasm32")]
5694        use futures::future::LocalBoxFuture as BoxFuture;
5695        #[derive(Debug)]
5696        pub struct Response(
5697            azure_core::http::Response<models::BuildReportMetadata, azure_core::http::JsonFormat>,
5698        );
5699        impl Response {
5700            pub async fn into_body(self) -> azure_core::Result<models::BuildReportMetadata> {
5701                self.0.into_body().await
5702            }
5703            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5704                self.0.into()
5705            }
5706        }
5707        #[derive(Clone)]
5708        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5709        #[doc = r""]
5710        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5711        #[doc = r" parameters can be chained."]
5712        #[doc = r""]
5713        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5714        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5715        #[doc = r" executes the request and returns a `Result` with the parsed"]
5716        #[doc = r" response."]
5717        #[doc = r""]
5718        #[doc = r" If you need lower-level access to the raw response details"]
5719        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5720        #[doc = r" can finalize the request using the"]
5721        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5722        #[doc = r" that resolves to a lower-level [`Response`] value."]
5723        pub struct RequestBuilder {
5724            pub(crate) client: super::super::Client,
5725            pub(crate) organization: String,
5726            pub(crate) project: String,
5727            pub(crate) build_id: i32,
5728            pub(crate) type_: Option<String>,
5729        }
5730        impl RequestBuilder {
5731            pub fn type_(mut self, type_: impl Into<String>) -> Self {
5732                self.type_ = Some(type_.into());
5733                self
5734            }
5735            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5736            #[doc = ""]
5737            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5738            #[doc = "However, this function can provide more flexibility when required."]
5739            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5740                Box::pin({
5741                    let this = self.clone();
5742                    async move {
5743                        let url = this.url()?;
5744                        let mut req =
5745                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
5746                        if let Some(auth_header) = this
5747                            .client
5748                            .token_credential()
5749                            .http_authorization_header(&this.client.scopes())
5750                            .await?
5751                        {
5752                            req.insert_header(
5753                                azure_core::http::headers::AUTHORIZATION,
5754                                auth_header,
5755                            );
5756                        }
5757                        if let Some(type_) = &this.type_ {
5758                            req.url_mut().query_pairs_mut().append_pair("type", type_);
5759                        }
5760                        let req_body = azure_core::Bytes::new();
5761                        req.set_body(req_body);
5762                        Ok(Response(this.client.send(&mut req).await?.into()))
5763                    }
5764                })
5765            }
5766            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5767                let mut url = azure_core::http::Url::parse(&format!(
5768                    "{}/{}/{}/_apis/build/builds/{}/report",
5769                    self.client.endpoint(),
5770                    &self.organization,
5771                    &self.project,
5772                    &self.build_id
5773                ))?;
5774                let has_api_version_already = url
5775                    .query_pairs()
5776                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5777                if !has_api_version_already {
5778                    url.query_pairs_mut().append_pair(
5779                        azure_core::http::headers::query_param::API_VERSION,
5780                        "7.1-preview",
5781                    );
5782                }
5783                Ok(url)
5784            }
5785        }
5786        impl std::future::IntoFuture for RequestBuilder {
5787            type Output = azure_core::Result<models::BuildReportMetadata>;
5788            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildReportMetadata>>;
5789            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5790            #[doc = ""]
5791            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5792            #[doc = ""]
5793            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5794            fn into_future(self) -> Self::IntoFuture {
5795                Box::pin(async move { self.send().await?.into_body().await })
5796            }
5797        }
5798    }
5799}
5800pub mod stages {
5801    use super::models;
5802    #[cfg(not(target_arch = "wasm32"))]
5803    use futures::future::BoxFuture;
5804    #[cfg(target_arch = "wasm32")]
5805    use futures::future::LocalBoxFuture as BoxFuture;
5806    pub struct Client(pub(crate) super::Client);
5807    impl Client {
5808        #[doc = "Update a build stage"]
5809        #[doc = ""]
5810        #[doc = "Arguments:"]
5811        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5812        #[doc = "* `project`: Project ID or project name"]
5813        pub fn update(
5814            &self,
5815            organization: impl Into<String>,
5816            body: impl Into<models::UpdateStageParameters>,
5817            build_id: i32,
5818            stage_ref_name: impl Into<String>,
5819            project: impl Into<String>,
5820        ) -> update::RequestBuilder {
5821            update::RequestBuilder {
5822                client: self.0.clone(),
5823                organization: organization.into(),
5824                body: body.into(),
5825                build_id,
5826                stage_ref_name: stage_ref_name.into(),
5827                project: project.into(),
5828            }
5829        }
5830    }
5831    pub mod update {
5832        use super::models;
5833        #[cfg(not(target_arch = "wasm32"))]
5834        use futures::future::BoxFuture;
5835        #[cfg(target_arch = "wasm32")]
5836        use futures::future::LocalBoxFuture as BoxFuture;
5837        #[derive(Debug)]
5838        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
5839        impl Response {
5840            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5841                self.0.into()
5842            }
5843        }
5844        #[derive(Clone)]
5845        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5846        #[doc = r""]
5847        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5848        #[doc = r" parameters can be chained."]
5849        #[doc = r""]
5850        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5851        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5852        #[doc = r" executes the request and returns a `Result` with the parsed"]
5853        #[doc = r" response."]
5854        #[doc = r""]
5855        #[doc = r" If you need lower-level access to the raw response details"]
5856        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5857        #[doc = r" can finalize the request using the"]
5858        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5859        #[doc = r" that resolves to a lower-level [`Response`] value."]
5860        pub struct RequestBuilder {
5861            pub(crate) client: super::super::Client,
5862            pub(crate) organization: String,
5863            pub(crate) body: models::UpdateStageParameters,
5864            pub(crate) build_id: i32,
5865            pub(crate) stage_ref_name: String,
5866            pub(crate) project: String,
5867        }
5868        impl RequestBuilder {
5869            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5870            #[doc = ""]
5871            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5872            #[doc = "However, this function can provide more flexibility when required."]
5873            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5874                Box::pin({
5875                    let this = self.clone();
5876                    async move {
5877                        let url = this.url()?;
5878                        let mut req =
5879                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
5880                        if let Some(auth_header) = this
5881                            .client
5882                            .token_credential()
5883                            .http_authorization_header(&this.client.scopes())
5884                            .await?
5885                        {
5886                            req.insert_header(
5887                                azure_core::http::headers::AUTHORIZATION,
5888                                auth_header,
5889                            );
5890                        }
5891                        req.insert_header("content-type", "application/json");
5892                        let req_body = azure_core::json::to_json(&this.body)?;
5893                        req.set_body(req_body);
5894                        Ok(Response(this.client.send(&mut req).await?.into()))
5895                    }
5896                })
5897            }
5898            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5899                let mut url = azure_core::http::Url::parse(&format!(
5900                    "{}/{}/{}/_apis/build/builds/{}/stages/{}",
5901                    self.client.endpoint(),
5902                    &self.organization,
5903                    &self.project,
5904                    &self.build_id,
5905                    &self.stage_ref_name
5906                ))?;
5907                let has_api_version_already = url
5908                    .query_pairs()
5909                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5910                if !has_api_version_already {
5911                    url.query_pairs_mut().append_pair(
5912                        azure_core::http::headers::query_param::API_VERSION,
5913                        "7.1-preview",
5914                    );
5915                }
5916                Ok(url)
5917            }
5918        }
5919        impl std::future::IntoFuture for RequestBuilder {
5920            type Output = azure_core::Result<()>;
5921            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
5922            #[doc = "Returns a future that sends the request and waits for the response."]
5923            #[doc = ""]
5924            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5925            #[doc = ""]
5926            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5927            fn into_future(self) -> Self::IntoFuture {
5928                Box::pin(async move {
5929                    let _rsp = self.send().await?;
5930                    Ok(())
5931                })
5932            }
5933        }
5934    }
5935}
5936pub mod tags {
5937    use super::models;
5938    #[cfg(not(target_arch = "wasm32"))]
5939    use futures::future::BoxFuture;
5940    #[cfg(target_arch = "wasm32")]
5941    use futures::future::LocalBoxFuture as BoxFuture;
5942    pub struct Client(pub(crate) super::Client);
5943    impl Client {
5944        #[doc = "Gets the tags for a build."]
5945        #[doc = ""]
5946        #[doc = "Arguments:"]
5947        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5948        #[doc = "* `project`: Project ID or project name"]
5949        #[doc = "* `build_id`: The ID of the build."]
5950        pub fn get_build_tags(
5951            &self,
5952            organization: impl Into<String>,
5953            project: impl Into<String>,
5954            build_id: i32,
5955        ) -> get_build_tags::RequestBuilder {
5956            get_build_tags::RequestBuilder {
5957                client: self.0.clone(),
5958                organization: organization.into(),
5959                project: project.into(),
5960                build_id,
5961            }
5962        }
5963        #[doc = "Adds tags to a build."]
5964        #[doc = ""]
5965        #[doc = "Arguments:"]
5966        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5967        #[doc = "* `body`: The tags to add. Request body is composed directly from listed tags."]
5968        #[doc = "* `project`: Project ID or project name"]
5969        #[doc = "* `build_id`: The ID of the build."]
5970        pub fn add_build_tags(
5971            &self,
5972            organization: impl Into<String>,
5973            body: Vec<String>,
5974            project: impl Into<String>,
5975            build_id: i32,
5976        ) -> add_build_tags::RequestBuilder {
5977            add_build_tags::RequestBuilder {
5978                client: self.0.clone(),
5979                organization: organization.into(),
5980                body,
5981                project: project.into(),
5982                build_id,
5983            }
5984        }
5985        #[doc = "Adds/Removes tags from a build."]
5986        #[doc = ""]
5987        #[doc = "Arguments:"]
5988        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5989        #[doc = "* `body`: The tags to add/remove."]
5990        #[doc = "* `project`: Project ID or project name"]
5991        #[doc = "* `build_id`: The ID of the build."]
5992        pub fn update_build_tags(
5993            &self,
5994            organization: impl Into<String>,
5995            body: impl Into<models::UpdateTagParameters>,
5996            project: impl Into<String>,
5997            build_id: i32,
5998        ) -> update_build_tags::RequestBuilder {
5999            update_build_tags::RequestBuilder {
6000                client: self.0.clone(),
6001                organization: organization.into(),
6002                body: body.into(),
6003                project: project.into(),
6004                build_id,
6005            }
6006        }
6007        #[doc = "Adds a tag to a build."]
6008        #[doc = ""]
6009        #[doc = "Arguments:"]
6010        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6011        #[doc = "* `project`: Project ID or project name"]
6012        #[doc = "* `build_id`: The ID of the build."]
6013        #[doc = "* `tag`: The tag to add."]
6014        pub fn add_build_tag(
6015            &self,
6016            organization: impl Into<String>,
6017            project: impl Into<String>,
6018            build_id: i32,
6019            tag: impl Into<String>,
6020        ) -> add_build_tag::RequestBuilder {
6021            add_build_tag::RequestBuilder {
6022                client: self.0.clone(),
6023                organization: organization.into(),
6024                project: project.into(),
6025                build_id,
6026                tag: tag.into(),
6027            }
6028        }
6029        #[doc = "Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)"]
6030        #[doc = ""]
6031        #[doc = "Arguments:"]
6032        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6033        #[doc = "* `project`: Project ID or project name"]
6034        #[doc = "* `build_id`: The ID of the build."]
6035        #[doc = "* `tag`: The tag to remove."]
6036        pub fn delete_build_tag(
6037            &self,
6038            organization: impl Into<String>,
6039            project: impl Into<String>,
6040            build_id: i32,
6041            tag: impl Into<String>,
6042        ) -> delete_build_tag::RequestBuilder {
6043            delete_build_tag::RequestBuilder {
6044                client: self.0.clone(),
6045                organization: organization.into(),
6046                project: project.into(),
6047                build_id,
6048                tag: tag.into(),
6049            }
6050        }
6051        #[doc = "Gets the tags for a definition."]
6052        #[doc = ""]
6053        #[doc = "Arguments:"]
6054        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6055        #[doc = "* `project`: Project ID or project name"]
6056        #[doc = "* `definition_id`: The ID of the definition."]
6057        pub fn get_definition_tags(
6058            &self,
6059            organization: impl Into<String>,
6060            project: impl Into<String>,
6061            definition_id: i32,
6062        ) -> get_definition_tags::RequestBuilder {
6063            get_definition_tags::RequestBuilder {
6064                client: self.0.clone(),
6065                organization: organization.into(),
6066                project: project.into(),
6067                definition_id,
6068                revision: None,
6069            }
6070        }
6071        #[doc = "Adds multiple tags to a definition."]
6072        #[doc = ""]
6073        #[doc = "Arguments:"]
6074        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6075        #[doc = "* `body`: The tags to add."]
6076        #[doc = "* `project`: Project ID or project name"]
6077        #[doc = "* `definition_id`: The ID of the definition."]
6078        pub fn add_definition_tags(
6079            &self,
6080            organization: impl Into<String>,
6081            body: Vec<String>,
6082            project: impl Into<String>,
6083            definition_id: i32,
6084        ) -> add_definition_tags::RequestBuilder {
6085            add_definition_tags::RequestBuilder {
6086                client: self.0.clone(),
6087                organization: organization.into(),
6088                body,
6089                project: project.into(),
6090                definition_id,
6091            }
6092        }
6093        #[doc = "Adds/Removes tags from a definition."]
6094        #[doc = ""]
6095        #[doc = "Arguments:"]
6096        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6097        #[doc = "* `body`: The tags to add/remove."]
6098        #[doc = "* `project`: Project ID or project name"]
6099        #[doc = "* `definition_id`: The ID of the definition."]
6100        pub fn update_definition_tags(
6101            &self,
6102            organization: impl Into<String>,
6103            body: impl Into<models::UpdateTagParameters>,
6104            project: impl Into<String>,
6105            definition_id: i32,
6106        ) -> update_definition_tags::RequestBuilder {
6107            update_definition_tags::RequestBuilder {
6108                client: self.0.clone(),
6109                organization: organization.into(),
6110                body: body.into(),
6111                project: project.into(),
6112                definition_id,
6113            }
6114        }
6115        #[doc = "Adds a tag to a definition"]
6116        #[doc = ""]
6117        #[doc = "Arguments:"]
6118        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6119        #[doc = "* `project`: Project ID or project name"]
6120        #[doc = "* `definition_id`: The ID of the definition."]
6121        #[doc = "* `tag`: The tag to add."]
6122        pub fn add_definition_tag(
6123            &self,
6124            organization: impl Into<String>,
6125            project: impl Into<String>,
6126            definition_id: i32,
6127            tag: impl Into<String>,
6128        ) -> add_definition_tag::RequestBuilder {
6129            add_definition_tag::RequestBuilder {
6130                client: self.0.clone(),
6131                organization: organization.into(),
6132                project: project.into(),
6133                definition_id,
6134                tag: tag.into(),
6135            }
6136        }
6137        #[doc = "Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)"]
6138        #[doc = ""]
6139        #[doc = "Arguments:"]
6140        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6141        #[doc = "* `project`: Project ID or project name"]
6142        #[doc = "* `definition_id`: The ID of the definition."]
6143        #[doc = "* `tag`: The tag to remove."]
6144        pub fn delete_definition_tag(
6145            &self,
6146            organization: impl Into<String>,
6147            project: impl Into<String>,
6148            definition_id: i32,
6149            tag: impl Into<String>,
6150        ) -> delete_definition_tag::RequestBuilder {
6151            delete_definition_tag::RequestBuilder {
6152                client: self.0.clone(),
6153                organization: organization.into(),
6154                project: project.into(),
6155                definition_id,
6156                tag: tag.into(),
6157            }
6158        }
6159        #[doc = "Gets a list of all build tags in the project."]
6160        #[doc = ""]
6161        #[doc = "Arguments:"]
6162        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6163        #[doc = "* `project`: Project ID or project name"]
6164        pub fn get_tags(
6165            &self,
6166            organization: impl Into<String>,
6167            project: impl Into<String>,
6168        ) -> get_tags::RequestBuilder {
6169            get_tags::RequestBuilder {
6170                client: self.0.clone(),
6171                organization: organization.into(),
6172                project: project.into(),
6173            }
6174        }
6175        #[doc = "Removes a tag from builds, definitions, and from the tag store"]
6176        #[doc = ""]
6177        #[doc = "Arguments:"]
6178        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6179        #[doc = "* `project`: Project ID or project name"]
6180        #[doc = "* `tag`: The tag to remove."]
6181        pub fn delete_tag(
6182            &self,
6183            organization: impl Into<String>,
6184            project: impl Into<String>,
6185            tag: impl Into<String>,
6186        ) -> delete_tag::RequestBuilder {
6187            delete_tag::RequestBuilder {
6188                client: self.0.clone(),
6189                organization: organization.into(),
6190                project: project.into(),
6191                tag: tag.into(),
6192            }
6193        }
6194    }
6195    pub mod get_build_tags {
6196        use super::models;
6197        #[cfg(not(target_arch = "wasm32"))]
6198        use futures::future::BoxFuture;
6199        #[cfg(target_arch = "wasm32")]
6200        use futures::future::LocalBoxFuture as BoxFuture;
6201        #[derive(Debug)]
6202        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
6203        impl Response {
6204            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
6205                self.0.into_body().await
6206            }
6207            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6208                self.0.into()
6209            }
6210        }
6211        #[derive(Clone)]
6212        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6213        #[doc = r""]
6214        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6215        #[doc = r" parameters can be chained."]
6216        #[doc = r""]
6217        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6218        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6219        #[doc = r" executes the request and returns a `Result` with the parsed"]
6220        #[doc = r" response."]
6221        #[doc = r""]
6222        #[doc = r" If you need lower-level access to the raw response details"]
6223        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6224        #[doc = r" can finalize the request using the"]
6225        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6226        #[doc = r" that resolves to a lower-level [`Response`] value."]
6227        pub struct RequestBuilder {
6228            pub(crate) client: super::super::Client,
6229            pub(crate) organization: String,
6230            pub(crate) project: String,
6231            pub(crate) build_id: i32,
6232        }
6233        impl RequestBuilder {
6234            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6235            #[doc = ""]
6236            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6237            #[doc = "However, this function can provide more flexibility when required."]
6238            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6239                Box::pin({
6240                    let this = self.clone();
6241                    async move {
6242                        let url = this.url()?;
6243                        let mut req =
6244                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
6245                        if let Some(auth_header) = this
6246                            .client
6247                            .token_credential()
6248                            .http_authorization_header(&this.client.scopes())
6249                            .await?
6250                        {
6251                            req.insert_header(
6252                                azure_core::http::headers::AUTHORIZATION,
6253                                auth_header,
6254                            );
6255                        }
6256                        let req_body = azure_core::Bytes::new();
6257                        req.set_body(req_body);
6258                        Ok(Response(this.client.send(&mut req).await?.into()))
6259                    }
6260                })
6261            }
6262            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6263                let mut url = azure_core::http::Url::parse(&format!(
6264                    "{}/{}/{}/_apis/build/builds/{}/tags",
6265                    self.client.endpoint(),
6266                    &self.organization,
6267                    &self.project,
6268                    &self.build_id
6269                ))?;
6270                let has_api_version_already = url
6271                    .query_pairs()
6272                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6273                if !has_api_version_already {
6274                    url.query_pairs_mut().append_pair(
6275                        azure_core::http::headers::query_param::API_VERSION,
6276                        "7.1-preview",
6277                    );
6278                }
6279                Ok(url)
6280            }
6281        }
6282        impl std::future::IntoFuture for RequestBuilder {
6283            type Output = azure_core::Result<Vec<String>>;
6284            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
6285            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6286            #[doc = ""]
6287            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6288            #[doc = ""]
6289            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6290            fn into_future(self) -> Self::IntoFuture {
6291                Box::pin(async move { self.send().await?.into_body().await })
6292            }
6293        }
6294    }
6295    pub mod add_build_tags {
6296        use super::models;
6297        #[cfg(not(target_arch = "wasm32"))]
6298        use futures::future::BoxFuture;
6299        #[cfg(target_arch = "wasm32")]
6300        use futures::future::LocalBoxFuture as BoxFuture;
6301        #[derive(Debug)]
6302        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
6303        impl Response {
6304            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
6305                self.0.into_body().await
6306            }
6307            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6308                self.0.into()
6309            }
6310        }
6311        #[derive(Clone)]
6312        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6313        #[doc = r""]
6314        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6315        #[doc = r" parameters can be chained."]
6316        #[doc = r""]
6317        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6318        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6319        #[doc = r" executes the request and returns a `Result` with the parsed"]
6320        #[doc = r" response."]
6321        #[doc = r""]
6322        #[doc = r" If you need lower-level access to the raw response details"]
6323        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6324        #[doc = r" can finalize the request using the"]
6325        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6326        #[doc = r" that resolves to a lower-level [`Response`] value."]
6327        pub struct RequestBuilder {
6328            pub(crate) client: super::super::Client,
6329            pub(crate) organization: String,
6330            pub(crate) body: Vec<String>,
6331            pub(crate) project: String,
6332            pub(crate) build_id: i32,
6333        }
6334        impl RequestBuilder {
6335            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6336            #[doc = ""]
6337            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6338            #[doc = "However, this function can provide more flexibility when required."]
6339            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6340                Box::pin({
6341                    let this = self.clone();
6342                    async move {
6343                        let url = this.url()?;
6344                        let mut req =
6345                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
6346                        if let Some(auth_header) = this
6347                            .client
6348                            .token_credential()
6349                            .http_authorization_header(&this.client.scopes())
6350                            .await?
6351                        {
6352                            req.insert_header(
6353                                azure_core::http::headers::AUTHORIZATION,
6354                                auth_header,
6355                            );
6356                        }
6357                        req.insert_header("content-type", "application/json");
6358                        let req_body = azure_core::json::to_json(&this.body)?;
6359                        req.set_body(req_body);
6360                        Ok(Response(this.client.send(&mut req).await?.into()))
6361                    }
6362                })
6363            }
6364            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6365                let mut url = azure_core::http::Url::parse(&format!(
6366                    "{}/{}/{}/_apis/build/builds/{}/tags",
6367                    self.client.endpoint(),
6368                    &self.organization,
6369                    &self.project,
6370                    &self.build_id
6371                ))?;
6372                let has_api_version_already = url
6373                    .query_pairs()
6374                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6375                if !has_api_version_already {
6376                    url.query_pairs_mut().append_pair(
6377                        azure_core::http::headers::query_param::API_VERSION,
6378                        "7.1-preview",
6379                    );
6380                }
6381                Ok(url)
6382            }
6383        }
6384        impl std::future::IntoFuture for RequestBuilder {
6385            type Output = azure_core::Result<Vec<String>>;
6386            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
6387            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6388            #[doc = ""]
6389            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6390            #[doc = ""]
6391            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6392            fn into_future(self) -> Self::IntoFuture {
6393                Box::pin(async move { self.send().await?.into_body().await })
6394            }
6395        }
6396    }
6397    pub mod update_build_tags {
6398        use super::models;
6399        #[cfg(not(target_arch = "wasm32"))]
6400        use futures::future::BoxFuture;
6401        #[cfg(target_arch = "wasm32")]
6402        use futures::future::LocalBoxFuture as BoxFuture;
6403        #[derive(Debug)]
6404        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
6405        impl Response {
6406            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
6407                self.0.into_body().await
6408            }
6409            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6410                self.0.into()
6411            }
6412        }
6413        #[derive(Clone)]
6414        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6415        #[doc = r""]
6416        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6417        #[doc = r" parameters can be chained."]
6418        #[doc = r""]
6419        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6420        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6421        #[doc = r" executes the request and returns a `Result` with the parsed"]
6422        #[doc = r" response."]
6423        #[doc = r""]
6424        #[doc = r" If you need lower-level access to the raw response details"]
6425        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6426        #[doc = r" can finalize the request using the"]
6427        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6428        #[doc = r" that resolves to a lower-level [`Response`] value."]
6429        pub struct RequestBuilder {
6430            pub(crate) client: super::super::Client,
6431            pub(crate) organization: String,
6432            pub(crate) body: models::UpdateTagParameters,
6433            pub(crate) project: String,
6434            pub(crate) build_id: i32,
6435        }
6436        impl RequestBuilder {
6437            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6438            #[doc = ""]
6439            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6440            #[doc = "However, this function can provide more flexibility when required."]
6441            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6442                Box::pin({
6443                    let this = self.clone();
6444                    async move {
6445                        let url = this.url()?;
6446                        let mut req =
6447                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
6448                        if let Some(auth_header) = this
6449                            .client
6450                            .token_credential()
6451                            .http_authorization_header(&this.client.scopes())
6452                            .await?
6453                        {
6454                            req.insert_header(
6455                                azure_core::http::headers::AUTHORIZATION,
6456                                auth_header,
6457                            );
6458                        }
6459                        req.insert_header("content-type", "application/json");
6460                        let req_body = azure_core::json::to_json(&this.body)?;
6461                        req.set_body(req_body);
6462                        Ok(Response(this.client.send(&mut req).await?.into()))
6463                    }
6464                })
6465            }
6466            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6467                let mut url = azure_core::http::Url::parse(&format!(
6468                    "{}/{}/{}/_apis/build/builds/{}/tags",
6469                    self.client.endpoint(),
6470                    &self.organization,
6471                    &self.project,
6472                    &self.build_id
6473                ))?;
6474                let has_api_version_already = url
6475                    .query_pairs()
6476                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6477                if !has_api_version_already {
6478                    url.query_pairs_mut().append_pair(
6479                        azure_core::http::headers::query_param::API_VERSION,
6480                        "7.1-preview",
6481                    );
6482                }
6483                Ok(url)
6484            }
6485        }
6486        impl std::future::IntoFuture for RequestBuilder {
6487            type Output = azure_core::Result<Vec<String>>;
6488            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
6489            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6490            #[doc = ""]
6491            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6492            #[doc = ""]
6493            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6494            fn into_future(self) -> Self::IntoFuture {
6495                Box::pin(async move { self.send().await?.into_body().await })
6496            }
6497        }
6498    }
6499    pub mod add_build_tag {
6500        use super::models;
6501        #[cfg(not(target_arch = "wasm32"))]
6502        use futures::future::BoxFuture;
6503        #[cfg(target_arch = "wasm32")]
6504        use futures::future::LocalBoxFuture as BoxFuture;
6505        #[derive(Debug)]
6506        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
6507        impl Response {
6508            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
6509                self.0.into_body().await
6510            }
6511            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6512                self.0.into()
6513            }
6514        }
6515        #[derive(Clone)]
6516        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6517        #[doc = r""]
6518        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6519        #[doc = r" parameters can be chained."]
6520        #[doc = r""]
6521        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6522        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6523        #[doc = r" executes the request and returns a `Result` with the parsed"]
6524        #[doc = r" response."]
6525        #[doc = r""]
6526        #[doc = r" If you need lower-level access to the raw response details"]
6527        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6528        #[doc = r" can finalize the request using the"]
6529        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6530        #[doc = r" that resolves to a lower-level [`Response`] value."]
6531        pub struct RequestBuilder {
6532            pub(crate) client: super::super::Client,
6533            pub(crate) organization: String,
6534            pub(crate) project: String,
6535            pub(crate) build_id: i32,
6536            pub(crate) tag: String,
6537        }
6538        impl RequestBuilder {
6539            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6540            #[doc = ""]
6541            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6542            #[doc = "However, this function can provide more flexibility when required."]
6543            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6544                Box::pin({
6545                    let this = self.clone();
6546                    async move {
6547                        let url = this.url()?;
6548                        let mut req =
6549                            azure_core::http::Request::new(url, azure_core::http::Method::Put);
6550                        if let Some(auth_header) = this
6551                            .client
6552                            .token_credential()
6553                            .http_authorization_header(&this.client.scopes())
6554                            .await?
6555                        {
6556                            req.insert_header(
6557                                azure_core::http::headers::AUTHORIZATION,
6558                                auth_header,
6559                            );
6560                        }
6561                        let req_body = azure_core::Bytes::new();
6562                        req.set_body(req_body);
6563                        Ok(Response(this.client.send(&mut req).await?.into()))
6564                    }
6565                })
6566            }
6567            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6568                let mut url = azure_core::http::Url::parse(&format!(
6569                    "{}/{}/{}/_apis/build/builds/{}/tags/{}",
6570                    self.client.endpoint(),
6571                    &self.organization,
6572                    &self.project,
6573                    &self.build_id,
6574                    &self.tag
6575                ))?;
6576                let has_api_version_already = url
6577                    .query_pairs()
6578                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6579                if !has_api_version_already {
6580                    url.query_pairs_mut().append_pair(
6581                        azure_core::http::headers::query_param::API_VERSION,
6582                        "7.1-preview",
6583                    );
6584                }
6585                Ok(url)
6586            }
6587        }
6588        impl std::future::IntoFuture for RequestBuilder {
6589            type Output = azure_core::Result<Vec<String>>;
6590            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
6591            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6592            #[doc = ""]
6593            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6594            #[doc = ""]
6595            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6596            fn into_future(self) -> Self::IntoFuture {
6597                Box::pin(async move { self.send().await?.into_body().await })
6598            }
6599        }
6600    }
6601    pub mod delete_build_tag {
6602        use super::models;
6603        #[cfg(not(target_arch = "wasm32"))]
6604        use futures::future::BoxFuture;
6605        #[cfg(target_arch = "wasm32")]
6606        use futures::future::LocalBoxFuture as BoxFuture;
6607        #[derive(Debug)]
6608        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
6609        impl Response {
6610            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
6611                self.0.into_body().await
6612            }
6613            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6614                self.0.into()
6615            }
6616        }
6617        #[derive(Clone)]
6618        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6619        #[doc = r""]
6620        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6621        #[doc = r" parameters can be chained."]
6622        #[doc = r""]
6623        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6624        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6625        #[doc = r" executes the request and returns a `Result` with the parsed"]
6626        #[doc = r" response."]
6627        #[doc = r""]
6628        #[doc = r" If you need lower-level access to the raw response details"]
6629        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6630        #[doc = r" can finalize the request using the"]
6631        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6632        #[doc = r" that resolves to a lower-level [`Response`] value."]
6633        pub struct RequestBuilder {
6634            pub(crate) client: super::super::Client,
6635            pub(crate) organization: String,
6636            pub(crate) project: String,
6637            pub(crate) build_id: i32,
6638            pub(crate) tag: String,
6639        }
6640        impl RequestBuilder {
6641            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6642            #[doc = ""]
6643            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6644            #[doc = "However, this function can provide more flexibility when required."]
6645            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6646                Box::pin({
6647                    let this = self.clone();
6648                    async move {
6649                        let url = this.url()?;
6650                        let mut req =
6651                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
6652                        if let Some(auth_header) = this
6653                            .client
6654                            .token_credential()
6655                            .http_authorization_header(&this.client.scopes())
6656                            .await?
6657                        {
6658                            req.insert_header(
6659                                azure_core::http::headers::AUTHORIZATION,
6660                                auth_header,
6661                            );
6662                        }
6663                        let req_body = azure_core::Bytes::new();
6664                        req.set_body(req_body);
6665                        Ok(Response(this.client.send(&mut req).await?.into()))
6666                    }
6667                })
6668            }
6669            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6670                let mut url = azure_core::http::Url::parse(&format!(
6671                    "{}/{}/{}/_apis/build/builds/{}/tags/{}",
6672                    self.client.endpoint(),
6673                    &self.organization,
6674                    &self.project,
6675                    &self.build_id,
6676                    &self.tag
6677                ))?;
6678                let has_api_version_already = url
6679                    .query_pairs()
6680                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6681                if !has_api_version_already {
6682                    url.query_pairs_mut().append_pair(
6683                        azure_core::http::headers::query_param::API_VERSION,
6684                        "7.1-preview",
6685                    );
6686                }
6687                Ok(url)
6688            }
6689        }
6690        impl std::future::IntoFuture for RequestBuilder {
6691            type Output = azure_core::Result<Vec<String>>;
6692            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
6693            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6694            #[doc = ""]
6695            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6696            #[doc = ""]
6697            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6698            fn into_future(self) -> Self::IntoFuture {
6699                Box::pin(async move { self.send().await?.into_body().await })
6700            }
6701        }
6702    }
6703    pub mod get_definition_tags {
6704        use super::models;
6705        #[cfg(not(target_arch = "wasm32"))]
6706        use futures::future::BoxFuture;
6707        #[cfg(target_arch = "wasm32")]
6708        use futures::future::LocalBoxFuture as BoxFuture;
6709        #[derive(Debug)]
6710        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
6711        impl Response {
6712            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
6713                self.0.into_body().await
6714            }
6715            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6716                self.0.into()
6717            }
6718        }
6719        #[derive(Clone)]
6720        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6721        #[doc = r""]
6722        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6723        #[doc = r" parameters can be chained."]
6724        #[doc = r""]
6725        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6726        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6727        #[doc = r" executes the request and returns a `Result` with the parsed"]
6728        #[doc = r" response."]
6729        #[doc = r""]
6730        #[doc = r" If you need lower-level access to the raw response details"]
6731        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6732        #[doc = r" can finalize the request using the"]
6733        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6734        #[doc = r" that resolves to a lower-level [`Response`] value."]
6735        pub struct RequestBuilder {
6736            pub(crate) client: super::super::Client,
6737            pub(crate) organization: String,
6738            pub(crate) project: String,
6739            pub(crate) definition_id: i32,
6740            pub(crate) revision: Option<i32>,
6741        }
6742        impl RequestBuilder {
6743            #[doc = "The definition revision number. If not specified, uses the latest revision of the definition."]
6744            pub fn revision(mut self, revision: i32) -> Self {
6745                self.revision = Some(revision);
6746                self
6747            }
6748            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6749            #[doc = ""]
6750            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6751            #[doc = "However, this function can provide more flexibility when required."]
6752            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6753                Box::pin({
6754                    let this = self.clone();
6755                    async move {
6756                        let url = this.url()?;
6757                        let mut req =
6758                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
6759                        if let Some(auth_header) = this
6760                            .client
6761                            .token_credential()
6762                            .http_authorization_header(&this.client.scopes())
6763                            .await?
6764                        {
6765                            req.insert_header(
6766                                azure_core::http::headers::AUTHORIZATION,
6767                                auth_header,
6768                            );
6769                        }
6770                        if let Some(revision) = &this.revision {
6771                            req.url_mut()
6772                                .query_pairs_mut()
6773                                .append_pair("revision", &revision.to_string());
6774                        }
6775                        let req_body = azure_core::Bytes::new();
6776                        req.set_body(req_body);
6777                        Ok(Response(this.client.send(&mut req).await?.into()))
6778                    }
6779                })
6780            }
6781            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6782                let mut url = azure_core::http::Url::parse(&format!(
6783                    "{}/{}/{}/_apis/build/definitions/{}/tags",
6784                    self.client.endpoint(),
6785                    &self.organization,
6786                    &self.project,
6787                    &self.definition_id
6788                ))?;
6789                let has_api_version_already = url
6790                    .query_pairs()
6791                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6792                if !has_api_version_already {
6793                    url.query_pairs_mut().append_pair(
6794                        azure_core::http::headers::query_param::API_VERSION,
6795                        "7.1-preview",
6796                    );
6797                }
6798                Ok(url)
6799            }
6800        }
6801        impl std::future::IntoFuture for RequestBuilder {
6802            type Output = azure_core::Result<Vec<String>>;
6803            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
6804            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6805            #[doc = ""]
6806            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6807            #[doc = ""]
6808            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6809            fn into_future(self) -> Self::IntoFuture {
6810                Box::pin(async move { self.send().await?.into_body().await })
6811            }
6812        }
6813    }
6814    pub mod add_definition_tags {
6815        use super::models;
6816        #[cfg(not(target_arch = "wasm32"))]
6817        use futures::future::BoxFuture;
6818        #[cfg(target_arch = "wasm32")]
6819        use futures::future::LocalBoxFuture as BoxFuture;
6820        #[derive(Debug)]
6821        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
6822        impl Response {
6823            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
6824                self.0.into_body().await
6825            }
6826            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6827                self.0.into()
6828            }
6829        }
6830        #[derive(Clone)]
6831        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6832        #[doc = r""]
6833        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6834        #[doc = r" parameters can be chained."]
6835        #[doc = r""]
6836        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6837        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6838        #[doc = r" executes the request and returns a `Result` with the parsed"]
6839        #[doc = r" response."]
6840        #[doc = r""]
6841        #[doc = r" If you need lower-level access to the raw response details"]
6842        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6843        #[doc = r" can finalize the request using the"]
6844        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6845        #[doc = r" that resolves to a lower-level [`Response`] value."]
6846        pub struct RequestBuilder {
6847            pub(crate) client: super::super::Client,
6848            pub(crate) organization: String,
6849            pub(crate) body: Vec<String>,
6850            pub(crate) project: String,
6851            pub(crate) definition_id: i32,
6852        }
6853        impl RequestBuilder {
6854            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6855            #[doc = ""]
6856            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6857            #[doc = "However, this function can provide more flexibility when required."]
6858            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6859                Box::pin({
6860                    let this = self.clone();
6861                    async move {
6862                        let url = this.url()?;
6863                        let mut req =
6864                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
6865                        if let Some(auth_header) = this
6866                            .client
6867                            .token_credential()
6868                            .http_authorization_header(&this.client.scopes())
6869                            .await?
6870                        {
6871                            req.insert_header(
6872                                azure_core::http::headers::AUTHORIZATION,
6873                                auth_header,
6874                            );
6875                        }
6876                        req.insert_header("content-type", "application/json");
6877                        let req_body = azure_core::json::to_json(&this.body)?;
6878                        req.set_body(req_body);
6879                        Ok(Response(this.client.send(&mut req).await?.into()))
6880                    }
6881                })
6882            }
6883            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6884                let mut url = azure_core::http::Url::parse(&format!(
6885                    "{}/{}/{}/_apis/build/definitions/{}/tags",
6886                    self.client.endpoint(),
6887                    &self.organization,
6888                    &self.project,
6889                    &self.definition_id
6890                ))?;
6891                let has_api_version_already = url
6892                    .query_pairs()
6893                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6894                if !has_api_version_already {
6895                    url.query_pairs_mut().append_pair(
6896                        azure_core::http::headers::query_param::API_VERSION,
6897                        "7.1-preview",
6898                    );
6899                }
6900                Ok(url)
6901            }
6902        }
6903        impl std::future::IntoFuture for RequestBuilder {
6904            type Output = azure_core::Result<Vec<String>>;
6905            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
6906            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6907            #[doc = ""]
6908            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6909            #[doc = ""]
6910            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6911            fn into_future(self) -> Self::IntoFuture {
6912                Box::pin(async move { self.send().await?.into_body().await })
6913            }
6914        }
6915    }
6916    pub mod update_definition_tags {
6917        use super::models;
6918        #[cfg(not(target_arch = "wasm32"))]
6919        use futures::future::BoxFuture;
6920        #[cfg(target_arch = "wasm32")]
6921        use futures::future::LocalBoxFuture as BoxFuture;
6922        #[derive(Debug)]
6923        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
6924        impl Response {
6925            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
6926                self.0.into_body().await
6927            }
6928            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6929                self.0.into()
6930            }
6931        }
6932        #[derive(Clone)]
6933        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6934        #[doc = r""]
6935        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6936        #[doc = r" parameters can be chained."]
6937        #[doc = r""]
6938        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6939        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6940        #[doc = r" executes the request and returns a `Result` with the parsed"]
6941        #[doc = r" response."]
6942        #[doc = r""]
6943        #[doc = r" If you need lower-level access to the raw response details"]
6944        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6945        #[doc = r" can finalize the request using the"]
6946        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6947        #[doc = r" that resolves to a lower-level [`Response`] value."]
6948        pub struct RequestBuilder {
6949            pub(crate) client: super::super::Client,
6950            pub(crate) organization: String,
6951            pub(crate) body: models::UpdateTagParameters,
6952            pub(crate) project: String,
6953            pub(crate) definition_id: i32,
6954        }
6955        impl RequestBuilder {
6956            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6957            #[doc = ""]
6958            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6959            #[doc = "However, this function can provide more flexibility when required."]
6960            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6961                Box::pin({
6962                    let this = self.clone();
6963                    async move {
6964                        let url = this.url()?;
6965                        let mut req =
6966                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
6967                        if let Some(auth_header) = this
6968                            .client
6969                            .token_credential()
6970                            .http_authorization_header(&this.client.scopes())
6971                            .await?
6972                        {
6973                            req.insert_header(
6974                                azure_core::http::headers::AUTHORIZATION,
6975                                auth_header,
6976                            );
6977                        }
6978                        req.insert_header("content-type", "application/json");
6979                        let req_body = azure_core::json::to_json(&this.body)?;
6980                        req.set_body(req_body);
6981                        Ok(Response(this.client.send(&mut req).await?.into()))
6982                    }
6983                })
6984            }
6985            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6986                let mut url = azure_core::http::Url::parse(&format!(
6987                    "{}/{}/{}/_apis/build/definitions/{}/tags",
6988                    self.client.endpoint(),
6989                    &self.organization,
6990                    &self.project,
6991                    &self.definition_id
6992                ))?;
6993                let has_api_version_already = url
6994                    .query_pairs()
6995                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6996                if !has_api_version_already {
6997                    url.query_pairs_mut().append_pair(
6998                        azure_core::http::headers::query_param::API_VERSION,
6999                        "7.1-preview",
7000                    );
7001                }
7002                Ok(url)
7003            }
7004        }
7005        impl std::future::IntoFuture for RequestBuilder {
7006            type Output = azure_core::Result<Vec<String>>;
7007            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7008            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7009            #[doc = ""]
7010            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7011            #[doc = ""]
7012            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7013            fn into_future(self) -> Self::IntoFuture {
7014                Box::pin(async move { self.send().await?.into_body().await })
7015            }
7016        }
7017    }
7018    pub mod add_definition_tag {
7019        use super::models;
7020        #[cfg(not(target_arch = "wasm32"))]
7021        use futures::future::BoxFuture;
7022        #[cfg(target_arch = "wasm32")]
7023        use futures::future::LocalBoxFuture as BoxFuture;
7024        #[derive(Debug)]
7025        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
7026        impl Response {
7027            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
7028                self.0.into_body().await
7029            }
7030            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7031                self.0.into()
7032            }
7033        }
7034        #[derive(Clone)]
7035        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7036        #[doc = r""]
7037        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7038        #[doc = r" parameters can be chained."]
7039        #[doc = r""]
7040        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7041        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7042        #[doc = r" executes the request and returns a `Result` with the parsed"]
7043        #[doc = r" response."]
7044        #[doc = r""]
7045        #[doc = r" If you need lower-level access to the raw response details"]
7046        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7047        #[doc = r" can finalize the request using the"]
7048        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7049        #[doc = r" that resolves to a lower-level [`Response`] value."]
7050        pub struct RequestBuilder {
7051            pub(crate) client: super::super::Client,
7052            pub(crate) organization: String,
7053            pub(crate) project: String,
7054            pub(crate) definition_id: i32,
7055            pub(crate) tag: String,
7056        }
7057        impl RequestBuilder {
7058            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7059            #[doc = ""]
7060            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7061            #[doc = "However, this function can provide more flexibility when required."]
7062            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7063                Box::pin({
7064                    let this = self.clone();
7065                    async move {
7066                        let url = this.url()?;
7067                        let mut req =
7068                            azure_core::http::Request::new(url, azure_core::http::Method::Put);
7069                        if let Some(auth_header) = this
7070                            .client
7071                            .token_credential()
7072                            .http_authorization_header(&this.client.scopes())
7073                            .await?
7074                        {
7075                            req.insert_header(
7076                                azure_core::http::headers::AUTHORIZATION,
7077                                auth_header,
7078                            );
7079                        }
7080                        let req_body = azure_core::Bytes::new();
7081                        req.set_body(req_body);
7082                        Ok(Response(this.client.send(&mut req).await?.into()))
7083                    }
7084                })
7085            }
7086            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7087                let mut url = azure_core::http::Url::parse(&format!(
7088                    "{}/{}/{}/_apis/build/definitions/{}/tags/{}",
7089                    self.client.endpoint(),
7090                    &self.organization,
7091                    &self.project,
7092                    &self.definition_id,
7093                    &self.tag
7094                ))?;
7095                let has_api_version_already = url
7096                    .query_pairs()
7097                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7098                if !has_api_version_already {
7099                    url.query_pairs_mut().append_pair(
7100                        azure_core::http::headers::query_param::API_VERSION,
7101                        "7.1-preview",
7102                    );
7103                }
7104                Ok(url)
7105            }
7106        }
7107        impl std::future::IntoFuture for RequestBuilder {
7108            type Output = azure_core::Result<Vec<String>>;
7109            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7110            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7111            #[doc = ""]
7112            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7113            #[doc = ""]
7114            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7115            fn into_future(self) -> Self::IntoFuture {
7116                Box::pin(async move { self.send().await?.into_body().await })
7117            }
7118        }
7119    }
7120    pub mod delete_definition_tag {
7121        use super::models;
7122        #[cfg(not(target_arch = "wasm32"))]
7123        use futures::future::BoxFuture;
7124        #[cfg(target_arch = "wasm32")]
7125        use futures::future::LocalBoxFuture as BoxFuture;
7126        #[derive(Debug)]
7127        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
7128        impl Response {
7129            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
7130                self.0.into_body().await
7131            }
7132            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7133                self.0.into()
7134            }
7135        }
7136        #[derive(Clone)]
7137        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7138        #[doc = r""]
7139        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7140        #[doc = r" parameters can be chained."]
7141        #[doc = r""]
7142        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7143        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7144        #[doc = r" executes the request and returns a `Result` with the parsed"]
7145        #[doc = r" response."]
7146        #[doc = r""]
7147        #[doc = r" If you need lower-level access to the raw response details"]
7148        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7149        #[doc = r" can finalize the request using the"]
7150        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7151        #[doc = r" that resolves to a lower-level [`Response`] value."]
7152        pub struct RequestBuilder {
7153            pub(crate) client: super::super::Client,
7154            pub(crate) organization: String,
7155            pub(crate) project: String,
7156            pub(crate) definition_id: i32,
7157            pub(crate) tag: String,
7158        }
7159        impl RequestBuilder {
7160            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7161            #[doc = ""]
7162            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7163            #[doc = "However, this function can provide more flexibility when required."]
7164            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7165                Box::pin({
7166                    let this = self.clone();
7167                    async move {
7168                        let url = this.url()?;
7169                        let mut req =
7170                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
7171                        if let Some(auth_header) = this
7172                            .client
7173                            .token_credential()
7174                            .http_authorization_header(&this.client.scopes())
7175                            .await?
7176                        {
7177                            req.insert_header(
7178                                azure_core::http::headers::AUTHORIZATION,
7179                                auth_header,
7180                            );
7181                        }
7182                        let req_body = azure_core::Bytes::new();
7183                        req.set_body(req_body);
7184                        Ok(Response(this.client.send(&mut req).await?.into()))
7185                    }
7186                })
7187            }
7188            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7189                let mut url = azure_core::http::Url::parse(&format!(
7190                    "{}/{}/{}/_apis/build/definitions/{}/tags/{}",
7191                    self.client.endpoint(),
7192                    &self.organization,
7193                    &self.project,
7194                    &self.definition_id,
7195                    &self.tag
7196                ))?;
7197                let has_api_version_already = url
7198                    .query_pairs()
7199                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7200                if !has_api_version_already {
7201                    url.query_pairs_mut().append_pair(
7202                        azure_core::http::headers::query_param::API_VERSION,
7203                        "7.1-preview",
7204                    );
7205                }
7206                Ok(url)
7207            }
7208        }
7209        impl std::future::IntoFuture for RequestBuilder {
7210            type Output = azure_core::Result<Vec<String>>;
7211            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7212            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7213            #[doc = ""]
7214            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7215            #[doc = ""]
7216            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7217            fn into_future(self) -> Self::IntoFuture {
7218                Box::pin(async move { self.send().await?.into_body().await })
7219            }
7220        }
7221    }
7222    pub mod get_tags {
7223        use super::models;
7224        #[cfg(not(target_arch = "wasm32"))]
7225        use futures::future::BoxFuture;
7226        #[cfg(target_arch = "wasm32")]
7227        use futures::future::LocalBoxFuture as BoxFuture;
7228        #[derive(Debug)]
7229        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
7230        impl Response {
7231            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
7232                self.0.into_body().await
7233            }
7234            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7235                self.0.into()
7236            }
7237        }
7238        #[derive(Clone)]
7239        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7240        #[doc = r""]
7241        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7242        #[doc = r" parameters can be chained."]
7243        #[doc = r""]
7244        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7245        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7246        #[doc = r" executes the request and returns a `Result` with the parsed"]
7247        #[doc = r" response."]
7248        #[doc = r""]
7249        #[doc = r" If you need lower-level access to the raw response details"]
7250        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7251        #[doc = r" can finalize the request using the"]
7252        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7253        #[doc = r" that resolves to a lower-level [`Response`] value."]
7254        pub struct RequestBuilder {
7255            pub(crate) client: super::super::Client,
7256            pub(crate) organization: String,
7257            pub(crate) project: String,
7258        }
7259        impl RequestBuilder {
7260            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7261            #[doc = ""]
7262            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7263            #[doc = "However, this function can provide more flexibility when required."]
7264            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7265                Box::pin({
7266                    let this = self.clone();
7267                    async move {
7268                        let url = this.url()?;
7269                        let mut req =
7270                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
7271                        if let Some(auth_header) = this
7272                            .client
7273                            .token_credential()
7274                            .http_authorization_header(&this.client.scopes())
7275                            .await?
7276                        {
7277                            req.insert_header(
7278                                azure_core::http::headers::AUTHORIZATION,
7279                                auth_header,
7280                            );
7281                        }
7282                        let req_body = azure_core::Bytes::new();
7283                        req.set_body(req_body);
7284                        Ok(Response(this.client.send(&mut req).await?.into()))
7285                    }
7286                })
7287            }
7288            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7289                let mut url = azure_core::http::Url::parse(&format!(
7290                    "{}/{}/{}/_apis/build/tags",
7291                    self.client.endpoint(),
7292                    &self.organization,
7293                    &self.project
7294                ))?;
7295                let has_api_version_already = url
7296                    .query_pairs()
7297                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7298                if !has_api_version_already {
7299                    url.query_pairs_mut().append_pair(
7300                        azure_core::http::headers::query_param::API_VERSION,
7301                        "7.1-preview",
7302                    );
7303                }
7304                Ok(url)
7305            }
7306        }
7307        impl std::future::IntoFuture for RequestBuilder {
7308            type Output = azure_core::Result<Vec<String>>;
7309            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7310            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7311            #[doc = ""]
7312            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7313            #[doc = ""]
7314            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7315            fn into_future(self) -> Self::IntoFuture {
7316                Box::pin(async move { self.send().await?.into_body().await })
7317            }
7318        }
7319    }
7320    pub mod delete_tag {
7321        use super::models;
7322        #[cfg(not(target_arch = "wasm32"))]
7323        use futures::future::BoxFuture;
7324        #[cfg(target_arch = "wasm32")]
7325        use futures::future::LocalBoxFuture as BoxFuture;
7326        #[derive(Debug)]
7327        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
7328        impl Response {
7329            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
7330                self.0.into_body().await
7331            }
7332            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7333                self.0.into()
7334            }
7335        }
7336        #[derive(Clone)]
7337        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7338        #[doc = r""]
7339        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7340        #[doc = r" parameters can be chained."]
7341        #[doc = r""]
7342        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7343        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7344        #[doc = r" executes the request and returns a `Result` with the parsed"]
7345        #[doc = r" response."]
7346        #[doc = r""]
7347        #[doc = r" If you need lower-level access to the raw response details"]
7348        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7349        #[doc = r" can finalize the request using the"]
7350        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7351        #[doc = r" that resolves to a lower-level [`Response`] value."]
7352        pub struct RequestBuilder {
7353            pub(crate) client: super::super::Client,
7354            pub(crate) organization: String,
7355            pub(crate) project: String,
7356            pub(crate) tag: String,
7357        }
7358        impl RequestBuilder {
7359            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7360            #[doc = ""]
7361            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7362            #[doc = "However, this function can provide more flexibility when required."]
7363            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7364                Box::pin({
7365                    let this = self.clone();
7366                    async move {
7367                        let url = this.url()?;
7368                        let mut req =
7369                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
7370                        if let Some(auth_header) = this
7371                            .client
7372                            .token_credential()
7373                            .http_authorization_header(&this.client.scopes())
7374                            .await?
7375                        {
7376                            req.insert_header(
7377                                azure_core::http::headers::AUTHORIZATION,
7378                                auth_header,
7379                            );
7380                        }
7381                        let req_body = azure_core::Bytes::new();
7382                        req.set_body(req_body);
7383                        Ok(Response(this.client.send(&mut req).await?.into()))
7384                    }
7385                })
7386            }
7387            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7388                let mut url = azure_core::http::Url::parse(&format!(
7389                    "{}/{}/{}/_apis/build/tags/{}",
7390                    self.client.endpoint(),
7391                    &self.organization,
7392                    &self.project,
7393                    &self.tag
7394                ))?;
7395                let has_api_version_already = url
7396                    .query_pairs()
7397                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7398                if !has_api_version_already {
7399                    url.query_pairs_mut().append_pair(
7400                        azure_core::http::headers::query_param::API_VERSION,
7401                        "7.1-preview",
7402                    );
7403                }
7404                Ok(url)
7405            }
7406        }
7407        impl std::future::IntoFuture for RequestBuilder {
7408            type Output = azure_core::Result<Vec<String>>;
7409            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7410            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7411            #[doc = ""]
7412            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7413            #[doc = ""]
7414            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7415            fn into_future(self) -> Self::IntoFuture {
7416                Box::pin(async move { self.send().await?.into_body().await })
7417            }
7418        }
7419    }
7420}
7421pub mod timeline {
7422    use super::models;
7423    #[cfg(not(target_arch = "wasm32"))]
7424    use futures::future::BoxFuture;
7425    #[cfg(target_arch = "wasm32")]
7426    use futures::future::LocalBoxFuture as BoxFuture;
7427    pub struct Client(pub(crate) super::Client);
7428    impl Client {
7429        #[doc = "Gets details for a build"]
7430        #[doc = ""]
7431        #[doc = "Arguments:"]
7432        #[doc = "* `organization`: The name of the Azure DevOps organization."]
7433        #[doc = "* `project`: Project ID or project name"]
7434        pub fn get(
7435            &self,
7436            organization: impl Into<String>,
7437            project: impl Into<String>,
7438            build_id: i32,
7439            timeline_id: impl Into<String>,
7440        ) -> get::RequestBuilder {
7441            get::RequestBuilder {
7442                client: self.0.clone(),
7443                organization: organization.into(),
7444                project: project.into(),
7445                build_id,
7446                timeline_id: timeline_id.into(),
7447                change_id: None,
7448                plan_id: None,
7449            }
7450        }
7451    }
7452    pub mod get {
7453        use super::models;
7454        #[cfg(not(target_arch = "wasm32"))]
7455        use futures::future::BoxFuture;
7456        #[cfg(target_arch = "wasm32")]
7457        use futures::future::LocalBoxFuture as BoxFuture;
7458        #[derive(Debug)]
7459        pub struct Response(
7460            azure_core::http::Response<models::Timeline, azure_core::http::JsonFormat>,
7461        );
7462        impl Response {
7463            pub async fn into_body(self) -> azure_core::Result<models::Timeline> {
7464                self.0.into_body().await
7465            }
7466            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7467                self.0.into()
7468            }
7469        }
7470        #[derive(Clone)]
7471        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7472        #[doc = r""]
7473        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7474        #[doc = r" parameters can be chained."]
7475        #[doc = r""]
7476        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7477        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7478        #[doc = r" executes the request and returns a `Result` with the parsed"]
7479        #[doc = r" response."]
7480        #[doc = r""]
7481        #[doc = r" If you need lower-level access to the raw response details"]
7482        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7483        #[doc = r" can finalize the request using the"]
7484        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7485        #[doc = r" that resolves to a lower-level [`Response`] value."]
7486        pub struct RequestBuilder {
7487            pub(crate) client: super::super::Client,
7488            pub(crate) organization: String,
7489            pub(crate) project: String,
7490            pub(crate) build_id: i32,
7491            pub(crate) timeline_id: String,
7492            pub(crate) change_id: Option<i32>,
7493            pub(crate) plan_id: Option<String>,
7494        }
7495        impl RequestBuilder {
7496            pub fn change_id(mut self, change_id: i32) -> Self {
7497                self.change_id = Some(change_id);
7498                self
7499            }
7500            pub fn plan_id(mut self, plan_id: impl Into<String>) -> Self {
7501                self.plan_id = Some(plan_id.into());
7502                self
7503            }
7504            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7505            #[doc = ""]
7506            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7507            #[doc = "However, this function can provide more flexibility when required."]
7508            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7509                Box::pin({
7510                    let this = self.clone();
7511                    async move {
7512                        let url = this.url()?;
7513                        let mut req =
7514                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
7515                        if let Some(auth_header) = this
7516                            .client
7517                            .token_credential()
7518                            .http_authorization_header(&this.client.scopes())
7519                            .await?
7520                        {
7521                            req.insert_header(
7522                                azure_core::http::headers::AUTHORIZATION,
7523                                auth_header,
7524                            );
7525                        }
7526                        if let Some(change_id) = &this.change_id {
7527                            req.url_mut()
7528                                .query_pairs_mut()
7529                                .append_pair("changeId", &change_id.to_string());
7530                        }
7531                        if let Some(plan_id) = &this.plan_id {
7532                            req.url_mut()
7533                                .query_pairs_mut()
7534                                .append_pair("planId", plan_id);
7535                        }
7536                        let req_body = azure_core::Bytes::new();
7537                        req.set_body(req_body);
7538                        Ok(Response(this.client.send(&mut req).await?.into()))
7539                    }
7540                })
7541            }
7542            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7543                let mut url = azure_core::http::Url::parse(&format!(
7544                    "{}/{}/{}/_apis/build/builds/{}/timeline/{}",
7545                    self.client.endpoint(),
7546                    &self.organization,
7547                    &self.project,
7548                    &self.build_id,
7549                    &self.timeline_id
7550                ))?;
7551                let has_api_version_already = url
7552                    .query_pairs()
7553                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7554                if !has_api_version_already {
7555                    url.query_pairs_mut().append_pair(
7556                        azure_core::http::headers::query_param::API_VERSION,
7557                        "7.1-preview",
7558                    );
7559                }
7560                Ok(url)
7561            }
7562        }
7563        impl std::future::IntoFuture for RequestBuilder {
7564            type Output = azure_core::Result<models::Timeline>;
7565            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Timeline>>;
7566            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7567            #[doc = ""]
7568            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7569            #[doc = ""]
7570            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7571            fn into_future(self) -> Self::IntoFuture {
7572                Box::pin(async move { self.send().await?.into_body().await })
7573            }
7574        }
7575    }
7576}
7577pub mod definitions {
7578    use super::models;
7579    #[cfg(not(target_arch = "wasm32"))]
7580    use futures::future::BoxFuture;
7581    #[cfg(target_arch = "wasm32")]
7582    use futures::future::LocalBoxFuture as BoxFuture;
7583    pub struct Client(pub(crate) super::Client);
7584    impl Client {
7585        #[doc = "Gets a list of definitions."]
7586        #[doc = ""]
7587        #[doc = "Arguments:"]
7588        #[doc = "* `organization`: The name of the Azure DevOps organization."]
7589        #[doc = "* `project`: Project ID or project name"]
7590        pub fn list(
7591            &self,
7592            organization: impl Into<String>,
7593            project: impl Into<String>,
7594        ) -> list::RequestBuilder {
7595            list::RequestBuilder {
7596                client: self.0.clone(),
7597                organization: organization.into(),
7598                project: project.into(),
7599                name: None,
7600                repository_id: None,
7601                repository_type: None,
7602                query_order: None,
7603                top: None,
7604                continuation_token: None,
7605                min_metrics_time: None,
7606                definition_ids: None,
7607                path: None,
7608                built_after: None,
7609                not_built_after: None,
7610                include_all_properties: None,
7611                include_latest_builds: None,
7612                task_id_filter: None,
7613                process_type: None,
7614                yaml_filename: None,
7615            }
7616        }
7617        #[doc = "Creates a new definition."]
7618        #[doc = ""]
7619        #[doc = "Arguments:"]
7620        #[doc = "* `organization`: The name of the Azure DevOps organization."]
7621        #[doc = "* `body`: The definition."]
7622        #[doc = "* `project`: Project ID or project name"]
7623        pub fn create(
7624            &self,
7625            organization: impl Into<String>,
7626            body: impl Into<models::BuildDefinition>,
7627            project: impl Into<String>,
7628        ) -> create::RequestBuilder {
7629            create::RequestBuilder {
7630                client: self.0.clone(),
7631                organization: organization.into(),
7632                body: body.into(),
7633                project: project.into(),
7634                definition_to_clone_id: None,
7635                definition_to_clone_revision: None,
7636            }
7637        }
7638        #[doc = "Gets a definition, optionally at a specific revision."]
7639        #[doc = ""]
7640        #[doc = "Arguments:"]
7641        #[doc = "* `organization`: The name of the Azure DevOps organization."]
7642        #[doc = "* `project`: Project ID or project name"]
7643        #[doc = "* `definition_id`: The ID of the definition."]
7644        pub fn get(
7645            &self,
7646            organization: impl Into<String>,
7647            project: impl Into<String>,
7648            definition_id: i32,
7649        ) -> get::RequestBuilder {
7650            get::RequestBuilder {
7651                client: self.0.clone(),
7652                organization: organization.into(),
7653                project: project.into(),
7654                definition_id,
7655                revision: None,
7656                min_metrics_time: None,
7657                property_filters: None,
7658                include_latest_builds: None,
7659            }
7660        }
7661        #[doc = "Updates an existing build definition.  In order for this operation to succeed, the value of the \"Revision\" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT."]
7662        #[doc = ""]
7663        #[doc = "Arguments:"]
7664        #[doc = "* `organization`: The name of the Azure DevOps organization."]
7665        #[doc = "* `body`: The new version of the definition. Its \"Revision\" property must match the existing definition for the update to be accepted."]
7666        #[doc = "* `project`: Project ID or project name"]
7667        #[doc = "* `definition_id`: The ID of the definition."]
7668        pub fn update(
7669            &self,
7670            organization: impl Into<String>,
7671            body: impl Into<models::BuildDefinition>,
7672            project: impl Into<String>,
7673            definition_id: i32,
7674        ) -> update::RequestBuilder {
7675            update::RequestBuilder {
7676                client: self.0.clone(),
7677                organization: organization.into(),
7678                body: body.into(),
7679                project: project.into(),
7680                definition_id,
7681                secrets_source_definition_id: None,
7682                secrets_source_definition_revision: None,
7683            }
7684        }
7685        #[doc = "Restores a deleted definition"]
7686        #[doc = ""]
7687        #[doc = "Arguments:"]
7688        #[doc = "* `organization`: The name of the Azure DevOps organization."]
7689        #[doc = "* `project`: Project ID or project name"]
7690        #[doc = "* `definition_id`: The identifier of the definition to restore."]
7691        #[doc = "* `deleted`: When false, restores a deleted definition."]
7692        pub fn restore_definition(
7693            &self,
7694            organization: impl Into<String>,
7695            project: impl Into<String>,
7696            definition_id: i32,
7697            deleted: bool,
7698        ) -> restore_definition::RequestBuilder {
7699            restore_definition::RequestBuilder {
7700                client: self.0.clone(),
7701                organization: organization.into(),
7702                project: project.into(),
7703                definition_id,
7704                deleted,
7705            }
7706        }
7707        #[doc = "Deletes a definition and all associated builds."]
7708        #[doc = ""]
7709        #[doc = "Arguments:"]
7710        #[doc = "* `organization`: The name of the Azure DevOps organization."]
7711        #[doc = "* `project`: Project ID or project name"]
7712        #[doc = "* `definition_id`: The ID of the definition."]
7713        pub fn delete(
7714            &self,
7715            organization: impl Into<String>,
7716            project: impl Into<String>,
7717            definition_id: i32,
7718        ) -> delete::RequestBuilder {
7719            delete::RequestBuilder {
7720                client: self.0.clone(),
7721                organization: organization.into(),
7722                project: project.into(),
7723                definition_id,
7724            }
7725        }
7726        #[doc = "Gets all revisions of a definition."]
7727        #[doc = ""]
7728        #[doc = "Arguments:"]
7729        #[doc = "* `organization`: The name of the Azure DevOps organization."]
7730        #[doc = "* `project`: Project ID or project name"]
7731        #[doc = "* `definition_id`: The ID of the definition."]
7732        pub fn get_definition_revisions(
7733            &self,
7734            organization: impl Into<String>,
7735            project: impl Into<String>,
7736            definition_id: i32,
7737        ) -> get_definition_revisions::RequestBuilder {
7738            get_definition_revisions::RequestBuilder {
7739                client: self.0.clone(),
7740                organization: organization.into(),
7741                project: project.into(),
7742                definition_id,
7743            }
7744        }
7745    }
7746    pub mod list {
7747        use super::models;
7748        #[cfg(not(target_arch = "wasm32"))]
7749        use futures::future::BoxFuture;
7750        #[cfg(target_arch = "wasm32")]
7751        use futures::future::LocalBoxFuture as BoxFuture;
7752        #[derive(Debug)]
7753        pub struct Response(
7754            azure_core::http::Response<
7755                models::BuildDefinitionReferenceList,
7756                azure_core::http::JsonFormat,
7757            >,
7758        );
7759        impl Response {
7760            pub async fn into_body(
7761                self,
7762            ) -> azure_core::Result<models::BuildDefinitionReferenceList> {
7763                self.0.into_body().await
7764            }
7765            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7766                self.0.into()
7767            }
7768        }
7769        #[derive(Clone)]
7770        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7771        #[doc = r""]
7772        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7773        #[doc = r" parameters can be chained."]
7774        #[doc = r""]
7775        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7776        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7777        #[doc = r" executes the request and returns a `Result` with the parsed"]
7778        #[doc = r" response."]
7779        #[doc = r""]
7780        #[doc = r" If you need lower-level access to the raw response details"]
7781        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7782        #[doc = r" can finalize the request using the"]
7783        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7784        #[doc = r" that resolves to a lower-level [`Response`] value."]
7785        pub struct RequestBuilder {
7786            pub(crate) client: super::super::Client,
7787            pub(crate) organization: String,
7788            pub(crate) project: String,
7789            pub(crate) name: Option<String>,
7790            pub(crate) repository_id: Option<String>,
7791            pub(crate) repository_type: Option<String>,
7792            pub(crate) query_order: Option<String>,
7793            pub(crate) top: Option<i32>,
7794            pub(crate) continuation_token: Option<String>,
7795            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
7796            pub(crate) definition_ids: Option<String>,
7797            pub(crate) path: Option<String>,
7798            pub(crate) built_after: Option<time::OffsetDateTime>,
7799            pub(crate) not_built_after: Option<time::OffsetDateTime>,
7800            pub(crate) include_all_properties: Option<bool>,
7801            pub(crate) include_latest_builds: Option<bool>,
7802            pub(crate) task_id_filter: Option<String>,
7803            pub(crate) process_type: Option<i32>,
7804            pub(crate) yaml_filename: Option<String>,
7805        }
7806        impl RequestBuilder {
7807            #[doc = "If specified, filters to definitions whose names match this pattern."]
7808            pub fn name(mut self, name: impl Into<String>) -> Self {
7809                self.name = Some(name.into());
7810                self
7811            }
7812            #[doc = "A repository ID. If specified, filters to definitions that use this repository."]
7813            pub fn repository_id(mut self, repository_id: impl Into<String>) -> Self {
7814                self.repository_id = Some(repository_id.into());
7815                self
7816            }
7817            #[doc = "If specified, filters to definitions that have a repository of this type."]
7818            pub fn repository_type(mut self, repository_type: impl Into<String>) -> Self {
7819                self.repository_type = Some(repository_type.into());
7820                self
7821            }
7822            #[doc = "Indicates the order in which definitions should be returned."]
7823            pub fn query_order(mut self, query_order: impl Into<String>) -> Self {
7824                self.query_order = Some(query_order.into());
7825                self
7826            }
7827            #[doc = "The maximum number of definitions to return."]
7828            pub fn top(mut self, top: i32) -> Self {
7829                self.top = Some(top);
7830                self
7831            }
7832            #[doc = "A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions."]
7833            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
7834                self.continuation_token = Some(continuation_token.into());
7835                self
7836            }
7837            #[doc = "If specified, indicates the date from which metrics should be included."]
7838            pub fn min_metrics_time(
7839                mut self,
7840                min_metrics_time: impl Into<time::OffsetDateTime>,
7841            ) -> Self {
7842                self.min_metrics_time = Some(min_metrics_time.into());
7843                self
7844            }
7845            #[doc = "A comma-delimited list that specifies the IDs of definitions to retrieve."]
7846            pub fn definition_ids(mut self, definition_ids: impl Into<String>) -> Self {
7847                self.definition_ids = Some(definition_ids.into());
7848                self
7849            }
7850            #[doc = "If specified, filters to definitions under this folder."]
7851            pub fn path(mut self, path: impl Into<String>) -> Self {
7852                self.path = Some(path.into());
7853                self
7854            }
7855            #[doc = "If specified, filters to definitions that have builds after this date."]
7856            pub fn built_after(mut self, built_after: impl Into<time::OffsetDateTime>) -> Self {
7857                self.built_after = Some(built_after.into());
7858                self
7859            }
7860            #[doc = "If specified, filters to definitions that do not have builds after this date."]
7861            pub fn not_built_after(
7862                mut self,
7863                not_built_after: impl Into<time::OffsetDateTime>,
7864            ) -> Self {
7865                self.not_built_after = Some(not_built_after.into());
7866                self
7867            }
7868            #[doc = "Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned."]
7869            pub fn include_all_properties(mut self, include_all_properties: bool) -> Self {
7870                self.include_all_properties = Some(include_all_properties);
7871                self
7872            }
7873            #[doc = "Indicates whether to return the latest and latest completed builds for this definition."]
7874            pub fn include_latest_builds(mut self, include_latest_builds: bool) -> Self {
7875                self.include_latest_builds = Some(include_latest_builds);
7876                self
7877            }
7878            #[doc = "If specified, filters to definitions that use the specified task."]
7879            pub fn task_id_filter(mut self, task_id_filter: impl Into<String>) -> Self {
7880                self.task_id_filter = Some(task_id_filter.into());
7881                self
7882            }
7883            #[doc = "If specified, filters to definitions with the given process type."]
7884            pub fn process_type(mut self, process_type: i32) -> Self {
7885                self.process_type = Some(process_type);
7886                self
7887            }
7888            #[doc = "If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true"]
7889            pub fn yaml_filename(mut self, yaml_filename: impl Into<String>) -> Self {
7890                self.yaml_filename = Some(yaml_filename.into());
7891                self
7892            }
7893            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7894            #[doc = ""]
7895            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7896            #[doc = "However, this function can provide more flexibility when required."]
7897            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7898                Box::pin({
7899                    let this = self.clone();
7900                    async move {
7901                        let url = this.url()?;
7902                        let mut req =
7903                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
7904                        if let Some(auth_header) = this
7905                            .client
7906                            .token_credential()
7907                            .http_authorization_header(&this.client.scopes())
7908                            .await?
7909                        {
7910                            req.insert_header(
7911                                azure_core::http::headers::AUTHORIZATION,
7912                                auth_header,
7913                            );
7914                        }
7915                        if let Some(name) = &this.name {
7916                            req.url_mut().query_pairs_mut().append_pair("name", name);
7917                        }
7918                        if let Some(repository_id) = &this.repository_id {
7919                            req.url_mut()
7920                                .query_pairs_mut()
7921                                .append_pair("repositoryId", repository_id);
7922                        }
7923                        if let Some(repository_type) = &this.repository_type {
7924                            req.url_mut()
7925                                .query_pairs_mut()
7926                                .append_pair("repositoryType", repository_type);
7927                        }
7928                        if let Some(query_order) = &this.query_order {
7929                            req.url_mut()
7930                                .query_pairs_mut()
7931                                .append_pair("queryOrder", query_order);
7932                        }
7933                        if let Some(top) = &this.top {
7934                            req.url_mut()
7935                                .query_pairs_mut()
7936                                .append_pair("$top", &top.to_string());
7937                        }
7938                        if let Some(continuation_token) = &this.continuation_token {
7939                            req.url_mut()
7940                                .query_pairs_mut()
7941                                .append_pair("continuationToken", continuation_token);
7942                        }
7943                        if let Some(min_metrics_time) = &this.min_metrics_time {
7944                            let formatted_date_time =
7945                                crate::date_time::format_date_time(min_metrics_time)?;
7946                            req.url_mut()
7947                                .query_pairs_mut()
7948                                .append_pair("minMetricsTime", &formatted_date_time);
7949                        }
7950                        if let Some(definition_ids) = &this.definition_ids {
7951                            req.url_mut()
7952                                .query_pairs_mut()
7953                                .append_pair("definitionIds", definition_ids);
7954                        }
7955                        if let Some(path) = &this.path {
7956                            req.url_mut().query_pairs_mut().append_pair("path", path);
7957                        }
7958                        if let Some(built_after) = &this.built_after {
7959                            let formatted_date_time =
7960                                crate::date_time::format_date_time(built_after)?;
7961                            req.url_mut()
7962                                .query_pairs_mut()
7963                                .append_pair("builtAfter", &formatted_date_time);
7964                        }
7965                        if let Some(not_built_after) = &this.not_built_after {
7966                            let formatted_date_time =
7967                                crate::date_time::format_date_time(not_built_after)?;
7968                            req.url_mut()
7969                                .query_pairs_mut()
7970                                .append_pair("notBuiltAfter", &formatted_date_time);
7971                        }
7972                        if let Some(include_all_properties) = &this.include_all_properties {
7973                            req.url_mut().query_pairs_mut().append_pair(
7974                                "includeAllProperties",
7975                                &include_all_properties.to_string(),
7976                            );
7977                        }
7978                        if let Some(include_latest_builds) = &this.include_latest_builds {
7979                            req.url_mut().query_pairs_mut().append_pair(
7980                                "includeLatestBuilds",
7981                                &include_latest_builds.to_string(),
7982                            );
7983                        }
7984                        if let Some(task_id_filter) = &this.task_id_filter {
7985                            req.url_mut()
7986                                .query_pairs_mut()
7987                                .append_pair("taskIdFilter", task_id_filter);
7988                        }
7989                        if let Some(process_type) = &this.process_type {
7990                            req.url_mut()
7991                                .query_pairs_mut()
7992                                .append_pair("processType", &process_type.to_string());
7993                        }
7994                        if let Some(yaml_filename) = &this.yaml_filename {
7995                            req.url_mut()
7996                                .query_pairs_mut()
7997                                .append_pair("yamlFilename", yaml_filename);
7998                        }
7999                        let req_body = azure_core::Bytes::new();
8000                        req.set_body(req_body);
8001                        Ok(Response(this.client.send(&mut req).await?.into()))
8002                    }
8003                })
8004            }
8005            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
8006                let mut url = azure_core::http::Url::parse(&format!(
8007                    "{}/{}/{}/_apis/build/definitions",
8008                    self.client.endpoint(),
8009                    &self.organization,
8010                    &self.project
8011                ))?;
8012                let has_api_version_already = url
8013                    .query_pairs()
8014                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
8015                if !has_api_version_already {
8016                    url.query_pairs_mut().append_pair(
8017                        azure_core::http::headers::query_param::API_VERSION,
8018                        "7.1-preview",
8019                    );
8020                }
8021                Ok(url)
8022            }
8023        }
8024        impl std::future::IntoFuture for RequestBuilder {
8025            type Output = azure_core::Result<models::BuildDefinitionReferenceList>;
8026            type IntoFuture =
8027                BoxFuture<'static, azure_core::Result<models::BuildDefinitionReferenceList>>;
8028            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8029            #[doc = ""]
8030            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8031            #[doc = ""]
8032            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8033            fn into_future(self) -> Self::IntoFuture {
8034                Box::pin(async move { self.send().await?.into_body().await })
8035            }
8036        }
8037    }
8038    pub mod create {
8039        use super::models;
8040        #[cfg(not(target_arch = "wasm32"))]
8041        use futures::future::BoxFuture;
8042        #[cfg(target_arch = "wasm32")]
8043        use futures::future::LocalBoxFuture as BoxFuture;
8044        #[derive(Debug)]
8045        pub struct Response(
8046            azure_core::http::Response<models::BuildDefinition, azure_core::http::JsonFormat>,
8047        );
8048        impl Response {
8049            pub async fn into_body(self) -> azure_core::Result<models::BuildDefinition> {
8050                self.0.into_body().await
8051            }
8052            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
8053                self.0.into()
8054            }
8055        }
8056        #[derive(Clone)]
8057        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8058        #[doc = r""]
8059        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8060        #[doc = r" parameters can be chained."]
8061        #[doc = r""]
8062        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8063        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8064        #[doc = r" executes the request and returns a `Result` with the parsed"]
8065        #[doc = r" response."]
8066        #[doc = r""]
8067        #[doc = r" If you need lower-level access to the raw response details"]
8068        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8069        #[doc = r" can finalize the request using the"]
8070        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8071        #[doc = r" that resolves to a lower-level [`Response`] value."]
8072        pub struct RequestBuilder {
8073            pub(crate) client: super::super::Client,
8074            pub(crate) organization: String,
8075            pub(crate) body: models::BuildDefinition,
8076            pub(crate) project: String,
8077            pub(crate) definition_to_clone_id: Option<i32>,
8078            pub(crate) definition_to_clone_revision: Option<i32>,
8079        }
8080        impl RequestBuilder {
8081            pub fn definition_to_clone_id(mut self, definition_to_clone_id: i32) -> Self {
8082                self.definition_to_clone_id = Some(definition_to_clone_id);
8083                self
8084            }
8085            pub fn definition_to_clone_revision(
8086                mut self,
8087                definition_to_clone_revision: i32,
8088            ) -> Self {
8089                self.definition_to_clone_revision = Some(definition_to_clone_revision);
8090                self
8091            }
8092            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8093            #[doc = ""]
8094            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8095            #[doc = "However, this function can provide more flexibility when required."]
8096            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8097                Box::pin({
8098                    let this = self.clone();
8099                    async move {
8100                        let url = this.url()?;
8101                        let mut req =
8102                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
8103                        if let Some(auth_header) = this
8104                            .client
8105                            .token_credential()
8106                            .http_authorization_header(&this.client.scopes())
8107                            .await?
8108                        {
8109                            req.insert_header(
8110                                azure_core::http::headers::AUTHORIZATION,
8111                                auth_header,
8112                            );
8113                        }
8114                        req.insert_header("content-type", "application/json");
8115                        let req_body = azure_core::json::to_json(&this.body)?;
8116                        if let Some(definition_to_clone_id) = &this.definition_to_clone_id {
8117                            req.url_mut().query_pairs_mut().append_pair(
8118                                "definitionToCloneId",
8119                                &definition_to_clone_id.to_string(),
8120                            );
8121                        }
8122                        if let Some(definition_to_clone_revision) =
8123                            &this.definition_to_clone_revision
8124                        {
8125                            req.url_mut().query_pairs_mut().append_pair(
8126                                "definitionToCloneRevision",
8127                                &definition_to_clone_revision.to_string(),
8128                            );
8129                        }
8130                        req.set_body(req_body);
8131                        Ok(Response(this.client.send(&mut req).await?.into()))
8132                    }
8133                })
8134            }
8135            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
8136                let mut url = azure_core::http::Url::parse(&format!(
8137                    "{}/{}/{}/_apis/build/definitions",
8138                    self.client.endpoint(),
8139                    &self.organization,
8140                    &self.project
8141                ))?;
8142                let has_api_version_already = url
8143                    .query_pairs()
8144                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
8145                if !has_api_version_already {
8146                    url.query_pairs_mut().append_pair(
8147                        azure_core::http::headers::query_param::API_VERSION,
8148                        "7.1-preview",
8149                    );
8150                }
8151                Ok(url)
8152            }
8153        }
8154        impl std::future::IntoFuture for RequestBuilder {
8155            type Output = azure_core::Result<models::BuildDefinition>;
8156            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildDefinition>>;
8157            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8158            #[doc = ""]
8159            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8160            #[doc = ""]
8161            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8162            fn into_future(self) -> Self::IntoFuture {
8163                Box::pin(async move { self.send().await?.into_body().await })
8164            }
8165        }
8166    }
8167    pub mod get {
8168        use super::models;
8169        #[cfg(not(target_arch = "wasm32"))]
8170        use futures::future::BoxFuture;
8171        #[cfg(target_arch = "wasm32")]
8172        use futures::future::LocalBoxFuture as BoxFuture;
8173        #[derive(Debug)]
8174        pub struct Response(
8175            azure_core::http::Response<models::BuildDefinition, azure_core::http::JsonFormat>,
8176        );
8177        impl Response {
8178            pub async fn into_body(self) -> azure_core::Result<models::BuildDefinition> {
8179                self.0.into_body().await
8180            }
8181            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
8182                self.0.into()
8183            }
8184        }
8185        #[derive(Clone)]
8186        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8187        #[doc = r""]
8188        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8189        #[doc = r" parameters can be chained."]
8190        #[doc = r""]
8191        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8192        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8193        #[doc = r" executes the request and returns a `Result` with the parsed"]
8194        #[doc = r" response."]
8195        #[doc = r""]
8196        #[doc = r" If you need lower-level access to the raw response details"]
8197        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8198        #[doc = r" can finalize the request using the"]
8199        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8200        #[doc = r" that resolves to a lower-level [`Response`] value."]
8201        pub struct RequestBuilder {
8202            pub(crate) client: super::super::Client,
8203            pub(crate) organization: String,
8204            pub(crate) project: String,
8205            pub(crate) definition_id: i32,
8206            pub(crate) revision: Option<i32>,
8207            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
8208            pub(crate) property_filters: Option<String>,
8209            pub(crate) include_latest_builds: Option<bool>,
8210        }
8211        impl RequestBuilder {
8212            #[doc = "The revision number to retrieve. If this is not specified, the latest version will be returned."]
8213            pub fn revision(mut self, revision: i32) -> Self {
8214                self.revision = Some(revision);
8215                self
8216            }
8217            #[doc = "If specified, indicates the date from which metrics should be included."]
8218            pub fn min_metrics_time(
8219                mut self,
8220                min_metrics_time: impl Into<time::OffsetDateTime>,
8221            ) -> Self {
8222                self.min_metrics_time = Some(min_metrics_time.into());
8223                self
8224            }
8225            #[doc = "A comma-delimited list of properties to include in the results."]
8226            pub fn property_filters(mut self, property_filters: impl Into<String>) -> Self {
8227                self.property_filters = Some(property_filters.into());
8228                self
8229            }
8230            pub fn include_latest_builds(mut self, include_latest_builds: bool) -> Self {
8231                self.include_latest_builds = Some(include_latest_builds);
8232                self
8233            }
8234            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8235            #[doc = ""]
8236            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8237            #[doc = "However, this function can provide more flexibility when required."]
8238            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8239                Box::pin({
8240                    let this = self.clone();
8241                    async move {
8242                        let url = this.url()?;
8243                        let mut req =
8244                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
8245                        if let Some(auth_header) = this
8246                            .client
8247                            .token_credential()
8248                            .http_authorization_header(&this.client.scopes())
8249                            .await?
8250                        {
8251                            req.insert_header(
8252                                azure_core::http::headers::AUTHORIZATION,
8253                                auth_header,
8254                            );
8255                        }
8256                        if let Some(revision) = &this.revision {
8257                            req.url_mut()
8258                                .query_pairs_mut()
8259                                .append_pair("revision", &revision.to_string());
8260                        }
8261                        if let Some(min_metrics_time) = &this.min_metrics_time {
8262                            let formatted_date_time =
8263                                crate::date_time::format_date_time(min_metrics_time)?;
8264                            req.url_mut()
8265                                .query_pairs_mut()
8266                                .append_pair("minMetricsTime", &formatted_date_time);
8267                        }
8268                        if let Some(property_filters) = &this.property_filters {
8269                            req.url_mut()
8270                                .query_pairs_mut()
8271                                .append_pair("propertyFilters", property_filters);
8272                        }
8273                        if let Some(include_latest_builds) = &this.include_latest_builds {
8274                            req.url_mut().query_pairs_mut().append_pair(
8275                                "includeLatestBuilds",
8276                                &include_latest_builds.to_string(),
8277                            );
8278                        }
8279                        let req_body = azure_core::Bytes::new();
8280                        req.set_body(req_body);
8281                        Ok(Response(this.client.send(&mut req).await?.into()))
8282                    }
8283                })
8284            }
8285            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
8286                let mut url = azure_core::http::Url::parse(&format!(
8287                    "{}/{}/{}/_apis/build/definitions/{}",
8288                    self.client.endpoint(),
8289                    &self.organization,
8290                    &self.project,
8291                    &self.definition_id
8292                ))?;
8293                let has_api_version_already = url
8294                    .query_pairs()
8295                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
8296                if !has_api_version_already {
8297                    url.query_pairs_mut().append_pair(
8298                        azure_core::http::headers::query_param::API_VERSION,
8299                        "7.1-preview",
8300                    );
8301                }
8302                Ok(url)
8303            }
8304        }
8305        impl std::future::IntoFuture for RequestBuilder {
8306            type Output = azure_core::Result<models::BuildDefinition>;
8307            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildDefinition>>;
8308            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8309            #[doc = ""]
8310            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8311            #[doc = ""]
8312            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8313            fn into_future(self) -> Self::IntoFuture {
8314                Box::pin(async move { self.send().await?.into_body().await })
8315            }
8316        }
8317    }
8318    pub mod update {
8319        use super::models;
8320        #[cfg(not(target_arch = "wasm32"))]
8321        use futures::future::BoxFuture;
8322        #[cfg(target_arch = "wasm32")]
8323        use futures::future::LocalBoxFuture as BoxFuture;
8324        #[derive(Debug)]
8325        pub struct Response(
8326            azure_core::http::Response<models::BuildDefinition, azure_core::http::JsonFormat>,
8327        );
8328        impl Response {
8329            pub async fn into_body(self) -> azure_core::Result<models::BuildDefinition> {
8330                self.0.into_body().await
8331            }
8332            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
8333                self.0.into()
8334            }
8335        }
8336        #[derive(Clone)]
8337        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8338        #[doc = r""]
8339        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8340        #[doc = r" parameters can be chained."]
8341        #[doc = r""]
8342        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8343        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8344        #[doc = r" executes the request and returns a `Result` with the parsed"]
8345        #[doc = r" response."]
8346        #[doc = r""]
8347        #[doc = r" If you need lower-level access to the raw response details"]
8348        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8349        #[doc = r" can finalize the request using the"]
8350        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8351        #[doc = r" that resolves to a lower-level [`Response`] value."]
8352        pub struct RequestBuilder {
8353            pub(crate) client: super::super::Client,
8354            pub(crate) organization: String,
8355            pub(crate) body: models::BuildDefinition,
8356            pub(crate) project: String,
8357            pub(crate) definition_id: i32,
8358            pub(crate) secrets_source_definition_id: Option<i32>,
8359            pub(crate) secrets_source_definition_revision: Option<i32>,
8360        }
8361        impl RequestBuilder {
8362            pub fn secrets_source_definition_id(
8363                mut self,
8364                secrets_source_definition_id: i32,
8365            ) -> Self {
8366                self.secrets_source_definition_id = Some(secrets_source_definition_id);
8367                self
8368            }
8369            pub fn secrets_source_definition_revision(
8370                mut self,
8371                secrets_source_definition_revision: i32,
8372            ) -> Self {
8373                self.secrets_source_definition_revision = Some(secrets_source_definition_revision);
8374                self
8375            }
8376            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8377            #[doc = ""]
8378            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8379            #[doc = "However, this function can provide more flexibility when required."]
8380            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8381                Box::pin({
8382                    let this = self.clone();
8383                    async move {
8384                        let url = this.url()?;
8385                        let mut req =
8386                            azure_core::http::Request::new(url, azure_core::http::Method::Put);
8387                        if let Some(auth_header) = this
8388                            .client
8389                            .token_credential()
8390                            .http_authorization_header(&this.client.scopes())
8391                            .await?
8392                        {
8393                            req.insert_header(
8394                                azure_core::http::headers::AUTHORIZATION,
8395                                auth_header,
8396                            );
8397                        }
8398                        req.insert_header("content-type", "application/json");
8399                        let req_body = azure_core::json::to_json(&this.body)?;
8400                        if let Some(secrets_source_definition_id) =
8401                            &this.secrets_source_definition_id
8402                        {
8403                            req.url_mut().query_pairs_mut().append_pair(
8404                                "secretsSourceDefinitionId",
8405                                &secrets_source_definition_id.to_string(),
8406                            );
8407                        }
8408                        if let Some(secrets_source_definition_revision) =
8409                            &this.secrets_source_definition_revision
8410                        {
8411                            req.url_mut().query_pairs_mut().append_pair(
8412                                "secretsSourceDefinitionRevision",
8413                                &secrets_source_definition_revision.to_string(),
8414                            );
8415                        }
8416                        req.set_body(req_body);
8417                        Ok(Response(this.client.send(&mut req).await?.into()))
8418                    }
8419                })
8420            }
8421            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
8422                let mut url = azure_core::http::Url::parse(&format!(
8423                    "{}/{}/{}/_apis/build/definitions/{}",
8424                    self.client.endpoint(),
8425                    &self.organization,
8426                    &self.project,
8427                    &self.definition_id
8428                ))?;
8429                let has_api_version_already = url
8430                    .query_pairs()
8431                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
8432                if !has_api_version_already {
8433                    url.query_pairs_mut().append_pair(
8434                        azure_core::http::headers::query_param::API_VERSION,
8435                        "7.1-preview",
8436                    );
8437                }
8438                Ok(url)
8439            }
8440        }
8441        impl std::future::IntoFuture for RequestBuilder {
8442            type Output = azure_core::Result<models::BuildDefinition>;
8443            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildDefinition>>;
8444            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8445            #[doc = ""]
8446            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8447            #[doc = ""]
8448            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8449            fn into_future(self) -> Self::IntoFuture {
8450                Box::pin(async move { self.send().await?.into_body().await })
8451            }
8452        }
8453    }
8454    pub mod restore_definition {
8455        use super::models;
8456        #[cfg(not(target_arch = "wasm32"))]
8457        use futures::future::BoxFuture;
8458        #[cfg(target_arch = "wasm32")]
8459        use futures::future::LocalBoxFuture as BoxFuture;
8460        #[derive(Debug)]
8461        pub struct Response(
8462            azure_core::http::Response<models::BuildDefinition, azure_core::http::JsonFormat>,
8463        );
8464        impl Response {
8465            pub async fn into_body(self) -> azure_core::Result<models::BuildDefinition> {
8466                self.0.into_body().await
8467            }
8468            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
8469                self.0.into()
8470            }
8471        }
8472        #[derive(Clone)]
8473        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8474        #[doc = r""]
8475        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8476        #[doc = r" parameters can be chained."]
8477        #[doc = r""]
8478        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8479        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8480        #[doc = r" executes the request and returns a `Result` with the parsed"]
8481        #[doc = r" response."]
8482        #[doc = r""]
8483        #[doc = r" If you need lower-level access to the raw response details"]
8484        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8485        #[doc = r" can finalize the request using the"]
8486        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8487        #[doc = r" that resolves to a lower-level [`Response`] value."]
8488        pub struct RequestBuilder {
8489            pub(crate) client: super::super::Client,
8490            pub(crate) organization: String,
8491            pub(crate) project: String,
8492            pub(crate) definition_id: i32,
8493            pub(crate) deleted: bool,
8494        }
8495        impl RequestBuilder {
8496            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8497            #[doc = ""]
8498            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8499            #[doc = "However, this function can provide more flexibility when required."]
8500            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8501                Box::pin({
8502                    let this = self.clone();
8503                    async move {
8504                        let url = this.url()?;
8505                        let mut req =
8506                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
8507                        if let Some(auth_header) = this
8508                            .client
8509                            .token_credential()
8510                            .http_authorization_header(&this.client.scopes())
8511                            .await?
8512                        {
8513                            req.insert_header(
8514                                azure_core::http::headers::AUTHORIZATION,
8515                                auth_header,
8516                            );
8517                        }
8518                        let deleted = &this.deleted;
8519                        req.url_mut()
8520                            .query_pairs_mut()
8521                            .append_pair("deleted", &deleted.to_string());
8522                        let req_body = azure_core::Bytes::new();
8523                        req.set_body(req_body);
8524                        Ok(Response(this.client.send(&mut req).await?.into()))
8525                    }
8526                })
8527            }
8528            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
8529                let mut url = azure_core::http::Url::parse(&format!(
8530                    "{}/{}/{}/_apis/build/definitions/{}",
8531                    self.client.endpoint(),
8532                    &self.organization,
8533                    &self.project,
8534                    &self.definition_id
8535                ))?;
8536                let has_api_version_already = url
8537                    .query_pairs()
8538                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
8539                if !has_api_version_already {
8540                    url.query_pairs_mut().append_pair(
8541                        azure_core::http::headers::query_param::API_VERSION,
8542                        "7.1-preview",
8543                    );
8544                }
8545                Ok(url)
8546            }
8547        }
8548        impl std::future::IntoFuture for RequestBuilder {
8549            type Output = azure_core::Result<models::BuildDefinition>;
8550            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildDefinition>>;
8551            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8552            #[doc = ""]
8553            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8554            #[doc = ""]
8555            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8556            fn into_future(self) -> Self::IntoFuture {
8557                Box::pin(async move { self.send().await?.into_body().await })
8558            }
8559        }
8560    }
8561    pub mod delete {
8562        use super::models;
8563        #[cfg(not(target_arch = "wasm32"))]
8564        use futures::future::BoxFuture;
8565        #[cfg(target_arch = "wasm32")]
8566        use futures::future::LocalBoxFuture as BoxFuture;
8567        #[derive(Debug)]
8568        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
8569        impl Response {
8570            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
8571                self.0.into()
8572            }
8573        }
8574        #[derive(Clone)]
8575        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8576        #[doc = r""]
8577        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8578        #[doc = r" parameters can be chained."]
8579        #[doc = r""]
8580        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8581        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8582        #[doc = r" executes the request and returns a `Result` with the parsed"]
8583        #[doc = r" response."]
8584        #[doc = r""]
8585        #[doc = r" If you need lower-level access to the raw response details"]
8586        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8587        #[doc = r" can finalize the request using the"]
8588        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8589        #[doc = r" that resolves to a lower-level [`Response`] value."]
8590        pub struct RequestBuilder {
8591            pub(crate) client: super::super::Client,
8592            pub(crate) organization: String,
8593            pub(crate) project: String,
8594            pub(crate) definition_id: i32,
8595        }
8596        impl RequestBuilder {
8597            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8598            #[doc = ""]
8599            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8600            #[doc = "However, this function can provide more flexibility when required."]
8601            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8602                Box::pin({
8603                    let this = self.clone();
8604                    async move {
8605                        let url = this.url()?;
8606                        let mut req =
8607                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
8608                        if let Some(auth_header) = this
8609                            .client
8610                            .token_credential()
8611                            .http_authorization_header(&this.client.scopes())
8612                            .await?
8613                        {
8614                            req.insert_header(
8615                                azure_core::http::headers::AUTHORIZATION,
8616                                auth_header,
8617                            );
8618                        }
8619                        let req_body = azure_core::Bytes::new();
8620                        req.set_body(req_body);
8621                        Ok(Response(this.client.send(&mut req).await?.into()))
8622                    }
8623                })
8624            }
8625            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
8626                let mut url = azure_core::http::Url::parse(&format!(
8627                    "{}/{}/{}/_apis/build/definitions/{}",
8628                    self.client.endpoint(),
8629                    &self.organization,
8630                    &self.project,
8631                    &self.definition_id
8632                ))?;
8633                let has_api_version_already = url
8634                    .query_pairs()
8635                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
8636                if !has_api_version_already {
8637                    url.query_pairs_mut().append_pair(
8638                        azure_core::http::headers::query_param::API_VERSION,
8639                        "7.1-preview",
8640                    );
8641                }
8642                Ok(url)
8643            }
8644        }
8645        impl std::future::IntoFuture for RequestBuilder {
8646            type Output = azure_core::Result<()>;
8647            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
8648            #[doc = "Returns a future that sends the request and waits for the response."]
8649            #[doc = ""]
8650            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8651            #[doc = ""]
8652            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8653            fn into_future(self) -> Self::IntoFuture {
8654                Box::pin(async move {
8655                    let _rsp = self.send().await?;
8656                    Ok(())
8657                })
8658            }
8659        }
8660    }
8661    pub mod get_definition_revisions {
8662        use super::models;
8663        #[cfg(not(target_arch = "wasm32"))]
8664        use futures::future::BoxFuture;
8665        #[cfg(target_arch = "wasm32")]
8666        use futures::future::LocalBoxFuture as BoxFuture;
8667        #[derive(Debug)]
8668        pub struct Response(
8669            azure_core::http::Response<
8670                models::BuildDefinitionRevisionList,
8671                azure_core::http::JsonFormat,
8672            >,
8673        );
8674        impl Response {
8675            pub async fn into_body(
8676                self,
8677            ) -> azure_core::Result<models::BuildDefinitionRevisionList> {
8678                self.0.into_body().await
8679            }
8680            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
8681                self.0.into()
8682            }
8683        }
8684        #[derive(Clone)]
8685        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8686        #[doc = r""]
8687        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8688        #[doc = r" parameters can be chained."]
8689        #[doc = r""]
8690        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8691        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8692        #[doc = r" executes the request and returns a `Result` with the parsed"]
8693        #[doc = r" response."]
8694        #[doc = r""]
8695        #[doc = r" If you need lower-level access to the raw response details"]
8696        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8697        #[doc = r" can finalize the request using the"]
8698        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8699        #[doc = r" that resolves to a lower-level [`Response`] value."]
8700        pub struct RequestBuilder {
8701            pub(crate) client: super::super::Client,
8702            pub(crate) organization: String,
8703            pub(crate) project: String,
8704            pub(crate) definition_id: i32,
8705        }
8706        impl RequestBuilder {
8707            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8708            #[doc = ""]
8709            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8710            #[doc = "However, this function can provide more flexibility when required."]
8711            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8712                Box::pin({
8713                    let this = self.clone();
8714                    async move {
8715                        let url = this.url()?;
8716                        let mut req =
8717                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
8718                        if let Some(auth_header) = this
8719                            .client
8720                            .token_credential()
8721                            .http_authorization_header(&this.client.scopes())
8722                            .await?
8723                        {
8724                            req.insert_header(
8725                                azure_core::http::headers::AUTHORIZATION,
8726                                auth_header,
8727                            );
8728                        }
8729                        let req_body = azure_core::Bytes::new();
8730                        req.set_body(req_body);
8731                        Ok(Response(this.client.send(&mut req).await?.into()))
8732                    }
8733                })
8734            }
8735            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
8736                let mut url = azure_core::http::Url::parse(&format!(
8737                    "{}/{}/{}/_apis/build/definitions/{}/revisions",
8738                    self.client.endpoint(),
8739                    &self.organization,
8740                    &self.project,
8741                    &self.definition_id
8742                ))?;
8743                let has_api_version_already = url
8744                    .query_pairs()
8745                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
8746                if !has_api_version_already {
8747                    url.query_pairs_mut().append_pair(
8748                        azure_core::http::headers::query_param::API_VERSION,
8749                        "7.1-preview",
8750                    );
8751                }
8752                Ok(url)
8753            }
8754        }
8755        impl std::future::IntoFuture for RequestBuilder {
8756            type Output = azure_core::Result<models::BuildDefinitionRevisionList>;
8757            type IntoFuture =
8758                BoxFuture<'static, azure_core::Result<models::BuildDefinitionRevisionList>>;
8759            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8760            #[doc = ""]
8761            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8762            #[doc = ""]
8763            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8764            fn into_future(self) -> Self::IntoFuture {
8765                Box::pin(async move { self.send().await?.into_body().await })
8766            }
8767        }
8768    }
8769}
8770pub mod metrics {
8771    use super::models;
8772    #[cfg(not(target_arch = "wasm32"))]
8773    use futures::future::BoxFuture;
8774    #[cfg(target_arch = "wasm32")]
8775    use futures::future::LocalBoxFuture as BoxFuture;
8776    pub struct Client(pub(crate) super::Client);
8777    impl Client {
8778        #[doc = "Gets build metrics for a definition."]
8779        #[doc = ""]
8780        #[doc = "Arguments:"]
8781        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8782        #[doc = "* `project`: Project ID or project name"]
8783        #[doc = "* `definition_id`: The ID of the definition."]
8784        pub fn get_definition_metrics(
8785            &self,
8786            organization: impl Into<String>,
8787            project: impl Into<String>,
8788            definition_id: i32,
8789        ) -> get_definition_metrics::RequestBuilder {
8790            get_definition_metrics::RequestBuilder {
8791                client: self.0.clone(),
8792                organization: organization.into(),
8793                project: project.into(),
8794                definition_id,
8795                min_metrics_time: None,
8796            }
8797        }
8798        #[doc = "Gets build metrics for a project."]
8799        #[doc = ""]
8800        #[doc = "Arguments:"]
8801        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8802        #[doc = "* `project`: Project ID or project name"]
8803        #[doc = "* `metric_aggregation_type`: The aggregation type to use (hourly, daily)."]
8804        pub fn get_project_metrics(
8805            &self,
8806            organization: impl Into<String>,
8807            project: impl Into<String>,
8808            metric_aggregation_type: impl Into<String>,
8809        ) -> get_project_metrics::RequestBuilder {
8810            get_project_metrics::RequestBuilder {
8811                client: self.0.clone(),
8812                organization: organization.into(),
8813                project: project.into(),
8814                metric_aggregation_type: metric_aggregation_type.into(),
8815                min_metrics_time: None,
8816            }
8817        }
8818    }
8819    pub mod get_definition_metrics {
8820        use super::models;
8821        #[cfg(not(target_arch = "wasm32"))]
8822        use futures::future::BoxFuture;
8823        #[cfg(target_arch = "wasm32")]
8824        use futures::future::LocalBoxFuture as BoxFuture;
8825        #[derive(Debug)]
8826        pub struct Response(
8827            azure_core::http::Response<models::BuildMetricList, azure_core::http::JsonFormat>,
8828        );
8829        impl Response {
8830            pub async fn into_body(self) -> azure_core::Result<models::BuildMetricList> {
8831                self.0.into_body().await
8832            }
8833            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
8834                self.0.into()
8835            }
8836        }
8837        #[derive(Clone)]
8838        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8839        #[doc = r""]
8840        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8841        #[doc = r" parameters can be chained."]
8842        #[doc = r""]
8843        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8844        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8845        #[doc = r" executes the request and returns a `Result` with the parsed"]
8846        #[doc = r" response."]
8847        #[doc = r""]
8848        #[doc = r" If you need lower-level access to the raw response details"]
8849        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8850        #[doc = r" can finalize the request using the"]
8851        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8852        #[doc = r" that resolves to a lower-level [`Response`] value."]
8853        pub struct RequestBuilder {
8854            pub(crate) client: super::super::Client,
8855            pub(crate) organization: String,
8856            pub(crate) project: String,
8857            pub(crate) definition_id: i32,
8858            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
8859        }
8860        impl RequestBuilder {
8861            #[doc = "The date from which to calculate metrics."]
8862            pub fn min_metrics_time(
8863                mut self,
8864                min_metrics_time: impl Into<time::OffsetDateTime>,
8865            ) -> Self {
8866                self.min_metrics_time = Some(min_metrics_time.into());
8867                self
8868            }
8869            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8870            #[doc = ""]
8871            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8872            #[doc = "However, this function can provide more flexibility when required."]
8873            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8874                Box::pin({
8875                    let this = self.clone();
8876                    async move {
8877                        let url = this.url()?;
8878                        let mut req =
8879                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
8880                        if let Some(auth_header) = this
8881                            .client
8882                            .token_credential()
8883                            .http_authorization_header(&this.client.scopes())
8884                            .await?
8885                        {
8886                            req.insert_header(
8887                                azure_core::http::headers::AUTHORIZATION,
8888                                auth_header,
8889                            );
8890                        }
8891                        if let Some(min_metrics_time) = &this.min_metrics_time {
8892                            let formatted_date_time =
8893                                crate::date_time::format_date_time(min_metrics_time)?;
8894                            req.url_mut()
8895                                .query_pairs_mut()
8896                                .append_pair("minMetricsTime", &formatted_date_time);
8897                        }
8898                        let req_body = azure_core::Bytes::new();
8899                        req.set_body(req_body);
8900                        Ok(Response(this.client.send(&mut req).await?.into()))
8901                    }
8902                })
8903            }
8904            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
8905                let mut url = azure_core::http::Url::parse(&format!(
8906                    "{}/{}/{}/_apis/build/definitions/{}/metrics",
8907                    self.client.endpoint(),
8908                    &self.organization,
8909                    &self.project,
8910                    &self.definition_id
8911                ))?;
8912                let has_api_version_already = url
8913                    .query_pairs()
8914                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
8915                if !has_api_version_already {
8916                    url.query_pairs_mut().append_pair(
8917                        azure_core::http::headers::query_param::API_VERSION,
8918                        "7.1-preview",
8919                    );
8920                }
8921                Ok(url)
8922            }
8923        }
8924        impl std::future::IntoFuture for RequestBuilder {
8925            type Output = azure_core::Result<models::BuildMetricList>;
8926            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildMetricList>>;
8927            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8928            #[doc = ""]
8929            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8930            #[doc = ""]
8931            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8932            fn into_future(self) -> Self::IntoFuture {
8933                Box::pin(async move { self.send().await?.into_body().await })
8934            }
8935        }
8936    }
8937    pub mod get_project_metrics {
8938        use super::models;
8939        #[cfg(not(target_arch = "wasm32"))]
8940        use futures::future::BoxFuture;
8941        #[cfg(target_arch = "wasm32")]
8942        use futures::future::LocalBoxFuture as BoxFuture;
8943        #[derive(Debug)]
8944        pub struct Response(
8945            azure_core::http::Response<models::BuildMetricList, azure_core::http::JsonFormat>,
8946        );
8947        impl Response {
8948            pub async fn into_body(self) -> azure_core::Result<models::BuildMetricList> {
8949                self.0.into_body().await
8950            }
8951            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
8952                self.0.into()
8953            }
8954        }
8955        #[derive(Clone)]
8956        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8957        #[doc = r""]
8958        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8959        #[doc = r" parameters can be chained."]
8960        #[doc = r""]
8961        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8962        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8963        #[doc = r" executes the request and returns a `Result` with the parsed"]
8964        #[doc = r" response."]
8965        #[doc = r""]
8966        #[doc = r" If you need lower-level access to the raw response details"]
8967        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8968        #[doc = r" can finalize the request using the"]
8969        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8970        #[doc = r" that resolves to a lower-level [`Response`] value."]
8971        pub struct RequestBuilder {
8972            pub(crate) client: super::super::Client,
8973            pub(crate) organization: String,
8974            pub(crate) project: String,
8975            pub(crate) metric_aggregation_type: String,
8976            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
8977        }
8978        impl RequestBuilder {
8979            #[doc = "The date from which to calculate metrics."]
8980            pub fn min_metrics_time(
8981                mut self,
8982                min_metrics_time: impl Into<time::OffsetDateTime>,
8983            ) -> Self {
8984                self.min_metrics_time = Some(min_metrics_time.into());
8985                self
8986            }
8987            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8988            #[doc = ""]
8989            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8990            #[doc = "However, this function can provide more flexibility when required."]
8991            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8992                Box::pin({
8993                    let this = self.clone();
8994                    async move {
8995                        let url = this.url()?;
8996                        let mut req =
8997                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
8998                        if let Some(auth_header) = this
8999                            .client
9000                            .token_credential()
9001                            .http_authorization_header(&this.client.scopes())
9002                            .await?
9003                        {
9004                            req.insert_header(
9005                                azure_core::http::headers::AUTHORIZATION,
9006                                auth_header,
9007                            );
9008                        }
9009                        if let Some(min_metrics_time) = &this.min_metrics_time {
9010                            let formatted_date_time =
9011                                crate::date_time::format_date_time(min_metrics_time)?;
9012                            req.url_mut()
9013                                .query_pairs_mut()
9014                                .append_pair("minMetricsTime", &formatted_date_time);
9015                        }
9016                        let req_body = azure_core::Bytes::new();
9017                        req.set_body(req_body);
9018                        Ok(Response(this.client.send(&mut req).await?.into()))
9019                    }
9020                })
9021            }
9022            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
9023                let mut url = azure_core::http::Url::parse(&format!(
9024                    "{}/{}/{}/_apis/build/metrics/{}",
9025                    self.client.endpoint(),
9026                    &self.organization,
9027                    &self.project,
9028                    &self.metric_aggregation_type
9029                ))?;
9030                let has_api_version_already = url
9031                    .query_pairs()
9032                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
9033                if !has_api_version_already {
9034                    url.query_pairs_mut().append_pair(
9035                        azure_core::http::headers::query_param::API_VERSION,
9036                        "7.1-preview",
9037                    );
9038                }
9039                Ok(url)
9040            }
9041        }
9042        impl std::future::IntoFuture for RequestBuilder {
9043            type Output = azure_core::Result<models::BuildMetricList>;
9044            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildMetricList>>;
9045            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9046            #[doc = ""]
9047            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9048            #[doc = ""]
9049            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9050            fn into_future(self) -> Self::IntoFuture {
9051                Box::pin(async move { self.send().await?.into_body().await })
9052            }
9053        }
9054    }
9055}
9056pub mod resources {
9057    use super::models;
9058    #[cfg(not(target_arch = "wasm32"))]
9059    use futures::future::BoxFuture;
9060    #[cfg(target_arch = "wasm32")]
9061    use futures::future::LocalBoxFuture as BoxFuture;
9062    pub struct Client(pub(crate) super::Client);
9063    impl Client {
9064        #[doc = "Arguments:"]
9065        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9066        #[doc = "* `project`: Project ID or project name"]
9067        pub fn list(
9068            &self,
9069            organization: impl Into<String>,
9070            project: impl Into<String>,
9071            definition_id: i32,
9072        ) -> list::RequestBuilder {
9073            list::RequestBuilder {
9074                client: self.0.clone(),
9075                organization: organization.into(),
9076                project: project.into(),
9077                definition_id,
9078            }
9079        }
9080        #[doc = "Arguments:"]
9081        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9082        #[doc = "* `project`: Project ID or project name"]
9083        pub fn authorize_definition_resources(
9084            &self,
9085            organization: impl Into<String>,
9086            body: Vec<models::DefinitionResourceReference>,
9087            project: impl Into<String>,
9088            definition_id: i32,
9089        ) -> authorize_definition_resources::RequestBuilder {
9090            authorize_definition_resources::RequestBuilder {
9091                client: self.0.clone(),
9092                organization: organization.into(),
9093                body,
9094                project: project.into(),
9095                definition_id,
9096            }
9097        }
9098    }
9099    pub mod list {
9100        use super::models;
9101        #[cfg(not(target_arch = "wasm32"))]
9102        use futures::future::BoxFuture;
9103        #[cfg(target_arch = "wasm32")]
9104        use futures::future::LocalBoxFuture as BoxFuture;
9105        #[derive(Debug)]
9106        pub struct Response(
9107            azure_core::http::Response<
9108                models::DefinitionResourceReferenceList,
9109                azure_core::http::JsonFormat,
9110            >,
9111        );
9112        impl Response {
9113            pub async fn into_body(
9114                self,
9115            ) -> azure_core::Result<models::DefinitionResourceReferenceList> {
9116                self.0.into_body().await
9117            }
9118            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
9119                self.0.into()
9120            }
9121        }
9122        #[derive(Clone)]
9123        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9124        #[doc = r""]
9125        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9126        #[doc = r" parameters can be chained."]
9127        #[doc = r""]
9128        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9129        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9130        #[doc = r" executes the request and returns a `Result` with the parsed"]
9131        #[doc = r" response."]
9132        #[doc = r""]
9133        #[doc = r" If you need lower-level access to the raw response details"]
9134        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9135        #[doc = r" can finalize the request using the"]
9136        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9137        #[doc = r" that resolves to a lower-level [`Response`] value."]
9138        pub struct RequestBuilder {
9139            pub(crate) client: super::super::Client,
9140            pub(crate) organization: String,
9141            pub(crate) project: String,
9142            pub(crate) definition_id: i32,
9143        }
9144        impl RequestBuilder {
9145            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9146            #[doc = ""]
9147            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9148            #[doc = "However, this function can provide more flexibility when required."]
9149            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9150                Box::pin({
9151                    let this = self.clone();
9152                    async move {
9153                        let url = this.url()?;
9154                        let mut req =
9155                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
9156                        if let Some(auth_header) = this
9157                            .client
9158                            .token_credential()
9159                            .http_authorization_header(&this.client.scopes())
9160                            .await?
9161                        {
9162                            req.insert_header(
9163                                azure_core::http::headers::AUTHORIZATION,
9164                                auth_header,
9165                            );
9166                        }
9167                        let req_body = azure_core::Bytes::new();
9168                        req.set_body(req_body);
9169                        Ok(Response(this.client.send(&mut req).await?.into()))
9170                    }
9171                })
9172            }
9173            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
9174                let mut url = azure_core::http::Url::parse(&format!(
9175                    "{}/{}/{}/_apis/build/definitions/{}/resources",
9176                    self.client.endpoint(),
9177                    &self.organization,
9178                    &self.project,
9179                    &self.definition_id
9180                ))?;
9181                let has_api_version_already = url
9182                    .query_pairs()
9183                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
9184                if !has_api_version_already {
9185                    url.query_pairs_mut().append_pair(
9186                        azure_core::http::headers::query_param::API_VERSION,
9187                        "7.1-preview",
9188                    );
9189                }
9190                Ok(url)
9191            }
9192        }
9193        impl std::future::IntoFuture for RequestBuilder {
9194            type Output = azure_core::Result<models::DefinitionResourceReferenceList>;
9195            type IntoFuture =
9196                BoxFuture<'static, azure_core::Result<models::DefinitionResourceReferenceList>>;
9197            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9198            #[doc = ""]
9199            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9200            #[doc = ""]
9201            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9202            fn into_future(self) -> Self::IntoFuture {
9203                Box::pin(async move { self.send().await?.into_body().await })
9204            }
9205        }
9206    }
9207    pub mod authorize_definition_resources {
9208        use super::models;
9209        #[cfg(not(target_arch = "wasm32"))]
9210        use futures::future::BoxFuture;
9211        #[cfg(target_arch = "wasm32")]
9212        use futures::future::LocalBoxFuture as BoxFuture;
9213        #[derive(Debug)]
9214        pub struct Response(
9215            azure_core::http::Response<
9216                models::DefinitionResourceReferenceList,
9217                azure_core::http::JsonFormat,
9218            >,
9219        );
9220        impl Response {
9221            pub async fn into_body(
9222                self,
9223            ) -> azure_core::Result<models::DefinitionResourceReferenceList> {
9224                self.0.into_body().await
9225            }
9226            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
9227                self.0.into()
9228            }
9229        }
9230        #[derive(Clone)]
9231        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9232        #[doc = r""]
9233        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9234        #[doc = r" parameters can be chained."]
9235        #[doc = r""]
9236        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9237        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9238        #[doc = r" executes the request and returns a `Result` with the parsed"]
9239        #[doc = r" response."]
9240        #[doc = r""]
9241        #[doc = r" If you need lower-level access to the raw response details"]
9242        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9243        #[doc = r" can finalize the request using the"]
9244        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9245        #[doc = r" that resolves to a lower-level [`Response`] value."]
9246        pub struct RequestBuilder {
9247            pub(crate) client: super::super::Client,
9248            pub(crate) organization: String,
9249            pub(crate) body: Vec<models::DefinitionResourceReference>,
9250            pub(crate) project: String,
9251            pub(crate) definition_id: i32,
9252        }
9253        impl RequestBuilder {
9254            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9255            #[doc = ""]
9256            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9257            #[doc = "However, this function can provide more flexibility when required."]
9258            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9259                Box::pin({
9260                    let this = self.clone();
9261                    async move {
9262                        let url = this.url()?;
9263                        let mut req =
9264                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
9265                        if let Some(auth_header) = this
9266                            .client
9267                            .token_credential()
9268                            .http_authorization_header(&this.client.scopes())
9269                            .await?
9270                        {
9271                            req.insert_header(
9272                                azure_core::http::headers::AUTHORIZATION,
9273                                auth_header,
9274                            );
9275                        }
9276                        req.insert_header("content-type", "application/json");
9277                        let req_body = azure_core::json::to_json(&this.body)?;
9278                        req.set_body(req_body);
9279                        Ok(Response(this.client.send(&mut req).await?.into()))
9280                    }
9281                })
9282            }
9283            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
9284                let mut url = azure_core::http::Url::parse(&format!(
9285                    "{}/{}/{}/_apis/build/definitions/{}/resources",
9286                    self.client.endpoint(),
9287                    &self.organization,
9288                    &self.project,
9289                    &self.definition_id
9290                ))?;
9291                let has_api_version_already = url
9292                    .query_pairs()
9293                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
9294                if !has_api_version_already {
9295                    url.query_pairs_mut().append_pair(
9296                        azure_core::http::headers::query_param::API_VERSION,
9297                        "7.1-preview",
9298                    );
9299                }
9300                Ok(url)
9301            }
9302        }
9303        impl std::future::IntoFuture for RequestBuilder {
9304            type Output = azure_core::Result<models::DefinitionResourceReferenceList>;
9305            type IntoFuture =
9306                BoxFuture<'static, azure_core::Result<models::DefinitionResourceReferenceList>>;
9307            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9308            #[doc = ""]
9309            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9310            #[doc = ""]
9311            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9312            fn into_future(self) -> Self::IntoFuture {
9313                Box::pin(async move { self.send().await?.into_body().await })
9314            }
9315        }
9316    }
9317}
9318pub mod yaml {
9319    use super::models;
9320    #[cfg(not(target_arch = "wasm32"))]
9321    use futures::future::BoxFuture;
9322    #[cfg(target_arch = "wasm32")]
9323    use futures::future::LocalBoxFuture as BoxFuture;
9324    pub struct Client(pub(crate) super::Client);
9325    impl Client {
9326        #[doc = "Converts a definition to YAML, optionally at a specific revision."]
9327        #[doc = ""]
9328        #[doc = "Arguments:"]
9329        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9330        #[doc = "* `project`: Project ID or project name"]
9331        #[doc = "* `definition_id`: The ID of the definition."]
9332        pub fn get(
9333            &self,
9334            organization: impl Into<String>,
9335            project: impl Into<String>,
9336            definition_id: i32,
9337        ) -> get::RequestBuilder {
9338            get::RequestBuilder {
9339                client: self.0.clone(),
9340                organization: organization.into(),
9341                project: project.into(),
9342                definition_id,
9343                revision: None,
9344                min_metrics_time: None,
9345                property_filters: None,
9346                include_latest_builds: None,
9347            }
9348        }
9349    }
9350    pub mod get {
9351        use super::models;
9352        #[cfg(not(target_arch = "wasm32"))]
9353        use futures::future::BoxFuture;
9354        #[cfg(target_arch = "wasm32")]
9355        use futures::future::LocalBoxFuture as BoxFuture;
9356        #[derive(Debug)]
9357        pub struct Response(
9358            azure_core::http::Response<models::YamlBuild, azure_core::http::JsonFormat>,
9359        );
9360        impl Response {
9361            pub async fn into_body(self) -> azure_core::Result<models::YamlBuild> {
9362                self.0.into_body().await
9363            }
9364            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
9365                self.0.into()
9366            }
9367        }
9368        #[derive(Clone)]
9369        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9370        #[doc = r""]
9371        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9372        #[doc = r" parameters can be chained."]
9373        #[doc = r""]
9374        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9375        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9376        #[doc = r" executes the request and returns a `Result` with the parsed"]
9377        #[doc = r" response."]
9378        #[doc = r""]
9379        #[doc = r" If you need lower-level access to the raw response details"]
9380        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9381        #[doc = r" can finalize the request using the"]
9382        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9383        #[doc = r" that resolves to a lower-level [`Response`] value."]
9384        pub struct RequestBuilder {
9385            pub(crate) client: super::super::Client,
9386            pub(crate) organization: String,
9387            pub(crate) project: String,
9388            pub(crate) definition_id: i32,
9389            pub(crate) revision: Option<i32>,
9390            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
9391            pub(crate) property_filters: Option<String>,
9392            pub(crate) include_latest_builds: Option<bool>,
9393        }
9394        impl RequestBuilder {
9395            #[doc = "The revision number to retrieve. If this is not specified, the latest version will be returned."]
9396            pub fn revision(mut self, revision: i32) -> Self {
9397                self.revision = Some(revision);
9398                self
9399            }
9400            #[doc = "If specified, indicates the date from which metrics should be included."]
9401            pub fn min_metrics_time(
9402                mut self,
9403                min_metrics_time: impl Into<time::OffsetDateTime>,
9404            ) -> Self {
9405                self.min_metrics_time = Some(min_metrics_time.into());
9406                self
9407            }
9408            #[doc = "A comma-delimited list of properties to include in the results."]
9409            pub fn property_filters(mut self, property_filters: impl Into<String>) -> Self {
9410                self.property_filters = Some(property_filters.into());
9411                self
9412            }
9413            pub fn include_latest_builds(mut self, include_latest_builds: bool) -> Self {
9414                self.include_latest_builds = Some(include_latest_builds);
9415                self
9416            }
9417            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9418            #[doc = ""]
9419            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9420            #[doc = "However, this function can provide more flexibility when required."]
9421            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9422                Box::pin({
9423                    let this = self.clone();
9424                    async move {
9425                        let url = this.url()?;
9426                        let mut req =
9427                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
9428                        if let Some(auth_header) = this
9429                            .client
9430                            .token_credential()
9431                            .http_authorization_header(&this.client.scopes())
9432                            .await?
9433                        {
9434                            req.insert_header(
9435                                azure_core::http::headers::AUTHORIZATION,
9436                                auth_header,
9437                            );
9438                        }
9439                        if let Some(revision) = &this.revision {
9440                            req.url_mut()
9441                                .query_pairs_mut()
9442                                .append_pair("revision", &revision.to_string());
9443                        }
9444                        if let Some(min_metrics_time) = &this.min_metrics_time {
9445                            let formatted_date_time =
9446                                crate::date_time::format_date_time(min_metrics_time)?;
9447                            req.url_mut()
9448                                .query_pairs_mut()
9449                                .append_pair("minMetricsTime", &formatted_date_time);
9450                        }
9451                        if let Some(property_filters) = &this.property_filters {
9452                            req.url_mut()
9453                                .query_pairs_mut()
9454                                .append_pair("propertyFilters", property_filters);
9455                        }
9456                        if let Some(include_latest_builds) = &this.include_latest_builds {
9457                            req.url_mut().query_pairs_mut().append_pair(
9458                                "includeLatestBuilds",
9459                                &include_latest_builds.to_string(),
9460                            );
9461                        }
9462                        let req_body = azure_core::Bytes::new();
9463                        req.set_body(req_body);
9464                        Ok(Response(this.client.send(&mut req).await?.into()))
9465                    }
9466                })
9467            }
9468            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
9469                let mut url = azure_core::http::Url::parse(&format!(
9470                    "{}/{}/{}/_apis/build/definitions/{}/yaml",
9471                    self.client.endpoint(),
9472                    &self.organization,
9473                    &self.project,
9474                    &self.definition_id
9475                ))?;
9476                let has_api_version_already = url
9477                    .query_pairs()
9478                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
9479                if !has_api_version_already {
9480                    url.query_pairs_mut().append_pair(
9481                        azure_core::http::headers::query_param::API_VERSION,
9482                        "7.1-preview",
9483                    );
9484                }
9485                Ok(url)
9486            }
9487        }
9488        impl std::future::IntoFuture for RequestBuilder {
9489            type Output = azure_core::Result<models::YamlBuild>;
9490            type IntoFuture = BoxFuture<'static, azure_core::Result<models::YamlBuild>>;
9491            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9492            #[doc = ""]
9493            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9494            #[doc = ""]
9495            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9496            fn into_future(self) -> Self::IntoFuture {
9497                Box::pin(async move { self.send().await?.into_body().await })
9498            }
9499        }
9500    }
9501}
9502pub mod templates {
9503    use super::models;
9504    #[cfg(not(target_arch = "wasm32"))]
9505    use futures::future::BoxFuture;
9506    #[cfg(target_arch = "wasm32")]
9507    use futures::future::LocalBoxFuture as BoxFuture;
9508    pub struct Client(pub(crate) super::Client);
9509    impl Client {
9510        #[doc = "Gets all definition templates."]
9511        #[doc = ""]
9512        #[doc = "Arguments:"]
9513        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9514        #[doc = "* `project`: Project ID or project name"]
9515        pub fn list(
9516            &self,
9517            organization: impl Into<String>,
9518            project: impl Into<String>,
9519        ) -> list::RequestBuilder {
9520            list::RequestBuilder {
9521                client: self.0.clone(),
9522                organization: organization.into(),
9523                project: project.into(),
9524            }
9525        }
9526        #[doc = "Gets a specific build definition template."]
9527        #[doc = ""]
9528        #[doc = "Arguments:"]
9529        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9530        #[doc = "* `project`: Project ID or project name"]
9531        #[doc = "* `template_id`: The ID of the requested template."]
9532        pub fn get(
9533            &self,
9534            organization: impl Into<String>,
9535            project: impl Into<String>,
9536            template_id: impl Into<String>,
9537        ) -> get::RequestBuilder {
9538            get::RequestBuilder {
9539                client: self.0.clone(),
9540                organization: organization.into(),
9541                project: project.into(),
9542                template_id: template_id.into(),
9543            }
9544        }
9545        #[doc = "Updates an existing build definition template."]
9546        #[doc = ""]
9547        #[doc = "Arguments:"]
9548        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9549        #[doc = "* `body`: The new version of the template."]
9550        #[doc = "* `project`: Project ID or project name"]
9551        #[doc = "* `template_id`: The ID of the template."]
9552        pub fn save_template(
9553            &self,
9554            organization: impl Into<String>,
9555            body: impl Into<models::BuildDefinitionTemplate>,
9556            project: impl Into<String>,
9557            template_id: impl Into<String>,
9558        ) -> save_template::RequestBuilder {
9559            save_template::RequestBuilder {
9560                client: self.0.clone(),
9561                organization: organization.into(),
9562                body: body.into(),
9563                project: project.into(),
9564                template_id: template_id.into(),
9565            }
9566        }
9567        #[doc = "Deletes a build definition template."]
9568        #[doc = ""]
9569        #[doc = "Arguments:"]
9570        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9571        #[doc = "* `project`: Project ID or project name"]
9572        #[doc = "* `template_id`: The ID of the template."]
9573        pub fn delete(
9574            &self,
9575            organization: impl Into<String>,
9576            project: impl Into<String>,
9577            template_id: impl Into<String>,
9578        ) -> delete::RequestBuilder {
9579            delete::RequestBuilder {
9580                client: self.0.clone(),
9581                organization: organization.into(),
9582                project: project.into(),
9583                template_id: template_id.into(),
9584            }
9585        }
9586    }
9587    pub mod list {
9588        use super::models;
9589        #[cfg(not(target_arch = "wasm32"))]
9590        use futures::future::BoxFuture;
9591        #[cfg(target_arch = "wasm32")]
9592        use futures::future::LocalBoxFuture as BoxFuture;
9593        #[derive(Debug)]
9594        pub struct Response(
9595            azure_core::http::Response<
9596                models::BuildDefinitionTemplateList,
9597                azure_core::http::JsonFormat,
9598            >,
9599        );
9600        impl Response {
9601            pub async fn into_body(
9602                self,
9603            ) -> azure_core::Result<models::BuildDefinitionTemplateList> {
9604                self.0.into_body().await
9605            }
9606            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
9607                self.0.into()
9608            }
9609        }
9610        #[derive(Clone)]
9611        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9612        #[doc = r""]
9613        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9614        #[doc = r" parameters can be chained."]
9615        #[doc = r""]
9616        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9617        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9618        #[doc = r" executes the request and returns a `Result` with the parsed"]
9619        #[doc = r" response."]
9620        #[doc = r""]
9621        #[doc = r" If you need lower-level access to the raw response details"]
9622        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9623        #[doc = r" can finalize the request using the"]
9624        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9625        #[doc = r" that resolves to a lower-level [`Response`] value."]
9626        pub struct RequestBuilder {
9627            pub(crate) client: super::super::Client,
9628            pub(crate) organization: String,
9629            pub(crate) project: String,
9630        }
9631        impl RequestBuilder {
9632            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9633            #[doc = ""]
9634            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9635            #[doc = "However, this function can provide more flexibility when required."]
9636            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9637                Box::pin({
9638                    let this = self.clone();
9639                    async move {
9640                        let url = this.url()?;
9641                        let mut req =
9642                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
9643                        if let Some(auth_header) = this
9644                            .client
9645                            .token_credential()
9646                            .http_authorization_header(&this.client.scopes())
9647                            .await?
9648                        {
9649                            req.insert_header(
9650                                azure_core::http::headers::AUTHORIZATION,
9651                                auth_header,
9652                            );
9653                        }
9654                        let req_body = azure_core::Bytes::new();
9655                        req.set_body(req_body);
9656                        Ok(Response(this.client.send(&mut req).await?.into()))
9657                    }
9658                })
9659            }
9660            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
9661                let mut url = azure_core::http::Url::parse(&format!(
9662                    "{}/{}/{}/_apis/build/definitions/templates",
9663                    self.client.endpoint(),
9664                    &self.organization,
9665                    &self.project
9666                ))?;
9667                let has_api_version_already = url
9668                    .query_pairs()
9669                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
9670                if !has_api_version_already {
9671                    url.query_pairs_mut().append_pair(
9672                        azure_core::http::headers::query_param::API_VERSION,
9673                        "7.1-preview",
9674                    );
9675                }
9676                Ok(url)
9677            }
9678        }
9679        impl std::future::IntoFuture for RequestBuilder {
9680            type Output = azure_core::Result<models::BuildDefinitionTemplateList>;
9681            type IntoFuture =
9682                BoxFuture<'static, azure_core::Result<models::BuildDefinitionTemplateList>>;
9683            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9684            #[doc = ""]
9685            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9686            #[doc = ""]
9687            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9688            fn into_future(self) -> Self::IntoFuture {
9689                Box::pin(async move { self.send().await?.into_body().await })
9690            }
9691        }
9692    }
9693    pub mod get {
9694        use super::models;
9695        #[cfg(not(target_arch = "wasm32"))]
9696        use futures::future::BoxFuture;
9697        #[cfg(target_arch = "wasm32")]
9698        use futures::future::LocalBoxFuture as BoxFuture;
9699        #[derive(Debug)]
9700        pub struct Response(
9701            azure_core::http::Response<
9702                models::BuildDefinitionTemplate,
9703                azure_core::http::JsonFormat,
9704            >,
9705        );
9706        impl Response {
9707            pub async fn into_body(self) -> azure_core::Result<models::BuildDefinitionTemplate> {
9708                self.0.into_body().await
9709            }
9710            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
9711                self.0.into()
9712            }
9713        }
9714        #[derive(Clone)]
9715        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9716        #[doc = r""]
9717        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9718        #[doc = r" parameters can be chained."]
9719        #[doc = r""]
9720        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9721        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9722        #[doc = r" executes the request and returns a `Result` with the parsed"]
9723        #[doc = r" response."]
9724        #[doc = r""]
9725        #[doc = r" If you need lower-level access to the raw response details"]
9726        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9727        #[doc = r" can finalize the request using the"]
9728        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9729        #[doc = r" that resolves to a lower-level [`Response`] value."]
9730        pub struct RequestBuilder {
9731            pub(crate) client: super::super::Client,
9732            pub(crate) organization: String,
9733            pub(crate) project: String,
9734            pub(crate) template_id: String,
9735        }
9736        impl RequestBuilder {
9737            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9738            #[doc = ""]
9739            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9740            #[doc = "However, this function can provide more flexibility when required."]
9741            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9742                Box::pin({
9743                    let this = self.clone();
9744                    async move {
9745                        let url = this.url()?;
9746                        let mut req =
9747                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
9748                        if let Some(auth_header) = this
9749                            .client
9750                            .token_credential()
9751                            .http_authorization_header(&this.client.scopes())
9752                            .await?
9753                        {
9754                            req.insert_header(
9755                                azure_core::http::headers::AUTHORIZATION,
9756                                auth_header,
9757                            );
9758                        }
9759                        let req_body = azure_core::Bytes::new();
9760                        req.set_body(req_body);
9761                        Ok(Response(this.client.send(&mut req).await?.into()))
9762                    }
9763                })
9764            }
9765            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
9766                let mut url = azure_core::http::Url::parse(&format!(
9767                    "{}/{}/{}/_apis/build/definitions/templates/{}",
9768                    self.client.endpoint(),
9769                    &self.organization,
9770                    &self.project,
9771                    &self.template_id
9772                ))?;
9773                let has_api_version_already = url
9774                    .query_pairs()
9775                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
9776                if !has_api_version_already {
9777                    url.query_pairs_mut().append_pair(
9778                        azure_core::http::headers::query_param::API_VERSION,
9779                        "7.1-preview",
9780                    );
9781                }
9782                Ok(url)
9783            }
9784        }
9785        impl std::future::IntoFuture for RequestBuilder {
9786            type Output = azure_core::Result<models::BuildDefinitionTemplate>;
9787            type IntoFuture =
9788                BoxFuture<'static, azure_core::Result<models::BuildDefinitionTemplate>>;
9789            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9790            #[doc = ""]
9791            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9792            #[doc = ""]
9793            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9794            fn into_future(self) -> Self::IntoFuture {
9795                Box::pin(async move { self.send().await?.into_body().await })
9796            }
9797        }
9798    }
9799    pub mod save_template {
9800        use super::models;
9801        #[cfg(not(target_arch = "wasm32"))]
9802        use futures::future::BoxFuture;
9803        #[cfg(target_arch = "wasm32")]
9804        use futures::future::LocalBoxFuture as BoxFuture;
9805        #[derive(Debug)]
9806        pub struct Response(
9807            azure_core::http::Response<
9808                models::BuildDefinitionTemplate,
9809                azure_core::http::JsonFormat,
9810            >,
9811        );
9812        impl Response {
9813            pub async fn into_body(self) -> azure_core::Result<models::BuildDefinitionTemplate> {
9814                self.0.into_body().await
9815            }
9816            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
9817                self.0.into()
9818            }
9819        }
9820        #[derive(Clone)]
9821        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9822        #[doc = r""]
9823        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9824        #[doc = r" parameters can be chained."]
9825        #[doc = r""]
9826        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9827        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9828        #[doc = r" executes the request and returns a `Result` with the parsed"]
9829        #[doc = r" response."]
9830        #[doc = r""]
9831        #[doc = r" If you need lower-level access to the raw response details"]
9832        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9833        #[doc = r" can finalize the request using the"]
9834        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9835        #[doc = r" that resolves to a lower-level [`Response`] value."]
9836        pub struct RequestBuilder {
9837            pub(crate) client: super::super::Client,
9838            pub(crate) organization: String,
9839            pub(crate) body: models::BuildDefinitionTemplate,
9840            pub(crate) project: String,
9841            pub(crate) template_id: String,
9842        }
9843        impl RequestBuilder {
9844            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9845            #[doc = ""]
9846            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9847            #[doc = "However, this function can provide more flexibility when required."]
9848            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9849                Box::pin({
9850                    let this = self.clone();
9851                    async move {
9852                        let url = this.url()?;
9853                        let mut req =
9854                            azure_core::http::Request::new(url, azure_core::http::Method::Put);
9855                        if let Some(auth_header) = this
9856                            .client
9857                            .token_credential()
9858                            .http_authorization_header(&this.client.scopes())
9859                            .await?
9860                        {
9861                            req.insert_header(
9862                                azure_core::http::headers::AUTHORIZATION,
9863                                auth_header,
9864                            );
9865                        }
9866                        req.insert_header("content-type", "application/json");
9867                        let req_body = azure_core::json::to_json(&this.body)?;
9868                        req.set_body(req_body);
9869                        Ok(Response(this.client.send(&mut req).await?.into()))
9870                    }
9871                })
9872            }
9873            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
9874                let mut url = azure_core::http::Url::parse(&format!(
9875                    "{}/{}/{}/_apis/build/definitions/templates/{}",
9876                    self.client.endpoint(),
9877                    &self.organization,
9878                    &self.project,
9879                    &self.template_id
9880                ))?;
9881                let has_api_version_already = url
9882                    .query_pairs()
9883                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
9884                if !has_api_version_already {
9885                    url.query_pairs_mut().append_pair(
9886                        azure_core::http::headers::query_param::API_VERSION,
9887                        "7.1-preview",
9888                    );
9889                }
9890                Ok(url)
9891            }
9892        }
9893        impl std::future::IntoFuture for RequestBuilder {
9894            type Output = azure_core::Result<models::BuildDefinitionTemplate>;
9895            type IntoFuture =
9896                BoxFuture<'static, azure_core::Result<models::BuildDefinitionTemplate>>;
9897            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9898            #[doc = ""]
9899            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9900            #[doc = ""]
9901            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9902            fn into_future(self) -> Self::IntoFuture {
9903                Box::pin(async move { self.send().await?.into_body().await })
9904            }
9905        }
9906    }
9907    pub mod delete {
9908        use super::models;
9909        #[cfg(not(target_arch = "wasm32"))]
9910        use futures::future::BoxFuture;
9911        #[cfg(target_arch = "wasm32")]
9912        use futures::future::LocalBoxFuture as BoxFuture;
9913        #[derive(Debug)]
9914        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
9915        impl Response {
9916            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
9917                self.0.into()
9918            }
9919        }
9920        #[derive(Clone)]
9921        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9922        #[doc = r""]
9923        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9924        #[doc = r" parameters can be chained."]
9925        #[doc = r""]
9926        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9927        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9928        #[doc = r" executes the request and returns a `Result` with the parsed"]
9929        #[doc = r" response."]
9930        #[doc = r""]
9931        #[doc = r" If you need lower-level access to the raw response details"]
9932        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9933        #[doc = r" can finalize the request using the"]
9934        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9935        #[doc = r" that resolves to a lower-level [`Response`] value."]
9936        pub struct RequestBuilder {
9937            pub(crate) client: super::super::Client,
9938            pub(crate) organization: String,
9939            pub(crate) project: String,
9940            pub(crate) template_id: String,
9941        }
9942        impl RequestBuilder {
9943            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9944            #[doc = ""]
9945            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9946            #[doc = "However, this function can provide more flexibility when required."]
9947            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9948                Box::pin({
9949                    let this = self.clone();
9950                    async move {
9951                        let url = this.url()?;
9952                        let mut req =
9953                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
9954                        if let Some(auth_header) = this
9955                            .client
9956                            .token_credential()
9957                            .http_authorization_header(&this.client.scopes())
9958                            .await?
9959                        {
9960                            req.insert_header(
9961                                azure_core::http::headers::AUTHORIZATION,
9962                                auth_header,
9963                            );
9964                        }
9965                        let req_body = azure_core::Bytes::new();
9966                        req.set_body(req_body);
9967                        Ok(Response(this.client.send(&mut req).await?.into()))
9968                    }
9969                })
9970            }
9971            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
9972                let mut url = azure_core::http::Url::parse(&format!(
9973                    "{}/{}/{}/_apis/build/definitions/templates/{}",
9974                    self.client.endpoint(),
9975                    &self.organization,
9976                    &self.project,
9977                    &self.template_id
9978                ))?;
9979                let has_api_version_already = url
9980                    .query_pairs()
9981                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
9982                if !has_api_version_already {
9983                    url.query_pairs_mut().append_pair(
9984                        azure_core::http::headers::query_param::API_VERSION,
9985                        "7.1-preview",
9986                    );
9987                }
9988                Ok(url)
9989            }
9990        }
9991        impl std::future::IntoFuture for RequestBuilder {
9992            type Output = azure_core::Result<()>;
9993            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
9994            #[doc = "Returns a future that sends the request and waits for the response."]
9995            #[doc = ""]
9996            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9997            #[doc = ""]
9998            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9999            fn into_future(self) -> Self::IntoFuture {
10000                Box::pin(async move {
10001                    let _rsp = self.send().await?;
10002                    Ok(())
10003                })
10004            }
10005        }
10006    }
10007}
10008pub mod folders {
10009    use super::models;
10010    #[cfg(not(target_arch = "wasm32"))]
10011    use futures::future::BoxFuture;
10012    #[cfg(target_arch = "wasm32")]
10013    use futures::future::LocalBoxFuture as BoxFuture;
10014    pub struct Client(pub(crate) super::Client);
10015    impl Client {
10016        #[doc = "Updates an existing folder at given  existing path"]
10017        #[doc = ""]
10018        #[doc = "Arguments:"]
10019        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10020        #[doc = "* `body`: The new version of the folder."]
10021        #[doc = "* `project`: Project ID or project name"]
10022        #[doc = "* `path`: The full path to the folder."]
10023        pub fn update(
10024            &self,
10025            organization: impl Into<String>,
10026            body: impl Into<models::Folder>,
10027            project: impl Into<String>,
10028            path: impl Into<String>,
10029        ) -> update::RequestBuilder {
10030            update::RequestBuilder {
10031                client: self.0.clone(),
10032                organization: organization.into(),
10033                body: body.into(),
10034                project: project.into(),
10035                path: path.into(),
10036            }
10037        }
10038        #[doc = "Creates a new folder."]
10039        #[doc = ""]
10040        #[doc = "Arguments:"]
10041        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10042        #[doc = "* `body`: The folder."]
10043        #[doc = "* `project`: Project ID or project name"]
10044        #[doc = "* `path`: The full path of the folder."]
10045        pub fn create(
10046            &self,
10047            organization: impl Into<String>,
10048            body: impl Into<models::Folder>,
10049            project: impl Into<String>,
10050            path: impl Into<String>,
10051        ) -> create::RequestBuilder {
10052            create::RequestBuilder {
10053                client: self.0.clone(),
10054                organization: organization.into(),
10055                body: body.into(),
10056                project: project.into(),
10057                path: path.into(),
10058            }
10059        }
10060        #[doc = "Deletes a definition folder. Definitions and their corresponding builds will also be deleted."]
10061        #[doc = ""]
10062        #[doc = "Arguments:"]
10063        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10064        #[doc = "* `project`: Project ID or project name"]
10065        #[doc = "* `path`: The full path to the folder."]
10066        pub fn delete(
10067            &self,
10068            organization: impl Into<String>,
10069            project: impl Into<String>,
10070            path: impl Into<String>,
10071        ) -> delete::RequestBuilder {
10072            delete::RequestBuilder {
10073                client: self.0.clone(),
10074                organization: organization.into(),
10075                project: project.into(),
10076                path: path.into(),
10077            }
10078        }
10079        #[doc = "Gets a list of build definition folders."]
10080        #[doc = ""]
10081        #[doc = "Arguments:"]
10082        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10083        #[doc = "* `project`: Project ID or project name"]
10084        #[doc = "* `path`: The path to start with."]
10085        pub fn list(
10086            &self,
10087            organization: impl Into<String>,
10088            project: impl Into<String>,
10089            path: impl Into<String>,
10090        ) -> list::RequestBuilder {
10091            list::RequestBuilder {
10092                client: self.0.clone(),
10093                organization: organization.into(),
10094                project: project.into(),
10095                path: path.into(),
10096                query_order: None,
10097            }
10098        }
10099    }
10100    pub mod update {
10101        use super::models;
10102        #[cfg(not(target_arch = "wasm32"))]
10103        use futures::future::BoxFuture;
10104        #[cfg(target_arch = "wasm32")]
10105        use futures::future::LocalBoxFuture as BoxFuture;
10106        #[derive(Debug)]
10107        pub struct Response(
10108            azure_core::http::Response<models::Folder, azure_core::http::JsonFormat>,
10109        );
10110        impl Response {
10111            pub async fn into_body(self) -> azure_core::Result<models::Folder> {
10112                self.0.into_body().await
10113            }
10114            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10115                self.0.into()
10116            }
10117        }
10118        #[derive(Clone)]
10119        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10120        #[doc = r""]
10121        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10122        #[doc = r" parameters can be chained."]
10123        #[doc = r""]
10124        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10125        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10126        #[doc = r" executes the request and returns a `Result` with the parsed"]
10127        #[doc = r" response."]
10128        #[doc = r""]
10129        #[doc = r" If you need lower-level access to the raw response details"]
10130        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10131        #[doc = r" can finalize the request using the"]
10132        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10133        #[doc = r" that resolves to a lower-level [`Response`] value."]
10134        pub struct RequestBuilder {
10135            pub(crate) client: super::super::Client,
10136            pub(crate) organization: String,
10137            pub(crate) body: models::Folder,
10138            pub(crate) project: String,
10139            pub(crate) path: String,
10140        }
10141        impl RequestBuilder {
10142            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10143            #[doc = ""]
10144            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10145            #[doc = "However, this function can provide more flexibility when required."]
10146            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10147                Box::pin({
10148                    let this = self.clone();
10149                    async move {
10150                        let url = this.url()?;
10151                        let mut req =
10152                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
10153                        if let Some(auth_header) = this
10154                            .client
10155                            .token_credential()
10156                            .http_authorization_header(&this.client.scopes())
10157                            .await?
10158                        {
10159                            req.insert_header(
10160                                azure_core::http::headers::AUTHORIZATION,
10161                                auth_header,
10162                            );
10163                        }
10164                        req.insert_header("content-type", "application/json");
10165                        let req_body = azure_core::json::to_json(&this.body)?;
10166                        let path = &this.path;
10167                        req.url_mut().query_pairs_mut().append_pair("path", path);
10168                        req.set_body(req_body);
10169                        Ok(Response(this.client.send(&mut req).await?.into()))
10170                    }
10171                })
10172            }
10173            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
10174                let mut url = azure_core::http::Url::parse(&format!(
10175                    "{}/{}/{}/_apis/build/folders",
10176                    self.client.endpoint(),
10177                    &self.organization,
10178                    &self.project
10179                ))?;
10180                let has_api_version_already = url
10181                    .query_pairs()
10182                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
10183                if !has_api_version_already {
10184                    url.query_pairs_mut().append_pair(
10185                        azure_core::http::headers::query_param::API_VERSION,
10186                        "7.1-preview",
10187                    );
10188                }
10189                Ok(url)
10190            }
10191        }
10192        impl std::future::IntoFuture for RequestBuilder {
10193            type Output = azure_core::Result<models::Folder>;
10194            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Folder>>;
10195            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10196            #[doc = ""]
10197            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10198            #[doc = ""]
10199            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10200            fn into_future(self) -> Self::IntoFuture {
10201                Box::pin(async move { self.send().await?.into_body().await })
10202            }
10203        }
10204    }
10205    pub mod create {
10206        use super::models;
10207        #[cfg(not(target_arch = "wasm32"))]
10208        use futures::future::BoxFuture;
10209        #[cfg(target_arch = "wasm32")]
10210        use futures::future::LocalBoxFuture as BoxFuture;
10211        #[derive(Debug)]
10212        pub struct Response(
10213            azure_core::http::Response<models::Folder, azure_core::http::JsonFormat>,
10214        );
10215        impl Response {
10216            pub async fn into_body(self) -> azure_core::Result<models::Folder> {
10217                self.0.into_body().await
10218            }
10219            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10220                self.0.into()
10221            }
10222        }
10223        #[derive(Clone)]
10224        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10225        #[doc = r""]
10226        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10227        #[doc = r" parameters can be chained."]
10228        #[doc = r""]
10229        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10230        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10231        #[doc = r" executes the request and returns a `Result` with the parsed"]
10232        #[doc = r" response."]
10233        #[doc = r""]
10234        #[doc = r" If you need lower-level access to the raw response details"]
10235        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10236        #[doc = r" can finalize the request using the"]
10237        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10238        #[doc = r" that resolves to a lower-level [`Response`] value."]
10239        pub struct RequestBuilder {
10240            pub(crate) client: super::super::Client,
10241            pub(crate) organization: String,
10242            pub(crate) body: models::Folder,
10243            pub(crate) project: String,
10244            pub(crate) path: String,
10245        }
10246        impl RequestBuilder {
10247            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10248            #[doc = ""]
10249            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10250            #[doc = "However, this function can provide more flexibility when required."]
10251            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10252                Box::pin({
10253                    let this = self.clone();
10254                    async move {
10255                        let url = this.url()?;
10256                        let mut req =
10257                            azure_core::http::Request::new(url, azure_core::http::Method::Put);
10258                        if let Some(auth_header) = this
10259                            .client
10260                            .token_credential()
10261                            .http_authorization_header(&this.client.scopes())
10262                            .await?
10263                        {
10264                            req.insert_header(
10265                                azure_core::http::headers::AUTHORIZATION,
10266                                auth_header,
10267                            );
10268                        }
10269                        req.insert_header("content-type", "application/json");
10270                        let req_body = azure_core::json::to_json(&this.body)?;
10271                        let path = &this.path;
10272                        req.url_mut().query_pairs_mut().append_pair("path", path);
10273                        req.set_body(req_body);
10274                        Ok(Response(this.client.send(&mut req).await?.into()))
10275                    }
10276                })
10277            }
10278            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
10279                let mut url = azure_core::http::Url::parse(&format!(
10280                    "{}/{}/{}/_apis/build/folders",
10281                    self.client.endpoint(),
10282                    &self.organization,
10283                    &self.project
10284                ))?;
10285                let has_api_version_already = url
10286                    .query_pairs()
10287                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
10288                if !has_api_version_already {
10289                    url.query_pairs_mut().append_pair(
10290                        azure_core::http::headers::query_param::API_VERSION,
10291                        "7.1-preview",
10292                    );
10293                }
10294                Ok(url)
10295            }
10296        }
10297        impl std::future::IntoFuture for RequestBuilder {
10298            type Output = azure_core::Result<models::Folder>;
10299            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Folder>>;
10300            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10301            #[doc = ""]
10302            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10303            #[doc = ""]
10304            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10305            fn into_future(self) -> Self::IntoFuture {
10306                Box::pin(async move { self.send().await?.into_body().await })
10307            }
10308        }
10309    }
10310    pub mod delete {
10311        use super::models;
10312        #[cfg(not(target_arch = "wasm32"))]
10313        use futures::future::BoxFuture;
10314        #[cfg(target_arch = "wasm32")]
10315        use futures::future::LocalBoxFuture as BoxFuture;
10316        #[derive(Debug)]
10317        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
10318        impl Response {
10319            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10320                self.0.into()
10321            }
10322        }
10323        #[derive(Clone)]
10324        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10325        #[doc = r""]
10326        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10327        #[doc = r" parameters can be chained."]
10328        #[doc = r""]
10329        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10330        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10331        #[doc = r" executes the request and returns a `Result` with the parsed"]
10332        #[doc = r" response."]
10333        #[doc = r""]
10334        #[doc = r" If you need lower-level access to the raw response details"]
10335        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10336        #[doc = r" can finalize the request using the"]
10337        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10338        #[doc = r" that resolves to a lower-level [`Response`] value."]
10339        pub struct RequestBuilder {
10340            pub(crate) client: super::super::Client,
10341            pub(crate) organization: String,
10342            pub(crate) project: String,
10343            pub(crate) path: String,
10344        }
10345        impl RequestBuilder {
10346            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10347            #[doc = ""]
10348            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10349            #[doc = "However, this function can provide more flexibility when required."]
10350            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10351                Box::pin({
10352                    let this = self.clone();
10353                    async move {
10354                        let url = this.url()?;
10355                        let mut req =
10356                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
10357                        if let Some(auth_header) = this
10358                            .client
10359                            .token_credential()
10360                            .http_authorization_header(&this.client.scopes())
10361                            .await?
10362                        {
10363                            req.insert_header(
10364                                azure_core::http::headers::AUTHORIZATION,
10365                                auth_header,
10366                            );
10367                        }
10368                        let path = &this.path;
10369                        req.url_mut().query_pairs_mut().append_pair("path", path);
10370                        let req_body = azure_core::Bytes::new();
10371                        req.set_body(req_body);
10372                        Ok(Response(this.client.send(&mut req).await?.into()))
10373                    }
10374                })
10375            }
10376            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
10377                let mut url = azure_core::http::Url::parse(&format!(
10378                    "{}/{}/{}/_apis/build/folders",
10379                    self.client.endpoint(),
10380                    &self.organization,
10381                    &self.project
10382                ))?;
10383                let has_api_version_already = url
10384                    .query_pairs()
10385                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
10386                if !has_api_version_already {
10387                    url.query_pairs_mut().append_pair(
10388                        azure_core::http::headers::query_param::API_VERSION,
10389                        "7.1-preview",
10390                    );
10391                }
10392                Ok(url)
10393            }
10394        }
10395        impl std::future::IntoFuture for RequestBuilder {
10396            type Output = azure_core::Result<()>;
10397            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
10398            #[doc = "Returns a future that sends the request and waits for the response."]
10399            #[doc = ""]
10400            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10401            #[doc = ""]
10402            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10403            fn into_future(self) -> Self::IntoFuture {
10404                Box::pin(async move {
10405                    let _rsp = self.send().await?;
10406                    Ok(())
10407                })
10408            }
10409        }
10410    }
10411    pub mod list {
10412        use super::models;
10413        #[cfg(not(target_arch = "wasm32"))]
10414        use futures::future::BoxFuture;
10415        #[cfg(target_arch = "wasm32")]
10416        use futures::future::LocalBoxFuture as BoxFuture;
10417        #[derive(Debug)]
10418        pub struct Response(
10419            azure_core::http::Response<models::FolderList, azure_core::http::JsonFormat>,
10420        );
10421        impl Response {
10422            pub async fn into_body(self) -> azure_core::Result<models::FolderList> {
10423                self.0.into_body().await
10424            }
10425            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10426                self.0.into()
10427            }
10428        }
10429        #[derive(Clone)]
10430        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10431        #[doc = r""]
10432        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10433        #[doc = r" parameters can be chained."]
10434        #[doc = r""]
10435        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10436        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10437        #[doc = r" executes the request and returns a `Result` with the parsed"]
10438        #[doc = r" response."]
10439        #[doc = r""]
10440        #[doc = r" If you need lower-level access to the raw response details"]
10441        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10442        #[doc = r" can finalize the request using the"]
10443        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10444        #[doc = r" that resolves to a lower-level [`Response`] value."]
10445        pub struct RequestBuilder {
10446            pub(crate) client: super::super::Client,
10447            pub(crate) organization: String,
10448            pub(crate) project: String,
10449            pub(crate) path: String,
10450            pub(crate) query_order: Option<String>,
10451        }
10452        impl RequestBuilder {
10453            #[doc = "The order in which folders should be returned."]
10454            pub fn query_order(mut self, query_order: impl Into<String>) -> Self {
10455                self.query_order = Some(query_order.into());
10456                self
10457            }
10458            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10459            #[doc = ""]
10460            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10461            #[doc = "However, this function can provide more flexibility when required."]
10462            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10463                Box::pin({
10464                    let this = self.clone();
10465                    async move {
10466                        let url = this.url()?;
10467                        let mut req =
10468                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
10469                        if let Some(auth_header) = this
10470                            .client
10471                            .token_credential()
10472                            .http_authorization_header(&this.client.scopes())
10473                            .await?
10474                        {
10475                            req.insert_header(
10476                                azure_core::http::headers::AUTHORIZATION,
10477                                auth_header,
10478                            );
10479                        }
10480                        if let Some(query_order) = &this.query_order {
10481                            req.url_mut()
10482                                .query_pairs_mut()
10483                                .append_pair("queryOrder", query_order);
10484                        }
10485                        let req_body = azure_core::Bytes::new();
10486                        req.set_body(req_body);
10487                        Ok(Response(this.client.send(&mut req).await?.into()))
10488                    }
10489                })
10490            }
10491            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
10492                let mut url = azure_core::http::Url::parse(&format!(
10493                    "{}/{}/{}/_apis/build/folders/{}",
10494                    self.client.endpoint(),
10495                    &self.organization,
10496                    &self.project,
10497                    &self.path
10498                ))?;
10499                let has_api_version_already = url
10500                    .query_pairs()
10501                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
10502                if !has_api_version_already {
10503                    url.query_pairs_mut().append_pair(
10504                        azure_core::http::headers::query_param::API_VERSION,
10505                        "7.1-preview",
10506                    );
10507                }
10508                Ok(url)
10509            }
10510        }
10511        impl std::future::IntoFuture for RequestBuilder {
10512            type Output = azure_core::Result<models::FolderList>;
10513            type IntoFuture = BoxFuture<'static, azure_core::Result<models::FolderList>>;
10514            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10515            #[doc = ""]
10516            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10517            #[doc = ""]
10518            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10519            fn into_future(self) -> Self::IntoFuture {
10520                Box::pin(async move { self.send().await?.into_body().await })
10521            }
10522        }
10523    }
10524}
10525pub mod general_settings {
10526    use super::models;
10527    #[cfg(not(target_arch = "wasm32"))]
10528    use futures::future::BoxFuture;
10529    #[cfg(target_arch = "wasm32")]
10530    use futures::future::LocalBoxFuture as BoxFuture;
10531    pub struct Client(pub(crate) super::Client);
10532    impl Client {
10533        #[doc = "Gets pipeline general settings."]
10534        #[doc = ""]
10535        #[doc = "Arguments:"]
10536        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10537        #[doc = "* `project`: Project ID or project name"]
10538        pub fn get(
10539            &self,
10540            organization: impl Into<String>,
10541            project: impl Into<String>,
10542        ) -> get::RequestBuilder {
10543            get::RequestBuilder {
10544                client: self.0.clone(),
10545                organization: organization.into(),
10546                project: project.into(),
10547            }
10548        }
10549        #[doc = "Updates pipeline general settings."]
10550        #[doc = ""]
10551        #[doc = "Arguments:"]
10552        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10553        #[doc = "* `project`: Project ID or project name"]
10554        pub fn update(
10555            &self,
10556            organization: impl Into<String>,
10557            body: impl Into<models::PipelineGeneralSettings>,
10558            project: impl Into<String>,
10559        ) -> update::RequestBuilder {
10560            update::RequestBuilder {
10561                client: self.0.clone(),
10562                organization: organization.into(),
10563                body: body.into(),
10564                project: project.into(),
10565            }
10566        }
10567    }
10568    pub mod get {
10569        use super::models;
10570        #[cfg(not(target_arch = "wasm32"))]
10571        use futures::future::BoxFuture;
10572        #[cfg(target_arch = "wasm32")]
10573        use futures::future::LocalBoxFuture as BoxFuture;
10574        #[derive(Debug)]
10575        pub struct Response(
10576            azure_core::http::Response<
10577                models::PipelineGeneralSettings,
10578                azure_core::http::JsonFormat,
10579            >,
10580        );
10581        impl Response {
10582            pub async fn into_body(self) -> azure_core::Result<models::PipelineGeneralSettings> {
10583                self.0.into_body().await
10584            }
10585            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10586                self.0.into()
10587            }
10588        }
10589        #[derive(Clone)]
10590        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10591        #[doc = r""]
10592        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10593        #[doc = r" parameters can be chained."]
10594        #[doc = r""]
10595        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10596        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10597        #[doc = r" executes the request and returns a `Result` with the parsed"]
10598        #[doc = r" response."]
10599        #[doc = r""]
10600        #[doc = r" If you need lower-level access to the raw response details"]
10601        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10602        #[doc = r" can finalize the request using the"]
10603        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10604        #[doc = r" that resolves to a lower-level [`Response`] value."]
10605        pub struct RequestBuilder {
10606            pub(crate) client: super::super::Client,
10607            pub(crate) organization: String,
10608            pub(crate) project: String,
10609        }
10610        impl RequestBuilder {
10611            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10612            #[doc = ""]
10613            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10614            #[doc = "However, this function can provide more flexibility when required."]
10615            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10616                Box::pin({
10617                    let this = self.clone();
10618                    async move {
10619                        let url = this.url()?;
10620                        let mut req =
10621                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
10622                        if let Some(auth_header) = this
10623                            .client
10624                            .token_credential()
10625                            .http_authorization_header(&this.client.scopes())
10626                            .await?
10627                        {
10628                            req.insert_header(
10629                                azure_core::http::headers::AUTHORIZATION,
10630                                auth_header,
10631                            );
10632                        }
10633                        let req_body = azure_core::Bytes::new();
10634                        req.set_body(req_body);
10635                        Ok(Response(this.client.send(&mut req).await?.into()))
10636                    }
10637                })
10638            }
10639            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
10640                let mut url = azure_core::http::Url::parse(&format!(
10641                    "{}/{}/{}/_apis/build/generalsettings",
10642                    self.client.endpoint(),
10643                    &self.organization,
10644                    &self.project
10645                ))?;
10646                let has_api_version_already = url
10647                    .query_pairs()
10648                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
10649                if !has_api_version_already {
10650                    url.query_pairs_mut().append_pair(
10651                        azure_core::http::headers::query_param::API_VERSION,
10652                        "7.1-preview",
10653                    );
10654                }
10655                Ok(url)
10656            }
10657        }
10658        impl std::future::IntoFuture for RequestBuilder {
10659            type Output = azure_core::Result<models::PipelineGeneralSettings>;
10660            type IntoFuture =
10661                BoxFuture<'static, azure_core::Result<models::PipelineGeneralSettings>>;
10662            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10663            #[doc = ""]
10664            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10665            #[doc = ""]
10666            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10667            fn into_future(self) -> Self::IntoFuture {
10668                Box::pin(async move { self.send().await?.into_body().await })
10669            }
10670        }
10671    }
10672    pub mod update {
10673        use super::models;
10674        #[cfg(not(target_arch = "wasm32"))]
10675        use futures::future::BoxFuture;
10676        #[cfg(target_arch = "wasm32")]
10677        use futures::future::LocalBoxFuture as BoxFuture;
10678        #[derive(Debug)]
10679        pub struct Response(
10680            azure_core::http::Response<
10681                models::PipelineGeneralSettings,
10682                azure_core::http::JsonFormat,
10683            >,
10684        );
10685        impl Response {
10686            pub async fn into_body(self) -> azure_core::Result<models::PipelineGeneralSettings> {
10687                self.0.into_body().await
10688            }
10689            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10690                self.0.into()
10691            }
10692        }
10693        #[derive(Clone)]
10694        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10695        #[doc = r""]
10696        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10697        #[doc = r" parameters can be chained."]
10698        #[doc = r""]
10699        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10700        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10701        #[doc = r" executes the request and returns a `Result` with the parsed"]
10702        #[doc = r" response."]
10703        #[doc = r""]
10704        #[doc = r" If you need lower-level access to the raw response details"]
10705        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10706        #[doc = r" can finalize the request using the"]
10707        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10708        #[doc = r" that resolves to a lower-level [`Response`] value."]
10709        pub struct RequestBuilder {
10710            pub(crate) client: super::super::Client,
10711            pub(crate) organization: String,
10712            pub(crate) body: models::PipelineGeneralSettings,
10713            pub(crate) project: String,
10714        }
10715        impl RequestBuilder {
10716            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10717            #[doc = ""]
10718            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10719            #[doc = "However, this function can provide more flexibility when required."]
10720            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10721                Box::pin({
10722                    let this = self.clone();
10723                    async move {
10724                        let url = this.url()?;
10725                        let mut req =
10726                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
10727                        if let Some(auth_header) = this
10728                            .client
10729                            .token_credential()
10730                            .http_authorization_header(&this.client.scopes())
10731                            .await?
10732                        {
10733                            req.insert_header(
10734                                azure_core::http::headers::AUTHORIZATION,
10735                                auth_header,
10736                            );
10737                        }
10738                        req.insert_header("content-type", "application/json");
10739                        let req_body = azure_core::json::to_json(&this.body)?;
10740                        req.set_body(req_body);
10741                        Ok(Response(this.client.send(&mut req).await?.into()))
10742                    }
10743                })
10744            }
10745            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
10746                let mut url = azure_core::http::Url::parse(&format!(
10747                    "{}/{}/{}/_apis/build/generalsettings",
10748                    self.client.endpoint(),
10749                    &self.organization,
10750                    &self.project
10751                ))?;
10752                let has_api_version_already = url
10753                    .query_pairs()
10754                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
10755                if !has_api_version_already {
10756                    url.query_pairs_mut().append_pair(
10757                        azure_core::http::headers::query_param::API_VERSION,
10758                        "7.1-preview",
10759                    );
10760                }
10761                Ok(url)
10762            }
10763        }
10764        impl std::future::IntoFuture for RequestBuilder {
10765            type Output = azure_core::Result<models::PipelineGeneralSettings>;
10766            type IntoFuture =
10767                BoxFuture<'static, azure_core::Result<models::PipelineGeneralSettings>>;
10768            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10769            #[doc = ""]
10770            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10771            #[doc = ""]
10772            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10773            fn into_future(self) -> Self::IntoFuture {
10774                Box::pin(async move { self.send().await?.into_body().await })
10775            }
10776        }
10777    }
10778}
10779pub mod latest {
10780    use super::models;
10781    #[cfg(not(target_arch = "wasm32"))]
10782    use futures::future::BoxFuture;
10783    #[cfg(target_arch = "wasm32")]
10784    use futures::future::LocalBoxFuture as BoxFuture;
10785    pub struct Client(pub(crate) super::Client);
10786    impl Client {
10787        #[doc = "Gets the latest build for a definition, optionally scoped to a specific branch."]
10788        #[doc = ""]
10789        #[doc = "Arguments:"]
10790        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10791        #[doc = "* `project`: Project ID or project name"]
10792        #[doc = "* `definition`: definition name with optional leading folder path, or the definition id"]
10793        pub fn get(
10794            &self,
10795            organization: impl Into<String>,
10796            project: impl Into<String>,
10797            definition: impl Into<String>,
10798        ) -> get::RequestBuilder {
10799            get::RequestBuilder {
10800                client: self.0.clone(),
10801                organization: organization.into(),
10802                project: project.into(),
10803                definition: definition.into(),
10804                branch_name: None,
10805            }
10806        }
10807    }
10808    pub mod get {
10809        use super::models;
10810        #[cfg(not(target_arch = "wasm32"))]
10811        use futures::future::BoxFuture;
10812        #[cfg(target_arch = "wasm32")]
10813        use futures::future::LocalBoxFuture as BoxFuture;
10814        #[derive(Debug)]
10815        pub struct Response(
10816            azure_core::http::Response<models::Build, azure_core::http::JsonFormat>,
10817        );
10818        impl Response {
10819            pub async fn into_body(self) -> azure_core::Result<models::Build> {
10820                self.0.into_body().await
10821            }
10822            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10823                self.0.into()
10824            }
10825        }
10826        #[derive(Clone)]
10827        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10828        #[doc = r""]
10829        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10830        #[doc = r" parameters can be chained."]
10831        #[doc = r""]
10832        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10833        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10834        #[doc = r" executes the request and returns a `Result` with the parsed"]
10835        #[doc = r" response."]
10836        #[doc = r""]
10837        #[doc = r" If you need lower-level access to the raw response details"]
10838        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10839        #[doc = r" can finalize the request using the"]
10840        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10841        #[doc = r" that resolves to a lower-level [`Response`] value."]
10842        pub struct RequestBuilder {
10843            pub(crate) client: super::super::Client,
10844            pub(crate) organization: String,
10845            pub(crate) project: String,
10846            pub(crate) definition: String,
10847            pub(crate) branch_name: Option<String>,
10848        }
10849        impl RequestBuilder {
10850            #[doc = "optional parameter that indicates the specific branch to use. If not specified, the default branch is used."]
10851            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
10852                self.branch_name = Some(branch_name.into());
10853                self
10854            }
10855            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10856            #[doc = ""]
10857            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10858            #[doc = "However, this function can provide more flexibility when required."]
10859            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10860                Box::pin({
10861                    let this = self.clone();
10862                    async move {
10863                        let url = this.url()?;
10864                        let mut req =
10865                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
10866                        if let Some(auth_header) = this
10867                            .client
10868                            .token_credential()
10869                            .http_authorization_header(&this.client.scopes())
10870                            .await?
10871                        {
10872                            req.insert_header(
10873                                azure_core::http::headers::AUTHORIZATION,
10874                                auth_header,
10875                            );
10876                        }
10877                        if let Some(branch_name) = &this.branch_name {
10878                            req.url_mut()
10879                                .query_pairs_mut()
10880                                .append_pair("branchName", branch_name);
10881                        }
10882                        let req_body = azure_core::Bytes::new();
10883                        req.set_body(req_body);
10884                        Ok(Response(this.client.send(&mut req).await?.into()))
10885                    }
10886                })
10887            }
10888            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
10889                let mut url = azure_core::http::Url::parse(&format!(
10890                    "{}/{}/{}/_apis/build/latest/{}",
10891                    self.client.endpoint(),
10892                    &self.organization,
10893                    &self.project,
10894                    &self.definition
10895                ))?;
10896                let has_api_version_already = url
10897                    .query_pairs()
10898                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
10899                if !has_api_version_already {
10900                    url.query_pairs_mut().append_pair(
10901                        azure_core::http::headers::query_param::API_VERSION,
10902                        "7.1-preview",
10903                    );
10904                }
10905                Ok(url)
10906            }
10907        }
10908        impl std::future::IntoFuture for RequestBuilder {
10909            type Output = azure_core::Result<models::Build>;
10910            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Build>>;
10911            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10912            #[doc = ""]
10913            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10914            #[doc = ""]
10915            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10916            fn into_future(self) -> Self::IntoFuture {
10917                Box::pin(async move { self.send().await?.into_body().await })
10918            }
10919        }
10920    }
10921}
10922pub mod options {
10923    use super::models;
10924    #[cfg(not(target_arch = "wasm32"))]
10925    use futures::future::BoxFuture;
10926    #[cfg(target_arch = "wasm32")]
10927    use futures::future::LocalBoxFuture as BoxFuture;
10928    pub struct Client(pub(crate) super::Client);
10929    impl Client {
10930        #[doc = "Gets all build definition options supported by the system."]
10931        #[doc = ""]
10932        #[doc = "Arguments:"]
10933        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10934        #[doc = "* `project`: Project ID or project name"]
10935        pub fn list(
10936            &self,
10937            organization: impl Into<String>,
10938            project: impl Into<String>,
10939        ) -> list::RequestBuilder {
10940            list::RequestBuilder {
10941                client: self.0.clone(),
10942                organization: organization.into(),
10943                project: project.into(),
10944            }
10945        }
10946    }
10947    pub mod list {
10948        use super::models;
10949        #[cfg(not(target_arch = "wasm32"))]
10950        use futures::future::BoxFuture;
10951        #[cfg(target_arch = "wasm32")]
10952        use futures::future::LocalBoxFuture as BoxFuture;
10953        #[derive(Debug)]
10954        pub struct Response(
10955            azure_core::http::Response<
10956                models::BuildOptionDefinitionList,
10957                azure_core::http::JsonFormat,
10958            >,
10959        );
10960        impl Response {
10961            pub async fn into_body(self) -> azure_core::Result<models::BuildOptionDefinitionList> {
10962                self.0.into_body().await
10963            }
10964            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
10965                self.0.into()
10966            }
10967        }
10968        #[derive(Clone)]
10969        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10970        #[doc = r""]
10971        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10972        #[doc = r" parameters can be chained."]
10973        #[doc = r""]
10974        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10975        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10976        #[doc = r" executes the request and returns a `Result` with the parsed"]
10977        #[doc = r" response."]
10978        #[doc = r""]
10979        #[doc = r" If you need lower-level access to the raw response details"]
10980        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10981        #[doc = r" can finalize the request using the"]
10982        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10983        #[doc = r" that resolves to a lower-level [`Response`] value."]
10984        pub struct RequestBuilder {
10985            pub(crate) client: super::super::Client,
10986            pub(crate) organization: String,
10987            pub(crate) project: String,
10988        }
10989        impl RequestBuilder {
10990            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10991            #[doc = ""]
10992            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10993            #[doc = "However, this function can provide more flexibility when required."]
10994            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10995                Box::pin({
10996                    let this = self.clone();
10997                    async move {
10998                        let url = this.url()?;
10999                        let mut req =
11000                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
11001                        if let Some(auth_header) = this
11002                            .client
11003                            .token_credential()
11004                            .http_authorization_header(&this.client.scopes())
11005                            .await?
11006                        {
11007                            req.insert_header(
11008                                azure_core::http::headers::AUTHORIZATION,
11009                                auth_header,
11010                            );
11011                        }
11012                        let req_body = azure_core::Bytes::new();
11013                        req.set_body(req_body);
11014                        Ok(Response(this.client.send(&mut req).await?.into()))
11015                    }
11016                })
11017            }
11018            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
11019                let mut url = azure_core::http::Url::parse(&format!(
11020                    "{}/{}/{}/_apis/build/options",
11021                    self.client.endpoint(),
11022                    &self.organization,
11023                    &self.project
11024                ))?;
11025                let has_api_version_already = url
11026                    .query_pairs()
11027                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
11028                if !has_api_version_already {
11029                    url.query_pairs_mut().append_pair(
11030                        azure_core::http::headers::query_param::API_VERSION,
11031                        "7.1-preview",
11032                    );
11033                }
11034                Ok(url)
11035            }
11036        }
11037        impl std::future::IntoFuture for RequestBuilder {
11038            type Output = azure_core::Result<models::BuildOptionDefinitionList>;
11039            type IntoFuture =
11040                BoxFuture<'static, azure_core::Result<models::BuildOptionDefinitionList>>;
11041            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11042            #[doc = ""]
11043            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11044            #[doc = ""]
11045            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11046            fn into_future(self) -> Self::IntoFuture {
11047                Box::pin(async move { self.send().await?.into_body().await })
11048            }
11049        }
11050    }
11051}
11052pub mod retention {
11053    use super::models;
11054    #[cfg(not(target_arch = "wasm32"))]
11055    use futures::future::BoxFuture;
11056    #[cfg(target_arch = "wasm32")]
11057    use futures::future::LocalBoxFuture as BoxFuture;
11058    pub struct Client(pub(crate) super::Client);
11059    impl Client {
11060        #[doc = "Gets the project's retention settings."]
11061        #[doc = ""]
11062        #[doc = "Arguments:"]
11063        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11064        #[doc = "* `project`: Project ID or project name"]
11065        pub fn get(
11066            &self,
11067            organization: impl Into<String>,
11068            project: impl Into<String>,
11069        ) -> get::RequestBuilder {
11070            get::RequestBuilder {
11071                client: self.0.clone(),
11072                organization: organization.into(),
11073                project: project.into(),
11074            }
11075        }
11076        #[doc = "Updates the project's retention settings."]
11077        #[doc = ""]
11078        #[doc = "Arguments:"]
11079        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11080        #[doc = "* `project`: Project ID or project name"]
11081        pub fn update(
11082            &self,
11083            organization: impl Into<String>,
11084            body: impl Into<models::UpdateProjectRetentionSettingModel>,
11085            project: impl Into<String>,
11086        ) -> update::RequestBuilder {
11087            update::RequestBuilder {
11088                client: self.0.clone(),
11089                organization: organization.into(),
11090                body: body.into(),
11091                project: project.into(),
11092            }
11093        }
11094    }
11095    pub mod get {
11096        use super::models;
11097        #[cfg(not(target_arch = "wasm32"))]
11098        use futures::future::BoxFuture;
11099        #[cfg(target_arch = "wasm32")]
11100        use futures::future::LocalBoxFuture as BoxFuture;
11101        #[derive(Debug)]
11102        pub struct Response(
11103            azure_core::http::Response<
11104                models::ProjectRetentionSetting,
11105                azure_core::http::JsonFormat,
11106            >,
11107        );
11108        impl Response {
11109            pub async fn into_body(self) -> azure_core::Result<models::ProjectRetentionSetting> {
11110                self.0.into_body().await
11111            }
11112            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
11113                self.0.into()
11114            }
11115        }
11116        #[derive(Clone)]
11117        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11118        #[doc = r""]
11119        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11120        #[doc = r" parameters can be chained."]
11121        #[doc = r""]
11122        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11123        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11124        #[doc = r" executes the request and returns a `Result` with the parsed"]
11125        #[doc = r" response."]
11126        #[doc = r""]
11127        #[doc = r" If you need lower-level access to the raw response details"]
11128        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11129        #[doc = r" can finalize the request using the"]
11130        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11131        #[doc = r" that resolves to a lower-level [`Response`] value."]
11132        pub struct RequestBuilder {
11133            pub(crate) client: super::super::Client,
11134            pub(crate) organization: String,
11135            pub(crate) project: String,
11136        }
11137        impl RequestBuilder {
11138            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11139            #[doc = ""]
11140            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11141            #[doc = "However, this function can provide more flexibility when required."]
11142            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11143                Box::pin({
11144                    let this = self.clone();
11145                    async move {
11146                        let url = this.url()?;
11147                        let mut req =
11148                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
11149                        if let Some(auth_header) = this
11150                            .client
11151                            .token_credential()
11152                            .http_authorization_header(&this.client.scopes())
11153                            .await?
11154                        {
11155                            req.insert_header(
11156                                azure_core::http::headers::AUTHORIZATION,
11157                                auth_header,
11158                            );
11159                        }
11160                        let req_body = azure_core::Bytes::new();
11161                        req.set_body(req_body);
11162                        Ok(Response(this.client.send(&mut req).await?.into()))
11163                    }
11164                })
11165            }
11166            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
11167                let mut url = azure_core::http::Url::parse(&format!(
11168                    "{}/{}/{}/_apis/build/retention",
11169                    self.client.endpoint(),
11170                    &self.organization,
11171                    &self.project
11172                ))?;
11173                let has_api_version_already = url
11174                    .query_pairs()
11175                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
11176                if !has_api_version_already {
11177                    url.query_pairs_mut().append_pair(
11178                        azure_core::http::headers::query_param::API_VERSION,
11179                        "7.1-preview",
11180                    );
11181                }
11182                Ok(url)
11183            }
11184        }
11185        impl std::future::IntoFuture for RequestBuilder {
11186            type Output = azure_core::Result<models::ProjectRetentionSetting>;
11187            type IntoFuture =
11188                BoxFuture<'static, azure_core::Result<models::ProjectRetentionSetting>>;
11189            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11190            #[doc = ""]
11191            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11192            #[doc = ""]
11193            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11194            fn into_future(self) -> Self::IntoFuture {
11195                Box::pin(async move { self.send().await?.into_body().await })
11196            }
11197        }
11198    }
11199    pub mod update {
11200        use super::models;
11201        #[cfg(not(target_arch = "wasm32"))]
11202        use futures::future::BoxFuture;
11203        #[cfg(target_arch = "wasm32")]
11204        use futures::future::LocalBoxFuture as BoxFuture;
11205        #[derive(Debug)]
11206        pub struct Response(
11207            azure_core::http::Response<
11208                models::ProjectRetentionSetting,
11209                azure_core::http::JsonFormat,
11210            >,
11211        );
11212        impl Response {
11213            pub async fn into_body(self) -> azure_core::Result<models::ProjectRetentionSetting> {
11214                self.0.into_body().await
11215            }
11216            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
11217                self.0.into()
11218            }
11219        }
11220        #[derive(Clone)]
11221        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11222        #[doc = r""]
11223        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11224        #[doc = r" parameters can be chained."]
11225        #[doc = r""]
11226        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11227        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11228        #[doc = r" executes the request and returns a `Result` with the parsed"]
11229        #[doc = r" response."]
11230        #[doc = r""]
11231        #[doc = r" If you need lower-level access to the raw response details"]
11232        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11233        #[doc = r" can finalize the request using the"]
11234        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11235        #[doc = r" that resolves to a lower-level [`Response`] value."]
11236        pub struct RequestBuilder {
11237            pub(crate) client: super::super::Client,
11238            pub(crate) organization: String,
11239            pub(crate) body: models::UpdateProjectRetentionSettingModel,
11240            pub(crate) project: String,
11241        }
11242        impl RequestBuilder {
11243            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11244            #[doc = ""]
11245            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11246            #[doc = "However, this function can provide more flexibility when required."]
11247            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11248                Box::pin({
11249                    let this = self.clone();
11250                    async move {
11251                        let url = this.url()?;
11252                        let mut req =
11253                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
11254                        if let Some(auth_header) = this
11255                            .client
11256                            .token_credential()
11257                            .http_authorization_header(&this.client.scopes())
11258                            .await?
11259                        {
11260                            req.insert_header(
11261                                azure_core::http::headers::AUTHORIZATION,
11262                                auth_header,
11263                            );
11264                        }
11265                        req.insert_header("content-type", "application/json");
11266                        let req_body = azure_core::json::to_json(&this.body)?;
11267                        req.set_body(req_body);
11268                        Ok(Response(this.client.send(&mut req).await?.into()))
11269                    }
11270                })
11271            }
11272            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
11273                let mut url = azure_core::http::Url::parse(&format!(
11274                    "{}/{}/{}/_apis/build/retention",
11275                    self.client.endpoint(),
11276                    &self.organization,
11277                    &self.project
11278                ))?;
11279                let has_api_version_already = url
11280                    .query_pairs()
11281                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
11282                if !has_api_version_already {
11283                    url.query_pairs_mut().append_pair(
11284                        azure_core::http::headers::query_param::API_VERSION,
11285                        "7.1-preview",
11286                    );
11287                }
11288                Ok(url)
11289            }
11290        }
11291        impl std::future::IntoFuture for RequestBuilder {
11292            type Output = azure_core::Result<models::ProjectRetentionSetting>;
11293            type IntoFuture =
11294                BoxFuture<'static, azure_core::Result<models::ProjectRetentionSetting>>;
11295            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11296            #[doc = ""]
11297            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11298            #[doc = ""]
11299            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11300            fn into_future(self) -> Self::IntoFuture {
11301                Box::pin(async move { self.send().await?.into_body().await })
11302            }
11303        }
11304    }
11305}
11306pub mod settings {
11307    use super::models;
11308    #[cfg(not(target_arch = "wasm32"))]
11309    use futures::future::BoxFuture;
11310    #[cfg(target_arch = "wasm32")]
11311    use futures::future::LocalBoxFuture as BoxFuture;
11312    pub struct Client(pub(crate) super::Client);
11313    impl Client {
11314        #[doc = "Gets the build settings."]
11315        #[doc = ""]
11316        #[doc = "Arguments:"]
11317        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11318        #[doc = "* `project`: Project ID or project name"]
11319        pub fn get(
11320            &self,
11321            organization: impl Into<String>,
11322            project: impl Into<String>,
11323        ) -> get::RequestBuilder {
11324            get::RequestBuilder {
11325                client: self.0.clone(),
11326                organization: organization.into(),
11327                project: project.into(),
11328            }
11329        }
11330        #[doc = "Updates the build settings."]
11331        #[doc = ""]
11332        #[doc = "Arguments:"]
11333        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11334        #[doc = "* `body`: The new settings."]
11335        #[doc = "* `project`: Project ID or project name"]
11336        pub fn update(
11337            &self,
11338            organization: impl Into<String>,
11339            body: impl Into<models::BuildSettings>,
11340            project: impl Into<String>,
11341        ) -> update::RequestBuilder {
11342            update::RequestBuilder {
11343                client: self.0.clone(),
11344                organization: organization.into(),
11345                body: body.into(),
11346                project: project.into(),
11347            }
11348        }
11349    }
11350    pub mod get {
11351        use super::models;
11352        #[cfg(not(target_arch = "wasm32"))]
11353        use futures::future::BoxFuture;
11354        #[cfg(target_arch = "wasm32")]
11355        use futures::future::LocalBoxFuture as BoxFuture;
11356        #[derive(Debug)]
11357        pub struct Response(
11358            azure_core::http::Response<models::BuildSettings, azure_core::http::JsonFormat>,
11359        );
11360        impl Response {
11361            pub async fn into_body(self) -> azure_core::Result<models::BuildSettings> {
11362                self.0.into_body().await
11363            }
11364            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
11365                self.0.into()
11366            }
11367        }
11368        #[derive(Clone)]
11369        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11370        #[doc = r""]
11371        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11372        #[doc = r" parameters can be chained."]
11373        #[doc = r""]
11374        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11375        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11376        #[doc = r" executes the request and returns a `Result` with the parsed"]
11377        #[doc = r" response."]
11378        #[doc = r""]
11379        #[doc = r" If you need lower-level access to the raw response details"]
11380        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11381        #[doc = r" can finalize the request using the"]
11382        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11383        #[doc = r" that resolves to a lower-level [`Response`] value."]
11384        pub struct RequestBuilder {
11385            pub(crate) client: super::super::Client,
11386            pub(crate) organization: String,
11387            pub(crate) project: String,
11388        }
11389        impl RequestBuilder {
11390            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11391            #[doc = ""]
11392            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11393            #[doc = "However, this function can provide more flexibility when required."]
11394            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11395                Box::pin({
11396                    let this = self.clone();
11397                    async move {
11398                        let url = this.url()?;
11399                        let mut req =
11400                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
11401                        if let Some(auth_header) = this
11402                            .client
11403                            .token_credential()
11404                            .http_authorization_header(&this.client.scopes())
11405                            .await?
11406                        {
11407                            req.insert_header(
11408                                azure_core::http::headers::AUTHORIZATION,
11409                                auth_header,
11410                            );
11411                        }
11412                        let req_body = azure_core::Bytes::new();
11413                        req.set_body(req_body);
11414                        Ok(Response(this.client.send(&mut req).await?.into()))
11415                    }
11416                })
11417            }
11418            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
11419                let mut url = azure_core::http::Url::parse(&format!(
11420                    "{}/{}/{}/_apis/build/settings",
11421                    self.client.endpoint(),
11422                    &self.organization,
11423                    &self.project
11424                ))?;
11425                let has_api_version_already = url
11426                    .query_pairs()
11427                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
11428                if !has_api_version_already {
11429                    url.query_pairs_mut().append_pair(
11430                        azure_core::http::headers::query_param::API_VERSION,
11431                        "7.1-preview",
11432                    );
11433                }
11434                Ok(url)
11435            }
11436        }
11437        impl std::future::IntoFuture for RequestBuilder {
11438            type Output = azure_core::Result<models::BuildSettings>;
11439            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildSettings>>;
11440            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11441            #[doc = ""]
11442            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11443            #[doc = ""]
11444            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11445            fn into_future(self) -> Self::IntoFuture {
11446                Box::pin(async move { self.send().await?.into_body().await })
11447            }
11448        }
11449    }
11450    pub mod update {
11451        use super::models;
11452        #[cfg(not(target_arch = "wasm32"))]
11453        use futures::future::BoxFuture;
11454        #[cfg(target_arch = "wasm32")]
11455        use futures::future::LocalBoxFuture as BoxFuture;
11456        #[derive(Debug)]
11457        pub struct Response(
11458            azure_core::http::Response<models::BuildSettings, azure_core::http::JsonFormat>,
11459        );
11460        impl Response {
11461            pub async fn into_body(self) -> azure_core::Result<models::BuildSettings> {
11462                self.0.into_body().await
11463            }
11464            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
11465                self.0.into()
11466            }
11467        }
11468        #[derive(Clone)]
11469        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11470        #[doc = r""]
11471        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11472        #[doc = r" parameters can be chained."]
11473        #[doc = r""]
11474        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11475        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11476        #[doc = r" executes the request and returns a `Result` with the parsed"]
11477        #[doc = r" response."]
11478        #[doc = r""]
11479        #[doc = r" If you need lower-level access to the raw response details"]
11480        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11481        #[doc = r" can finalize the request using the"]
11482        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11483        #[doc = r" that resolves to a lower-level [`Response`] value."]
11484        pub struct RequestBuilder {
11485            pub(crate) client: super::super::Client,
11486            pub(crate) organization: String,
11487            pub(crate) body: models::BuildSettings,
11488            pub(crate) project: String,
11489        }
11490        impl RequestBuilder {
11491            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11492            #[doc = ""]
11493            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11494            #[doc = "However, this function can provide more flexibility when required."]
11495            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11496                Box::pin({
11497                    let this = self.clone();
11498                    async move {
11499                        let url = this.url()?;
11500                        let mut req =
11501                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
11502                        if let Some(auth_header) = this
11503                            .client
11504                            .token_credential()
11505                            .http_authorization_header(&this.client.scopes())
11506                            .await?
11507                        {
11508                            req.insert_header(
11509                                azure_core::http::headers::AUTHORIZATION,
11510                                auth_header,
11511                            );
11512                        }
11513                        req.insert_header("content-type", "application/json");
11514                        let req_body = azure_core::json::to_json(&this.body)?;
11515                        req.set_body(req_body);
11516                        Ok(Response(this.client.send(&mut req).await?.into()))
11517                    }
11518                })
11519            }
11520            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
11521                let mut url = azure_core::http::Url::parse(&format!(
11522                    "{}/{}/{}/_apis/build/settings",
11523                    self.client.endpoint(),
11524                    &self.organization,
11525                    &self.project
11526                ))?;
11527                let has_api_version_already = url
11528                    .query_pairs()
11529                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
11530                if !has_api_version_already {
11531                    url.query_pairs_mut().append_pair(
11532                        azure_core::http::headers::query_param::API_VERSION,
11533                        "7.1-preview",
11534                    );
11535                }
11536                Ok(url)
11537            }
11538        }
11539        impl std::future::IntoFuture for RequestBuilder {
11540            type Output = azure_core::Result<models::BuildSettings>;
11541            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildSettings>>;
11542            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11543            #[doc = ""]
11544            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11545            #[doc = ""]
11546            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11547            fn into_future(self) -> Self::IntoFuture {
11548                Box::pin(async move { self.send().await?.into_body().await })
11549            }
11550        }
11551    }
11552}
11553pub mod status {
11554    use super::models;
11555    #[cfg(not(target_arch = "wasm32"))]
11556    use futures::future::BoxFuture;
11557    #[cfg(target_arch = "wasm32")]
11558    use futures::future::LocalBoxFuture as BoxFuture;
11559    pub struct Client(pub(crate) super::Client);
11560    impl Client {
11561        #[doc = "<p>Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.</p> <p>If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.</p>"]
11562        #[doc = ""]
11563        #[doc = "Arguments:"]
11564        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11565        #[doc = "* `project`: Project ID or project name"]
11566        #[doc = "* `definition`: Either the definition name with optional leading folder path, or the definition id."]
11567        pub fn get(
11568            &self,
11569            organization: impl Into<String>,
11570            project: impl Into<String>,
11571            definition: impl Into<String>,
11572        ) -> get::RequestBuilder {
11573            get::RequestBuilder {
11574                client: self.0.clone(),
11575                organization: organization.into(),
11576                project: project.into(),
11577                definition: definition.into(),
11578                branch_name: None,
11579                stage_name: None,
11580                job_name: None,
11581                configuration: None,
11582                label: None,
11583            }
11584        }
11585    }
11586    pub mod get {
11587        use super::models;
11588        #[cfg(not(target_arch = "wasm32"))]
11589        use futures::future::BoxFuture;
11590        #[cfg(target_arch = "wasm32")]
11591        use futures::future::LocalBoxFuture as BoxFuture;
11592        #[derive(Debug)]
11593        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
11594        impl Response {
11595            pub async fn into_body(self) -> azure_core::Result<String> {
11596                self.0.into_body().await
11597            }
11598            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
11599                self.0.into()
11600            }
11601        }
11602        #[derive(Clone)]
11603        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11604        #[doc = r""]
11605        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11606        #[doc = r" parameters can be chained."]
11607        #[doc = r""]
11608        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11609        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11610        #[doc = r" executes the request and returns a `Result` with the parsed"]
11611        #[doc = r" response."]
11612        #[doc = r""]
11613        #[doc = r" If you need lower-level access to the raw response details"]
11614        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11615        #[doc = r" can finalize the request using the"]
11616        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11617        #[doc = r" that resolves to a lower-level [`Response`] value."]
11618        pub struct RequestBuilder {
11619            pub(crate) client: super::super::Client,
11620            pub(crate) organization: String,
11621            pub(crate) project: String,
11622            pub(crate) definition: String,
11623            pub(crate) branch_name: Option<String>,
11624            pub(crate) stage_name: Option<String>,
11625            pub(crate) job_name: Option<String>,
11626            pub(crate) configuration: Option<String>,
11627            pub(crate) label: Option<String>,
11628        }
11629        impl RequestBuilder {
11630            #[doc = "Only consider the most recent build for this branch. If not specified, the default branch is used."]
11631            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
11632                self.branch_name = Some(branch_name.into());
11633                self
11634            }
11635            #[doc = "Use this stage within the pipeline to render the status."]
11636            pub fn stage_name(mut self, stage_name: impl Into<String>) -> Self {
11637                self.stage_name = Some(stage_name.into());
11638                self
11639            }
11640            #[doc = "Use this job within a stage of the pipeline to render the status."]
11641            pub fn job_name(mut self, job_name: impl Into<String>) -> Self {
11642                self.job_name = Some(job_name.into());
11643                self
11644            }
11645            #[doc = "Use this job configuration to render the status"]
11646            pub fn configuration(mut self, configuration: impl Into<String>) -> Self {
11647                self.configuration = Some(configuration.into());
11648                self
11649            }
11650            #[doc = "Replaces the default text on the left side of the badge."]
11651            pub fn label(mut self, label: impl Into<String>) -> Self {
11652                self.label = Some(label.into());
11653                self
11654            }
11655            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11656            #[doc = ""]
11657            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11658            #[doc = "However, this function can provide more flexibility when required."]
11659            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11660                Box::pin({
11661                    let this = self.clone();
11662                    async move {
11663                        let url = this.url()?;
11664                        let mut req =
11665                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
11666                        if let Some(auth_header) = this
11667                            .client
11668                            .token_credential()
11669                            .http_authorization_header(&this.client.scopes())
11670                            .await?
11671                        {
11672                            req.insert_header(
11673                                azure_core::http::headers::AUTHORIZATION,
11674                                auth_header,
11675                            );
11676                        }
11677                        if let Some(branch_name) = &this.branch_name {
11678                            req.url_mut()
11679                                .query_pairs_mut()
11680                                .append_pair("branchName", branch_name);
11681                        }
11682                        if let Some(stage_name) = &this.stage_name {
11683                            req.url_mut()
11684                                .query_pairs_mut()
11685                                .append_pair("stageName", stage_name);
11686                        }
11687                        if let Some(job_name) = &this.job_name {
11688                            req.url_mut()
11689                                .query_pairs_mut()
11690                                .append_pair("jobName", job_name);
11691                        }
11692                        if let Some(configuration) = &this.configuration {
11693                            req.url_mut()
11694                                .query_pairs_mut()
11695                                .append_pair("configuration", configuration);
11696                        }
11697                        if let Some(label) = &this.label {
11698                            req.url_mut().query_pairs_mut().append_pair("label", label);
11699                        }
11700                        let req_body = azure_core::Bytes::new();
11701                        req.set_body(req_body);
11702                        Ok(Response(this.client.send(&mut req).await?.into()))
11703                    }
11704                })
11705            }
11706            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
11707                let mut url = azure_core::http::Url::parse(&format!(
11708                    "{}/{}/{}/_apis/build/status/{}",
11709                    self.client.endpoint(),
11710                    &self.organization,
11711                    &self.project,
11712                    &self.definition
11713                ))?;
11714                let has_api_version_already = url
11715                    .query_pairs()
11716                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
11717                if !has_api_version_already {
11718                    url.query_pairs_mut().append_pair(
11719                        azure_core::http::headers::query_param::API_VERSION,
11720                        "7.1-preview",
11721                    );
11722                }
11723                Ok(url)
11724            }
11725        }
11726        impl std::future::IntoFuture for RequestBuilder {
11727            type Output = azure_core::Result<String>;
11728            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
11729            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11730            #[doc = ""]
11731            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11732            #[doc = ""]
11733            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11734            fn into_future(self) -> Self::IntoFuture {
11735                Box::pin(async move { self.send().await?.into_body().await })
11736            }
11737        }
11738    }
11739}
11740pub mod source_providers {
11741    use super::models;
11742    #[cfg(not(target_arch = "wasm32"))]
11743    use futures::future::BoxFuture;
11744    #[cfg(target_arch = "wasm32")]
11745    use futures::future::LocalBoxFuture as BoxFuture;
11746    pub struct Client(pub(crate) super::Client);
11747    impl Client {
11748        #[doc = "Get a list of source providers and their capabilities."]
11749        #[doc = ""]
11750        #[doc = "Arguments:"]
11751        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11752        #[doc = "* `project`: Project ID or project name"]
11753        pub fn list(
11754            &self,
11755            organization: impl Into<String>,
11756            project: impl Into<String>,
11757        ) -> list::RequestBuilder {
11758            list::RequestBuilder {
11759                client: self.0.clone(),
11760                organization: organization.into(),
11761                project: project.into(),
11762            }
11763        }
11764        #[doc = "Gets a list of branches for the given source code repository."]
11765        #[doc = ""]
11766        #[doc = "Arguments:"]
11767        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11768        #[doc = "* `project`: Project ID or project name"]
11769        #[doc = "* `provider_name`: The name of the source provider."]
11770        pub fn list_branches(
11771            &self,
11772            organization: impl Into<String>,
11773            project: impl Into<String>,
11774            provider_name: impl Into<String>,
11775        ) -> list_branches::RequestBuilder {
11776            list_branches::RequestBuilder {
11777                client: self.0.clone(),
11778                organization: organization.into(),
11779                project: project.into(),
11780                provider_name: provider_name.into(),
11781                service_endpoint_id: None,
11782                repository: None,
11783                branch_name: None,
11784            }
11785        }
11786        #[doc = "Gets the contents of a file in the given source code repository."]
11787        #[doc = ""]
11788        #[doc = "Arguments:"]
11789        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11790        #[doc = "* `project`: Project ID or project name"]
11791        #[doc = "* `provider_name`: The name of the source provider."]
11792        pub fn get_file_contents(
11793            &self,
11794            organization: impl Into<String>,
11795            project: impl Into<String>,
11796            provider_name: impl Into<String>,
11797        ) -> get_file_contents::RequestBuilder {
11798            get_file_contents::RequestBuilder {
11799                client: self.0.clone(),
11800                organization: organization.into(),
11801                project: project.into(),
11802                provider_name: provider_name.into(),
11803                service_endpoint_id: None,
11804                repository: None,
11805                commit_or_branch: None,
11806                path: None,
11807            }
11808        }
11809        #[doc = "Gets the contents of a directory in the given source code repository."]
11810        #[doc = ""]
11811        #[doc = "Arguments:"]
11812        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11813        #[doc = "* `project`: Project ID or project name"]
11814        #[doc = "* `provider_name`: The name of the source provider."]
11815        pub fn get_path_contents(
11816            &self,
11817            organization: impl Into<String>,
11818            project: impl Into<String>,
11819            provider_name: impl Into<String>,
11820        ) -> get_path_contents::RequestBuilder {
11821            get_path_contents::RequestBuilder {
11822                client: self.0.clone(),
11823                organization: organization.into(),
11824                project: project.into(),
11825                provider_name: provider_name.into(),
11826                service_endpoint_id: None,
11827                repository: None,
11828                commit_or_branch: None,
11829                path: None,
11830            }
11831        }
11832        #[doc = "Gets a pull request object from source provider."]
11833        #[doc = ""]
11834        #[doc = "Arguments:"]
11835        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11836        #[doc = "* `project`: Project ID or project name"]
11837        #[doc = "* `provider_name`: The name of the source provider."]
11838        #[doc = "* `pull_request_id`: Vendor-specific id of the pull request."]
11839        pub fn get_pull_request(
11840            &self,
11841            organization: impl Into<String>,
11842            project: impl Into<String>,
11843            provider_name: impl Into<String>,
11844            pull_request_id: impl Into<String>,
11845        ) -> get_pull_request::RequestBuilder {
11846            get_pull_request::RequestBuilder {
11847                client: self.0.clone(),
11848                organization: organization.into(),
11849                project: project.into(),
11850                provider_name: provider_name.into(),
11851                pull_request_id: pull_request_id.into(),
11852                repository_id: None,
11853                service_endpoint_id: None,
11854            }
11855        }
11856        #[doc = "Gets a list of source code repositories."]
11857        #[doc = ""]
11858        #[doc = "Arguments:"]
11859        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11860        #[doc = "* `project`: Project ID or project name"]
11861        #[doc = "* `provider_name`: The name of the source provider."]
11862        pub fn list_repositories(
11863            &self,
11864            organization: impl Into<String>,
11865            project: impl Into<String>,
11866            provider_name: impl Into<String>,
11867        ) -> list_repositories::RequestBuilder {
11868            list_repositories::RequestBuilder {
11869                client: self.0.clone(),
11870                organization: organization.into(),
11871                project: project.into(),
11872                provider_name: provider_name.into(),
11873                service_endpoint_id: None,
11874                repository: None,
11875                result_set: None,
11876                page_results: None,
11877                continuation_token: None,
11878            }
11879        }
11880        #[doc = "Gets a list of webhooks installed in the given source code repository."]
11881        #[doc = ""]
11882        #[doc = "Arguments:"]
11883        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11884        #[doc = "* `project`: Project ID or project name"]
11885        #[doc = "* `provider_name`: The name of the source provider."]
11886        pub fn list_webhooks(
11887            &self,
11888            organization: impl Into<String>,
11889            project: impl Into<String>,
11890            provider_name: impl Into<String>,
11891        ) -> list_webhooks::RequestBuilder {
11892            list_webhooks::RequestBuilder {
11893                client: self.0.clone(),
11894                organization: organization.into(),
11895                project: project.into(),
11896                provider_name: provider_name.into(),
11897                service_endpoint_id: None,
11898                repository: None,
11899            }
11900        }
11901        #[doc = "Recreates the webhooks for the specified triggers in the given source code repository."]
11902        #[doc = ""]
11903        #[doc = "Arguments:"]
11904        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11905        #[doc = "* `body`: The types of triggers to restore webhooks for."]
11906        #[doc = "* `project`: Project ID or project name"]
11907        #[doc = "* `provider_name`: The name of the source provider."]
11908        pub fn restore_webhooks(
11909            &self,
11910            organization: impl Into<String>,
11911            body: Vec<String>,
11912            project: impl Into<String>,
11913            provider_name: impl Into<String>,
11914        ) -> restore_webhooks::RequestBuilder {
11915            restore_webhooks::RequestBuilder {
11916                client: self.0.clone(),
11917                organization: organization.into(),
11918                body,
11919                project: project.into(),
11920                provider_name: provider_name.into(),
11921                service_endpoint_id: None,
11922                repository: None,
11923            }
11924        }
11925    }
11926    pub mod list {
11927        use super::models;
11928        #[cfg(not(target_arch = "wasm32"))]
11929        use futures::future::BoxFuture;
11930        #[cfg(target_arch = "wasm32")]
11931        use futures::future::LocalBoxFuture as BoxFuture;
11932        #[derive(Debug)]
11933        pub struct Response(
11934            azure_core::http::Response<
11935                models::SourceProviderAttributesList,
11936                azure_core::http::JsonFormat,
11937            >,
11938        );
11939        impl Response {
11940            pub async fn into_body(
11941                self,
11942            ) -> azure_core::Result<models::SourceProviderAttributesList> {
11943                self.0.into_body().await
11944            }
11945            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
11946                self.0.into()
11947            }
11948        }
11949        #[derive(Clone)]
11950        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11951        #[doc = r""]
11952        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11953        #[doc = r" parameters can be chained."]
11954        #[doc = r""]
11955        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11956        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11957        #[doc = r" executes the request and returns a `Result` with the parsed"]
11958        #[doc = r" response."]
11959        #[doc = r""]
11960        #[doc = r" If you need lower-level access to the raw response details"]
11961        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11962        #[doc = r" can finalize the request using the"]
11963        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11964        #[doc = r" that resolves to a lower-level [`Response`] value."]
11965        pub struct RequestBuilder {
11966            pub(crate) client: super::super::Client,
11967            pub(crate) organization: String,
11968            pub(crate) project: String,
11969        }
11970        impl RequestBuilder {
11971            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11972            #[doc = ""]
11973            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11974            #[doc = "However, this function can provide more flexibility when required."]
11975            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11976                Box::pin({
11977                    let this = self.clone();
11978                    async move {
11979                        let url = this.url()?;
11980                        let mut req =
11981                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
11982                        if let Some(auth_header) = this
11983                            .client
11984                            .token_credential()
11985                            .http_authorization_header(&this.client.scopes())
11986                            .await?
11987                        {
11988                            req.insert_header(
11989                                azure_core::http::headers::AUTHORIZATION,
11990                                auth_header,
11991                            );
11992                        }
11993                        let req_body = azure_core::Bytes::new();
11994                        req.set_body(req_body);
11995                        Ok(Response(this.client.send(&mut req).await?.into()))
11996                    }
11997                })
11998            }
11999            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
12000                let mut url = azure_core::http::Url::parse(&format!(
12001                    "{}/{}/{}/_apis/sourceproviders",
12002                    self.client.endpoint(),
12003                    &self.organization,
12004                    &self.project
12005                ))?;
12006                let has_api_version_already = url
12007                    .query_pairs()
12008                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
12009                if !has_api_version_already {
12010                    url.query_pairs_mut().append_pair(
12011                        azure_core::http::headers::query_param::API_VERSION,
12012                        "7.1-preview",
12013                    );
12014                }
12015                Ok(url)
12016            }
12017        }
12018        impl std::future::IntoFuture for RequestBuilder {
12019            type Output = azure_core::Result<models::SourceProviderAttributesList>;
12020            type IntoFuture =
12021                BoxFuture<'static, azure_core::Result<models::SourceProviderAttributesList>>;
12022            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12023            #[doc = ""]
12024            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12025            #[doc = ""]
12026            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12027            fn into_future(self) -> Self::IntoFuture {
12028                Box::pin(async move { self.send().await?.into_body().await })
12029            }
12030        }
12031    }
12032    pub mod list_branches {
12033        use super::models;
12034        #[cfg(not(target_arch = "wasm32"))]
12035        use futures::future::BoxFuture;
12036        #[cfg(target_arch = "wasm32")]
12037        use futures::future::LocalBoxFuture as BoxFuture;
12038        #[derive(Debug)]
12039        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
12040        impl Response {
12041            pub async fn into_body(self) -> azure_core::Result<Vec<String>> {
12042                self.0.into_body().await
12043            }
12044            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
12045                self.0.into()
12046            }
12047        }
12048        #[derive(Clone)]
12049        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12050        #[doc = r""]
12051        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12052        #[doc = r" parameters can be chained."]
12053        #[doc = r""]
12054        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12055        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12056        #[doc = r" executes the request and returns a `Result` with the parsed"]
12057        #[doc = r" response."]
12058        #[doc = r""]
12059        #[doc = r" If you need lower-level access to the raw response details"]
12060        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12061        #[doc = r" can finalize the request using the"]
12062        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12063        #[doc = r" that resolves to a lower-level [`Response`] value."]
12064        pub struct RequestBuilder {
12065            pub(crate) client: super::super::Client,
12066            pub(crate) organization: String,
12067            pub(crate) project: String,
12068            pub(crate) provider_name: String,
12069            pub(crate) service_endpoint_id: Option<String>,
12070            pub(crate) repository: Option<String>,
12071            pub(crate) branch_name: Option<String>,
12072        }
12073        impl RequestBuilder {
12074            #[doc = "If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit."]
12075            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
12076                self.service_endpoint_id = Some(service_endpoint_id.into());
12077                self
12078            }
12079            #[doc = "The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories."]
12080            pub fn repository(mut self, repository: impl Into<String>) -> Self {
12081                self.repository = Some(repository.into());
12082                self
12083            }
12084            #[doc = "If supplied, the name of the branch to check for specifically."]
12085            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
12086                self.branch_name = Some(branch_name.into());
12087                self
12088            }
12089            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12090            #[doc = ""]
12091            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12092            #[doc = "However, this function can provide more flexibility when required."]
12093            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12094                Box::pin({
12095                    let this = self.clone();
12096                    async move {
12097                        let url = this.url()?;
12098                        let mut req =
12099                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
12100                        if let Some(auth_header) = this
12101                            .client
12102                            .token_credential()
12103                            .http_authorization_header(&this.client.scopes())
12104                            .await?
12105                        {
12106                            req.insert_header(
12107                                azure_core::http::headers::AUTHORIZATION,
12108                                auth_header,
12109                            );
12110                        }
12111                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
12112                            req.url_mut()
12113                                .query_pairs_mut()
12114                                .append_pair("serviceEndpointId", service_endpoint_id);
12115                        }
12116                        if let Some(repository) = &this.repository {
12117                            req.url_mut()
12118                                .query_pairs_mut()
12119                                .append_pair("repository", repository);
12120                        }
12121                        if let Some(branch_name) = &this.branch_name {
12122                            req.url_mut()
12123                                .query_pairs_mut()
12124                                .append_pair("branchName", branch_name);
12125                        }
12126                        let req_body = azure_core::Bytes::new();
12127                        req.set_body(req_body);
12128                        Ok(Response(this.client.send(&mut req).await?.into()))
12129                    }
12130                })
12131            }
12132            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
12133                let mut url = azure_core::http::Url::parse(&format!(
12134                    "{}/{}/{}/_apis/sourceProviders/{}/branches",
12135                    self.client.endpoint(),
12136                    &self.organization,
12137                    &self.project,
12138                    &self.provider_name
12139                ))?;
12140                let has_api_version_already = url
12141                    .query_pairs()
12142                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
12143                if !has_api_version_already {
12144                    url.query_pairs_mut().append_pair(
12145                        azure_core::http::headers::query_param::API_VERSION,
12146                        "7.1-preview",
12147                    );
12148                }
12149                Ok(url)
12150            }
12151        }
12152        impl std::future::IntoFuture for RequestBuilder {
12153            type Output = azure_core::Result<Vec<String>>;
12154            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
12155            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12156            #[doc = ""]
12157            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12158            #[doc = ""]
12159            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12160            fn into_future(self) -> Self::IntoFuture {
12161                Box::pin(async move { self.send().await?.into_body().await })
12162            }
12163        }
12164    }
12165    pub mod get_file_contents {
12166        use super::models;
12167        #[cfg(not(target_arch = "wasm32"))]
12168        use futures::future::BoxFuture;
12169        #[cfg(target_arch = "wasm32")]
12170        use futures::future::LocalBoxFuture as BoxFuture;
12171        #[derive(Debug)]
12172        pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
12173        impl Response {
12174            pub async fn into_body(self) -> azure_core::Result<String> {
12175                self.0.into_body().await
12176            }
12177            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
12178                self.0.into()
12179            }
12180        }
12181        #[derive(Clone)]
12182        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12183        #[doc = r""]
12184        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12185        #[doc = r" parameters can be chained."]
12186        #[doc = r""]
12187        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12188        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12189        #[doc = r" executes the request and returns a `Result` with the parsed"]
12190        #[doc = r" response."]
12191        #[doc = r""]
12192        #[doc = r" If you need lower-level access to the raw response details"]
12193        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12194        #[doc = r" can finalize the request using the"]
12195        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12196        #[doc = r" that resolves to a lower-level [`Response`] value."]
12197        pub struct RequestBuilder {
12198            pub(crate) client: super::super::Client,
12199            pub(crate) organization: String,
12200            pub(crate) project: String,
12201            pub(crate) provider_name: String,
12202            pub(crate) service_endpoint_id: Option<String>,
12203            pub(crate) repository: Option<String>,
12204            pub(crate) commit_or_branch: Option<String>,
12205            pub(crate) path: Option<String>,
12206        }
12207        impl RequestBuilder {
12208            #[doc = "If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit."]
12209            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
12210                self.service_endpoint_id = Some(service_endpoint_id.into());
12211                self
12212            }
12213            #[doc = "If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories."]
12214            pub fn repository(mut self, repository: impl Into<String>) -> Self {
12215                self.repository = Some(repository.into());
12216                self
12217            }
12218            #[doc = "The identifier of the commit or branch from which a file's contents are retrieved."]
12219            pub fn commit_or_branch(mut self, commit_or_branch: impl Into<String>) -> Self {
12220                self.commit_or_branch = Some(commit_or_branch.into());
12221                self
12222            }
12223            #[doc = "The path to the file to retrieve, relative to the root of the repository."]
12224            pub fn path(mut self, path: impl Into<String>) -> Self {
12225                self.path = Some(path.into());
12226                self
12227            }
12228            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12229            #[doc = ""]
12230            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12231            #[doc = "However, this function can provide more flexibility when required."]
12232            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12233                Box::pin({
12234                    let this = self.clone();
12235                    async move {
12236                        let url = this.url()?;
12237                        let mut req =
12238                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
12239                        if let Some(auth_header) = this
12240                            .client
12241                            .token_credential()
12242                            .http_authorization_header(&this.client.scopes())
12243                            .await?
12244                        {
12245                            req.insert_header(
12246                                azure_core::http::headers::AUTHORIZATION,
12247                                auth_header,
12248                            );
12249                        }
12250                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
12251                            req.url_mut()
12252                                .query_pairs_mut()
12253                                .append_pair("serviceEndpointId", service_endpoint_id);
12254                        }
12255                        if let Some(repository) = &this.repository {
12256                            req.url_mut()
12257                                .query_pairs_mut()
12258                                .append_pair("repository", repository);
12259                        }
12260                        if let Some(commit_or_branch) = &this.commit_or_branch {
12261                            req.url_mut()
12262                                .query_pairs_mut()
12263                                .append_pair("commitOrBranch", commit_or_branch);
12264                        }
12265                        if let Some(path) = &this.path {
12266                            req.url_mut().query_pairs_mut().append_pair("path", path);
12267                        }
12268                        let req_body = azure_core::Bytes::new();
12269                        req.set_body(req_body);
12270                        Ok(Response(this.client.send(&mut req).await?.into()))
12271                    }
12272                })
12273            }
12274            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
12275                let mut url = azure_core::http::Url::parse(&format!(
12276                    "{}/{}/{}/_apis/sourceProviders/{}/filecontents",
12277                    self.client.endpoint(),
12278                    &self.organization,
12279                    &self.project,
12280                    &self.provider_name
12281                ))?;
12282                let has_api_version_already = url
12283                    .query_pairs()
12284                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
12285                if !has_api_version_already {
12286                    url.query_pairs_mut().append_pair(
12287                        azure_core::http::headers::query_param::API_VERSION,
12288                        "7.1-preview",
12289                    );
12290                }
12291                Ok(url)
12292            }
12293        }
12294        impl std::future::IntoFuture for RequestBuilder {
12295            type Output = azure_core::Result<String>;
12296            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
12297            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12298            #[doc = ""]
12299            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12300            #[doc = ""]
12301            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12302            fn into_future(self) -> Self::IntoFuture {
12303                Box::pin(async move { self.send().await?.into_body().await })
12304            }
12305        }
12306    }
12307    pub mod get_path_contents {
12308        use super::models;
12309        #[cfg(not(target_arch = "wasm32"))]
12310        use futures::future::BoxFuture;
12311        #[cfg(target_arch = "wasm32")]
12312        use futures::future::LocalBoxFuture as BoxFuture;
12313        #[derive(Debug)]
12314        pub struct Response(
12315            azure_core::http::Response<
12316                models::SourceRepositoryItemList,
12317                azure_core::http::JsonFormat,
12318            >,
12319        );
12320        impl Response {
12321            pub async fn into_body(self) -> azure_core::Result<models::SourceRepositoryItemList> {
12322                self.0.into_body().await
12323            }
12324            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
12325                self.0.into()
12326            }
12327        }
12328        #[derive(Clone)]
12329        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12330        #[doc = r""]
12331        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12332        #[doc = r" parameters can be chained."]
12333        #[doc = r""]
12334        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12335        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12336        #[doc = r" executes the request and returns a `Result` with the parsed"]
12337        #[doc = r" response."]
12338        #[doc = r""]
12339        #[doc = r" If you need lower-level access to the raw response details"]
12340        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12341        #[doc = r" can finalize the request using the"]
12342        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12343        #[doc = r" that resolves to a lower-level [`Response`] value."]
12344        pub struct RequestBuilder {
12345            pub(crate) client: super::super::Client,
12346            pub(crate) organization: String,
12347            pub(crate) project: String,
12348            pub(crate) provider_name: String,
12349            pub(crate) service_endpoint_id: Option<String>,
12350            pub(crate) repository: Option<String>,
12351            pub(crate) commit_or_branch: Option<String>,
12352            pub(crate) path: Option<String>,
12353        }
12354        impl RequestBuilder {
12355            #[doc = "If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit."]
12356            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
12357                self.service_endpoint_id = Some(service_endpoint_id.into());
12358                self
12359            }
12360            #[doc = "If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories."]
12361            pub fn repository(mut self, repository: impl Into<String>) -> Self {
12362                self.repository = Some(repository.into());
12363                self
12364            }
12365            #[doc = "The identifier of the commit or branch from which a file's contents are retrieved."]
12366            pub fn commit_or_branch(mut self, commit_or_branch: impl Into<String>) -> Self {
12367                self.commit_or_branch = Some(commit_or_branch.into());
12368                self
12369            }
12370            #[doc = "The path contents to list, relative to the root of the repository."]
12371            pub fn path(mut self, path: impl Into<String>) -> Self {
12372                self.path = Some(path.into());
12373                self
12374            }
12375            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12376            #[doc = ""]
12377            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12378            #[doc = "However, this function can provide more flexibility when required."]
12379            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12380                Box::pin({
12381                    let this = self.clone();
12382                    async move {
12383                        let url = this.url()?;
12384                        let mut req =
12385                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
12386                        if let Some(auth_header) = this
12387                            .client
12388                            .token_credential()
12389                            .http_authorization_header(&this.client.scopes())
12390                            .await?
12391                        {
12392                            req.insert_header(
12393                                azure_core::http::headers::AUTHORIZATION,
12394                                auth_header,
12395                            );
12396                        }
12397                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
12398                            req.url_mut()
12399                                .query_pairs_mut()
12400                                .append_pair("serviceEndpointId", service_endpoint_id);
12401                        }
12402                        if let Some(repository) = &this.repository {
12403                            req.url_mut()
12404                                .query_pairs_mut()
12405                                .append_pair("repository", repository);
12406                        }
12407                        if let Some(commit_or_branch) = &this.commit_or_branch {
12408                            req.url_mut()
12409                                .query_pairs_mut()
12410                                .append_pair("commitOrBranch", commit_or_branch);
12411                        }
12412                        if let Some(path) = &this.path {
12413                            req.url_mut().query_pairs_mut().append_pair("path", path);
12414                        }
12415                        let req_body = azure_core::Bytes::new();
12416                        req.set_body(req_body);
12417                        Ok(Response(this.client.send(&mut req).await?.into()))
12418                    }
12419                })
12420            }
12421            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
12422                let mut url = azure_core::http::Url::parse(&format!(
12423                    "{}/{}/{}/_apis/sourceProviders/{}/pathcontents",
12424                    self.client.endpoint(),
12425                    &self.organization,
12426                    &self.project,
12427                    &self.provider_name
12428                ))?;
12429                let has_api_version_already = url
12430                    .query_pairs()
12431                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
12432                if !has_api_version_already {
12433                    url.query_pairs_mut().append_pair(
12434                        azure_core::http::headers::query_param::API_VERSION,
12435                        "7.1-preview",
12436                    );
12437                }
12438                Ok(url)
12439            }
12440        }
12441        impl std::future::IntoFuture for RequestBuilder {
12442            type Output = azure_core::Result<models::SourceRepositoryItemList>;
12443            type IntoFuture =
12444                BoxFuture<'static, azure_core::Result<models::SourceRepositoryItemList>>;
12445            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12446            #[doc = ""]
12447            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12448            #[doc = ""]
12449            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12450            fn into_future(self) -> Self::IntoFuture {
12451                Box::pin(async move { self.send().await?.into_body().await })
12452            }
12453        }
12454    }
12455    pub mod get_pull_request {
12456        use super::models;
12457        #[cfg(not(target_arch = "wasm32"))]
12458        use futures::future::BoxFuture;
12459        #[cfg(target_arch = "wasm32")]
12460        use futures::future::LocalBoxFuture as BoxFuture;
12461        #[derive(Debug)]
12462        pub struct Response(
12463            azure_core::http::Response<models::PullRequest, azure_core::http::JsonFormat>,
12464        );
12465        impl Response {
12466            pub async fn into_body(self) -> azure_core::Result<models::PullRequest> {
12467                self.0.into_body().await
12468            }
12469            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
12470                self.0.into()
12471            }
12472        }
12473        #[derive(Clone)]
12474        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12475        #[doc = r""]
12476        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12477        #[doc = r" parameters can be chained."]
12478        #[doc = r""]
12479        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12480        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12481        #[doc = r" executes the request and returns a `Result` with the parsed"]
12482        #[doc = r" response."]
12483        #[doc = r""]
12484        #[doc = r" If you need lower-level access to the raw response details"]
12485        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12486        #[doc = r" can finalize the request using the"]
12487        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12488        #[doc = r" that resolves to a lower-level [`Response`] value."]
12489        pub struct RequestBuilder {
12490            pub(crate) client: super::super::Client,
12491            pub(crate) organization: String,
12492            pub(crate) project: String,
12493            pub(crate) provider_name: String,
12494            pub(crate) pull_request_id: String,
12495            pub(crate) repository_id: Option<String>,
12496            pub(crate) service_endpoint_id: Option<String>,
12497        }
12498        impl RequestBuilder {
12499            #[doc = "Vendor-specific identifier or the name of the repository that contains the pull request."]
12500            pub fn repository_id(mut self, repository_id: impl Into<String>) -> Self {
12501                self.repository_id = Some(repository_id.into());
12502                self
12503            }
12504            #[doc = "If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit."]
12505            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
12506                self.service_endpoint_id = Some(service_endpoint_id.into());
12507                self
12508            }
12509            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12510            #[doc = ""]
12511            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12512            #[doc = "However, this function can provide more flexibility when required."]
12513            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12514                Box::pin({
12515                    let this = self.clone();
12516                    async move {
12517                        let url = this.url()?;
12518                        let mut req =
12519                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
12520                        if let Some(auth_header) = this
12521                            .client
12522                            .token_credential()
12523                            .http_authorization_header(&this.client.scopes())
12524                            .await?
12525                        {
12526                            req.insert_header(
12527                                azure_core::http::headers::AUTHORIZATION,
12528                                auth_header,
12529                            );
12530                        }
12531                        if let Some(repository_id) = &this.repository_id {
12532                            req.url_mut()
12533                                .query_pairs_mut()
12534                                .append_pair("repositoryId", repository_id);
12535                        }
12536                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
12537                            req.url_mut()
12538                                .query_pairs_mut()
12539                                .append_pair("serviceEndpointId", service_endpoint_id);
12540                        }
12541                        let req_body = azure_core::Bytes::new();
12542                        req.set_body(req_body);
12543                        Ok(Response(this.client.send(&mut req).await?.into()))
12544                    }
12545                })
12546            }
12547            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
12548                let mut url = azure_core::http::Url::parse(&format!(
12549                    "{}/{}/{}/_apis/sourceProviders/{}/pullrequests/{}",
12550                    self.client.endpoint(),
12551                    &self.organization,
12552                    &self.project,
12553                    &self.provider_name,
12554                    &self.pull_request_id
12555                ))?;
12556                let has_api_version_already = url
12557                    .query_pairs()
12558                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
12559                if !has_api_version_already {
12560                    url.query_pairs_mut().append_pair(
12561                        azure_core::http::headers::query_param::API_VERSION,
12562                        "7.1-preview",
12563                    );
12564                }
12565                Ok(url)
12566            }
12567        }
12568        impl std::future::IntoFuture for RequestBuilder {
12569            type Output = azure_core::Result<models::PullRequest>;
12570            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PullRequest>>;
12571            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12572            #[doc = ""]
12573            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12574            #[doc = ""]
12575            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12576            fn into_future(self) -> Self::IntoFuture {
12577                Box::pin(async move { self.send().await?.into_body().await })
12578            }
12579        }
12580    }
12581    pub mod list_repositories {
12582        use super::models;
12583        #[cfg(not(target_arch = "wasm32"))]
12584        use futures::future::BoxFuture;
12585        #[cfg(target_arch = "wasm32")]
12586        use futures::future::LocalBoxFuture as BoxFuture;
12587        #[derive(Debug)]
12588        pub struct Response(
12589            azure_core::http::Response<models::SourceRepositories, azure_core::http::JsonFormat>,
12590        );
12591        impl Response {
12592            pub async fn into_body(self) -> azure_core::Result<models::SourceRepositories> {
12593                self.0.into_body().await
12594            }
12595            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
12596                self.0.into()
12597            }
12598        }
12599        #[derive(Clone)]
12600        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12601        #[doc = r""]
12602        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12603        #[doc = r" parameters can be chained."]
12604        #[doc = r""]
12605        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12606        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12607        #[doc = r" executes the request and returns a `Result` with the parsed"]
12608        #[doc = r" response."]
12609        #[doc = r""]
12610        #[doc = r" If you need lower-level access to the raw response details"]
12611        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12612        #[doc = r" can finalize the request using the"]
12613        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12614        #[doc = r" that resolves to a lower-level [`Response`] value."]
12615        pub struct RequestBuilder {
12616            pub(crate) client: super::super::Client,
12617            pub(crate) organization: String,
12618            pub(crate) project: String,
12619            pub(crate) provider_name: String,
12620            pub(crate) service_endpoint_id: Option<String>,
12621            pub(crate) repository: Option<String>,
12622            pub(crate) result_set: Option<String>,
12623            pub(crate) page_results: Option<bool>,
12624            pub(crate) continuation_token: Option<String>,
12625        }
12626        impl RequestBuilder {
12627            #[doc = "If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit."]
12628            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
12629                self.service_endpoint_id = Some(service_endpoint_id.into());
12630                self
12631            }
12632            #[doc = "If specified, the vendor-specific identifier or the name of a single repository to get."]
12633            pub fn repository(mut self, repository: impl Into<String>) -> Self {
12634                self.repository = Some(repository.into());
12635                self
12636            }
12637            #[doc = "'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set."]
12638            pub fn result_set(mut self, result_set: impl Into<String>) -> Self {
12639                self.result_set = Some(result_set.into());
12640                self
12641            }
12642            #[doc = "If set to true, this will limit the set of results and will return a continuation token to continue the query."]
12643            pub fn page_results(mut self, page_results: bool) -> Self {
12644                self.page_results = Some(page_results);
12645                self
12646            }
12647            #[doc = "When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories."]
12648            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
12649                self.continuation_token = Some(continuation_token.into());
12650                self
12651            }
12652            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12653            #[doc = ""]
12654            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12655            #[doc = "However, this function can provide more flexibility when required."]
12656            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12657                Box::pin({
12658                    let this = self.clone();
12659                    async move {
12660                        let url = this.url()?;
12661                        let mut req =
12662                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
12663                        if let Some(auth_header) = this
12664                            .client
12665                            .token_credential()
12666                            .http_authorization_header(&this.client.scopes())
12667                            .await?
12668                        {
12669                            req.insert_header(
12670                                azure_core::http::headers::AUTHORIZATION,
12671                                auth_header,
12672                            );
12673                        }
12674                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
12675                            req.url_mut()
12676                                .query_pairs_mut()
12677                                .append_pair("serviceEndpointId", service_endpoint_id);
12678                        }
12679                        if let Some(repository) = &this.repository {
12680                            req.url_mut()
12681                                .query_pairs_mut()
12682                                .append_pair("repository", repository);
12683                        }
12684                        if let Some(result_set) = &this.result_set {
12685                            req.url_mut()
12686                                .query_pairs_mut()
12687                                .append_pair("resultSet", result_set);
12688                        }
12689                        if let Some(page_results) = &this.page_results {
12690                            req.url_mut()
12691                                .query_pairs_mut()
12692                                .append_pair("pageResults", &page_results.to_string());
12693                        }
12694                        if let Some(continuation_token) = &this.continuation_token {
12695                            req.url_mut()
12696                                .query_pairs_mut()
12697                                .append_pair("continuationToken", continuation_token);
12698                        }
12699                        let req_body = azure_core::Bytes::new();
12700                        req.set_body(req_body);
12701                        Ok(Response(this.client.send(&mut req).await?.into()))
12702                    }
12703                })
12704            }
12705            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
12706                let mut url = azure_core::http::Url::parse(&format!(
12707                    "{}/{}/{}/_apis/sourceProviders/{}/repositories",
12708                    self.client.endpoint(),
12709                    &self.organization,
12710                    &self.project,
12711                    &self.provider_name
12712                ))?;
12713                let has_api_version_already = url
12714                    .query_pairs()
12715                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
12716                if !has_api_version_already {
12717                    url.query_pairs_mut().append_pair(
12718                        azure_core::http::headers::query_param::API_VERSION,
12719                        "7.1-preview",
12720                    );
12721                }
12722                Ok(url)
12723            }
12724        }
12725        impl std::future::IntoFuture for RequestBuilder {
12726            type Output = azure_core::Result<models::SourceRepositories>;
12727            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SourceRepositories>>;
12728            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12729            #[doc = ""]
12730            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12731            #[doc = ""]
12732            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12733            fn into_future(self) -> Self::IntoFuture {
12734                Box::pin(async move { self.send().await?.into_body().await })
12735            }
12736        }
12737    }
12738    pub mod list_webhooks {
12739        use super::models;
12740        #[cfg(not(target_arch = "wasm32"))]
12741        use futures::future::BoxFuture;
12742        #[cfg(target_arch = "wasm32")]
12743        use futures::future::LocalBoxFuture as BoxFuture;
12744        #[derive(Debug)]
12745        pub struct Response(
12746            azure_core::http::Response<models::RepositoryWebhookList, azure_core::http::JsonFormat>,
12747        );
12748        impl Response {
12749            pub async fn into_body(self) -> azure_core::Result<models::RepositoryWebhookList> {
12750                self.0.into_body().await
12751            }
12752            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
12753                self.0.into()
12754            }
12755        }
12756        #[derive(Clone)]
12757        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12758        #[doc = r""]
12759        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12760        #[doc = r" parameters can be chained."]
12761        #[doc = r""]
12762        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12763        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12764        #[doc = r" executes the request and returns a `Result` with the parsed"]
12765        #[doc = r" response."]
12766        #[doc = r""]
12767        #[doc = r" If you need lower-level access to the raw response details"]
12768        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12769        #[doc = r" can finalize the request using the"]
12770        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12771        #[doc = r" that resolves to a lower-level [`Response`] value."]
12772        pub struct RequestBuilder {
12773            pub(crate) client: super::super::Client,
12774            pub(crate) organization: String,
12775            pub(crate) project: String,
12776            pub(crate) provider_name: String,
12777            pub(crate) service_endpoint_id: Option<String>,
12778            pub(crate) repository: Option<String>,
12779        }
12780        impl RequestBuilder {
12781            #[doc = "If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit."]
12782            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
12783                self.service_endpoint_id = Some(service_endpoint_id.into());
12784                self
12785            }
12786            #[doc = "If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories."]
12787            pub fn repository(mut self, repository: impl Into<String>) -> Self {
12788                self.repository = Some(repository.into());
12789                self
12790            }
12791            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12792            #[doc = ""]
12793            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12794            #[doc = "However, this function can provide more flexibility when required."]
12795            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12796                Box::pin({
12797                    let this = self.clone();
12798                    async move {
12799                        let url = this.url()?;
12800                        let mut req =
12801                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
12802                        if let Some(auth_header) = this
12803                            .client
12804                            .token_credential()
12805                            .http_authorization_header(&this.client.scopes())
12806                            .await?
12807                        {
12808                            req.insert_header(
12809                                azure_core::http::headers::AUTHORIZATION,
12810                                auth_header,
12811                            );
12812                        }
12813                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
12814                            req.url_mut()
12815                                .query_pairs_mut()
12816                                .append_pair("serviceEndpointId", service_endpoint_id);
12817                        }
12818                        if let Some(repository) = &this.repository {
12819                            req.url_mut()
12820                                .query_pairs_mut()
12821                                .append_pair("repository", repository);
12822                        }
12823                        let req_body = azure_core::Bytes::new();
12824                        req.set_body(req_body);
12825                        Ok(Response(this.client.send(&mut req).await?.into()))
12826                    }
12827                })
12828            }
12829            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
12830                let mut url = azure_core::http::Url::parse(&format!(
12831                    "{}/{}/{}/_apis/sourceProviders/{}/webhooks",
12832                    self.client.endpoint(),
12833                    &self.organization,
12834                    &self.project,
12835                    &self.provider_name
12836                ))?;
12837                let has_api_version_already = url
12838                    .query_pairs()
12839                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
12840                if !has_api_version_already {
12841                    url.query_pairs_mut().append_pair(
12842                        azure_core::http::headers::query_param::API_VERSION,
12843                        "7.1-preview",
12844                    );
12845                }
12846                Ok(url)
12847            }
12848        }
12849        impl std::future::IntoFuture for RequestBuilder {
12850            type Output = azure_core::Result<models::RepositoryWebhookList>;
12851            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RepositoryWebhookList>>;
12852            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12853            #[doc = ""]
12854            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12855            #[doc = ""]
12856            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12857            fn into_future(self) -> Self::IntoFuture {
12858                Box::pin(async move { self.send().await?.into_body().await })
12859            }
12860        }
12861    }
12862    pub mod restore_webhooks {
12863        use super::models;
12864        #[cfg(not(target_arch = "wasm32"))]
12865        use futures::future::BoxFuture;
12866        #[cfg(target_arch = "wasm32")]
12867        use futures::future::LocalBoxFuture as BoxFuture;
12868        #[derive(Debug)]
12869        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
12870        impl Response {
12871            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
12872                self.0.into()
12873            }
12874        }
12875        #[derive(Clone)]
12876        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12877        #[doc = r""]
12878        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12879        #[doc = r" parameters can be chained."]
12880        #[doc = r""]
12881        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12882        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12883        #[doc = r" executes the request and returns a `Result` with the parsed"]
12884        #[doc = r" response."]
12885        #[doc = r""]
12886        #[doc = r" If you need lower-level access to the raw response details"]
12887        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12888        #[doc = r" can finalize the request using the"]
12889        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12890        #[doc = r" that resolves to a lower-level [`Response`] value."]
12891        pub struct RequestBuilder {
12892            pub(crate) client: super::super::Client,
12893            pub(crate) organization: String,
12894            pub(crate) body: Vec<String>,
12895            pub(crate) project: String,
12896            pub(crate) provider_name: String,
12897            pub(crate) service_endpoint_id: Option<String>,
12898            pub(crate) repository: Option<String>,
12899        }
12900        impl RequestBuilder {
12901            #[doc = "If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit."]
12902            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
12903                self.service_endpoint_id = Some(service_endpoint_id.into());
12904                self
12905            }
12906            #[doc = "If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories."]
12907            pub fn repository(mut self, repository: impl Into<String>) -> Self {
12908                self.repository = Some(repository.into());
12909                self
12910            }
12911            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12912            #[doc = ""]
12913            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12914            #[doc = "However, this function can provide more flexibility when required."]
12915            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12916                Box::pin({
12917                    let this = self.clone();
12918                    async move {
12919                        let url = this.url()?;
12920                        let mut req =
12921                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
12922                        if let Some(auth_header) = this
12923                            .client
12924                            .token_credential()
12925                            .http_authorization_header(&this.client.scopes())
12926                            .await?
12927                        {
12928                            req.insert_header(
12929                                azure_core::http::headers::AUTHORIZATION,
12930                                auth_header,
12931                            );
12932                        }
12933                        req.insert_header("content-type", "application/json");
12934                        let req_body = azure_core::json::to_json(&this.body)?;
12935                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
12936                            req.url_mut()
12937                                .query_pairs_mut()
12938                                .append_pair("serviceEndpointId", service_endpoint_id);
12939                        }
12940                        if let Some(repository) = &this.repository {
12941                            req.url_mut()
12942                                .query_pairs_mut()
12943                                .append_pair("repository", repository);
12944                        }
12945                        req.set_body(req_body);
12946                        Ok(Response(this.client.send(&mut req).await?.into()))
12947                    }
12948                })
12949            }
12950            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
12951                let mut url = azure_core::http::Url::parse(&format!(
12952                    "{}/{}/{}/_apis/sourceProviders/{}/webhooks",
12953                    self.client.endpoint(),
12954                    &self.organization,
12955                    &self.project,
12956                    &self.provider_name
12957                ))?;
12958                let has_api_version_already = url
12959                    .query_pairs()
12960                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
12961                if !has_api_version_already {
12962                    url.query_pairs_mut().append_pair(
12963                        azure_core::http::headers::query_param::API_VERSION,
12964                        "7.1-preview",
12965                    );
12966                }
12967                Ok(url)
12968            }
12969        }
12970        impl std::future::IntoFuture for RequestBuilder {
12971            type Output = azure_core::Result<()>;
12972            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
12973            #[doc = "Returns a future that sends the request and waits for the response."]
12974            #[doc = ""]
12975            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12976            #[doc = ""]
12977            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12978            fn into_future(self) -> Self::IntoFuture {
12979                Box::pin(async move {
12980                    let _rsp = self.send().await?;
12981                    Ok(())
12982                })
12983            }
12984        }
12985    }
12986}